@k3-universe/react-kit 0.0.1 → 0.0.3
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/.storybook/preview.ts +1 -1
- package/dist/index.d.ts +63 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +91 -0
- package/dist/kit/builder/data-table/components/DataTable.d.ts +4 -1
- package/dist/kit/builder/data-table/components/DataTable.d.ts.map +1 -1
- package/dist/kit/builder/data-table/index.d.ts +6 -5
- package/dist/kit/builder/data-table/index.d.ts.map +1 -1
- package/dist/kit/builder/form/components/FormBuilder.d.ts +5 -2
- package/dist/kit/builder/form/components/FormBuilder.d.ts.map +1 -1
- package/dist/kit/builder/form/components/{FormActions.d.ts → FormBuilderActions.d.ts} +3 -3
- package/dist/kit/builder/form/components/FormBuilderActions.d.ts.map +1 -0
- package/{storybook-static/kit/builder/form/components/FormField.d.ts → dist/kit/builder/form/components/FormBuilderField.d.ts} +4 -4
- package/dist/kit/builder/form/components/FormBuilderField.d.ts.map +1 -0
- package/dist/kit/builder/form/components/index.d.ts +2 -3
- package/dist/kit/builder/form/components/index.d.ts.map +1 -1
- package/dist/kit/builder/form/utils/field-factories.d.ts +1 -0
- package/dist/kit/builder/form/utils/field-factories.d.ts.map +1 -1
- package/dist/kit/builder/section/SectionBuilder.d.ts.map +1 -1
- package/dist/kit/components/autocomplete/types.d.ts +1 -1
- package/dist/kit/components/autocomplete/types.d.ts.map +1 -1
- package/dist/kit/layouts/admin/components/AdminLayout.d.ts.map +1 -1
- package/dist/kit/layouts/admin/hooks/menu.d.ts +1 -0
- package/dist/kit/layouts/admin/hooks/menu.d.ts.map +1 -1
- package/dist/kit/providers/ThemeProvider.d.ts.map +1 -1
- package/dist/kit/themes/base.css +1 -0
- package/dist/kit/themes/clean-slate.css +1 -0
- package/dist/kit/themes/default.css +1 -0
- package/dist/kit/themes/minimal-modern.css +1 -0
- package/dist/kit/themes/spotify.css +1 -0
- package/package.json +11 -10
- package/src/index.ts +88 -0
- package/src/kit/builder/data-table/components/DataTable.tsx +63 -23
- package/src/kit/builder/data-table/index.ts +6 -5
- package/src/kit/builder/form/components/FormBuilder.tsx +37 -10
- package/src/kit/builder/form/components/{FormActions.tsx → FormBuilderActions.tsx} +3 -3
- package/src/kit/builder/form/components/{FormField.tsx → FormBuilderField.tsx} +131 -9
- package/src/kit/builder/form/components/index.ts +2 -3
- package/src/kit/builder/form/utils/field-factories.ts +13 -0
- package/src/kit/builder/section/SectionBuilder.tsx +67 -10
- package/src/kit/components/autocomplete/types.ts +1 -1
- package/src/kit/layouts/admin/components/AdminLayout.tsx +1 -2
- package/src/kit/layouts/admin/hooks/menu.ts +2 -2
- package/src/kit/providers/ThemeProvider.tsx +38 -38
- package/src/stories/kit/builder/Form.Basic.stories.tsx +2 -0
- package/src/stories/kit/builder/Form.Simple.stories.tsx +4 -0
- package/src/stories/kit/layouts/admin/AdminLayout.Basic.stories.tsx +2 -0
- package/src/stories/kit/layouts/admin/AdminLayout.Collapsible.stories.tsx +2 -0
- package/src/stories/kit/layouts/admin/AdminLayout.Complex.stories.tsx +2 -0
- package/src/stories/kit/layouts/admin/AdminLayout.CustomSidebarHeaderComponent.stories.tsx +2 -0
- package/src/stories/kit/layouts/admin/AdminLayout.CustomSidebarTitleAndIcon.stories.tsx +2 -0
- package/src/stories/kit/layouts/admin/AdminLayout.HeaderSlots.stories.tsx +2 -0
- package/storybook-static/assets/{Accordion.stories-N1auke5L.js → Accordion.stories-q6yg6wg1.js} +1 -1
- package/storybook-static/assets/{AdminLayout-Cxd0-A_L.js → AdminLayout-B9bV4J_6.js} +1 -1
- package/storybook-static/assets/{AdminLayout.Basic.stories-C_I6rWuq.js → AdminLayout.Basic.stories-C-ZxuH-O.js} +1 -1
- package/storybook-static/assets/AdminLayout.Collapsible.stories-xcQzkxio.js +4 -0
- package/storybook-static/assets/{AdminLayout.Complex.stories-BbY1Ue6d.js → AdminLayout.Complex.stories-DyjkVpvE.js} +1 -1
- package/storybook-static/assets/{AdminLayout.CustomSidebarHeaderComponent.stories-LFVi-aIv.js → AdminLayout.CustomSidebarHeaderComponent.stories-BqhzWCIA.js} +1 -1
- package/storybook-static/assets/AdminLayout.CustomSidebarTitleAndIcon.stories-aWxyR67T.js +4 -0
- package/storybook-static/assets/{AdminLayout.HeaderSlots.stories-BactzgkF.js → AdminLayout.HeaderSlots.stories-dNzhUdDt.js} +1 -1
- package/storybook-static/assets/{Alert.stories-_FtuixdR.js → Alert.stories-DXwNfJ3w.js} +1 -1
- package/storybook-static/assets/{AlertDialog.stories-6NY3BjwR.js → AlertDialog.stories-I324NsnP.js} +1 -1
- package/storybook-static/assets/{AspectRatio.stories-DAT11y02.js → AspectRatio.stories-CghHiX3Z.js} +1 -1
- package/storybook-static/assets/{Autocomplete-DngjqsCM.js → Autocomplete-B4gV705L.js} +1 -1
- package/storybook-static/assets/{Autocomplete.stories-BCaOrgTR.js → Autocomplete.stories-CyOvjTGN.js} +1 -1
- package/storybook-static/assets/{Avatar.stories-DlzxSLJ-.js → Avatar.stories-CEF5FVSR.js} +1 -1
- package/storybook-static/assets/{Badge.stories-DKHXsoV5.js → Badge.stories-_-G3GriP.js} +1 -1
- package/storybook-static/assets/{Breadcrumb.stories-D8eUHpf7.js → Breadcrumb.stories-DORe9T4b.js} +1 -1
- package/storybook-static/assets/{Button.stories-kvPdKxdw.js → Button.stories-3nQ6wsBX.js} +1 -1
- package/storybook-static/assets/{Calendar.stories-D-hUtQQI.js → Calendar.stories-Dn__djE1.js} +1 -1
- package/storybook-static/assets/{Card.stories-y8Z7NgrQ.js → Card.stories-BJcbdwCI.js} +1 -1
- package/storybook-static/assets/{Carousel.stories-CFcHYKgp.js → Carousel.stories-CfqbE7Va.js} +1 -1
- package/storybook-static/assets/{Chart.stories-BJwLNKfE.js → Chart.stories-cGgef3tv.js} +1 -1
- package/storybook-static/assets/{Checkbox.stories-B22Fbwx1.js → Checkbox.stories-BcaxWzCS.js} +1 -1
- package/storybook-static/assets/{Collapsible.stories-BgcRp8Rk.js → Collapsible.stories-CQ95s7Cs.js} +1 -1
- package/storybook-static/assets/{Combination-BT_gXe1L.js → Combination-CeVus13L.js} +1 -1
- package/storybook-static/assets/{Command.stories-Dp4CtSQR.js → Command.stories-DYflJh8u.js} +1 -1
- package/storybook-static/assets/{ContextMenu.stories-DnVnIi-T.js → ContextMenu.stories-CU7ehYrE.js} +1 -1
- package/storybook-static/assets/DataTable.Basic.stories-BQNWUKiw.js +6 -0
- package/storybook-static/assets/{DataTable.Filters.stories-CO0ipuGm.js → DataTable.Filters.stories-DPCoeYhK.js} +1 -1
- package/storybook-static/assets/{DataTable.Pagination.stories-DNwCw64e.js → DataTable.Pagination.stories-8UNqTNgw.js} +1 -1
- package/storybook-static/assets/{DataTable.SelectionAndActions.stories-DGgdEbsf.js → DataTable.SelectionAndActions.stories-CDEjgQ6T.js} +1 -1
- package/storybook-static/assets/DataTable.Sorting.stories-qG7-X_6r.js +6 -0
- package/storybook-static/assets/{Dialog.stories-DQkYN8ht.js → Dialog.stories-Bu6ZJXNH.js} +1 -1
- package/storybook-static/assets/{Dialog.stories-DXZINEgo.js → Dialog.stories-DobNZ0Hp.js} +1 -1
- package/storybook-static/assets/{Drawer.stories-DMH_vZgi.js → Drawer.stories-BN0idp4u.js} +1 -1
- package/storybook-static/assets/{DropdownMenu.stories-Dl8y-N7T.js → DropdownMenu.stories-sfsVDTvm.js} +1 -1
- package/storybook-static/assets/{Form.Basic.stories-CJugIYsx.js → Form.Basic.stories-dE4nbgpr.js} +1 -1
- package/storybook-static/assets/{Form.Complex.stories-BPogRp6F.js → Form.Complex.stories-BEZufnjb.js} +1 -1
- package/storybook-static/assets/{Form.Dynamic.stories-Boway5AK.js → Form.Dynamic.stories-cJTbd6cV.js} +1 -1
- package/storybook-static/assets/{Form.Simple.stories-_OXGXXpE.js → Form.Simple.stories-DOPzZKhh.js} +1 -1
- package/storybook-static/assets/{Form.stories-BoHyR8ho.js → Form.stories-27doU7JS.js} +1 -1
- package/storybook-static/assets/{FormBuilder-BGgeY8ik.js → FormBuilder-C0S7C69Q.js} +1 -1
- package/storybook-static/assets/{HoverCard.stories-1HM92M79.js → HoverCard.stories-0lted9Zx.js} +1 -1
- package/storybook-static/assets/{Input.stories-sQ4EUlWt.js → Input.stories-CwsIObFs.js} +1 -1
- package/storybook-static/assets/{InputOtp.stories-Cpk_EmLx.js → InputOtp.stories-DVc086h4.js} +1 -1
- package/storybook-static/assets/{Label.stories-MjABHKSw.js → Label.stories-bJa0rk1A.js} +1 -1
- package/storybook-static/assets/{Login.stories-BY4OYGk3.js → Login.stories-C6X6Kj5B.js} +1 -1
- package/storybook-static/assets/{Menubar.stories-B_60TWNE.js → Menubar.stories-CuediVp7.js} +1 -1
- package/storybook-static/assets/{NavigationMenu.stories-DyuaBvvq.js → NavigationMenu.stories-CKGZYhKk.js} +1 -1
- package/storybook-static/assets/{Page.stories-DQKMxrPZ.js → Page.stories-Cf76wtRx.js} +1 -1
- package/storybook-static/assets/{Pagination.stories-CBo7UrNd.js → Pagination.stories-D7IdL1_4.js} +1 -1
- package/storybook-static/assets/{Popover.stories-D98_JrxN.js → Popover.stories-1VP_zNY8.js} +1 -1
- package/storybook-static/assets/{Progress.stories-Dejt5v3z.js → Progress.stories-C35R5YvA.js} +1 -1
- package/storybook-static/assets/{RadioGroup.stories-Tz2LW6O6.js → RadioGroup.stories-CjuD3CwD.js} +1 -1
- package/storybook-static/assets/{Resizable.stories-DhP2GKN7.js → Resizable.stories-Cs8dvdc5.js} +1 -1
- package/storybook-static/assets/{ScrollArea.stories-CF7-8wbM.js → ScrollArea.stories-D6_z-5jm.js} +1 -1
- package/storybook-static/assets/{Section.stories-BpurjHIQ.js → Section.stories-Ce5qYITI.js} +1 -1
- package/storybook-static/assets/SectionBuilder-Df_lRZkj.js +1 -0
- package/storybook-static/assets/{Select.stories-DJrU-mi0.js → Select.stories-w_kbza5k.js} +1 -1
- package/storybook-static/assets/{Separator.stories-BYH_o8QM.js → Separator.stories-B5QnaJXb.js} +1 -1
- package/storybook-static/assets/{Sheet.stories-BNJ7BIb-.js → Sheet.stories-CORnEGvV.js} +1 -1
- package/storybook-static/assets/{Sidebar.stories-BbjcJuOg.js → Sidebar.stories-DVuWTi4j.js} +1 -1
- package/storybook-static/assets/{Slider.stories-CWOjKHKD.js → Slider.stories-YoS2vvT2.js} +1 -1
- package/storybook-static/assets/{Sonner.stories-CXSZs5yN.js → Sonner.stories-CXW5e_Qg.js} +1 -1
- package/storybook-static/assets/{Switch.stories-BUQjobWe.js → Switch.stories-zr6i-aNi.js} +1 -1
- package/storybook-static/assets/{Table.stories-DJcV7M9R.js → Table.stories-BuGU4MUM.js} +1 -1
- package/storybook-static/assets/{Tabs.stories-ByeVrP18.js → Tabs.stories-jxkJ-AUI.js} +1 -1
- package/storybook-static/assets/{Textarea.stories-CKsDPHYc.js → Textarea.stories-CHXVobz6.js} +1 -1
- package/storybook-static/assets/{Toggle.stories-DutEzZ8k.js → Toggle.stories-C4uB4Hkq.js} +1 -1
- package/storybook-static/assets/{ToggleGroup.stories-C9fzJTh-.js → ToggleGroup.stories-Cr229wf_.js} +1 -1
- package/storybook-static/assets/{Tooltip.stories-CngnJbP7.js → Tooltip.stories-DmMYGR3T.js} +1 -1
- package/storybook-static/assets/{accordion-bQe9Rep4.js → accordion-BCfsz_gl.js} +1 -1
- package/storybook-static/assets/{alert-dialog-CypF_yaW.js → alert-dialog-BYt6Z7Kt.js} +1 -1
- package/storybook-static/assets/{avatar-CukM9hXu.js → avatar-CRn1qQsC.js} +1 -1
- package/storybook-static/assets/{axe-W8QMjM0E.js → axe-JCJl60WC.js} +1 -1
- package/storybook-static/assets/{button-BTWmFXop.js → button-BObfgcV1.js} +1 -1
- package/storybook-static/assets/{chart-column-Bzh5arua.js → chart-column-CplFCmg8.js} +1 -1
- package/storybook-static/assets/{check-BgWXKGqi.js → check-DyecuwP4.js} +1 -1
- package/storybook-static/assets/{checkbox-QlugAqJY.js → checkbox-D5BmNJeL.js} +1 -1
- package/storybook-static/assets/{chevron-down-BqLjUn1_.js → chevron-down-Bp7zbUB0.js} +1 -1
- package/storybook-static/assets/{chevron-left-BR_0lKnE.js → chevron-left-D1L4J3UW.js} +1 -1
- package/storybook-static/assets/{chevron-right-DpCIoMaJ.js → chevron-right-oMYqDJ_f.js} +1 -1
- package/storybook-static/assets/{circle-DVJTkDI7.js → circle-CyarsADt.js} +1 -1
- package/storybook-static/assets/clean-slate-V4nUw2Bm.css +1 -0
- package/storybook-static/assets/{command-BERL33lL.js → command-DCnXmNmT.js} +1 -1
- package/storybook-static/assets/{createLucideIcon-1ZwIAs_l.js → createLucideIcon-CLBo0iA0.js} +1 -1
- package/storybook-static/assets/default-CuTBjDca.css +1 -0
- package/storybook-static/assets/{dialog-DM9YJ1JD.js → dialog-DL0QBIbC.js} +1 -1
- package/storybook-static/assets/{dropdown-menu-TfFll7G9.js → dropdown-menu-BwL9gQwG.js} +1 -1
- package/storybook-static/assets/{ellipsis-BSY8VuLI.js → ellipsis-DPg968Rc.js} +1 -1
- package/storybook-static/assets/{grip-vertical-Buja1rv9.js → grip-vertical-CM0GDwvq.js} +1 -1
- package/storybook-static/assets/{iframe-G-6sM9Mt.js → iframe-BWjPIle6.js} +4 -4
- package/storybook-static/assets/{index-DqWzLCH-.js → index-04C4iZwC.js} +1 -1
- package/storybook-static/assets/{index-B-fXBfyD.js → index-3zykFCgl.js} +1 -1
- package/storybook-static/assets/{index-CAwQR9Pv.js → index-7XoYQV2z.js} +1 -1
- package/storybook-static/assets/{index-DySHPxMy.js → index-A7UzX-Xw.js} +1 -1
- package/storybook-static/assets/index-BN5_W3Yi.js +1 -0
- package/storybook-static/assets/{index-1v1lhNFD.js → index-BcAKBHrX.js} +1 -1
- package/storybook-static/assets/{index-7yNAGow7.js → index-BfKpUbCE.js} +1 -1
- package/storybook-static/assets/index-C5eJ31Z3.js +1 -0
- package/storybook-static/assets/{index-CayhpKmv.js → index-C6O7WofA.js} +1 -1
- package/storybook-static/assets/{index-BDwnENHR.js → index-C9xvlw_B.js} +1 -1
- package/storybook-static/assets/{index-Bq6UNRVc.js → index-CKwUGXmt.js} +1 -1
- package/storybook-static/assets/{index-d_S6mtzU.js → index-Cce91yJQ.js} +1 -1
- package/storybook-static/assets/{index-CMmbDm5O.js → index-Cw7p-pms.js} +1 -1
- package/storybook-static/assets/{index-CLmN5G1a.js → index-DE2OlfDP.js} +1 -1
- package/storybook-static/assets/{index-ev1RjzGv.js → index-DMk2qc2_.js} +1 -1
- package/storybook-static/assets/index-DWC9SV-P.js +1 -0
- package/storybook-static/assets/{index-HghBIZeg.js → index-Dqw7miiX.js} +1 -1
- package/storybook-static/assets/{index-ClNNG_ys.js → index-Dr2xmx-F.js} +1 -1
- package/storybook-static/assets/{index-lH-AZpAn.js → index-DschQYGl.js} +1 -1
- package/storybook-static/assets/{index-SxI7_jxe.js → index-Dsg7S8zu.js} +1 -1
- package/storybook-static/assets/{index-DvM9azdj.js → index-Pk2lGsul.js} +1 -1
- package/storybook-static/assets/{index-DNAxNqEO.js → index-URSssr5a.js} +1 -1
- package/storybook-static/assets/{index-CZaD3imo.js → index-npvyVsxD.js} +1 -1
- package/storybook-static/assets/{index-CzJf-yyP.js → index-u70nzfOV.js} +1 -1
- package/storybook-static/assets/{label-C5vJTTwH.js → label-CwntpYJ0.js} +1 -1
- package/storybook-static/assets/{lodash-Q9aGJGMb.js → lodash-BkmSIg_J.js} +1 -1
- package/storybook-static/assets/minimal-modern-d2yFlFJM.css +1 -0
- package/storybook-static/assets/{popover-DW1K4QCO.js → popover-ClqrrvjL.js} +1 -1
- package/storybook-static/assets/{radio-group-iPL-8jvw.js → radio-group-CvN0LQZp.js} +1 -1
- package/storybook-static/assets/{react-18-CK1-M7n3.js → react-18-Bj31y5Nr.js} +1 -1
- package/storybook-static/assets/{react-icons.esm-n2MUhK0n.js → react-icons.esm-DNr9VcvP.js} +1 -1
- package/storybook-static/assets/{refresh-cw-FYEbhX1i.js → refresh-cw-OZakDsFY.js} +1 -1
- package/storybook-static/assets/{schemas-S_Tg7JYp.js → schemas-CaLvKjsI.js} +1 -1
- package/storybook-static/assets/{section-factories-CC6eFfbk.js → section-factories-DKfKL-5s.js} +1 -1
- package/storybook-static/assets/{select-DbLzULCJ.js → select-gtXRB92c.js} +1 -1
- package/storybook-static/assets/{separator-DoUX1TNx.js → separator-CxCWfpZX.js} +1 -1
- package/storybook-static/assets/{settings-2-CpOcGlDm.js → settings-2-DSSkfF6W.js} +1 -1
- package/storybook-static/assets/{sheet-n5VQ25jh.js → sheet-r0VNiBiN.js} +1 -1
- package/storybook-static/assets/{shopping-cart-9kOJ1UDd.js → shopping-cart-CJBClF2m.js} +1 -1
- package/storybook-static/assets/{sidebar-CvUiZOJe.js → sidebar-BsMnOE7Y.js} +1 -1
- package/storybook-static/assets/spotify-BuPUgQEa.css +1 -0
- package/storybook-static/assets/{toggle-B-YKWMF8.js → toggle-D08-8sQA.js} +1 -1
- package/storybook-static/assets/{tooltip-CNONbPiI.js → tooltip-CZ1UAE_e.js} +1 -1
- package/storybook-static/assets/{trash-2-Bt5LMclM.js → trash-2-D55eseMQ.js} +1 -1
- package/storybook-static/assets/{x-DG9mLFAg.js → x-n8sFtlI2.js} +1 -1
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.d.ts +63 -0
- package/storybook-static/index.d.ts.map +1 -1
- package/storybook-static/kit/builder/form/components/{FormActions.d.ts → FormBuilderActions.d.ts} +3 -3
- package/storybook-static/kit/builder/form/components/FormBuilderActions.d.ts.map +1 -0
- package/{dist/kit/builder/form/components/FormField.d.ts → storybook-static/kit/builder/form/components/FormBuilderField.d.ts} +4 -4
- package/storybook-static/kit/builder/form/components/FormBuilderField.d.ts.map +1 -0
- package/storybook-static/kit/builder/form/components/index.d.ts +2 -3
- package/storybook-static/kit/builder/form/components/index.d.ts.map +1 -1
- package/storybook-static/kit/builder/section/SectionBuilder.d.ts.map +1 -1
- package/storybook-static/project.json +1 -1
- package/vite.config.ts +76 -52
- package/dist/kit/builder/form/components/FormActions.d.ts.map +0 -1
- package/dist/kit/builder/form/components/FormField.d.ts.map +0 -1
- package/dist/kit/builder/form/components/FormSection.d.ts +0 -15
- package/dist/kit/builder/form/components/FormSection.d.ts.map +0 -1
- package/src/kit/builder/form/components/FormSection.tsx +0 -88
- package/storybook-static/assets/AdminLayout.Collapsible.stories-CsU3DwTo.js +0 -4
- package/storybook-static/assets/AdminLayout.CustomSidebarTitleAndIcon.stories-BqP6UVc7.js +0 -4
- package/storybook-static/assets/DataTable.Basic.stories-DBF5VYq9.js +0 -6
- package/storybook-static/assets/DataTable.Sorting.stories-CWpqloAB.js +0 -6
- package/storybook-static/assets/SectionBuilder-Bav4WrnT.js +0 -1
- package/storybook-static/assets/clean-slate-BR-XvZPt.css +0 -1
- package/storybook-static/assets/default-M24vcGB8.css +0 -1
- package/storybook-static/assets/index-DhoByIgc.js +0 -1
- package/storybook-static/assets/index-I343IfOC.js +0 -1
- package/storybook-static/assets/index-_crRFOM5.js +0 -1
- package/storybook-static/assets/minimal-modern-BmvR5wyr.css +0 -1
- package/storybook-static/assets/spotify-DpbeJq1r.css +0 -1
- package/storybook-static/kit/builder/form/components/FormActions.d.ts.map +0 -1
- package/storybook-static/kit/builder/form/components/FormField.d.ts.map +0 -1
- package/storybook-static/kit/builder/form/components/FormSection.d.ts +0 -15
- package/storybook-static/kit/builder/form/components/FormSection.d.ts.map +0 -1
- /package/src/{index.css → kit/themes/base.css} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n}from"./iframe-
|
|
1
|
+
import{r as n}from"./iframe-BWjPIle6.js";import{r as f}from"./index-C5eJ31Z3.js";import{b as c}from"./index-BcAKBHrX.js";import{j as u}from"./jsx-runtime-D_zvdyIk.js";var l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],E=l.reduce((t,r)=>{const o=c(`Primitive.${r}`),i=n.forwardRef((s,e)=>{const{asChild:a,...m}=s,p=a?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(p,{...m,ref:e})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{});function w(t,r){t&&f.flushSync(()=>t.dispatchEvent(r))}export{E as P,w as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o}from"./iframe-
|
|
1
|
+
import{r as o}from"./iframe-BWjPIle6.js";import{c as I}from"./index-DW48STyt.js";import{c as O}from"./index-Pk2lGsul.js";import{u as S}from"./index-7XoYQV2z.js";import{u as D}from"./index-DWC9SV-P.js";import{u as M}from"./index-BcAKBHrX.js";import{P as v}from"./index-04C4iZwC.js";import{P as L}from"./index-CKwUGXmt.js";import{u as k}from"./index-BN5_W3Yi.js";import{j as c}from"./jsx-runtime-D_zvdyIk.js";var f="Collapsible",[F,X]=O(f),[B,g]=F(f),T=o.forwardRef((e,r)=>{const{__scopeCollapsible:s,open:a,defaultOpen:t,disabled:l,onOpenChange:i,...m}=e,[d,p]=S({prop:a,defaultProp:t??!1,onChange:i,caller:f});return c.jsx(B,{scope:s,disabled:l,contentId:k(),open:d,onOpenToggle:o.useCallback(()=>p(C=>!C),[p]),children:c.jsx(v.div,{"data-state":R(d),"data-disabled":l?"":void 0,...m,ref:r})})});T.displayName=f;var j="CollapsibleTrigger",w=o.forwardRef((e,r)=>{const{__scopeCollapsible:s,...a}=e,t=g(j,s);return c.jsx(v.button,{type:"button","aria-controls":t.contentId,"aria-expanded":t.open||!1,"data-state":R(t.open),"data-disabled":t.disabled?"":void 0,disabled:t.disabled,...a,ref:r,onClick:I(e.onClick,t.onOpenToggle)})});w.displayName=j;var x="CollapsibleContent",A=o.forwardRef((e,r)=>{const{forceMount:s,...a}=e,t=g(x,e.__scopeCollapsible);return c.jsx(L,{present:s||t.open,children:({present:l})=>c.jsx(G,{...a,ref:r,present:l})})});A.displayName=x;var G=o.forwardRef((e,r)=>{const{__scopeCollapsible:s,present:a,children:t,...l}=e,i=g(x,s),[m,d]=o.useState(a),p=o.useRef(null),C=M(r,p),h=o.useRef(0),P=h.current,y=o.useRef(0),N=y.current,b=i.open||m,E=o.useRef(b),u=o.useRef(void 0);return o.useEffect(()=>{const n=requestAnimationFrame(()=>E.current=!1);return()=>cancelAnimationFrame(n)},[]),D(()=>{const n=p.current;if(n){u.current=u.current||{transitionDuration:n.style.transitionDuration,animationName:n.style.animationName},n.style.transitionDuration="0s",n.style.animationName="none";const _=n.getBoundingClientRect();h.current=_.height,y.current=_.width,E.current||(n.style.transitionDuration=u.current.transitionDuration,n.style.animationName=u.current.animationName),d(a)}},[i.open,a]),c.jsx(v.div,{"data-state":R(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!b,...l,ref:C,style:{"--radix-collapsible-content-height":P?`${P}px`:void 0,"--radix-collapsible-content-width":N?`${N}px`:void 0,...e.style},children:b&&t})});function R(e){return e?"open":"closed"}var Y=T,Z=w,ee=A;export{ee as C,Y as R,Z as T,w as a,A as b,X as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,b as v}from"./iframe-
|
|
1
|
+
import{r as s,b as v}from"./iframe-BWjPIle6.js";import{u as E}from"./index-DWC9SV-P.js";var b=v[" useInsertionEffect ".trim().toString()]||E;function C({prop:t,defaultProp:u,onChange:o=()=>{},caller:i}){const[l,e,n]=w({defaultProp:u,onChange:o}),r=t!==void 0,d=r?t:l;{const c=s.useRef(t!==void 0);s.useEffect(()=>{const f=c.current;f!==r&&console.warn(`${i} is changing from ${f?"controlled":"uncontrolled"} to ${r?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=r},[r,i])}const m=s.useCallback(c=>{var f;if(r){const a=R(c)?c(t):c;a!==t&&((f=n.current)==null||f.call(n,a))}else e(c)},[r,t,e,n]);return[d,m]}function w({defaultProp:t,onChange:u}){const[o,i]=s.useState(t),l=s.useRef(o),e=s.useRef(u);return b(()=>{e.current=u},[u]),s.useEffect(()=>{var n;l.current!==o&&((n=e.current)==null||n.call(e,o),l.current=o)},[o,l]),[o,i,e]}function R(t){return typeof t=="function"}export{C as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as a}from"./iframe-G-6sM9Mt.js";import{R as Ut}from"./index-_crRFOM5.js";function Xt(r){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",o.appendChild(e),e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r))}const Wt=r=>{switch(r){case"success":return Gt;case"info":return Jt;case"warning":return Qt;case"error":return Zt;default:return null}},Kt=Array(12).fill(0),qt=({visible:r,className:o})=>a.createElement("div",{className:["sonner-loading-wrapper",o].filter(Boolean).join(" "),"data-visible":r},a.createElement("div",{className:"sonner-spinner"},Kt.map((e,s)=>a.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),Gt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},a.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Qt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},a.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Jt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},a.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Zt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},a.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),te=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ee=()=>{const[r,o]=a.useState(document.hidden);return a.useEffect(()=>{const e=()=>{o(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),r};let xt=1;class ae{constructor(){this.subscribe=o=>(this.subscribers.push(o),()=>{const e=this.subscribers.indexOf(o);this.subscribers.splice(e,1)}),this.publish=o=>{this.subscribers.forEach(e=>e(o))},this.addToast=o=>{this.publish(o),this.toasts=[...this.toasts,o]},this.create=o=>{var e;const{message:s,...C}=o,u=typeof(o==null?void 0:o.id)=="number"||((e=o.id)==null?void 0:e.length)>0?o.id:xt++,g=this.toasts.find(b=>b.id===u),_=o.dismissible===void 0?!0:o.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),g?this.toasts=this.toasts.map(b=>b.id===u?(this.publish({...b,...o,id:u,title:s}),{...b,...o,id:u,dismissible:_,title:s}):b):this.addToast({title:s,...C,dismissible:_,id:u}),u},this.dismiss=o=>(o?(this.dismissedToasts.add(o),requestAnimationFrame(()=>this.subscribers.forEach(e=>e({id:o,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(s=>s({id:e.id,dismiss:!0}))}),o),this.message=(o,e)=>this.create({...e,message:o}),this.error=(o,e)=>this.create({...e,message:o,type:"error"}),this.success=(o,e)=>this.create({...e,type:"success",message:o}),this.info=(o,e)=>this.create({...e,type:"info",message:o}),this.warning=(o,e)=>this.create({...e,type:"warning",message:o}),this.loading=(o,e)=>this.create({...e,type:"loading",message:o}),this.promise=(o,e)=>{if(!e)return;let s;e.loading!==void 0&&(s=this.create({...e,promise:o,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));const C=Promise.resolve(o instanceof Function?o():o);let u=s!==void 0,g;const _=C.then(async i=>{if(g=["resolve",i],a.isValidElement(i))u=!1,this.create({id:s,type:"default",message:i});else if(se(i)&&!i.ok){u=!1;const t=typeof e.error=="function"?await e.error(`HTTP error! status: ${i.status}`):e.error,x=typeof e.description=="function"?await e.description(`HTTP error! status: ${i.status}`):e.description,E=typeof t=="object"&&!a.isValidElement(t)?t:{message:t};this.create({id:s,type:"error",description:x,...E})}else if(i instanceof Error){u=!1;const t=typeof e.error=="function"?await e.error(i):e.error,x=typeof e.description=="function"?await e.description(i):e.description,E=typeof t=="object"&&!a.isValidElement(t)?t:{message:t};this.create({id:s,type:"error",description:x,...E})}else if(e.success!==void 0){u=!1;const t=typeof e.success=="function"?await e.success(i):e.success,x=typeof e.description=="function"?await e.description(i):e.description,E=typeof t=="object"&&!a.isValidElement(t)?t:{message:t};this.create({id:s,type:"success",description:x,...E})}}).catch(async i=>{if(g=["reject",i],e.error!==void 0){u=!1;const T=typeof e.error=="function"?await e.error(i):e.error,t=typeof e.description=="function"?await e.description(i):e.description,O=typeof T=="object"&&!a.isValidElement(T)?T:{message:T};this.create({id:s,type:"error",description:t,...O})}}).finally(()=>{u&&(this.dismiss(s),s=void 0),e.finally==null||e.finally.call(e)}),b=()=>new Promise((i,T)=>_.then(()=>g[0]==="reject"?T(g[1]):i(g[1])).catch(T));return typeof s!="string"&&typeof s!="number"?{unwrap:b}:Object.assign(s,{unwrap:b})},this.custom=(o,e)=>{const s=(e==null?void 0:e.id)||xt++;return this.create({jsx:o(s),id:s,...e}),s},this.getActiveToasts=()=>this.toasts.filter(o=>!this.dismissedToasts.has(o.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const S=new ae,oe=(r,o)=>{const e=(o==null?void 0:o.id)||xt++;return S.addToast({title:r,...o,id:e}),e},se=r=>r&&typeof r=="object"&&"ok"in r&&typeof r.ok=="boolean"&&"status"in r&&typeof r.status=="number",ne=oe,re=()=>S.toasts,ie=()=>S.getActiveToasts(),xe=Object.assign(ne,{success:S.success,info:S.info,warning:S.warning,error:S.error,custom:S.custom,message:S.message,promise:S.promise,dismiss:S.dismiss,loading:S.loading},{getHistory:re,getToasts:ie});Xt("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function mt(r){return r.label!==void 0}const le=3,de="24px",ce="16px",Mt=4e3,ue=356,fe=14,me=45,pe=200;function H(...r){return r.filter(Boolean).join(" ")}function ge(r){const[o,e]=r.split("-"),s=[];return o&&s.push(o),e&&s.push(e),s}const he=r=>{var o,e,s,C,u,g,_,b,i;const{invert:T,toast:t,unstyled:x,interacting:O,setHeights:E,visibleToasts:pt,heights:U,index:d,toasts:ot,expanded:X,removeToast:st,defaultRichColors:gt,closeButton:z,style:Z,cancelButtonStyle:Y,actionButtonStyle:ht,className:nt="",descriptionClassName:bt="",duration:tt,position:A,gap:rt,expandByDefault:et,classNames:c,icons:v,closeButtonAriaLabel:j="Close toast"}=r,[$,B]=a.useState(null),[F,it]=a.useState(null),[l,p]=a.useState(!1),[m,R]=a.useState(!1),[W,f]=a.useState(!1),[K,lt]=a.useState(!1),[dt,q]=a.useState(!1),[Ct,vt]=a.useState(0),[At,Et]=a.useState(0),at=a.useRef(t.duration||tt||Mt),Tt=a.useRef(null),P=a.useRef(null),Ht=d===0,Ot=d+1<=pt,N=t.type,G=t.dismissible!==!1,zt=t.className||"",Pt=t.descriptionClassName||"",ct=a.useMemo(()=>U.findIndex(n=>n.toastId===t.id)||0,[U,t.id]),jt=a.useMemo(()=>{var n;return(n=t.closeButton)!=null?n:z},[t.closeButton,z]),St=a.useMemo(()=>t.duration||tt||Mt,[t.duration,tt]),yt=a.useRef(0),Q=a.useRef(0),Nt=a.useRef(0),J=a.useRef(null),[Lt,Yt]=A.split("-"),kt=a.useMemo(()=>U.reduce((n,h,w)=>w>=ct?n:n+h.height,0),[U,ct]),_t=ee(),$t=t.invert||T,wt=N==="loading";Q.current=a.useMemo(()=>ct*rt+kt,[ct,kt]),a.useEffect(()=>{at.current=St},[St]),a.useEffect(()=>{p(!0)},[]),a.useEffect(()=>{const n=P.current;if(n){const h=n.getBoundingClientRect().height;return Et(h),E(w=>[{toastId:t.id,height:h,position:t.position},...w]),()=>E(w=>w.filter(k=>k.toastId!==t.id))}},[E,t.id]),a.useLayoutEffect(()=>{if(!l)return;const n=P.current,h=n.style.height;n.style.height="auto";const w=n.getBoundingClientRect().height;n.style.height=h,Et(w),E(k=>k.find(y=>y.toastId===t.id)?k.map(y=>y.toastId===t.id?{...y,height:w}:y):[{toastId:t.id,height:w,position:t.position},...k])},[l,t.title,t.description,E,t.id,t.jsx,t.action,t.cancel]);const L=a.useCallback(()=>{R(!0),vt(Q.current),E(n=>n.filter(h=>h.toastId!==t.id)),setTimeout(()=>{st(t)},pe)},[t,st,E,Q]);a.useEffect(()=>{if(t.promise&&N==="loading"||t.duration===1/0||t.type==="loading")return;let n;return X||O||_t?(()=>{if(Nt.current<yt.current){const k=new Date().getTime()-yt.current;at.current=at.current-k}Nt.current=new Date().getTime()})():(()=>{at.current!==1/0&&(yt.current=new Date().getTime(),n=setTimeout(()=>{t.onAutoClose==null||t.onAutoClose.call(t,t),L()},at.current))})(),()=>clearTimeout(n)},[X,O,t,N,_t,L]),a.useEffect(()=>{t.delete&&(L(),t.onDismiss==null||t.onDismiss.call(t,t))},[L,t.delete]);function Ft(){var n;if(v!=null&&v.loading){var h;return a.createElement("div",{className:H(c==null?void 0:c.loader,t==null||(h=t.classNames)==null?void 0:h.loader,"sonner-loader"),"data-visible":N==="loading"},v.loading)}return a.createElement(qt,{className:H(c==null?void 0:c.loader,t==null||(n=t.classNames)==null?void 0:n.loader),visible:N==="loading"})}const Vt=t.icon||(v==null?void 0:v[N])||Wt(N);var Rt,Dt;return a.createElement("li",{tabIndex:0,ref:P,className:H(nt,zt,c==null?void 0:c.toast,t==null||(o=t.classNames)==null?void 0:o.toast,c==null?void 0:c.default,c==null?void 0:c[N],t==null||(e=t.classNames)==null?void 0:e[N]),"data-sonner-toast":"","data-rich-colors":(Rt=t.richColors)!=null?Rt:gt,"data-styled":!(t.jsx||t.unstyled||x),"data-mounted":l,"data-promise":!!t.promise,"data-swiped":dt,"data-removed":m,"data-visible":Ot,"data-y-position":Lt,"data-x-position":Yt,"data-index":d,"data-front":Ht,"data-swiping":W,"data-dismissible":G,"data-type":N,"data-invert":$t,"data-swipe-out":K,"data-swipe-direction":F,"data-expanded":!!(X||et&&l),"data-testid":t.testId,style:{"--index":d,"--toasts-before":d,"--z-index":ot.length-d,"--offset":`${m?Ct:Q.current}px`,"--initial-height":et?"auto":`${At}px`,...Z,...t.style},onDragEnd:()=>{f(!1),B(null),J.current=null},onPointerDown:n=>{n.button!==2&&(wt||!G||(Tt.current=new Date,vt(Q.current),n.target.setPointerCapture(n.pointerId),n.target.tagName!=="BUTTON"&&(f(!0),J.current={x:n.clientX,y:n.clientY})))},onPointerUp:()=>{var n,h,w;if(K||!G)return;J.current=null;const k=Number(((n=P.current)==null?void 0:n.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ut=Number(((h=P.current)==null?void 0:h.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),y=new Date().getTime()-((w=Tt.current)==null?void 0:w.getTime()),D=$==="x"?k:ut,ft=Math.abs(D)/y;if(Math.abs(D)>=me||ft>.11){vt(Q.current),t.onDismiss==null||t.onDismiss.call(t,t),it($==="x"?k>0?"right":"left":ut>0?"down":"up"),L(),lt(!0);return}else{var M,I;(M=P.current)==null||M.style.setProperty("--swipe-amount-x","0px"),(I=P.current)==null||I.style.setProperty("--swipe-amount-y","0px")}q(!1),f(!1),B(null)},onPointerMove:n=>{var h,w,k;if(!J.current||!G||((h=window.getSelection())==null?void 0:h.toString().length)>0)return;const y=n.clientY-J.current.y,D=n.clientX-J.current.x;var ft;const M=(ft=r.swipeDirections)!=null?ft:ge(A);!$&&(Math.abs(D)>1||Math.abs(y)>1)&&B(Math.abs(D)>Math.abs(y)?"x":"y");let I={x:0,y:0};const Bt=V=>1/(1.5+Math.abs(V)/20);if($==="y"){if(M.includes("top")||M.includes("bottom"))if(M.includes("top")&&y<0||M.includes("bottom")&&y>0)I.y=y;else{const V=y*Bt(y);I.y=Math.abs(V)<Math.abs(y)?V:y}}else if($==="x"&&(M.includes("left")||M.includes("right")))if(M.includes("left")&&D<0||M.includes("right")&&D>0)I.x=D;else{const V=D*Bt(D);I.x=Math.abs(V)<Math.abs(D)?V:D}(Math.abs(I.x)>0||Math.abs(I.y)>0)&&q(!0),(w=P.current)==null||w.style.setProperty("--swipe-amount-x",`${I.x}px`),(k=P.current)==null||k.style.setProperty("--swipe-amount-y",`${I.y}px`)}},jt&&!t.jsx&&N!=="loading"?a.createElement("button",{"aria-label":j,"data-disabled":wt,"data-close-button":!0,onClick:wt||!G?()=>{}:()=>{L(),t.onDismiss==null||t.onDismiss.call(t,t)},className:H(c==null?void 0:c.closeButton,t==null||(s=t.classNames)==null?void 0:s.closeButton)},(Dt=v==null?void 0:v.close)!=null?Dt:te):null,(N||t.icon||t.promise)&&t.icon!==null&&((v==null?void 0:v[N])!==null||t.icon)?a.createElement("div",{"data-icon":"",className:H(c==null?void 0:c.icon,t==null||(C=t.classNames)==null?void 0:C.icon)},t.promise||t.type==="loading"&&!t.icon?t.icon||Ft():null,t.type!=="loading"?Vt:null):null,a.createElement("div",{"data-content":"",className:H(c==null?void 0:c.content,t==null||(u=t.classNames)==null?void 0:u.content)},a.createElement("div",{"data-title":"",className:H(c==null?void 0:c.title,t==null||(g=t.classNames)==null?void 0:g.title)},t.jsx?t.jsx:typeof t.title=="function"?t.title():t.title),t.description?a.createElement("div",{"data-description":"",className:H(bt,Pt,c==null?void 0:c.description,t==null||(_=t.classNames)==null?void 0:_.description)},typeof t.description=="function"?t.description():t.description):null),a.isValidElement(t.cancel)?t.cancel:t.cancel&&mt(t.cancel)?a.createElement("button",{"data-button":!0,"data-cancel":!0,style:t.cancelButtonStyle||Y,onClick:n=>{mt(t.cancel)&&G&&(t.cancel.onClick==null||t.cancel.onClick.call(t.cancel,n),L())},className:H(c==null?void 0:c.cancelButton,t==null||(b=t.classNames)==null?void 0:b.cancelButton)},t.cancel.label):null,a.isValidElement(t.action)?t.action:t.action&&mt(t.action)?a.createElement("button",{"data-button":!0,"data-action":!0,style:t.actionButtonStyle||ht,onClick:n=>{mt(t.action)&&(t.action.onClick==null||t.action.onClick.call(t.action,n),!n.defaultPrevented&&L())},className:H(c==null?void 0:c.actionButton,t==null||(i=t.classNames)==null?void 0:i.actionButton)},t.action.label):null)};function It(){if(typeof window>"u"||typeof document>"u")return"ltr";const r=document.documentElement.getAttribute("dir");return r==="auto"||!r?window.getComputedStyle(document.documentElement).direction:r}function be(r,o){const e={};return[r,o].forEach((s,C)=>{const u=C===1,g=u?"--mobile-offset":"--offset",_=u?ce:de;function b(i){["top","right","bottom","left"].forEach(T=>{e[`${g}-${T}`]=typeof i=="number"?`${i}px`:i})}typeof s=="number"||typeof s=="string"?b(s):typeof s=="object"?["top","right","bottom","left"].forEach(i=>{s[i]===void 0?e[`${g}-${i}`]=_:e[`${g}-${i}`]=typeof s[i]=="number"?`${s[i]}px`:s[i]}):b(_)}),e}const Ee=a.forwardRef(function(o,e){const{id:s,invert:C,position:u="bottom-right",hotkey:g=["altKey","KeyT"],expand:_,closeButton:b,className:i,offset:T,mobileOffset:t,theme:x="light",richColors:O,duration:E,style:pt,visibleToasts:U=le,toastOptions:d,dir:ot=It(),gap:X=fe,icons:st,containerAriaLabel:gt="Notifications"}=o,[z,Z]=a.useState([]),Y=a.useMemo(()=>s?z.filter(l=>l.toasterId===s):z.filter(l=>!l.toasterId),[z,s]),ht=a.useMemo(()=>Array.from(new Set([u].concat(Y.filter(l=>l.position).map(l=>l.position)))),[Y,u]),[nt,bt]=a.useState([]),[tt,A]=a.useState(!1),[rt,et]=a.useState(!1),[c,v]=a.useState(x!=="system"?x:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=a.useRef(null),$=g.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=a.useRef(null),F=a.useRef(!1),it=a.useCallback(l=>{Z(p=>{var m;return(m=p.find(R=>R.id===l.id))!=null&&m.delete||S.dismiss(l.id),p.filter(({id:R})=>R!==l.id)})},[]);return a.useEffect(()=>S.subscribe(l=>{if(l.dismiss){requestAnimationFrame(()=>{Z(p=>p.map(m=>m.id===l.id?{...m,delete:!0}:m))});return}setTimeout(()=>{Ut.flushSync(()=>{Z(p=>{const m=p.findIndex(R=>R.id===l.id);return m!==-1?[...p.slice(0,m),{...p[m],...l},...p.slice(m+1)]:[l,...p]})})})}),[z]),a.useEffect(()=>{if(x!=="system"){v(x);return}if(x==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?v("dark"):v("light")),typeof window>"u")return;const l=window.matchMedia("(prefers-color-scheme: dark)");try{l.addEventListener("change",({matches:p})=>{v(p?"dark":"light")})}catch{l.addListener(({matches:m})=>{try{v(m?"dark":"light")}catch(R){console.error(R)}})}},[x]),a.useEffect(()=>{z.length<=1&&A(!1)},[z]),a.useEffect(()=>{const l=p=>{var m;if(g.every(f=>p[f]||p.code===f)){var W;A(!0),(W=j.current)==null||W.focus()}p.code==="Escape"&&(document.activeElement===j.current||(m=j.current)!=null&&m.contains(document.activeElement))&&A(!1)};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[g]),a.useEffect(()=>{if(j.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,F.current=!1)}},[j.current]),a.createElement("section",{ref:e,"aria-label":`${gt} ${$}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ht.map((l,p)=>{var m;const[R,W]=l.split("-");return Y.length?a.createElement("ol",{key:l,dir:ot==="auto"?It():ot,tabIndex:-1,ref:j,className:i,"data-sonner-toaster":!0,"data-sonner-theme":c,"data-y-position":R,"data-x-position":W,style:{"--front-toast-height":`${((m=nt[0])==null?void 0:m.height)||0}px`,"--width":`${ue}px`,"--gap":`${X}px`,...pt,...be(T,t)},onBlur:f=>{F.current&&!f.currentTarget.contains(f.relatedTarget)&&(F.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:f=>{f.target instanceof HTMLElement&&f.target.dataset.dismissible==="false"||F.current||(F.current=!0,B.current=f.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{rt||A(!1)},onDragEnd:()=>A(!1),onPointerDown:f=>{f.target instanceof HTMLElement&&f.target.dataset.dismissible==="false"||et(!0)},onPointerUp:()=>et(!1)},Y.filter(f=>!f.position&&p===0||f.position===l).map((f,K)=>{var lt,dt;return a.createElement(he,{key:f.id,icons:st,index:K,toast:f,defaultRichColors:O,duration:(lt=d==null?void 0:d.duration)!=null?lt:E,className:d==null?void 0:d.className,descriptionClassName:d==null?void 0:d.descriptionClassName,invert:C,visibleToasts:U,closeButton:(dt=d==null?void 0:d.closeButton)!=null?dt:b,interacting:rt,position:l,style:d==null?void 0:d.style,unstyled:d==null?void 0:d.unstyled,classNames:d==null?void 0:d.classNames,cancelButtonStyle:d==null?void 0:d.cancelButtonStyle,actionButtonStyle:d==null?void 0:d.actionButtonStyle,closeButtonAriaLabel:d==null?void 0:d.closeButtonAriaLabel,removeToast:it,toasts:Y.filter(q=>q.position==f.position),heights:nt.filter(q=>q.position==f.position),setHeights:bt,expandByDefault:_,gap:X,expanded:tt,swipeDirections:o.swipeDirections})})):null}))});export{Ee as T,xe as t};
|
|
1
|
+
import{R as a}from"./iframe-BWjPIle6.js";import{R as Ut}from"./index-C5eJ31Z3.js";function Xt(r){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",o.appendChild(e),e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r))}const Wt=r=>{switch(r){case"success":return Gt;case"info":return Jt;case"warning":return Qt;case"error":return Zt;default:return null}},Kt=Array(12).fill(0),qt=({visible:r,className:o})=>a.createElement("div",{className:["sonner-loading-wrapper",o].filter(Boolean).join(" "),"data-visible":r},a.createElement("div",{className:"sonner-spinner"},Kt.map((e,s)=>a.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),Gt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},a.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Qt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},a.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Jt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},a.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Zt=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},a.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),te=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ee=()=>{const[r,o]=a.useState(document.hidden);return a.useEffect(()=>{const e=()=>{o(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),r};let xt=1;class ae{constructor(){this.subscribe=o=>(this.subscribers.push(o),()=>{const e=this.subscribers.indexOf(o);this.subscribers.splice(e,1)}),this.publish=o=>{this.subscribers.forEach(e=>e(o))},this.addToast=o=>{this.publish(o),this.toasts=[...this.toasts,o]},this.create=o=>{var e;const{message:s,...C}=o,u=typeof(o==null?void 0:o.id)=="number"||((e=o.id)==null?void 0:e.length)>0?o.id:xt++,g=this.toasts.find(b=>b.id===u),_=o.dismissible===void 0?!0:o.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),g?this.toasts=this.toasts.map(b=>b.id===u?(this.publish({...b,...o,id:u,title:s}),{...b,...o,id:u,dismissible:_,title:s}):b):this.addToast({title:s,...C,dismissible:_,id:u}),u},this.dismiss=o=>(o?(this.dismissedToasts.add(o),requestAnimationFrame(()=>this.subscribers.forEach(e=>e({id:o,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(s=>s({id:e.id,dismiss:!0}))}),o),this.message=(o,e)=>this.create({...e,message:o}),this.error=(o,e)=>this.create({...e,message:o,type:"error"}),this.success=(o,e)=>this.create({...e,type:"success",message:o}),this.info=(o,e)=>this.create({...e,type:"info",message:o}),this.warning=(o,e)=>this.create({...e,type:"warning",message:o}),this.loading=(o,e)=>this.create({...e,type:"loading",message:o}),this.promise=(o,e)=>{if(!e)return;let s;e.loading!==void 0&&(s=this.create({...e,promise:o,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));const C=Promise.resolve(o instanceof Function?o():o);let u=s!==void 0,g;const _=C.then(async i=>{if(g=["resolve",i],a.isValidElement(i))u=!1,this.create({id:s,type:"default",message:i});else if(se(i)&&!i.ok){u=!1;const t=typeof e.error=="function"?await e.error(`HTTP error! status: ${i.status}`):e.error,x=typeof e.description=="function"?await e.description(`HTTP error! status: ${i.status}`):e.description,E=typeof t=="object"&&!a.isValidElement(t)?t:{message:t};this.create({id:s,type:"error",description:x,...E})}else if(i instanceof Error){u=!1;const t=typeof e.error=="function"?await e.error(i):e.error,x=typeof e.description=="function"?await e.description(i):e.description,E=typeof t=="object"&&!a.isValidElement(t)?t:{message:t};this.create({id:s,type:"error",description:x,...E})}else if(e.success!==void 0){u=!1;const t=typeof e.success=="function"?await e.success(i):e.success,x=typeof e.description=="function"?await e.description(i):e.description,E=typeof t=="object"&&!a.isValidElement(t)?t:{message:t};this.create({id:s,type:"success",description:x,...E})}}).catch(async i=>{if(g=["reject",i],e.error!==void 0){u=!1;const T=typeof e.error=="function"?await e.error(i):e.error,t=typeof e.description=="function"?await e.description(i):e.description,O=typeof T=="object"&&!a.isValidElement(T)?T:{message:T};this.create({id:s,type:"error",description:t,...O})}}).finally(()=>{u&&(this.dismiss(s),s=void 0),e.finally==null||e.finally.call(e)}),b=()=>new Promise((i,T)=>_.then(()=>g[0]==="reject"?T(g[1]):i(g[1])).catch(T));return typeof s!="string"&&typeof s!="number"?{unwrap:b}:Object.assign(s,{unwrap:b})},this.custom=(o,e)=>{const s=(e==null?void 0:e.id)||xt++;return this.create({jsx:o(s),id:s,...e}),s},this.getActiveToasts=()=>this.toasts.filter(o=>!this.dismissedToasts.has(o.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const S=new ae,oe=(r,o)=>{const e=(o==null?void 0:o.id)||xt++;return S.addToast({title:r,...o,id:e}),e},se=r=>r&&typeof r=="object"&&"ok"in r&&typeof r.ok=="boolean"&&"status"in r&&typeof r.status=="number",ne=oe,re=()=>S.toasts,ie=()=>S.getActiveToasts(),xe=Object.assign(ne,{success:S.success,info:S.info,warning:S.warning,error:S.error,custom:S.custom,message:S.message,promise:S.promise,dismiss:S.dismiss,loading:S.loading},{getHistory:re,getToasts:ie});Xt("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function mt(r){return r.label!==void 0}const le=3,de="24px",ce="16px",Mt=4e3,ue=356,fe=14,me=45,pe=200;function H(...r){return r.filter(Boolean).join(" ")}function ge(r){const[o,e]=r.split("-"),s=[];return o&&s.push(o),e&&s.push(e),s}const he=r=>{var o,e,s,C,u,g,_,b,i;const{invert:T,toast:t,unstyled:x,interacting:O,setHeights:E,visibleToasts:pt,heights:U,index:d,toasts:ot,expanded:X,removeToast:st,defaultRichColors:gt,closeButton:z,style:Z,cancelButtonStyle:Y,actionButtonStyle:ht,className:nt="",descriptionClassName:bt="",duration:tt,position:A,gap:rt,expandByDefault:et,classNames:c,icons:v,closeButtonAriaLabel:j="Close toast"}=r,[$,B]=a.useState(null),[F,it]=a.useState(null),[l,p]=a.useState(!1),[m,R]=a.useState(!1),[W,f]=a.useState(!1),[K,lt]=a.useState(!1),[dt,q]=a.useState(!1),[Ct,vt]=a.useState(0),[At,Et]=a.useState(0),at=a.useRef(t.duration||tt||Mt),Tt=a.useRef(null),P=a.useRef(null),Ht=d===0,Ot=d+1<=pt,N=t.type,G=t.dismissible!==!1,zt=t.className||"",Pt=t.descriptionClassName||"",ct=a.useMemo(()=>U.findIndex(n=>n.toastId===t.id)||0,[U,t.id]),jt=a.useMemo(()=>{var n;return(n=t.closeButton)!=null?n:z},[t.closeButton,z]),St=a.useMemo(()=>t.duration||tt||Mt,[t.duration,tt]),yt=a.useRef(0),Q=a.useRef(0),Nt=a.useRef(0),J=a.useRef(null),[Lt,Yt]=A.split("-"),kt=a.useMemo(()=>U.reduce((n,h,w)=>w>=ct?n:n+h.height,0),[U,ct]),_t=ee(),$t=t.invert||T,wt=N==="loading";Q.current=a.useMemo(()=>ct*rt+kt,[ct,kt]),a.useEffect(()=>{at.current=St},[St]),a.useEffect(()=>{p(!0)},[]),a.useEffect(()=>{const n=P.current;if(n){const h=n.getBoundingClientRect().height;return Et(h),E(w=>[{toastId:t.id,height:h,position:t.position},...w]),()=>E(w=>w.filter(k=>k.toastId!==t.id))}},[E,t.id]),a.useLayoutEffect(()=>{if(!l)return;const n=P.current,h=n.style.height;n.style.height="auto";const w=n.getBoundingClientRect().height;n.style.height=h,Et(w),E(k=>k.find(y=>y.toastId===t.id)?k.map(y=>y.toastId===t.id?{...y,height:w}:y):[{toastId:t.id,height:w,position:t.position},...k])},[l,t.title,t.description,E,t.id,t.jsx,t.action,t.cancel]);const L=a.useCallback(()=>{R(!0),vt(Q.current),E(n=>n.filter(h=>h.toastId!==t.id)),setTimeout(()=>{st(t)},pe)},[t,st,E,Q]);a.useEffect(()=>{if(t.promise&&N==="loading"||t.duration===1/0||t.type==="loading")return;let n;return X||O||_t?(()=>{if(Nt.current<yt.current){const k=new Date().getTime()-yt.current;at.current=at.current-k}Nt.current=new Date().getTime()})():(()=>{at.current!==1/0&&(yt.current=new Date().getTime(),n=setTimeout(()=>{t.onAutoClose==null||t.onAutoClose.call(t,t),L()},at.current))})(),()=>clearTimeout(n)},[X,O,t,N,_t,L]),a.useEffect(()=>{t.delete&&(L(),t.onDismiss==null||t.onDismiss.call(t,t))},[L,t.delete]);function Ft(){var n;if(v!=null&&v.loading){var h;return a.createElement("div",{className:H(c==null?void 0:c.loader,t==null||(h=t.classNames)==null?void 0:h.loader,"sonner-loader"),"data-visible":N==="loading"},v.loading)}return a.createElement(qt,{className:H(c==null?void 0:c.loader,t==null||(n=t.classNames)==null?void 0:n.loader),visible:N==="loading"})}const Vt=t.icon||(v==null?void 0:v[N])||Wt(N);var Rt,Dt;return a.createElement("li",{tabIndex:0,ref:P,className:H(nt,zt,c==null?void 0:c.toast,t==null||(o=t.classNames)==null?void 0:o.toast,c==null?void 0:c.default,c==null?void 0:c[N],t==null||(e=t.classNames)==null?void 0:e[N]),"data-sonner-toast":"","data-rich-colors":(Rt=t.richColors)!=null?Rt:gt,"data-styled":!(t.jsx||t.unstyled||x),"data-mounted":l,"data-promise":!!t.promise,"data-swiped":dt,"data-removed":m,"data-visible":Ot,"data-y-position":Lt,"data-x-position":Yt,"data-index":d,"data-front":Ht,"data-swiping":W,"data-dismissible":G,"data-type":N,"data-invert":$t,"data-swipe-out":K,"data-swipe-direction":F,"data-expanded":!!(X||et&&l),"data-testid":t.testId,style:{"--index":d,"--toasts-before":d,"--z-index":ot.length-d,"--offset":`${m?Ct:Q.current}px`,"--initial-height":et?"auto":`${At}px`,...Z,...t.style},onDragEnd:()=>{f(!1),B(null),J.current=null},onPointerDown:n=>{n.button!==2&&(wt||!G||(Tt.current=new Date,vt(Q.current),n.target.setPointerCapture(n.pointerId),n.target.tagName!=="BUTTON"&&(f(!0),J.current={x:n.clientX,y:n.clientY})))},onPointerUp:()=>{var n,h,w;if(K||!G)return;J.current=null;const k=Number(((n=P.current)==null?void 0:n.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ut=Number(((h=P.current)==null?void 0:h.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),y=new Date().getTime()-((w=Tt.current)==null?void 0:w.getTime()),D=$==="x"?k:ut,ft=Math.abs(D)/y;if(Math.abs(D)>=me||ft>.11){vt(Q.current),t.onDismiss==null||t.onDismiss.call(t,t),it($==="x"?k>0?"right":"left":ut>0?"down":"up"),L(),lt(!0);return}else{var M,I;(M=P.current)==null||M.style.setProperty("--swipe-amount-x","0px"),(I=P.current)==null||I.style.setProperty("--swipe-amount-y","0px")}q(!1),f(!1),B(null)},onPointerMove:n=>{var h,w,k;if(!J.current||!G||((h=window.getSelection())==null?void 0:h.toString().length)>0)return;const y=n.clientY-J.current.y,D=n.clientX-J.current.x;var ft;const M=(ft=r.swipeDirections)!=null?ft:ge(A);!$&&(Math.abs(D)>1||Math.abs(y)>1)&&B(Math.abs(D)>Math.abs(y)?"x":"y");let I={x:0,y:0};const Bt=V=>1/(1.5+Math.abs(V)/20);if($==="y"){if(M.includes("top")||M.includes("bottom"))if(M.includes("top")&&y<0||M.includes("bottom")&&y>0)I.y=y;else{const V=y*Bt(y);I.y=Math.abs(V)<Math.abs(y)?V:y}}else if($==="x"&&(M.includes("left")||M.includes("right")))if(M.includes("left")&&D<0||M.includes("right")&&D>0)I.x=D;else{const V=D*Bt(D);I.x=Math.abs(V)<Math.abs(D)?V:D}(Math.abs(I.x)>0||Math.abs(I.y)>0)&&q(!0),(w=P.current)==null||w.style.setProperty("--swipe-amount-x",`${I.x}px`),(k=P.current)==null||k.style.setProperty("--swipe-amount-y",`${I.y}px`)}},jt&&!t.jsx&&N!=="loading"?a.createElement("button",{"aria-label":j,"data-disabled":wt,"data-close-button":!0,onClick:wt||!G?()=>{}:()=>{L(),t.onDismiss==null||t.onDismiss.call(t,t)},className:H(c==null?void 0:c.closeButton,t==null||(s=t.classNames)==null?void 0:s.closeButton)},(Dt=v==null?void 0:v.close)!=null?Dt:te):null,(N||t.icon||t.promise)&&t.icon!==null&&((v==null?void 0:v[N])!==null||t.icon)?a.createElement("div",{"data-icon":"",className:H(c==null?void 0:c.icon,t==null||(C=t.classNames)==null?void 0:C.icon)},t.promise||t.type==="loading"&&!t.icon?t.icon||Ft():null,t.type!=="loading"?Vt:null):null,a.createElement("div",{"data-content":"",className:H(c==null?void 0:c.content,t==null||(u=t.classNames)==null?void 0:u.content)},a.createElement("div",{"data-title":"",className:H(c==null?void 0:c.title,t==null||(g=t.classNames)==null?void 0:g.title)},t.jsx?t.jsx:typeof t.title=="function"?t.title():t.title),t.description?a.createElement("div",{"data-description":"",className:H(bt,Pt,c==null?void 0:c.description,t==null||(_=t.classNames)==null?void 0:_.description)},typeof t.description=="function"?t.description():t.description):null),a.isValidElement(t.cancel)?t.cancel:t.cancel&&mt(t.cancel)?a.createElement("button",{"data-button":!0,"data-cancel":!0,style:t.cancelButtonStyle||Y,onClick:n=>{mt(t.cancel)&&G&&(t.cancel.onClick==null||t.cancel.onClick.call(t.cancel,n),L())},className:H(c==null?void 0:c.cancelButton,t==null||(b=t.classNames)==null?void 0:b.cancelButton)},t.cancel.label):null,a.isValidElement(t.action)?t.action:t.action&&mt(t.action)?a.createElement("button",{"data-button":!0,"data-action":!0,style:t.actionButtonStyle||ht,onClick:n=>{mt(t.action)&&(t.action.onClick==null||t.action.onClick.call(t.action,n),!n.defaultPrevented&&L())},className:H(c==null?void 0:c.actionButton,t==null||(i=t.classNames)==null?void 0:i.actionButton)},t.action.label):null)};function It(){if(typeof window>"u"||typeof document>"u")return"ltr";const r=document.documentElement.getAttribute("dir");return r==="auto"||!r?window.getComputedStyle(document.documentElement).direction:r}function be(r,o){const e={};return[r,o].forEach((s,C)=>{const u=C===1,g=u?"--mobile-offset":"--offset",_=u?ce:de;function b(i){["top","right","bottom","left"].forEach(T=>{e[`${g}-${T}`]=typeof i=="number"?`${i}px`:i})}typeof s=="number"||typeof s=="string"?b(s):typeof s=="object"?["top","right","bottom","left"].forEach(i=>{s[i]===void 0?e[`${g}-${i}`]=_:e[`${g}-${i}`]=typeof s[i]=="number"?`${s[i]}px`:s[i]}):b(_)}),e}const Ee=a.forwardRef(function(o,e){const{id:s,invert:C,position:u="bottom-right",hotkey:g=["altKey","KeyT"],expand:_,closeButton:b,className:i,offset:T,mobileOffset:t,theme:x="light",richColors:O,duration:E,style:pt,visibleToasts:U=le,toastOptions:d,dir:ot=It(),gap:X=fe,icons:st,containerAriaLabel:gt="Notifications"}=o,[z,Z]=a.useState([]),Y=a.useMemo(()=>s?z.filter(l=>l.toasterId===s):z.filter(l=>!l.toasterId),[z,s]),ht=a.useMemo(()=>Array.from(new Set([u].concat(Y.filter(l=>l.position).map(l=>l.position)))),[Y,u]),[nt,bt]=a.useState([]),[tt,A]=a.useState(!1),[rt,et]=a.useState(!1),[c,v]=a.useState(x!=="system"?x:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=a.useRef(null),$=g.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=a.useRef(null),F=a.useRef(!1),it=a.useCallback(l=>{Z(p=>{var m;return(m=p.find(R=>R.id===l.id))!=null&&m.delete||S.dismiss(l.id),p.filter(({id:R})=>R!==l.id)})},[]);return a.useEffect(()=>S.subscribe(l=>{if(l.dismiss){requestAnimationFrame(()=>{Z(p=>p.map(m=>m.id===l.id?{...m,delete:!0}:m))});return}setTimeout(()=>{Ut.flushSync(()=>{Z(p=>{const m=p.findIndex(R=>R.id===l.id);return m!==-1?[...p.slice(0,m),{...p[m],...l},...p.slice(m+1)]:[l,...p]})})})}),[z]),a.useEffect(()=>{if(x!=="system"){v(x);return}if(x==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?v("dark"):v("light")),typeof window>"u")return;const l=window.matchMedia("(prefers-color-scheme: dark)");try{l.addEventListener("change",({matches:p})=>{v(p?"dark":"light")})}catch{l.addListener(({matches:m})=>{try{v(m?"dark":"light")}catch(R){console.error(R)}})}},[x]),a.useEffect(()=>{z.length<=1&&A(!1)},[z]),a.useEffect(()=>{const l=p=>{var m;if(g.every(f=>p[f]||p.code===f)){var W;A(!0),(W=j.current)==null||W.focus()}p.code==="Escape"&&(document.activeElement===j.current||(m=j.current)!=null&&m.contains(document.activeElement))&&A(!1)};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[g]),a.useEffect(()=>{if(j.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,F.current=!1)}},[j.current]),a.createElement("section",{ref:e,"aria-label":`${gt} ${$}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ht.map((l,p)=>{var m;const[R,W]=l.split("-");return Y.length?a.createElement("ol",{key:l,dir:ot==="auto"?It():ot,tabIndex:-1,ref:j,className:i,"data-sonner-toaster":!0,"data-sonner-theme":c,"data-y-position":R,"data-x-position":W,style:{"--front-toast-height":`${((m=nt[0])==null?void 0:m.height)||0}px`,"--width":`${ue}px`,"--gap":`${X}px`,...pt,...be(T,t)},onBlur:f=>{F.current&&!f.currentTarget.contains(f.relatedTarget)&&(F.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:f=>{f.target instanceof HTMLElement&&f.target.dataset.dismissible==="false"||F.current||(F.current=!0,B.current=f.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{rt||A(!1)},onDragEnd:()=>A(!1),onPointerDown:f=>{f.target instanceof HTMLElement&&f.target.dataset.dismissible==="false"||et(!0)},onPointerUp:()=>et(!1)},Y.filter(f=>!f.position&&p===0||f.position===l).map((f,K)=>{var lt,dt;return a.createElement(he,{key:f.id,icons:st,index:K,toast:f,defaultRichColors:O,duration:(lt=d==null?void 0:d.duration)!=null?lt:E,className:d==null?void 0:d.className,descriptionClassName:d==null?void 0:d.descriptionClassName,invert:C,visibleToasts:U,closeButton:(dt=d==null?void 0:d.closeButton)!=null?dt:b,interacting:rt,position:l,style:d==null?void 0:d.style,unstyled:d==null?void 0:d.unstyled,classNames:d==null?void 0:d.classNames,cancelButtonStyle:d==null?void 0:d.cancelButtonStyle,actionButtonStyle:d==null?void 0:d.actionButtonStyle,closeButtonAriaLabel:d==null?void 0:d.closeButtonAriaLabel,removeToast:it,toasts:Y.filter(q=>q.position==f.position),heights:nt.filter(q=>q.position==f.position),setHeights:bt,expandByDefault:_,gap:X,expanded:tt,swipeDirections:o.swipeDirections})})):null}))});export{Ee as T,xe as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,b as s}from"./iframe-BWjPIle6.js";import{u}from"./index-DWC9SV-P.js";var i=s[" useId ".trim().toString()]||(()=>{}),c=0;function f(r){const[t,e]=o.useState(i());return u(()=>{e(a=>a??String(c++))},[r]),t?`radix-${t}`:""}export{f as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i}from"./iframe-
|
|
1
|
+
import{r as i}from"./iframe-BWjPIle6.js";import{j as f}from"./jsx-runtime-D_zvdyIk.js";function d(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function m(...e){return t=>{let r=!1;const o=e.map(n=>{const l=d(n,t);return!r&&typeof l=="function"&&(r=!0),l});if(r)return()=>{for(let n=0;n<o.length;n++){const l=o[n];typeof l=="function"?l():d(e[n],null)}}}}function j(...e){return i.useCallback(m(...e),e)}function g(e){const t=C(e),r=i.forwardRef((o,n)=>{const{children:l,...a}=o,s=i.Children.toArray(l),c=s.find(E);if(c){const u=c.props.children,S=s.map(p=>p===c?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:p);return f.jsx(t,{...a,ref:n,children:i.isValidElement(u)?i.cloneElement(u,void 0,S):null})}return f.jsx(t,{...a,ref:n,children:l})});return r.displayName=`${e}.Slot`,r}var _=g("Slot");function C(e){const t=i.forwardRef((r,o)=>{const{children:n,...l}=r;if(i.isValidElement(n)){const a=x(n),s=b(l,n.props);return n.type!==i.Fragment&&(s.ref=o?m(o,a):a),i.cloneElement(n,s)}return i.Children.count(n)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var y=Symbol("radix.slottable");function I(e){const t=({children:r})=>f.jsx(f.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=y,t}function E(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===y}function b(e,t){const r={...t};for(const o in t){const n=e[o],l=t[o];/^on[A-Z]/.test(o)?n&&l?r[o]=(...s)=>{const c=l(...s);return n(...s),c}:n&&(r[o]=n):o==="style"?r[o]={...n,...l}:o==="className"&&(r[o]=[n,l].filter(Boolean).join(" "))}return{...e,...r}}function x(e){var o,n;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}export{_ as S,m as a,g as b,I as c,j as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o}from"./iframe-
|
|
1
|
+
import{r as o}from"./iframe-BWjPIle6.js";import{c as y}from"./index-DW48STyt.js";import{P as w,d as _}from"./index-04C4iZwC.js";import{u as R}from"./index-BcAKBHrX.js";import{u as m}from"./index-DschQYGl.js";import{j as x}from"./jsx-runtime-D_zvdyIk.js";function U(r,e=globalThis==null?void 0:globalThis.document){const s=m(r);o.useEffect(()=>{const n=t=>{t.key==="Escape"&&s(t)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[s,e])}var j="DismissableLayer",p="dismissableLayer.update",z="dismissableLayer.pointerDownOutside",H="dismissableLayer.focusOutside",O,T=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),M=o.forwardRef((r,e)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:n,onPointerDownOutside:t,onFocusOutside:a,onInteractOutside:l,onDismiss:d,...E}=r,c=o.useContext(T),[u,S]=o.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,F]=o.useState({}),W=R(e,i=>S(i)),b=Array.from(c.layers),[k]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),A=b.indexOf(k),P=u?b.indexOf(u):-1,N=c.layersWithOutsidePointerEventsDisabled.size>0,D=P>=A,I=Y(i=>{const v=i.target,C=[...c.branches].some(h=>h.contains(v));!D||C||(t==null||t(i),l==null||l(i),i.defaultPrevented||d==null||d())},f),L=q(i=>{const v=i.target;[...c.branches].some(h=>h.contains(v))||(a==null||a(i),l==null||l(i),i.defaultPrevented||d==null||d())},f);return U(i=>{P===c.layers.size-1&&(n==null||n(i),!i.defaultPrevented&&d&&(i.preventDefault(),d()))},f),o.useEffect(()=>{if(u)return s&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(O=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),g(),()=>{s&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=O)}},[u,f,s,c]),o.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),g())},[u,c]),o.useEffect(()=>{const i=()=>F({});return document.addEventListener(p,i),()=>document.removeEventListener(p,i)},[]),x.jsx(w.div,{...E,ref:W,style:{pointerEvents:N?D?"auto":"none":void 0,...r.style},onFocusCapture:y(r.onFocusCapture,L.onFocusCapture),onBlurCapture:y(r.onBlurCapture,L.onBlurCapture),onPointerDownCapture:y(r.onPointerDownCapture,I.onPointerDownCapture)})});M.displayName=j;var K="DismissableLayerBranch",X=o.forwardRef((r,e)=>{const s=o.useContext(T),n=o.useRef(null),t=R(e,n);return o.useEffect(()=>{const a=n.current;if(a)return s.branches.add(a),()=>{s.branches.delete(a)}},[s.branches]),x.jsx(w.div,{...r,ref:t})});X.displayName=K;function Y(r,e=globalThis==null?void 0:globalThis.document){const s=m(r),n=o.useRef(!1),t=o.useRef(()=>{});return o.useEffect(()=>{const a=d=>{if(d.target&&!n.current){let E=function(){B(z,s,c,{discrete:!0})};const c={originalEvent:d};d.pointerType==="touch"?(e.removeEventListener("click",t.current),t.current=E,e.addEventListener("click",t.current,{once:!0})):E()}else e.removeEventListener("click",t.current);n.current=!1},l=window.setTimeout(()=>{e.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(l),e.removeEventListener("pointerdown",a),e.removeEventListener("click",t.current)}},[e,s]),{onPointerDownCapture:()=>n.current=!0}}function q(r,e=globalThis==null?void 0:globalThis.document){const s=m(r),n=o.useRef(!1);return o.useEffect(()=>{const t=a=>{a.target&&!n.current&&B(H,s,{originalEvent:a},{discrete:!1})};return e.addEventListener("focusin",t),()=>e.removeEventListener("focusin",t)},[e,s]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function g(){const r=new CustomEvent(p);document.dispatchEvent(r)}function B(r,e,s,{discrete:n}){const t=s.originalEvent.target,a=new CustomEvent(r,{bubbles:!1,cancelable:!0,detail:s});e&&t.addEventListener(r,e,{once:!0}),n?_(t,a):t.dispatchEvent(a)}export{M as D};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as r}from"./iframe-BWjPIle6.js";import{r as o}from"./index-npvyVsxD.js";var t=o();const m=r(t);export{m as R,t as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as P}from"./iframe-G-6sM9Mt.js";import{r as Se}from"./index-_crRFOM5.js";import{P as bt}from"./index-DqWzLCH-.js";import{j as X}from"./jsx-runtime-D_zvdyIk.js";import{u as Kt}from"./index-1v1lhNFD.js";import{c as Ee}from"./index-DvM9azdj.js";import{u as De}from"./index-lH-AZpAn.js";import{u as _t}from"./index-I343IfOC.js";import{u as Le}from"./index-ev1RjzGv.js";const Te=["top","right","bottom","left"],Z=Math.min,H=Math.max,ft=Math.round,lt=Math.floor,z=t=>({x:t,y:t}),Me={left:"right",right:"left",bottom:"top",top:"bottom"},$e={start:"end",end:"start"};function yt(t,e,n){return H(t,Z(e,n))}function q(t,e){return typeof t=="function"?t(e):t}function U(t){return t.split("-")[0]}function tt(t){return t.split("-")[1]}function Rt(t){return t==="x"?"y":"x"}function Pt(t){return t==="y"?"height":"width"}const ke=new Set(["top","bottom"]);function j(t){return ke.has(U(t))?"y":"x"}function Ct(t){return Rt(j(t))}function Ne(t,e,n){n===void 0&&(n=!1);const o=tt(t),r=Ct(t),i=Pt(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=ut(s)),[s,ut(s)]}function Fe(t){const e=ut(t);return[vt(t),e,vt(e)]}function vt(t){return t.replace(/start|end/g,e=>$e[e])}const Bt=["left","right"],Vt=["right","left"],He=["top","bottom"],We=["bottom","top"];function _e(t,e,n){switch(t){case"top":case"bottom":return n?e?Vt:Bt:e?Bt:Vt;case"left":case"right":return e?He:We;default:return[]}}function Be(t,e,n,o){const r=tt(t);let i=_e(U(t),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),e&&(i=i.concat(i.map(vt)))),i}function ut(t){return t.replace(/left|right|bottom|top/g,e=>Me[e])}function Ve(t){return{top:0,right:0,bottom:0,left:0,...t}}function Gt(t){return typeof t!="number"?Ve(t):{top:t,right:t,bottom:t,left:t}}function dt(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function jt(t,e,n){let{reference:o,floating:r}=t;const i=j(e),s=Ct(e),c=Pt(s),l=U(e),a=i==="y",f=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,p=o[c]/2-r[c]/2;let d;switch(l){case"top":d={x:f,y:o.y-r.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-r.width,y:u};break;default:d={x:o.x,y:o.y}}switch(tt(e)){case"start":d[s]-=p*(n&&a?-1:1);break;case"end":d[s]+=p*(n&&a?-1:1);break}return d}const je=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let a=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:f,y:u}=jt(a,o,l),p=o,d={},m=0;for(let h=0;h<c.length;h++){const{name:w,fn:g}=c[h],{x,y:A,data:y,reset:v}=await g({x:f,y:u,initialPlacement:o,placement:p,strategy:r,middlewareData:d,rects:a,platform:s,elements:{reference:t,floating:e}});f=x??f,u=A??u,d={...d,[w]:{...d[w],...y}},v&&m<=50&&(m++,typeof v=="object"&&(v.placement&&(p=v.placement),v.rects&&(a=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):v.rects),{x:f,y:u}=jt(a,p,l)),h=-1)}return{x:f,y:u,placement:p,strategy:r,middlewareData:d}};async function ot(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:p=!1,padding:d=0}=q(e,t),m=Gt(d),w=c[p?u==="floating"?"reference":"floating":u],g=dt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:a,rootBoundary:f,strategy:l})),x=u==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,A=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),y=await(i.isElement==null?void 0:i.isElement(A))?await(i.getScale==null?void 0:i.getScale(A))||{x:1,y:1}:{x:1,y:1},v=dt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:A,strategy:l}):x);return{top:(g.top-v.top+m.top)/y.y,bottom:(v.bottom-g.bottom+m.bottom)/y.y,left:(g.left-v.left+m.left)/y.x,right:(v.right-g.right+m.right)/y.x}}const ze=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:i,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:f=0}=q(t,e)||{};if(a==null)return{};const u=Gt(f),p={x:n,y:o},d=Ct(r),m=Pt(d),h=await s.getDimensions(a),w=d==="y",g=w?"top":"left",x=w?"bottom":"right",A=w?"clientHeight":"clientWidth",y=i.reference[m]+i.reference[d]-p[d]-i.floating[m],v=p[d]-i.reference[d],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a));let C=R?R[A]:0;(!C||!await(s.isElement==null?void 0:s.isElement(R)))&&(C=c.floating[A]||i.floating[m]);const T=y/2-v/2,N=C/2-h[m]/2-1,L=Z(u[g],N),$=Z(u[x],N),k=L,S=C-h[m]-$,O=C/2-h[m]/2+T,F=yt(k,O,S),E=!l.arrow&&tt(r)!=null&&O!==F&&i.reference[m]/2-(O<k?L:$)-h[m]/2<0,D=E?O<k?O-k:O-S:0;return{[d]:p[d]+D,data:{[d]:F,centerOffset:O-F-D,...E&&{alignmentOffset:D}},reset:E}}}),Ie=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...w}=q(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=U(r),x=j(c),A=U(c)===c,y=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=p||(A||!h?[ut(c)]:Fe(c)),R=m!=="none";!p&&R&&v.push(...Be(c,h,m,y));const C=[c,...v],T=await ot(e,w),N=[];let L=((o=i.flip)==null?void 0:o.overflows)||[];if(f&&N.push(T[g]),u){const O=Ne(r,s,y);N.push(T[O[0]],T[O[1]])}if(L=[...L,{placement:r,overflows:N}],!N.every(O=>O<=0)){var $,k;const O=((($=i.flip)==null?void 0:$.index)||0)+1,F=C[O];if(F&&(!(u==="alignment"?x!==j(F):!1)||L.every(b=>j(b.placement)===x?b.overflows[0]>0:!0)))return{data:{index:O,overflows:L},reset:{placement:F}};let E=(k=L.filter(D=>D.overflows[0]<=0).sort((D,b)=>D.overflows[1]-b.overflows[1])[0])==null?void 0:k.placement;if(!E)switch(d){case"bestFit":{var S;const D=(S=L.filter(b=>{if(R){const M=j(b.placement);return M===x||M==="y"}return!0}).map(b=>[b.placement,b.overflows.filter(M=>M>0).reduce((M,V)=>M+V,0)]).sort((b,M)=>b[1]-M[1])[0])==null?void 0:S[0];D&&(E=D);break}case"initialPlacement":E=c;break}if(r!==E)return{reset:{placement:E}}}return{}}}};function zt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function It(t){return Te.some(e=>t[e]>=0)}const Ye=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...r}=q(t,e);switch(o){case"referenceHidden":{const i=await ot(e,{...r,elementContext:"reference"}),s=zt(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:It(s)}}}case"escaped":{const i=await ot(e,{...r,altBoundary:!0}),s=zt(i,n.floating);return{data:{escapedOffsets:s,escaped:It(s)}}}default:return{}}}}},Jt=new Set(["left","top"]);async function Xe(t,e){const{placement:n,platform:o,elements:r}=t,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=U(n),c=tt(n),l=j(n)==="y",a=Jt.has(s)?-1:1,f=i&&l?-1:1,u=q(e,t);let{mainAxis:p,crossAxis:d,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof m=="number"&&(d=c==="end"?m*-1:m),l?{x:d*f,y:p*a}:{x:p*a,y:d*f}}const qe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=e,l=await Xe(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},Ue=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:w=>{let{x:g,y:x}=w;return{x:g,y:x}}},...l}=q(t,e),a={x:n,y:o},f=await ot(e,l),u=j(U(r)),p=Rt(u);let d=a[p],m=a[u];if(i){const w=p==="y"?"top":"left",g=p==="y"?"bottom":"right",x=d+f[w],A=d-f[g];d=yt(x,d,A)}if(s){const w=u==="y"?"top":"left",g=u==="y"?"bottom":"right",x=m+f[w],A=m-f[g];m=yt(x,m,A)}const h=c.fn({...e,[p]:d,[u]:m});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[p]:i,[u]:s}}}}}},Ze=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:r,rects:i,middlewareData:s}=e,{offset:c=0,mainAxis:l=!0,crossAxis:a=!0}=q(t,e),f={x:n,y:o},u=j(r),p=Rt(u);let d=f[p],m=f[u];const h=q(c,e),w=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const A=p==="y"?"height":"width",y=i.reference[p]-i.floating[A]+w.mainAxis,v=i.reference[p]+i.reference[A]-w.mainAxis;d<y?d=y:d>v&&(d=v)}if(a){var g,x;const A=p==="y"?"width":"height",y=Jt.has(U(r)),v=i.reference[u]-i.floating[A]+(y&&((g=s.offset)==null?void 0:g[u])||0)+(y?0:w.crossAxis),R=i.reference[u]+i.reference[A]+(y?0:((x=s.offset)==null?void 0:x[u])||0)-(y?w.crossAxis:0);m<v?m=v:m>R&&(m=R)}return{[p]:d,[u]:m}}}},Ke=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:r,rects:i,platform:s,elements:c}=e,{apply:l=()=>{},...a}=q(t,e),f=await ot(e,a),u=U(r),p=tt(r),d=j(r)==="y",{width:m,height:h}=i.floating;let w,g;u==="top"||u==="bottom"?(w=u,g=p===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(g=u,w=p==="end"?"top":"bottom");const x=h-f.top-f.bottom,A=m-f.left-f.right,y=Z(h-f[w],x),v=Z(m-f[g],A),R=!e.middlewareData.shift;let C=y,T=v;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(T=A),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(C=x),R&&!p){const L=H(f.left,0),$=H(f.right,0),k=H(f.top,0),S=H(f.bottom,0);d?T=m-2*(L!==0||$!==0?L+$:H(f.left,f.right)):C=h-2*(k!==0||S!==0?k+S:H(f.top,f.bottom))}await l({...e,availableWidth:T,availableHeight:C});const N=await s.getDimensions(c.floating);return m!==N.width||h!==N.height?{reset:{rects:!0}}:{}}}};function pt(){return typeof window<"u"}function et(t){return Qt(t)?(t.nodeName||"").toLowerCase():"#document"}function W(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Y(t){var e;return(e=(Qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Qt(t){return pt()?t instanceof Node||t instanceof W(t).Node:!1}function _(t){return pt()?t instanceof Element||t instanceof W(t).Element:!1}function I(t){return pt()?t instanceof HTMLElement||t instanceof W(t).HTMLElement:!1}function Yt(t){return!pt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof W(t).ShadowRoot}const Ge=new Set(["inline","contents"]);function it(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=B(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Ge.has(r)}const Je=new Set(["table","td","th"]);function Qe(t){return Je.has(et(t))}const tn=[":popover-open",":modal"];function ht(t){return tn.some(e=>{try{return t.matches(e)}catch{return!1}})}const en=["transform","translate","scale","rotate","perspective"],nn=["transform","translate","scale","rotate","perspective","filter"],on=["paint","layout","strict","content"];function Ot(t){const e=St(),n=_(t)?B(t):t;return en.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||nn.some(o=>(n.willChange||"").includes(o))||on.some(o=>(n.contain||"").includes(o))}function rn(t){let e=K(t);for(;I(e)&&!Q(e);){if(Ot(e))return e;if(ht(e))return null;e=K(e)}return null}function St(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const sn=new Set(["html","body","#document"]);function Q(t){return sn.has(et(t))}function B(t){return W(t).getComputedStyle(t)}function gt(t){return _(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(et(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Yt(t)&&t.host||Y(t);return Yt(e)?e.host:e}function te(t){const e=K(t);return Q(e)?t.ownerDocument?t.ownerDocument.body:t.body:I(e)&&it(e)?e:te(e)}function rt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=te(t),i=r===((o=t.ownerDocument)==null?void 0:o.body),s=W(r);if(i){const c=At(s);return e.concat(s,s.visualViewport||[],it(r)?r:[],c&&n?rt(c):[])}return e.concat(r,rt(r,[],n))}function At(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){const e=B(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=I(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,c=ft(n)!==i||ft(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function Et(t){return _(t)?t:t.contextElement}function J(t){const e=Et(t);if(!I(e))return z(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=ee(e);let s=(i?ft(n.width):n.width)/o,c=(i?ft(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const cn=z(0);function ne(t){const e=W(t);return!St()||!e.visualViewport?cn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ln(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==W(t)?!1:e}function G(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=Et(t);let s=z(1);e&&(o?_(o)&&(s=J(o)):s=J(t));const c=ln(i,n,o)?ne(i):z(0);let l=(r.left+c.x)/s.x,a=(r.top+c.y)/s.y,f=r.width/s.x,u=r.height/s.y;if(i){const p=W(i),d=o&&_(o)?W(o):o;let m=p,h=At(m);for(;h&&o&&d!==m;){const w=J(h),g=h.getBoundingClientRect(),x=B(h),A=g.left+(h.clientLeft+parseFloat(x.paddingLeft))*w.x,y=g.top+(h.clientTop+parseFloat(x.paddingTop))*w.y;l*=w.x,a*=w.y,f*=w.x,u*=w.y,l+=A,a+=y,m=W(h),h=At(m)}}return dt({width:f,height:u,x:l,y:a})}function Dt(t,e){const n=gt(t).scrollLeft;return e?e.left+n:G(Y(t)).left+n}function oe(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),r=o.left+e.scrollLeft-(n?0:Dt(t,o)),i=o.top+e.scrollTop;return{x:r,y:i}}function an(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i=r==="fixed",s=Y(o),c=e?ht(e.floating):!1;if(o===s||c&&i)return n;let l={scrollLeft:0,scrollTop:0},a=z(1);const f=z(0),u=I(o);if((u||!u&&!i)&&((et(o)!=="body"||it(s))&&(l=gt(o)),I(o))){const d=G(o);a=J(o),f.x=d.x+o.clientLeft,f.y=d.y+o.clientTop}const p=s&&!u&&!i?oe(s,l,!0):z(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+f.x+p.x,y:n.y*a.y-l.scrollTop*a.y+f.y+p.y}}function fn(t){return Array.from(t.getClientRects())}function un(t){const e=Y(t),n=gt(t),o=t.ownerDocument.body,r=H(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=H(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Dt(t);const c=-n.scrollTop;return B(o).direction==="rtl"&&(s+=H(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:c}}function dn(t,e){const n=W(t),o=Y(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,c=0,l=0;if(r){i=r.width,s=r.height;const a=St();(!a||a&&e==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:c,y:l}}const mn=new Set(["absolute","fixed"]);function pn(t,e){const n=G(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=I(t)?J(t):z(1),s=t.clientWidth*i.x,c=t.clientHeight*i.y,l=r*i.x,a=o*i.y;return{width:s,height:c,x:l,y:a}}function Xt(t,e,n){let o;if(e==="viewport")o=dn(t,n);else if(e==="document")o=un(Y(t));else if(_(e))o=pn(e,n);else{const r=ne(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return dt(o)}function re(t,e){const n=K(t);return n===e||!_(n)||Q(n)?!1:B(n).position==="fixed"||re(n,e)}function hn(t,e){const n=e.get(t);if(n)return n;let o=rt(t,[],!1).filter(c=>_(c)&&et(c)!=="body"),r=null;const i=B(t).position==="fixed";let s=i?K(t):t;for(;_(s)&&!Q(s);){const c=B(s),l=Ot(s);!l&&c.position==="fixed"&&(r=null),(i?!l&&!r:!l&&c.position==="static"&&!!r&&mn.has(r.position)||it(s)&&!l&&re(t,s))?o=o.filter(f=>f!==s):r=c,s=K(s)}return e.set(t,o),o}function gn(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const s=[...n==="clippingAncestors"?ht(e)?[]:hn(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,f)=>{const u=Xt(e,f,r);return a.top=H(u.top,a.top),a.right=Z(u.right,a.right),a.bottom=Z(u.bottom,a.bottom),a.left=H(u.left,a.left),a},Xt(e,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function wn(t){const{width:e,height:n}=ee(t);return{width:e,height:n}}function xn(t,e,n){const o=I(e),r=Y(e),i=n==="fixed",s=G(t,!0,i,e);let c={scrollLeft:0,scrollTop:0};const l=z(0);function a(){l.x=Dt(r)}if(o||!o&&!i)if((et(e)!=="body"||it(r))&&(c=gt(e)),o){const d=G(e,!0,i,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else r&&a();i&&!o&&r&&a();const f=r&&!o&&!i?oe(r,c):z(0),u=s.left+c.scrollLeft-l.x-f.x,p=s.top+c.scrollTop-l.y-f.y;return{x:u,y:p,width:s.width,height:s.height}}function wt(t){return B(t).position==="static"}function qt(t,e){if(!I(t)||B(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Y(t)===n&&(n=n.ownerDocument.body),n}function ie(t,e){const n=W(t);if(ht(t))return n;if(!I(t)){let r=K(t);for(;r&&!Q(r);){if(_(r)&&!wt(r))return r;r=K(r)}return n}let o=qt(t,e);for(;o&&Qe(o)&&wt(o);)o=qt(o,e);return o&&Q(o)&&wt(o)&&!Ot(o)?n:o||rn(t)||n}const yn=async function(t){const e=this.getOffsetParent||ie,n=this.getDimensions,o=await n(t.floating);return{reference:xn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function vn(t){return B(t).direction==="rtl"}const An={convertOffsetParentRelativeRectToViewportRelativeRect:an,getDocumentElement:Y,getClippingRect:gn,getOffsetParent:ie,getElementRects:yn,getClientRects:fn,getDimensions:wn,getScale:J,isElement:_,isRTL:vn};function se(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function bn(t,e){let n=null,o;const r=Y(t);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),i();const a=t.getBoundingClientRect(),{left:f,top:u,width:p,height:d}=a;if(c||e(),!p||!d)return;const m=lt(u),h=lt(r.clientWidth-(f+p)),w=lt(r.clientHeight-(u+d)),g=lt(f),A={rootMargin:-m+"px "+-h+"px "+-w+"px "+-g+"px",threshold:H(0,Z(1,l))||1};let y=!0;function v(R){const C=R[0].intersectionRatio;if(C!==l){if(!y)return s();C?s(!1,C):o=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!se(a,t.getBoundingClientRect())&&s(),y=!1}try{n=new IntersectionObserver(v,{...A,root:r.ownerDocument})}catch{n=new IntersectionObserver(v,A)}n.observe(t)}return s(!0),i}function Rn(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Et(t),f=r||i?[...a?rt(a):[],...rt(e)]:[];f.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const u=a&&c?bn(a,n):null;let p=-1,d=null;s&&(d=new ResizeObserver(g=>{let[x]=g;x&&x.target===a&&d&&(d.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var A;(A=d)==null||A.observe(e)})),n()}),a&&!l&&d.observe(a),d.observe(e));let m,h=l?G(t):null;l&&w();function w(){const g=G(t);h&&!se(h,g)&&n(),h=g,m=requestAnimationFrame(w)}return n(),()=>{var g;f.forEach(x=>{r&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),u==null||u(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(m)}}const Pn=qe,Cn=Ue,On=Ie,Sn=Ke,En=Ye,Ut=ze,Dn=Ze,Ln=(t,e,n)=>{const o=new Map,r={platform:An,...n},i={...r.platform,_c:o};return je(t,e,{...r,platform:i})};var Tn=typeof document<"u",Mn=function(){},at=Tn?P.useLayoutEffect:Mn;function mt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!mt(t[o],e[o]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&t.$$typeof)&&!mt(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function ce(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Zt(t,e){const n=ce(t);return Math.round(e*n)/n}function xt(t){const e=P.useRef(t);return at(()=>{e.current=t}),e}function $n(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:l,open:a}=t,[f,u]=P.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[p,d]=P.useState(o);mt(p,o)||d(o);const[m,h]=P.useState(null),[w,g]=P.useState(null),x=P.useCallback(b=>{b!==R.current&&(R.current=b,h(b))},[]),A=P.useCallback(b=>{b!==C.current&&(C.current=b,g(b))},[]),y=i||m,v=s||w,R=P.useRef(null),C=P.useRef(null),T=P.useRef(f),N=l!=null,L=xt(l),$=xt(r),k=xt(a),S=P.useCallback(()=>{if(!R.current||!C.current)return;const b={placement:e,strategy:n,middleware:p};$.current&&(b.platform=$.current),Ln(R.current,C.current,b).then(M=>{const V={...M,isPositioned:k.current!==!1};O.current&&!mt(T.current,V)&&(T.current=V,Se.flushSync(()=>{u(V)}))})},[p,e,n,$,k]);at(()=>{a===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(b=>({...b,isPositioned:!1})))},[a]);const O=P.useRef(!1);at(()=>(O.current=!0,()=>{O.current=!1}),[]),at(()=>{if(y&&(R.current=y),v&&(C.current=v),y&&v){if(L.current)return L.current(y,v,S);S()}},[y,v,S,L,N]);const F=P.useMemo(()=>({reference:R,floating:C,setReference:x,setFloating:A}),[x,A]),E=P.useMemo(()=>({reference:y,floating:v}),[y,v]),D=P.useMemo(()=>{const b={position:n,left:0,top:0};if(!E.floating)return b;const M=Zt(E.floating,f.x),V=Zt(E.floating,f.y);return c?{...b,transform:"translate("+M+"px, "+V+"px)",...ce(E.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:V}},[n,c,E.floating,f.x,f.y]);return P.useMemo(()=>({...f,update:S,refs:F,elements:E,floatingStyles:D}),[f,S,F,E,D])}const kn=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:r}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?Ut({element:o.current,padding:r}).fn(n):{}:o?Ut({element:o,padding:r}).fn(n):{}}}},Nn=(t,e)=>({...Pn(t),options:[t,e]}),Fn=(t,e)=>({...Cn(t),options:[t,e]}),Hn=(t,e)=>({...Dn(t),options:[t,e]}),Wn=(t,e)=>({...On(t),options:[t,e]}),_n=(t,e)=>({...Sn(t),options:[t,e]}),Bn=(t,e)=>({...En(t),options:[t,e]}),Vn=(t,e)=>({...kn(t),options:[t,e]});var jn="Arrow",le=P.forwardRef((t,e)=>{const{children:n,width:o=10,height:r=5,...i}=t;return X.jsx(bt.svg,{...i,ref:e,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:X.jsx("polygon",{points:"0,0 30,0 15,10"})})});le.displayName=jn;var zn=le,Lt="Popper",[ae,io]=Ee(Lt),[In,fe]=ae(Lt),ue=t=>{const{__scopePopper:e,children:n}=t,[o,r]=P.useState(null);return X.jsx(In,{scope:e,anchor:o,onAnchorChange:r,children:n})};ue.displayName=Lt;var de="PopperAnchor",me=P.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:o,...r}=t,i=fe(de,n),s=P.useRef(null),c=Kt(e,s),l=P.useRef(null);return P.useEffect(()=>{const a=l.current;l.current=(o==null?void 0:o.current)||s.current,a!==l.current&&i.onAnchorChange(l.current)}),o?null:X.jsx(bt.div,{...r,ref:c})});me.displayName=de;var Tt="PopperContent",[Yn,Xn]=ae(Tt),pe=P.forwardRef((t,e)=>{var Mt,$t,kt,Nt,Ft,Ht;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:a=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:p=!1,updatePositionStrategy:d="optimized",onPlaced:m,...h}=t,w=fe(Tt,n),[g,x]=P.useState(null),A=Kt(e,nt=>x(nt)),[y,v]=P.useState(null),R=Le(y),C=(R==null?void 0:R.width)??0,T=(R==null?void 0:R.height)??0,N=o+(i!=="center"?"-"+i:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},$=Array.isArray(a)?a:[a],k=$.length>0,S={padding:L,boundary:$.filter(Un),altBoundary:k},{refs:O,floatingStyles:F,placement:E,isPositioned:D,middlewareData:b}=$n({strategy:"fixed",placement:N,whileElementsMounted:(...nt)=>Rn(...nt,{animationFrame:d==="always"}),elements:{reference:w.anchor},middleware:[Nn({mainAxis:r+T,alignmentAxis:s}),l&&Fn({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Hn():void 0,...S}),l&&Wn({...S}),_n({...S,apply:({elements:nt,rects:Wt,availableWidth:Re,availableHeight:Pe})=>{const{width:Ce,height:Oe}=Wt.reference,ct=nt.floating.style;ct.setProperty("--radix-popper-available-width",`${Re}px`),ct.setProperty("--radix-popper-available-height",`${Pe}px`),ct.setProperty("--radix-popper-anchor-width",`${Ce}px`),ct.setProperty("--radix-popper-anchor-height",`${Oe}px`)}}),y&&Vn({element:y,padding:c}),Zn({arrowWidth:C,arrowHeight:T}),p&&Bn({strategy:"referenceHidden",...S})]}),[M,V]=we(E),st=De(m);_t(()=>{D&&(st==null||st())},[D,st]);const xe=(Mt=b.arrow)==null?void 0:Mt.x,ye=($t=b.arrow)==null?void 0:$t.y,ve=((kt=b.arrow)==null?void 0:kt.centerOffset)!==0,[Ae,be]=P.useState();return _t(()=>{g&&be(window.getComputedStyle(g).zIndex)},[g]),X.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:D?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ae,"--radix-popper-transform-origin":[(Nt=b.transformOrigin)==null?void 0:Nt.x,(Ft=b.transformOrigin)==null?void 0:Ft.y].join(" "),...((Ht=b.hide)==null?void 0:Ht.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:X.jsx(Yn,{scope:n,placedSide:M,onArrowChange:v,arrowX:xe,arrowY:ye,shouldHideArrow:ve,children:X.jsx(bt.div,{"data-side":M,"data-align":V,...h,ref:A,style:{...h.style,animation:D?void 0:"none"}})})})});pe.displayName=Tt;var he="PopperArrow",qn={top:"bottom",right:"left",bottom:"top",left:"right"},ge=P.forwardRef(function(e,n){const{__scopePopper:o,...r}=e,i=Xn(he,o),s=qn[i.placedSide];return X.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:X.jsx(zn,{...r,ref:n,style:{...r.style,display:"block"}})})});ge.displayName=he;function Un(t){return t!==null}var Zn=t=>({name:"transformOrigin",options:t,fn(e){var w,g,x;const{placement:n,rects:o,middlewareData:r}=e,s=((w=r.arrow)==null?void 0:w.centerOffset)!==0,c=s?0:t.arrowWidth,l=s?0:t.arrowHeight,[a,f]=we(n),u={start:"0%",center:"50%",end:"100%"}[f],p=(((g=r.arrow)==null?void 0:g.x)??0)+c/2,d=(((x=r.arrow)==null?void 0:x.y)??0)+l/2;let m="",h="";return a==="bottom"?(m=s?u:`${p}px`,h=`${-l}px`):a==="top"?(m=s?u:`${p}px`,h=`${o.floating.height+l}px`):a==="right"?(m=`${-l}px`,h=s?u:`${d}px`):a==="left"&&(m=`${o.floating.width+l}px`,h=s?u:`${d}px`),{data:{x:m,y:h}}}});function we(t){const[e,n="center"]=t.split("-");return[e,n]}var so=ue,co=me,lo=pe,ao=ge;export{co as A,lo as C,so as R,ao as a,io as c};
|
|
1
|
+
import{r as P}from"./iframe-BWjPIle6.js";import{r as Se}from"./index-C5eJ31Z3.js";import{P as bt}from"./index-04C4iZwC.js";import{j as X}from"./jsx-runtime-D_zvdyIk.js";import{u as Kt}from"./index-BcAKBHrX.js";import{c as Ee}from"./index-Pk2lGsul.js";import{u as De}from"./index-DschQYGl.js";import{u as _t}from"./index-DWC9SV-P.js";import{u as Le}from"./index-DMk2qc2_.js";const Te=["top","right","bottom","left"],Z=Math.min,H=Math.max,ft=Math.round,lt=Math.floor,z=t=>({x:t,y:t}),Me={left:"right",right:"left",bottom:"top",top:"bottom"},$e={start:"end",end:"start"};function yt(t,e,n){return H(t,Z(e,n))}function q(t,e){return typeof t=="function"?t(e):t}function U(t){return t.split("-")[0]}function tt(t){return t.split("-")[1]}function Rt(t){return t==="x"?"y":"x"}function Pt(t){return t==="y"?"height":"width"}const ke=new Set(["top","bottom"]);function j(t){return ke.has(U(t))?"y":"x"}function Ct(t){return Rt(j(t))}function Ne(t,e,n){n===void 0&&(n=!1);const o=tt(t),r=Ct(t),i=Pt(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=ut(s)),[s,ut(s)]}function Fe(t){const e=ut(t);return[vt(t),e,vt(e)]}function vt(t){return t.replace(/start|end/g,e=>$e[e])}const Bt=["left","right"],Vt=["right","left"],He=["top","bottom"],We=["bottom","top"];function _e(t,e,n){switch(t){case"top":case"bottom":return n?e?Vt:Bt:e?Bt:Vt;case"left":case"right":return e?He:We;default:return[]}}function Be(t,e,n,o){const r=tt(t);let i=_e(U(t),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),e&&(i=i.concat(i.map(vt)))),i}function ut(t){return t.replace(/left|right|bottom|top/g,e=>Me[e])}function Ve(t){return{top:0,right:0,bottom:0,left:0,...t}}function Gt(t){return typeof t!="number"?Ve(t):{top:t,right:t,bottom:t,left:t}}function dt(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function jt(t,e,n){let{reference:o,floating:r}=t;const i=j(e),s=Ct(e),c=Pt(s),l=U(e),a=i==="y",f=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,p=o[c]/2-r[c]/2;let d;switch(l){case"top":d={x:f,y:o.y-r.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-r.width,y:u};break;default:d={x:o.x,y:o.y}}switch(tt(e)){case"start":d[s]-=p*(n&&a?-1:1);break;case"end":d[s]+=p*(n&&a?-1:1);break}return d}const je=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let a=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:f,y:u}=jt(a,o,l),p=o,d={},m=0;for(let h=0;h<c.length;h++){const{name:w,fn:g}=c[h],{x,y:A,data:y,reset:v}=await g({x:f,y:u,initialPlacement:o,placement:p,strategy:r,middlewareData:d,rects:a,platform:s,elements:{reference:t,floating:e}});f=x??f,u=A??u,d={...d,[w]:{...d[w],...y}},v&&m<=50&&(m++,typeof v=="object"&&(v.placement&&(p=v.placement),v.rects&&(a=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):v.rects),{x:f,y:u}=jt(a,p,l)),h=-1)}return{x:f,y:u,placement:p,strategy:r,middlewareData:d}};async function ot(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:p=!1,padding:d=0}=q(e,t),m=Gt(d),w=c[p?u==="floating"?"reference":"floating":u],g=dt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:a,rootBoundary:f,strategy:l})),x=u==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,A=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),y=await(i.isElement==null?void 0:i.isElement(A))?await(i.getScale==null?void 0:i.getScale(A))||{x:1,y:1}:{x:1,y:1},v=dt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:A,strategy:l}):x);return{top:(g.top-v.top+m.top)/y.y,bottom:(v.bottom-g.bottom+m.bottom)/y.y,left:(g.left-v.left+m.left)/y.x,right:(v.right-g.right+m.right)/y.x}}const ze=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:i,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:f=0}=q(t,e)||{};if(a==null)return{};const u=Gt(f),p={x:n,y:o},d=Ct(r),m=Pt(d),h=await s.getDimensions(a),w=d==="y",g=w?"top":"left",x=w?"bottom":"right",A=w?"clientHeight":"clientWidth",y=i.reference[m]+i.reference[d]-p[d]-i.floating[m],v=p[d]-i.reference[d],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a));let C=R?R[A]:0;(!C||!await(s.isElement==null?void 0:s.isElement(R)))&&(C=c.floating[A]||i.floating[m]);const T=y/2-v/2,N=C/2-h[m]/2-1,L=Z(u[g],N),$=Z(u[x],N),k=L,S=C-h[m]-$,O=C/2-h[m]/2+T,F=yt(k,O,S),E=!l.arrow&&tt(r)!=null&&O!==F&&i.reference[m]/2-(O<k?L:$)-h[m]/2<0,D=E?O<k?O-k:O-S:0;return{[d]:p[d]+D,data:{[d]:F,centerOffset:O-F-D,...E&&{alignmentOffset:D}},reset:E}}}),Ie=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...w}=q(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=U(r),x=j(c),A=U(c)===c,y=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=p||(A||!h?[ut(c)]:Fe(c)),R=m!=="none";!p&&R&&v.push(...Be(c,h,m,y));const C=[c,...v],T=await ot(e,w),N=[];let L=((o=i.flip)==null?void 0:o.overflows)||[];if(f&&N.push(T[g]),u){const O=Ne(r,s,y);N.push(T[O[0]],T[O[1]])}if(L=[...L,{placement:r,overflows:N}],!N.every(O=>O<=0)){var $,k;const O=((($=i.flip)==null?void 0:$.index)||0)+1,F=C[O];if(F&&(!(u==="alignment"?x!==j(F):!1)||L.every(b=>j(b.placement)===x?b.overflows[0]>0:!0)))return{data:{index:O,overflows:L},reset:{placement:F}};let E=(k=L.filter(D=>D.overflows[0]<=0).sort((D,b)=>D.overflows[1]-b.overflows[1])[0])==null?void 0:k.placement;if(!E)switch(d){case"bestFit":{var S;const D=(S=L.filter(b=>{if(R){const M=j(b.placement);return M===x||M==="y"}return!0}).map(b=>[b.placement,b.overflows.filter(M=>M>0).reduce((M,V)=>M+V,0)]).sort((b,M)=>b[1]-M[1])[0])==null?void 0:S[0];D&&(E=D);break}case"initialPlacement":E=c;break}if(r!==E)return{reset:{placement:E}}}return{}}}};function zt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function It(t){return Te.some(e=>t[e]>=0)}const Ye=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...r}=q(t,e);switch(o){case"referenceHidden":{const i=await ot(e,{...r,elementContext:"reference"}),s=zt(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:It(s)}}}case"escaped":{const i=await ot(e,{...r,altBoundary:!0}),s=zt(i,n.floating);return{data:{escapedOffsets:s,escaped:It(s)}}}default:return{}}}}},Jt=new Set(["left","top"]);async function Xe(t,e){const{placement:n,platform:o,elements:r}=t,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=U(n),c=tt(n),l=j(n)==="y",a=Jt.has(s)?-1:1,f=i&&l?-1:1,u=q(e,t);let{mainAxis:p,crossAxis:d,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof m=="number"&&(d=c==="end"?m*-1:m),l?{x:d*f,y:p*a}:{x:p*a,y:d*f}}const qe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=e,l=await Xe(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},Ue=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:w=>{let{x:g,y:x}=w;return{x:g,y:x}}},...l}=q(t,e),a={x:n,y:o},f=await ot(e,l),u=j(U(r)),p=Rt(u);let d=a[p],m=a[u];if(i){const w=p==="y"?"top":"left",g=p==="y"?"bottom":"right",x=d+f[w],A=d-f[g];d=yt(x,d,A)}if(s){const w=u==="y"?"top":"left",g=u==="y"?"bottom":"right",x=m+f[w],A=m-f[g];m=yt(x,m,A)}const h=c.fn({...e,[p]:d,[u]:m});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[p]:i,[u]:s}}}}}},Ze=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:r,rects:i,middlewareData:s}=e,{offset:c=0,mainAxis:l=!0,crossAxis:a=!0}=q(t,e),f={x:n,y:o},u=j(r),p=Rt(u);let d=f[p],m=f[u];const h=q(c,e),w=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const A=p==="y"?"height":"width",y=i.reference[p]-i.floating[A]+w.mainAxis,v=i.reference[p]+i.reference[A]-w.mainAxis;d<y?d=y:d>v&&(d=v)}if(a){var g,x;const A=p==="y"?"width":"height",y=Jt.has(U(r)),v=i.reference[u]-i.floating[A]+(y&&((g=s.offset)==null?void 0:g[u])||0)+(y?0:w.crossAxis),R=i.reference[u]+i.reference[A]+(y?0:((x=s.offset)==null?void 0:x[u])||0)-(y?w.crossAxis:0);m<v?m=v:m>R&&(m=R)}return{[p]:d,[u]:m}}}},Ke=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:r,rects:i,platform:s,elements:c}=e,{apply:l=()=>{},...a}=q(t,e),f=await ot(e,a),u=U(r),p=tt(r),d=j(r)==="y",{width:m,height:h}=i.floating;let w,g;u==="top"||u==="bottom"?(w=u,g=p===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(g=u,w=p==="end"?"top":"bottom");const x=h-f.top-f.bottom,A=m-f.left-f.right,y=Z(h-f[w],x),v=Z(m-f[g],A),R=!e.middlewareData.shift;let C=y,T=v;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(T=A),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(C=x),R&&!p){const L=H(f.left,0),$=H(f.right,0),k=H(f.top,0),S=H(f.bottom,0);d?T=m-2*(L!==0||$!==0?L+$:H(f.left,f.right)):C=h-2*(k!==0||S!==0?k+S:H(f.top,f.bottom))}await l({...e,availableWidth:T,availableHeight:C});const N=await s.getDimensions(c.floating);return m!==N.width||h!==N.height?{reset:{rects:!0}}:{}}}};function pt(){return typeof window<"u"}function et(t){return Qt(t)?(t.nodeName||"").toLowerCase():"#document"}function W(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Y(t){var e;return(e=(Qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Qt(t){return pt()?t instanceof Node||t instanceof W(t).Node:!1}function _(t){return pt()?t instanceof Element||t instanceof W(t).Element:!1}function I(t){return pt()?t instanceof HTMLElement||t instanceof W(t).HTMLElement:!1}function Yt(t){return!pt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof W(t).ShadowRoot}const Ge=new Set(["inline","contents"]);function it(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=B(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Ge.has(r)}const Je=new Set(["table","td","th"]);function Qe(t){return Je.has(et(t))}const tn=[":popover-open",":modal"];function ht(t){return tn.some(e=>{try{return t.matches(e)}catch{return!1}})}const en=["transform","translate","scale","rotate","perspective"],nn=["transform","translate","scale","rotate","perspective","filter"],on=["paint","layout","strict","content"];function Ot(t){const e=St(),n=_(t)?B(t):t;return en.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||nn.some(o=>(n.willChange||"").includes(o))||on.some(o=>(n.contain||"").includes(o))}function rn(t){let e=K(t);for(;I(e)&&!Q(e);){if(Ot(e))return e;if(ht(e))return null;e=K(e)}return null}function St(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const sn=new Set(["html","body","#document"]);function Q(t){return sn.has(et(t))}function B(t){return W(t).getComputedStyle(t)}function gt(t){return _(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(et(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Yt(t)&&t.host||Y(t);return Yt(e)?e.host:e}function te(t){const e=K(t);return Q(e)?t.ownerDocument?t.ownerDocument.body:t.body:I(e)&&it(e)?e:te(e)}function rt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=te(t),i=r===((o=t.ownerDocument)==null?void 0:o.body),s=W(r);if(i){const c=At(s);return e.concat(s,s.visualViewport||[],it(r)?r:[],c&&n?rt(c):[])}return e.concat(r,rt(r,[],n))}function At(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){const e=B(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=I(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,c=ft(n)!==i||ft(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function Et(t){return _(t)?t:t.contextElement}function J(t){const e=Et(t);if(!I(e))return z(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=ee(e);let s=(i?ft(n.width):n.width)/o,c=(i?ft(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const cn=z(0);function ne(t){const e=W(t);return!St()||!e.visualViewport?cn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ln(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==W(t)?!1:e}function G(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=Et(t);let s=z(1);e&&(o?_(o)&&(s=J(o)):s=J(t));const c=ln(i,n,o)?ne(i):z(0);let l=(r.left+c.x)/s.x,a=(r.top+c.y)/s.y,f=r.width/s.x,u=r.height/s.y;if(i){const p=W(i),d=o&&_(o)?W(o):o;let m=p,h=At(m);for(;h&&o&&d!==m;){const w=J(h),g=h.getBoundingClientRect(),x=B(h),A=g.left+(h.clientLeft+parseFloat(x.paddingLeft))*w.x,y=g.top+(h.clientTop+parseFloat(x.paddingTop))*w.y;l*=w.x,a*=w.y,f*=w.x,u*=w.y,l+=A,a+=y,m=W(h),h=At(m)}}return dt({width:f,height:u,x:l,y:a})}function Dt(t,e){const n=gt(t).scrollLeft;return e?e.left+n:G(Y(t)).left+n}function oe(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),r=o.left+e.scrollLeft-(n?0:Dt(t,o)),i=o.top+e.scrollTop;return{x:r,y:i}}function an(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i=r==="fixed",s=Y(o),c=e?ht(e.floating):!1;if(o===s||c&&i)return n;let l={scrollLeft:0,scrollTop:0},a=z(1);const f=z(0),u=I(o);if((u||!u&&!i)&&((et(o)!=="body"||it(s))&&(l=gt(o)),I(o))){const d=G(o);a=J(o),f.x=d.x+o.clientLeft,f.y=d.y+o.clientTop}const p=s&&!u&&!i?oe(s,l,!0):z(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+f.x+p.x,y:n.y*a.y-l.scrollTop*a.y+f.y+p.y}}function fn(t){return Array.from(t.getClientRects())}function un(t){const e=Y(t),n=gt(t),o=t.ownerDocument.body,r=H(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=H(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Dt(t);const c=-n.scrollTop;return B(o).direction==="rtl"&&(s+=H(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:c}}function dn(t,e){const n=W(t),o=Y(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,c=0,l=0;if(r){i=r.width,s=r.height;const a=St();(!a||a&&e==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:c,y:l}}const mn=new Set(["absolute","fixed"]);function pn(t,e){const n=G(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=I(t)?J(t):z(1),s=t.clientWidth*i.x,c=t.clientHeight*i.y,l=r*i.x,a=o*i.y;return{width:s,height:c,x:l,y:a}}function Xt(t,e,n){let o;if(e==="viewport")o=dn(t,n);else if(e==="document")o=un(Y(t));else if(_(e))o=pn(e,n);else{const r=ne(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return dt(o)}function re(t,e){const n=K(t);return n===e||!_(n)||Q(n)?!1:B(n).position==="fixed"||re(n,e)}function hn(t,e){const n=e.get(t);if(n)return n;let o=rt(t,[],!1).filter(c=>_(c)&&et(c)!=="body"),r=null;const i=B(t).position==="fixed";let s=i?K(t):t;for(;_(s)&&!Q(s);){const c=B(s),l=Ot(s);!l&&c.position==="fixed"&&(r=null),(i?!l&&!r:!l&&c.position==="static"&&!!r&&mn.has(r.position)||it(s)&&!l&&re(t,s))?o=o.filter(f=>f!==s):r=c,s=K(s)}return e.set(t,o),o}function gn(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const s=[...n==="clippingAncestors"?ht(e)?[]:hn(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,f)=>{const u=Xt(e,f,r);return a.top=H(u.top,a.top),a.right=Z(u.right,a.right),a.bottom=Z(u.bottom,a.bottom),a.left=H(u.left,a.left),a},Xt(e,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function wn(t){const{width:e,height:n}=ee(t);return{width:e,height:n}}function xn(t,e,n){const o=I(e),r=Y(e),i=n==="fixed",s=G(t,!0,i,e);let c={scrollLeft:0,scrollTop:0};const l=z(0);function a(){l.x=Dt(r)}if(o||!o&&!i)if((et(e)!=="body"||it(r))&&(c=gt(e)),o){const d=G(e,!0,i,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else r&&a();i&&!o&&r&&a();const f=r&&!o&&!i?oe(r,c):z(0),u=s.left+c.scrollLeft-l.x-f.x,p=s.top+c.scrollTop-l.y-f.y;return{x:u,y:p,width:s.width,height:s.height}}function wt(t){return B(t).position==="static"}function qt(t,e){if(!I(t)||B(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Y(t)===n&&(n=n.ownerDocument.body),n}function ie(t,e){const n=W(t);if(ht(t))return n;if(!I(t)){let r=K(t);for(;r&&!Q(r);){if(_(r)&&!wt(r))return r;r=K(r)}return n}let o=qt(t,e);for(;o&&Qe(o)&&wt(o);)o=qt(o,e);return o&&Q(o)&&wt(o)&&!Ot(o)?n:o||rn(t)||n}const yn=async function(t){const e=this.getOffsetParent||ie,n=this.getDimensions,o=await n(t.floating);return{reference:xn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function vn(t){return B(t).direction==="rtl"}const An={convertOffsetParentRelativeRectToViewportRelativeRect:an,getDocumentElement:Y,getClippingRect:gn,getOffsetParent:ie,getElementRects:yn,getClientRects:fn,getDimensions:wn,getScale:J,isElement:_,isRTL:vn};function se(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function bn(t,e){let n=null,o;const r=Y(t);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),i();const a=t.getBoundingClientRect(),{left:f,top:u,width:p,height:d}=a;if(c||e(),!p||!d)return;const m=lt(u),h=lt(r.clientWidth-(f+p)),w=lt(r.clientHeight-(u+d)),g=lt(f),A={rootMargin:-m+"px "+-h+"px "+-w+"px "+-g+"px",threshold:H(0,Z(1,l))||1};let y=!0;function v(R){const C=R[0].intersectionRatio;if(C!==l){if(!y)return s();C?s(!1,C):o=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!se(a,t.getBoundingClientRect())&&s(),y=!1}try{n=new IntersectionObserver(v,{...A,root:r.ownerDocument})}catch{n=new IntersectionObserver(v,A)}n.observe(t)}return s(!0),i}function Rn(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Et(t),f=r||i?[...a?rt(a):[],...rt(e)]:[];f.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const u=a&&c?bn(a,n):null;let p=-1,d=null;s&&(d=new ResizeObserver(g=>{let[x]=g;x&&x.target===a&&d&&(d.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var A;(A=d)==null||A.observe(e)})),n()}),a&&!l&&d.observe(a),d.observe(e));let m,h=l?G(t):null;l&&w();function w(){const g=G(t);h&&!se(h,g)&&n(),h=g,m=requestAnimationFrame(w)}return n(),()=>{var g;f.forEach(x=>{r&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),u==null||u(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(m)}}const Pn=qe,Cn=Ue,On=Ie,Sn=Ke,En=Ye,Ut=ze,Dn=Ze,Ln=(t,e,n)=>{const o=new Map,r={platform:An,...n},i={...r.platform,_c:o};return je(t,e,{...r,platform:i})};var Tn=typeof document<"u",Mn=function(){},at=Tn?P.useLayoutEffect:Mn;function mt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!mt(t[o],e[o]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&t.$$typeof)&&!mt(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function ce(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Zt(t,e){const n=ce(t);return Math.round(e*n)/n}function xt(t){const e=P.useRef(t);return at(()=>{e.current=t}),e}function $n(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:l,open:a}=t,[f,u]=P.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[p,d]=P.useState(o);mt(p,o)||d(o);const[m,h]=P.useState(null),[w,g]=P.useState(null),x=P.useCallback(b=>{b!==R.current&&(R.current=b,h(b))},[]),A=P.useCallback(b=>{b!==C.current&&(C.current=b,g(b))},[]),y=i||m,v=s||w,R=P.useRef(null),C=P.useRef(null),T=P.useRef(f),N=l!=null,L=xt(l),$=xt(r),k=xt(a),S=P.useCallback(()=>{if(!R.current||!C.current)return;const b={placement:e,strategy:n,middleware:p};$.current&&(b.platform=$.current),Ln(R.current,C.current,b).then(M=>{const V={...M,isPositioned:k.current!==!1};O.current&&!mt(T.current,V)&&(T.current=V,Se.flushSync(()=>{u(V)}))})},[p,e,n,$,k]);at(()=>{a===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(b=>({...b,isPositioned:!1})))},[a]);const O=P.useRef(!1);at(()=>(O.current=!0,()=>{O.current=!1}),[]),at(()=>{if(y&&(R.current=y),v&&(C.current=v),y&&v){if(L.current)return L.current(y,v,S);S()}},[y,v,S,L,N]);const F=P.useMemo(()=>({reference:R,floating:C,setReference:x,setFloating:A}),[x,A]),E=P.useMemo(()=>({reference:y,floating:v}),[y,v]),D=P.useMemo(()=>{const b={position:n,left:0,top:0};if(!E.floating)return b;const M=Zt(E.floating,f.x),V=Zt(E.floating,f.y);return c?{...b,transform:"translate("+M+"px, "+V+"px)",...ce(E.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:V}},[n,c,E.floating,f.x,f.y]);return P.useMemo(()=>({...f,update:S,refs:F,elements:E,floatingStyles:D}),[f,S,F,E,D])}const kn=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:r}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?Ut({element:o.current,padding:r}).fn(n):{}:o?Ut({element:o,padding:r}).fn(n):{}}}},Nn=(t,e)=>({...Pn(t),options:[t,e]}),Fn=(t,e)=>({...Cn(t),options:[t,e]}),Hn=(t,e)=>({...Dn(t),options:[t,e]}),Wn=(t,e)=>({...On(t),options:[t,e]}),_n=(t,e)=>({...Sn(t),options:[t,e]}),Bn=(t,e)=>({...En(t),options:[t,e]}),Vn=(t,e)=>({...kn(t),options:[t,e]});var jn="Arrow",le=P.forwardRef((t,e)=>{const{children:n,width:o=10,height:r=5,...i}=t;return X.jsx(bt.svg,{...i,ref:e,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:X.jsx("polygon",{points:"0,0 30,0 15,10"})})});le.displayName=jn;var zn=le,Lt="Popper",[ae,io]=Ee(Lt),[In,fe]=ae(Lt),ue=t=>{const{__scopePopper:e,children:n}=t,[o,r]=P.useState(null);return X.jsx(In,{scope:e,anchor:o,onAnchorChange:r,children:n})};ue.displayName=Lt;var de="PopperAnchor",me=P.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:o,...r}=t,i=fe(de,n),s=P.useRef(null),c=Kt(e,s),l=P.useRef(null);return P.useEffect(()=>{const a=l.current;l.current=(o==null?void 0:o.current)||s.current,a!==l.current&&i.onAnchorChange(l.current)}),o?null:X.jsx(bt.div,{...r,ref:c})});me.displayName=de;var Tt="PopperContent",[Yn,Xn]=ae(Tt),pe=P.forwardRef((t,e)=>{var Mt,$t,kt,Nt,Ft,Ht;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:a=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:p=!1,updatePositionStrategy:d="optimized",onPlaced:m,...h}=t,w=fe(Tt,n),[g,x]=P.useState(null),A=Kt(e,nt=>x(nt)),[y,v]=P.useState(null),R=Le(y),C=(R==null?void 0:R.width)??0,T=(R==null?void 0:R.height)??0,N=o+(i!=="center"?"-"+i:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},$=Array.isArray(a)?a:[a],k=$.length>0,S={padding:L,boundary:$.filter(Un),altBoundary:k},{refs:O,floatingStyles:F,placement:E,isPositioned:D,middlewareData:b}=$n({strategy:"fixed",placement:N,whileElementsMounted:(...nt)=>Rn(...nt,{animationFrame:d==="always"}),elements:{reference:w.anchor},middleware:[Nn({mainAxis:r+T,alignmentAxis:s}),l&&Fn({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Hn():void 0,...S}),l&&Wn({...S}),_n({...S,apply:({elements:nt,rects:Wt,availableWidth:Re,availableHeight:Pe})=>{const{width:Ce,height:Oe}=Wt.reference,ct=nt.floating.style;ct.setProperty("--radix-popper-available-width",`${Re}px`),ct.setProperty("--radix-popper-available-height",`${Pe}px`),ct.setProperty("--radix-popper-anchor-width",`${Ce}px`),ct.setProperty("--radix-popper-anchor-height",`${Oe}px`)}}),y&&Vn({element:y,padding:c}),Zn({arrowWidth:C,arrowHeight:T}),p&&Bn({strategy:"referenceHidden",...S})]}),[M,V]=we(E),st=De(m);_t(()=>{D&&(st==null||st())},[D,st]);const xe=(Mt=b.arrow)==null?void 0:Mt.x,ye=($t=b.arrow)==null?void 0:$t.y,ve=((kt=b.arrow)==null?void 0:kt.centerOffset)!==0,[Ae,be]=P.useState();return _t(()=>{g&&be(window.getComputedStyle(g).zIndex)},[g]),X.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:D?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ae,"--radix-popper-transform-origin":[(Nt=b.transformOrigin)==null?void 0:Nt.x,(Ft=b.transformOrigin)==null?void 0:Ft.y].join(" "),...((Ht=b.hide)==null?void 0:Ht.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:X.jsx(Yn,{scope:n,placedSide:M,onArrowChange:v,arrowX:xe,arrowY:ye,shouldHideArrow:ve,children:X.jsx(bt.div,{"data-side":M,"data-align":V,...h,ref:A,style:{...h.style,animation:D?void 0:"none"}})})})});pe.displayName=Tt;var he="PopperArrow",qn={top:"bottom",right:"left",bottom:"top",left:"right"},ge=P.forwardRef(function(e,n){const{__scopePopper:o,...r}=e,i=Xn(he,o),s=qn[i.placedSide];return X.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:X.jsx(zn,{...r,ref:n,style:{...r.style,display:"block"}})})});ge.displayName=he;function Un(t){return t!==null}var Zn=t=>({name:"transformOrigin",options:t,fn(e){var w,g,x;const{placement:n,rects:o,middlewareData:r}=e,s=((w=r.arrow)==null?void 0:w.centerOffset)!==0,c=s?0:t.arrowWidth,l=s?0:t.arrowHeight,[a,f]=we(n),u={start:"0%",center:"50%",end:"100%"}[f],p=(((g=r.arrow)==null?void 0:g.x)??0)+c/2,d=(((x=r.arrow)==null?void 0:x.y)??0)+l/2;let m="",h="";return a==="bottom"?(m=s?u:`${p}px`,h=`${-l}px`):a==="top"?(m=s?u:`${p}px`,h=`${o.floating.height+l}px`):a==="right"?(m=`${-l}px`,h=s?u:`${d}px`):a==="left"&&(m=`${o.floating.width+l}px`,h=s?u:`${d}px`),{data:{x:m,y:h}}}});function we(t){const[e,n="center"]=t.split("-");return[e,n]}var so=ue,co=me,lo=pe,ao=ge;export{co as A,lo as C,so as R,ao as a,io as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as r}from"./iframe-
|
|
1
|
+
import{R as r}from"./iframe-BWjPIle6.js";import{c as y}from"./index-Pk2lGsul.js";import{u as S,b as M}from"./index-BcAKBHrX.js";import{j as d}from"./jsx-runtime-D_zvdyIk.js";function h(s){const m=s+"CollectionProvider",[A,E]=y(m),[N,a]=A(m,{collectionRef:{current:null},itemMap:new Map}),p=c=>{const{scope:e,children:l}=c,o=r.useRef(null),t=r.useRef(new Map).current;return d.jsx(N,{scope:e,itemMap:t,collectionRef:o,children:l})};p.displayName=m;const f=s+"CollectionSlot",T=M(f),C=r.forwardRef((c,e)=>{const{scope:l,children:o}=c,t=a(f,l),n=S(e,t.collectionRef);return d.jsx(T,{ref:n,children:o})});C.displayName=f;const u=s+"CollectionItemSlot",R="data-radix-collection-item",O=M(u),x=r.forwardRef((c,e)=>{const{scope:l,children:o,...t}=c,n=r.useRef(null),I=S(e,n),i=a(u,l);return r.useEffect(()=>(i.itemMap.set(n,{ref:n,...t}),()=>void i.itemMap.delete(n))),d.jsx(O,{[R]:"",ref:I,children:o})});x.displayName=u;function _(c){const e=a(s+"CollectionConsumer",c);return r.useCallback(()=>{const o=e.collectionRef.current;if(!o)return[];const t=Array.from(o.querySelectorAll(`[${R}]`));return Array.from(e.itemMap.values()).sort((i,v)=>t.indexOf(i.ref.current)-t.indexOf(v.ref.current))},[e.collectionRef,e.itemMap])}return[{Provider:p,Slot:C,ItemSlot:x},_,E]}export{h as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a}from"./iframe-
|
|
1
|
+
import{r as a}from"./iframe-BWjPIle6.js";import{u as E}from"./index-BcAKBHrX.js";import{u as A}from"./index-DWC9SV-P.js";function T(n,e){return a.useReducer((r,t)=>e[r][t]??r,n)}var P=n=>{const{present:e,children:r}=n,t=R(e),i=typeof r=="function"?r({present:t.isPresent}):a.Children.only(r),c=E(t.ref,v(i));return typeof r=="function"||t.isPresent?a.cloneElement(i,{ref:c}):null};P.displayName="Presence";function R(n){const[e,r]=a.useState(),t=a.useRef(null),i=a.useRef(n),c=a.useRef("none"),p=n?"mounted":"unmounted",[N,s]=T(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const o=l(t.current);c.current=N==="mounted"?o:"none"},[N]),A(()=>{const o=t.current,m=i.current;if(m!==n){const f=c.current,u=l(o);n?s("MOUNT"):u==="none"||(o==null?void 0:o.display)==="none"?s("UNMOUNT"):s(m&&f!==u?"ANIMATION_OUT":"UNMOUNT"),i.current=n}},[n,s]),A(()=>{if(e){let o;const m=e.ownerDocument.defaultView??window,d=u=>{const g=l(t.current).includes(CSS.escape(u.animationName));if(u.target===e&&g&&(s("ANIMATION_END"),!i.current)){const O=e.style.animationFillMode;e.style.animationFillMode="forwards",o=m.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=O)})}},f=u=>{u.target===e&&(c.current=l(t.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{m.clearTimeout(o),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else s("ANIMATION_END")},[e,s]),{isPresent:["mounted","unmountSuspended"].includes(N),ref:a.useCallback(o=>{t.current=o?getComputedStyle(o):null,r(o)},[])}}function l(n){return(n==null?void 0:n.animationName)||"none"}function v(n){var t,i;let e=(t=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:t.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?n.ref:(e=(i=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:i.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?n.props.ref:n.props.ref||n.ref)}export{P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o}from"./iframe-
|
|
1
|
+
import{r as o}from"./iframe-BWjPIle6.js";import{R as p}from"./index-C5eJ31Z3.js";import{P as c}from"./index-04C4iZwC.js";import{u as f}from"./index-DWC9SV-P.js";import{j as u}from"./jsx-runtime-D_zvdyIk.js";var l="Portal",P=o.forwardRef((a,e)=>{var t;const{container:s,...i}=a,[m,n]=o.useState(!1);f(()=>n(!0),[]);const r=s||m&&((t=globalThis==null?void 0:globalThis.document)==null?void 0:t.body);return r?p.createPortal(u.jsx(c.div,{...i,ref:e}),r):null});P.displayName=l;export{P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./iframe-
|
|
1
|
+
import{r as s}from"./iframe-BWjPIle6.js";import{c as p}from"./index-DW48STyt.js";import{c as H}from"./index-C9xvlw_B.js";import{u as V}from"./index-BcAKBHrX.js";import{c as z}from"./index-Pk2lGsul.js";import{u as q}from"./index-BN5_W3Yi.js";import{P as G}from"./index-04C4iZwC.js";import{u as J}from"./index-DschQYGl.js";import{u as Q}from"./index-7XoYQV2z.js";import{u as W}from"./index-Dr2xmx-F.js";import{j as d}from"./jsx-runtime-D_zvdyIk.js";var _="rovingFocusGroup.onEntryFocus",X={bubbles:!1,cancelable:!0},I="RovingFocusGroup",[y,N,Z]=H(I),[$,ge]=z(I,[Z]),[ee,oe]=$(I),O=s.forwardRef((e,r)=>d.jsx(y.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(y.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(te,{...e,ref:r})})}));O.displayName=I;var te=s.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:c,orientation:o,loop:T=!1,dir:w,currentTabStopId:v,defaultCurrentTabStopId:C,onCurrentTabStopIdChange:S,onEntryFocus:m,preventScrollOnEntryFocus:a=!1,...b}=e,F=s.useRef(null),g=V(r,F),R=W(w),[E,t]=Q({prop:v,defaultProp:C??null,onChange:S,caller:I}),[i,x]=s.useState(!1),u=J(m),l=N(c),h=s.useRef(!1),[k,P]=s.useState(0);return s.useEffect(()=>{const n=F.current;if(n)return n.addEventListener(_,u),()=>n.removeEventListener(_,u)},[u]),d.jsx(ee,{scope:c,orientation:o,dir:R,loop:T,currentTabStopId:E,onItemFocus:s.useCallback(n=>t(n),[t]),onItemShiftTab:s.useCallback(()=>x(!0),[]),onFocusableItemAdd:s.useCallback(()=>P(n=>n+1),[]),onFocusableItemRemove:s.useCallback(()=>P(n=>n-1),[]),children:d.jsx(G.div,{tabIndex:i||k===0?-1:0,"data-orientation":o,...b,ref:g,style:{outline:"none",...e.style},onMouseDown:p(e.onMouseDown,()=>{h.current=!0}),onFocus:p(e.onFocus,n=>{const L=!h.current;if(n.target===n.currentTarget&&L&&!i){const D=new CustomEvent(_,X);if(n.currentTarget.dispatchEvent(D),!D.defaultPrevented){const A=l().filter(f=>f.focusable),U=A.find(f=>f.active),B=A.find(f=>f.id===E),Y=[U,B,...A].filter(Boolean).map(f=>f.ref.current);M(Y,a)}}h.current=!1}),onBlur:p(e.onBlur,()=>x(!1))})})}),K="RovingFocusGroupItem",j=s.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:c,focusable:o=!0,active:T=!1,tabStopId:w,children:v,...C}=e,S=q(),m=w||S,a=oe(K,c),b=a.currentTabStopId===m,F=N(c),{onFocusableItemAdd:g,onFocusableItemRemove:R,currentTabStopId:E}=a;return s.useEffect(()=>{if(o)return g(),()=>R()},[o,g,R]),d.jsx(y.ItemSlot,{scope:c,id:m,focusable:o,active:T,children:d.jsx(G.span,{tabIndex:b?0:-1,"data-orientation":a.orientation,...C,ref:r,onMouseDown:p(e.onMouseDown,t=>{o?a.onItemFocus(m):t.preventDefault()}),onFocus:p(e.onFocus,()=>a.onItemFocus(m)),onKeyDown:p(e.onKeyDown,t=>{if(t.key==="Tab"&&t.shiftKey){a.onItemShiftTab();return}if(t.target!==t.currentTarget)return;const i=se(t,a.orientation,a.dir);if(i!==void 0){if(t.metaKey||t.ctrlKey||t.altKey||t.shiftKey)return;t.preventDefault();let u=F().filter(l=>l.focusable).map(l=>l.ref.current);if(i==="last")u.reverse();else if(i==="prev"||i==="next"){i==="prev"&&u.reverse();const l=u.indexOf(t.currentTarget);u=a.loop?ce(u,l+1):u.slice(l+1)}setTimeout(()=>M(u))}}),children:typeof v=="function"?v({isCurrentTabStop:b,hasTabStop:E!=null}):v})})});j.displayName=K;var re={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ne(e,r){return r!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function se(e,r,c){const o=ne(e.key,c);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return re[o]}function M(e,r=!1){const c=document.activeElement;for(const o of e)if(o===c||(o.focus({preventScroll:r}),document.activeElement!==c))return}function ce(e,r){return e.map((c,o)=>e[(r+o)%e.length])}var Re=O,Ee=j;export{Ee as I,Re as R,ge as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r}from"./iframe-G-6sM9Mt.js";import{c as M}from"./index-DW48STyt.js";import{c as $e}from"./index-BDwnENHR.js";import{u as k,a as qe,b as Je}from"./index-1v1lhNFD.js";import{c as Qe}from"./index-DvM9azdj.js";import{u as et}from"./index-ClNNG_ys.js";import{D as tt}from"./index-7yNAGow7.js";import{h as nt,u as ot,R as rt,F as st}from"./Combination-BT_gXe1L.js";import{u as he}from"./index-DhoByIgc.js";import{c as ve,R as Ce,A as ct,C as at,a as ut}from"./index-CayhpKmv.js";import{P as it}from"./index-d_S6mtzU.js";import{P as W}from"./index-Bq6UNRVc.js";import{P as N,d as lt}from"./index-DqWzLCH-.js";import{c as ge,I as dt,R as ft}from"./index-CMmbDm5O.js";import{u as ee}from"./index-lH-AZpAn.js";import{j as u}from"./jsx-runtime-D_zvdyIk.js";var Q=["Enter"," "],mt=["ArrowDown","PageUp","Home"],xe=["ArrowUp","PageDown","End"],pt=[...mt,...xe],ht={ltr:[...Q,"ArrowRight"],rtl:[...Q,"ArrowLeft"]},Mt={ltr:["ArrowLeft"],rtl:["ArrowRight"]},F="Menu",[O,vt,Ct]=$e(F),[I,nn]=Qe(F,[Ct,ve,ge]),L=ve(),_e=ge(),[Re,S]=I(F),[gt,K]=I(F),Pe=e=>{const{__scopeMenu:n,open:t=!1,children:o,dir:a,onOpenChange:c,modal:l=!0}=e,p=L(n),[h,m]=r.useState(null),f=r.useRef(!1),s=ee(c),d=et(a);return r.useEffect(()=>{const C=()=>{f.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>f.current=!1;return document.addEventListener("keydown",C,{capture:!0}),()=>{document.removeEventListener("keydown",C,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),u.jsx(Ce,{...p,children:u.jsx(Re,{scope:n,open:t,onOpenChange:s,content:h,onContentChange:m,children:u.jsx(gt,{scope:n,onClose:r.useCallback(()=>s(!1),[s]),isUsingKeyboardRef:f,dir:d,modal:l,children:o})})})};Pe.displayName=F;var xt="MenuAnchor",te=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e,a=L(t);return u.jsx(ct,{...a,...o,ref:n})});te.displayName=xt;var ne="MenuPortal",[_t,Se]=I(ne,{forceMount:void 0}),Ee=e=>{const{__scopeMenu:n,forceMount:t,children:o,container:a}=e,c=S(ne,n);return u.jsx(_t,{scope:n,forceMount:t,children:u.jsx(W,{present:t||c.open,children:u.jsx(it,{asChild:!0,container:a,children:o})})})};Ee.displayName=ne;var x="MenuContent",[Rt,oe]=I(x),Ie=r.forwardRef((e,n)=>{const t=Se(x,e.__scopeMenu),{forceMount:o=t.forceMount,...a}=e,c=S(x,e.__scopeMenu),l=K(x,e.__scopeMenu);return u.jsx(O.Provider,{scope:e.__scopeMenu,children:u.jsx(W,{present:o||c.open,children:u.jsx(O.Slot,{scope:e.__scopeMenu,children:l.modal?u.jsx(Pt,{...a,ref:n}):u.jsx(St,{...a,ref:n})})})})}),Pt=r.forwardRef((e,n)=>{const t=S(x,e.__scopeMenu),o=r.useRef(null),a=k(n,o);return r.useEffect(()=>{const c=o.current;if(c)return nt(c)},[]),u.jsx(re,{...e,ref:a,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:M(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)})}),St=r.forwardRef((e,n)=>{const t=S(x,e.__scopeMenu);return u.jsx(re,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})}),Et=Je("MenuContent.ScrollLock"),re=r.forwardRef((e,n)=>{const{__scopeMenu:t,loop:o=!1,trapFocus:a,onOpenAutoFocus:c,onCloseAutoFocus:l,disableOutsidePointerEvents:p,onEntryFocus:h,onEscapeKeyDown:m,onPointerDownOutside:f,onFocusOutside:s,onInteractOutside:d,onDismiss:C,disableOutsideScroll:v,...E}=e,w=S(x,t),T=K(x,t),G=L(t),U=_e(t),ie=vt(t),[Ye,le]=r.useState(null),B=r.useRef(null),Xe=k(n,B,w.onContentChange),V=r.useRef(0),Y=r.useRef(""),He=r.useRef(0),Z=r.useRef(null),de=r.useRef("right"),$=r.useRef(0),We=v?rt:r.Fragment,ze=v?{as:Et,allowPinchZoom:!0}:void 0,Ze=i=>{var b,me;const g=Y.current+i,_=ie().filter(R=>!R.disabled),P=document.activeElement,q=(b=_.find(R=>R.ref.current===P))==null?void 0:b.textValue,J=_.map(R=>R.textValue),fe=Ft(J,g,q),A=(me=_.find(R=>R.textValue===fe))==null?void 0:me.ref.current;(function R(pe){Y.current=pe,window.clearTimeout(V.current),pe!==""&&(V.current=window.setTimeout(()=>R(""),1e3))})(g),A&&setTimeout(()=>A.focus())};r.useEffect(()=>()=>window.clearTimeout(V.current),[]),ot();const y=r.useCallback(i=>{var _,P;return de.current===((_=Z.current)==null?void 0:_.side)&&Kt(i,(P=Z.current)==null?void 0:P.area)},[]);return u.jsx(Rt,{scope:t,searchRef:Y,onItemEnter:r.useCallback(i=>{y(i)&&i.preventDefault()},[y]),onItemLeave:r.useCallback(i=>{var g;y(i)||((g=B.current)==null||g.focus(),le(null))},[y]),onTriggerLeave:r.useCallback(i=>{y(i)&&i.preventDefault()},[y]),pointerGraceTimerRef:He,onPointerGraceIntentChange:r.useCallback(i=>{Z.current=i},[]),children:u.jsx(We,{...ze,children:u.jsx(st,{asChild:!0,trapped:a,onMountAutoFocus:M(c,i=>{var g;i.preventDefault(),(g=B.current)==null||g.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:u.jsx(tt,{asChild:!0,disableOutsidePointerEvents:p,onEscapeKeyDown:m,onPointerDownOutside:f,onFocusOutside:s,onInteractOutside:d,onDismiss:C,children:u.jsx(ft,{asChild:!0,...U,dir:T.dir,orientation:"vertical",loop:o,currentTabStopId:Ye,onCurrentTabStopIdChange:le,onEntryFocus:M(h,i=>{T.isUsingKeyboardRef.current||i.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(at,{role:"menu","aria-orientation":"vertical","data-state":Ve(w.open),"data-radix-menu-content":"",dir:T.dir,...G,...E,ref:Xe,style:{outline:"none",...E.style},onKeyDown:M(E.onKeyDown,i=>{const _=i.target.closest("[data-radix-menu-content]")===i.currentTarget,P=i.ctrlKey||i.altKey||i.metaKey,q=i.key.length===1;_&&(i.key==="Tab"&&i.preventDefault(),!P&&q&&Ze(i.key));const J=B.current;if(i.target!==J||!pt.includes(i.key))return;i.preventDefault();const A=ie().filter(b=>!b.disabled).map(b=>b.ref.current);xe.includes(i.key)&&A.reverse(),kt(A)}),onBlur:M(e.onBlur,i=>{i.currentTarget.contains(i.target)||(window.clearTimeout(V.current),Y.current="")}),onPointerMove:M(e.onPointerMove,D(i=>{const g=i.target,_=$.current!==i.clientX;if(i.currentTarget.contains(g)&&_){const P=i.clientX>$.current?"right":"left";de.current=P,$.current=i.clientX}}))})})})})})})});Ie.displayName=x;var It="MenuGroup",se=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return u.jsx(N.div,{role:"group",...o,ref:n})});se.displayName=It;var wt="MenuLabel",we=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return u.jsx(N.div,{...o,ref:n})});we.displayName=wt;var X="MenuItem",Me="menu.itemSelect",z=r.forwardRef((e,n)=>{const{disabled:t=!1,onSelect:o,...a}=e,c=r.useRef(null),l=K(X,e.__scopeMenu),p=oe(X,e.__scopeMenu),h=k(n,c),m=r.useRef(!1),f=()=>{const s=c.current;if(!t&&s){const d=new CustomEvent(Me,{bubbles:!0,cancelable:!0});s.addEventListener(Me,C=>o==null?void 0:o(C),{once:!0}),lt(s,d),d.defaultPrevented?m.current=!1:l.onClose()}};return u.jsx(ye,{...a,ref:h,disabled:t,onClick:M(e.onClick,f),onPointerDown:s=>{var d;(d=e.onPointerDown)==null||d.call(e,s),m.current=!0},onPointerUp:M(e.onPointerUp,s=>{var d;m.current||(d=s.currentTarget)==null||d.click()}),onKeyDown:M(e.onKeyDown,s=>{const d=p.searchRef.current!=="";t||d&&s.key===" "||Q.includes(s.key)&&(s.currentTarget.click(),s.preventDefault())})})});z.displayName=X;var ye=r.forwardRef((e,n)=>{const{__scopeMenu:t,disabled:o=!1,textValue:a,...c}=e,l=oe(X,t),p=_e(t),h=r.useRef(null),m=k(n,h),[f,s]=r.useState(!1),[d,C]=r.useState("");return r.useEffect(()=>{const v=h.current;v&&C((v.textContent??"").trim())},[c.children]),u.jsx(O.ItemSlot,{scope:t,disabled:o,textValue:a??d,children:u.jsx(dt,{asChild:!0,...p,focusable:!o,children:u.jsx(N.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...c,ref:m,onPointerMove:M(e.onPointerMove,D(v=>{o?l.onItemLeave(v):(l.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:M(e.onPointerLeave,D(v=>l.onItemLeave(v))),onFocus:M(e.onFocus,()=>s(!0)),onBlur:M(e.onBlur,()=>s(!1))})})})}),yt="MenuCheckboxItem",be=r.forwardRef((e,n)=>{const{checked:t=!1,onCheckedChange:o,...a}=e;return u.jsx(De,{scope:e.__scopeMenu,checked:t,children:u.jsx(z,{role:"menuitemcheckbox","aria-checked":H(t)?"mixed":t,...a,ref:n,"data-state":ue(t),onSelect:M(a.onSelect,()=>o==null?void 0:o(H(t)?!0:!t),{checkForDefaultPrevented:!1})})})});be.displayName=yt;var Te="MenuRadioGroup",[bt,Tt]=I(Te,{value:void 0,onValueChange:()=>{}}),Ae=r.forwardRef((e,n)=>{const{value:t,onValueChange:o,...a}=e,c=ee(o);return u.jsx(bt,{scope:e.__scopeMenu,value:t,onValueChange:c,children:u.jsx(se,{...a,ref:n})})});Ae.displayName=Te;var je="MenuRadioItem",Oe=r.forwardRef((e,n)=>{const{value:t,...o}=e,a=Tt(je,e.__scopeMenu),c=t===a.value;return u.jsx(De,{scope:e.__scopeMenu,checked:c,children:u.jsx(z,{role:"menuitemradio","aria-checked":c,...o,ref:n,"data-state":ue(c),onSelect:M(o.onSelect,()=>{var l;return(l=a.onValueChange)==null?void 0:l.call(a,t)},{checkForDefaultPrevented:!1})})})});Oe.displayName=je;var ce="MenuItemIndicator",[De,At]=I(ce,{checked:!1}),ke=r.forwardRef((e,n)=>{const{__scopeMenu:t,forceMount:o,...a}=e,c=At(ce,t);return u.jsx(W,{present:o||H(c.checked)||c.checked===!0,children:u.jsx(N.span,{...a,ref:n,"data-state":ue(c.checked)})})});ke.displayName=ce;var jt="MenuSeparator",Ne=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return u.jsx(N.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});Ne.displayName=jt;var Ot="MenuArrow",Fe=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e,a=L(t);return u.jsx(ut,{...a,...o,ref:n})});Fe.displayName=Ot;var ae="MenuSub",[Dt,Le]=I(ae),Ke=e=>{const{__scopeMenu:n,children:t,open:o=!1,onOpenChange:a}=e,c=S(ae,n),l=L(n),[p,h]=r.useState(null),[m,f]=r.useState(null),s=ee(a);return r.useEffect(()=>(c.open===!1&&s(!1),()=>s(!1)),[c.open,s]),u.jsx(Ce,{...l,children:u.jsx(Re,{scope:n,open:o,onOpenChange:s,content:m,onContentChange:f,children:u.jsx(Dt,{scope:n,contentId:he(),triggerId:he(),trigger:p,onTriggerChange:h,children:t})})})};Ke.displayName=ae;var j="MenuSubTrigger",Ge=r.forwardRef((e,n)=>{const t=S(j,e.__scopeMenu),o=K(j,e.__scopeMenu),a=Le(j,e.__scopeMenu),c=oe(j,e.__scopeMenu),l=r.useRef(null),{pointerGraceTimerRef:p,onPointerGraceIntentChange:h}=c,m={__scopeMenu:e.__scopeMenu},f=r.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return r.useEffect(()=>f,[f]),r.useEffect(()=>{const s=p.current;return()=>{window.clearTimeout(s),h(null)}},[p,h]),u.jsx(te,{asChild:!0,...m,children:u.jsx(ye,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":a.contentId,"data-state":Ve(t.open),...e,ref:qe(n,a.onTriggerChange),onClick:s=>{var d;(d=e.onClick)==null||d.call(e,s),!(e.disabled||s.defaultPrevented)&&(s.currentTarget.focus(),t.open||t.onOpenChange(!0))},onPointerMove:M(e.onPointerMove,D(s=>{c.onItemEnter(s),!s.defaultPrevented&&!e.disabled&&!t.open&&!l.current&&(c.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{t.onOpenChange(!0),f()},100))})),onPointerLeave:M(e.onPointerLeave,D(s=>{var C,v;f();const d=(C=t.content)==null?void 0:C.getBoundingClientRect();if(d){const E=(v=t.content)==null?void 0:v.dataset.side,w=E==="right",T=w?-5:5,G=d[w?"left":"right"],U=d[w?"right":"left"];c.onPointerGraceIntentChange({area:[{x:s.clientX+T,y:s.clientY},{x:G,y:d.top},{x:U,y:d.top},{x:U,y:d.bottom},{x:G,y:d.bottom}],side:E}),window.clearTimeout(p.current),p.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(s),s.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:M(e.onKeyDown,s=>{var C;const d=c.searchRef.current!=="";e.disabled||d&&s.key===" "||ht[o.dir].includes(s.key)&&(t.onOpenChange(!0),(C=t.content)==null||C.focus(),s.preventDefault())})})})});Ge.displayName=j;var Ue="MenuSubContent",Be=r.forwardRef((e,n)=>{const t=Se(x,e.__scopeMenu),{forceMount:o=t.forceMount,...a}=e,c=S(x,e.__scopeMenu),l=K(x,e.__scopeMenu),p=Le(Ue,e.__scopeMenu),h=r.useRef(null),m=k(n,h);return u.jsx(O.Provider,{scope:e.__scopeMenu,children:u.jsx(W,{present:o||c.open,children:u.jsx(O.Slot,{scope:e.__scopeMenu,children:u.jsx(re,{id:p.contentId,"aria-labelledby":p.triggerId,...a,ref:m,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var s;l.isUsingKeyboardRef.current&&((s=h.current)==null||s.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:M(e.onFocusOutside,f=>{f.target!==p.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:M(e.onEscapeKeyDown,f=>{l.onClose(),f.preventDefault()}),onKeyDown:M(e.onKeyDown,f=>{var C;const s=f.currentTarget.contains(f.target),d=Mt[l.dir].includes(f.key);s&&d&&(c.onOpenChange(!1),(C=p.trigger)==null||C.focus(),f.preventDefault())})})})})})});Be.displayName=Ue;function Ve(e){return e?"open":"closed"}function H(e){return e==="indeterminate"}function ue(e){return H(e)?"indeterminate":e?"checked":"unchecked"}function kt(e){const n=document.activeElement;for(const t of e)if(t===n||(t.focus(),document.activeElement!==n))return}function Nt(e,n){return e.map((t,o)=>e[(n+o)%e.length])}function Ft(e,n,t){const a=n.length>1&&Array.from(n).every(m=>m===n[0])?n[0]:n,c=t?e.indexOf(t):-1;let l=Nt(e,Math.max(c,0));a.length===1&&(l=l.filter(m=>m!==t));const h=l.find(m=>m.toLowerCase().startsWith(a.toLowerCase()));return h!==t?h:void 0}function Lt(e,n){const{x:t,y:o}=e;let a=!1;for(let c=0,l=n.length-1;c<n.length;l=c++){const p=n[c],h=n[l],m=p.x,f=p.y,s=h.x,d=h.y;f>o!=d>o&&t<(s-m)*(o-f)/(d-f)+m&&(a=!a)}return a}function Kt(e,n){if(!n)return!1;const t={x:e.clientX,y:e.clientY};return Lt(t,n)}function D(e){return n=>n.pointerType==="mouse"?e(n):void 0}var on=Pe,rn=te,sn=Ee,cn=Ie,an=se,un=we,ln=z,dn=be,fn=Ae,mn=Oe,pn=ke,hn=Ne,Mn=Fe,vn=Ke,Cn=Ge,gn=Be;export{rn as A,cn as C,an as G,ln as I,un as L,sn as P,on as R,hn as S,dn as a,pn as b,nn as c,fn as d,mn as e,vn as f,Cn as g,gn as h,Mn as i};
|
|
1
|
+
import{r}from"./iframe-BWjPIle6.js";import{c as M}from"./index-DW48STyt.js";import{c as $e}from"./index-C9xvlw_B.js";import{u as k,a as qe,b as Je}from"./index-BcAKBHrX.js";import{c as Qe}from"./index-Pk2lGsul.js";import{u as et}from"./index-Dr2xmx-F.js";import{D as tt}from"./index-BfKpUbCE.js";import{h as nt,u as ot,R as rt,F as st}from"./Combination-CeVus13L.js";import{u as he}from"./index-BN5_W3Yi.js";import{c as ve,R as Ce,A as ct,C as at,a as ut}from"./index-C6O7WofA.js";import{P as it}from"./index-Cce91yJQ.js";import{P as W}from"./index-CKwUGXmt.js";import{P as N,d as lt}from"./index-04C4iZwC.js";import{c as ge,I as dt,R as ft}from"./index-Cw7p-pms.js";import{u as ee}from"./index-DschQYGl.js";import{j as u}from"./jsx-runtime-D_zvdyIk.js";var Q=["Enter"," "],mt=["ArrowDown","PageUp","Home"],xe=["ArrowUp","PageDown","End"],pt=[...mt,...xe],ht={ltr:[...Q,"ArrowRight"],rtl:[...Q,"ArrowLeft"]},Mt={ltr:["ArrowLeft"],rtl:["ArrowRight"]},F="Menu",[O,vt,Ct]=$e(F),[I,nn]=Qe(F,[Ct,ve,ge]),L=ve(),_e=ge(),[Re,S]=I(F),[gt,K]=I(F),Pe=e=>{const{__scopeMenu:n,open:t=!1,children:o,dir:a,onOpenChange:c,modal:l=!0}=e,p=L(n),[h,m]=r.useState(null),f=r.useRef(!1),s=ee(c),d=et(a);return r.useEffect(()=>{const C=()=>{f.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>f.current=!1;return document.addEventListener("keydown",C,{capture:!0}),()=>{document.removeEventListener("keydown",C,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),u.jsx(Ce,{...p,children:u.jsx(Re,{scope:n,open:t,onOpenChange:s,content:h,onContentChange:m,children:u.jsx(gt,{scope:n,onClose:r.useCallback(()=>s(!1),[s]),isUsingKeyboardRef:f,dir:d,modal:l,children:o})})})};Pe.displayName=F;var xt="MenuAnchor",te=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e,a=L(t);return u.jsx(ct,{...a,...o,ref:n})});te.displayName=xt;var ne="MenuPortal",[_t,Se]=I(ne,{forceMount:void 0}),Ee=e=>{const{__scopeMenu:n,forceMount:t,children:o,container:a}=e,c=S(ne,n);return u.jsx(_t,{scope:n,forceMount:t,children:u.jsx(W,{present:t||c.open,children:u.jsx(it,{asChild:!0,container:a,children:o})})})};Ee.displayName=ne;var x="MenuContent",[Rt,oe]=I(x),Ie=r.forwardRef((e,n)=>{const t=Se(x,e.__scopeMenu),{forceMount:o=t.forceMount,...a}=e,c=S(x,e.__scopeMenu),l=K(x,e.__scopeMenu);return u.jsx(O.Provider,{scope:e.__scopeMenu,children:u.jsx(W,{present:o||c.open,children:u.jsx(O.Slot,{scope:e.__scopeMenu,children:l.modal?u.jsx(Pt,{...a,ref:n}):u.jsx(St,{...a,ref:n})})})})}),Pt=r.forwardRef((e,n)=>{const t=S(x,e.__scopeMenu),o=r.useRef(null),a=k(n,o);return r.useEffect(()=>{const c=o.current;if(c)return nt(c)},[]),u.jsx(re,{...e,ref:a,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:M(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)})}),St=r.forwardRef((e,n)=>{const t=S(x,e.__scopeMenu);return u.jsx(re,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})}),Et=Je("MenuContent.ScrollLock"),re=r.forwardRef((e,n)=>{const{__scopeMenu:t,loop:o=!1,trapFocus:a,onOpenAutoFocus:c,onCloseAutoFocus:l,disableOutsidePointerEvents:p,onEntryFocus:h,onEscapeKeyDown:m,onPointerDownOutside:f,onFocusOutside:s,onInteractOutside:d,onDismiss:C,disableOutsideScroll:v,...E}=e,w=S(x,t),T=K(x,t),G=L(t),U=_e(t),ie=vt(t),[Ye,le]=r.useState(null),B=r.useRef(null),Xe=k(n,B,w.onContentChange),V=r.useRef(0),Y=r.useRef(""),He=r.useRef(0),Z=r.useRef(null),de=r.useRef("right"),$=r.useRef(0),We=v?rt:r.Fragment,ze=v?{as:Et,allowPinchZoom:!0}:void 0,Ze=i=>{var b,me;const g=Y.current+i,_=ie().filter(R=>!R.disabled),P=document.activeElement,q=(b=_.find(R=>R.ref.current===P))==null?void 0:b.textValue,J=_.map(R=>R.textValue),fe=Ft(J,g,q),A=(me=_.find(R=>R.textValue===fe))==null?void 0:me.ref.current;(function R(pe){Y.current=pe,window.clearTimeout(V.current),pe!==""&&(V.current=window.setTimeout(()=>R(""),1e3))})(g),A&&setTimeout(()=>A.focus())};r.useEffect(()=>()=>window.clearTimeout(V.current),[]),ot();const y=r.useCallback(i=>{var _,P;return de.current===((_=Z.current)==null?void 0:_.side)&&Kt(i,(P=Z.current)==null?void 0:P.area)},[]);return u.jsx(Rt,{scope:t,searchRef:Y,onItemEnter:r.useCallback(i=>{y(i)&&i.preventDefault()},[y]),onItemLeave:r.useCallback(i=>{var g;y(i)||((g=B.current)==null||g.focus(),le(null))},[y]),onTriggerLeave:r.useCallback(i=>{y(i)&&i.preventDefault()},[y]),pointerGraceTimerRef:He,onPointerGraceIntentChange:r.useCallback(i=>{Z.current=i},[]),children:u.jsx(We,{...ze,children:u.jsx(st,{asChild:!0,trapped:a,onMountAutoFocus:M(c,i=>{var g;i.preventDefault(),(g=B.current)==null||g.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:u.jsx(tt,{asChild:!0,disableOutsidePointerEvents:p,onEscapeKeyDown:m,onPointerDownOutside:f,onFocusOutside:s,onInteractOutside:d,onDismiss:C,children:u.jsx(ft,{asChild:!0,...U,dir:T.dir,orientation:"vertical",loop:o,currentTabStopId:Ye,onCurrentTabStopIdChange:le,onEntryFocus:M(h,i=>{T.isUsingKeyboardRef.current||i.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(at,{role:"menu","aria-orientation":"vertical","data-state":Ve(w.open),"data-radix-menu-content":"",dir:T.dir,...G,...E,ref:Xe,style:{outline:"none",...E.style},onKeyDown:M(E.onKeyDown,i=>{const _=i.target.closest("[data-radix-menu-content]")===i.currentTarget,P=i.ctrlKey||i.altKey||i.metaKey,q=i.key.length===1;_&&(i.key==="Tab"&&i.preventDefault(),!P&&q&&Ze(i.key));const J=B.current;if(i.target!==J||!pt.includes(i.key))return;i.preventDefault();const A=ie().filter(b=>!b.disabled).map(b=>b.ref.current);xe.includes(i.key)&&A.reverse(),kt(A)}),onBlur:M(e.onBlur,i=>{i.currentTarget.contains(i.target)||(window.clearTimeout(V.current),Y.current="")}),onPointerMove:M(e.onPointerMove,D(i=>{const g=i.target,_=$.current!==i.clientX;if(i.currentTarget.contains(g)&&_){const P=i.clientX>$.current?"right":"left";de.current=P,$.current=i.clientX}}))})})})})})})});Ie.displayName=x;var It="MenuGroup",se=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return u.jsx(N.div,{role:"group",...o,ref:n})});se.displayName=It;var wt="MenuLabel",we=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return u.jsx(N.div,{...o,ref:n})});we.displayName=wt;var X="MenuItem",Me="menu.itemSelect",z=r.forwardRef((e,n)=>{const{disabled:t=!1,onSelect:o,...a}=e,c=r.useRef(null),l=K(X,e.__scopeMenu),p=oe(X,e.__scopeMenu),h=k(n,c),m=r.useRef(!1),f=()=>{const s=c.current;if(!t&&s){const d=new CustomEvent(Me,{bubbles:!0,cancelable:!0});s.addEventListener(Me,C=>o==null?void 0:o(C),{once:!0}),lt(s,d),d.defaultPrevented?m.current=!1:l.onClose()}};return u.jsx(ye,{...a,ref:h,disabled:t,onClick:M(e.onClick,f),onPointerDown:s=>{var d;(d=e.onPointerDown)==null||d.call(e,s),m.current=!0},onPointerUp:M(e.onPointerUp,s=>{var d;m.current||(d=s.currentTarget)==null||d.click()}),onKeyDown:M(e.onKeyDown,s=>{const d=p.searchRef.current!=="";t||d&&s.key===" "||Q.includes(s.key)&&(s.currentTarget.click(),s.preventDefault())})})});z.displayName=X;var ye=r.forwardRef((e,n)=>{const{__scopeMenu:t,disabled:o=!1,textValue:a,...c}=e,l=oe(X,t),p=_e(t),h=r.useRef(null),m=k(n,h),[f,s]=r.useState(!1),[d,C]=r.useState("");return r.useEffect(()=>{const v=h.current;v&&C((v.textContent??"").trim())},[c.children]),u.jsx(O.ItemSlot,{scope:t,disabled:o,textValue:a??d,children:u.jsx(dt,{asChild:!0,...p,focusable:!o,children:u.jsx(N.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...c,ref:m,onPointerMove:M(e.onPointerMove,D(v=>{o?l.onItemLeave(v):(l.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:M(e.onPointerLeave,D(v=>l.onItemLeave(v))),onFocus:M(e.onFocus,()=>s(!0)),onBlur:M(e.onBlur,()=>s(!1))})})})}),yt="MenuCheckboxItem",be=r.forwardRef((e,n)=>{const{checked:t=!1,onCheckedChange:o,...a}=e;return u.jsx(De,{scope:e.__scopeMenu,checked:t,children:u.jsx(z,{role:"menuitemcheckbox","aria-checked":H(t)?"mixed":t,...a,ref:n,"data-state":ue(t),onSelect:M(a.onSelect,()=>o==null?void 0:o(H(t)?!0:!t),{checkForDefaultPrevented:!1})})})});be.displayName=yt;var Te="MenuRadioGroup",[bt,Tt]=I(Te,{value:void 0,onValueChange:()=>{}}),Ae=r.forwardRef((e,n)=>{const{value:t,onValueChange:o,...a}=e,c=ee(o);return u.jsx(bt,{scope:e.__scopeMenu,value:t,onValueChange:c,children:u.jsx(se,{...a,ref:n})})});Ae.displayName=Te;var je="MenuRadioItem",Oe=r.forwardRef((e,n)=>{const{value:t,...o}=e,a=Tt(je,e.__scopeMenu),c=t===a.value;return u.jsx(De,{scope:e.__scopeMenu,checked:c,children:u.jsx(z,{role:"menuitemradio","aria-checked":c,...o,ref:n,"data-state":ue(c),onSelect:M(o.onSelect,()=>{var l;return(l=a.onValueChange)==null?void 0:l.call(a,t)},{checkForDefaultPrevented:!1})})})});Oe.displayName=je;var ce="MenuItemIndicator",[De,At]=I(ce,{checked:!1}),ke=r.forwardRef((e,n)=>{const{__scopeMenu:t,forceMount:o,...a}=e,c=At(ce,t);return u.jsx(W,{present:o||H(c.checked)||c.checked===!0,children:u.jsx(N.span,{...a,ref:n,"data-state":ue(c.checked)})})});ke.displayName=ce;var jt="MenuSeparator",Ne=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return u.jsx(N.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});Ne.displayName=jt;var Ot="MenuArrow",Fe=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e,a=L(t);return u.jsx(ut,{...a,...o,ref:n})});Fe.displayName=Ot;var ae="MenuSub",[Dt,Le]=I(ae),Ke=e=>{const{__scopeMenu:n,children:t,open:o=!1,onOpenChange:a}=e,c=S(ae,n),l=L(n),[p,h]=r.useState(null),[m,f]=r.useState(null),s=ee(a);return r.useEffect(()=>(c.open===!1&&s(!1),()=>s(!1)),[c.open,s]),u.jsx(Ce,{...l,children:u.jsx(Re,{scope:n,open:o,onOpenChange:s,content:m,onContentChange:f,children:u.jsx(Dt,{scope:n,contentId:he(),triggerId:he(),trigger:p,onTriggerChange:h,children:t})})})};Ke.displayName=ae;var j="MenuSubTrigger",Ge=r.forwardRef((e,n)=>{const t=S(j,e.__scopeMenu),o=K(j,e.__scopeMenu),a=Le(j,e.__scopeMenu),c=oe(j,e.__scopeMenu),l=r.useRef(null),{pointerGraceTimerRef:p,onPointerGraceIntentChange:h}=c,m={__scopeMenu:e.__scopeMenu},f=r.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return r.useEffect(()=>f,[f]),r.useEffect(()=>{const s=p.current;return()=>{window.clearTimeout(s),h(null)}},[p,h]),u.jsx(te,{asChild:!0,...m,children:u.jsx(ye,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":a.contentId,"data-state":Ve(t.open),...e,ref:qe(n,a.onTriggerChange),onClick:s=>{var d;(d=e.onClick)==null||d.call(e,s),!(e.disabled||s.defaultPrevented)&&(s.currentTarget.focus(),t.open||t.onOpenChange(!0))},onPointerMove:M(e.onPointerMove,D(s=>{c.onItemEnter(s),!s.defaultPrevented&&!e.disabled&&!t.open&&!l.current&&(c.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{t.onOpenChange(!0),f()},100))})),onPointerLeave:M(e.onPointerLeave,D(s=>{var C,v;f();const d=(C=t.content)==null?void 0:C.getBoundingClientRect();if(d){const E=(v=t.content)==null?void 0:v.dataset.side,w=E==="right",T=w?-5:5,G=d[w?"left":"right"],U=d[w?"right":"left"];c.onPointerGraceIntentChange({area:[{x:s.clientX+T,y:s.clientY},{x:G,y:d.top},{x:U,y:d.top},{x:U,y:d.bottom},{x:G,y:d.bottom}],side:E}),window.clearTimeout(p.current),p.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(s),s.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:M(e.onKeyDown,s=>{var C;const d=c.searchRef.current!=="";e.disabled||d&&s.key===" "||ht[o.dir].includes(s.key)&&(t.onOpenChange(!0),(C=t.content)==null||C.focus(),s.preventDefault())})})})});Ge.displayName=j;var Ue="MenuSubContent",Be=r.forwardRef((e,n)=>{const t=Se(x,e.__scopeMenu),{forceMount:o=t.forceMount,...a}=e,c=S(x,e.__scopeMenu),l=K(x,e.__scopeMenu),p=Le(Ue,e.__scopeMenu),h=r.useRef(null),m=k(n,h);return u.jsx(O.Provider,{scope:e.__scopeMenu,children:u.jsx(W,{present:o||c.open,children:u.jsx(O.Slot,{scope:e.__scopeMenu,children:u.jsx(re,{id:p.contentId,"aria-labelledby":p.triggerId,...a,ref:m,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var s;l.isUsingKeyboardRef.current&&((s=h.current)==null||s.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:M(e.onFocusOutside,f=>{f.target!==p.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:M(e.onEscapeKeyDown,f=>{l.onClose(),f.preventDefault()}),onKeyDown:M(e.onKeyDown,f=>{var C;const s=f.currentTarget.contains(f.target),d=Mt[l.dir].includes(f.key);s&&d&&(c.onOpenChange(!1),(C=p.trigger)==null||C.focus(),f.preventDefault())})})})})})});Be.displayName=Ue;function Ve(e){return e?"open":"closed"}function H(e){return e==="indeterminate"}function ue(e){return H(e)?"indeterminate":e?"checked":"unchecked"}function kt(e){const n=document.activeElement;for(const t of e)if(t===n||(t.focus(),document.activeElement!==n))return}function Nt(e,n){return e.map((t,o)=>e[(n+o)%e.length])}function Ft(e,n,t){const a=n.length>1&&Array.from(n).every(m=>m===n[0])?n[0]:n,c=t?e.indexOf(t):-1;let l=Nt(e,Math.max(c,0));a.length===1&&(l=l.filter(m=>m!==t));const h=l.find(m=>m.toLowerCase().startsWith(a.toLowerCase()));return h!==t?h:void 0}function Lt(e,n){const{x:t,y:o}=e;let a=!1;for(let c=0,l=n.length-1;c<n.length;l=c++){const p=n[c],h=n[l],m=p.x,f=p.y,s=h.x,d=h.y;f>o!=d>o&&t<(s-m)*(o-f)/(d-f)+m&&(a=!a)}return a}function Kt(e,n){if(!n)return!1;const t={x:e.clientX,y:e.clientY};return Lt(t,n)}function D(e){return n=>n.pointerType==="mouse"?e(n):void 0}var on=Pe,rn=te,sn=Ee,cn=Ie,an=se,un=we,ln=z,dn=be,fn=Ae,mn=Oe,pn=ke,hn=Ne,Mn=Fe,vn=Ke,Cn=Ge,gn=Be;export{rn as A,cn as C,an as G,ln as I,un as L,sn as P,on as R,hn as S,dn as a,pn as b,nn as c,fn as d,mn as e,vn as f,Cn as g,gn as h,Mn as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h}from"./iframe-
|
|
1
|
+
import{r as h}from"./iframe-BWjPIle6.js";import{u as z}from"./index-DWC9SV-P.js";function c(r){const[d,e]=h.useState(void 0);return z(()=>{if(r){e({width:r.offsetWidth,height:r.offsetHeight});const f=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const b=i[0];let o,t;if("borderBoxSize"in b){const s=b.borderBoxSize,u=Array.isArray(s)?s[0]:s;o=u.inlineSize,t=u.blockSize}else o=r.offsetWidth,t=r.offsetHeight;e({width:o,height:t})});return f.observe(r,{box:"border-box"}),()=>f.unobserve(r)}else e(void 0)},[r]),d}export{c as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t}from"./iframe-BWjPIle6.js";var a=globalThis!=null&&globalThis.document?t.useLayoutEffect:()=>{};export{a as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u}from"./iframe-
|
|
1
|
+
import{r as u}from"./iframe-BWjPIle6.js";function o(r){const e=u.useRef({value:r,previous:r});return u.useMemo(()=>(e.current.value!==r&&(e.current.previous=e.current.value,e.current.value=r),e.current.previous),[r])}export{o as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t}from"./iframe-
|
|
1
|
+
import{r as t}from"./iframe-BWjPIle6.js";import"./jsx-runtime-D_zvdyIk.js";var e=t.createContext(void 0);function a(r){const o=t.useContext(e);return r||o||"ltr"}export{a as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r}from"./iframe-
|
|
1
|
+
import{r}from"./iframe-BWjPIle6.js";function n(t){const e=r.useRef(t);return r.useEffect(()=>{e.current=t}),r.useMemo(()=>(...s)=>{var u;return(u=e.current)==null?void 0:u.call(e,...s)},[])}export{n as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u}from"./iframe-
|
|
1
|
+
import{r as u}from"./iframe-BWjPIle6.js";import{j as h}from"./jsx-runtime-D_zvdyIk.js";function w(e,s){const r=u.createContext(s),a=o=>{const{children:t,...n}=o,c=u.useMemo(()=>n,Object.values(n));return h.jsx(r.Provider,{value:c,children:t})};a.displayName=e+"Provider";function i(o){const t=u.useContext(r);if(t)return t;if(s!==void 0)return s;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[a,i]}function _(e,s=[]){let r=[];function a(o,t){const n=u.createContext(t),c=r.length;r=[...r,t];const d=p=>{var S;const{scope:x,children:f,...m}=p,v=((S=x==null?void 0:x[e])==null?void 0:S[c])||n,P=u.useMemo(()=>m,Object.values(m));return h.jsx(v.Provider,{value:P,children:f})};d.displayName=o+"Provider";function C(p,x){var v;const f=((v=x==null?void 0:x[e])==null?void 0:v[c])||n,m=u.useContext(f);if(m)return m;if(t!==void 0)return t;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[d,C]}const i=()=>{const o=r.map(t=>u.createContext(t));return function(n){const c=(n==null?void 0:n[e])||o;return u.useMemo(()=>({[`__scope${e}`]:{...n,[e]:c}}),[n,c])}};return i.scopeName=e,[a,l(i,...s)]}function l(...e){const s=e[0];if(e.length===1)return s;const r=()=>{const a=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const t=a.reduce((n,{useScope:c,scopeName:d})=>{const p=c(o)[`__scope${d}`];return{...n,...p}},{});return u.useMemo(()=>({[`__scope${s.scopeName}`]:t}),[t])}};return r.scopeName=s.scopeName,r}export{w as a,_ as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i}from"./iframe-
|
|
1
|
+
import{r as i}from"./iframe-BWjPIle6.js";import{P as o}from"./index-04C4iZwC.js";import{j as t}from"./jsx-runtime-D_zvdyIk.js";var s=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),d="VisuallyHidden",e=i.forwardRef((r,a)=>t.jsx(o.span,{...r,ref:a,style:{...s,...r.style}}));e.displayName=d;var n=e;export{n as R,s as V};
|