@arcadeai/design-system 3.39.0 → 3.39.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CompositeItem-CniPsjzP.js +30 -0
- package/dist/CompositeList-yq5K_yj6.js +81 -0
- package/dist/CompositeRoot-Dy-5A-Je.js +206 -0
- package/dist/DialogRoot-DDokfJcO.js +57 -0
- package/dist/DialogTrigger-CFUE8YsM.js +402 -0
- package/dist/DirectionContext-BSOheMwC.js +10 -0
- package/dist/FieldItemContext-CF2fRwBC.js +12 -0
- package/dist/FloatingPortalLite-BHsRx4XN.js +29 -0
- package/dist/InternalBackdrop-BVEfe6O1.js +610 -0
- package/dist/LabelableContext-Dzw1DWuj.js +171 -0
- package/dist/Separator-CswSYAXX.js +25 -0
- package/dist/ToolbarRootContext-D7EsmJ5f.js +10 -0
- package/dist/andromeeda-B-gfN00q.js +4 -0
- package/dist/angular-html-dA1qUKRV.js +32 -0
- package/dist/angular-ts-CXyBC0vY.js +21 -0
- package/dist/apl-CjNiDgad.js +3 -3
- package/dist/assets/icons/telegram.js +10 -0
- package/dist/assets/images/arcade-grid.d.ts.map +1 -1
- package/dist/assets/images/arcade-grid.js +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/assets/tokens.css +1 -1
- package/dist/assets/variables.css +1 -1
- package/dist/astro--3ZkKqYU.js +18 -0
- package/dist/astro-CFFExE8Q.js +5 -5
- package/dist/aurora-x-B56eICma.js +4 -0
- package/dist/ayu-dark-DJSOaKig.js +4 -0
- package/dist/ayu-light-BPfFt4v-.js +4 -0
- package/dist/ayu-mirage-DmPLRBj7.js +4 -0
- package/dist/blade-BoRuQEEj.js +20 -0
- package/dist/blade-D0HyNvCw.js +4 -4
- package/dist/c-C4SM8H98.js +6 -0
- package/dist/cairo-DM6WF2e3.js +1 -1
- package/dist/{calendar-DreAgQKY.js → calendar-CLEnvrbp.js} +483 -482
- package/dist/catppuccin-frappe-CA5k7W3u.js +4 -0
- package/dist/catppuccin-latte-CYfkUW5v.js +4 -0
- package/dist/catppuccin-macchiato-BOj_4I3g.js +4 -0
- package/dist/catppuccin-mocha-BXpUXme4.js +4 -0
- package/dist/clamp-BxE4ZAuA.js +17 -0
- package/dist/cobol-HihOMwht.js +1 -1
- package/dist/coffee-D8Swy5yR.js +8 -0
- package/dist/components/index.js +665 -644
- package/dist/components/ui/atoms/accordion.d.ts +9 -7
- package/dist/components/ui/atoms/accordion.d.ts.map +1 -1
- package/dist/components/ui/atoms/accordion.js +454 -243
- package/dist/components/ui/atoms/alert-dialog.d.ts +13 -9
- package/dist/components/ui/atoms/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/atoms/alert-dialog.js +149 -183
- package/dist/components/ui/atoms/alert.d.ts +2 -1
- package/dist/components/ui/atoms/alert.d.ts.map +1 -1
- package/dist/components/ui/atoms/alert.js +36 -25
- package/dist/components/ui/atoms/avatar.d.ts +10 -5
- package/dist/components/ui/atoms/avatar.d.ts.map +1 -1
- package/dist/components/ui/atoms/avatar.js +198 -205
- package/dist/components/ui/atoms/badge.d.ts +4 -5
- package/dist/components/ui/atoms/badge.d.ts.map +1 -1
- package/dist/components/ui/atoms/badge.js +31 -22
- package/dist/components/ui/atoms/breadcrumb.d.ts +4 -5
- package/dist/components/ui/atoms/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/atoms/breadcrumb.js +46 -29
- package/dist/components/ui/atoms/button.d.ts +4 -6
- package/dist/components/ui/atoms/button.d.ts.map +1 -1
- package/dist/components/ui/atoms/button.js +59 -28
- package/dist/components/ui/atoms/byoc-badge.d.ts +2 -2
- package/dist/components/ui/atoms/byoc-badge.d.ts.map +1 -1
- package/dist/components/ui/atoms/byoc-badge.js +14 -8
- package/dist/components/ui/atoms/calendar.d.ts +6 -16
- package/dist/components/ui/atoms/calendar.d.ts.map +1 -1
- package/dist/components/ui/atoms/calendar.js +1 -1
- package/dist/components/ui/atoms/card.d.ts +4 -2
- package/dist/components/ui/atoms/card.d.ts.map +1 -1
- package/dist/components/ui/atoms/card.js +46 -35
- package/dist/components/ui/atoms/chart.d.ts +24 -48
- package/dist/components/ui/atoms/chart.d.ts.map +1 -1
- package/dist/components/ui/atoms/chart.js +179 -148
- package/dist/components/ui/atoms/checkbox.d.ts +2 -3
- package/dist/components/ui/atoms/checkbox.d.ts.map +1 -1
- package/dist/components/ui/atoms/checkbox.js +269 -249
- package/dist/components/ui/atoms/code-block.js +1 -1
- package/dist/components/ui/atoms/collapsible.d.ts +5 -5
- package/dist/components/ui/atoms/collapsible.d.ts.map +1 -1
- package/dist/components/ui/atoms/collapsible.js +208 -23
- package/dist/components/ui/atoms/command.d.ts +4 -3
- package/dist/components/ui/atoms/command.d.ts.map +1 -1
- package/dist/components/ui/atoms/command.js +1655 -348
- package/dist/components/ui/atoms/dialog.d.ts +12 -10
- package/dist/components/ui/atoms/dialog.d.ts.map +1 -1
- package/dist/components/ui/atoms/dialog.js +91 -80
- package/dist/components/ui/atoms/dropdown-menu.d.ts +21 -17
- package/dist/components/ui/atoms/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/atoms/dropdown-menu.js +1507 -899
- package/dist/components/ui/atoms/form.d.ts +5 -3
- package/dist/components/ui/atoms/form.d.ts.map +1 -1
- package/dist/components/ui/atoms/form.js +36 -42
- package/dist/components/ui/atoms/hover-card.d.ts +5 -6
- package/dist/components/ui/atoms/hover-card.d.ts.map +1 -1
- package/dist/components/ui/atoms/hover-card.js +355 -193
- package/dist/components/ui/atoms/icons/index.d.ts +1 -0
- package/dist/components/ui/atoms/icons/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/icons/index.js +58 -56
- package/dist/components/ui/atoms/icons/telegram.d.ts +4 -0
- package/dist/components/ui/atoms/icons/telegram.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/telegram.js +37 -0
- package/dist/components/ui/atoms/index.d.ts +1 -0
- package/dist/components/ui/atoms/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/index.js +566 -545
- package/dist/components/ui/atoms/input-group.d.ts +20 -0
- package/dist/components/ui/atoms/input-group.d.ts.map +1 -0
- package/dist/components/ui/atoms/input-group.js +136 -0
- package/dist/components/ui/atoms/input.d.ts.map +1 -1
- package/dist/components/ui/atoms/input.js +113 -13
- package/dist/components/ui/atoms/label.d.ts +1 -2
- package/dist/components/ui/atoms/label.d.ts.map +1 -1
- package/dist/components/ui/atoms/label.js +18 -31
- package/dist/components/ui/atoms/markdown.js +1 -1
- package/dist/components/ui/atoms/mobile-tooltip.js +4 -3
- package/dist/components/ui/atoms/popover.d.ts +8 -6
- package/dist/components/ui/atoms/popover.d.ts.map +1 -1
- package/dist/components/ui/atoms/popover.js +617 -245
- package/dist/components/ui/atoms/pro-badge.js +1 -1
- package/dist/components/ui/atoms/progress.d.ts +7 -4
- package/dist/components/ui/atoms/progress.d.ts.map +1 -1
- package/dist/components/ui/atoms/progress.js +236 -92
- package/dist/components/ui/atoms/radio-group.d.ts +4 -4
- package/dist/components/ui/atoms/radio-group.d.ts.map +1 -1
- package/dist/components/ui/atoms/radio-group.js +355 -251
- package/dist/components/ui/atoms/resizable.d.ts +3 -4
- package/dist/components/ui/atoms/resizable.d.ts.map +1 -1
- package/dist/components/ui/atoms/resizable.js +25 -27
- package/dist/components/ui/atoms/scroll-area.d.ts +5 -5
- package/dist/components/ui/atoms/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/atoms/scroll-area.js +611 -526
- package/dist/components/ui/atoms/scroll-button.d.ts.map +1 -1
- package/dist/components/ui/atoms/scroll-button.js +27 -22
- package/dist/components/ui/atoms/select.d.ts +11 -11
- package/dist/components/ui/atoms/select.d.ts.map +1 -1
- package/dist/components/ui/atoms/select.js +1525 -889
- package/dist/components/ui/atoms/separator.d.ts +2 -3
- package/dist/components/ui/atoms/separator.d.ts.map +1 -1
- package/dist/components/ui/atoms/separator.js +16 -35
- package/dist/components/ui/atoms/sheet.d.ts +9 -9
- package/dist/components/ui/atoms/sheet.d.ts.map +1 -1
- package/dist/components/ui/atoms/sheet.js +65 -64
- package/dist/components/ui/atoms/sidebar.d.ts +9 -15
- package/dist/components/ui/atoms/sidebar.d.ts.map +1 -1
- package/dist/components/ui/atoms/sidebar.js +288 -283
- package/dist/components/ui/atoms/skeleton.js +4 -4
- package/dist/components/ui/atoms/slider.d.ts +2 -3
- package/dist/components/ui/atoms/slider.d.ts.map +1 -1
- package/dist/components/ui/atoms/slider.js +886 -440
- package/dist/components/ui/atoms/switch.d.ts +4 -5
- package/dist/components/ui/atoms/switch.d.ts.map +1 -1
- package/dist/components/ui/atoms/switch.js +218 -151
- package/dist/components/ui/atoms/table.d.ts +2 -4
- package/dist/components/ui/atoms/table.d.ts.map +1 -1
- package/dist/components/ui/atoms/table.js +35 -36
- package/dist/components/ui/atoms/tabs.d.ts +11 -7
- package/dist/components/ui/atoms/tabs.d.ts.map +1 -1
- package/dist/components/ui/atoms/tabs.js +492 -186
- package/dist/components/ui/atoms/textarea.d.ts.map +1 -1
- package/dist/components/ui/atoms/textarea.js +7 -7
- package/dist/components/ui/atoms/toggle.d.ts +2 -3
- package/dist/components/ui/atoms/toggle.d.ts.map +1 -1
- package/dist/components/ui/atoms/toggle.js +92 -45
- package/dist/components/ui/atoms/tooltip.d.ts +6 -9
- package/dist/components/ui/atoms/tooltip.d.ts.map +1 -1
- package/dist/components/ui/atoms/tooltip.js +625 -343
- package/dist/components/ui/atoms/view-tools-control.js +16 -15
- package/dist/components/ui/atoms/virtualized-grid.d.ts +11 -4
- package/dist/components/ui/atoms/virtualized-grid.d.ts.map +1 -1
- package/dist/components/ui/atoms/virtualized-grid.js +365 -333
- package/dist/components/ui/index.js +665 -644
- package/dist/components/ui/molecules/chat-history-item.d.ts.map +1 -1
- package/dist/components/ui/molecules/chat-history-item.js +47 -40
- package/dist/components/ui/molecules/command-bar.js +1 -1
- package/dist/components/ui/molecules/confirm-popover.d.ts +2 -2
- package/dist/components/ui/molecules/confirm-popover.d.ts.map +1 -1
- package/dist/components/ui/molecules/confirm-popover.js +26 -24
- package/dist/components/ui/molecules/date-time-picker.d.ts.map +1 -1
- package/dist/components/ui/molecules/date-time-picker.js +17 -11
- package/dist/components/ui/molecules/index.js +1 -1
- package/dist/components/ui/molecules/message.d.ts +2 -3
- package/dist/components/ui/molecules/message.d.ts.map +1 -1
- package/dist/components/ui/molecules/message.js +10 -16
- package/dist/components/ui/molecules/prompt-input.d.ts +1 -1
- package/dist/components/ui/molecules/prompt-input.d.ts.map +1 -1
- package/dist/components/ui/molecules/prompt-input.js +21 -22
- package/dist/components/ui/molecules/requirement-badges.d.ts.map +1 -1
- package/dist/components/ui/molecules/requirement-badges.js +3 -3
- package/dist/components/ui/molecules/steps-progress.js +1 -0
- package/dist/components/ui/molecules/tool-call-accordion.js +1 -0
- package/dist/components/ui/molecules/tool-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/tool-card.js +60 -47
- package/dist/components/ui/molecules/toolkit-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/toolkit-card.js +1 -1
- package/dist/components/ui/molecules/user-nav.d.ts.map +1 -1
- package/dist/components/ui/molecules/user-nav.js +62 -57
- package/dist/components/ui/templates/auth-template.js +5 -5
- package/dist/composite-BASdnlNo.js +220 -0
- package/dist/composite-BSpUD7nI.js +66 -0
- package/dist/cpp-CA4iM_wM.js +18 -0
- package/dist/createBaseUIEventDetails-CqidROtw.js +55 -0
- package/dist/crystal-CRJyc4G-.js +4 -4
- package/dist/css-M7EaDHN_.js +6 -0
- package/dist/csv-B7yqA61e.js +6 -0
- package/dist/dark-plus-B4vfALTw.js +4 -0
- package/dist/detectBrowser-Dn2N72k1.js +42 -0
- package/dist/dracula-Cb59ZzY3.js +4 -0
- package/dist/dracula-soft-aaEmszbU.js +4 -0
- package/dist/edge-BYQkOzbF.js +1 -1
- package/dist/element-DSo91iOi.js +88 -0
- package/dist/elm-BtNbw_Cd.js +1 -1
- package/dist/erlang-DNcDT8Hi.js +1 -1
- package/dist/event-BCa0Un_3.js +30 -0
- package/dist/everforest-dark-CLp_21RJ.js +4 -0
- package/dist/everforest-light-CZ0NCAAv.js +4 -0
- package/dist/floating-ui.utils-48URp89E.js +126 -0
- package/dist/floating-ui.utils.dom-jr2suqy2.js +135 -0
- package/dist/fsharp-CYOiIVNx.js +1 -1
- package/dist/getDisabledMountTransitionStyles-fmnaQYVj.js +1539 -0
- package/dist/getPseudoElementBounds-B4_miSEJ.js +364 -0
- package/dist/git-rebase-ZWUFO_T4.js +1 -1
- package/dist/github-dark-BD3lImVS.js +4 -0
- package/dist/github-dark-default-ID_nBUwl.js +4 -0
- package/dist/github-dark-dimmed-Cw4rFgde.js +4 -0
- package/dist/github-dark-high-contrast-DSby9de8.js +4 -0
- package/dist/github-light-W396yAFe.js +4 -0
- package/dist/github-light-default-DCAQ2px1.js +4 -0
- package/dist/github-light-high-contrast-ChWJGEvx.js +4 -0
- package/dist/glimmer-js-DkxNrfPT.js +2 -2
- package/dist/glimmer-ts-D6YZEmK_.js +2 -2
- package/dist/glsl-CgdqkyFp.js +8 -0
- package/dist/graphql-Bv26LTzG.js +14 -0
- package/dist/gruvbox-dark-hard-BC1GRqFa.js +4 -0
- package/dist/gruvbox-dark-medium-COLy2cDY.js +4 -0
- package/dist/gruvbox-dark-soft-B8MALL4f.js +4 -0
- package/dist/gruvbox-light-hard-Bzxr_AnB.js +4 -0
- package/dist/gruvbox-light-medium-D2fqu3Kj.js +4 -0
- package/dist/gruvbox-light-soft-atzRH3-n.js +4 -0
- package/dist/hack-ItRNKiEb.js +1 -1
- package/dist/haml-B1t5q1Sv.js +10 -0
- package/dist/haml-NZLVzu_R.js +1 -1
- package/dist/handlebars-B2fb61mr.js +14 -0
- package/dist/handlebars-mxStpSE7.js +2 -2
- package/dist/highlighted-body-OFNGDK62-Df6AJMbs.js +20 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-mobile.js +11 -12
- package/dist/horizon-PFtq58ZB.js +4 -0
- package/dist/horizon-bright-2WzHy-Vo.js +4 -0
- package/dist/houston-BEqUWhHr.js +4 -0
- package/dist/html-B50bmoVb.js +1 -1
- package/dist/html-CPZ3oZQ7.js +10 -0
- package/dist/html-derivative-B2qv7eyt.js +8 -0
- package/dist/http-BQ2t9cn1.js +14 -0
- package/dist/hurl-RyCMCa80.js +12 -0
- package/dist/imba-DpB-wtPB.js +6 -0
- package/dist/index-3rscXtm3.js +4708 -0
- package/dist/inertValue-kpZZDBEy.js +7 -0
- package/dist/integrations/rhf/index.js +6 -5
- package/dist/isElementDisabled-Cbd8W9kH.js +6 -0
- package/dist/java-CbphP4lz.js +6 -0
- package/dist/javascript-CgYd5l7W.js +6 -0
- package/dist/jinja-DFCUirAg.js +11 -0
- package/dist/jison-CTEI_s6O.js +8 -0
- package/dist/json-B5-prx4F.js +6 -0
- package/dist/json5-CZ8R1oUY.js +6 -0
- package/dist/jsonc-DMboCKBJ.js +6 -0
- package/dist/jsonl-YgIUi4Dg.js +6 -0
- package/dist/jsx-D4q4E1UD.js +6 -0
- package/dist/julia-2ubi2n9a.js +16 -0
- package/dist/just-CEK2SJ_k.js +4 -4
- package/dist/kanagawa-dragon-DuYaOBBk.js +4 -0
- package/dist/kanagawa-lotus-CyjAihYC.js +4 -0
- package/dist/kanagawa-wave-BVdXUMj5.js +4 -0
- package/dist/laserwave-B_2VVKNJ.js +4 -0
- package/dist/less-MoGo8xoS.js +6 -0
- package/dist/light-plus-IB4fPeJj.js +4 -0
- package/dist/liquid-CHzkx3jT.js +2 -2
- package/dist/lua-Bp3IRv7I.js +1 -1
- package/dist/main.js +691 -670
- package/dist/markdown-B-zRtm0x.js +6 -0
- package/dist/{markdown-D0xxRbwP.js → markdown-B71Eurda.js} +10329 -8108
- package/dist/marko-BlmC3dqW.js +14 -0
- package/dist/marko-CJBA24Ri.js +2 -2
- package/dist/material-theme-CjsSdYF2.js +4 -0
- package/dist/material-theme-darker-DEk0vgdS.js +4 -0
- package/dist/material-theme-lighter-DEVB_7K5.js +4 -0
- package/dist/material-theme-ocean-DK6jm24j.js +4 -0
- package/dist/material-theme-palenight-CNkXNpHv.js +4 -0
- package/dist/mdc-C9YSUwVC.js +2 -2
- package/dist/mdc-CLNk3q28.js +12 -0
- package/dist/mdx-CiUWpBB_.js +6 -0
- package/dist/mermaid-GHXKKRXX-BkplG-MI.js +5 -0
- package/dist/metadata/toolkit-icons.d.ts.map +1 -1
- package/dist/metadata/toolkit-icons.js +40 -38
- package/dist/metadata/toolkits.d.ts.map +1 -1
- package/dist/metadata/toolkits.js +13 -0
- package/dist/min-dark-CJcHUHwu.js +4 -0
- package/dist/min-light-BAN2UR75.js +4 -0
- package/dist/monokai-BbXwpjKl.js +4 -0
- package/dist/night-owl-csViJ7u4.js +4 -0
- package/dist/night-owl-light-BC-NuMC3.js +4 -0
- package/dist/nim-QAjRdh9w.js +5 -5
- package/dist/nord-B8Sq-VQ0.js +4 -0
- package/dist/one-dark-pro-DTdrcl-J.js +4 -0
- package/dist/one-light-kPHTChCU.js +4 -0
- package/dist/owner-rKN292Q9.js +6 -0
- package/dist/perl-DkVrgJBg.js +3 -3
- package/dist/php-BIzsF_5x.js +4 -4
- package/dist/php-Kn-vgdBD.js +18 -0
- package/dist/plastic-DDweBgVs.js +4 -0
- package/dist/poimandres-Dqvs16BQ.js +4 -0
- package/dist/popupStateMapping-BT9Y_jIq.js +1849 -0
- package/dist/postcss-CwL8bLZI.js +6 -0
- package/dist/pug-CTOOvSEH.js +12 -0
- package/dist/pug-XOw9Q1Ho.js +1 -1
- package/dist/python-jjYlTiSH.js +6 -0
- package/dist/qml-rTNXsquU.js +1 -1
- package/dist/r-C8zl4zMO.js +6 -0
- package/dist/react-resizable-panels-BqIpIFl2.js +2017 -0
- package/dist/red-DBDwQkX-.js +4 -0
- package/dist/regexp-Dpy_RgoJ.js +6 -0
- package/dist/resolveAriaLabelledBy-B5vw-szP.js +11 -0
- package/dist/rose-pine-DGHrTu7e.js +4 -0
- package/dist/rose-pine-dawn-DfRVdapG.js +4 -0
- package/dist/rose-pine-moon-DFpJm5Rd.js +4 -0
- package/dist/rst-DM32Wy3O.js +5 -5
- package/dist/ruby-BeqCs27h.js +8 -8
- package/dist/safePolygon-CJcmMc0u.js +389 -0
- package/dist/safeReact-DKq-628G.js +7 -0
- package/dist/sas-fpEvgATw.js +1 -1
- package/dist/sass-BmupNt-w.js +6 -0
- package/dist/scss-BZYVIVaN.js +8 -0
- package/dist/serializeValue-BebmSzW3.js +14 -0
- package/dist/shellscript-fMxXshxv.js +6 -0
- package/dist/shellsession-DiDJNQdy.js +1 -1
- package/dist/slack-dark-noeC6QPl.js +4 -0
- package/dist/slack-ochin-3_2idqLR.js +4 -0
- package/dist/snazzy-light-B9cV359v.js +4 -0
- package/dist/solarized-dark-B6X0ILWr.js +4 -0
- package/dist/solarized-light-LxOemn3c.js +4 -0
- package/dist/sql-D30Zid36.js +6 -0
- package/dist/stata-B8c5fTjX.js +1 -1
- package/dist/styles-DU5BO7fS.js +16 -0
- package/dist/stylus-BoBcEBjx.js +6 -0
- package/dist/surrealql-CQi7GQN7.js +1 -1
- package/dist/svelte-b9PAcyUe.js +14 -0
- package/dist/svelte-rYri41WT.js +3 -3
- package/dist/synthwave-84-DzQeMpV0.js +4 -0
- package/dist/templ-Crs9Ui8q.js +1 -1
- package/dist/tex-AHxmLTL0.js +1 -1
- package/dist/tokyo-night-CLM-V_Re.js +4 -0
- package/dist/{toolkit-card-CB1oiaei.js → toolkit-card-DhpOY80l.js} +56 -36
- package/dist/ts-tags-CP1b-4Z2.js +41 -0
- package/dist/ts-tags-ioVe2PKw.js +5 -5
- package/dist/tsx-QNpb2qLW.js +6 -0
- package/dist/twig-DwV2Fi4L.js +2 -2
- package/dist/typescript-AhniRyfZ.js +6 -0
- package/dist/useAnimationFrame-DIc6eFHa.js +69 -0
- package/dist/useAriaLabelledBy-VklrCmKp.js +34 -0
- package/dist/useBaseUiId-C8Dq0BQq.js +25 -0
- package/dist/useButton-JYPKQKj4.js +150 -0
- package/dist/useCollapsiblePanel-9pDlDh3R.js +257 -0
- package/dist/useCompositeItem-D00ALGkT.js +35 -0
- package/dist/useCompositeListItem-CYQrZg5-.js +74 -0
- package/dist/useControlled-Sx-_x7Sz.js +32 -0
- package/dist/useFocus-Aj9ShMQu.js +97 -0
- package/dist/useIsoLayoutEffect-DpJo20by.js +7 -0
- package/dist/useLabelableId-DF_d91GP.js +44 -0
- package/dist/useOnFirstRender-B4aruaIA.js +9 -0
- package/dist/useOnMount-JHtE6teb.js +9 -0
- package/dist/useOpenChangeComplete-DkeH9FGJ.js +130 -0
- package/dist/useRender-BNXBkp2o.js +7 -0
- package/dist/useRenderElement-DNB2vtF1.js +274 -0
- package/dist/useRole-N-RCRzo1.js +76 -0
- package/dist/useStableCallback-CudqoENs.js +33 -0
- package/dist/useSyncedFloatingRootContext-Bc90zSTy.js +185 -0
- package/dist/useTimeout-DAqPwigF.js +33 -0
- package/dist/useValueAsRef-LhoZc6As.js +20 -0
- package/dist/useValueChanged-Bissqjjn.js +15 -0
- package/dist/valueToPercent-BBgE4D3L.js +27 -0
- package/dist/vesper-BmV7KiQ0.js +4 -0
- package/dist/visuallyHidden-PuyyGHVF.js +22 -0
- package/dist/vitesse-black-CxZz3C4s.js +4 -0
- package/dist/vitesse-dark-DVUJ0sy2.js +4 -0
- package/dist/vitesse-light-BDJohtUr.js +4 -0
- package/dist/vue-CY6W2ID0.js +31 -0
- package/dist/vue-DXEmyXn9.js +3 -3
- package/dist/vue-html-DYXHAJ2G.js +8 -0
- package/dist/vue-vine-D41-N99t.js +4 -4
- package/dist/vue-vine-DiWTpMwZ.js +18 -0
- package/dist/wasm-3y0A1Y71.js +6 -0
- package/dist/wasm-Dm9SFfrx.js +7 -0
- package/dist/web-BbvN_Lei.js +2846 -0
- package/dist/wgsl-SXl3EZUN.js +6 -0
- package/dist/wit-Cw0CTVY0.js +6 -0
- package/dist/xml-CNXGTZ6Z.js +8 -0
- package/dist/xsl-BmSZphgC.js +1 -1
- package/dist/yaml-DZqZ2PBD.js +6 -0
- package/package.json +37 -34
- package/dist/highlighted-body-TPN3WLV5-D6UnKGod.js +0 -19
- package/dist/index-0ioNhtNM.js +0 -10
- package/dist/index-437EL2iq.js +0 -52
- package/dist/index-B695uy69.js +0 -9
- package/dist/index-BEZCAdXQ.js +0 -1568
- package/dist/index-BGQepRFJ.js +0 -27
- package/dist/index-BZPx6jYI.js +0 -8
- package/dist/index-BaLuVb4t.js +0 -70
- package/dist/index-Bw62B28F.js +0 -31
- package/dist/index-By-GFSsC.js +0 -245
- package/dist/index-ByaXH_ih.js +0 -10
- package/dist/index-CCKe-Mpx.js +0 -6
- package/dist/index-Cv867SGx.js +0 -13
- package/dist/index-CvA4FcaC.js +0 -677
- package/dist/index-D2LZVjSn.js +0 -82
- package/dist/index-DFZozV_h.js +0 -68
- package/dist/index-DJQkmo5O.js +0 -49
- package/dist/index-DLohNuco.js +0 -36
- package/dist/index-DrFfdHac.js +0 -144
- package/dist/index-DrlYGDRT.js +0 -119
- package/dist/index-Dz8CQngS.js +0 -181
- package/dist/index-cd1ceFJg.js +0 -6973
- package/dist/index-rKs9bXHr.js +0 -6
- package/dist/mermaid-O7DHMXV3-gUrB-Xs1.js +0 -4
- package/dist/react-resizable-panels.browser-DYl0LXfw.js +0 -1510
- package/dist/web-BwFNdl01.js +0 -697
|
@@ -0,0 +1,1849 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as g from "react";
|
|
3
|
+
import ge from "react";
|
|
4
|
+
import * as ht from "react-dom";
|
|
5
|
+
import { s as $t, k as Yt, a as ie, c as Xt, n as Te, m as Jt, i as Zt, b as Qt } from "./floating-ui.utils.dom-jr2suqy2.js";
|
|
6
|
+
import { a as mt } from "./useBaseUiId-C8Dq0BQq.js";
|
|
7
|
+
import { u as H } from "./useIsoLayoutEffect-DpJo20by.js";
|
|
8
|
+
import { u as D } from "./useStableCallback-CudqoENs.js";
|
|
9
|
+
import { c as en } from "./detectBrowser-Dn2N72k1.js";
|
|
10
|
+
import { a as tn } from "./visuallyHidden-PuyyGHVF.js";
|
|
11
|
+
import { jsx as U, jsxs as Je } from "react/jsx-runtime";
|
|
12
|
+
import { c as te, f as nn, e as rn, a as Ze, o as on } from "./createBaseUIEventDetails-CqidROtw.js";
|
|
13
|
+
import { E as sn, u as an, a as vt, f as un, i as cn, N as ln } from "./useRenderElement-DNB2vtF1.js";
|
|
14
|
+
import { o as q } from "./owner-rKN292Q9.js";
|
|
15
|
+
import { c as ne, a as fn, b as G, k as P, l as dn, F as pn, n as gt, S as bt } from "./element-DSo91iOi.js";
|
|
16
|
+
import { u as Qe, T as et } from "./useTimeout-DAqPwigF.js";
|
|
17
|
+
import { d as hn, c as mn } from "./event-BCa0Un_3.js";
|
|
18
|
+
import { T as tt } from "./useOpenChangeComplete-DkeH9FGJ.js";
|
|
19
|
+
const Wr = 500, Gr = 500, Ur = {
|
|
20
|
+
style: {
|
|
21
|
+
transition: "none"
|
|
22
|
+
}
|
|
23
|
+
}, qr = "data-base-ui-click-trigger", $r = {
|
|
24
|
+
fallbackAxisSide: "none"
|
|
25
|
+
}, Yr = {
|
|
26
|
+
fallbackAxisSide: "end"
|
|
27
|
+
}, vn = {
|
|
28
|
+
clipPath: "inset(50%)",
|
|
29
|
+
position: "fixed",
|
|
30
|
+
top: 0,
|
|
31
|
+
left: 0
|
|
32
|
+
};
|
|
33
|
+
function fe(n, e, t = !0) {
|
|
34
|
+
return n.filter((o) => o.parentId === e && (!t || o.context?.open)).flatMap((o) => [o, ...fe(n, o.id, t)]);
|
|
35
|
+
}
|
|
36
|
+
function Xr(n, e) {
|
|
37
|
+
let t = [], r = n.find((o) => o.id === e)?.parentId;
|
|
38
|
+
for (; r; ) {
|
|
39
|
+
const o = n.find((s) => s.id === r);
|
|
40
|
+
r = o?.parentId, o && (t = t.concat(o));
|
|
41
|
+
}
|
|
42
|
+
return t;
|
|
43
|
+
}
|
|
44
|
+
var gn = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert] *)", "textarea:not([inert]):not([inert] *)", "a[href]:not([inert]):not([inert] *)", "button:not([inert]):not([inert] *)", "[tabindex]:not(slot):not([inert]):not([inert] *)", "audio[controls]:not([inert]):not([inert] *)", "video[controls]:not([inert]):not([inert] *)", '[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)', "details>summary:first-of-type:not([inert]):not([inert] *)", "details:not([inert]):not([inert] *)"], de = /* @__PURE__ */ gn.join(","), Et = typeof Element > "u", $ = Et ? function() {
|
|
45
|
+
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, pe = !Et && Element.prototype.getRootNode ? function(n) {
|
|
46
|
+
var e;
|
|
47
|
+
return n == null || (e = n.getRootNode) === null || e === void 0 ? void 0 : e.call(n);
|
|
48
|
+
} : function(n) {
|
|
49
|
+
return n?.ownerDocument;
|
|
50
|
+
}, he = function(e, t) {
|
|
51
|
+
var r;
|
|
52
|
+
t === void 0 && (t = !0);
|
|
53
|
+
var o = e == null || (r = e.getAttribute) === null || r === void 0 ? void 0 : r.call(e, "inert"), s = o === "" || o === "true", i = s || t && e && // closest does not exist on shadow roots, so we fall back to a manual
|
|
54
|
+
// lookup upward, in case it is not defined.
|
|
55
|
+
(typeof e.closest == "function" ? e.closest("[inert]") : he(e.parentNode));
|
|
56
|
+
return i;
|
|
57
|
+
}, bn = function(e) {
|
|
58
|
+
var t, r = e == null || (t = e.getAttribute) === null || t === void 0 ? void 0 : t.call(e, "contenteditable");
|
|
59
|
+
return r === "" || r === "true";
|
|
60
|
+
}, yt = function(e, t, r) {
|
|
61
|
+
if (he(e))
|
|
62
|
+
return [];
|
|
63
|
+
var o = Array.prototype.slice.apply(e.querySelectorAll(de));
|
|
64
|
+
return t && $.call(e, de) && o.unshift(e), o = o.filter(r), o;
|
|
65
|
+
}, me = function(e, t, r) {
|
|
66
|
+
for (var o = [], s = Array.from(e); s.length; ) {
|
|
67
|
+
var i = s.shift();
|
|
68
|
+
if (!he(i, !1))
|
|
69
|
+
if (i.tagName === "SLOT") {
|
|
70
|
+
var u = i.assignedElements(), h = u.length ? u : i.children, a = me(h, !0, r);
|
|
71
|
+
r.flatten ? o.push.apply(o, a) : o.push({
|
|
72
|
+
scopeParent: i,
|
|
73
|
+
candidates: a
|
|
74
|
+
});
|
|
75
|
+
} else {
|
|
76
|
+
var d = $.call(i, de);
|
|
77
|
+
d && r.filter(i) && (t || !e.includes(i)) && o.push(i);
|
|
78
|
+
var f = i.shadowRoot || // check for an undisclosed shadow
|
|
79
|
+
typeof r.getShadowRoot == "function" && r.getShadowRoot(i), b = !he(f, !1) && (!r.shadowRootFilter || r.shadowRootFilter(i));
|
|
80
|
+
if (f && b) {
|
|
81
|
+
var l = me(f === !0 ? i.children : f.children, !0, r);
|
|
82
|
+
r.flatten ? o.push.apply(o, l) : o.push({
|
|
83
|
+
scopeParent: i,
|
|
84
|
+
candidates: l
|
|
85
|
+
});
|
|
86
|
+
} else
|
|
87
|
+
s.unshift.apply(s, i.children);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return o;
|
|
91
|
+
}, St = function(e) {
|
|
92
|
+
return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
|
|
93
|
+
}, Ot = function(e) {
|
|
94
|
+
if (!e)
|
|
95
|
+
throw new Error("No node provided");
|
|
96
|
+
return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || bn(e)) && !St(e) ? 0 : e.tabIndex;
|
|
97
|
+
}, En = function(e, t) {
|
|
98
|
+
var r = Ot(e);
|
|
99
|
+
return r < 0 && t && !St(e) ? 0 : r;
|
|
100
|
+
}, yn = function(e, t) {
|
|
101
|
+
return e.tabIndex === t.tabIndex ? e.documentOrder - t.documentOrder : e.tabIndex - t.tabIndex;
|
|
102
|
+
}, Rt = function(e) {
|
|
103
|
+
return e.tagName === "INPUT";
|
|
104
|
+
}, Sn = function(e) {
|
|
105
|
+
return Rt(e) && e.type === "hidden";
|
|
106
|
+
}, On = function(e) {
|
|
107
|
+
var t = e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(r) {
|
|
108
|
+
return r.tagName === "SUMMARY";
|
|
109
|
+
});
|
|
110
|
+
return t;
|
|
111
|
+
}, Rn = function(e, t) {
|
|
112
|
+
for (var r = 0; r < e.length; r++)
|
|
113
|
+
if (e[r].checked && e[r].form === t)
|
|
114
|
+
return e[r];
|
|
115
|
+
}, Tn = function(e) {
|
|
116
|
+
if (!e.name)
|
|
117
|
+
return !0;
|
|
118
|
+
var t = e.form || pe(e), r = function(u) {
|
|
119
|
+
return t.querySelectorAll('input[type="radio"][name="' + u + '"]');
|
|
120
|
+
}, o;
|
|
121
|
+
if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
|
|
122
|
+
o = r(window.CSS.escape(e.name));
|
|
123
|
+
else
|
|
124
|
+
try {
|
|
125
|
+
o = r(e.name);
|
|
126
|
+
} catch (i) {
|
|
127
|
+
return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", i.message), !1;
|
|
128
|
+
}
|
|
129
|
+
var s = Rn(o, e.form);
|
|
130
|
+
return !s || s === e;
|
|
131
|
+
}, Cn = function(e) {
|
|
132
|
+
return Rt(e) && e.type === "radio";
|
|
133
|
+
}, In = function(e) {
|
|
134
|
+
return Cn(e) && !Tn(e);
|
|
135
|
+
}, _n = function(e) {
|
|
136
|
+
var t, r = e && pe(e), o = (t = r) === null || t === void 0 ? void 0 : t.host, s = !1;
|
|
137
|
+
if (r && r !== e) {
|
|
138
|
+
var i, u, h;
|
|
139
|
+
for (s = !!((i = o) !== null && i !== void 0 && (u = i.ownerDocument) !== null && u !== void 0 && u.contains(o) || e != null && (h = e.ownerDocument) !== null && h !== void 0 && h.contains(e)); !s && o; ) {
|
|
140
|
+
var a, d, f;
|
|
141
|
+
r = pe(o), o = (a = r) === null || a === void 0 ? void 0 : a.host, s = !!((d = o) !== null && d !== void 0 && (f = d.ownerDocument) !== null && f !== void 0 && f.contains(o));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return s;
|
|
145
|
+
}, nt = function(e) {
|
|
146
|
+
var t = e.getBoundingClientRect(), r = t.width, o = t.height;
|
|
147
|
+
return r === 0 && o === 0;
|
|
148
|
+
}, wn = function(e, t) {
|
|
149
|
+
var r = t.displayCheck, o = t.getShadowRoot;
|
|
150
|
+
if (r === "full-native" && "checkVisibility" in e) {
|
|
151
|
+
var s = e.checkVisibility({
|
|
152
|
+
// Checking opacity might be desirable for some use cases, but natively,
|
|
153
|
+
// opacity zero elements _are_ focusable and tabbable.
|
|
154
|
+
checkOpacity: !1,
|
|
155
|
+
opacityProperty: !1,
|
|
156
|
+
contentVisibilityAuto: !0,
|
|
157
|
+
visibilityProperty: !0,
|
|
158
|
+
// This is an alias for `visibilityProperty`. Contemporary browsers
|
|
159
|
+
// support both. However, this alias has wider browser support (Chrome
|
|
160
|
+
// >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so
|
|
161
|
+
// we include it anyway.
|
|
162
|
+
checkVisibilityCSS: !0
|
|
163
|
+
});
|
|
164
|
+
return !s;
|
|
165
|
+
}
|
|
166
|
+
if (getComputedStyle(e).visibility === "hidden")
|
|
167
|
+
return !0;
|
|
168
|
+
var i = $.call(e, "details>summary:first-of-type"), u = i ? e.parentElement : e;
|
|
169
|
+
if ($.call(u, "details:not([open]) *"))
|
|
170
|
+
return !0;
|
|
171
|
+
if (!r || r === "full" || // full-native can run this branch when it falls through in case
|
|
172
|
+
// Element#checkVisibility is unsupported
|
|
173
|
+
r === "full-native" || r === "legacy-full") {
|
|
174
|
+
if (typeof o == "function") {
|
|
175
|
+
for (var h = e; e; ) {
|
|
176
|
+
var a = e.parentElement, d = pe(e);
|
|
177
|
+
if (a && !a.shadowRoot && o(a) === !0)
|
|
178
|
+
return nt(e);
|
|
179
|
+
e.assignedSlot ? e = e.assignedSlot : !a && d !== e.ownerDocument ? e = d.host : e = a;
|
|
180
|
+
}
|
|
181
|
+
e = h;
|
|
182
|
+
}
|
|
183
|
+
if (_n(e))
|
|
184
|
+
return !e.getClientRects().length;
|
|
185
|
+
if (r !== "legacy-full")
|
|
186
|
+
return !0;
|
|
187
|
+
} else if (r === "non-zero-area")
|
|
188
|
+
return nt(e);
|
|
189
|
+
return !1;
|
|
190
|
+
}, xn = function(e) {
|
|
191
|
+
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))
|
|
192
|
+
for (var t = e.parentElement; t; ) {
|
|
193
|
+
if (t.tagName === "FIELDSET" && t.disabled) {
|
|
194
|
+
for (var r = 0; r < t.children.length; r++) {
|
|
195
|
+
var o = t.children.item(r);
|
|
196
|
+
if (o.tagName === "LEGEND")
|
|
197
|
+
return $.call(t, "fieldset[disabled] *") ? !0 : !o.contains(e);
|
|
198
|
+
}
|
|
199
|
+
return !0;
|
|
200
|
+
}
|
|
201
|
+
t = t.parentElement;
|
|
202
|
+
}
|
|
203
|
+
return !1;
|
|
204
|
+
}, Ne = function(e, t) {
|
|
205
|
+
return !(t.disabled || Sn(t) || wn(t, e) || // For a details element with a summary, the summary element gets the focus
|
|
206
|
+
On(t) || xn(t));
|
|
207
|
+
}, Le = function(e, t) {
|
|
208
|
+
return !(In(t) || Ot(t) < 0 || !Ne(e, t));
|
|
209
|
+
}, Nn = function(e) {
|
|
210
|
+
var t = parseInt(e.getAttribute("tabindex"), 10);
|
|
211
|
+
return !!(isNaN(t) || t >= 0);
|
|
212
|
+
}, Tt = function(e) {
|
|
213
|
+
var t = [], r = [];
|
|
214
|
+
return e.forEach(function(o, s) {
|
|
215
|
+
var i = !!o.scopeParent, u = i ? o.scopeParent : o, h = En(u, i), a = i ? Tt(o.candidates) : u;
|
|
216
|
+
h === 0 ? i ? t.push.apply(t, a) : t.push(u) : r.push({
|
|
217
|
+
documentOrder: s,
|
|
218
|
+
tabIndex: h,
|
|
219
|
+
item: o,
|
|
220
|
+
isScope: i,
|
|
221
|
+
content: a
|
|
222
|
+
});
|
|
223
|
+
}), r.sort(yn).reduce(function(o, s) {
|
|
224
|
+
return s.isScope ? o.push.apply(o, s.content) : o.push(s.content), o;
|
|
225
|
+
}, []).concat(t);
|
|
226
|
+
}, Me = function(e, t) {
|
|
227
|
+
t = t || {};
|
|
228
|
+
var r;
|
|
229
|
+
return t.getShadowRoot ? r = me([e], t.includeContainer, {
|
|
230
|
+
filter: Le.bind(null, t),
|
|
231
|
+
flatten: !1,
|
|
232
|
+
getShadowRoot: t.getShadowRoot,
|
|
233
|
+
shadowRootFilter: Nn
|
|
234
|
+
}) : r = yt(e, t.includeContainer, Le.bind(null, t)), Tt(r);
|
|
235
|
+
}, Jr = function(e, t) {
|
|
236
|
+
t = t || {};
|
|
237
|
+
var r;
|
|
238
|
+
return t.getShadowRoot ? r = me([e], t.includeContainer, {
|
|
239
|
+
filter: Ne.bind(null, t),
|
|
240
|
+
flatten: !0,
|
|
241
|
+
getShadowRoot: t.getShadowRoot
|
|
242
|
+
}) : r = yt(e, t.includeContainer, Ne.bind(null, t)), r;
|
|
243
|
+
}, Zr = function(e, t) {
|
|
244
|
+
if (t = t || {}, !e)
|
|
245
|
+
throw new Error("No node provided");
|
|
246
|
+
return $.call(e, de) === !1 ? !1 : Le(t, e);
|
|
247
|
+
};
|
|
248
|
+
const Ve = () => ({
|
|
249
|
+
getShadowRoot: !0,
|
|
250
|
+
displayCheck: (
|
|
251
|
+
// JSDOM does not support the `tabbable` library. To solve this we can
|
|
252
|
+
// check if `ResizeObserver` is a real function (not polyfilled), which
|
|
253
|
+
// determines if the current environment is JSDOM-like.
|
|
254
|
+
typeof ResizeObserver == "function" && ResizeObserver.toString().includes("[native code]") ? "full" : "none"
|
|
255
|
+
)
|
|
256
|
+
});
|
|
257
|
+
function Ct(n, e) {
|
|
258
|
+
const t = Me(n, Ve()), r = t.length;
|
|
259
|
+
if (r === 0)
|
|
260
|
+
return;
|
|
261
|
+
const o = fn(q(n)), s = t.indexOf(o), i = s === -1 ? e === 1 ? 0 : r - 1 : s + e;
|
|
262
|
+
return t[i];
|
|
263
|
+
}
|
|
264
|
+
function Ln(n) {
|
|
265
|
+
return Ct(q(n).body, 1) || n;
|
|
266
|
+
}
|
|
267
|
+
function kn(n) {
|
|
268
|
+
return Ct(q(n).body, -1) || n;
|
|
269
|
+
}
|
|
270
|
+
function It(n, e) {
|
|
271
|
+
if (!n)
|
|
272
|
+
return null;
|
|
273
|
+
const t = Me(q(n).body, Ve()), r = t.length;
|
|
274
|
+
if (r === 0)
|
|
275
|
+
return null;
|
|
276
|
+
const o = t.indexOf(n);
|
|
277
|
+
if (o === -1)
|
|
278
|
+
return null;
|
|
279
|
+
const s = (o + e + r) % r;
|
|
280
|
+
return t[s];
|
|
281
|
+
}
|
|
282
|
+
function Qr(n) {
|
|
283
|
+
return It(n, 1);
|
|
284
|
+
}
|
|
285
|
+
function eo(n) {
|
|
286
|
+
return It(n, -1);
|
|
287
|
+
}
|
|
288
|
+
function Ce(n, e) {
|
|
289
|
+
const t = e || n.currentTarget, r = n.relatedTarget;
|
|
290
|
+
return !r || !ne(t, r);
|
|
291
|
+
}
|
|
292
|
+
function Pn(n) {
|
|
293
|
+
Me(n, Ve()).forEach((t) => {
|
|
294
|
+
t.dataset.tabindex = t.getAttribute("tabindex") || "", t.setAttribute("tabindex", "-1");
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
function rt(n) {
|
|
298
|
+
n.querySelectorAll("[data-tabindex]").forEach((t) => {
|
|
299
|
+
const r = t.dataset.tabindex;
|
|
300
|
+
delete t.dataset.tabindex, r ? t.setAttribute("tabindex", r) : t.removeAttribute("tabindex");
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
const ke = /* @__PURE__ */ g.forwardRef(function(e, t) {
|
|
304
|
+
const [r, o] = g.useState();
|
|
305
|
+
return H(() => {
|
|
306
|
+
en && o("button");
|
|
307
|
+
}, []), /* @__PURE__ */ U("span", {
|
|
308
|
+
...e,
|
|
309
|
+
ref: t,
|
|
310
|
+
style: tn,
|
|
311
|
+
"aria-hidden": r ? void 0 : !0,
|
|
312
|
+
...{
|
|
313
|
+
tabIndex: 0,
|
|
314
|
+
// Role is only for VoiceOver
|
|
315
|
+
role: r
|
|
316
|
+
},
|
|
317
|
+
"data-base-ui-focus-guard": ""
|
|
318
|
+
});
|
|
319
|
+
});
|
|
320
|
+
process.env.NODE_ENV !== "production" && (ke.displayName = "FocusGuard");
|
|
321
|
+
function _t(n) {
|
|
322
|
+
return `data-base-ui-${n}`;
|
|
323
|
+
}
|
|
324
|
+
const Fe = /* @__PURE__ */ g.createContext(null);
|
|
325
|
+
process.env.NODE_ENV !== "production" && (Fe.displayName = "PortalContext");
|
|
326
|
+
const An = () => g.useContext(Fe), Dn = _t("portal");
|
|
327
|
+
function Mn(n = {}) {
|
|
328
|
+
const {
|
|
329
|
+
ref: e,
|
|
330
|
+
container: t,
|
|
331
|
+
componentProps: r = sn,
|
|
332
|
+
elementProps: o
|
|
333
|
+
} = n, s = mt(), u = An()?.portalNode, [h, a] = g.useState(null), [d, f] = g.useState(null), b = D((E) => {
|
|
334
|
+
E !== null && f(E);
|
|
335
|
+
}), l = g.useRef(null);
|
|
336
|
+
H(() => {
|
|
337
|
+
if (t === null) {
|
|
338
|
+
l.current && (l.current = null, f(null), a(null));
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
if (s == null)
|
|
342
|
+
return;
|
|
343
|
+
const E = (t && ($t(t) ? t : t.current)) ?? u ?? document.body;
|
|
344
|
+
if (E == null) {
|
|
345
|
+
l.current && (l.current = null, f(null), a(null));
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
l.current !== E && (l.current = E, f(null), a(E));
|
|
349
|
+
}, [t, u, s]);
|
|
350
|
+
const p = an("div", r, {
|
|
351
|
+
ref: [e, b],
|
|
352
|
+
props: [{
|
|
353
|
+
id: s,
|
|
354
|
+
[Dn]: ""
|
|
355
|
+
}, o]
|
|
356
|
+
});
|
|
357
|
+
return {
|
|
358
|
+
portalNode: d,
|
|
359
|
+
portalSubtree: h && p ? /* @__PURE__ */ ht.createPortal(p, h) : null
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
const Vn = /* @__PURE__ */ g.forwardRef(function(e, t) {
|
|
363
|
+
const {
|
|
364
|
+
children: r,
|
|
365
|
+
container: o,
|
|
366
|
+
className: s,
|
|
367
|
+
render: i,
|
|
368
|
+
renderGuards: u,
|
|
369
|
+
...h
|
|
370
|
+
} = e, {
|
|
371
|
+
portalNode: a,
|
|
372
|
+
portalSubtree: d
|
|
373
|
+
} = Mn({
|
|
374
|
+
container: o,
|
|
375
|
+
ref: t,
|
|
376
|
+
componentProps: e,
|
|
377
|
+
elementProps: h
|
|
378
|
+
}), f = g.useRef(null), b = g.useRef(null), l = g.useRef(null), p = g.useRef(null), [m, E] = g.useState(null), T = m?.modal, N = m?.open, w = typeof u == "boolean" ? u : !!m && !m.modal && m.open && !!a;
|
|
379
|
+
g.useEffect(() => {
|
|
380
|
+
if (!a || T)
|
|
381
|
+
return;
|
|
382
|
+
function S(y) {
|
|
383
|
+
a && y.relatedTarget && Ce(y) && (y.type === "focusin" ? rt : Pn)(a);
|
|
384
|
+
}
|
|
385
|
+
return a.addEventListener("focusin", S, !0), a.addEventListener("focusout", S, !0), () => {
|
|
386
|
+
a.removeEventListener("focusin", S, !0), a.removeEventListener("focusout", S, !0);
|
|
387
|
+
};
|
|
388
|
+
}, [a, T]), g.useEffect(() => {
|
|
389
|
+
!a || N || rt(a);
|
|
390
|
+
}, [N, a]);
|
|
391
|
+
const x = g.useMemo(() => ({
|
|
392
|
+
beforeOutsideRef: f,
|
|
393
|
+
afterOutsideRef: b,
|
|
394
|
+
beforeInsideRef: l,
|
|
395
|
+
afterInsideRef: p,
|
|
396
|
+
portalNode: a,
|
|
397
|
+
setFocusManagerState: E
|
|
398
|
+
}), [a]);
|
|
399
|
+
return /* @__PURE__ */ Je(g.Fragment, {
|
|
400
|
+
children: [d, /* @__PURE__ */ Je(Fe.Provider, {
|
|
401
|
+
value: x,
|
|
402
|
+
children: [w && a && /* @__PURE__ */ U(ke, {
|
|
403
|
+
"data-type": "outside",
|
|
404
|
+
ref: f,
|
|
405
|
+
onFocus: (S) => {
|
|
406
|
+
if (Ce(S, a))
|
|
407
|
+
l.current?.focus();
|
|
408
|
+
else {
|
|
409
|
+
const y = m ? m.domReference : null;
|
|
410
|
+
kn(y)?.focus();
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}), w && a && /* @__PURE__ */ U("span", {
|
|
414
|
+
"aria-owns": a.id,
|
|
415
|
+
style: vn
|
|
416
|
+
}), a && /* @__PURE__ */ ht.createPortal(r, a), w && a && /* @__PURE__ */ U(ke, {
|
|
417
|
+
"data-type": "outside",
|
|
418
|
+
ref: b,
|
|
419
|
+
onFocus: (S) => {
|
|
420
|
+
if (Ce(S, a))
|
|
421
|
+
p.current?.focus();
|
|
422
|
+
else {
|
|
423
|
+
const y = m ? m.domReference : null;
|
|
424
|
+
Ln(y)?.focus(), m?.closeOnFocusOut && m?.onOpenChange(!1, te(nn, S.nativeEvent));
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
})]
|
|
428
|
+
})]
|
|
429
|
+
});
|
|
430
|
+
});
|
|
431
|
+
process.env.NODE_ENV !== "production" && (Vn.displayName = "FloatingPortal");
|
|
432
|
+
function wt() {
|
|
433
|
+
const n = /* @__PURE__ */ new Map();
|
|
434
|
+
return {
|
|
435
|
+
emit(e, t) {
|
|
436
|
+
n.get(e)?.forEach((r) => r(t));
|
|
437
|
+
},
|
|
438
|
+
on(e, t) {
|
|
439
|
+
n.has(e) || n.set(e, /* @__PURE__ */ new Set()), n.get(e).add(t);
|
|
440
|
+
},
|
|
441
|
+
off(e, t) {
|
|
442
|
+
n.get(e)?.delete(t);
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
class Fn {
|
|
447
|
+
nodesRef = {
|
|
448
|
+
current: []
|
|
449
|
+
};
|
|
450
|
+
events = wt();
|
|
451
|
+
addNode(e) {
|
|
452
|
+
this.nodesRef.current.push(e);
|
|
453
|
+
}
|
|
454
|
+
removeNode(e) {
|
|
455
|
+
const t = this.nodesRef.current.findIndex((r) => r === e);
|
|
456
|
+
t !== -1 && this.nodesRef.current.splice(t, 1);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
const je = /* @__PURE__ */ g.createContext(null);
|
|
460
|
+
process.env.NODE_ENV !== "production" && (je.displayName = "FloatingNodeContext");
|
|
461
|
+
const Ke = /* @__PURE__ */ g.createContext(null);
|
|
462
|
+
process.env.NODE_ENV !== "production" && (Ke.displayName = "FloatingTreeContext");
|
|
463
|
+
const xt = () => g.useContext(je)?.id || null, Nt = (n) => {
|
|
464
|
+
const e = g.useContext(Ke);
|
|
465
|
+
return n ?? e;
|
|
466
|
+
};
|
|
467
|
+
function to(n) {
|
|
468
|
+
const e = mt(), t = Nt(n), r = xt();
|
|
469
|
+
return H(() => {
|
|
470
|
+
if (!e)
|
|
471
|
+
return;
|
|
472
|
+
const o = {
|
|
473
|
+
id: e,
|
|
474
|
+
parentId: r
|
|
475
|
+
};
|
|
476
|
+
return t?.addNode(o), () => {
|
|
477
|
+
t?.removeNode(o);
|
|
478
|
+
};
|
|
479
|
+
}, [t, e, r]), e;
|
|
480
|
+
}
|
|
481
|
+
function no(n) {
|
|
482
|
+
const {
|
|
483
|
+
children: e,
|
|
484
|
+
id: t
|
|
485
|
+
} = n, r = xt();
|
|
486
|
+
return /* @__PURE__ */ U(je.Provider, {
|
|
487
|
+
value: g.useMemo(() => ({
|
|
488
|
+
id: t,
|
|
489
|
+
parentId: r
|
|
490
|
+
}), [t, r]),
|
|
491
|
+
children: e
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
function ro(n) {
|
|
495
|
+
const {
|
|
496
|
+
children: e,
|
|
497
|
+
externalTree: t
|
|
498
|
+
} = n, r = vt(() => t ?? new Fn()).current;
|
|
499
|
+
return /* @__PURE__ */ U(Ke.Provider, {
|
|
500
|
+
value: r,
|
|
501
|
+
children: e
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
const jn = {
|
|
505
|
+
intentional: "onClick",
|
|
506
|
+
sloppy: "onPointerDown"
|
|
507
|
+
};
|
|
508
|
+
function Kn() {
|
|
509
|
+
return !1;
|
|
510
|
+
}
|
|
511
|
+
function Hn(n) {
|
|
512
|
+
return {
|
|
513
|
+
escapeKey: typeof n == "boolean" ? n : n?.escapeKey ?? !1,
|
|
514
|
+
outsidePress: typeof n == "boolean" ? n : n?.outsidePress ?? !0
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
function oo(n, e = {}) {
|
|
518
|
+
const t = "rootStore" in n ? n.rootStore : n, r = t.useState("open"), o = t.useState("floatingElement"), {
|
|
519
|
+
dataRef: s
|
|
520
|
+
} = t.context, {
|
|
521
|
+
enabled: i = !0,
|
|
522
|
+
escapeKey: u = !0,
|
|
523
|
+
outsidePress: h = !0,
|
|
524
|
+
outsidePressEvent: a = "sloppy",
|
|
525
|
+
referencePress: d = Kn,
|
|
526
|
+
referencePressEvent: f = "sloppy",
|
|
527
|
+
bubbles: b,
|
|
528
|
+
externalTree: l
|
|
529
|
+
} = e, p = Nt(l), m = D(typeof h == "function" ? h : () => !1), E = typeof h == "function" ? m : h, T = E !== !1, N = D(() => a), w = g.useRef(!1), x = g.useRef(!1), S = g.useRef(!1), {
|
|
530
|
+
escapeKey: y,
|
|
531
|
+
outsidePress: C
|
|
532
|
+
} = Hn(b), O = g.useRef(null), M = Qe(), re = Qe(), V = D(() => {
|
|
533
|
+
re.clear(), s.current.insideReactTree = !1;
|
|
534
|
+
}), be = g.useRef(!1), Ee = g.useRef(""), ye = D(d), j = D((I) => {
|
|
535
|
+
if (!r || !i || !u || I.key !== "Escape" || be.current)
|
|
536
|
+
return;
|
|
537
|
+
const F = s.current.floatingContext?.nodeId, Y = p ? fe(p.nodesRef.current, F) : [];
|
|
538
|
+
if (!y && Y.length > 0) {
|
|
539
|
+
let J = !0;
|
|
540
|
+
if (Y.forEach((A) => {
|
|
541
|
+
A.context?.open && !A.context.dataRef.current.__escapeKeyBubbles && (J = !1);
|
|
542
|
+
}), !J)
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
const oe = hn(I) ? I.nativeEvent : I, X = te(rn, oe);
|
|
546
|
+
t.setOpen(!1, X), !y && !X.isPropagationAllowed && I.stopPropagation();
|
|
547
|
+
}), K = D(() => {
|
|
548
|
+
s.current.insideReactTree = !0, re.start(0, V);
|
|
549
|
+
});
|
|
550
|
+
g.useEffect(() => {
|
|
551
|
+
if (!r || !i)
|
|
552
|
+
return;
|
|
553
|
+
s.current.__escapeKeyBubbles = y, s.current.__outsidePressBubbles = C;
|
|
554
|
+
const I = new et(), F = new et();
|
|
555
|
+
function Y() {
|
|
556
|
+
I.clear(), be.current = !0;
|
|
557
|
+
}
|
|
558
|
+
function oe() {
|
|
559
|
+
I.start(
|
|
560
|
+
// 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
|
|
561
|
+
// Only apply to WebKit for the test to remain 0ms.
|
|
562
|
+
Yt() ? 5 : 0,
|
|
563
|
+
() => {
|
|
564
|
+
be.current = !1;
|
|
565
|
+
}
|
|
566
|
+
);
|
|
567
|
+
}
|
|
568
|
+
function X() {
|
|
569
|
+
S.current = !0, F.start(0, () => {
|
|
570
|
+
S.current = !1;
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
function J() {
|
|
574
|
+
w.current = !1, x.current = !1;
|
|
575
|
+
}
|
|
576
|
+
function A() {
|
|
577
|
+
const c = Ee.current, v = c === "pen" || !c ? "mouse" : c, _ = N(), L = typeof _ == "function" ? _() : _;
|
|
578
|
+
return typeof L == "string" ? L : L[v];
|
|
579
|
+
}
|
|
580
|
+
function Dt(c) {
|
|
581
|
+
const v = A();
|
|
582
|
+
return v === "intentional" && c.type !== "click" || v === "sloppy" && c.type === "click";
|
|
583
|
+
}
|
|
584
|
+
function We(c) {
|
|
585
|
+
const v = s.current.floatingContext?.nodeId, _ = p && fe(p.nodesRef.current, v).some((L) => P(c, L.context?.elements.floating));
|
|
586
|
+
return P(c, t.select("floatingElement")) || P(c, t.select("domReferenceElement")) || _;
|
|
587
|
+
}
|
|
588
|
+
function se(c) {
|
|
589
|
+
if (Dt(c)) {
|
|
590
|
+
V();
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
if (s.current.insideReactTree) {
|
|
594
|
+
V();
|
|
595
|
+
return;
|
|
596
|
+
}
|
|
597
|
+
const v = G(c), _ = `[${_t("inert")}]`;
|
|
598
|
+
let L = Array.from(q(t.select("floatingElement")).querySelectorAll(_));
|
|
599
|
+
const Z = ie(v) ? v.getRootNode() : null;
|
|
600
|
+
Xt(Z) && (L = L.concat(Array.from(Z.querySelectorAll(_))));
|
|
601
|
+
const $e = t.context.triggerElements;
|
|
602
|
+
if (v && ($e.hasElement(v) || $e.hasMatchingElement((k) => ne(k, v))))
|
|
603
|
+
return;
|
|
604
|
+
let Q = ie(v) ? v : null;
|
|
605
|
+
for (; Q && !Te(Q); ) {
|
|
606
|
+
const k = Jt(Q);
|
|
607
|
+
if (Te(k) || !ie(k))
|
|
608
|
+
break;
|
|
609
|
+
Q = k;
|
|
610
|
+
}
|
|
611
|
+
if (L.length && ie(v) && !dn(v) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
|
|
612
|
+
!ne(v, t.select("floatingElement")) && // If the target root element contains none of the markers, then the
|
|
613
|
+
// element was injected after the floating element rendered.
|
|
614
|
+
L.every((k) => !ne(Q, k)))
|
|
615
|
+
return;
|
|
616
|
+
if (Zt(v) && !("touches" in c)) {
|
|
617
|
+
const k = Te(v), W = Qt(v), Xe = /auto|scroll/, Ht = k || Xe.test(W.overflowX), zt = k || Xe.test(W.overflowY), Bt = Ht && v.clientWidth > 0 && v.scrollWidth > v.clientWidth, Wt = zt && v.clientHeight > 0 && v.scrollHeight > v.clientHeight, Gt = W.direction === "rtl", Ut = Wt && (Gt ? c.offsetX <= v.offsetWidth - v.clientWidth : c.offsetX > v.clientWidth), qt = Bt && c.offsetY > v.clientHeight;
|
|
618
|
+
if (Ut || qt)
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
if (We(c))
|
|
622
|
+
return;
|
|
623
|
+
if (A() === "intentional" && S.current) {
|
|
624
|
+
F.clear(), S.current = !1;
|
|
625
|
+
return;
|
|
626
|
+
}
|
|
627
|
+
if (typeof E == "function" && !E(c))
|
|
628
|
+
return;
|
|
629
|
+
const Kt = s.current.floatingContext?.nodeId, Ye = p ? fe(p.nodesRef.current, Kt) : [];
|
|
630
|
+
if (Ye.length > 0) {
|
|
631
|
+
let k = !0;
|
|
632
|
+
if (Ye.forEach((W) => {
|
|
633
|
+
W.context?.open && !W.context.dataRef.current.__outsidePressBubbles && (k = !1);
|
|
634
|
+
}), !k)
|
|
635
|
+
return;
|
|
636
|
+
}
|
|
637
|
+
t.setOpen(!1, te(on, c)), V();
|
|
638
|
+
}
|
|
639
|
+
function Mt(c) {
|
|
640
|
+
A() !== "sloppy" || c.pointerType === "touch" || !t.select("open") || !i || P(c, t.select("floatingElement")) || P(c, t.select("domReferenceElement")) || se(c);
|
|
641
|
+
}
|
|
642
|
+
function Vt(c) {
|
|
643
|
+
if (A() !== "sloppy" || !t.select("open") || !i || P(c, t.select("floatingElement")) || P(c, t.select("domReferenceElement")))
|
|
644
|
+
return;
|
|
645
|
+
const v = c.touches[0];
|
|
646
|
+
v && (O.current = {
|
|
647
|
+
startTime: Date.now(),
|
|
648
|
+
startX: v.clientX,
|
|
649
|
+
startY: v.clientY,
|
|
650
|
+
dismissOnTouchEnd: !1,
|
|
651
|
+
dismissOnMouseDown: !0
|
|
652
|
+
}, M.start(1e3, () => {
|
|
653
|
+
O.current && (O.current.dismissOnTouchEnd = !1, O.current.dismissOnMouseDown = !1);
|
|
654
|
+
}));
|
|
655
|
+
}
|
|
656
|
+
function Ge(c) {
|
|
657
|
+
Ee.current = "touch";
|
|
658
|
+
const v = G(c);
|
|
659
|
+
function _() {
|
|
660
|
+
Vt(c), v?.removeEventListener(c.type, _);
|
|
661
|
+
}
|
|
662
|
+
v?.addEventListener(c.type, _);
|
|
663
|
+
}
|
|
664
|
+
function z(c) {
|
|
665
|
+
if (M.clear(), c.type === "pointerdown" && (Ee.current = c.pointerType), c.type === "mousedown" && O.current && !O.current.dismissOnMouseDown)
|
|
666
|
+
return;
|
|
667
|
+
const v = G(c);
|
|
668
|
+
function _() {
|
|
669
|
+
c.type === "pointerdown" ? Mt(c) : se(c), v?.removeEventListener(c.type, _);
|
|
670
|
+
}
|
|
671
|
+
v?.addEventListener(c.type, _);
|
|
672
|
+
}
|
|
673
|
+
function B(c) {
|
|
674
|
+
if (!w.current)
|
|
675
|
+
return;
|
|
676
|
+
const v = x.current;
|
|
677
|
+
if (J(), A() === "intentional") {
|
|
678
|
+
if (c.type === "pointercancel") {
|
|
679
|
+
v && X();
|
|
680
|
+
return;
|
|
681
|
+
}
|
|
682
|
+
if (!We(c)) {
|
|
683
|
+
if (v) {
|
|
684
|
+
X();
|
|
685
|
+
return;
|
|
686
|
+
}
|
|
687
|
+
typeof E == "function" && !E(c) || (F.clear(), S.current = !0, V());
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
function Ft(c) {
|
|
692
|
+
if (A() !== "sloppy" || !O.current || P(c, t.select("floatingElement")) || P(c, t.select("domReferenceElement")))
|
|
693
|
+
return;
|
|
694
|
+
const v = c.touches[0];
|
|
695
|
+
if (!v)
|
|
696
|
+
return;
|
|
697
|
+
const _ = Math.abs(v.clientX - O.current.startX), L = Math.abs(v.clientY - O.current.startY), Z = Math.sqrt(_ * _ + L * L);
|
|
698
|
+
Z > 5 && (O.current.dismissOnTouchEnd = !0), Z > 10 && (se(c), M.clear(), O.current = null);
|
|
699
|
+
}
|
|
700
|
+
function Ue(c) {
|
|
701
|
+
const v = G(c);
|
|
702
|
+
function _() {
|
|
703
|
+
Ft(c), v?.removeEventListener(c.type, _);
|
|
704
|
+
}
|
|
705
|
+
v?.addEventListener(c.type, _);
|
|
706
|
+
}
|
|
707
|
+
function jt(c) {
|
|
708
|
+
A() !== "sloppy" || !O.current || P(c, t.select("floatingElement")) || P(c, t.select("domReferenceElement")) || (O.current.dismissOnTouchEnd && se(c), M.clear(), O.current = null);
|
|
709
|
+
}
|
|
710
|
+
function qe(c) {
|
|
711
|
+
const v = G(c);
|
|
712
|
+
function _() {
|
|
713
|
+
jt(c), v?.removeEventListener(c.type, _);
|
|
714
|
+
}
|
|
715
|
+
v?.addEventListener(c.type, _);
|
|
716
|
+
}
|
|
717
|
+
const R = q(o);
|
|
718
|
+
return u && (R.addEventListener("keydown", j), R.addEventListener("compositionstart", Y), R.addEventListener("compositionend", oe)), T && (R.addEventListener("click", z, !0), R.addEventListener("pointerdown", z, !0), R.addEventListener("pointerup", B, !0), R.addEventListener("pointercancel", B, !0), R.addEventListener("mousedown", z, !0), R.addEventListener("mouseup", B, !0), R.addEventListener("touchstart", Ge, !0), R.addEventListener("touchmove", Ue, !0), R.addEventListener("touchend", qe, !0)), () => {
|
|
719
|
+
u && (R.removeEventListener("keydown", j), R.removeEventListener("compositionstart", Y), R.removeEventListener("compositionend", oe)), T && (R.removeEventListener("click", z, !0), R.removeEventListener("pointerdown", z, !0), R.removeEventListener("pointerup", B, !0), R.removeEventListener("pointercancel", B, !0), R.removeEventListener("mousedown", z, !0), R.removeEventListener("mouseup", B, !0), R.removeEventListener("touchstart", Ge, !0), R.removeEventListener("touchmove", Ue, !0), R.removeEventListener("touchend", qe, !0)), I.clear(), F.clear(), J(), S.current = !1;
|
|
720
|
+
};
|
|
721
|
+
}, [s, o, u, T, E, r, i, y, C, j, V, N, p, t, M]), g.useEffect(V, [E, V]);
|
|
722
|
+
const Se = g.useMemo(() => ({
|
|
723
|
+
onKeyDown: j,
|
|
724
|
+
[jn[f]]: (I) => {
|
|
725
|
+
ye() && t.setOpen(!1, te(Ze, I.nativeEvent));
|
|
726
|
+
},
|
|
727
|
+
...f !== "intentional" && {
|
|
728
|
+
onClick(I) {
|
|
729
|
+
ye() && t.setOpen(!1, te(Ze, I.nativeEvent));
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
}), [j, t, f, ye]), Oe = D((I) => {
|
|
733
|
+
if (!r || !i || I.button !== 0)
|
|
734
|
+
return;
|
|
735
|
+
const F = G(I.nativeEvent);
|
|
736
|
+
ne(t.select("floatingElement"), F) && (w.current || (w.current = !0, x.current = !1));
|
|
737
|
+
}), Re = D((I) => {
|
|
738
|
+
!r || !i || (I.defaultPrevented || I.nativeEvent.defaultPrevented) && w.current && (x.current = !0);
|
|
739
|
+
}), Be = g.useMemo(() => ({
|
|
740
|
+
onKeyDown: j,
|
|
741
|
+
// `onMouseDown` may be blocked if `event.preventDefault()` is called in
|
|
742
|
+
// `onPointerDown`, such as with <NumberField.ScrubArea>.
|
|
743
|
+
// See https://github.com/mui/base-ui/pull/3379
|
|
744
|
+
onPointerDown: Re,
|
|
745
|
+
onMouseDown: Re,
|
|
746
|
+
onClickCapture: K,
|
|
747
|
+
onMouseDownCapture(I) {
|
|
748
|
+
K(), Oe(I);
|
|
749
|
+
},
|
|
750
|
+
onPointerDownCapture(I) {
|
|
751
|
+
K(), Oe(I);
|
|
752
|
+
},
|
|
753
|
+
onMouseUpCapture: K,
|
|
754
|
+
onTouchEndCapture: K,
|
|
755
|
+
onTouchMoveCapture: K
|
|
756
|
+
}), [j, K, Oe, Re]);
|
|
757
|
+
return g.useMemo(() => i ? {
|
|
758
|
+
reference: Se,
|
|
759
|
+
floating: Be,
|
|
760
|
+
trigger: Se
|
|
761
|
+
} : {}, [i, Se, Be]);
|
|
762
|
+
}
|
|
763
|
+
var zn = (n, e, t) => {
|
|
764
|
+
if (e.length === 1 && e[0] === t) {
|
|
765
|
+
let r = !1;
|
|
766
|
+
try {
|
|
767
|
+
const o = {};
|
|
768
|
+
n(o) === o && (r = !0);
|
|
769
|
+
} catch {
|
|
770
|
+
}
|
|
771
|
+
if (r) {
|
|
772
|
+
let o;
|
|
773
|
+
try {
|
|
774
|
+
throw new Error();
|
|
775
|
+
} catch (s) {
|
|
776
|
+
({ stack: o } = s);
|
|
777
|
+
}
|
|
778
|
+
console.warn(
|
|
779
|
+
`The result function returned its own inputs without modification. e.g
|
|
780
|
+
\`createSelector([state => state.todos], todos => todos)\`
|
|
781
|
+
This could lead to inefficient memoization and unnecessary re-renders.
|
|
782
|
+
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,
|
|
783
|
+
{ stack: o }
|
|
784
|
+
);
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
}, Bn = (n, e, t) => {
|
|
788
|
+
const { memoize: r, memoizeOptions: o } = e, { inputSelectorResults: s, inputSelectorResultsCopy: i } = n, u = r(() => ({}), ...o);
|
|
789
|
+
if (!(u.apply(null, s) === u.apply(null, i))) {
|
|
790
|
+
let a;
|
|
791
|
+
try {
|
|
792
|
+
throw new Error();
|
|
793
|
+
} catch (d) {
|
|
794
|
+
({ stack: a } = d);
|
|
795
|
+
}
|
|
796
|
+
console.warn(
|
|
797
|
+
`An input selector returned a different result when passed same arguments.
|
|
798
|
+
This means your output selector will likely run more frequently than intended.
|
|
799
|
+
Avoid returning a new reference inside your input selector, e.g.
|
|
800
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,
|
|
801
|
+
{
|
|
802
|
+
arguments: t,
|
|
803
|
+
firstInputs: s,
|
|
804
|
+
secondInputs: i,
|
|
805
|
+
stack: a
|
|
806
|
+
}
|
|
807
|
+
);
|
|
808
|
+
}
|
|
809
|
+
}, Wn = {
|
|
810
|
+
inputStabilityCheck: "once",
|
|
811
|
+
identityFunctionCheck: "once"
|
|
812
|
+
}, ve = /* @__PURE__ */ Symbol("NOT_FOUND");
|
|
813
|
+
function Gn(n, e = `expected a function, instead received ${typeof n}`) {
|
|
814
|
+
if (typeof n != "function")
|
|
815
|
+
throw new TypeError(e);
|
|
816
|
+
}
|
|
817
|
+
function Un(n, e = `expected an object, instead received ${typeof n}`) {
|
|
818
|
+
if (typeof n != "object")
|
|
819
|
+
throw new TypeError(e);
|
|
820
|
+
}
|
|
821
|
+
function qn(n, e = "expected all items to be functions, instead received the following types: ") {
|
|
822
|
+
if (!n.every((t) => typeof t == "function")) {
|
|
823
|
+
const t = n.map(
|
|
824
|
+
(r) => typeof r == "function" ? `function ${r.name || "unnamed"}()` : typeof r
|
|
825
|
+
).join(", ");
|
|
826
|
+
throw new TypeError(`${e}[${t}]`);
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
var ot = (n) => Array.isArray(n) ? n : [n];
|
|
830
|
+
function $n(n) {
|
|
831
|
+
const e = Array.isArray(n[0]) ? n[0] : n;
|
|
832
|
+
return qn(
|
|
833
|
+
e,
|
|
834
|
+
"createSelector expects all input-selectors to be functions, but received the following types: "
|
|
835
|
+
), e;
|
|
836
|
+
}
|
|
837
|
+
function st(n, e) {
|
|
838
|
+
const t = [], { length: r } = n;
|
|
839
|
+
for (let o = 0; o < r; o++)
|
|
840
|
+
t.push(n[o].apply(null, e));
|
|
841
|
+
return t;
|
|
842
|
+
}
|
|
843
|
+
var Yn = (n, e) => {
|
|
844
|
+
const { identityFunctionCheck: t, inputStabilityCheck: r } = {
|
|
845
|
+
...Wn,
|
|
846
|
+
...e
|
|
847
|
+
};
|
|
848
|
+
return {
|
|
849
|
+
identityFunctionCheck: {
|
|
850
|
+
shouldRun: t === "always" || t === "once" && n,
|
|
851
|
+
run: zn
|
|
852
|
+
},
|
|
853
|
+
inputStabilityCheck: {
|
|
854
|
+
shouldRun: r === "always" || r === "once" && n,
|
|
855
|
+
run: Bn
|
|
856
|
+
}
|
|
857
|
+
};
|
|
858
|
+
};
|
|
859
|
+
function Xn(n) {
|
|
860
|
+
let e;
|
|
861
|
+
return {
|
|
862
|
+
get(t) {
|
|
863
|
+
return e && n(e.key, t) ? e.value : ve;
|
|
864
|
+
},
|
|
865
|
+
put(t, r) {
|
|
866
|
+
e = { key: t, value: r };
|
|
867
|
+
},
|
|
868
|
+
getEntries() {
|
|
869
|
+
return e ? [e] : [];
|
|
870
|
+
},
|
|
871
|
+
clear() {
|
|
872
|
+
e = void 0;
|
|
873
|
+
}
|
|
874
|
+
};
|
|
875
|
+
}
|
|
876
|
+
function Jn(n, e) {
|
|
877
|
+
let t = [];
|
|
878
|
+
function r(u) {
|
|
879
|
+
const h = t.findIndex((a) => e(u, a.key));
|
|
880
|
+
if (h > -1) {
|
|
881
|
+
const a = t[h];
|
|
882
|
+
return h > 0 && (t.splice(h, 1), t.unshift(a)), a.value;
|
|
883
|
+
}
|
|
884
|
+
return ve;
|
|
885
|
+
}
|
|
886
|
+
function o(u, h) {
|
|
887
|
+
r(u) === ve && (t.unshift({ key: u, value: h }), t.length > n && t.pop());
|
|
888
|
+
}
|
|
889
|
+
function s() {
|
|
890
|
+
return t;
|
|
891
|
+
}
|
|
892
|
+
function i() {
|
|
893
|
+
t = [];
|
|
894
|
+
}
|
|
895
|
+
return { get: r, put: o, getEntries: s, clear: i };
|
|
896
|
+
}
|
|
897
|
+
var Zn = (n, e) => n === e;
|
|
898
|
+
function Qn(n) {
|
|
899
|
+
return function(t, r) {
|
|
900
|
+
if (t === null || r === null || t.length !== r.length)
|
|
901
|
+
return !1;
|
|
902
|
+
const { length: o } = t;
|
|
903
|
+
for (let s = 0; s < o; s++)
|
|
904
|
+
if (!n(t[s], r[s]))
|
|
905
|
+
return !1;
|
|
906
|
+
return !0;
|
|
907
|
+
};
|
|
908
|
+
}
|
|
909
|
+
function er(n, e) {
|
|
910
|
+
const t = typeof e == "object" ? e : { equalityCheck: e }, {
|
|
911
|
+
equalityCheck: r = Zn,
|
|
912
|
+
maxSize: o = 1,
|
|
913
|
+
resultEqualityCheck: s
|
|
914
|
+
} = t, i = Qn(r);
|
|
915
|
+
let u = 0;
|
|
916
|
+
const h = o <= 1 ? Xn(i) : Jn(o, i);
|
|
917
|
+
function a() {
|
|
918
|
+
let d = h.get(arguments);
|
|
919
|
+
if (d === ve) {
|
|
920
|
+
if (d = n.apply(null, arguments), u++, s) {
|
|
921
|
+
const b = h.getEntries().find(
|
|
922
|
+
(l) => s(l.value, d)
|
|
923
|
+
);
|
|
924
|
+
b && (d = b.value, u !== 0 && u--);
|
|
925
|
+
}
|
|
926
|
+
h.put(arguments, d);
|
|
927
|
+
}
|
|
928
|
+
return d;
|
|
929
|
+
}
|
|
930
|
+
return a.clearCache = () => {
|
|
931
|
+
h.clear(), a.resetResultsCount();
|
|
932
|
+
}, a.resultsCount = () => u, a.resetResultsCount = () => {
|
|
933
|
+
u = 0;
|
|
934
|
+
}, a;
|
|
935
|
+
}
|
|
936
|
+
var tr = class {
|
|
937
|
+
constructor(n) {
|
|
938
|
+
this.value = n;
|
|
939
|
+
}
|
|
940
|
+
deref() {
|
|
941
|
+
return this.value;
|
|
942
|
+
}
|
|
943
|
+
}, nr = typeof WeakRef < "u" ? WeakRef : tr, rr = 0, it = 1;
|
|
944
|
+
function ae() {
|
|
945
|
+
return {
|
|
946
|
+
s: rr,
|
|
947
|
+
v: void 0,
|
|
948
|
+
o: null,
|
|
949
|
+
p: null
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
function Lt(n, e = {}) {
|
|
953
|
+
let t = ae();
|
|
954
|
+
const { resultEqualityCheck: r } = e;
|
|
955
|
+
let o, s = 0;
|
|
956
|
+
function i() {
|
|
957
|
+
let u = t;
|
|
958
|
+
const { length: h } = arguments;
|
|
959
|
+
for (let f = 0, b = h; f < b; f++) {
|
|
960
|
+
const l = arguments[f];
|
|
961
|
+
if (typeof l == "function" || typeof l == "object" && l !== null) {
|
|
962
|
+
let p = u.o;
|
|
963
|
+
p === null && (u.o = p = /* @__PURE__ */ new WeakMap());
|
|
964
|
+
const m = p.get(l);
|
|
965
|
+
m === void 0 ? (u = ae(), p.set(l, u)) : u = m;
|
|
966
|
+
} else {
|
|
967
|
+
let p = u.p;
|
|
968
|
+
p === null && (u.p = p = /* @__PURE__ */ new Map());
|
|
969
|
+
const m = p.get(l);
|
|
970
|
+
m === void 0 ? (u = ae(), p.set(l, u)) : u = m;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
const a = u;
|
|
974
|
+
let d;
|
|
975
|
+
if (u.s === it)
|
|
976
|
+
d = u.v;
|
|
977
|
+
else if (d = n.apply(null, arguments), s++, r) {
|
|
978
|
+
const f = o?.deref?.() ?? o;
|
|
979
|
+
f != null && r(f, d) && (d = f, s !== 0 && s--), o = typeof d == "object" && d !== null || typeof d == "function" ? new nr(d) : d;
|
|
980
|
+
}
|
|
981
|
+
return a.s = it, a.v = d, d;
|
|
982
|
+
}
|
|
983
|
+
return i.clearCache = () => {
|
|
984
|
+
t = ae(), i.resetResultsCount();
|
|
985
|
+
}, i.resultsCount = () => s, i.resetResultsCount = () => {
|
|
986
|
+
s = 0;
|
|
987
|
+
}, i;
|
|
988
|
+
}
|
|
989
|
+
function kt(n, ...e) {
|
|
990
|
+
const t = typeof n == "function" ? {
|
|
991
|
+
memoize: n,
|
|
992
|
+
memoizeOptions: e
|
|
993
|
+
} : n, r = (...o) => {
|
|
994
|
+
let s = 0, i = 0, u, h = {}, a = o.pop();
|
|
995
|
+
typeof a == "object" && (h = a, a = o.pop()), Gn(
|
|
996
|
+
a,
|
|
997
|
+
`createSelector expects an output function after the inputs, but received: [${typeof a}]`
|
|
998
|
+
);
|
|
999
|
+
const d = {
|
|
1000
|
+
...t,
|
|
1001
|
+
...h
|
|
1002
|
+
}, {
|
|
1003
|
+
memoize: f,
|
|
1004
|
+
memoizeOptions: b = [],
|
|
1005
|
+
argsMemoize: l = Lt,
|
|
1006
|
+
argsMemoizeOptions: p = [],
|
|
1007
|
+
devModeChecks: m = {}
|
|
1008
|
+
} = d, E = ot(b), T = ot(p), N = $n(o), w = f(function() {
|
|
1009
|
+
return s++, a.apply(
|
|
1010
|
+
null,
|
|
1011
|
+
arguments
|
|
1012
|
+
);
|
|
1013
|
+
}, ...E);
|
|
1014
|
+
let x = !0;
|
|
1015
|
+
const S = l(function() {
|
|
1016
|
+
i++;
|
|
1017
|
+
const C = st(
|
|
1018
|
+
N,
|
|
1019
|
+
arguments
|
|
1020
|
+
);
|
|
1021
|
+
if (u = w.apply(null, C), process.env.NODE_ENV !== "production") {
|
|
1022
|
+
const { identityFunctionCheck: O, inputStabilityCheck: M } = Yn(x, m);
|
|
1023
|
+
if (O.shouldRun && O.run(
|
|
1024
|
+
a,
|
|
1025
|
+
C,
|
|
1026
|
+
u
|
|
1027
|
+
), M.shouldRun) {
|
|
1028
|
+
const re = st(
|
|
1029
|
+
N,
|
|
1030
|
+
arguments
|
|
1031
|
+
);
|
|
1032
|
+
M.run(
|
|
1033
|
+
{ inputSelectorResults: C, inputSelectorResultsCopy: re },
|
|
1034
|
+
{ memoize: f, memoizeOptions: E },
|
|
1035
|
+
arguments
|
|
1036
|
+
);
|
|
1037
|
+
}
|
|
1038
|
+
x && (x = !1);
|
|
1039
|
+
}
|
|
1040
|
+
return u;
|
|
1041
|
+
}, ...T);
|
|
1042
|
+
return Object.assign(S, {
|
|
1043
|
+
resultFunc: a,
|
|
1044
|
+
memoizedResultFunc: w,
|
|
1045
|
+
dependencies: N,
|
|
1046
|
+
dependencyRecomputations: () => i,
|
|
1047
|
+
resetDependencyRecomputations: () => {
|
|
1048
|
+
i = 0;
|
|
1049
|
+
},
|
|
1050
|
+
lastResult: () => u,
|
|
1051
|
+
recomputations: () => s,
|
|
1052
|
+
resetRecomputations: () => {
|
|
1053
|
+
s = 0;
|
|
1054
|
+
},
|
|
1055
|
+
memoize: f,
|
|
1056
|
+
argsMemoize: l
|
|
1057
|
+
});
|
|
1058
|
+
};
|
|
1059
|
+
return Object.assign(r, {
|
|
1060
|
+
withTypes: () => r
|
|
1061
|
+
}), r;
|
|
1062
|
+
}
|
|
1063
|
+
var or = /* @__PURE__ */ kt(Lt), sr = Object.assign(
|
|
1064
|
+
(n, e = or) => {
|
|
1065
|
+
Un(
|
|
1066
|
+
n,
|
|
1067
|
+
`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof n}`
|
|
1068
|
+
);
|
|
1069
|
+
const t = Object.keys(n), r = t.map(
|
|
1070
|
+
(s) => n[s]
|
|
1071
|
+
);
|
|
1072
|
+
return e(
|
|
1073
|
+
r,
|
|
1074
|
+
(...s) => s.reduce((i, u, h) => (i[t[h]] = u, i), {})
|
|
1075
|
+
);
|
|
1076
|
+
},
|
|
1077
|
+
{ withTypes: () => sr }
|
|
1078
|
+
);
|
|
1079
|
+
kt({
|
|
1080
|
+
memoize: er,
|
|
1081
|
+
memoizeOptions: {
|
|
1082
|
+
maxSize: 1,
|
|
1083
|
+
equalityCheck: Object.is
|
|
1084
|
+
}
|
|
1085
|
+
});
|
|
1086
|
+
const ee = (n, e, t, r, o, s, ...i) => {
|
|
1087
|
+
if (i.length > 0)
|
|
1088
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "Unsupported number of selectors" : un(1));
|
|
1089
|
+
let u;
|
|
1090
|
+
if (n)
|
|
1091
|
+
u = n;
|
|
1092
|
+
else
|
|
1093
|
+
throw (
|
|
1094
|
+
/* minify-error-disabled */
|
|
1095
|
+
new Error("Missing arguments")
|
|
1096
|
+
);
|
|
1097
|
+
return u;
|
|
1098
|
+
};
|
|
1099
|
+
var ue = { exports: {} }, Ie = {};
|
|
1100
|
+
var at;
|
|
1101
|
+
function ir() {
|
|
1102
|
+
if (at) return Ie;
|
|
1103
|
+
at = 1;
|
|
1104
|
+
var n = ge;
|
|
1105
|
+
function e(f, b) {
|
|
1106
|
+
return f === b && (f !== 0 || 1 / f === 1 / b) || f !== f && b !== b;
|
|
1107
|
+
}
|
|
1108
|
+
var t = typeof Object.is == "function" ? Object.is : e, r = n.useState, o = n.useEffect, s = n.useLayoutEffect, i = n.useDebugValue;
|
|
1109
|
+
function u(f, b) {
|
|
1110
|
+
var l = b(), p = r({ inst: { value: l, getSnapshot: b } }), m = p[0].inst, E = p[1];
|
|
1111
|
+
return s(
|
|
1112
|
+
function() {
|
|
1113
|
+
m.value = l, m.getSnapshot = b, h(m) && E({ inst: m });
|
|
1114
|
+
},
|
|
1115
|
+
[f, l, b]
|
|
1116
|
+
), o(
|
|
1117
|
+
function() {
|
|
1118
|
+
return h(m) && E({ inst: m }), f(function() {
|
|
1119
|
+
h(m) && E({ inst: m });
|
|
1120
|
+
});
|
|
1121
|
+
},
|
|
1122
|
+
[f]
|
|
1123
|
+
), i(l), l;
|
|
1124
|
+
}
|
|
1125
|
+
function h(f) {
|
|
1126
|
+
var b = f.getSnapshot;
|
|
1127
|
+
f = f.value;
|
|
1128
|
+
try {
|
|
1129
|
+
var l = b();
|
|
1130
|
+
return !t(f, l);
|
|
1131
|
+
} catch {
|
|
1132
|
+
return !0;
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
function a(f, b) {
|
|
1136
|
+
return b();
|
|
1137
|
+
}
|
|
1138
|
+
var d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? a : u;
|
|
1139
|
+
return Ie.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : d, Ie;
|
|
1140
|
+
}
|
|
1141
|
+
var _e = {};
|
|
1142
|
+
var ut;
|
|
1143
|
+
function ar() {
|
|
1144
|
+
return ut || (ut = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
1145
|
+
function n(l, p) {
|
|
1146
|
+
return l === p && (l !== 0 || 1 / l === 1 / p) || l !== l && p !== p;
|
|
1147
|
+
}
|
|
1148
|
+
function e(l, p) {
|
|
1149
|
+
d || o.startTransition === void 0 || (d = !0, console.error(
|
|
1150
|
+
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
1151
|
+
));
|
|
1152
|
+
var m = p();
|
|
1153
|
+
if (!f) {
|
|
1154
|
+
var E = p();
|
|
1155
|
+
s(m, E) || (console.error(
|
|
1156
|
+
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
1157
|
+
), f = !0);
|
|
1158
|
+
}
|
|
1159
|
+
E = i({
|
|
1160
|
+
inst: { value: m, getSnapshot: p }
|
|
1161
|
+
});
|
|
1162
|
+
var T = E[0].inst, N = E[1];
|
|
1163
|
+
return h(
|
|
1164
|
+
function() {
|
|
1165
|
+
T.value = m, T.getSnapshot = p, t(T) && N({ inst: T });
|
|
1166
|
+
},
|
|
1167
|
+
[l, m, p]
|
|
1168
|
+
), u(
|
|
1169
|
+
function() {
|
|
1170
|
+
return t(T) && N({ inst: T }), l(function() {
|
|
1171
|
+
t(T) && N({ inst: T });
|
|
1172
|
+
});
|
|
1173
|
+
},
|
|
1174
|
+
[l]
|
|
1175
|
+
), a(m), m;
|
|
1176
|
+
}
|
|
1177
|
+
function t(l) {
|
|
1178
|
+
var p = l.getSnapshot;
|
|
1179
|
+
l = l.value;
|
|
1180
|
+
try {
|
|
1181
|
+
var m = p();
|
|
1182
|
+
return !s(l, m);
|
|
1183
|
+
} catch {
|
|
1184
|
+
return !0;
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
function r(l, p) {
|
|
1188
|
+
return p();
|
|
1189
|
+
}
|
|
1190
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1191
|
+
var o = ge, s = typeof Object.is == "function" ? Object.is : n, i = o.useState, u = o.useEffect, h = o.useLayoutEffect, a = o.useDebugValue, d = !1, f = !1, b = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : e;
|
|
1192
|
+
_e.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : b, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1193
|
+
})()), _e;
|
|
1194
|
+
}
|
|
1195
|
+
var ct;
|
|
1196
|
+
function He() {
|
|
1197
|
+
return ct || (ct = 1, process.env.NODE_ENV === "production" ? ue.exports = ir() : ue.exports = ar()), ue.exports;
|
|
1198
|
+
}
|
|
1199
|
+
var Pt = He(), ce = { exports: {} }, we = {};
|
|
1200
|
+
var lt;
|
|
1201
|
+
function ur() {
|
|
1202
|
+
if (lt) return we;
|
|
1203
|
+
lt = 1;
|
|
1204
|
+
var n = ge, e = He();
|
|
1205
|
+
function t(a, d) {
|
|
1206
|
+
return a === d && (a !== 0 || 1 / a === 1 / d) || a !== a && d !== d;
|
|
1207
|
+
}
|
|
1208
|
+
var r = typeof Object.is == "function" ? Object.is : t, o = e.useSyncExternalStore, s = n.useRef, i = n.useEffect, u = n.useMemo, h = n.useDebugValue;
|
|
1209
|
+
return we.useSyncExternalStoreWithSelector = function(a, d, f, b, l) {
|
|
1210
|
+
var p = s(null);
|
|
1211
|
+
if (p.current === null) {
|
|
1212
|
+
var m = { hasValue: !1, value: null };
|
|
1213
|
+
p.current = m;
|
|
1214
|
+
} else m = p.current;
|
|
1215
|
+
p = u(
|
|
1216
|
+
function() {
|
|
1217
|
+
function T(y) {
|
|
1218
|
+
if (!N) {
|
|
1219
|
+
if (N = !0, w = y, y = b(y), l !== void 0 && m.hasValue) {
|
|
1220
|
+
var C = m.value;
|
|
1221
|
+
if (l(C, y))
|
|
1222
|
+
return x = C;
|
|
1223
|
+
}
|
|
1224
|
+
return x = y;
|
|
1225
|
+
}
|
|
1226
|
+
if (C = x, r(w, y)) return C;
|
|
1227
|
+
var O = b(y);
|
|
1228
|
+
return l !== void 0 && l(C, O) ? (w = y, C) : (w = y, x = O);
|
|
1229
|
+
}
|
|
1230
|
+
var N = !1, w, x, S = f === void 0 ? null : f;
|
|
1231
|
+
return [
|
|
1232
|
+
function() {
|
|
1233
|
+
return T(d());
|
|
1234
|
+
},
|
|
1235
|
+
S === null ? void 0 : function() {
|
|
1236
|
+
return T(S());
|
|
1237
|
+
}
|
|
1238
|
+
];
|
|
1239
|
+
},
|
|
1240
|
+
[d, f, b, l]
|
|
1241
|
+
);
|
|
1242
|
+
var E = o(a, p[0], p[1]);
|
|
1243
|
+
return i(
|
|
1244
|
+
function() {
|
|
1245
|
+
m.hasValue = !0, m.value = E;
|
|
1246
|
+
},
|
|
1247
|
+
[E]
|
|
1248
|
+
), h(E), E;
|
|
1249
|
+
}, we;
|
|
1250
|
+
}
|
|
1251
|
+
var xe = {};
|
|
1252
|
+
var ft;
|
|
1253
|
+
function cr() {
|
|
1254
|
+
return ft || (ft = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
1255
|
+
function n(a, d) {
|
|
1256
|
+
return a === d && (a !== 0 || 1 / a === 1 / d) || a !== a && d !== d;
|
|
1257
|
+
}
|
|
1258
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1259
|
+
var e = ge, t = He(), r = typeof Object.is == "function" ? Object.is : n, o = t.useSyncExternalStore, s = e.useRef, i = e.useEffect, u = e.useMemo, h = e.useDebugValue;
|
|
1260
|
+
xe.useSyncExternalStoreWithSelector = function(a, d, f, b, l) {
|
|
1261
|
+
var p = s(null);
|
|
1262
|
+
if (p.current === null) {
|
|
1263
|
+
var m = { hasValue: !1, value: null };
|
|
1264
|
+
p.current = m;
|
|
1265
|
+
} else m = p.current;
|
|
1266
|
+
p = u(
|
|
1267
|
+
function() {
|
|
1268
|
+
function T(y) {
|
|
1269
|
+
if (!N) {
|
|
1270
|
+
if (N = !0, w = y, y = b(y), l !== void 0 && m.hasValue) {
|
|
1271
|
+
var C = m.value;
|
|
1272
|
+
if (l(C, y))
|
|
1273
|
+
return x = C;
|
|
1274
|
+
}
|
|
1275
|
+
return x = y;
|
|
1276
|
+
}
|
|
1277
|
+
if (C = x, r(w, y))
|
|
1278
|
+
return C;
|
|
1279
|
+
var O = b(y);
|
|
1280
|
+
return l !== void 0 && l(C, O) ? (w = y, C) : (w = y, x = O);
|
|
1281
|
+
}
|
|
1282
|
+
var N = !1, w, x, S = f === void 0 ? null : f;
|
|
1283
|
+
return [
|
|
1284
|
+
function() {
|
|
1285
|
+
return T(d());
|
|
1286
|
+
},
|
|
1287
|
+
S === null ? void 0 : function() {
|
|
1288
|
+
return T(S());
|
|
1289
|
+
}
|
|
1290
|
+
];
|
|
1291
|
+
},
|
|
1292
|
+
[d, f, b, l]
|
|
1293
|
+
);
|
|
1294
|
+
var E = o(a, p[0], p[1]);
|
|
1295
|
+
return i(
|
|
1296
|
+
function() {
|
|
1297
|
+
m.hasValue = !0, m.value = E;
|
|
1298
|
+
},
|
|
1299
|
+
[E]
|
|
1300
|
+
), h(E), E;
|
|
1301
|
+
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1302
|
+
})()), xe;
|
|
1303
|
+
}
|
|
1304
|
+
var dt;
|
|
1305
|
+
function lr() {
|
|
1306
|
+
return dt || (dt = 1, process.env.NODE_ENV === "production" ? ce.exports = ur() : ce.exports = cr()), ce.exports;
|
|
1307
|
+
}
|
|
1308
|
+
var fr = lr();
|
|
1309
|
+
const Pe = [];
|
|
1310
|
+
let Ae;
|
|
1311
|
+
function dr() {
|
|
1312
|
+
return Ae;
|
|
1313
|
+
}
|
|
1314
|
+
function pr(n) {
|
|
1315
|
+
Pe.push(n);
|
|
1316
|
+
}
|
|
1317
|
+
function hr(n) {
|
|
1318
|
+
const e = (t, r) => {
|
|
1319
|
+
const o = vt(mr).current;
|
|
1320
|
+
let s;
|
|
1321
|
+
try {
|
|
1322
|
+
Ae = o;
|
|
1323
|
+
for (const i of Pe)
|
|
1324
|
+
i.before(o);
|
|
1325
|
+
s = n(t, r);
|
|
1326
|
+
for (const i of Pe)
|
|
1327
|
+
i.after(o);
|
|
1328
|
+
o.didInitialize = !0;
|
|
1329
|
+
} finally {
|
|
1330
|
+
Ae = void 0;
|
|
1331
|
+
}
|
|
1332
|
+
return s;
|
|
1333
|
+
};
|
|
1334
|
+
return e.displayName = n.displayName || n.name, e;
|
|
1335
|
+
}
|
|
1336
|
+
function so(n) {
|
|
1337
|
+
return /* @__PURE__ */ g.forwardRef(hr(n));
|
|
1338
|
+
}
|
|
1339
|
+
function mr() {
|
|
1340
|
+
return {
|
|
1341
|
+
didInitialize: !1
|
|
1342
|
+
};
|
|
1343
|
+
}
|
|
1344
|
+
const vr = cn(19), gr = vr ? Er : yr;
|
|
1345
|
+
function At(n, e, t, r, o) {
|
|
1346
|
+
return gr(n, e, t, r, o);
|
|
1347
|
+
}
|
|
1348
|
+
function br(n, e, t, r, o) {
|
|
1349
|
+
const s = g.useCallback(() => e(n.getSnapshot(), t, r, o), [n, e, t, r, o]);
|
|
1350
|
+
return Pt.useSyncExternalStore(n.subscribe, s, s);
|
|
1351
|
+
}
|
|
1352
|
+
pr({
|
|
1353
|
+
before(n) {
|
|
1354
|
+
n.syncIndex = 0, n.didInitialize || (n.syncTick = 1, n.syncHooks = [], n.didChangeStore = !0, n.getSnapshot = () => {
|
|
1355
|
+
let e = !1;
|
|
1356
|
+
for (let t = 0; t < n.syncHooks.length; t += 1) {
|
|
1357
|
+
const r = n.syncHooks[t], o = r.selector(r.store.state, r.a1, r.a2, r.a3);
|
|
1358
|
+
(r.didChange || !Object.is(r.value, o)) && (e = !0, r.value = o, r.didChange = !1);
|
|
1359
|
+
}
|
|
1360
|
+
return e && (n.syncTick += 1), n.syncTick;
|
|
1361
|
+
});
|
|
1362
|
+
},
|
|
1363
|
+
after(n) {
|
|
1364
|
+
n.syncHooks.length > 0 && (n.didChangeStore && (n.didChangeStore = !1, n.subscribe = (e) => {
|
|
1365
|
+
const t = /* @__PURE__ */ new Set();
|
|
1366
|
+
for (const o of n.syncHooks)
|
|
1367
|
+
t.add(o.store);
|
|
1368
|
+
const r = [];
|
|
1369
|
+
for (const o of t)
|
|
1370
|
+
r.push(o.subscribe(e));
|
|
1371
|
+
return () => {
|
|
1372
|
+
for (const o of r)
|
|
1373
|
+
o();
|
|
1374
|
+
};
|
|
1375
|
+
}), Pt.useSyncExternalStore(n.subscribe, n.getSnapshot, n.getSnapshot));
|
|
1376
|
+
}
|
|
1377
|
+
});
|
|
1378
|
+
function Er(n, e, t, r, o) {
|
|
1379
|
+
const s = dr();
|
|
1380
|
+
if (!s)
|
|
1381
|
+
return br(n, e, t, r, o);
|
|
1382
|
+
const i = s.syncIndex;
|
|
1383
|
+
s.syncIndex += 1;
|
|
1384
|
+
let u;
|
|
1385
|
+
return s.didInitialize ? (u = s.syncHooks[i], (u.store !== n || u.selector !== e || !Object.is(u.a1, t) || !Object.is(u.a2, r) || !Object.is(u.a3, o)) && (u.store !== n && (s.didChangeStore = !0), u.store = n, u.selector = e, u.a1 = t, u.a2 = r, u.a3 = o, u.didChange = !0)) : (u = {
|
|
1386
|
+
store: n,
|
|
1387
|
+
selector: e,
|
|
1388
|
+
a1: t,
|
|
1389
|
+
a2: r,
|
|
1390
|
+
a3: o,
|
|
1391
|
+
value: e(n.getSnapshot(), t, r, o),
|
|
1392
|
+
didChange: !1
|
|
1393
|
+
}, s.syncHooks.push(u)), u.value;
|
|
1394
|
+
}
|
|
1395
|
+
function yr(n, e, t, r, o) {
|
|
1396
|
+
return fr.useSyncExternalStoreWithSelector(n.subscribe, n.getSnapshot, n.getSnapshot, (s) => e(s, t, r, o));
|
|
1397
|
+
}
|
|
1398
|
+
class Sr {
|
|
1399
|
+
/**
|
|
1400
|
+
* The current state of the store.
|
|
1401
|
+
* This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.
|
|
1402
|
+
* To subscribe to state changes, use the {@link useState} method. The value returned by {@link useState} is updated after the component renders (similarly to React's useState).
|
|
1403
|
+
* The values can be used directly (to avoid subscribing to the store) in effects or event handlers.
|
|
1404
|
+
*
|
|
1405
|
+
* Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.
|
|
1406
|
+
*/
|
|
1407
|
+
// Internal state to handle recursive `setState()` calls
|
|
1408
|
+
constructor(e) {
|
|
1409
|
+
this.state = e, this.listeners = /* @__PURE__ */ new Set(), this.updateTick = 0;
|
|
1410
|
+
}
|
|
1411
|
+
/**
|
|
1412
|
+
* Registers a listener that will be called whenever the store's state changes.
|
|
1413
|
+
*
|
|
1414
|
+
* @param fn The listener function to be called on state changes.
|
|
1415
|
+
* @returns A function to unsubscribe the listener.
|
|
1416
|
+
*/
|
|
1417
|
+
subscribe = (e) => (this.listeners.add(e), () => {
|
|
1418
|
+
this.listeners.delete(e);
|
|
1419
|
+
});
|
|
1420
|
+
/**
|
|
1421
|
+
* Returns the current state of the store.
|
|
1422
|
+
*/
|
|
1423
|
+
getSnapshot = () => this.state;
|
|
1424
|
+
/**
|
|
1425
|
+
* Updates the entire store's state and notifies all registered listeners.
|
|
1426
|
+
*
|
|
1427
|
+
* @param newState The new state to set for the store.
|
|
1428
|
+
*/
|
|
1429
|
+
setState(e) {
|
|
1430
|
+
if (this.state === e)
|
|
1431
|
+
return;
|
|
1432
|
+
this.state = e, this.updateTick += 1;
|
|
1433
|
+
const t = this.updateTick;
|
|
1434
|
+
for (const r of this.listeners) {
|
|
1435
|
+
if (t !== this.updateTick)
|
|
1436
|
+
return;
|
|
1437
|
+
r(e);
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
/**
|
|
1441
|
+
* Merges the provided changes into the current state and notifies listeners if there are changes.
|
|
1442
|
+
*
|
|
1443
|
+
* @param changes An object containing the changes to apply to the current state.
|
|
1444
|
+
*/
|
|
1445
|
+
update(e) {
|
|
1446
|
+
for (const t in e)
|
|
1447
|
+
if (!Object.is(this.state[t], e[t])) {
|
|
1448
|
+
this.setState({
|
|
1449
|
+
...this.state,
|
|
1450
|
+
...e
|
|
1451
|
+
});
|
|
1452
|
+
return;
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
/**
|
|
1456
|
+
* Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.
|
|
1457
|
+
*
|
|
1458
|
+
* @param key The key in the store's state to update.
|
|
1459
|
+
* @param value The new value to set for the specified key.
|
|
1460
|
+
*/
|
|
1461
|
+
set(e, t) {
|
|
1462
|
+
Object.is(this.state[e], t) || this.setState({
|
|
1463
|
+
...this.state,
|
|
1464
|
+
[e]: t
|
|
1465
|
+
});
|
|
1466
|
+
}
|
|
1467
|
+
/**
|
|
1468
|
+
* Gives the state a new reference and updates all registered listeners.
|
|
1469
|
+
*/
|
|
1470
|
+
notifyAll() {
|
|
1471
|
+
const e = {
|
|
1472
|
+
...this.state
|
|
1473
|
+
};
|
|
1474
|
+
this.setState(e);
|
|
1475
|
+
}
|
|
1476
|
+
use(e, t, r, o) {
|
|
1477
|
+
return At(this, e, t, r, o);
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
class Or extends Sr {
|
|
1481
|
+
/**
|
|
1482
|
+
* Creates a new ReactStore instance.
|
|
1483
|
+
*
|
|
1484
|
+
* @param state Initial state of the store.
|
|
1485
|
+
* @param context Non-reactive context values.
|
|
1486
|
+
* @param selectors Optional selectors for use with `useState`.
|
|
1487
|
+
*/
|
|
1488
|
+
constructor(e, t = {}, r) {
|
|
1489
|
+
super(e), this.context = t, this.selectors = r;
|
|
1490
|
+
}
|
|
1491
|
+
/**
|
|
1492
|
+
* Non-reactive values such as refs, callbacks, etc.
|
|
1493
|
+
*/
|
|
1494
|
+
/**
|
|
1495
|
+
* Synchronizes a single external value into the store.
|
|
1496
|
+
*
|
|
1497
|
+
* Note that the while the value in `state` is updated immediately, the value returned
|
|
1498
|
+
* by `useState` is updated before the next render (similarly to React's `useState`).
|
|
1499
|
+
*/
|
|
1500
|
+
useSyncedValue(e, t) {
|
|
1501
|
+
g.useDebugValue(e), H(() => {
|
|
1502
|
+
this.state[e] !== t && this.set(e, t);
|
|
1503
|
+
}, [e, t]);
|
|
1504
|
+
}
|
|
1505
|
+
/**
|
|
1506
|
+
* Synchronizes a single external value into the store and
|
|
1507
|
+
* cleans it up (sets to `undefined`) on unmount.
|
|
1508
|
+
*
|
|
1509
|
+
* Note that the while the value in `state` is updated immediately, the value returned
|
|
1510
|
+
* by `useState` is updated before the next render (similarly to React's `useState`).
|
|
1511
|
+
*/
|
|
1512
|
+
useSyncedValueWithCleanup(e, t) {
|
|
1513
|
+
const r = this;
|
|
1514
|
+
H(() => (r.state[e] !== t && r.set(e, t), () => {
|
|
1515
|
+
r.set(e, void 0);
|
|
1516
|
+
}), [r, e, t]);
|
|
1517
|
+
}
|
|
1518
|
+
/**
|
|
1519
|
+
* Synchronizes multiple external values into the store.
|
|
1520
|
+
*
|
|
1521
|
+
* Note that the while the values in `state` are updated immediately, the values returned
|
|
1522
|
+
* by `useState` are updated before the next render (similarly to React's `useState`).
|
|
1523
|
+
*/
|
|
1524
|
+
useSyncedValues(e) {
|
|
1525
|
+
const t = this;
|
|
1526
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1527
|
+
g.useDebugValue(e, (i) => Object.keys(i));
|
|
1528
|
+
const o = g.useRef(Object.keys(e)).current, s = Object.keys(e);
|
|
1529
|
+
(o.length !== s.length || o.some((i, u) => i !== s[u])) && console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
|
|
1530
|
+
}
|
|
1531
|
+
const r = Object.values(e);
|
|
1532
|
+
H(() => {
|
|
1533
|
+
t.update(e);
|
|
1534
|
+
}, [t, ...r]);
|
|
1535
|
+
}
|
|
1536
|
+
/**
|
|
1537
|
+
* Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`
|
|
1538
|
+
* is non-undefined, the store's state at `key` is updated to match `controlled`.
|
|
1539
|
+
*/
|
|
1540
|
+
useControlledProp(e, t) {
|
|
1541
|
+
g.useDebugValue(e);
|
|
1542
|
+
const r = t !== void 0;
|
|
1543
|
+
if (H(() => {
|
|
1544
|
+
r && !Object.is(this.state[e], t) && super.setState({
|
|
1545
|
+
...this.state,
|
|
1546
|
+
[e]: t
|
|
1547
|
+
});
|
|
1548
|
+
}, [e, t, r]), process.env.NODE_ENV !== "production") {
|
|
1549
|
+
const o = this.controlledValues ??= /* @__PURE__ */ new Map();
|
|
1550
|
+
o.has(e) || o.set(e, r);
|
|
1551
|
+
const s = o.get(e);
|
|
1552
|
+
s !== void 0 && s !== r && console.error(`A component is changing the ${r ? "" : "un"}controlled state of ${e.toString()} to be ${r ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
/** Gets the current value from the store using a selector with the provided key.
|
|
1556
|
+
*
|
|
1557
|
+
* @param key Key of the selector to use.
|
|
1558
|
+
*/
|
|
1559
|
+
select(e, t, r, o) {
|
|
1560
|
+
const s = this.selectors[e];
|
|
1561
|
+
return s(this.state, t, r, o);
|
|
1562
|
+
}
|
|
1563
|
+
/**
|
|
1564
|
+
* Returns a value from the store's state using a selector function.
|
|
1565
|
+
* Used to subscribe to specific parts of the state.
|
|
1566
|
+
* This methods causes a rerender whenever the selected state changes.
|
|
1567
|
+
*
|
|
1568
|
+
* @param key Key of the selector to use.
|
|
1569
|
+
*/
|
|
1570
|
+
useState(e, t, r, o) {
|
|
1571
|
+
return g.useDebugValue(e), At(this, this.selectors[e], t, r, o);
|
|
1572
|
+
}
|
|
1573
|
+
/**
|
|
1574
|
+
* Wraps a function with `useStableCallback` to ensure it has a stable reference
|
|
1575
|
+
* and assigns it to the context.
|
|
1576
|
+
*
|
|
1577
|
+
* @param key Key of the event callback. Must be a function in the context.
|
|
1578
|
+
* @param fn Function to assign.
|
|
1579
|
+
*/
|
|
1580
|
+
useContextCallback(e, t) {
|
|
1581
|
+
g.useDebugValue(e);
|
|
1582
|
+
const r = D(t ?? ln);
|
|
1583
|
+
this.context[e] = r;
|
|
1584
|
+
}
|
|
1585
|
+
/**
|
|
1586
|
+
* Returns a stable setter function for a specific key in the store's state.
|
|
1587
|
+
* It's commonly used to pass as a ref callback to React elements.
|
|
1588
|
+
*
|
|
1589
|
+
* @param key Key of the state to set.
|
|
1590
|
+
*/
|
|
1591
|
+
useStateSetter(e) {
|
|
1592
|
+
const t = g.useRef(void 0);
|
|
1593
|
+
return t.current === void 0 && (t.current = (r) => {
|
|
1594
|
+
this.set(e, r);
|
|
1595
|
+
}), t.current;
|
|
1596
|
+
}
|
|
1597
|
+
/**
|
|
1598
|
+
* Observes changes derived from the store's selectors and calls the listener when the selected value changes.
|
|
1599
|
+
*
|
|
1600
|
+
* @param key Key of the selector to observe.
|
|
1601
|
+
* @param listener Listener function called when the selector result changes.
|
|
1602
|
+
*/
|
|
1603
|
+
observe(e, t) {
|
|
1604
|
+
let r;
|
|
1605
|
+
typeof e == "function" ? r = e : r = this.selectors[e];
|
|
1606
|
+
let o = r(this.state);
|
|
1607
|
+
return t(o, o, this), this.subscribe((s) => {
|
|
1608
|
+
const i = r(s);
|
|
1609
|
+
if (!Object.is(o, i)) {
|
|
1610
|
+
const u = o;
|
|
1611
|
+
o = i, t(i, u, this);
|
|
1612
|
+
}
|
|
1613
|
+
});
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
const Rr = {
|
|
1617
|
+
open: ee((n) => n.open),
|
|
1618
|
+
domReferenceElement: ee((n) => n.domReferenceElement),
|
|
1619
|
+
referenceElement: ee((n) => n.positionReference ?? n.referenceElement),
|
|
1620
|
+
floatingElement: ee((n) => n.floatingElement),
|
|
1621
|
+
floatingId: ee((n) => n.floatingId)
|
|
1622
|
+
};
|
|
1623
|
+
class io extends Or {
|
|
1624
|
+
constructor(e) {
|
|
1625
|
+
const {
|
|
1626
|
+
nested: t,
|
|
1627
|
+
noEmit: r,
|
|
1628
|
+
onOpenChange: o,
|
|
1629
|
+
triggerElements: s,
|
|
1630
|
+
...i
|
|
1631
|
+
} = e;
|
|
1632
|
+
super({
|
|
1633
|
+
...i,
|
|
1634
|
+
positionReference: i.referenceElement,
|
|
1635
|
+
domReferenceElement: i.referenceElement
|
|
1636
|
+
}, {
|
|
1637
|
+
onOpenChange: o,
|
|
1638
|
+
dataRef: {
|
|
1639
|
+
current: {}
|
|
1640
|
+
},
|
|
1641
|
+
events: wt(),
|
|
1642
|
+
nested: t,
|
|
1643
|
+
noEmit: r,
|
|
1644
|
+
triggerElements: s
|
|
1645
|
+
}, Rr);
|
|
1646
|
+
}
|
|
1647
|
+
/**
|
|
1648
|
+
* Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.
|
|
1649
|
+
*
|
|
1650
|
+
* @param newOpen The new open state.
|
|
1651
|
+
* @param eventDetails Details about the event that triggered the open state change.
|
|
1652
|
+
*/
|
|
1653
|
+
setOpen = (e, t) => {
|
|
1654
|
+
if ((!e || !this.state.open || // Prevent a pending hover-open from overwriting a click-open event, while allowing
|
|
1655
|
+
// click events to upgrade a hover-open.
|
|
1656
|
+
mn(t.event)) && (this.context.dataRef.current.openEvent = e ? t.event : void 0), !this.context.noEmit) {
|
|
1657
|
+
const r = {
|
|
1658
|
+
open: e,
|
|
1659
|
+
reason: t.reason,
|
|
1660
|
+
nativeEvent: t.event,
|
|
1661
|
+
nested: this.context.nested,
|
|
1662
|
+
triggerElement: t.trigger
|
|
1663
|
+
};
|
|
1664
|
+
this.context.events.emit("openchange", r);
|
|
1665
|
+
}
|
|
1666
|
+
this.context.onOpenChange?.(e, t);
|
|
1667
|
+
};
|
|
1668
|
+
}
|
|
1669
|
+
class ao {
|
|
1670
|
+
constructor() {
|
|
1671
|
+
this.elementsSet = /* @__PURE__ */ new Set(), this.idMap = /* @__PURE__ */ new Map();
|
|
1672
|
+
}
|
|
1673
|
+
/**
|
|
1674
|
+
* Adds a trigger element with the given ID.
|
|
1675
|
+
*
|
|
1676
|
+
* Note: The provided element is assumed to not be registered under multiple IDs.
|
|
1677
|
+
*/
|
|
1678
|
+
add(e, t) {
|
|
1679
|
+
const r = this.idMap.get(e);
|
|
1680
|
+
if (r !== t && (r !== void 0 && this.elementsSet.delete(r), this.elementsSet.add(t), this.idMap.set(e, t), process.env.NODE_ENV !== "production" && this.elementsSet.size !== this.idMap.size))
|
|
1681
|
+
throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");
|
|
1682
|
+
}
|
|
1683
|
+
/**
|
|
1684
|
+
* Removes the trigger element with the given ID.
|
|
1685
|
+
*/
|
|
1686
|
+
delete(e) {
|
|
1687
|
+
const t = this.idMap.get(e);
|
|
1688
|
+
t && (this.elementsSet.delete(t), this.idMap.delete(e));
|
|
1689
|
+
}
|
|
1690
|
+
/**
|
|
1691
|
+
* Whether the given element is registered as a trigger.
|
|
1692
|
+
*/
|
|
1693
|
+
hasElement(e) {
|
|
1694
|
+
return this.elementsSet.has(e);
|
|
1695
|
+
}
|
|
1696
|
+
/**
|
|
1697
|
+
* Whether there is a registered trigger element matching the given predicate.
|
|
1698
|
+
*/
|
|
1699
|
+
hasMatchingElement(e) {
|
|
1700
|
+
for (const t of this.elementsSet)
|
|
1701
|
+
if (e(t))
|
|
1702
|
+
return !0;
|
|
1703
|
+
return !1;
|
|
1704
|
+
}
|
|
1705
|
+
/**
|
|
1706
|
+
* Returns the trigger element associated with the given ID, or undefined if no such element exists.
|
|
1707
|
+
*/
|
|
1708
|
+
getById(e) {
|
|
1709
|
+
return this.idMap.get(e);
|
|
1710
|
+
}
|
|
1711
|
+
/**
|
|
1712
|
+
* Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element].
|
|
1713
|
+
*/
|
|
1714
|
+
entries() {
|
|
1715
|
+
return this.idMap.entries();
|
|
1716
|
+
}
|
|
1717
|
+
/**
|
|
1718
|
+
* Returns an iterable of all registered trigger elements.
|
|
1719
|
+
*/
|
|
1720
|
+
elements() {
|
|
1721
|
+
return this.elementsSet.values();
|
|
1722
|
+
}
|
|
1723
|
+
/**
|
|
1724
|
+
* Returns the number of registered trigger elements.
|
|
1725
|
+
*/
|
|
1726
|
+
get size() {
|
|
1727
|
+
return this.idMap.size;
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
function uo(n = []) {
|
|
1731
|
+
const e = n.map((a) => a?.reference), t = n.map((a) => a?.floating), r = n.map((a) => a?.item), o = n.map((a) => a?.trigger), s = g.useCallback(
|
|
1732
|
+
(a) => le(a, n, "reference"),
|
|
1733
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1734
|
+
e
|
|
1735
|
+
), i = g.useCallback(
|
|
1736
|
+
(a) => le(a, n, "floating"),
|
|
1737
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1738
|
+
t
|
|
1739
|
+
), u = g.useCallback(
|
|
1740
|
+
(a) => le(a, n, "item"),
|
|
1741
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1742
|
+
r
|
|
1743
|
+
), h = g.useCallback(
|
|
1744
|
+
(a) => le(a, n, "trigger"),
|
|
1745
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1746
|
+
o
|
|
1747
|
+
);
|
|
1748
|
+
return g.useMemo(() => ({
|
|
1749
|
+
getReferenceProps: s,
|
|
1750
|
+
getFloatingProps: i,
|
|
1751
|
+
getItemProps: u,
|
|
1752
|
+
getTriggerProps: h
|
|
1753
|
+
}), [s, i, u, h]);
|
|
1754
|
+
}
|
|
1755
|
+
function le(n, e, t) {
|
|
1756
|
+
const r = /* @__PURE__ */ new Map(), o = t === "item", s = {};
|
|
1757
|
+
t === "floating" && (s.tabIndex = -1, s[pn] = "");
|
|
1758
|
+
for (const i in n)
|
|
1759
|
+
o && n && (i === gt || i === bt) || (s[i] = n[i]);
|
|
1760
|
+
for (let i = 0; i < e.length; i += 1) {
|
|
1761
|
+
let u;
|
|
1762
|
+
const h = e[i]?.[t];
|
|
1763
|
+
typeof h == "function" ? u = n ? h(n) : null : u = h, u && pt(s, u, o, r);
|
|
1764
|
+
}
|
|
1765
|
+
return pt(s, n, o, r), s;
|
|
1766
|
+
}
|
|
1767
|
+
function pt(n, e, t, r) {
|
|
1768
|
+
for (const o in e) {
|
|
1769
|
+
const s = e[o];
|
|
1770
|
+
t && (o === gt || o === bt) || (o.startsWith("on") ? (r.has(o) || r.set(o, []), typeof s == "function" && (r.get(o)?.push(s), n[o] = (...i) => r.get(o)?.map((u) => u(...i)).find((u) => u !== void 0))) : n[o] = s);
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
let ze = (function(n) {
|
|
1774
|
+
return n.open = "data-open", n.closed = "data-closed", n[n.startingStyle = tt.startingStyle] = "startingStyle", n[n.endingStyle = tt.endingStyle] = "endingStyle", n.anchorHidden = "data-anchor-hidden", n.side = "data-side", n.align = "data-align", n;
|
|
1775
|
+
})({}), De = /* @__PURE__ */ (function(n) {
|
|
1776
|
+
return n.popupOpen = "data-popup-open", n.pressed = "data-pressed", n;
|
|
1777
|
+
})({});
|
|
1778
|
+
const Tr = {
|
|
1779
|
+
[De.popupOpen]: ""
|
|
1780
|
+
}, Cr = {
|
|
1781
|
+
[De.popupOpen]: "",
|
|
1782
|
+
[De.pressed]: ""
|
|
1783
|
+
}, Ir = {
|
|
1784
|
+
[ze.open]: ""
|
|
1785
|
+
}, _r = {
|
|
1786
|
+
[ze.closed]: ""
|
|
1787
|
+
}, wr = {
|
|
1788
|
+
[ze.anchorHidden]: ""
|
|
1789
|
+
}, co = {
|
|
1790
|
+
open(n) {
|
|
1791
|
+
return n ? Tr : null;
|
|
1792
|
+
}
|
|
1793
|
+
}, lo = {
|
|
1794
|
+
open(n) {
|
|
1795
|
+
return n ? Cr : null;
|
|
1796
|
+
}
|
|
1797
|
+
}, fo = {
|
|
1798
|
+
open(n) {
|
|
1799
|
+
return n ? Ir : _r;
|
|
1800
|
+
},
|
|
1801
|
+
anchorHidden(n) {
|
|
1802
|
+
return n ? wr : null;
|
|
1803
|
+
}
|
|
1804
|
+
};
|
|
1805
|
+
export {
|
|
1806
|
+
Gr as A,
|
|
1807
|
+
lo as B,
|
|
1808
|
+
qr as C,
|
|
1809
|
+
Ur as D,
|
|
1810
|
+
eo as E,
|
|
1811
|
+
io as F,
|
|
1812
|
+
Qr as G,
|
|
1813
|
+
hr as H,
|
|
1814
|
+
De as I,
|
|
1815
|
+
so as J,
|
|
1816
|
+
At as K,
|
|
1817
|
+
$r as L,
|
|
1818
|
+
Fn as M,
|
|
1819
|
+
ao as P,
|
|
1820
|
+
Or as R,
|
|
1821
|
+
Sr as S,
|
|
1822
|
+
Wr as T,
|
|
1823
|
+
Mn as a,
|
|
1824
|
+
Nt as b,
|
|
1825
|
+
_t as c,
|
|
1826
|
+
ee as d,
|
|
1827
|
+
An as e,
|
|
1828
|
+
Ve as f,
|
|
1829
|
+
fe as g,
|
|
1830
|
+
Xr as h,
|
|
1831
|
+
ke as i,
|
|
1832
|
+
Ce as j,
|
|
1833
|
+
Ln as k,
|
|
1834
|
+
kn as l,
|
|
1835
|
+
Zr as m,
|
|
1836
|
+
Jr as n,
|
|
1837
|
+
ro as o,
|
|
1838
|
+
oo as p,
|
|
1839
|
+
uo as q,
|
|
1840
|
+
co as r,
|
|
1841
|
+
Yr as s,
|
|
1842
|
+
Me as t,
|
|
1843
|
+
xt as u,
|
|
1844
|
+
to as v,
|
|
1845
|
+
no as w,
|
|
1846
|
+
fo as x,
|
|
1847
|
+
ze as y,
|
|
1848
|
+
Vn as z
|
|
1849
|
+
};
|