@arcadeai/design-system 5.0.2 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{clamp-DV0oJUnl.js → CSPContext-_3HefTUC.js} +1 -6
- package/dist/{DialogRoot-xodRxCJ6.js → DialogRoot-DuiSPdsZ.js} +1 -1
- package/dist/{DialogTrigger-BRWKaMYv.js → DialogTrigger-DGGP-2Oc.js} +109 -108
- package/dist/{FloatingPortalLite-e0IaokaG.js → FloatingPortalLite-D5nFwFgJ.js} +1 -1
- package/dist/ReactStore-C3H8e2ha.js +600 -0
- package/dist/{Toggle-waFXW8db.js → Toggle-BdxyK_Ln.js} +1 -1
- package/dist/{accordion-DimUia61.js → accordion-BP9Lgkg8.js} +18 -18
- package/dist/{alert-dialog-BiDZwtP2.js → alert-dialog-1bUE2clB.js} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/tokens.css +1 -1
- package/dist/assets/variables.css +1 -1
- package/dist/{avatar-B-lhJ-Gz.js → avatar-DbL6b01k.js} +4 -3
- package/dist/{checkbox-CZViOGvt.js → checkbox-DB9O_Iw9.js} +96 -85
- package/dist/clamp-BT4ayAnN.js +6 -0
- package/dist/{collapsible-DlF1q_cg.js → collapsible-DP7Fb-Lu.js} +17 -17
- package/dist/components/index.js +259 -251
- package/dist/components/ui/atoms/accordion.js +1 -1
- package/dist/components/ui/atoms/alert-dialog.js +1 -1
- package/dist/components/ui/atoms/avatar.js +1 -1
- package/dist/components/ui/atoms/checkbox.d.ts +16 -2
- package/dist/components/ui/atoms/checkbox.d.ts.map +1 -1
- package/dist/components/ui/atoms/checkbox.js +2 -2
- package/dist/components/ui/atoms/clear-button.d.ts +13 -0
- package/dist/components/ui/atoms/clear-button.d.ts.map +1 -0
- package/dist/components/ui/atoms/clear-button.js +23 -0
- package/dist/components/ui/atoms/collapsible.js +1 -1
- package/dist/components/ui/atoms/dialog.js +2 -2
- package/dist/components/ui/atoms/dropdown-menu.js +1 -1
- package/dist/components/ui/atoms/hover-card.js +1 -1
- package/dist/components/ui/atoms/icon-tile.d.ts +10 -0
- package/dist/components/ui/atoms/icon-tile.d.ts.map +1 -0
- package/dist/components/ui/atoms/icon-tile.js +25 -0
- package/dist/components/ui/atoms/index.d.ts +3 -1
- package/dist/components/ui/atoms/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/index.js +210 -208
- package/dist/components/ui/atoms/input-group.js +1 -1
- package/dist/components/ui/atoms/input.js +1 -1
- package/dist/components/ui/atoms/mobile-tooltip.js +2 -2
- package/dist/components/ui/atoms/popover.js +1 -1
- package/dist/components/ui/atoms/progress.js +1 -1
- package/dist/components/ui/atoms/radio-group.js +1 -1
- package/dist/components/ui/atoms/scroll-area.js +1 -1
- package/dist/components/ui/atoms/scroll-button.js +1 -1
- package/dist/components/ui/atoms/scroll-to-bottom-button.d.ts +24 -0
- package/dist/components/ui/atoms/scroll-to-bottom-button.d.ts.map +1 -0
- package/dist/components/ui/atoms/scroll-to-bottom-button.js +31 -0
- package/dist/components/ui/atoms/select.js +1 -1
- package/dist/components/ui/atoms/sheet.js +2 -2
- package/dist/components/ui/atoms/sidebar.js +2 -2
- package/dist/components/ui/atoms/slider.js +1 -1
- package/dist/components/ui/atoms/switch.js +1 -1
- package/dist/components/ui/atoms/tabs.js +1 -1
- package/dist/components/ui/atoms/toggle-group.js +1 -1
- package/dist/components/ui/atoms/toggle.js +1 -1
- package/dist/components/ui/atoms/tooltip.js +1 -1
- package/dist/components/ui/blocks/demo.js +4 -4
- package/dist/components/ui/index.js +259 -251
- package/dist/components/ui/molecules/avatar-stack.d.ts +32 -0
- package/dist/components/ui/molecules/avatar-stack.d.ts.map +1 -0
- package/dist/components/ui/molecules/avatar-stack.js +91 -0
- package/dist/components/ui/molecules/callout.d.ts +20 -0
- package/dist/components/ui/molecules/callout.d.ts.map +1 -0
- package/dist/components/ui/molecules/callout.js +39 -0
- package/dist/components/ui/molecules/chat-history-item.js +1 -1
- package/dist/components/ui/molecules/chip-body.d.ts +21 -0
- package/dist/components/ui/molecules/chip-body.d.ts.map +1 -0
- package/dist/components/ui/molecules/chip-body.js +21 -0
- package/dist/components/ui/molecules/client-secret-field.js +1 -1
- package/dist/components/ui/molecules/confirm-popover.js +1 -1
- package/dist/components/ui/molecules/date-time-picker.js +2 -2
- package/dist/components/ui/molecules/filter-chip-group.d.ts +26 -0
- package/dist/components/ui/molecules/filter-chip-group.d.ts.map +1 -0
- package/dist/components/ui/molecules/{mcp-server-picker/category-filter.js → filter-chip-group.js} +8 -7
- package/dist/components/ui/molecules/index.d.ts +19 -7
- package/dist/components/ui/molecules/index.d.ts.map +1 -1
- package/dist/components/ui/molecules/index.js +41 -35
- package/dist/components/ui/molecules/mcp-server-picker/card-setup-button.d.ts +21 -0
- package/dist/components/ui/molecules/mcp-server-picker/card-setup-button.d.ts.map +1 -0
- package/dist/components/ui/molecules/mcp-server-picker/card-setup-button.js +34 -0
- package/dist/components/ui/molecules/mcp-server-picker/constants.d.ts +2 -0
- package/dist/components/ui/molecules/mcp-server-picker/constants.d.ts.map +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/constants.js +2 -2
- package/dist/components/ui/molecules/mcp-server-picker/recommended-toolkits-chip.d.ts.map +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/recommended-toolkits-chip.js +18 -15
- package/dist/components/ui/molecules/mcp-server-picker/recommended-tools.js +2 -2
- package/dist/components/ui/molecules/mcp-server-picker/search-scope-tabs.js +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/section-callout.js +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/section-nav-header.d.ts.map +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/section-nav-header.js +12 -6
- package/dist/components/ui/molecules/mcp-server-picker/selection-card-parts.d.ts +28 -0
- package/dist/components/ui/molecules/mcp-server-picker/selection-card-parts.d.ts.map +1 -0
- package/dist/components/ui/molecules/mcp-server-picker/selection-card-parts.js +28 -0
- package/dist/components/ui/molecules/mcp-server-picker/server-avatar-stack.d.ts +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/server-avatar-stack.d.ts.map +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/server-avatar-stack.js +29 -81
- package/dist/components/ui/molecules/mcp-server-picker/server-card.d.ts +3 -6
- package/dist/components/ui/molecules/mcp-server-picker/server-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/server-card.js +93 -108
- package/dist/components/ui/molecules/mcp-server-picker/setup-callout.d.ts +13 -0
- package/dist/components/ui/molecules/mcp-server-picker/setup-callout.d.ts.map +1 -0
- package/dist/components/ui/molecules/mcp-server-picker/setup-callout.js +27 -0
- package/dist/components/ui/molecules/mcp-server-picker/tool-card.d.ts +5 -1
- package/dist/components/ui/molecules/mcp-server-picker/tool-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/tool-card.js +49 -42
- package/dist/components/ui/molecules/mcp-server-picker/tool-recommendations.d.ts +12 -0
- package/dist/components/ui/molecules/mcp-server-picker/tool-recommendations.d.ts.map +1 -0
- package/dist/components/ui/molecules/mcp-server-picker/{tool-search-band.js → tool-recommendations.js} +6 -6
- package/dist/components/ui/molecules/mcp-server-picker/toolkit-avatar.d.ts +6 -6
- package/dist/components/ui/molecules/mcp-server-picker/toolkit-avatar.d.ts.map +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/toolkit-avatar.js +21 -33
- package/dist/components/ui/molecules/mcp-server-picker/toolkit-chip.d.ts.map +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/toolkit-chip.js +19 -22
- package/dist/components/ui/molecules/mcp-server-picker/toolkit-group-header.js +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/unoptimized-match-card.d.ts +3 -1
- package/dist/components/ui/molecules/mcp-server-picker/unoptimized-match-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/mcp-server-picker/unoptimized-match-card.js +33 -31
- package/dist/components/ui/molecules/message.js +2 -2
- package/dist/components/ui/molecules/prompt-input.js +1 -1
- package/dist/components/ui/molecules/removable-chip.d.ts.map +1 -0
- package/dist/components/ui/{atoms → molecules}/removable-chip.js +1 -1
- package/dist/components/ui/molecules/requirement-badges.js +1 -1
- package/dist/components/ui/molecules/tool-call-accordion.js +2 -2
- package/dist/components/ui/molecules/tool-card.js +2 -2
- package/dist/components/ui/molecules/toolkit-card.js +1 -1
- package/dist/components/ui/molecules/undo-toast.d.ts +47 -0
- package/dist/components/ui/molecules/undo-toast.d.ts.map +1 -0
- package/dist/components/ui/molecules/undo-toast.js +3 -0
- package/dist/components/ui/molecules/user-nav.js +2 -2
- package/dist/components/ui/organisms/mcp-selection-summary-bar.d.ts.map +1 -1
- package/dist/components/ui/organisms/mcp-selection-summary-bar.js +27 -30
- package/dist/components/ui/organisms/mcp-server-picker.d.ts +6 -3
- package/dist/components/ui/organisms/mcp-server-picker.d.ts.map +1 -1
- package/dist/components/ui/organisms/mcp-server-picker.js +4 -4
- package/dist/{dropdown-menu-CWWN1cXs.js → dropdown-menu-ecggVuhu.js} +202 -199
- package/dist/{getPseudoElementBounds-D_dlkPnQ.js → getPseudoElementBounds-BOe22aYl.js} +3 -3
- package/dist/{hover-card-GELKDadU.js → hover-card-CGLPPPPP.js} +71 -70
- package/dist/{input-DZfZK6b1.js → input-DZTqcpe-.js} +1 -1
- package/dist/main.js +265 -257
- package/dist/metadata/oauth-providers.d.ts +2 -0
- package/dist/metadata/oauth-providers.d.ts.map +1 -1
- package/dist/metadata/oauth-providers.js +153 -141
- package/dist/{popover-Cne_hQUh.js → popover-CpLkQtT5.js} +129 -128
- package/dist/popupStateMapping-XiLS0Jku.js +643 -0
- package/dist/{progress-D71iUjvg.js → progress-BqG0PtAD.js} +1 -1
- package/dist/{radio-group-CTqA-p0w.js → radio-group-BpMluqfv.js} +8 -7
- package/dist/{safePolygon-os2F06tc.js → safePolygon-DmV1hDsw.js} +35 -34
- package/dist/{scroll-area-C0KbhRES.js → scroll-area-D7iOy7xj.js} +4 -3
- package/dist/{scrollEdges-CHZpP0us.js → scrollEdges-Dck9qFyQ.js} +1 -1
- package/dist/{select-RvAj5g6e.js → select-DFWNXxvZ.js} +179 -176
- package/dist/{slider-Bhn1ogwZ.js → slider-ClXWRpwI.js} +4 -3
- package/dist/{store-C-KXBzZ0.js → store-D7k1qIkZ.js} +23 -22
- package/dist/{switch-D8M0xvzp.js → switch-DlxZDt6o.js} +3 -3
- package/dist/{tabs-ttkDuwww.js → tabs-Cj3LY-7F.js} +9 -8
- package/dist/{toggle-group-CL_MBwuU.js → toggle-group-CmP4iHEJ.js} +1 -1
- package/dist/{tooltip-ZIywOFGf.js → tooltip-BUR7V5Aa.js} +197 -196
- package/dist/{ui-CttBuHXi.js → ui-46pgiw5T.js} +2 -2
- package/dist/undo-toast-Cf4T6ToX.js +898 -0
- package/dist/{useAnchoredPopupScrollLock-a2b_Frjv.js → useAnchoredPopupScrollLock-CnoPUwXv.js} +1 -1
- package/dist/{useAriaLabelledBy-WyUZP7Yf.js → useAriaLabelledBy-DJZioWd6.js} +1 -1
- package/dist/useBaseUiId-CXSJgVcI.js +8 -0
- package/dist/{useCollapsiblePanel-B6XZh6zH.js → useCollapsiblePanel-BPbcE70S.js} +15 -14
- package/dist/{useFocus-DwJfNYN6.js → useFocus-B_SrhX9q.js} +10 -10
- package/dist/{useBaseUiId-voePHgyX.js → useId-Bzr7_bed.js} +1 -6
- package/dist/{useLabelableId-CC2YaILf.js → useLabelableId-9jrDGk5d.js} +1 -1
- package/dist/useOpenChangeComplete-CVIwfcpl.js +80 -0
- package/dist/{useOpenInteractionType-DQhvPqO3.js → useOpenInteractionType-INvHftZi.js} +29 -28
- package/dist/{usePositioner-DkeyI5Le.js → usePositioner-CaLGGc-z.js} +98 -97
- package/dist/useTransitionStatus-CCIoL5RH.js +51 -0
- package/dist/{useTriggerFocusGuards-Qi8iK-AK.js → useTriggerFocusGuards-Dlv8KvSm.js} +7 -7
- package/package.json +1 -1
- package/dist/components/ui/atoms/removable-chip.d.ts.map +0 -1
- package/dist/components/ui/molecules/mcp-server-picker/category-filter-menu.d.ts +0 -31
- package/dist/components/ui/molecules/mcp-server-picker/category-filter-menu.d.ts.map +0 -1
- package/dist/components/ui/molecules/mcp-server-picker/category-filter-menu.js +0 -106
- package/dist/components/ui/molecules/mcp-server-picker/category-filter.d.ts +0 -18
- package/dist/components/ui/molecules/mcp-server-picker/category-filter.d.ts.map +0 -1
- package/dist/components/ui/molecules/mcp-server-picker/tool-search-band.d.ts +0 -12
- package/dist/components/ui/molecules/mcp-server-picker/tool-search-band.d.ts.map +0 -1
- package/dist/popupStateMapping-C8W76brO.js +0 -1221
- package/dist/useOpenChangeComplete-Bs6gnxd9.js +0 -127
- /package/dist/components/ui/{atoms → molecules}/removable-chip.d.ts +0 -0
|
@@ -1,1221 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { t as e } from "./rolldown-runtime-Dqa2HsxW.js";
|
|
3
|
-
import { t } from "./useIsoLayoutEffect-4LGv3HzC.js";
|
|
4
|
-
import { c as n, f as r, o as i, s as a, t as o, u as s } from "./useRenderElement-BToElZ97.js";
|
|
5
|
-
import { t as c } from "./useStableCallback-CrM0Nb2q.js";
|
|
6
|
-
import { n as l } from "./useBaseUiId-voePHgyX.js";
|
|
7
|
-
import { S as u, _ as d, g as f, s as p, t as m, x as h } from "./createBaseUIEventDetails-C_dwdqj4.js";
|
|
8
|
-
import { i as g, o as _, t as v } from "./useOpenChangeComplete-Bs6gnxd9.js";
|
|
9
|
-
import { a as y, c as ee, d as b, f as x, g as te, m as S, p as ne, t as re } from "./floating-ui.utils.dom-5U5b4xPf.js";
|
|
10
|
-
import { t as C } from "./addEventListener-BlQH_qk1.js";
|
|
11
|
-
import { t as w } from "./owner-CyZnQOKt.js";
|
|
12
|
-
import { D as ie, N as ae, i as T, k as oe } from "./composite-B-tEa-Zg.js";
|
|
13
|
-
import { t as se } from "./engine-ChH4dTze.js";
|
|
14
|
-
import { a as ce } from "./constants-ouS7wtUt.js";
|
|
15
|
-
import { n as E, t as le } from "./useTimeout-B0afjWAz.js";
|
|
16
|
-
import { n as D, r as ue, t as O } from "./shadowDom-BACsbimN.js";
|
|
17
|
-
import { i as de, n as k, o as fe, t as A } from "./shim-BX-2V17R.js";
|
|
18
|
-
import { t as j } from "./visuallyHidden-Cq5CW65k.js";
|
|
19
|
-
import * as M from "react";
|
|
20
|
-
import { jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
21
|
-
import * as F from "react-dom";
|
|
22
|
-
//#region ../../node_modules/.bun/@base-ui+utils@0.3.1+fce4ea6354698f9c/node_modules/@base-ui/utils/useOnFirstRender.mjs
|
|
23
|
-
function I(e) {
|
|
24
|
-
let t = M.useRef(!0);
|
|
25
|
-
t.current && (t.current = !1, e());
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region ../../node_modules/.bun/@base-ui+utils@0.3.1+fce4ea6354698f9c/node_modules/@base-ui/utils/platform/screen-reader.mjs
|
|
29
|
-
var L = ae;
|
|
30
|
-
//#endregion
|
|
31
|
-
//#region ../../node_modules/.bun/@base-ui+utils@0.3.1+fce4ea6354698f9c/node_modules/@base-ui/utils/mergeCleanups.mjs
|
|
32
|
-
function R(...e) {
|
|
33
|
-
return () => {
|
|
34
|
-
for (let t = 0; t < e.length; t += 1) {
|
|
35
|
-
let n = e[t];
|
|
36
|
-
n && n();
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
//#endregion
|
|
41
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/utils/FocusGuard.mjs
|
|
42
|
-
var z = /*#__PURE__*/ M.forwardRef(function(e, n) {
|
|
43
|
-
let [r, i] = M.useState();
|
|
44
|
-
t(() => {
|
|
45
|
-
L && se && i("button");
|
|
46
|
-
}, []);
|
|
47
|
-
let a = {
|
|
48
|
-
tabIndex: 0,
|
|
49
|
-
role: r
|
|
50
|
-
};
|
|
51
|
-
return /*#__PURE__*/ N("span", {
|
|
52
|
-
...e,
|
|
53
|
-
ref: n,
|
|
54
|
-
style: j,
|
|
55
|
-
"aria-hidden": r ? void 0 : !0,
|
|
56
|
-
...a,
|
|
57
|
-
"data-base-ui-focus-guard": ""
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
process.env.NODE_ENV !== "production" && (z.displayName = "FocusGuard");
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/floating-ui-react/utils/tabbable.mjs
|
|
63
|
-
var B = "a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable=\"false\"]),audio[controls],video[controls]";
|
|
64
|
-
function V(e) {
|
|
65
|
-
let t = e.assignedSlot;
|
|
66
|
-
if (t) return t;
|
|
67
|
-
if (e.parentElement) return e.parentElement;
|
|
68
|
-
let n = e.getRootNode();
|
|
69
|
-
return te(n) ? n.host : null;
|
|
70
|
-
}
|
|
71
|
-
function H(e) {
|
|
72
|
-
for (let t of Array.from(e.children)) if (y(t) === "summary") return t;
|
|
73
|
-
return null;
|
|
74
|
-
}
|
|
75
|
-
function U(e, t) {
|
|
76
|
-
let n = H(t);
|
|
77
|
-
return !!n && (e === n || D(n, e));
|
|
78
|
-
}
|
|
79
|
-
function W(e) {
|
|
80
|
-
let t = e ? y(e) : "";
|
|
81
|
-
return e != null && e.matches(B) && (t !== "summary" || e.parentElement != null && y(e.parentElement) === "details" && H(e.parentElement) === e) && (t !== "details" || H(e) == null) && (t !== "input" || e.type !== "hidden");
|
|
82
|
-
}
|
|
83
|
-
function G(e) {
|
|
84
|
-
if (!W(e) || !e.isConnected || e.matches(":disabled")) return !1;
|
|
85
|
-
for (let t = e; t; t = V(t)) {
|
|
86
|
-
let n = t !== e, r = y(t) === "slot";
|
|
87
|
-
if (t.hasAttribute("inert") || n && y(t) === "details" && !t.open && !U(e, t) || t.hasAttribute("hidden") || !r && !K(t, n)) return !1;
|
|
88
|
-
}
|
|
89
|
-
return !0;
|
|
90
|
-
}
|
|
91
|
-
function K(e, t) {
|
|
92
|
-
let n = re(e);
|
|
93
|
-
return t ? n.display !== "none" : T(e, n);
|
|
94
|
-
}
|
|
95
|
-
function q(e) {
|
|
96
|
-
let t = e.tabIndex;
|
|
97
|
-
if (t < 0) {
|
|
98
|
-
let t = y(e);
|
|
99
|
-
if (t === "details" || t === "audio" || t === "video" || x(e) && e.isContentEditable) return 0;
|
|
100
|
-
}
|
|
101
|
-
return t;
|
|
102
|
-
}
|
|
103
|
-
function J(e) {
|
|
104
|
-
if (y(e) !== "input") return null;
|
|
105
|
-
let t = e;
|
|
106
|
-
return t.type === "radio" && t.name !== "" ? t : null;
|
|
107
|
-
}
|
|
108
|
-
function pe(e, t) {
|
|
109
|
-
let n = J(e);
|
|
110
|
-
if (!n) return !0;
|
|
111
|
-
let r = t.find((e) => {
|
|
112
|
-
let t = J(e);
|
|
113
|
-
return t?.name === n.name && t.form === n.form && t.checked;
|
|
114
|
-
});
|
|
115
|
-
return r ? r === n : t.find((e) => {
|
|
116
|
-
let t = J(e);
|
|
117
|
-
return t?.name === n.name && t.form === n.form;
|
|
118
|
-
}) === n;
|
|
119
|
-
}
|
|
120
|
-
function me(e) {
|
|
121
|
-
if (x(e) && y(e) === "slot") {
|
|
122
|
-
let t = e.assignedElements({ flatten: !0 });
|
|
123
|
-
if (t.length > 0) return t;
|
|
124
|
-
}
|
|
125
|
-
return x(e) && e.shadowRoot ? Array.from(e.shadowRoot.children) : Array.from(e.children);
|
|
126
|
-
}
|
|
127
|
-
function he(e, t) {
|
|
128
|
-
me(e).forEach((e) => {
|
|
129
|
-
W(e) && t.push(e), he(e, t);
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
function ge(e, t, n) {
|
|
133
|
-
me(e).forEach((e) => {
|
|
134
|
-
x(e) && e.matches(t) && n.push(e), ge(e, t, n);
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
function _e(e) {
|
|
138
|
-
return G(e) && q(e) >= 0;
|
|
139
|
-
}
|
|
140
|
-
function ve(e) {
|
|
141
|
-
let t = [];
|
|
142
|
-
return he(e, t), t.filter(G);
|
|
143
|
-
}
|
|
144
|
-
function Y(e) {
|
|
145
|
-
let t = ve(e);
|
|
146
|
-
return t.filter((e) => q(e) >= 0 && pe(e, t));
|
|
147
|
-
}
|
|
148
|
-
function ye(e, t) {
|
|
149
|
-
let n = Y(e), r = n.length;
|
|
150
|
-
if (r === 0) return;
|
|
151
|
-
let i = O(w(e)), a = n.indexOf(i);
|
|
152
|
-
return n[a === -1 ? t === 1 ? 0 : r - 1 : a + t];
|
|
153
|
-
}
|
|
154
|
-
function be(e) {
|
|
155
|
-
return ye(w(e).body, 1) || e;
|
|
156
|
-
}
|
|
157
|
-
function xe(e) {
|
|
158
|
-
return ye(w(e).body, -1) || e;
|
|
159
|
-
}
|
|
160
|
-
function Se(e, t) {
|
|
161
|
-
if (!e) return null;
|
|
162
|
-
let n = Y(w(e).body), r = n.length;
|
|
163
|
-
if (r === 0) return null;
|
|
164
|
-
let i = n.indexOf(e);
|
|
165
|
-
return i === -1 ? null : n[(i + t + r) % r];
|
|
166
|
-
}
|
|
167
|
-
function Ce(e) {
|
|
168
|
-
return Se(e, 1);
|
|
169
|
-
}
|
|
170
|
-
function we(e) {
|
|
171
|
-
return Se(e, -1);
|
|
172
|
-
}
|
|
173
|
-
function X(e, t) {
|
|
174
|
-
let n = t || e.currentTarget, r = e.relatedTarget;
|
|
175
|
-
return !r || !D(n, r);
|
|
176
|
-
}
|
|
177
|
-
function Te(e) {
|
|
178
|
-
Y(e).forEach((e) => {
|
|
179
|
-
e.dataset.tabindex = e.getAttribute("tabindex") || "", e.setAttribute("tabindex", "-1");
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
function Ee(e) {
|
|
183
|
-
let t = [];
|
|
184
|
-
ge(e, "[data-tabindex]", t), t.forEach((e) => {
|
|
185
|
-
let t = e.dataset.tabindex;
|
|
186
|
-
delete e.dataset.tabindex, t ? e.setAttribute("tabindex", t) : e.removeAttribute("tabindex");
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
//#endregion
|
|
190
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/floating-ui-react/utils/nodes.mjs
|
|
191
|
-
function Z(e, t, n = !0) {
|
|
192
|
-
return e.filter((e) => e.parentId === t).flatMap((t) => [...!n || t.context?.open ? [t] : [], ...Z(e, t.id, n)]);
|
|
193
|
-
}
|
|
194
|
-
function De(e, t) {
|
|
195
|
-
let n = [], r = e.find((e) => e.id === t)?.parentId;
|
|
196
|
-
for (; r;) {
|
|
197
|
-
let t = e.find((e) => e.id === r);
|
|
198
|
-
r = t?.parentId, t && (n = n.concat(t));
|
|
199
|
-
}
|
|
200
|
-
return n;
|
|
201
|
-
}
|
|
202
|
-
//#endregion
|
|
203
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/floating-ui-react/utils/createAttribute.mjs
|
|
204
|
-
function Oe(e) {
|
|
205
|
-
return `data-base-ui-${e}`;
|
|
206
|
-
}
|
|
207
|
-
//#endregion
|
|
208
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/internals/constants.mjs
|
|
209
|
-
var ke = { style: { transition: "none" } }, Ae = "data-base-ui-click-trigger", je = { fallbackAxisSide: "none" }, Me = { fallbackAxisSide: "end" }, Ne = {
|
|
210
|
-
clipPath: "inset(50%)",
|
|
211
|
-
position: "fixed",
|
|
212
|
-
top: 0,
|
|
213
|
-
left: 0
|
|
214
|
-
}, Pe = /*#__PURE__*/ M.createContext(null);
|
|
215
|
-
process.env.NODE_ENV !== "production" && (Pe.displayName = "PortalContext");
|
|
216
|
-
var Fe = () => M.useContext(Pe), Ie = Oe("portal");
|
|
217
|
-
function Le(e = {}) {
|
|
218
|
-
let { ref: n, container: r, componentProps: a = i, elementProps: s } = e, u = l(), d = Fe()?.portalNode, [f, p] = M.useState(null), [m, h] = M.useState(null), g = c((e) => {
|
|
219
|
-
e !== null && h(e);
|
|
220
|
-
}), _ = M.useRef(null);
|
|
221
|
-
t(() => {
|
|
222
|
-
if (r === null) {
|
|
223
|
-
_.current && (_.current = null, h(null), p(null));
|
|
224
|
-
return;
|
|
225
|
-
}
|
|
226
|
-
if (u == null) return;
|
|
227
|
-
let e = (r && (S(r) ? r : r.current)) ?? d ?? document.body;
|
|
228
|
-
if (e == null) {
|
|
229
|
-
_.current && (_.current = null, h(null), p(null));
|
|
230
|
-
return;
|
|
231
|
-
}
|
|
232
|
-
_.current !== e && (_.current = e, h(null), p(e));
|
|
233
|
-
}, [
|
|
234
|
-
r,
|
|
235
|
-
d,
|
|
236
|
-
u
|
|
237
|
-
]);
|
|
238
|
-
let v = o("div", a, {
|
|
239
|
-
ref: [n, g],
|
|
240
|
-
props: [{
|
|
241
|
-
id: u,
|
|
242
|
-
[Ie]: ""
|
|
243
|
-
}, s]
|
|
244
|
-
});
|
|
245
|
-
return {
|
|
246
|
-
portalNode: m,
|
|
247
|
-
portalSubtree: f && v ? /*#__PURE__*/ F.createPortal(v, f) : null
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
var Re = /*#__PURE__*/ M.forwardRef(function(e, n) {
|
|
251
|
-
let { render: r, className: i, style: a, children: o, container: s, renderGuards: c, ...l } = e, { portalNode: u, portalSubtree: d } = Le({
|
|
252
|
-
container: s,
|
|
253
|
-
ref: n,
|
|
254
|
-
componentProps: e,
|
|
255
|
-
elementProps: l
|
|
256
|
-
}), f = M.useRef(null), p = M.useRef(null), h = M.useRef(null), g = M.useRef(null), [_, v] = M.useState(null), y = M.useRef(!1), ee = _?.modal, b = _?.open, x = typeof c == "boolean" ? c : !!_ && !_.modal && _.open && !!u;
|
|
257
|
-
M.useEffect(() => {
|
|
258
|
-
if (!u || ee) return;
|
|
259
|
-
function e(e) {
|
|
260
|
-
u && e.relatedTarget && X(e) && (e.type === "focusin" ? y.current &&= (Ee(u), !1) : (Te(u), y.current = !0));
|
|
261
|
-
}
|
|
262
|
-
return R(C(u, "focusin", e, !0), C(u, "focusout", e, !0));
|
|
263
|
-
}, [u, ee]), t(() => {
|
|
264
|
-
!u || b !== !0 || !y.current || (Ee(u), y.current = !1);
|
|
265
|
-
}, [b, u]);
|
|
266
|
-
let te = M.useMemo(() => ({
|
|
267
|
-
beforeOutsideRef: f,
|
|
268
|
-
afterOutsideRef: p,
|
|
269
|
-
beforeInsideRef: h,
|
|
270
|
-
afterInsideRef: g,
|
|
271
|
-
portalNode: u,
|
|
272
|
-
setFocusManagerState: v
|
|
273
|
-
}), [u]);
|
|
274
|
-
return /*#__PURE__*/ P(M.Fragment, { children: [d, /*#__PURE__*/ P(Pe.Provider, {
|
|
275
|
-
value: te,
|
|
276
|
-
children: [
|
|
277
|
-
x && u && /*#__PURE__*/ N(z, {
|
|
278
|
-
"data-type": "outside",
|
|
279
|
-
ref: f,
|
|
280
|
-
onFocus: (e) => {
|
|
281
|
-
X(e, u) ? h.current?.focus() : xe(_ ? _.domReference : null)?.focus();
|
|
282
|
-
}
|
|
283
|
-
}),
|
|
284
|
-
x && u && /*#__PURE__*/ N("span", {
|
|
285
|
-
"aria-owns": u.id,
|
|
286
|
-
style: Ne
|
|
287
|
-
}),
|
|
288
|
-
u && /*#__PURE__*/ F.createPortal(o, u),
|
|
289
|
-
x && u && /*#__PURE__*/ N(z, {
|
|
290
|
-
"data-type": "outside",
|
|
291
|
-
ref: p,
|
|
292
|
-
onFocus: (e) => {
|
|
293
|
-
X(e, u) ? g.current?.focus() : (be(_ ? _.domReference : null)?.focus(), _?.closeOnFocusOut && _?.onOpenChange(!1, m("focus-out", e.nativeEvent)));
|
|
294
|
-
}
|
|
295
|
-
})
|
|
296
|
-
]
|
|
297
|
-
})] });
|
|
298
|
-
});
|
|
299
|
-
process.env.NODE_ENV !== "production" && (Re.displayName = "FloatingPortal");
|
|
300
|
-
//#endregion
|
|
301
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/floating-ui-react/utils/createEventEmitter.mjs
|
|
302
|
-
function ze() {
|
|
303
|
-
let e = /* @__PURE__ */ new Map();
|
|
304
|
-
return {
|
|
305
|
-
emit(t, n) {
|
|
306
|
-
e.get(t)?.forEach((e) => e(n));
|
|
307
|
-
},
|
|
308
|
-
on(t, n) {
|
|
309
|
-
e.has(t) || e.set(t, /* @__PURE__ */ new Set()), e.get(t).add(n);
|
|
310
|
-
},
|
|
311
|
-
off(t, n) {
|
|
312
|
-
e.get(t)?.delete(n);
|
|
313
|
-
}
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
//#endregion
|
|
317
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/floating-ui-react/components/FloatingTreeStore.mjs
|
|
318
|
-
var Be = class {
|
|
319
|
-
nodesRef = { current: [] };
|
|
320
|
-
events = ze();
|
|
321
|
-
addNode(e) {
|
|
322
|
-
this.nodesRef.current.push(e);
|
|
323
|
-
}
|
|
324
|
-
removeNode(e) {
|
|
325
|
-
let t = this.nodesRef.current.findIndex((t) => t === e);
|
|
326
|
-
t !== -1 && this.nodesRef.current.splice(t, 1);
|
|
327
|
-
}
|
|
328
|
-
}, Ve = /*#__PURE__*/ M.createContext(null);
|
|
329
|
-
process.env.NODE_ENV !== "production" && (Ve.displayName = "FloatingNodeContext");
|
|
330
|
-
var He = /*#__PURE__*/ M.createContext(null);
|
|
331
|
-
process.env.NODE_ENV !== "production" && (He.displayName = "FloatingTreeContext");
|
|
332
|
-
var Q = () => M.useContext(Ve)?.id || null, Ue = (e) => {
|
|
333
|
-
let t = M.useContext(He);
|
|
334
|
-
return e ?? t;
|
|
335
|
-
};
|
|
336
|
-
function We(e) {
|
|
337
|
-
let n = l(), r = Ue(e), i = Q();
|
|
338
|
-
return t(() => {
|
|
339
|
-
if (!n) return;
|
|
340
|
-
let e = {
|
|
341
|
-
id: n,
|
|
342
|
-
parentId: i
|
|
343
|
-
};
|
|
344
|
-
return r?.addNode(e), () => {
|
|
345
|
-
r?.removeNode(e);
|
|
346
|
-
};
|
|
347
|
-
}, [
|
|
348
|
-
r,
|
|
349
|
-
n,
|
|
350
|
-
i
|
|
351
|
-
]), n;
|
|
352
|
-
}
|
|
353
|
-
function Ge(e) {
|
|
354
|
-
let { children: t, id: n } = e, r = Q();
|
|
355
|
-
return /*#__PURE__*/ N(Ve.Provider, {
|
|
356
|
-
value: M.useMemo(() => ({
|
|
357
|
-
id: n,
|
|
358
|
-
parentId: r
|
|
359
|
-
}), [n, r]),
|
|
360
|
-
children: t
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
function Ke(e) {
|
|
364
|
-
let { children: t, externalTree: n } = e, i = r(() => n ?? new Be()).current;
|
|
365
|
-
return /*#__PURE__*/ N(He.Provider, {
|
|
366
|
-
value: i,
|
|
367
|
-
children: t
|
|
368
|
-
});
|
|
369
|
-
}
|
|
370
|
-
//#endregion
|
|
371
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/floating-ui-react/hooks/useDismiss.mjs
|
|
372
|
-
function qe() {
|
|
373
|
-
return !1;
|
|
374
|
-
}
|
|
375
|
-
function Je(e) {
|
|
376
|
-
return {
|
|
377
|
-
escapeKey: typeof e == "boolean" ? e : e?.escapeKey ?? !1,
|
|
378
|
-
outsidePress: typeof e == "boolean" ? e : e?.outsidePress ?? !0
|
|
379
|
-
};
|
|
380
|
-
}
|
|
381
|
-
function Ye(e, t = {}) {
|
|
382
|
-
let { enabled: n = !0, escapeKey: r = !0, outsidePress: i = !0, outsidePressEvent: a = "sloppy", referencePress: o = qe, bubbles: s, externalTree: l } = t, f = "rootStore" in e ? e.rootStore : e, h = f.useState("open"), g = f.useState("floatingElement"), { dataRef: _ } = f.context, v = Ue(l), y = c(typeof i == "function" ? i : () => !1), S = typeof i == "function" ? y : i, ie = S !== !1, ae = c(() => a), { escapeKey: T, outsidePress: ce } = Je(s), O = M.useRef(!1), k = M.useRef(!1), A = M.useRef(!1), j = M.useRef(!1), N = M.useRef(""), P = M.useRef(null), F = E(), I = E(), L = c(() => {
|
|
383
|
-
I.clear(), _.current.insideReactTree = !1;
|
|
384
|
-
}), z = c((e) => {
|
|
385
|
-
let t = _.current.floatingContext?.nodeId;
|
|
386
|
-
return (v ? Z(v.nodesRef.current, t) : []).some((t) => t.context?.open && !t.context.dataRef.current[e]);
|
|
387
|
-
}), B = c((e) => de(e, f.select("floatingElement")) || de(e, f.select("domReferenceElement"))), V = c((e) => {
|
|
388
|
-
o() && f.setOpen(!1, m(u, e.nativeEvent));
|
|
389
|
-
}), H = c((e) => {
|
|
390
|
-
if (!h || !n || !r || e.key !== "Escape" || j.current || !T && z("__escapeKeyBubbles")) return;
|
|
391
|
-
let t = m(p, oe(e) ? e.nativeEvent : e);
|
|
392
|
-
f.setOpen(!1, t), t.isCanceled || e.preventDefault(), !T && !t.isPropagationAllowed && e.stopPropagation();
|
|
393
|
-
}), U = c(() => {
|
|
394
|
-
_.current.insideReactTree = !0, I.start(0, L);
|
|
395
|
-
}), W = c((e) => {
|
|
396
|
-
if (!h || !n || e.button !== 0) return;
|
|
397
|
-
let t = ue(e.nativeEvent);
|
|
398
|
-
D(f.select("floatingElement"), t) && (O.current || (O.current = !0, k.current = !1));
|
|
399
|
-
}), G = c((e) => {
|
|
400
|
-
!h || !n || (e.defaultPrevented || e.nativeEvent.defaultPrevented) && O.current && (k.current = !0);
|
|
401
|
-
});
|
|
402
|
-
M.useEffect(() => {
|
|
403
|
-
if (!h || !n) return;
|
|
404
|
-
_.current.__escapeKeyBubbles = T, _.current.__outsidePressBubbles = ce;
|
|
405
|
-
let e = new le(), t = new le();
|
|
406
|
-
function i() {
|
|
407
|
-
e.clear(), j.current = !0;
|
|
408
|
-
}
|
|
409
|
-
function a() {
|
|
410
|
-
e.start(se ? 5 : 0, () => {
|
|
411
|
-
j.current = !1;
|
|
412
|
-
});
|
|
413
|
-
}
|
|
414
|
-
function o() {
|
|
415
|
-
A.current = !0, t.start(0, () => {
|
|
416
|
-
A.current = !1;
|
|
417
|
-
});
|
|
418
|
-
}
|
|
419
|
-
function s() {
|
|
420
|
-
O.current = !1, k.current = !1;
|
|
421
|
-
}
|
|
422
|
-
function c() {
|
|
423
|
-
let e = N.current, t = e === "pen" || !e ? "mouse" : e, n = ae(), r = typeof n == "function" ? n() : n;
|
|
424
|
-
return typeof r == "string" ? r : r[t];
|
|
425
|
-
}
|
|
426
|
-
function l(e) {
|
|
427
|
-
let t = c();
|
|
428
|
-
return t === "intentional" && e.type !== "click" || t === "sloppy" && e.type === "click";
|
|
429
|
-
}
|
|
430
|
-
function u(e) {
|
|
431
|
-
let t = _.current.floatingContext?.nodeId, n = v && Z(v.nodesRef.current, t).some((t) => de(e, t.context?.elements.floating));
|
|
432
|
-
return B(e) || n;
|
|
433
|
-
}
|
|
434
|
-
function p(e) {
|
|
435
|
-
if (l(e)) {
|
|
436
|
-
e.type !== "click" && !B(e) && (t.clear(), A.current = !1), L();
|
|
437
|
-
return;
|
|
438
|
-
}
|
|
439
|
-
if (_.current.insideReactTree) {
|
|
440
|
-
L();
|
|
441
|
-
return;
|
|
442
|
-
}
|
|
443
|
-
let n = ue(e), r = `[${Oe("inert")}]`, i = b(n) ? n.getRootNode() : null, a = Array.from((te(i) ? i : w(f.select("floatingElement"))).querySelectorAll(r)), o = f.context.triggerElements;
|
|
444
|
-
if (n && (o.hasElement(n) || o.hasMatchingElement((e) => D(e, n)))) return;
|
|
445
|
-
let s = b(n) ? n : null;
|
|
446
|
-
for (; s && !ne(s);) {
|
|
447
|
-
let e = ee(s);
|
|
448
|
-
if (ne(e) || !b(e)) break;
|
|
449
|
-
s = e;
|
|
450
|
-
}
|
|
451
|
-
if (!(a.length && b(n) && !fe(n) && !D(n, f.select("floatingElement")) && a.every((e) => !D(s, e)))) {
|
|
452
|
-
if (x(n) && !("touches" in e)) {
|
|
453
|
-
let t = ne(n), r = re(n), i = /auto|scroll/, a = t || i.test(r.overflowX), o = t || i.test(r.overflowY), s = a && n.clientWidth > 0 && n.scrollWidth > n.clientWidth, c = o && n.clientHeight > 0 && n.scrollHeight > n.clientHeight, l = r.direction === "rtl", u = c && (l ? e.offsetX <= n.offsetWidth - n.clientWidth : e.offsetX > n.clientWidth), d = s && e.offsetY > n.clientHeight;
|
|
454
|
-
if (u || d) return;
|
|
455
|
-
}
|
|
456
|
-
if (!u(e)) {
|
|
457
|
-
if (c() === "intentional" && A.current) {
|
|
458
|
-
t.clear(), A.current = !1;
|
|
459
|
-
return;
|
|
460
|
-
}
|
|
461
|
-
typeof S == "function" && !S(e) || z("__outsidePressBubbles") || (f.setOpen(!1, m(d, e)), L());
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
function y(e) {
|
|
466
|
-
c() !== "sloppy" || e.pointerType === "touch" || !f.select("open") || !n || B(e) || p(e);
|
|
467
|
-
}
|
|
468
|
-
function oe(e) {
|
|
469
|
-
if (c() !== "sloppy" || !f.select("open") || !n || B(e)) return;
|
|
470
|
-
let t = e.touches[0];
|
|
471
|
-
t && (P.current = {
|
|
472
|
-
startTime: Date.now(),
|
|
473
|
-
startX: t.clientX,
|
|
474
|
-
startY: t.clientY,
|
|
475
|
-
dismissOnTouchEnd: !1,
|
|
476
|
-
dismissOnMouseDown: !0
|
|
477
|
-
}, F.start(1e3, () => {
|
|
478
|
-
P.current && (P.current.dismissOnTouchEnd = !1, P.current.dismissOnMouseDown = !1);
|
|
479
|
-
}));
|
|
480
|
-
}
|
|
481
|
-
function E(e, t) {
|
|
482
|
-
let n = ue(e);
|
|
483
|
-
if (!n) return;
|
|
484
|
-
let r = C(n, e.type, () => {
|
|
485
|
-
t(e), r();
|
|
486
|
-
});
|
|
487
|
-
}
|
|
488
|
-
function M(e) {
|
|
489
|
-
N.current = "touch", E(e, oe);
|
|
490
|
-
}
|
|
491
|
-
function I(e) {
|
|
492
|
-
F.clear(), e.type === "pointerdown" && (N.current = e.pointerType), !(e.type === "mousedown" && P.current && !P.current.dismissOnMouseDown) && E(e, (e) => {
|
|
493
|
-
e.type === "pointerdown" ? y(e) : p(e);
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
function V(e) {
|
|
497
|
-
if (!O.current) return;
|
|
498
|
-
let n = k.current;
|
|
499
|
-
if (s(), c() === "intentional") {
|
|
500
|
-
if (e.type === "pointercancel") {
|
|
501
|
-
n && o();
|
|
502
|
-
return;
|
|
503
|
-
}
|
|
504
|
-
if (!u(e)) {
|
|
505
|
-
if (n) {
|
|
506
|
-
o();
|
|
507
|
-
return;
|
|
508
|
-
}
|
|
509
|
-
typeof S == "function" && !S(e) || (t.clear(), A.current = !0, L());
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
function U(e) {
|
|
514
|
-
if (c() !== "sloppy" || !P.current || B(e)) return;
|
|
515
|
-
let t = e.touches[0];
|
|
516
|
-
if (!t) return;
|
|
517
|
-
let n = Math.abs(t.clientX - P.current.startX), r = Math.abs(t.clientY - P.current.startY), i = Math.sqrt(n * n + r * r);
|
|
518
|
-
i > 5 && (P.current.dismissOnTouchEnd = !0), i > 10 && (p(e), F.clear(), P.current = null);
|
|
519
|
-
}
|
|
520
|
-
function W(e) {
|
|
521
|
-
E(e, U);
|
|
522
|
-
}
|
|
523
|
-
function G(e) {
|
|
524
|
-
c() !== "sloppy" || !P.current || B(e) || (P.current.dismissOnTouchEnd && p(e), F.clear(), P.current = null);
|
|
525
|
-
}
|
|
526
|
-
function K(e) {
|
|
527
|
-
E(e, G);
|
|
528
|
-
}
|
|
529
|
-
let q = w(g), J = R(r && R(C(q, "keydown", H), C(q, "compositionstart", i), C(q, "compositionend", a)), ie && R(C(q, "click", I, !0), C(q, "pointerdown", I, !0), C(q, "pointerup", V, !0), C(q, "pointercancel", V, !0), C(q, "mousedown", I, !0), C(q, "mouseup", V, !0), C(q, "touchstart", M, !0), C(q, "touchmove", W, !0), C(q, "touchend", K, !0)));
|
|
530
|
-
return () => {
|
|
531
|
-
J(), e.clear(), t.clear(), s(), A.current = !1;
|
|
532
|
-
};
|
|
533
|
-
}, [
|
|
534
|
-
_,
|
|
535
|
-
g,
|
|
536
|
-
r,
|
|
537
|
-
ie,
|
|
538
|
-
S,
|
|
539
|
-
h,
|
|
540
|
-
n,
|
|
541
|
-
T,
|
|
542
|
-
ce,
|
|
543
|
-
H,
|
|
544
|
-
L,
|
|
545
|
-
ae,
|
|
546
|
-
z,
|
|
547
|
-
B,
|
|
548
|
-
v,
|
|
549
|
-
f,
|
|
550
|
-
F
|
|
551
|
-
]), M.useEffect(L, [S, L]);
|
|
552
|
-
let K = M.useMemo(() => ({
|
|
553
|
-
onKeyDown: H,
|
|
554
|
-
onPointerDown: V,
|
|
555
|
-
onClick: V
|
|
556
|
-
}), [H, V]), q = M.useMemo(() => ({
|
|
557
|
-
onKeyDown: H,
|
|
558
|
-
onPointerDown: G,
|
|
559
|
-
onMouseDown: G,
|
|
560
|
-
onClickCapture: U,
|
|
561
|
-
onMouseDownCapture(e) {
|
|
562
|
-
U(), W(e);
|
|
563
|
-
},
|
|
564
|
-
onPointerDownCapture(e) {
|
|
565
|
-
U(), W(e);
|
|
566
|
-
},
|
|
567
|
-
onMouseUpCapture: U,
|
|
568
|
-
onTouchEndCapture: U,
|
|
569
|
-
onTouchMoveCapture: U
|
|
570
|
-
}), [
|
|
571
|
-
H,
|
|
572
|
-
U,
|
|
573
|
-
W,
|
|
574
|
-
G
|
|
575
|
-
]);
|
|
576
|
-
return M.useMemo(() => n ? {
|
|
577
|
-
reference: K,
|
|
578
|
-
floating: q,
|
|
579
|
-
trigger: K
|
|
580
|
-
} : {}, [
|
|
581
|
-
n,
|
|
582
|
-
K,
|
|
583
|
-
q
|
|
584
|
-
]);
|
|
585
|
-
}
|
|
586
|
-
//#endregion
|
|
587
|
-
//#region ../../node_modules/.bun/@base-ui+utils@0.3.1+fce4ea6354698f9c/node_modules/@base-ui/utils/store/createSelector.mjs
|
|
588
|
-
var $ = (e, t, n, r, i, a, ...o) => {
|
|
589
|
-
if (o.length > 0) throw Error(process.env.NODE_ENV === "production" ? s(1) : "Unsupported number of selectors");
|
|
590
|
-
let c;
|
|
591
|
-
if (e && t && n && r && i && a) c = (o, s, c, l) => a(e(o, s, c, l), t(o, s, c, l), n(o, s, c, l), r(o, s, c, l), i(o, s, c, l), s, c, l);
|
|
592
|
-
else if (e && t && n && r && i) c = (a, o, s, c) => i(e(a, o, s, c), t(a, o, s, c), n(a, o, s, c), r(a, o, s, c), o, s, c);
|
|
593
|
-
else if (e && t && n && r) c = (i, a, o, s) => r(e(i, a, o, s), t(i, a, o, s), n(i, a, o, s), a, o, s);
|
|
594
|
-
else if (e && t && n) c = (r, i, a, o) => n(e(r, i, a, o), t(r, i, a, o), i, a, o);
|
|
595
|
-
else if (e && t) c = (n, r, i, a) => t(e(n, r, i, a), r, i, a);
|
|
596
|
-
else if (e) c = e;
|
|
597
|
-
else throw Error("Missing arguments");
|
|
598
|
-
return c;
|
|
599
|
-
}, Xe = /* @__PURE__ */ e(((e) => {
|
|
600
|
-
var t = k(), n = A();
|
|
601
|
-
function r(e, t) {
|
|
602
|
-
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
603
|
-
}
|
|
604
|
-
var i = typeof Object.is == "function" ? Object.is : r, a = n.useSyncExternalStore, o = t.useRef, s = t.useEffect, c = t.useMemo, l = t.useDebugValue;
|
|
605
|
-
e.useSyncExternalStoreWithSelector = function(e, t, n, r, u) {
|
|
606
|
-
var d = o(null);
|
|
607
|
-
if (d.current === null) {
|
|
608
|
-
var f = {
|
|
609
|
-
hasValue: !1,
|
|
610
|
-
value: null
|
|
611
|
-
};
|
|
612
|
-
d.current = f;
|
|
613
|
-
} else f = d.current;
|
|
614
|
-
d = c(function() {
|
|
615
|
-
function e(e) {
|
|
616
|
-
if (!a) {
|
|
617
|
-
if (a = !0, o = e, e = r(e), u !== void 0 && f.hasValue) {
|
|
618
|
-
var t = f.value;
|
|
619
|
-
if (u(t, e)) return s = t;
|
|
620
|
-
}
|
|
621
|
-
return s = e;
|
|
622
|
-
}
|
|
623
|
-
if (t = s, i(o, e)) return t;
|
|
624
|
-
var n = r(e);
|
|
625
|
-
return u !== void 0 && u(t, n) ? (o = e, t) : (o = e, s = n);
|
|
626
|
-
}
|
|
627
|
-
var a = !1, o, s, c = n === void 0 ? null : n;
|
|
628
|
-
return [function() {
|
|
629
|
-
return e(t());
|
|
630
|
-
}, c === null ? void 0 : function() {
|
|
631
|
-
return e(c());
|
|
632
|
-
}];
|
|
633
|
-
}, [
|
|
634
|
-
t,
|
|
635
|
-
n,
|
|
636
|
-
r,
|
|
637
|
-
u
|
|
638
|
-
]);
|
|
639
|
-
var p = a(e, d[0], d[1]);
|
|
640
|
-
return s(function() {
|
|
641
|
-
f.hasValue = !0, f.value = p;
|
|
642
|
-
}, [p]), l(p), p;
|
|
643
|
-
};
|
|
644
|
-
})), Ze = /* @__PURE__ */ e(((e) => {
|
|
645
|
-
process.env.NODE_ENV !== "production" && (function() {
|
|
646
|
-
function t(e, t) {
|
|
647
|
-
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
648
|
-
}
|
|
649
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
650
|
-
var n = k(), r = A(), i = typeof Object.is == "function" ? Object.is : t, a = r.useSyncExternalStore, o = n.useRef, s = n.useEffect, c = n.useMemo, l = n.useDebugValue;
|
|
651
|
-
e.useSyncExternalStoreWithSelector = function(e, t, n, r, u) {
|
|
652
|
-
var d = o(null);
|
|
653
|
-
if (d.current === null) {
|
|
654
|
-
var f = {
|
|
655
|
-
hasValue: !1,
|
|
656
|
-
value: null
|
|
657
|
-
};
|
|
658
|
-
d.current = f;
|
|
659
|
-
} else f = d.current;
|
|
660
|
-
d = c(function() {
|
|
661
|
-
function e(e) {
|
|
662
|
-
if (!a) {
|
|
663
|
-
if (a = !0, o = e, e = r(e), u !== void 0 && f.hasValue) {
|
|
664
|
-
var t = f.value;
|
|
665
|
-
if (u(t, e)) return s = t;
|
|
666
|
-
}
|
|
667
|
-
return s = e;
|
|
668
|
-
}
|
|
669
|
-
if (t = s, i(o, e)) return t;
|
|
670
|
-
var n = r(e);
|
|
671
|
-
return u !== void 0 && u(t, n) ? (o = e, t) : (o = e, s = n);
|
|
672
|
-
}
|
|
673
|
-
var a = !1, o, s, c = n === void 0 ? null : n;
|
|
674
|
-
return [function() {
|
|
675
|
-
return e(t());
|
|
676
|
-
}, c === null ? void 0 : function() {
|
|
677
|
-
return e(c());
|
|
678
|
-
}];
|
|
679
|
-
}, [
|
|
680
|
-
t,
|
|
681
|
-
n,
|
|
682
|
-
r,
|
|
683
|
-
u
|
|
684
|
-
]);
|
|
685
|
-
var p = a(e, d[0], d[1]);
|
|
686
|
-
return s(function() {
|
|
687
|
-
f.hasValue = !0, f.value = p;
|
|
688
|
-
}, [p]), l(p), p;
|
|
689
|
-
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
690
|
-
})();
|
|
691
|
-
})), Qe = /* @__PURE__ */ e(((e, t) => {
|
|
692
|
-
process.env.NODE_ENV === "production" ? t.exports = Xe() : t.exports = Ze();
|
|
693
|
-
})), $e = A(), et = Qe(), tt = [], nt = void 0;
|
|
694
|
-
function rt() {
|
|
695
|
-
return nt;
|
|
696
|
-
}
|
|
697
|
-
function it(e) {
|
|
698
|
-
tt.push(e);
|
|
699
|
-
}
|
|
700
|
-
function at(e) {
|
|
701
|
-
let t = (t, n) => {
|
|
702
|
-
let i = r(st).current, a;
|
|
703
|
-
try {
|
|
704
|
-
nt = i;
|
|
705
|
-
for (let e of tt) e.before(i);
|
|
706
|
-
a = e(t, n);
|
|
707
|
-
for (let e of tt) e.after(i);
|
|
708
|
-
i.didInitialize = !0;
|
|
709
|
-
} finally {
|
|
710
|
-
nt = void 0;
|
|
711
|
-
}
|
|
712
|
-
return a;
|
|
713
|
-
};
|
|
714
|
-
return t.displayName = e.displayName || e.name, t;
|
|
715
|
-
}
|
|
716
|
-
function ot(e) {
|
|
717
|
-
return /*#__PURE__*/ M.forwardRef(at(e));
|
|
718
|
-
}
|
|
719
|
-
function st() {
|
|
720
|
-
return { didInitialize: !1 };
|
|
721
|
-
}
|
|
722
|
-
//#endregion
|
|
723
|
-
//#region ../../node_modules/.bun/@base-ui+utils@0.3.1+fce4ea6354698f9c/node_modules/@base-ui/utils/store/useStore.mjs
|
|
724
|
-
var ct = n(19) ? dt : ft;
|
|
725
|
-
function lt(e, t, n, r, i) {
|
|
726
|
-
return ct(e, t, n, r, i);
|
|
727
|
-
}
|
|
728
|
-
function ut(e, t, n, r, i) {
|
|
729
|
-
let a = M.useCallback(() => t(e.getSnapshot(), n, r, i), [
|
|
730
|
-
e,
|
|
731
|
-
t,
|
|
732
|
-
n,
|
|
733
|
-
r,
|
|
734
|
-
i
|
|
735
|
-
]);
|
|
736
|
-
return (0, $e.useSyncExternalStore)(e.subscribe, a, a);
|
|
737
|
-
}
|
|
738
|
-
it({
|
|
739
|
-
before(e) {
|
|
740
|
-
e.syncIndex = 0, e.didInitialize || (e.syncTick = 1, e.syncHooks = [], e.didChangeStore = !0, e.getSnapshot = () => {
|
|
741
|
-
let t = !1;
|
|
742
|
-
for (let n = 0; n < e.syncHooks.length; n += 1) {
|
|
743
|
-
let r = e.syncHooks[n], i = r.selector(r.store.state, r.a1, r.a2, r.a3);
|
|
744
|
-
Object.is(r.value, i) || (t = !0, r.value = i);
|
|
745
|
-
}
|
|
746
|
-
return t && (e.syncTick += 1), e.syncTick;
|
|
747
|
-
});
|
|
748
|
-
},
|
|
749
|
-
after(e) {
|
|
750
|
-
e.syncHooks.length > 0 && (e.didChangeStore && (e.didChangeStore = !1, e.subscribe = (t) => {
|
|
751
|
-
let n = /* @__PURE__ */ new Set();
|
|
752
|
-
for (let t of e.syncHooks) n.add(t.store);
|
|
753
|
-
let r = [];
|
|
754
|
-
for (let e of n) r.push(e.subscribe(t));
|
|
755
|
-
return () => {
|
|
756
|
-
for (let e of r) e();
|
|
757
|
-
};
|
|
758
|
-
}), (0, $e.useSyncExternalStore)(e.subscribe, e.getSnapshot, e.getSnapshot));
|
|
759
|
-
}
|
|
760
|
-
});
|
|
761
|
-
function dt(e, t, n, r, i) {
|
|
762
|
-
let a = rt();
|
|
763
|
-
if (!a) return ut(e, t, n, r, i);
|
|
764
|
-
let o = a.syncIndex;
|
|
765
|
-
a.syncIndex += 1;
|
|
766
|
-
let s;
|
|
767
|
-
return a.didInitialize ? (s = a.syncHooks[o], (s.store !== e || s.selector !== t || !Object.is(s.a1, n) || !Object.is(s.a2, r) || !Object.is(s.a3, i)) && (s.store !== e && (a.didChangeStore = !0), s.store = e, s.selector = t, s.a1 = n, s.a2 = r, s.a3 = i, s.value = t(e.getSnapshot(), n, r, i))) : (s = {
|
|
768
|
-
store: e,
|
|
769
|
-
selector: t,
|
|
770
|
-
a1: n,
|
|
771
|
-
a2: r,
|
|
772
|
-
a3: i,
|
|
773
|
-
value: t(e.getSnapshot(), n, r, i)
|
|
774
|
-
}, a.syncHooks.push(s)), s.value;
|
|
775
|
-
}
|
|
776
|
-
function ft(e, t, n, r, i) {
|
|
777
|
-
return (0, et.useSyncExternalStoreWithSelector)(e.subscribe, e.getSnapshot, e.getSnapshot, (e) => t(e, n, r, i));
|
|
778
|
-
}
|
|
779
|
-
//#endregion
|
|
780
|
-
//#region ../../node_modules/.bun/@base-ui+utils@0.3.1+fce4ea6354698f9c/node_modules/@base-ui/utils/store/Store.mjs
|
|
781
|
-
var pt = class {
|
|
782
|
-
constructor(e) {
|
|
783
|
-
this.state = e, this.listeners = /* @__PURE__ */ new Set(), this.updateTick = 0;
|
|
784
|
-
}
|
|
785
|
-
subscribe = (e) => (this.listeners.add(e), () => {
|
|
786
|
-
this.listeners.delete(e);
|
|
787
|
-
});
|
|
788
|
-
getSnapshot = () => this.state;
|
|
789
|
-
setState(e) {
|
|
790
|
-
if (this.state === e) return;
|
|
791
|
-
this.state = e, this.updateTick += 1;
|
|
792
|
-
let t = this.updateTick;
|
|
793
|
-
for (let n of this.listeners) {
|
|
794
|
-
if (t !== this.updateTick) return;
|
|
795
|
-
n(e);
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
update(e) {
|
|
799
|
-
for (let t in e) if (!Object.is(this.state[t], e[t])) {
|
|
800
|
-
this.setState({
|
|
801
|
-
...this.state,
|
|
802
|
-
...e
|
|
803
|
-
});
|
|
804
|
-
return;
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
set(e, t) {
|
|
808
|
-
Object.is(this.state[e], t) || this.setState({
|
|
809
|
-
...this.state,
|
|
810
|
-
[e]: t
|
|
811
|
-
});
|
|
812
|
-
}
|
|
813
|
-
notifyAll() {
|
|
814
|
-
let e = { ...this.state };
|
|
815
|
-
this.setState(e);
|
|
816
|
-
}
|
|
817
|
-
use(e, t, n, r) {
|
|
818
|
-
return lt(this, e, t, n, r);
|
|
819
|
-
}
|
|
820
|
-
}, mt = class extends pt {
|
|
821
|
-
constructor(e, t = {}, n) {
|
|
822
|
-
super(e), this.context = t, this.selectors = n;
|
|
823
|
-
}
|
|
824
|
-
useSyncedValue(e, n) {
|
|
825
|
-
M.useDebugValue(e);
|
|
826
|
-
let r = this;
|
|
827
|
-
t(() => {
|
|
828
|
-
r.state[e] !== n && r.set(e, n);
|
|
829
|
-
}, [
|
|
830
|
-
r,
|
|
831
|
-
e,
|
|
832
|
-
n
|
|
833
|
-
]);
|
|
834
|
-
}
|
|
835
|
-
useSyncedValueWithCleanup(e, n) {
|
|
836
|
-
let r = this;
|
|
837
|
-
t(() => (r.state[e] !== n && r.set(e, n), () => {
|
|
838
|
-
r.set(e, void 0);
|
|
839
|
-
}), [
|
|
840
|
-
r,
|
|
841
|
-
e,
|
|
842
|
-
n
|
|
843
|
-
]);
|
|
844
|
-
}
|
|
845
|
-
useSyncedValues(e) {
|
|
846
|
-
let n = this;
|
|
847
|
-
if (process.env.NODE_ENV !== "production") {
|
|
848
|
-
M.useDebugValue(e, (e) => Object.keys(e));
|
|
849
|
-
let t = M.useRef(Object.keys(e)).current, n = Object.keys(e);
|
|
850
|
-
(t.length !== n.length || t.some((e, t) => e !== n[t])) && console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
|
|
851
|
-
}
|
|
852
|
-
t(() => {
|
|
853
|
-
n.update(e);
|
|
854
|
-
}, [n, ...Object.values(e)]);
|
|
855
|
-
}
|
|
856
|
-
useControlledProp(e, n) {
|
|
857
|
-
M.useDebugValue(e);
|
|
858
|
-
let r = this, i = n !== void 0;
|
|
859
|
-
if (t(() => {
|
|
860
|
-
i && !Object.is(r.state[e], n) && r.setState({
|
|
861
|
-
...r.state,
|
|
862
|
-
[e]: n
|
|
863
|
-
});
|
|
864
|
-
}, [
|
|
865
|
-
r,
|
|
866
|
-
e,
|
|
867
|
-
n,
|
|
868
|
-
i
|
|
869
|
-
]), process.env.NODE_ENV !== "production") {
|
|
870
|
-
let t = this.controlledValues ??= /* @__PURE__ */ new Map();
|
|
871
|
-
t.has(e) || t.set(e, i);
|
|
872
|
-
let n = t.get(e);
|
|
873
|
-
n !== void 0 && n !== i && console.error(`A component is changing the ${i ? "" : "un"}controlled state of ${e.toString()} to be ${i ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);
|
|
874
|
-
}
|
|
875
|
-
}
|
|
876
|
-
select(e, t, n, r) {
|
|
877
|
-
let i = this.selectors[e];
|
|
878
|
-
return i(this.state, t, n, r);
|
|
879
|
-
}
|
|
880
|
-
useState(e, t, n, r) {
|
|
881
|
-
return M.useDebugValue(e), lt(this, this.selectors[e], t, n, r);
|
|
882
|
-
}
|
|
883
|
-
useContextCallback(e, t) {
|
|
884
|
-
M.useDebugValue(e);
|
|
885
|
-
let n = c(t ?? a);
|
|
886
|
-
this.context[e] = n;
|
|
887
|
-
}
|
|
888
|
-
useStateSetter(e) {
|
|
889
|
-
let t = M.useRef(void 0);
|
|
890
|
-
return t.current === void 0 && (t.current = (t) => {
|
|
891
|
-
this.set(e, t);
|
|
892
|
-
}), t.current;
|
|
893
|
-
}
|
|
894
|
-
observe(e, t) {
|
|
895
|
-
let n;
|
|
896
|
-
n = typeof e == "function" ? e : this.selectors[e];
|
|
897
|
-
let r = n(this.state);
|
|
898
|
-
return t(r, r, this), this.subscribe((e) => {
|
|
899
|
-
let i = n(e);
|
|
900
|
-
if (!Object.is(r, i)) {
|
|
901
|
-
let e = r;
|
|
902
|
-
r = i, t(i, e, this);
|
|
903
|
-
}
|
|
904
|
-
});
|
|
905
|
-
}
|
|
906
|
-
}, ht = {
|
|
907
|
-
open: $((e) => e.open),
|
|
908
|
-
transitionStatus: $((e) => e.transitionStatus),
|
|
909
|
-
domReferenceElement: $((e) => e.domReferenceElement),
|
|
910
|
-
referenceElement: $((e) => e.positionReference ?? e.referenceElement),
|
|
911
|
-
floatingElement: $((e) => e.floatingElement),
|
|
912
|
-
floatingId: $((e) => e.floatingId)
|
|
913
|
-
}, gt = class extends mt {
|
|
914
|
-
constructor(e) {
|
|
915
|
-
let { syncOnly: t, nested: n, onOpenChange: r, triggerElements: i, ...a } = e;
|
|
916
|
-
super({
|
|
917
|
-
...a,
|
|
918
|
-
positionReference: a.referenceElement,
|
|
919
|
-
domReferenceElement: a.referenceElement
|
|
920
|
-
}, {
|
|
921
|
-
onOpenChange: r,
|
|
922
|
-
dataRef: { current: {} },
|
|
923
|
-
events: ze(),
|
|
924
|
-
nested: n,
|
|
925
|
-
triggerElements: i
|
|
926
|
-
}, ht), this.syncOnly = t;
|
|
927
|
-
}
|
|
928
|
-
syncOpenEvent = (e, t) => {
|
|
929
|
-
(!e || !this.state.open || t != null && ie(t)) && (this.context.dataRef.current.openEvent = e ? t : void 0);
|
|
930
|
-
};
|
|
931
|
-
dispatchOpenChange = (e, t) => {
|
|
932
|
-
this.syncOpenEvent(e, t.event);
|
|
933
|
-
let n = {
|
|
934
|
-
open: e,
|
|
935
|
-
reason: t.reason,
|
|
936
|
-
nativeEvent: t.event,
|
|
937
|
-
nested: this.context.nested,
|
|
938
|
-
triggerElement: t.trigger
|
|
939
|
-
};
|
|
940
|
-
this.context.events.emit("openchange", n);
|
|
941
|
-
};
|
|
942
|
-
setOpen = (e, t) => {
|
|
943
|
-
if (this.syncOnly) {
|
|
944
|
-
this.context.onOpenChange?.(e, t);
|
|
945
|
-
return;
|
|
946
|
-
}
|
|
947
|
-
this.dispatchOpenChange(e, t), this.context.onOpenChange?.(e, t);
|
|
948
|
-
};
|
|
949
|
-
};
|
|
950
|
-
//#endregion
|
|
951
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs
|
|
952
|
-
function _t(e) {
|
|
953
|
-
let { popupStore: n, treatPopupAsFloatingElement: r = !1, floatingRootContext: i, floatingId: a, nested: o, onOpenChange: s } = e, c = n.useState("open"), l = n.useState("activeTriggerElement"), u = n.useState(r ? "popupElement" : "positionerElement"), d = n.context.triggerElements, f = s, p = M.useRef(null);
|
|
954
|
-
i === void 0 && p.current === null && (p.current = new gt({
|
|
955
|
-
open: c,
|
|
956
|
-
transitionStatus: void 0,
|
|
957
|
-
referenceElement: l,
|
|
958
|
-
floatingElement: u,
|
|
959
|
-
triggerElements: d,
|
|
960
|
-
onOpenChange: f,
|
|
961
|
-
floatingId: a,
|
|
962
|
-
syncOnly: !0,
|
|
963
|
-
nested: o
|
|
964
|
-
}));
|
|
965
|
-
let m = i ?? p.current;
|
|
966
|
-
return n.useSyncedValue("floatingId", a), t(() => {
|
|
967
|
-
let e = {
|
|
968
|
-
open: c,
|
|
969
|
-
floatingId: a,
|
|
970
|
-
referenceElement: l,
|
|
971
|
-
floatingElement: u
|
|
972
|
-
};
|
|
973
|
-
b(l) && (e.domReferenceElement = l), m.state.positionReference === m.state.referenceElement && (e.positionReference = l), m.update(e);
|
|
974
|
-
}, [
|
|
975
|
-
c,
|
|
976
|
-
a,
|
|
977
|
-
l,
|
|
978
|
-
u,
|
|
979
|
-
m
|
|
980
|
-
]), m.context.onOpenChange = f, m.context.nested = o, m;
|
|
981
|
-
}
|
|
982
|
-
//#endregion
|
|
983
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs
|
|
984
|
-
var vt = {
|
|
985
|
-
tabIndex: -1,
|
|
986
|
-
[ce]: ""
|
|
987
|
-
};
|
|
988
|
-
function yt(e) {
|
|
989
|
-
return (t) => t === "touch" ? e.current : !0;
|
|
990
|
-
}
|
|
991
|
-
function bt(e, t, n = !1) {
|
|
992
|
-
let r = l(), i = Q() != null, a = M.useRef(null);
|
|
993
|
-
e === void 0 && a.current === null && (a.current = t(r, i));
|
|
994
|
-
let o = e ?? a.current;
|
|
995
|
-
return _t({
|
|
996
|
-
popupStore: o,
|
|
997
|
-
treatPopupAsFloatingElement: n,
|
|
998
|
-
floatingRootContext: o.state.floatingRootContext,
|
|
999
|
-
floatingId: r,
|
|
1000
|
-
nested: i,
|
|
1001
|
-
onOpenChange: o.setOpen
|
|
1002
|
-
}), {
|
|
1003
|
-
store: o,
|
|
1004
|
-
internalStore: a.current
|
|
1005
|
-
};
|
|
1006
|
-
}
|
|
1007
|
-
function xt(e, t) {
|
|
1008
|
-
let n = M.useRef(null), r = M.useRef(null);
|
|
1009
|
-
return M.useCallback((i) => {
|
|
1010
|
-
if (e === void 0) return;
|
|
1011
|
-
let a = !1;
|
|
1012
|
-
if (n.current !== null) {
|
|
1013
|
-
let e = n.current, i = r.current, o = t.context.triggerElements.getById(e);
|
|
1014
|
-
i && o === i && (t.context.triggerElements.delete(e), a = !0), n.current = null, r.current = null;
|
|
1015
|
-
}
|
|
1016
|
-
if (i !== null && (n.current = e, r.current = i, t.context.triggerElements.add(e, i), a = !0), a) {
|
|
1017
|
-
let e = t.context.triggerElements.size;
|
|
1018
|
-
t.select("open") && t.state.triggerCount !== e && t.set("triggerCount", e);
|
|
1019
|
-
}
|
|
1020
|
-
}, [t, e]);
|
|
1021
|
-
}
|
|
1022
|
-
function St(e, t, n, r = !1) {
|
|
1023
|
-
t ? e.preventUnmountingOnClose = !1 : r && (e.preventUnmountingOnClose = !0);
|
|
1024
|
-
let i = n?.id ?? null;
|
|
1025
|
-
(i || t) && (e.activeTriggerId = i, e.activeTriggerElement = n ?? null);
|
|
1026
|
-
}
|
|
1027
|
-
function Ct(e) {
|
|
1028
|
-
let t = !1;
|
|
1029
|
-
return e.preventUnmountOnClose = () => {
|
|
1030
|
-
t = !0;
|
|
1031
|
-
}, () => t;
|
|
1032
|
-
}
|
|
1033
|
-
function wt(e, t, n, r = {}) {
|
|
1034
|
-
let i = n.reason, a = i === h, o = t && i === "trigger-focus", s = !t && (i === "trigger-press" || i === "escape-key"), c = Ct(n);
|
|
1035
|
-
if (e.context.onOpenChange?.(t, n), n.isCanceled) return;
|
|
1036
|
-
r.onBeforeDispatch?.(), e.state.floatingRootContext.dispatchOpenChange(t, n);
|
|
1037
|
-
let l = () => {
|
|
1038
|
-
let i = {
|
|
1039
|
-
...r.extraState,
|
|
1040
|
-
open: t
|
|
1041
|
-
};
|
|
1042
|
-
o ? i.instantType = "focus" : s ? i.instantType = "dismiss" : a && (i.instantType = void 0), St(i, t, n.trigger, c()), e.update(i);
|
|
1043
|
-
};
|
|
1044
|
-
a ? F.flushSync(l) : l();
|
|
1045
|
-
}
|
|
1046
|
-
function Tt(e, t, n, r) {
|
|
1047
|
-
I(() => {
|
|
1048
|
-
t === void 0 && e.state.open === !1 && n && (e.state = {
|
|
1049
|
-
...e.state,
|
|
1050
|
-
open: !0,
|
|
1051
|
-
activeTriggerId: r,
|
|
1052
|
-
preventUnmountingOnClose: !1
|
|
1053
|
-
});
|
|
1054
|
-
});
|
|
1055
|
-
}
|
|
1056
|
-
function Et(e, n, r, i) {
|
|
1057
|
-
let a = r.useState("isMountedByTrigger", e), o = xt(e, r), s = c((t) => {
|
|
1058
|
-
if (o(t), !t) return;
|
|
1059
|
-
let n = r.select("open"), a = r.select("activeTriggerId");
|
|
1060
|
-
if (a === e) {
|
|
1061
|
-
r.update({
|
|
1062
|
-
activeTriggerElement: t,
|
|
1063
|
-
...n ? i : null
|
|
1064
|
-
});
|
|
1065
|
-
return;
|
|
1066
|
-
}
|
|
1067
|
-
a == null && n && r.update({
|
|
1068
|
-
activeTriggerId: e,
|
|
1069
|
-
activeTriggerElement: t,
|
|
1070
|
-
...i
|
|
1071
|
-
});
|
|
1072
|
-
});
|
|
1073
|
-
return t(() => {
|
|
1074
|
-
a && r.update({
|
|
1075
|
-
activeTriggerElement: n.current,
|
|
1076
|
-
...i
|
|
1077
|
-
});
|
|
1078
|
-
}, [
|
|
1079
|
-
a,
|
|
1080
|
-
r,
|
|
1081
|
-
n,
|
|
1082
|
-
...Object.values(i)
|
|
1083
|
-
]), {
|
|
1084
|
-
registerTrigger: s,
|
|
1085
|
-
isMountedByThisTrigger: a
|
|
1086
|
-
};
|
|
1087
|
-
}
|
|
1088
|
-
function Dt(e, n = {}) {
|
|
1089
|
-
let { closeOnActiveTriggerUnmount: r = !1 } = n, i = e.useState("open");
|
|
1090
|
-
t(() => {
|
|
1091
|
-
if (!i) {
|
|
1092
|
-
e.state.triggerCount !== 0 && e.set("triggerCount", 0);
|
|
1093
|
-
return;
|
|
1094
|
-
}
|
|
1095
|
-
let t = e.context.triggerElements.size, n = {};
|
|
1096
|
-
e.state.triggerCount !== t && (n.triggerCount = t);
|
|
1097
|
-
let a = e.select("activeTriggerId"), o = null;
|
|
1098
|
-
if (a) {
|
|
1099
|
-
let t = e.context.triggerElements.getById(a);
|
|
1100
|
-
t ? t !== e.state.activeTriggerElement && (n.activeTriggerElement = t) : o = a;
|
|
1101
|
-
}
|
|
1102
|
-
if (!o && !a && t === 1) {
|
|
1103
|
-
let t = e.context.triggerElements.entries().next();
|
|
1104
|
-
if (!t.done) {
|
|
1105
|
-
let [e, r] = t.value;
|
|
1106
|
-
n.activeTriggerId = e, n.activeTriggerElement = r;
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
(n.triggerCount !== void 0 || n.activeTriggerId !== void 0 || n.activeTriggerElement !== void 0) && e.update(n), o && r && queueMicrotask(() => {
|
|
1110
|
-
if (e.select("open") && e.select("activeTriggerId") === o && !e.context.triggerElements.getById(o)) {
|
|
1111
|
-
let t = m(f);
|
|
1112
|
-
e.setOpen(!1, t), t.isCanceled || e.update({
|
|
1113
|
-
activeTriggerId: null,
|
|
1114
|
-
activeTriggerElement: null
|
|
1115
|
-
});
|
|
1116
|
-
}
|
|
1117
|
-
});
|
|
1118
|
-
}, [
|
|
1119
|
-
i,
|
|
1120
|
-
e,
|
|
1121
|
-
e.useState("triggerCount"),
|
|
1122
|
-
r
|
|
1123
|
-
]);
|
|
1124
|
-
}
|
|
1125
|
-
function Ot(e, t, n) {
|
|
1126
|
-
let { mounted: r, setMounted: i, transitionStatus: a } = _(e), o = t.useState("preventUnmountingOnClose"), s = e ? !1 : o;
|
|
1127
|
-
t.useSyncedValues({
|
|
1128
|
-
mounted: r,
|
|
1129
|
-
transitionStatus: a,
|
|
1130
|
-
preventUnmountingOnClose: s
|
|
1131
|
-
});
|
|
1132
|
-
let l = c(() => {
|
|
1133
|
-
i(!1), t.update({
|
|
1134
|
-
activeTriggerId: null,
|
|
1135
|
-
activeTriggerElement: null,
|
|
1136
|
-
mounted: !1,
|
|
1137
|
-
preventUnmountingOnClose: !1
|
|
1138
|
-
}), n?.(), t.context.onOpenChangeComplete?.(!1);
|
|
1139
|
-
});
|
|
1140
|
-
return v({
|
|
1141
|
-
enabled: r && !e && !s,
|
|
1142
|
-
open: e,
|
|
1143
|
-
ref: t.context.popupRef,
|
|
1144
|
-
onComplete() {
|
|
1145
|
-
e || l();
|
|
1146
|
-
}
|
|
1147
|
-
}), {
|
|
1148
|
-
forceUnmount: l,
|
|
1149
|
-
transitionStatus: a
|
|
1150
|
-
};
|
|
1151
|
-
}
|
|
1152
|
-
function kt(e, n) {
|
|
1153
|
-
e.useSyncedValues(n), t(() => () => {
|
|
1154
|
-
e.update({
|
|
1155
|
-
activeTriggerProps: i,
|
|
1156
|
-
inactiveTriggerProps: i,
|
|
1157
|
-
popupProps: i
|
|
1158
|
-
});
|
|
1159
|
-
}, [e]);
|
|
1160
|
-
}
|
|
1161
|
-
function At(e, n) {
|
|
1162
|
-
t(() => {
|
|
1163
|
-
!n && e.state.openMethod !== null && e.set("openMethod", null);
|
|
1164
|
-
}, [n, e]), t(() => () => {
|
|
1165
|
-
e.state.openMethod !== null && e.set("openMethod", null);
|
|
1166
|
-
}, [e]);
|
|
1167
|
-
}
|
|
1168
|
-
//#endregion
|
|
1169
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.6.0+df7f6a806acd27ca/node_modules/@base-ui/react/utils/popups/popupTriggerMap.mjs
|
|
1170
|
-
var jt = class {
|
|
1171
|
-
constructor() {
|
|
1172
|
-
this.elementsSet = /* @__PURE__ */ new Set(), this.idMap = /* @__PURE__ */ new Map();
|
|
1173
|
-
}
|
|
1174
|
-
add(e, t) {
|
|
1175
|
-
let n = this.idMap.get(e);
|
|
1176
|
-
if (n !== t && (n !== void 0 && this.elementsSet.delete(n), this.elementsSet.add(t), this.idMap.set(e, t), process.env.NODE_ENV !== "production" && this.elementsSet.size !== this.idMap.size)) throw Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");
|
|
1177
|
-
}
|
|
1178
|
-
delete(e) {
|
|
1179
|
-
let t = this.idMap.get(e);
|
|
1180
|
-
t && (this.elementsSet.delete(t), this.idMap.delete(e));
|
|
1181
|
-
}
|
|
1182
|
-
hasElement(e) {
|
|
1183
|
-
return this.elementsSet.has(e);
|
|
1184
|
-
}
|
|
1185
|
-
hasMatchingElement(e) {
|
|
1186
|
-
for (let t of this.elementsSet) if (e(t)) return !0;
|
|
1187
|
-
return !1;
|
|
1188
|
-
}
|
|
1189
|
-
getById(e) {
|
|
1190
|
-
return this.idMap.get(e);
|
|
1191
|
-
}
|
|
1192
|
-
entries() {
|
|
1193
|
-
return this.idMap.entries();
|
|
1194
|
-
}
|
|
1195
|
-
elements() {
|
|
1196
|
-
return this.elementsSet.values();
|
|
1197
|
-
}
|
|
1198
|
-
get size() {
|
|
1199
|
-
return this.idMap.size;
|
|
1200
|
-
}
|
|
1201
|
-
}, Mt = function(e) {
|
|
1202
|
-
return e.open = "data-open", e.closed = "data-closed", e[e.startingStyle = g.startingStyle] = "startingStyle", e[e.endingStyle = g.endingStyle] = "endingStyle", e.anchorHidden = "data-anchor-hidden", e.side = "data-side", e.align = "data-align", e;
|
|
1203
|
-
}({}), Nt = /*#__PURE__*/ function(e) {
|
|
1204
|
-
return e.popupOpen = "data-popup-open", e.pressed = "data-pressed", e;
|
|
1205
|
-
}({}), Pt = { [Nt.popupOpen]: "" }, Ft = {
|
|
1206
|
-
[Nt.popupOpen]: "",
|
|
1207
|
-
[Nt.pressed]: ""
|
|
1208
|
-
}, It = { [Mt.open]: "" }, Lt = { [Mt.closed]: "" }, Rt = { [Mt.anchorHidden]: "" }, zt = { open(e) {
|
|
1209
|
-
return e ? Pt : null;
|
|
1210
|
-
} }, Bt = { open(e) {
|
|
1211
|
-
return e ? Ft : null;
|
|
1212
|
-
} }, Vt = {
|
|
1213
|
-
open(e) {
|
|
1214
|
-
return e ? It : Lt;
|
|
1215
|
-
},
|
|
1216
|
-
anchorHidden(e) {
|
|
1217
|
-
return e ? Rt : null;
|
|
1218
|
-
}
|
|
1219
|
-
};
|
|
1220
|
-
//#endregion
|
|
1221
|
-
export { z as $, Ke as A, je as B, pt as C, $ as D, ot as E, Re as F, ve as G, Oe as H, Le as I, Ce as J, be as K, Fe as L, Q as M, Ue as N, Ye as O, Be as P, Y as Q, Ae as R, mt as S, at as T, De as U, Me as V, Z as W, X, we as Y, _e as Z, bt as _, zt as a, _t as b, wt as c, St as d, R as et, Dt as f, At as g, kt as h, Bt as i, We as j, Ge as k, Ct as l, Ot as m, Nt as n, jt as o, Tt as p, xe as q, Vt as r, vt as s, Mt as t, I as tt, yt as u, Et as v, lt as w, gt as x, xt as y, ke as z };
|