@nxgt/material 3.7.5 → 3.8.1
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/CHANGELOG.md +56 -0
- package/README.md +39 -6
- package/bin/nxgt-theme.js +6 -0
- package/dist/{async-slice-o_fpqeGX.js → async-slice-DDjaJY_F.js} +2 -2
- package/dist/background--Bf_EbFR.js +159 -0
- package/dist/backgrounds/backgrounds.css +2 -0
- package/dist/backgrounds/css-react/moon.css +97 -0
- package/dist/backgrounds.js +3 -139
- package/dist/browser-only-DQ94lWF8.js +18 -0
- package/dist/bubble-input-B7BVd9fX.js +237 -0
- package/dist/{button--cF4gY14.js → button-DbfdITBB.js} +51 -57
- package/dist/charts.js +3 -3
- package/dist/{chip-D1B1dL77.js → chip-DpySRqCy.js} +2 -2
- package/dist/{client-only.utils-lQ7GqP8w.js → client-only.utils-3nHNzCki.js} +1 -1
- package/dist/{code-editor-0CdGwKDg.js → code-editor-BiA14xua.js} +7 -7
- package/dist/code-editor.js +6 -6
- package/dist/{code-language-items-CGARRbVm.js → code-language-items-C_dJ6GVs.js} +2 -2
- package/dist/components/theme-tokens.css +34 -35
- package/dist/components/tones/app-tones.css +2 -1
- package/dist/components/tones/containers.css +4 -1
- package/dist/components/tones/index.css +2 -0
- package/dist/components/tones/surface.css +1 -0
- package/dist/components/tones/tokens.css +8 -3
- package/dist/components/tones/zone-paint.css +15 -0
- package/dist/components/ui/feedback/toast/toast-tokens.css +1 -0
- package/dist/components/ui/layout/app-shell/activity-backdrop.css +26 -0
- package/dist/components/ui/layout/sidebar/sidebar-tokens.css +5 -2
- package/dist/components/ui/media/media-player/nxgt-media-player.css +7 -32
- package/dist/components/ui/primitives/field-box/field-box-tokens.css +5 -2
- package/dist/{components-CDrQCOsU.js → components-DNUYg8QM.js} +18625 -18532
- package/dist/components.js +24 -22
- package/dist/{dialog-DdJ1C4BR.js → dialog-CkIYpJXk.js} +55 -53
- package/dist/dist-B7RjY7SL.js +158 -0
- package/dist/dist-C4wtXCjf.js +593 -0
- package/dist/dist-DVRQkaTK.js +111 -0
- package/dist/dist-lmHmz_bu.js +419 -0
- package/dist/dnd.js +1 -1
- package/dist/dropdown-menu-BC5Tbhb9.js +908 -0
- package/dist/editor.js +527 -527
- package/dist/empty-state-s2CSjKXJ.js +126 -0
- package/dist/{escape-owner-B8k7DvFa.js → escape-owner-CripBce_.js} +2 -1
- package/dist/{field-blur-DFUazxsL.js → field-blur-DPLsMufs.js} +1 -1
- package/dist/{field-blur-context-Dw9ZAgBr.js → field-blur-context-1ZwJgsHE.js} +2 -2
- package/dist/has-text-content-Ds2dkHX_.js +10 -0
- package/dist/hooks.js +35 -33
- package/dist/{hover-card-D5iHS9q1.js → hover-card-Cox-tPDz.js} +41 -39
- package/dist/{i18n-provider-C6SBK_nO.js → i18n-provider-C6HhBw34.js} +1 -1
- package/dist/i18n.js +6 -6
- package/dist/{icon-badge-Bb5-73XP.js → icon-badge-q3Ve8gra.js} +3 -3
- package/dist/{icon-button-5A6Mrj6w.js → icon-button-DJcWpIhu.js} +2 -1
- package/dist/{in-dialog-AiwTD3DK.js → in-dialog-Vwkyp-M5.js} +6 -5
- package/dist/lib/backgrounds/background/available.d.ts +3 -3
- package/dist/lib/backgrounds/background/background.d.ts +7 -3
- package/dist/lib/backgrounds/background/types.d.ts +7 -1
- package/dist/lib/backgrounds/index.d.ts +1 -1
- package/dist/lib/components/ui/layout/account-menu/account-menu-avatar.d.ts +1 -1
- package/dist/lib/components/ui/layout/app-shell/activity-chrome.d.ts +17 -0
- package/dist/lib/components/ui/layout/app-shell/activity-layout.d.ts +6 -4
- package/dist/lib/components/ui/layout/app-shell/backdrop-layer.d.ts +11 -0
- package/dist/lib/components/ui/layout/app-shell/keep-shapes-inside.d.ts +17 -0
- package/dist/lib/components/ui/layout/app-shell/theme-backdrop.d.ts +6 -0
- package/dist/lib/components/ui/layout/app-shell/use-activity-backdrop.d.ts +18 -0
- package/dist/lib/components/ui/layout/app-shell/use-keep-shapes-inside.d.ts +9 -0
- package/dist/lib/hooks/resolve-theme.d.ts +46 -1
- package/dist/lib/hooks/theme-store.d.ts +35 -4
- package/dist/lib/hooks/use-theme.d.ts +20 -4
- package/dist/lib/i18n/resources/en/en.d.ts +4 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +4 -0
- package/dist/lib/i18n/resources/fr/fr.d.ts +4 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +4 -0
- package/dist/lib/i18n/resources/resources.d.ts +8 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib/theme-picker/index.d.ts +7 -0
- package/dist/lib/theme-picker/partials/mini-background.d.ts +10 -0
- package/dist/lib/theme-picker/partials/mode-control.d.ts +5 -0
- package/dist/lib/theme-picker/partials/theme-tile.d.ts +12 -0
- package/dist/lib/theme-picker/theme-label.d.ts +7 -0
- package/dist/lib/theme-picker/theme-picker.d.ts +25 -0
- package/dist/lib/themes/index.d.ts +14 -0
- package/dist/lib/themes/nxgt-theme-provider.d.ts +29 -0
- package/dist/lib/themes/nxgt-theme.d.ts +22 -0
- package/dist/lib/themes/theme-context.d.ts +28 -0
- package/dist/lib/themes/theme-value.d.ts +5 -0
- package/dist/lib/vite/index.d.ts +1 -1
- package/dist/lib.js +3 -3
- package/dist/main.js +43 -39
- package/dist/map.js +8 -8
- package/dist/material.css +1 -1
- package/dist/nxgt-theme-CgSb9Obl.js +37 -0
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +2 -2
- package/dist/{public-SsiazLEv.js → public-Ce30uvp0.js} +591 -587
- package/dist/read-storage-C2J90bNm.js +10 -0
- package/dist/{rich-code-block-CwNwQs5z.js → rich-code-block-C2Fp_FDU.js} +5 -5
- package/dist/{sortable-provider-BvD98s8Y.js → sortable-provider-pVaEZzty.js} +3 -3
- package/dist/{spinner-CtGCPza-.js → spinner-CsHcmcpF.js} +2 -2
- package/dist/{stored-language-Bb7yX5uE.js → stored-language-BeIKw3-K.js} +15 -15
- package/dist/styles.css +8 -1
- package/dist/theme-context-BagPvRcz.js +16 -0
- package/dist/theme-picker.js +118 -0
- package/dist/theme-store-CSl51uNH.js +91 -0
- package/dist/theme-toggle-C8os82b4.js +48 -0
- package/dist/themes.js +42 -0
- package/dist/toggle-group-j8zaxEg1.js +69 -0
- package/dist/{toolbar-items-DsDDD5AY.js → toolbar-items-CqHvlTU8.js} +443 -589
- package/dist/tooltip-rhbqNmr3.js +1064 -0
- package/dist/{translate-material-Bsjc4Tow.js → translate-material-CGZljjp1.js} +2 -2
- package/dist/{translator-or2y0JJB.js → translator-DCYO4Ij3.js} +3 -3
- package/dist/{use-background-activity-B8jLHNop.js → use-background-activity-KxQgelFF.js} +1 -1
- package/dist/{use-chat-composer-DZ01a16D.js → use-chat-composer-CDrgWGMM.js} +4684 -4886
- package/dist/{use-heading-spy-ByOQNnFZ.js → use-heading-spy-DXo6IOX9.js} +52 -121
- package/dist/{use-material-translation-hLQzOjF0.js → use-material-translation-DkxcLbLM.js} +2 -2
- package/dist/use-slice-reducer-BGkeGtML.js +42 -0
- package/dist/use-theme-Cd-aiDJo.js +31 -0
- package/docs/README.md +2 -1
- package/docs/components/foundations.md +39 -0
- package/docs/components/navigation-and-layout.md +3 -3
- package/docs/getting-started.md +1 -1
- package/docs/guides/app-shell.md +41 -6
- package/docs/guides/backgrounds.md +43 -7
- package/docs/guides/i18n.md +1 -1
- package/docs/guides/themes.md +103 -0
- package/docs/guides/theming.md +288 -84
- package/docs/guides/vite-plugin.md +26 -0
- package/docs/previews/backgrounds-background-from-theme.webp +0 -0
- package/docs/previews/backgrounds-geometry-more.webp +0 -0
- package/docs/previews/backgrounds-geometry.webp +0 -0
- package/docs/previews/backgrounds-illustrated-scenes.webp +0 -0
- package/docs/previews/backgrounds-light-more.webp +0 -0
- package/docs/previews/backgrounds-light.webp +0 -0
- package/docs/previews/backgrounds-material-more.webp +0 -0
- package/docs/previews/backgrounds-matrix.webp +0 -0
- package/docs/previews/backgrounds-moon.webp +0 -0
- package/docs/previews/backgrounds-motif-shapes.webp +0 -0
- package/docs/previews/backgrounds-motifs.webp +0 -0
- package/docs/previews/foundations-themes-themepicker.webp +0 -0
- package/docs/roadmap.md +25 -0
- package/docs/troubleshooting.md +35 -7
- package/lib/backgrounds/backgrounds.css +2 -0
- package/lib/backgrounds/css-react/moon.css +97 -0
- package/lib/components/theme-tokens.css +34 -35
- package/lib/components/tones/app-tones.css +2 -1
- package/lib/components/tones/containers.css +4 -1
- package/lib/components/tones/index.css +2 -0
- package/lib/components/tones/surface.css +1 -0
- package/lib/components/tones/tokens.css +8 -3
- package/lib/components/tones/zone-paint.css +15 -0
- package/lib/components/ui/feedback/toast/toast-tokens.css +1 -0
- package/lib/components/ui/layout/app-shell/activity-backdrop.css +26 -0
- package/lib/components/ui/layout/sidebar/sidebar-tokens.css +5 -2
- package/lib/components/ui/media/media-player/nxgt-media-player.css +7 -32
- package/lib/components/ui/primitives/field-box/field-box-tokens.css +5 -2
- package/lib/styles.css +8 -1
- package/lib/theme-picker/theme-picker-list.css +29 -0
- package/lib/theme-picker/theme-picker.css +192 -0
- package/lib/theme-picker/theme-tile-background.css +77 -0
- package/lib/theme-picker/theme-tile-textures-night.css +63 -0
- package/lib/theme-picker/theme-tile-textures.css +153 -0
- package/lib/themes/ambre.css +134 -0
- package/lib/themes/ardoise.css +133 -0
- package/lib/themes/bleumono.css +136 -0
- package/lib/themes/bluemoon.css +136 -0
- package/lib/themes/corail.css +136 -0
- package/lib/themes/foret.css +133 -0
- package/lib/themes/lavande.css +133 -0
- package/lib/themes/menthe.css +136 -0
- package/lib/themes/ocean.css +136 -0
- package/lib/themes/pink.css +134 -0
- package/lib/themes/prune.css +133 -0
- package/lib/themes/sable.css +133 -0
- package/lib/themes/slate.css +133 -0
- package/lib/themes/teal.css +137 -0
- package/package.json +30 -2
- package/dist/dropdown-menu-DWtgUVW7.js +0 -1490
- package/dist/empty-state-CRWLQ1sM.js +0 -191
- package/dist/tooltip-tmFoTU_d.js +0 -1582
- package/dist/use-slice-reducer-0r5dXnJe.js +0 -58
package/dist/tooltip-tmFoTU_d.js
DELETED
|
@@ -1,1582 +0,0 @@
|
|
|
1
|
-
import { r as e } from "./rolldown-runtime-BFFgcFxR.js";
|
|
2
|
-
import { n as t, t as n } from "./utils-Bcd2Z3ea.js";
|
|
3
|
-
import { a as r, c as i, d as a, i as o, l as s, o as c, r as l, t as u, u as d } from "./floating-ui.dom-KkZSW8_E.js";
|
|
4
|
-
import * as f from "react";
|
|
5
|
-
import { useLayoutEffect as p, useRef as m, useSyncExternalStore as h } from "react";
|
|
6
|
-
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
7
|
-
import * as v from "react-dom";
|
|
8
|
-
import { forwardEscape as y } from "@nxgt/material-core/escape-forward";
|
|
9
|
-
//#region ../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
10
|
-
var b = Object.defineProperty, x = (e, t) => b(e, "name", {
|
|
11
|
-
value: t,
|
|
12
|
-
configurable: !0
|
|
13
|
-
});
|
|
14
|
-
function S(e, t) {
|
|
15
|
-
if (typeof e == "function") return e(t);
|
|
16
|
-
e != null && (e.current = t);
|
|
17
|
-
}
|
|
18
|
-
x(S, "setRef");
|
|
19
|
-
function C(...e) {
|
|
20
|
-
return (t) => {
|
|
21
|
-
let n = !1, r = e.map((e) => {
|
|
22
|
-
let r = S(e, t);
|
|
23
|
-
return !n && typeof r == "function" && (n = !0), r;
|
|
24
|
-
});
|
|
25
|
-
if (n) return () => {
|
|
26
|
-
for (let t = 0; t < r.length; t++) {
|
|
27
|
-
let n = r[t];
|
|
28
|
-
typeof n == "function" ? n() : S(e[t], null);
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
x(C, "composeRefs");
|
|
34
|
-
function w(...e) {
|
|
35
|
-
return f.useCallback(C(...e), e);
|
|
36
|
-
}
|
|
37
|
-
x(w, "useComposedRefs");
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region ../../node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
40
|
-
var T = Object.defineProperty, E = (e, t) => T(e, "name", {
|
|
41
|
-
value: t,
|
|
42
|
-
configurable: !0
|
|
43
|
-
});
|
|
44
|
-
// @__NO_SIDE_EFFECTS__
|
|
45
|
-
function D(e) {
|
|
46
|
-
let t = f.forwardRef((t, n) => {
|
|
47
|
-
let { children: r, ...i } = t, a = null, o = !1, s = [];
|
|
48
|
-
L(r) && typeof z == "function" && (r = z(r._payload)), f.Children.forEach(r, (e) => {
|
|
49
|
-
if (F(e)) {
|
|
50
|
-
o = !0;
|
|
51
|
-
let t = e, n = "child" in t.props ? t.props.child : t.props.children;
|
|
52
|
-
L(n) && typeof z == "function" && (n = z(n._payload)), a = M(t, n), s.push(a?.props?.children);
|
|
53
|
-
} else s.push(e);
|
|
54
|
-
}), a ? a = f.cloneElement(a, void 0, s) : !o && f.Children.count(r) === 1 && f.isValidElement(r) && (a = r);
|
|
55
|
-
let c = a ? P(a) : void 0, l = w(n, c);
|
|
56
|
-
if (!a) {
|
|
57
|
-
if (r || r === 0) throw Error(o ? te(e) : ee(e));
|
|
58
|
-
return r;
|
|
59
|
-
}
|
|
60
|
-
let u = N(i, a.props ?? {});
|
|
61
|
-
return a.type !== f.Fragment && (u.ref = n ? l : c), f.cloneElement(a, u);
|
|
62
|
-
});
|
|
63
|
-
return t.displayName = `${e}.Slot`, t;
|
|
64
|
-
}
|
|
65
|
-
E(D, "createSlot");
|
|
66
|
-
var O = /* @__PURE__ */ D("Slot"), k = Symbol.for("radix.slottable");
|
|
67
|
-
// @__NO_SIDE_EFFECTS__
|
|
68
|
-
function A(e) {
|
|
69
|
-
let t = /* @__PURE__ */ E((e) => "child" in e ? e.children(e.child) : e.children, "Slottable");
|
|
70
|
-
return t.displayName = `${e}.Slottable`, t.__radixId = k, t;
|
|
71
|
-
}
|
|
72
|
-
E(A, "createSlottable");
|
|
73
|
-
var j = /* @__PURE__ */ A("Slottable"), M = /* @__PURE__ */ E((e, t) => {
|
|
74
|
-
if ("child" in e.props) {
|
|
75
|
-
let t = e.props.child;
|
|
76
|
-
return f.isValidElement(t) ? f.cloneElement(t, void 0, e.props.children(t.props.children)) : null;
|
|
77
|
-
}
|
|
78
|
-
return f.isValidElement(t) ? t : null;
|
|
79
|
-
}, "getSlottableElementFromSlottable");
|
|
80
|
-
function N(e, t) {
|
|
81
|
-
let n = { ...t };
|
|
82
|
-
for (let r in t) {
|
|
83
|
-
let i = e[r], a = t[r];
|
|
84
|
-
/^on[A-Z]/.test(r) ? i && a ? n[r] = (...e) => {
|
|
85
|
-
let t = a(...e);
|
|
86
|
-
return i(...e), t;
|
|
87
|
-
} : i && (n[r] = i) : r === "style" ? n[r] = {
|
|
88
|
-
...i,
|
|
89
|
-
...a
|
|
90
|
-
} : r === "className" && (n[r] = [i, a].filter(Boolean).join(" "));
|
|
91
|
-
}
|
|
92
|
-
return {
|
|
93
|
-
...e,
|
|
94
|
-
...n
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
E(N, "mergeProps");
|
|
98
|
-
function P(e) {
|
|
99
|
-
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
100
|
-
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
101
|
-
}
|
|
102
|
-
E(P, "getElementRef");
|
|
103
|
-
function F(e) {
|
|
104
|
-
return f.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === k;
|
|
105
|
-
}
|
|
106
|
-
E(F, "isSlottable");
|
|
107
|
-
var I = Symbol.for("react.lazy");
|
|
108
|
-
function L(e) {
|
|
109
|
-
return typeof e == "object" && !!e && "$$typeof" in e && e.$$typeof === I && "_payload" in e && R(e._payload);
|
|
110
|
-
}
|
|
111
|
-
E(L, "isLazyComponent");
|
|
112
|
-
function R(e) {
|
|
113
|
-
return typeof e == "object" && !!e && "then" in e;
|
|
114
|
-
}
|
|
115
|
-
E(R, "isPromiseLike");
|
|
116
|
-
var ee = /* @__PURE__ */ E((e) => `${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`, "createSlotError"), te = /* @__PURE__ */ E((e) => `${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`, "createSlottableError"), z = f.use, ne = Object.defineProperty, re = (e, t) => ne(e, "name", {
|
|
117
|
-
value: t,
|
|
118
|
-
configurable: !0
|
|
119
|
-
}), B = [
|
|
120
|
-
"a",
|
|
121
|
-
"button",
|
|
122
|
-
"div",
|
|
123
|
-
"form",
|
|
124
|
-
"h2",
|
|
125
|
-
"h3",
|
|
126
|
-
"img",
|
|
127
|
-
"input",
|
|
128
|
-
"label",
|
|
129
|
-
"li",
|
|
130
|
-
"nav",
|
|
131
|
-
"ol",
|
|
132
|
-
"p",
|
|
133
|
-
"select",
|
|
134
|
-
"span",
|
|
135
|
-
"svg",
|
|
136
|
-
"ul"
|
|
137
|
-
].reduce((e, t) => {
|
|
138
|
-
let n = /* @__PURE__ */ D(`Primitive.${t}`), r = f.forwardRef((e, r) => {
|
|
139
|
-
let { asChild: i, ...a } = e, o = i ? n : t;
|
|
140
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ g(o, {
|
|
141
|
-
...a,
|
|
142
|
-
ref: r
|
|
143
|
-
});
|
|
144
|
-
});
|
|
145
|
-
return r.displayName = `Primitive.${t}`, {
|
|
146
|
-
...e,
|
|
147
|
-
[t]: r
|
|
148
|
-
};
|
|
149
|
-
}, {});
|
|
150
|
-
function ie(e, t) {
|
|
151
|
-
e && v.flushSync(() => e.dispatchEvent(t));
|
|
152
|
-
}
|
|
153
|
-
re(ie, "dispatchDiscreteCustomEvent");
|
|
154
|
-
//#endregion
|
|
155
|
-
//#region ../../node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
156
|
-
var ae = Object.defineProperty, oe = (e, t) => ae(e, "name", {
|
|
157
|
-
value: t,
|
|
158
|
-
configurable: !0
|
|
159
|
-
}), se = Object.freeze({
|
|
160
|
-
position: "absolute",
|
|
161
|
-
border: 0,
|
|
162
|
-
width: 1,
|
|
163
|
-
height: 1,
|
|
164
|
-
padding: 0,
|
|
165
|
-
margin: -1,
|
|
166
|
-
overflow: "hidden",
|
|
167
|
-
clip: "rect(0, 0, 0, 0)",
|
|
168
|
-
whiteSpace: "nowrap",
|
|
169
|
-
wordWrap: "normal"
|
|
170
|
-
}), ce = /* @__PURE__ */ f.forwardRef(/* @__PURE__ */ oe(function(e, t) {
|
|
171
|
-
return /* @__PURE__ */ g(B.span, {
|
|
172
|
-
...e,
|
|
173
|
-
ref: t,
|
|
174
|
-
style: {
|
|
175
|
-
...se,
|
|
176
|
-
...e.style
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
}, "VisuallyHidden")), le = Object.defineProperty, V = (e, t) => le(e, "name", {
|
|
180
|
-
value: t,
|
|
181
|
-
configurable: !0
|
|
182
|
-
});
|
|
183
|
-
// @__NO_SIDE_EFFECTS__
|
|
184
|
-
function ue(e, t) {
|
|
185
|
-
let n = f.createContext(t);
|
|
186
|
-
n.displayName = e + "Context";
|
|
187
|
-
let r = /* @__PURE__ */ V((e) => {
|
|
188
|
-
let { children: t, ...r } = e, i = f.useMemo(() => r, Object.values(r));
|
|
189
|
-
return /* @__PURE__ */ g(n.Provider, {
|
|
190
|
-
value: i,
|
|
191
|
-
children: t
|
|
192
|
-
});
|
|
193
|
-
}, "Provider");
|
|
194
|
-
r.displayName = e + "Provider";
|
|
195
|
-
function i(r, i = {}) {
|
|
196
|
-
let { optional: a = !1 } = i, o = f.useContext(n);
|
|
197
|
-
if (o) return o;
|
|
198
|
-
if (t !== void 0) return t;
|
|
199
|
-
if (!a) throw Error(`\`${r}\` must be used within \`${e}\``);
|
|
200
|
-
}
|
|
201
|
-
return V(i, "useContext"), [r, i];
|
|
202
|
-
}
|
|
203
|
-
V(ue, "createContext");
|
|
204
|
-
// @__NO_SIDE_EFFECTS__
|
|
205
|
-
function de(e, t = []) {
|
|
206
|
-
let n = [];
|
|
207
|
-
function r(t, r) {
|
|
208
|
-
let i = f.createContext(r);
|
|
209
|
-
i.displayName = t + "Context";
|
|
210
|
-
let a = n.length;
|
|
211
|
-
n = [...n, r];
|
|
212
|
-
let o = /* @__PURE__ */ V((t) => {
|
|
213
|
-
let { scope: n, children: r, ...o } = t, s = n?.[e]?.[a] || i, c = f.useMemo(() => o, Object.values(o));
|
|
214
|
-
return /* @__PURE__ */ g(s.Provider, {
|
|
215
|
-
value: c,
|
|
216
|
-
children: r
|
|
217
|
-
});
|
|
218
|
-
}, "Provider");
|
|
219
|
-
o.displayName = t + "Provider";
|
|
220
|
-
function s(n, o, s = {}) {
|
|
221
|
-
let { optional: c = !1 } = s, l = o?.[e]?.[a] || i, u = f.useContext(l);
|
|
222
|
-
if (u) return u;
|
|
223
|
-
if (r !== void 0) return r;
|
|
224
|
-
if (!c) throw Error(`\`${n}\` must be used within \`${t}\``);
|
|
225
|
-
}
|
|
226
|
-
return V(s, "useContext"), [o, s];
|
|
227
|
-
}
|
|
228
|
-
V(r, "createContext");
|
|
229
|
-
let i = /* @__PURE__ */ V(() => {
|
|
230
|
-
let t = n.map((e) => f.createContext(e));
|
|
231
|
-
return /* @__PURE__ */ V(function(n) {
|
|
232
|
-
let r = n?.[e] || t;
|
|
233
|
-
return f.useMemo(() => ({ [`__scope${e}`]: {
|
|
234
|
-
...n,
|
|
235
|
-
[e]: r
|
|
236
|
-
} }), [n, r]);
|
|
237
|
-
}, "useScope");
|
|
238
|
-
}, "createScope");
|
|
239
|
-
return i.scopeName = e, [r, fe(i, ...t)];
|
|
240
|
-
}
|
|
241
|
-
V(de, "createContextScope");
|
|
242
|
-
function fe(...e) {
|
|
243
|
-
let t = e[0];
|
|
244
|
-
if (e.length === 1) return t;
|
|
245
|
-
let n = /* @__PURE__ */ V(() => {
|
|
246
|
-
let n = e.map((e) => ({
|
|
247
|
-
useScope: e(),
|
|
248
|
-
scopeName: e.scopeName
|
|
249
|
-
}));
|
|
250
|
-
return /* @__PURE__ */ V(function(e) {
|
|
251
|
-
let r = n.reduce((t, { useScope: n, scopeName: r }) => {
|
|
252
|
-
let i = n(e)[`__scope${r}`];
|
|
253
|
-
return {
|
|
254
|
-
...t,
|
|
255
|
-
...i
|
|
256
|
-
};
|
|
257
|
-
}, {});
|
|
258
|
-
return f.useMemo(() => ({ [`__scope${t.scopeName}`]: r }), [r]);
|
|
259
|
-
}, "useComposedScopes");
|
|
260
|
-
}, "createScope");
|
|
261
|
-
return n.scopeName = t.scopeName, n;
|
|
262
|
-
}
|
|
263
|
-
V(fe, "composeContextScopes");
|
|
264
|
-
//#endregion
|
|
265
|
-
//#region ../../node_modules/@radix-ui/primitive/dist/index.mjs
|
|
266
|
-
var pe = Object.defineProperty, H = (e, t) => pe(e, "name", {
|
|
267
|
-
value: t,
|
|
268
|
-
configurable: !0
|
|
269
|
-
}), me = !!(typeof window < "u" && window.document && window.document.createElement);
|
|
270
|
-
function U(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
271
|
-
return /* @__PURE__ */ H(function(r) {
|
|
272
|
-
if (e?.(r), n === !1 || !r || !r.defaultPrevented) return t?.(r);
|
|
273
|
-
}, "handleEvent");
|
|
274
|
-
}
|
|
275
|
-
H(U, "composeEventHandlers");
|
|
276
|
-
function he(e) {
|
|
277
|
-
if (!me) throw Error("Cannot access window outside of the DOM");
|
|
278
|
-
return e?.ownerDocument?.defaultView ?? window;
|
|
279
|
-
}
|
|
280
|
-
H(he, "getOwnerWindow");
|
|
281
|
-
function ge(e) {
|
|
282
|
-
if (!me) throw Error("Cannot access document outside of the DOM");
|
|
283
|
-
return e?.ownerDocument ?? document;
|
|
284
|
-
}
|
|
285
|
-
H(ge, "getOwnerDocument");
|
|
286
|
-
function _e(e, t = !1) {
|
|
287
|
-
let { activeElement: n } = ge(e);
|
|
288
|
-
if (!n?.nodeName) return null;
|
|
289
|
-
if (ve(n) && n.contentDocument) return _e(n.contentDocument.body, t);
|
|
290
|
-
if (t) {
|
|
291
|
-
let e = n.getAttribute("aria-activedescendant");
|
|
292
|
-
if (e) {
|
|
293
|
-
let t = ge(n).getElementById(e);
|
|
294
|
-
if (t) return t;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
return n;
|
|
298
|
-
}
|
|
299
|
-
H(_e, "getActiveElement");
|
|
300
|
-
function ve(e) {
|
|
301
|
-
return e.tagName === "IFRAME";
|
|
302
|
-
}
|
|
303
|
-
H(ve, "isFrame");
|
|
304
|
-
//#endregion
|
|
305
|
-
//#region ../../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
306
|
-
var W = globalThis?.document ? f.useLayoutEffect : () => {}, ye = Object.defineProperty, be = (e, t) => ye(e, "name", {
|
|
307
|
-
value: t,
|
|
308
|
-
configurable: !0
|
|
309
|
-
}), xe = f.useEffectEvent, Se = f.useInsertionEffect;
|
|
310
|
-
function Ce(e) {
|
|
311
|
-
if (typeof xe == "function") return xe(e);
|
|
312
|
-
let t = f.useRef(() => {
|
|
313
|
-
throw Error("Cannot call an event handler while rendering.");
|
|
314
|
-
});
|
|
315
|
-
return typeof Se == "function" ? Se(() => {
|
|
316
|
-
t.current = e;
|
|
317
|
-
}) : W(() => {
|
|
318
|
-
t.current = e;
|
|
319
|
-
}), f.useMemo(() => ((...e) => t.current?.(...e)), []);
|
|
320
|
-
}
|
|
321
|
-
be(Ce, "useEffectEvent");
|
|
322
|
-
//#endregion
|
|
323
|
-
//#region ../../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
324
|
-
var we = Object.defineProperty, G = (e, t) => we(e, "name", {
|
|
325
|
-
value: t,
|
|
326
|
-
configurable: !0
|
|
327
|
-
}), Te = f.useInsertionEffect || W;
|
|
328
|
-
function Ee({ prop: e, defaultProp: t, onChange: n = /* @__PURE__ */ G(() => {}, "onChange"), caller: r }) {
|
|
329
|
-
let [i, a, o] = De({
|
|
330
|
-
defaultProp: t,
|
|
331
|
-
onChange: n
|
|
332
|
-
}), s = e !== void 0;
|
|
333
|
-
return [s ? e : i, f.useCallback((t) => {
|
|
334
|
-
if (s) {
|
|
335
|
-
let n = Oe(t) ? t(e) : t;
|
|
336
|
-
n !== e && o.current?.(n);
|
|
337
|
-
} else a(t);
|
|
338
|
-
}, [
|
|
339
|
-
s,
|
|
340
|
-
e,
|
|
341
|
-
a,
|
|
342
|
-
o
|
|
343
|
-
])];
|
|
344
|
-
}
|
|
345
|
-
G(Ee, "useControllableState");
|
|
346
|
-
function De({ defaultProp: e, onChange: t }) {
|
|
347
|
-
let [n, r] = f.useState(e), i = f.useRef(n), a = f.useRef(t);
|
|
348
|
-
return Te(() => {
|
|
349
|
-
a.current = t;
|
|
350
|
-
}, [t]), f.useEffect(() => {
|
|
351
|
-
i.current !== n && (a.current?.(n), i.current = n);
|
|
352
|
-
}, [n, i]), [
|
|
353
|
-
n,
|
|
354
|
-
r,
|
|
355
|
-
a
|
|
356
|
-
];
|
|
357
|
-
}
|
|
358
|
-
G(De, "useUncontrolledState");
|
|
359
|
-
function Oe(e) {
|
|
360
|
-
return typeof e == "function";
|
|
361
|
-
}
|
|
362
|
-
G(Oe, "isFunction");
|
|
363
|
-
var ke = Symbol("RADIX:SYNC_STATE");
|
|
364
|
-
function Ae(e, t, n, r) {
|
|
365
|
-
let { prop: i, defaultProp: a, onChange: o, caller: s } = t, c = i !== void 0, l = Ce(o), u = [{
|
|
366
|
-
...n,
|
|
367
|
-
state: a
|
|
368
|
-
}];
|
|
369
|
-
r && u.push(r);
|
|
370
|
-
let [d, p] = f.useReducer((t, n) => {
|
|
371
|
-
if (n.type === ke) return {
|
|
372
|
-
...t,
|
|
373
|
-
state: n.state
|
|
374
|
-
};
|
|
375
|
-
let r = e(t, n);
|
|
376
|
-
return c && !Object.is(r.state, t.state) && l(r.state), r;
|
|
377
|
-
}, ...u), m = d.state, h = f.useRef(m);
|
|
378
|
-
f.useEffect(() => {
|
|
379
|
-
h.current !== m && (h.current = m, c || l(m));
|
|
380
|
-
}, [
|
|
381
|
-
m,
|
|
382
|
-
h,
|
|
383
|
-
c
|
|
384
|
-
]);
|
|
385
|
-
let g = f.useMemo(() => i === void 0 ? d : {
|
|
386
|
-
...d,
|
|
387
|
-
state: i
|
|
388
|
-
}, [d, i]);
|
|
389
|
-
return f.useEffect(() => {
|
|
390
|
-
c && !Object.is(i, d.state) && p({
|
|
391
|
-
type: ke,
|
|
392
|
-
state: i
|
|
393
|
-
});
|
|
394
|
-
}, [
|
|
395
|
-
i,
|
|
396
|
-
d.state,
|
|
397
|
-
c
|
|
398
|
-
]), [g, p];
|
|
399
|
-
}
|
|
400
|
-
G(Ae, "useControllableStateReducer");
|
|
401
|
-
//#endregion
|
|
402
|
-
//#region ../../node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
403
|
-
var je = Object.defineProperty, K = (e, t) => je(e, "name", {
|
|
404
|
-
value: t,
|
|
405
|
-
configurable: !0
|
|
406
|
-
});
|
|
407
|
-
function Me(e, t) {
|
|
408
|
-
return f.useReducer((e, n) => t[e][n] ?? e, e);
|
|
409
|
-
}
|
|
410
|
-
K(Me, "useStateMachine");
|
|
411
|
-
var Ne = /* @__PURE__ */ K((e) => {
|
|
412
|
-
let { present: t, children: n } = e, r = Pe(t), i = typeof n == "function" ? n({ present: r.isPresent }) : f.Children.only(n), a = Ie(r.ref, Le(i));
|
|
413
|
-
return typeof n == "function" || r.isPresent ? f.cloneElement(i, { ref: a }) : null;
|
|
414
|
-
}, "Presence");
|
|
415
|
-
function Pe(e) {
|
|
416
|
-
let [t, n] = f.useState(), r = f.useRef(null), i = f.useRef(e), a = f.useRef("none"), o = f.useRef(void 0), [s, c] = Me(e ? "mounted" : "unmounted", {
|
|
417
|
-
mounted: {
|
|
418
|
-
UNMOUNT: "unmounted",
|
|
419
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
420
|
-
},
|
|
421
|
-
unmountSuspended: {
|
|
422
|
-
MOUNT: "mounted",
|
|
423
|
-
ANIMATION_END: "unmounted"
|
|
424
|
-
},
|
|
425
|
-
unmounted: { MOUNT: "mounted" }
|
|
426
|
-
});
|
|
427
|
-
return f.useEffect(() => {
|
|
428
|
-
s === "mounted" ? (a.current = o.current ?? q(r.current), o.current = void 0) : a.current = "none";
|
|
429
|
-
}, [s]), W(() => {
|
|
430
|
-
let t = r.current, n = i.current;
|
|
431
|
-
if (n !== e) {
|
|
432
|
-
let r = a.current, s = q(t);
|
|
433
|
-
e ? (o.current = s, c("MOUNT")) : s === "none" || t?.display === "none" ? c("UNMOUNT") : c(n && r !== s ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
|
|
434
|
-
}
|
|
435
|
-
}, [e, c]), W(() => {
|
|
436
|
-
if (t) {
|
|
437
|
-
let e, n = t.ownerDocument.defaultView ?? window, o = /* @__PURE__ */ K((a) => {
|
|
438
|
-
let o = q(r.current).includes(CSS.escape(a.animationName));
|
|
439
|
-
if (a.target === t && o && (c("ANIMATION_END"), !i.current)) {
|
|
440
|
-
let r = t.style.animationFillMode;
|
|
441
|
-
t.style.animationFillMode = "forwards", e = n.setTimeout(() => {
|
|
442
|
-
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = r);
|
|
443
|
-
});
|
|
444
|
-
}
|
|
445
|
-
}, "handleAnimationEnd"), s = /* @__PURE__ */ K((e) => {
|
|
446
|
-
e.target === t && (a.current = q(r.current));
|
|
447
|
-
}, "handleAnimationStart");
|
|
448
|
-
return t.addEventListener("animationstart", s), t.addEventListener("animationcancel", o), t.addEventListener("animationend", o), () => {
|
|
449
|
-
n.clearTimeout(e), t.removeEventListener("animationstart", s), t.removeEventListener("animationcancel", o), t.removeEventListener("animationend", o);
|
|
450
|
-
};
|
|
451
|
-
} else c("ANIMATION_END");
|
|
452
|
-
}, [t, c]), {
|
|
453
|
-
isPresent: ["mounted", "unmountSuspended"].includes(s),
|
|
454
|
-
ref: f.useCallback((e) => {
|
|
455
|
-
if (e) {
|
|
456
|
-
let t = getComputedStyle(e);
|
|
457
|
-
r.current = t, o.current = q(t);
|
|
458
|
-
} else r.current = null;
|
|
459
|
-
n(e);
|
|
460
|
-
}, [])
|
|
461
|
-
};
|
|
462
|
-
}
|
|
463
|
-
K(Pe, "usePresence");
|
|
464
|
-
function Fe(e, t) {
|
|
465
|
-
if (typeof e == "function") return e(t);
|
|
466
|
-
e != null && (e.current = t);
|
|
467
|
-
}
|
|
468
|
-
K(Fe, "setRef");
|
|
469
|
-
function Ie(...e) {
|
|
470
|
-
let t = f.useRef(e);
|
|
471
|
-
return t.current = e, f.useCallback((e) => {
|
|
472
|
-
let n = t.current, r = !1, i = n.map((t) => {
|
|
473
|
-
let n = Fe(t, e);
|
|
474
|
-
return !r && typeof n == "function" && (r = !0), n;
|
|
475
|
-
});
|
|
476
|
-
if (r) return () => {
|
|
477
|
-
for (let e = 0; e < i.length; e++) {
|
|
478
|
-
let t = i[e];
|
|
479
|
-
typeof t == "function" ? t() : Fe(n[e], null);
|
|
480
|
-
}
|
|
481
|
-
};
|
|
482
|
-
}, []);
|
|
483
|
-
}
|
|
484
|
-
K(Ie, "useStableComposedRefs");
|
|
485
|
-
function q(e) {
|
|
486
|
-
return e?.animationName || "none";
|
|
487
|
-
}
|
|
488
|
-
K(q, "getAnimationName");
|
|
489
|
-
function Le(e) {
|
|
490
|
-
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
491
|
-
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
492
|
-
}
|
|
493
|
-
K(Le, "getElementRef");
|
|
494
|
-
//#endregion
|
|
495
|
-
//#region ../../node_modules/@radix-ui/react-id/dist/index.mjs
|
|
496
|
-
var Re = Object.defineProperty, ze = (e, t) => Re(e, "name", {
|
|
497
|
-
value: t,
|
|
498
|
-
configurable: !0
|
|
499
|
-
}), Be = f.useId || (() => void 0), Ve = 0;
|
|
500
|
-
function He(e) {
|
|
501
|
-
let [t, n] = f.useState(Be());
|
|
502
|
-
return W(() => {
|
|
503
|
-
e || n((e) => e ?? String(Ve++));
|
|
504
|
-
}, [e]), e || (t ? `radix-${t}` : "");
|
|
505
|
-
}
|
|
506
|
-
ze(He, "useId");
|
|
507
|
-
//#endregion
|
|
508
|
-
//#region ../../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
509
|
-
var Ue = Object.defineProperty, We = (e, t) => Ue(e, "name", {
|
|
510
|
-
value: t,
|
|
511
|
-
configurable: !0
|
|
512
|
-
});
|
|
513
|
-
function J(e) {
|
|
514
|
-
let t = f.useRef(e);
|
|
515
|
-
return f.useEffect(() => {
|
|
516
|
-
t.current = e;
|
|
517
|
-
}), f.useMemo(() => ((...e) => t.current?.(...e)), []);
|
|
518
|
-
}
|
|
519
|
-
We(J, "useCallbackRef");
|
|
520
|
-
//#endregion
|
|
521
|
-
//#region ../../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
522
|
-
var Ge = Object.defineProperty, Y = (e, t) => Ge(e, "name", {
|
|
523
|
-
value: t,
|
|
524
|
-
configurable: !0
|
|
525
|
-
}), Ke = "dismissableLayer.update", qe = "dismissableLayer.pointerDownOutside", Je = "dismissableLayer.focusOutside", Ye, Xe = f.createContext({
|
|
526
|
-
layers: /* @__PURE__ */ new Set(),
|
|
527
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
528
|
-
branches: /* @__PURE__ */ new Set(),
|
|
529
|
-
dismissableSurfaces: /* @__PURE__ */ new Set()
|
|
530
|
-
}), Ze = /* @__PURE__ */ f.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
531
|
-
let { disableOutsidePointerEvents: n = !1, deferPointerDownOutside: r = !1, onEscapeKeyDown: i, onPointerDownOutside: a, onFocusOutside: o, onInteractOutside: s, onDismiss: c, ...l } = e, u = f.useContext(Xe), [d, p] = f.useState(null), m = d?.ownerDocument ?? globalThis?.document, [, h] = f.useState({}), _ = w(t, p), v = Array.from(u.layers), [y] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), b = y ? v.indexOf(y) : -1, x = d ? v.indexOf(d) : -1, S = u.layersWithOutsidePointerEventsDisabled.size > 0, C = x >= b, T = f.useRef(!1), E = et((e) => {
|
|
532
|
-
a?.(e), s?.(e), e.defaultPrevented || c?.();
|
|
533
|
-
}, {
|
|
534
|
-
ownerDocument: m,
|
|
535
|
-
deferPointerDownOutside: r,
|
|
536
|
-
isDeferredPointerDownOutsideRef: T,
|
|
537
|
-
dismissableSurfaces: u.dismissableSurfaces,
|
|
538
|
-
shouldHandlePointerDownOutside: f.useCallback((e) => {
|
|
539
|
-
if (!(e instanceof Node)) return !1;
|
|
540
|
-
let t = [...u.branches].some((t) => t.contains(e));
|
|
541
|
-
return C && !t;
|
|
542
|
-
}, [u.branches, C])
|
|
543
|
-
}), D = tt((e) => {
|
|
544
|
-
if (r && T.current) return;
|
|
545
|
-
let t = e.target;
|
|
546
|
-
[...u.branches].some((e) => e.contains(t)) || (o?.(e), s?.(e), e.defaultPrevented || c?.());
|
|
547
|
-
}, m), O = d ? x === v.length - 1 : !1, k = J((e) => {
|
|
548
|
-
e.key === "Escape" && (i?.(e), !e.defaultPrevented && c && (e.preventDefault(), c()));
|
|
549
|
-
});
|
|
550
|
-
return f.useEffect(() => {
|
|
551
|
-
if (O) return m.addEventListener("keydown", k, { capture: !0 }), () => m.removeEventListener("keydown", k, { capture: !0 });
|
|
552
|
-
}, [
|
|
553
|
-
m,
|
|
554
|
-
O,
|
|
555
|
-
k
|
|
556
|
-
]), f.useEffect(() => {
|
|
557
|
-
if (d) return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (Ye = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(d)), u.layers.add(d), nt(), () => {
|
|
558
|
-
n && (u.layersWithOutsidePointerEventsDisabled.delete(d), u.layersWithOutsidePointerEventsDisabled.size === 0 && (m.body.style.pointerEvents = Ye));
|
|
559
|
-
};
|
|
560
|
-
}, [
|
|
561
|
-
d,
|
|
562
|
-
m,
|
|
563
|
-
n,
|
|
564
|
-
u
|
|
565
|
-
]), f.useEffect(() => () => {
|
|
566
|
-
d && (u.layers.delete(d), u.layersWithOutsidePointerEventsDisabled.delete(d), nt());
|
|
567
|
-
}, [d, u]), f.useEffect(() => {
|
|
568
|
-
let e = /* @__PURE__ */ Y(() => h({}), "handleUpdate");
|
|
569
|
-
return document.addEventListener(Ke, e), () => document.removeEventListener(Ke, e);
|
|
570
|
-
}, []), /* @__PURE__ */ g(B.div, {
|
|
571
|
-
...l,
|
|
572
|
-
ref: _,
|
|
573
|
-
style: {
|
|
574
|
-
pointerEvents: S ? C ? "auto" : "none" : void 0,
|
|
575
|
-
...e.style
|
|
576
|
-
},
|
|
577
|
-
onFocusCapture: U(e.onFocusCapture, D.onFocusCapture),
|
|
578
|
-
onBlurCapture: U(e.onBlurCapture, D.onBlurCapture),
|
|
579
|
-
onPointerDownCapture: U(e.onPointerDownCapture, E.onPointerDownCapture)
|
|
580
|
-
});
|
|
581
|
-
}, "DismissableLayer"));
|
|
582
|
-
function Qe() {
|
|
583
|
-
let e = f.useContext(Xe), [t, n] = f.useState(null);
|
|
584
|
-
return f.useEffect(() => {
|
|
585
|
-
if (t) return e.dismissableSurfaces.add(t), () => {
|
|
586
|
-
e.dismissableSurfaces.delete(t);
|
|
587
|
-
};
|
|
588
|
-
}, [t, e.dismissableSurfaces]), n;
|
|
589
|
-
}
|
|
590
|
-
Y(Qe, "useDismissableLayerSurface");
|
|
591
|
-
var $e = /* @__PURE__ */ Y(() => !0, "IS_TRUE");
|
|
592
|
-
function et(e, t) {
|
|
593
|
-
let { ownerDocument: n = globalThis?.document, deferPointerDownOutside: r = !1, isDeferredPointerDownOutsideRef: i, dismissableSurfaces: a, shouldHandlePointerDownOutside: o = $e } = t, s = J(e), c = f.useRef(!1), l = f.useRef(!1), u = f.useRef(/* @__PURE__ */ new Map()), d = f.useRef(() => {});
|
|
594
|
-
return f.useEffect(() => {
|
|
595
|
-
function e() {
|
|
596
|
-
l.current = !1, i.current = !1, u.current.clear();
|
|
597
|
-
}
|
|
598
|
-
Y(e, "resetOutsideInteraction");
|
|
599
|
-
function t() {
|
|
600
|
-
return Array.from(u.current.values()).some(Boolean);
|
|
601
|
-
}
|
|
602
|
-
Y(t, "isOutsideInteractionIntercepted");
|
|
603
|
-
function f(e) {
|
|
604
|
-
if (!l.current) return;
|
|
605
|
-
let t = e.target;
|
|
606
|
-
t instanceof Node && [...a].some((e) => e.contains(t)) || u.current.set(e.type, !0), e.type === "click" && window.setTimeout(() => {
|
|
607
|
-
l.current && d.current();
|
|
608
|
-
}, 0);
|
|
609
|
-
}
|
|
610
|
-
Y(f, "handleInteractionCapture");
|
|
611
|
-
function p(e) {
|
|
612
|
-
l.current && u.current.set(e.type, !1);
|
|
613
|
-
}
|
|
614
|
-
Y(p, "handleInteractionBubble");
|
|
615
|
-
let m = /* @__PURE__ */ Y((a) => {
|
|
616
|
-
if (a.target && !c.current) {
|
|
617
|
-
let f = function() {
|
|
618
|
-
n.removeEventListener("click", d.current);
|
|
619
|
-
let r = t();
|
|
620
|
-
e(), r || rt(qe, s, p, { discrete: !0 });
|
|
621
|
-
};
|
|
622
|
-
if (Y(f, "handleAndDispatchPointerDownOutsideEvent"), !o(a.target)) {
|
|
623
|
-
n.removeEventListener("click", d.current), e(), c.current = !1;
|
|
624
|
-
return;
|
|
625
|
-
}
|
|
626
|
-
let p = { originalEvent: a };
|
|
627
|
-
l.current = !0, i.current = r && a.button === 0, u.current.clear(), !r || a.button !== 0 ? f() : (n.removeEventListener("click", d.current), d.current = f, n.addEventListener("click", d.current, { once: !0 }));
|
|
628
|
-
} else n.removeEventListener("click", d.current), e();
|
|
629
|
-
c.current = !1;
|
|
630
|
-
}, "handlePointerDown"), h = [
|
|
631
|
-
"pointerup",
|
|
632
|
-
"mousedown",
|
|
633
|
-
"mouseup",
|
|
634
|
-
"touchstart",
|
|
635
|
-
"touchend",
|
|
636
|
-
"click"
|
|
637
|
-
];
|
|
638
|
-
for (let e of h) n.addEventListener(e, f, !0), n.addEventListener(e, p);
|
|
639
|
-
let g = window.setTimeout(() => {
|
|
640
|
-
n.addEventListener("pointerdown", m);
|
|
641
|
-
}, 0);
|
|
642
|
-
return () => {
|
|
643
|
-
window.clearTimeout(g), n.removeEventListener("pointerdown", m), n.removeEventListener("click", d.current);
|
|
644
|
-
for (let e of h) n.removeEventListener(e, f, !0), n.removeEventListener(e, p);
|
|
645
|
-
};
|
|
646
|
-
}, [
|
|
647
|
-
n,
|
|
648
|
-
s,
|
|
649
|
-
r,
|
|
650
|
-
i,
|
|
651
|
-
a,
|
|
652
|
-
o
|
|
653
|
-
]), { onPointerDownCapture: /* @__PURE__ */ Y(() => c.current = !0, "onPointerDownCapture") };
|
|
654
|
-
}
|
|
655
|
-
Y(et, "usePointerDownOutside");
|
|
656
|
-
function tt(e, t = globalThis?.document) {
|
|
657
|
-
let n = J(e), r = f.useRef(!1);
|
|
658
|
-
return f.useEffect(() => {
|
|
659
|
-
let e = /* @__PURE__ */ Y((e) => {
|
|
660
|
-
e.target && !r.current && rt(Je, n, { originalEvent: e }, { discrete: !1 });
|
|
661
|
-
}, "handleFocus");
|
|
662
|
-
return t.addEventListener("focusin", e), () => t.removeEventListener("focusin", e);
|
|
663
|
-
}, [t, n]), {
|
|
664
|
-
onFocusCapture: /* @__PURE__ */ Y(() => r.current = !0, "onFocusCapture"),
|
|
665
|
-
onBlurCapture: /* @__PURE__ */ Y(() => r.current = !1, "onBlurCapture")
|
|
666
|
-
};
|
|
667
|
-
}
|
|
668
|
-
Y(tt, "useFocusOutside");
|
|
669
|
-
function nt() {
|
|
670
|
-
let e = new CustomEvent(Ke);
|
|
671
|
-
document.dispatchEvent(e);
|
|
672
|
-
}
|
|
673
|
-
Y(nt, "dispatchUpdate");
|
|
674
|
-
function rt(e, t, n, { discrete: r }) {
|
|
675
|
-
let i = n.originalEvent.target, a = new CustomEvent(e, {
|
|
676
|
-
bubbles: !1,
|
|
677
|
-
cancelable: !0,
|
|
678
|
-
detail: n
|
|
679
|
-
});
|
|
680
|
-
t && i.addEventListener(e, t, { once: !0 }), r ? ie(i, a) : i.dispatchEvent(a);
|
|
681
|
-
}
|
|
682
|
-
Y(rt, "handleAndDispatchCustomEvent");
|
|
683
|
-
//#endregion
|
|
684
|
-
//#region ../../node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
685
|
-
var it = Object.defineProperty, at = /* @__PURE__ */ f.forwardRef(/* @__PURE__ */ ((e, t) => it(e, "name", {
|
|
686
|
-
value: t,
|
|
687
|
-
configurable: !0
|
|
688
|
-
}))(function(e, t) {
|
|
689
|
-
let { container: n, ...r } = e, [i, a] = f.useState(!1);
|
|
690
|
-
W(() => a(!0), []);
|
|
691
|
-
let o = n || i && globalThis?.document?.body;
|
|
692
|
-
return o ? v.createPortal(/* @__PURE__ */ g(B.div, {
|
|
693
|
-
...r,
|
|
694
|
-
ref: t
|
|
695
|
-
}), o) : null;
|
|
696
|
-
}, "Portal")), ot = Object.defineProperty, st = (e, t) => ot(e, "name", {
|
|
697
|
-
value: t,
|
|
698
|
-
configurable: !0
|
|
699
|
-
});
|
|
700
|
-
function ct(e) {
|
|
701
|
-
let [t, n] = f.useState(void 0);
|
|
702
|
-
return W(() => {
|
|
703
|
-
if (e) {
|
|
704
|
-
n({
|
|
705
|
-
width: e.offsetWidth,
|
|
706
|
-
height: e.offsetHeight
|
|
707
|
-
});
|
|
708
|
-
let t = new ResizeObserver((t) => {
|
|
709
|
-
if (!Array.isArray(t) || !t.length) return;
|
|
710
|
-
let r = t[0], i, a;
|
|
711
|
-
if ("borderBoxSize" in r) {
|
|
712
|
-
let e = r.borderBoxSize, t = Array.isArray(e) ? e[0] : e;
|
|
713
|
-
i = t.inlineSize, a = t.blockSize;
|
|
714
|
-
} else i = e.offsetWidth, a = e.offsetHeight;
|
|
715
|
-
n({
|
|
716
|
-
width: i,
|
|
717
|
-
height: a
|
|
718
|
-
});
|
|
719
|
-
});
|
|
720
|
-
return t.observe(e, { box: "border-box" }), () => t.unobserve(e);
|
|
721
|
-
} else n(void 0);
|
|
722
|
-
}, [e]), t;
|
|
723
|
-
}
|
|
724
|
-
st(ct, "useSize");
|
|
725
|
-
//#endregion
|
|
726
|
-
//#region ../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
727
|
-
var lt = typeof document < "u" ? p : function() {};
|
|
728
|
-
function ut(e, t) {
|
|
729
|
-
if (e === t) return !0;
|
|
730
|
-
if (typeof e != typeof t) return !1;
|
|
731
|
-
if (typeof e == "function" && e.toString() === t.toString()) return !0;
|
|
732
|
-
let n, r, i;
|
|
733
|
-
if (e && t && typeof e == "object") {
|
|
734
|
-
if (Array.isArray(e)) {
|
|
735
|
-
if (n = e.length, n !== t.length) return !1;
|
|
736
|
-
for (r = n; r-- !== 0;) if (!ut(e[r], t[r])) return !1;
|
|
737
|
-
return !0;
|
|
738
|
-
}
|
|
739
|
-
if (i = Object.keys(e), n = i.length, n !== Object.keys(t).length) return !1;
|
|
740
|
-
for (r = n; r-- !== 0;) if (!{}.hasOwnProperty.call(t, i[r])) return !1;
|
|
741
|
-
for (r = n; r-- !== 0;) {
|
|
742
|
-
let n = i[r];
|
|
743
|
-
if (!(n === "_owner" && e.$$typeof) && !ut(e[n], t[n])) return !1;
|
|
744
|
-
}
|
|
745
|
-
return !0;
|
|
746
|
-
}
|
|
747
|
-
return e !== e && t !== t;
|
|
748
|
-
}
|
|
749
|
-
function dt(e) {
|
|
750
|
-
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
751
|
-
}
|
|
752
|
-
function ft(e, t) {
|
|
753
|
-
let n = dt(e);
|
|
754
|
-
return Math.round(t * n) / n;
|
|
755
|
-
}
|
|
756
|
-
function pt(e) {
|
|
757
|
-
let t = f.useRef(e);
|
|
758
|
-
return lt(() => {
|
|
759
|
-
t.current = e;
|
|
760
|
-
}), t;
|
|
761
|
-
}
|
|
762
|
-
function mt(e) {
|
|
763
|
-
e === void 0 && (e = {});
|
|
764
|
-
let { placement: t = "bottom", strategy: n = "absolute", middleware: r = [], platform: i, elements: { reference: a, floating: s } = {}, transform: c = !0, whileElementsMounted: l, open: u } = e, [d, p] = f.useState({
|
|
765
|
-
x: 0,
|
|
766
|
-
y: 0,
|
|
767
|
-
strategy: n,
|
|
768
|
-
placement: t,
|
|
769
|
-
middlewareData: {},
|
|
770
|
-
isPositioned: !1
|
|
771
|
-
}), [m, h] = f.useState(r);
|
|
772
|
-
ut(m, r) || h(r);
|
|
773
|
-
let [g, _] = f.useState(null), [y, b] = f.useState(null), x = f.useCallback((e) => {
|
|
774
|
-
e !== T.current && (T.current = e, _(e));
|
|
775
|
-
}, []), S = f.useCallback((e) => {
|
|
776
|
-
e !== E.current && (E.current = e, b(e));
|
|
777
|
-
}, []), C = a || g, w = s || y, T = f.useRef(null), E = f.useRef(null), D = f.useRef(d), O = l != null, k = pt(l), A = pt(i), j = pt(u), M = f.useCallback(() => {
|
|
778
|
-
if (!T.current || !E.current) return;
|
|
779
|
-
let e = {
|
|
780
|
-
placement: t,
|
|
781
|
-
strategy: n,
|
|
782
|
-
middleware: m
|
|
783
|
-
};
|
|
784
|
-
A.current && (e.platform = A.current), o(T.current, E.current, e).then((e) => {
|
|
785
|
-
let t = {
|
|
786
|
-
...e,
|
|
787
|
-
isPositioned: j.current !== !1
|
|
788
|
-
};
|
|
789
|
-
N.current && !ut(D.current, t) && (D.current = t, v.flushSync(() => {
|
|
790
|
-
p(t);
|
|
791
|
-
}));
|
|
792
|
-
});
|
|
793
|
-
}, [
|
|
794
|
-
m,
|
|
795
|
-
t,
|
|
796
|
-
n,
|
|
797
|
-
A,
|
|
798
|
-
j
|
|
799
|
-
]);
|
|
800
|
-
lt(() => {
|
|
801
|
-
u === !1 && D.current.isPositioned && (D.current.isPositioned = !1, p((e) => ({
|
|
802
|
-
...e,
|
|
803
|
-
isPositioned: !1
|
|
804
|
-
})));
|
|
805
|
-
}, [u]);
|
|
806
|
-
let N = f.useRef(!1);
|
|
807
|
-
lt(() => (N.current = !0, () => {
|
|
808
|
-
N.current = !1;
|
|
809
|
-
}), []), lt(() => {
|
|
810
|
-
if (C && (T.current = C), w && (E.current = w), C && w) {
|
|
811
|
-
if (k.current) return k.current(C, w, M);
|
|
812
|
-
M();
|
|
813
|
-
}
|
|
814
|
-
}, [
|
|
815
|
-
C,
|
|
816
|
-
w,
|
|
817
|
-
M,
|
|
818
|
-
k,
|
|
819
|
-
O
|
|
820
|
-
]);
|
|
821
|
-
let P = f.useMemo(() => ({
|
|
822
|
-
reference: T,
|
|
823
|
-
floating: E,
|
|
824
|
-
setReference: x,
|
|
825
|
-
setFloating: S
|
|
826
|
-
}), [x, S]), F = f.useMemo(() => ({
|
|
827
|
-
reference: C,
|
|
828
|
-
floating: w
|
|
829
|
-
}), [C, w]), I = f.useMemo(() => {
|
|
830
|
-
let e = {
|
|
831
|
-
position: n,
|
|
832
|
-
left: 0,
|
|
833
|
-
top: 0
|
|
834
|
-
};
|
|
835
|
-
if (!F.floating) return e;
|
|
836
|
-
let t = ft(F.floating, d.x), r = ft(F.floating, d.y);
|
|
837
|
-
return c ? {
|
|
838
|
-
...e,
|
|
839
|
-
transform: "translate(" + t + "px, " + r + "px)",
|
|
840
|
-
...dt(F.floating) >= 1.5 && { willChange: "transform" }
|
|
841
|
-
} : {
|
|
842
|
-
position: n,
|
|
843
|
-
left: t,
|
|
844
|
-
top: r
|
|
845
|
-
};
|
|
846
|
-
}, [
|
|
847
|
-
n,
|
|
848
|
-
c,
|
|
849
|
-
F.floating,
|
|
850
|
-
d.x,
|
|
851
|
-
d.y
|
|
852
|
-
]);
|
|
853
|
-
return f.useMemo(() => ({
|
|
854
|
-
...d,
|
|
855
|
-
update: M,
|
|
856
|
-
refs: P,
|
|
857
|
-
elements: F,
|
|
858
|
-
floatingStyles: I
|
|
859
|
-
}), [
|
|
860
|
-
d,
|
|
861
|
-
M,
|
|
862
|
-
P,
|
|
863
|
-
F,
|
|
864
|
-
I
|
|
865
|
-
]);
|
|
866
|
-
}
|
|
867
|
-
var ht = (e) => {
|
|
868
|
-
function t(e) {
|
|
869
|
-
return {}.hasOwnProperty.call(e, "current");
|
|
870
|
-
}
|
|
871
|
-
return {
|
|
872
|
-
name: "arrow",
|
|
873
|
-
options: e,
|
|
874
|
-
fn(n) {
|
|
875
|
-
let { element: r, padding: i } = typeof e == "function" ? e(n) : e;
|
|
876
|
-
return r && t(r) ? r.current == null ? {} : u({
|
|
877
|
-
element: r.current,
|
|
878
|
-
padding: i
|
|
879
|
-
}).fn(n) : r ? u({
|
|
880
|
-
element: r,
|
|
881
|
-
padding: i
|
|
882
|
-
}).fn(n) : {};
|
|
883
|
-
}
|
|
884
|
-
};
|
|
885
|
-
}, gt = (e, t) => {
|
|
886
|
-
let n = s(e);
|
|
887
|
-
return {
|
|
888
|
-
name: n.name,
|
|
889
|
-
fn: n.fn,
|
|
890
|
-
options: [e, t]
|
|
891
|
-
};
|
|
892
|
-
}, _t = (e, t) => {
|
|
893
|
-
let n = d(e);
|
|
894
|
-
return {
|
|
895
|
-
name: n.name,
|
|
896
|
-
fn: n.fn,
|
|
897
|
-
options: [e, t]
|
|
898
|
-
};
|
|
899
|
-
}, vt = (e, t) => ({
|
|
900
|
-
fn: i(e).fn,
|
|
901
|
-
options: [e, t]
|
|
902
|
-
}), yt = (e, t) => {
|
|
903
|
-
let n = r(e);
|
|
904
|
-
return {
|
|
905
|
-
name: n.name,
|
|
906
|
-
fn: n.fn,
|
|
907
|
-
options: [e, t]
|
|
908
|
-
};
|
|
909
|
-
}, bt = (e, t) => {
|
|
910
|
-
let n = a(e);
|
|
911
|
-
return {
|
|
912
|
-
name: n.name,
|
|
913
|
-
fn: n.fn,
|
|
914
|
-
options: [e, t]
|
|
915
|
-
};
|
|
916
|
-
}, xt = (e, t) => {
|
|
917
|
-
let n = c(e);
|
|
918
|
-
return {
|
|
919
|
-
name: n.name,
|
|
920
|
-
fn: n.fn,
|
|
921
|
-
options: [e, t]
|
|
922
|
-
};
|
|
923
|
-
}, St = (e, t) => {
|
|
924
|
-
let n = ht(e);
|
|
925
|
-
return {
|
|
926
|
-
name: n.name,
|
|
927
|
-
fn: n.fn,
|
|
928
|
-
options: [e, t]
|
|
929
|
-
};
|
|
930
|
-
}, Ct = Object.defineProperty, wt = /* @__PURE__ */ f.forwardRef(/* @__PURE__ */ ((e, t) => Ct(e, "name", {
|
|
931
|
-
value: t,
|
|
932
|
-
configurable: !0
|
|
933
|
-
}))(function(e, t) {
|
|
934
|
-
let { children: n, width: r = 10, height: i = 5, ...a } = e;
|
|
935
|
-
return /* @__PURE__ */ g(B.svg, {
|
|
936
|
-
...a,
|
|
937
|
-
ref: t,
|
|
938
|
-
width: r,
|
|
939
|
-
height: i,
|
|
940
|
-
viewBox: "0 0 30 10",
|
|
941
|
-
preserveAspectRatio: "none",
|
|
942
|
-
children: e.asChild ? n : /* @__PURE__ */ g("polygon", { points: "0,0 30,0 15,10" })
|
|
943
|
-
});
|
|
944
|
-
}, "Arrow")), Tt = Object.defineProperty, X = (e, t) => Tt(e, "name", {
|
|
945
|
-
value: t,
|
|
946
|
-
configurable: !0
|
|
947
|
-
}), Et = "Popper", [Dt, Ot] = /* @__PURE__ */ de(Et), [kt, At] = Dt(Et), jt = /* @__PURE__ */ X((e) => {
|
|
948
|
-
let { __scopePopper: t, children: n } = e, [r, i] = f.useState(null), [a, o] = f.useState(void 0);
|
|
949
|
-
return /* @__PURE__ */ g(kt, {
|
|
950
|
-
scope: t,
|
|
951
|
-
anchor: r,
|
|
952
|
-
onAnchorChange: i,
|
|
953
|
-
placementState: a,
|
|
954
|
-
setPlacementState: o,
|
|
955
|
-
children: n
|
|
956
|
-
});
|
|
957
|
-
}, "Popper"), Mt = "PopperAnchor", Nt = /* @__PURE__ */ f.forwardRef(/* @__PURE__ */ X(function(e, t) {
|
|
958
|
-
let { __scopePopper: n, virtualRef: r, ...i } = e, a = At(Mt, n), o = f.useRef(null), s = a.onAnchorChange, c = w(t, f.useCallback((e) => {
|
|
959
|
-
o.current = e, e && s(e);
|
|
960
|
-
}, [s])), l = f.useRef(null);
|
|
961
|
-
f.useEffect(() => {
|
|
962
|
-
if (!r) return;
|
|
963
|
-
let e = l.current;
|
|
964
|
-
l.current = r.current, e !== l.current && s(l.current);
|
|
965
|
-
});
|
|
966
|
-
let u = a.placementState && Ut(a.placementState), d = u?.[0], p = u?.[1];
|
|
967
|
-
return r ? null : /* @__PURE__ */ g(B.div, {
|
|
968
|
-
"data-radix-popper-side": d,
|
|
969
|
-
"data-radix-popper-align": p,
|
|
970
|
-
...i,
|
|
971
|
-
ref: c
|
|
972
|
-
});
|
|
973
|
-
}, "PopperAnchor")), Pt = "PopperContent", [Ft, It] = Dt(Pt), Lt = /* @__PURE__ */ f.forwardRef(/* @__PURE__ */ X(function(e, t) {
|
|
974
|
-
let { __scopePopper: n, side: r = "bottom", sideOffset: i = 0, align: a = "center", alignOffset: o = 0, arrowPadding: s = 0, avoidCollisions: c = !0, collisionBoundary: u = [], collisionPadding: d = 0, sticky: p = "partial", hideWhenDetached: m = !1, updatePositionStrategy: h = "optimized", onPlaced: _, ...v } = e, y = At(Pt, n), [b, x] = f.useState(null), S = w(t, x), [C, T] = f.useState(null), E = ct(C), D = E?.width ?? 0, O = E?.height ?? 0, k = r + (a === "center" ? "" : "-" + a), A = typeof d == "number" ? d : {
|
|
975
|
-
top: 0,
|
|
976
|
-
right: 0,
|
|
977
|
-
bottom: 0,
|
|
978
|
-
left: 0,
|
|
979
|
-
...d
|
|
980
|
-
}, j = Array.isArray(u) ? u : [u], M = j.length > 0, N = {
|
|
981
|
-
padding: A,
|
|
982
|
-
boundary: j.filter(Vt),
|
|
983
|
-
altBoundary: M
|
|
984
|
-
}, { refs: P, floatingStyles: F, placement: I, isPositioned: L, middlewareData: R } = mt({
|
|
985
|
-
strategy: "fixed",
|
|
986
|
-
placement: k,
|
|
987
|
-
whileElementsMounted: /* @__PURE__ */ X((...e) => l(...e, { animationFrame: h === "always" }), "whileElementsMounted"),
|
|
988
|
-
elements: { reference: y.anchor },
|
|
989
|
-
middleware: [
|
|
990
|
-
gt({
|
|
991
|
-
mainAxis: i + O,
|
|
992
|
-
alignmentAxis: o
|
|
993
|
-
}),
|
|
994
|
-
c && _t({
|
|
995
|
-
mainAxis: !0,
|
|
996
|
-
crossAxis: !1,
|
|
997
|
-
limiter: p === "partial" ? vt() : void 0,
|
|
998
|
-
...N
|
|
999
|
-
}),
|
|
1000
|
-
c && yt({ ...N }),
|
|
1001
|
-
bt({
|
|
1002
|
-
...N,
|
|
1003
|
-
apply: /* @__PURE__ */ X(({ elements: e, rects: t, availableWidth: n, availableHeight: r }) => {
|
|
1004
|
-
let { width: i, height: a } = t.reference, o = e.floating.style;
|
|
1005
|
-
o.setProperty("--radix-popper-available-width", `${n}px`), o.setProperty("--radix-popper-available-height", `${r}px`), o.setProperty("--radix-popper-anchor-width", `${i}px`), o.setProperty("--radix-popper-anchor-height", `${a}px`);
|
|
1006
|
-
}, "apply")
|
|
1007
|
-
}),
|
|
1008
|
-
C && St({
|
|
1009
|
-
element: C,
|
|
1010
|
-
padding: s
|
|
1011
|
-
}),
|
|
1012
|
-
Ht({
|
|
1013
|
-
arrowWidth: D,
|
|
1014
|
-
arrowHeight: O
|
|
1015
|
-
}),
|
|
1016
|
-
m && xt({
|
|
1017
|
-
strategy: "referenceHidden",
|
|
1018
|
-
...N,
|
|
1019
|
-
boundary: M ? N.boundary : void 0
|
|
1020
|
-
})
|
|
1021
|
-
]
|
|
1022
|
-
}), ee = y.setPlacementState;
|
|
1023
|
-
W(() => (ee(I), () => {
|
|
1024
|
-
ee(void 0);
|
|
1025
|
-
}), [I, ee]);
|
|
1026
|
-
let [te, z] = Ut(I), ne = J(_);
|
|
1027
|
-
W(() => {
|
|
1028
|
-
L && ne?.();
|
|
1029
|
-
}, [L, ne]);
|
|
1030
|
-
let re = R.arrow?.x, ie = R.arrow?.y, ae = R.arrow?.centerOffset !== 0, [oe, se] = f.useState();
|
|
1031
|
-
return W(() => {
|
|
1032
|
-
b && se(window.getComputedStyle(b).zIndex);
|
|
1033
|
-
}, [b]), /* @__PURE__ */ g("div", {
|
|
1034
|
-
ref: P.setFloating,
|
|
1035
|
-
"data-radix-popper-content-wrapper": "",
|
|
1036
|
-
style: {
|
|
1037
|
-
...F,
|
|
1038
|
-
transform: L ? F.transform : "translate(0, -200%)",
|
|
1039
|
-
minWidth: "max-content",
|
|
1040
|
-
zIndex: oe,
|
|
1041
|
-
"--radix-popper-transform-origin": [R.transformOrigin?.x, R.transformOrigin?.y].join(" "),
|
|
1042
|
-
...R.hide?.referenceHidden && {
|
|
1043
|
-
visibility: "hidden",
|
|
1044
|
-
pointerEvents: "none"
|
|
1045
|
-
}
|
|
1046
|
-
},
|
|
1047
|
-
dir: e.dir,
|
|
1048
|
-
children: /* @__PURE__ */ g(Ft, {
|
|
1049
|
-
scope: n,
|
|
1050
|
-
placedSide: te,
|
|
1051
|
-
placedAlign: z,
|
|
1052
|
-
onArrowChange: T,
|
|
1053
|
-
arrowX: re,
|
|
1054
|
-
arrowY: ie,
|
|
1055
|
-
shouldHideArrow: ae,
|
|
1056
|
-
children: /* @__PURE__ */ g(B.div, {
|
|
1057
|
-
"data-side": te,
|
|
1058
|
-
"data-align": z,
|
|
1059
|
-
...v,
|
|
1060
|
-
ref: S,
|
|
1061
|
-
style: {
|
|
1062
|
-
...v.style,
|
|
1063
|
-
animation: L ? v.style?.animation : "none"
|
|
1064
|
-
}
|
|
1065
|
-
})
|
|
1066
|
-
})
|
|
1067
|
-
});
|
|
1068
|
-
}, "PopperContent")), Rt = "PopperArrow", zt = {
|
|
1069
|
-
top: "bottom",
|
|
1070
|
-
right: "left",
|
|
1071
|
-
bottom: "top",
|
|
1072
|
-
left: "right"
|
|
1073
|
-
}, Bt = /* @__PURE__ */ f.forwardRef(/* @__PURE__ */ X(function(e, t) {
|
|
1074
|
-
let { __scopePopper: n, ...r } = e, i = It(Rt, n), a = zt[i.placedSide];
|
|
1075
|
-
return /* @__PURE__ */ g("span", {
|
|
1076
|
-
ref: i.onArrowChange,
|
|
1077
|
-
style: {
|
|
1078
|
-
position: "absolute",
|
|
1079
|
-
left: i.arrowX,
|
|
1080
|
-
top: i.arrowY,
|
|
1081
|
-
[a]: 0,
|
|
1082
|
-
transformOrigin: {
|
|
1083
|
-
top: "",
|
|
1084
|
-
right: "0 0",
|
|
1085
|
-
bottom: "center 0",
|
|
1086
|
-
left: "100% 0"
|
|
1087
|
-
}[i.placedSide],
|
|
1088
|
-
transform: {
|
|
1089
|
-
top: "translateY(100%)",
|
|
1090
|
-
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
1091
|
-
bottom: "rotate(180deg)",
|
|
1092
|
-
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
1093
|
-
}[i.placedSide],
|
|
1094
|
-
visibility: i.shouldHideArrow ? "hidden" : void 0
|
|
1095
|
-
},
|
|
1096
|
-
children: /* @__PURE__ */ g(wt, {
|
|
1097
|
-
...r,
|
|
1098
|
-
ref: t,
|
|
1099
|
-
style: {
|
|
1100
|
-
...r.style,
|
|
1101
|
-
display: "block"
|
|
1102
|
-
}
|
|
1103
|
-
})
|
|
1104
|
-
});
|
|
1105
|
-
}, "PopperArrow"));
|
|
1106
|
-
function Vt(e) {
|
|
1107
|
-
return e !== null;
|
|
1108
|
-
}
|
|
1109
|
-
X(Vt, "isNotNull");
|
|
1110
|
-
var Ht = /* @__PURE__ */ X((e) => ({
|
|
1111
|
-
name: "transformOrigin",
|
|
1112
|
-
options: e,
|
|
1113
|
-
fn(t) {
|
|
1114
|
-
let { placement: n, rects: r, middlewareData: i } = t, a = i.arrow?.centerOffset !== 0, o = a ? 0 : e.arrowWidth, s = a ? 0 : e.arrowHeight, [c, l] = Ut(n), u = {
|
|
1115
|
-
start: "0%",
|
|
1116
|
-
center: "50%",
|
|
1117
|
-
end: "100%"
|
|
1118
|
-
}[l], d = (i.arrow?.x ?? 0) + o / 2, f = (i.arrow?.y ?? 0) + s / 2, p = "", m = "";
|
|
1119
|
-
return c === "bottom" ? (p = a ? u : `${d}px`, m = `${-s}px`) : c === "top" ? (p = a ? u : `${d}px`, m = `${r.floating.height + s}px`) : c === "right" ? (p = `${-s}px`, m = a ? u : `${f}px`) : c === "left" && (p = `${r.floating.width + s}px`, m = a ? u : `${f}px`), { data: {
|
|
1120
|
-
x: p,
|
|
1121
|
-
y: m
|
|
1122
|
-
} };
|
|
1123
|
-
}
|
|
1124
|
-
}), "transformOrigin");
|
|
1125
|
-
function Ut(e) {
|
|
1126
|
-
let [t, n = "center"] = e.split("-");
|
|
1127
|
-
return [t, n];
|
|
1128
|
-
}
|
|
1129
|
-
X(Ut, "getSideAndAlignFromPlacement");
|
|
1130
|
-
var Wt = jt, Gt = Nt, Kt = Lt, qt = Bt, Jt = /* @__PURE__ */ e({
|
|
1131
|
-
Arrow: () => jn,
|
|
1132
|
-
Content: () => An,
|
|
1133
|
-
Portal: () => kn,
|
|
1134
|
-
Provider: () => En,
|
|
1135
|
-
Root: () => Dn,
|
|
1136
|
-
Tooltip: () => cn,
|
|
1137
|
-
TooltipArrow: () => yn,
|
|
1138
|
-
TooltipContent: () => hn,
|
|
1139
|
-
TooltipPortal: () => mn,
|
|
1140
|
-
TooltipProvider: () => an,
|
|
1141
|
-
TooltipTrigger: () => un,
|
|
1142
|
-
Trigger: () => On,
|
|
1143
|
-
createTooltipScope: () => Zt
|
|
1144
|
-
}), Yt = Object.defineProperty, Z = (e, t) => Yt(e, "name", {
|
|
1145
|
-
value: t,
|
|
1146
|
-
configurable: !0
|
|
1147
|
-
}), [Xt, Zt] = /* @__PURE__ */ de("Tooltip", [Ot]), Qt = Ot(), $t = "TooltipProvider", en = 700, tn = "tooltip.open", [nn, rn] = Xt($t), an = /* @__PURE__ */ Z((e) => {
|
|
1148
|
-
let { __scopeTooltip: t, delayDuration: n = en, skipDelayDuration: r = 300, disableHoverableContent: i = !1, children: a } = e, o = f.useRef(!0), s = f.useRef(!1), c = f.useRef(0);
|
|
1149
|
-
return f.useEffect(() => {
|
|
1150
|
-
let e = c.current;
|
|
1151
|
-
return () => window.clearTimeout(e);
|
|
1152
|
-
}, []), /* @__PURE__ */ g(nn, {
|
|
1153
|
-
scope: t,
|
|
1154
|
-
isOpenDelayedRef: o,
|
|
1155
|
-
delayDuration: n,
|
|
1156
|
-
onOpen: f.useCallback(() => {
|
|
1157
|
-
r <= 0 || (window.clearTimeout(c.current), o.current = !1);
|
|
1158
|
-
}, [r]),
|
|
1159
|
-
onClose: f.useCallback(() => {
|
|
1160
|
-
r <= 0 || (window.clearTimeout(c.current), c.current = window.setTimeout(() => o.current = !0, r));
|
|
1161
|
-
}, [r]),
|
|
1162
|
-
isPointerInTransitRef: s,
|
|
1163
|
-
onPointerInTransitChange: f.useCallback((e) => {
|
|
1164
|
-
s.current = e;
|
|
1165
|
-
}, []),
|
|
1166
|
-
disableHoverableContent: i,
|
|
1167
|
-
children: a
|
|
1168
|
-
});
|
|
1169
|
-
}, "TooltipProvider"), on = "Tooltip", [sn, Q] = Xt(on), cn = /* @__PURE__ */ Z((e) => {
|
|
1170
|
-
let { __scopeTooltip: t, children: n, open: r, defaultOpen: i, onOpenChange: a, disableHoverableContent: o, delayDuration: s } = e, c = rn(on, e.__scopeTooltip), l = Qt(t), [u, d] = f.useState(null), [p, m] = f.useState(void 0), h = He(), _ = f.useRef(0), v = o ?? c.disableHoverableContent, y = s ?? c.delayDuration, b = f.useRef(!1), [x, S] = Ee({
|
|
1171
|
-
prop: r,
|
|
1172
|
-
defaultProp: i ?? !1,
|
|
1173
|
-
onChange: /* @__PURE__ */ Z((e) => {
|
|
1174
|
-
e ? (c.onOpen(), document.dispatchEvent(new CustomEvent(tn))) : c.onClose(), a?.(e);
|
|
1175
|
-
}, "onChange"),
|
|
1176
|
-
caller: on
|
|
1177
|
-
}), C = f.useMemo(() => x ? b.current ? "delayed-open" : "instant-open" : "closed", [x]), w = f.useCallback(() => {
|
|
1178
|
-
window.clearTimeout(_.current), _.current = 0, b.current = !1, S(!0);
|
|
1179
|
-
}, [S]), T = f.useCallback(() => {
|
|
1180
|
-
window.clearTimeout(_.current), _.current = 0, S(!1);
|
|
1181
|
-
}, [S]), E = f.useCallback(() => {
|
|
1182
|
-
window.clearTimeout(_.current), _.current = window.setTimeout(() => {
|
|
1183
|
-
b.current = !0, S(!0), _.current = 0;
|
|
1184
|
-
}, y);
|
|
1185
|
-
}, [y, S]);
|
|
1186
|
-
f.useEffect(() => () => {
|
|
1187
|
-
_.current &&= (window.clearTimeout(_.current), 0);
|
|
1188
|
-
}, []);
|
|
1189
|
-
let D = p ?? h;
|
|
1190
|
-
return /* @__PURE__ */ g(Wt, {
|
|
1191
|
-
...l,
|
|
1192
|
-
children: /* @__PURE__ */ g(sn, {
|
|
1193
|
-
scope: t,
|
|
1194
|
-
contentId: D,
|
|
1195
|
-
setContentId: m,
|
|
1196
|
-
open: x,
|
|
1197
|
-
stateAttribute: C,
|
|
1198
|
-
trigger: u,
|
|
1199
|
-
onTriggerChange: d,
|
|
1200
|
-
onTriggerEnter: f.useCallback(() => {
|
|
1201
|
-
c.isOpenDelayedRef.current ? E() : w();
|
|
1202
|
-
}, [
|
|
1203
|
-
c.isOpenDelayedRef,
|
|
1204
|
-
E,
|
|
1205
|
-
w
|
|
1206
|
-
]),
|
|
1207
|
-
onTriggerLeave: f.useCallback(() => {
|
|
1208
|
-
v ? T() : (window.clearTimeout(_.current), _.current = 0);
|
|
1209
|
-
}, [T, v]),
|
|
1210
|
-
onOpen: w,
|
|
1211
|
-
onClose: T,
|
|
1212
|
-
disableHoverableContent: v,
|
|
1213
|
-
children: n
|
|
1214
|
-
})
|
|
1215
|
-
});
|
|
1216
|
-
}, "Tooltip"), ln = "TooltipTrigger", un = /* @__PURE__ */ f.forwardRef(/* @__PURE__ */ Z(function(e, t) {
|
|
1217
|
-
let { __scopeTooltip: n, ...r } = e, i = Q(ln, n), a = rn(ln, n), o = Qt(n), s = w(t, f.useRef(null), i.onTriggerChange), c = f.useRef(!1), l = f.useRef(!1), u = f.useCallback(() => c.current = !1, []);
|
|
1218
|
-
return f.useEffect(() => () => document.removeEventListener("pointerup", u), [u]), /* @__PURE__ */ g(Gt, {
|
|
1219
|
-
asChild: !0,
|
|
1220
|
-
...o,
|
|
1221
|
-
children: /* @__PURE__ */ g(B.button, {
|
|
1222
|
-
"aria-describedby": i.open ? i.contentId : void 0,
|
|
1223
|
-
"data-state": i.stateAttribute,
|
|
1224
|
-
...r,
|
|
1225
|
-
ref: s,
|
|
1226
|
-
onPointerMove: U(e.onPointerMove, (e) => {
|
|
1227
|
-
e.pointerType !== "touch" && !l.current && !a.isPointerInTransitRef.current && (i.onTriggerEnter(), l.current = !0);
|
|
1228
|
-
}),
|
|
1229
|
-
onPointerLeave: U(e.onPointerLeave, () => {
|
|
1230
|
-
i.onTriggerLeave(), l.current = !1;
|
|
1231
|
-
}),
|
|
1232
|
-
onPointerDown: U(e.onPointerDown, () => {
|
|
1233
|
-
i.open && i.onClose(), c.current = !0, document.addEventListener("pointerup", u, { once: !0 });
|
|
1234
|
-
}),
|
|
1235
|
-
onFocus: U(e.onFocus, () => {
|
|
1236
|
-
c.current || i.onOpen();
|
|
1237
|
-
}),
|
|
1238
|
-
onBlur: U(e.onBlur, i.onClose),
|
|
1239
|
-
onClick: U(e.onClick, i.onClose)
|
|
1240
|
-
})
|
|
1241
|
-
});
|
|
1242
|
-
}, "TooltipTrigger")), dn = "TooltipPortal", [fn, pn] = Xt(dn, { forceMount: void 0 }), mn = /* @__PURE__ */ Z((e) => {
|
|
1243
|
-
let { __scopeTooltip: t, forceMount: n, children: r, container: i } = e, a = Q(dn, t);
|
|
1244
|
-
return /* @__PURE__ */ g(fn, {
|
|
1245
|
-
scope: t,
|
|
1246
|
-
forceMount: n,
|
|
1247
|
-
children: /* @__PURE__ */ g(Ne, {
|
|
1248
|
-
present: n || a.open,
|
|
1249
|
-
children: /* @__PURE__ */ g(at, {
|
|
1250
|
-
asChild: !0,
|
|
1251
|
-
container: i,
|
|
1252
|
-
children: r
|
|
1253
|
-
})
|
|
1254
|
-
})
|
|
1255
|
-
});
|
|
1256
|
-
}, "TooltipPortal"), $ = "TooltipContent", hn = /* @__PURE__ */ f.forwardRef(/* @__PURE__ */ Z(function(e, t) {
|
|
1257
|
-
let n = pn($, e.__scopeTooltip), { forceMount: r = n.forceMount, side: i = "top", ...a } = e, o = Q($, e.__scopeTooltip);
|
|
1258
|
-
return /* @__PURE__ */ g(Ne, {
|
|
1259
|
-
present: r || o.open,
|
|
1260
|
-
children: o.disableHoverableContent ? /* @__PURE__ */ g(vn, {
|
|
1261
|
-
side: i,
|
|
1262
|
-
...a,
|
|
1263
|
-
ref: t
|
|
1264
|
-
}) : /* @__PURE__ */ g(gn, {
|
|
1265
|
-
side: i,
|
|
1266
|
-
...a,
|
|
1267
|
-
ref: t
|
|
1268
|
-
})
|
|
1269
|
-
});
|
|
1270
|
-
}, "TooltipContent")), gn = /* @__PURE__ */ f.forwardRef(/* @__PURE__ */ Z(function(e, t) {
|
|
1271
|
-
let n = Q($, e.__scopeTooltip), r = rn($, e.__scopeTooltip), i = f.useRef(null), a = w(t, i), [o, s] = f.useState(null), { trigger: c, onClose: l } = n, u = i.current, { onPointerInTransitChange: d } = r, p = f.useCallback(() => {
|
|
1272
|
-
s(null), d(!1);
|
|
1273
|
-
}, [d]), m = f.useCallback((e, t) => {
|
|
1274
|
-
let n = e.currentTarget, r = {
|
|
1275
|
-
x: e.clientX,
|
|
1276
|
-
y: e.clientY
|
|
1277
|
-
}, i = xn(r, bn(r, n.getBoundingClientRect())), a = Sn(t.getBoundingClientRect()), o = wn([...i, ...a]);
|
|
1278
|
-
s(o), d(!0);
|
|
1279
|
-
}, [d]);
|
|
1280
|
-
return f.useEffect(() => () => p(), [p]), f.useEffect(() => {
|
|
1281
|
-
if (c && u) {
|
|
1282
|
-
let e = /* @__PURE__ */ Z((e) => m(e, u), "handleTriggerLeave"), t = /* @__PURE__ */ Z((e) => m(e, c), "handleContentLeave");
|
|
1283
|
-
return c.addEventListener("pointerleave", e), u.addEventListener("pointerleave", t), () => {
|
|
1284
|
-
c.removeEventListener("pointerleave", e), u.removeEventListener("pointerleave", t);
|
|
1285
|
-
};
|
|
1286
|
-
}
|
|
1287
|
-
}, [
|
|
1288
|
-
c,
|
|
1289
|
-
u,
|
|
1290
|
-
m,
|
|
1291
|
-
p
|
|
1292
|
-
]), f.useEffect(() => {
|
|
1293
|
-
if (o) {
|
|
1294
|
-
let e = /* @__PURE__ */ Z((e) => {
|
|
1295
|
-
let t = e.target, n = {
|
|
1296
|
-
x: e.clientX,
|
|
1297
|
-
y: e.clientY
|
|
1298
|
-
}, r = c?.contains(t) || u?.contains(t), i = !Cn(n, o);
|
|
1299
|
-
r ? p() : i && (p(), l());
|
|
1300
|
-
}, "handleTrackPointerGrace");
|
|
1301
|
-
return document.addEventListener("pointermove", e), () => document.removeEventListener("pointermove", e);
|
|
1302
|
-
}
|
|
1303
|
-
}, [
|
|
1304
|
-
c,
|
|
1305
|
-
u,
|
|
1306
|
-
o,
|
|
1307
|
-
l,
|
|
1308
|
-
p
|
|
1309
|
-
]), /* @__PURE__ */ g(vn, {
|
|
1310
|
-
...e,
|
|
1311
|
-
ref: a
|
|
1312
|
-
});
|
|
1313
|
-
}, "TooltipContentHoverable")), _n = /* @__PURE__ */ A("TooltipContent"), vn = /* @__PURE__ */ f.forwardRef(/* @__PURE__ */ Z(function(e, t) {
|
|
1314
|
-
let { __scopeTooltip: n, children: r, "aria-label": i, id: a, onEscapeKeyDown: o, onPointerDownOutside: s, ...c } = e, l = Q($, n), u = Qt(n), { onClose: d } = l;
|
|
1315
|
-
f.useEffect(() => (document.addEventListener(tn, d), () => document.removeEventListener(tn, d)), [d]), f.useEffect(() => {
|
|
1316
|
-
if (l.trigger) {
|
|
1317
|
-
let e = /* @__PURE__ */ Z((e) => {
|
|
1318
|
-
e.target instanceof Node && e.target.contains(l.trigger) && d();
|
|
1319
|
-
}, "handleScroll");
|
|
1320
|
-
return window.addEventListener("scroll", e, { capture: !0 }), () => window.removeEventListener("scroll", e, { capture: !0 });
|
|
1321
|
-
}
|
|
1322
|
-
}, [l.trigger, d]);
|
|
1323
|
-
let { setContentId: p } = l;
|
|
1324
|
-
return W(() => (p(a), () => {
|
|
1325
|
-
p(void 0);
|
|
1326
|
-
}), [a, p]), /* @__PURE__ */ g(Ze, {
|
|
1327
|
-
asChild: !0,
|
|
1328
|
-
disableOutsidePointerEvents: !1,
|
|
1329
|
-
onEscapeKeyDown: o,
|
|
1330
|
-
onPointerDownOutside: s,
|
|
1331
|
-
onFocusOutside: (e) => e.preventDefault(),
|
|
1332
|
-
onDismiss: d,
|
|
1333
|
-
children: /* @__PURE__ */ _(Kt, {
|
|
1334
|
-
"data-state": l.stateAttribute,
|
|
1335
|
-
role: i ? void 0 : "tooltip",
|
|
1336
|
-
id: i ? void 0 : l.contentId,
|
|
1337
|
-
...u,
|
|
1338
|
-
...c,
|
|
1339
|
-
ref: t,
|
|
1340
|
-
style: {
|
|
1341
|
-
...c.style,
|
|
1342
|
-
"--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
1343
|
-
"--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
|
|
1344
|
-
"--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
|
|
1345
|
-
"--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
|
|
1346
|
-
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
1347
|
-
},
|
|
1348
|
-
children: [/* @__PURE__ */ g(_n, { children: r }), i ? /* @__PURE__ */ g(ce, {
|
|
1349
|
-
id: l.contentId,
|
|
1350
|
-
role: "tooltip",
|
|
1351
|
-
children: i
|
|
1352
|
-
}) : null]
|
|
1353
|
-
})
|
|
1354
|
-
});
|
|
1355
|
-
}, "TooltipContentImpl")), yn = /* @__PURE__ */ f.forwardRef(/* @__PURE__ */ Z(function(e, t) {
|
|
1356
|
-
let { __scopeTooltip: n, ...r } = e;
|
|
1357
|
-
return /* @__PURE__ */ g(qt, {
|
|
1358
|
-
...Qt(n),
|
|
1359
|
-
...r,
|
|
1360
|
-
ref: t
|
|
1361
|
-
});
|
|
1362
|
-
}, "TooltipArrow"));
|
|
1363
|
-
function bn(e, t) {
|
|
1364
|
-
let n = Math.abs(t.top - e.y), r = Math.abs(t.bottom - e.y), i = Math.abs(t.right - e.x), a = Math.abs(t.left - e.x);
|
|
1365
|
-
switch (Math.min(n, r, i, a)) {
|
|
1366
|
-
case a: return "left";
|
|
1367
|
-
case i: return "right";
|
|
1368
|
-
case n: return "top";
|
|
1369
|
-
case r: return "bottom";
|
|
1370
|
-
default: throw Error("unreachable");
|
|
1371
|
-
}
|
|
1372
|
-
}
|
|
1373
|
-
Z(bn, "getExitSideFromRect");
|
|
1374
|
-
function xn(e, t, n = 5) {
|
|
1375
|
-
let r = [];
|
|
1376
|
-
switch (t) {
|
|
1377
|
-
case "top":
|
|
1378
|
-
r.push({
|
|
1379
|
-
x: e.x - n,
|
|
1380
|
-
y: e.y + n
|
|
1381
|
-
}, {
|
|
1382
|
-
x: e.x + n,
|
|
1383
|
-
y: e.y + n
|
|
1384
|
-
});
|
|
1385
|
-
break;
|
|
1386
|
-
case "bottom":
|
|
1387
|
-
r.push({
|
|
1388
|
-
x: e.x - n,
|
|
1389
|
-
y: e.y - n
|
|
1390
|
-
}, {
|
|
1391
|
-
x: e.x + n,
|
|
1392
|
-
y: e.y - n
|
|
1393
|
-
});
|
|
1394
|
-
break;
|
|
1395
|
-
case "left":
|
|
1396
|
-
r.push({
|
|
1397
|
-
x: e.x + n,
|
|
1398
|
-
y: e.y - n
|
|
1399
|
-
}, {
|
|
1400
|
-
x: e.x + n,
|
|
1401
|
-
y: e.y + n
|
|
1402
|
-
});
|
|
1403
|
-
break;
|
|
1404
|
-
case "right":
|
|
1405
|
-
r.push({
|
|
1406
|
-
x: e.x - n,
|
|
1407
|
-
y: e.y - n
|
|
1408
|
-
}, {
|
|
1409
|
-
x: e.x - n,
|
|
1410
|
-
y: e.y + n
|
|
1411
|
-
});
|
|
1412
|
-
break;
|
|
1413
|
-
}
|
|
1414
|
-
return r;
|
|
1415
|
-
}
|
|
1416
|
-
Z(xn, "getPaddedExitPoints");
|
|
1417
|
-
function Sn(e) {
|
|
1418
|
-
let { top: t, right: n, bottom: r, left: i } = e;
|
|
1419
|
-
return [
|
|
1420
|
-
{
|
|
1421
|
-
x: i,
|
|
1422
|
-
y: t
|
|
1423
|
-
},
|
|
1424
|
-
{
|
|
1425
|
-
x: n,
|
|
1426
|
-
y: t
|
|
1427
|
-
},
|
|
1428
|
-
{
|
|
1429
|
-
x: n,
|
|
1430
|
-
y: r
|
|
1431
|
-
},
|
|
1432
|
-
{
|
|
1433
|
-
x: i,
|
|
1434
|
-
y: r
|
|
1435
|
-
}
|
|
1436
|
-
];
|
|
1437
|
-
}
|
|
1438
|
-
Z(Sn, "getPointsFromRect");
|
|
1439
|
-
function Cn(e, t) {
|
|
1440
|
-
let { x: n, y: r } = e, i = !1;
|
|
1441
|
-
for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
|
|
1442
|
-
let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
|
|
1443
|
-
l > r != d > r && n < (u - c) * (r - l) / (d - l) + c && (i = !i);
|
|
1444
|
-
}
|
|
1445
|
-
return i;
|
|
1446
|
-
}
|
|
1447
|
-
Z(Cn, "isPointInPolygon");
|
|
1448
|
-
function wn(e) {
|
|
1449
|
-
let t = e.slice();
|
|
1450
|
-
return t.sort((e, t) => e.x < t.x ? -1 : e.x > t.x ? 1 : e.y < t.y ? -1 : +(e.y > t.y)), Tn(t);
|
|
1451
|
-
}
|
|
1452
|
-
Z(wn, "getHull");
|
|
1453
|
-
function Tn(e) {
|
|
1454
|
-
if (e.length <= 1) return e.slice();
|
|
1455
|
-
let t = [];
|
|
1456
|
-
for (let n = 0; n < e.length; n++) {
|
|
1457
|
-
let r = e[n];
|
|
1458
|
-
for (; t.length >= 2;) {
|
|
1459
|
-
let e = t[t.length - 1], n = t[t.length - 2];
|
|
1460
|
-
if ((e.x - n.x) * (r.y - n.y) >= (e.y - n.y) * (r.x - n.x)) t.pop();
|
|
1461
|
-
else break;
|
|
1462
|
-
}
|
|
1463
|
-
t.push(r);
|
|
1464
|
-
}
|
|
1465
|
-
t.pop();
|
|
1466
|
-
let n = [];
|
|
1467
|
-
for (let t = e.length - 1; t >= 0; t--) {
|
|
1468
|
-
let r = e[t];
|
|
1469
|
-
for (; n.length >= 2;) {
|
|
1470
|
-
let e = n[n.length - 1], t = n[n.length - 2];
|
|
1471
|
-
if ((e.x - t.x) * (r.y - t.y) >= (e.y - t.y) * (r.x - t.x)) n.pop();
|
|
1472
|
-
else break;
|
|
1473
|
-
}
|
|
1474
|
-
n.push(r);
|
|
1475
|
-
}
|
|
1476
|
-
return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
|
|
1477
|
-
}
|
|
1478
|
-
Z(Tn, "getHullPresorted");
|
|
1479
|
-
var En = an, Dn = cn, On = un, kn = mn, An = hn, jn = yn, Mn = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Nn = t, Pn = (e, t) => (n) => {
|
|
1480
|
-
if (t?.variants == null) return Nn(e, n?.class, n?.className);
|
|
1481
|
-
let { variants: r, defaultVariants: i } = t, a = Object.keys(r).map((e) => {
|
|
1482
|
-
let t = n?.[e], a = i?.[e];
|
|
1483
|
-
if (t === null) return null;
|
|
1484
|
-
let o = Mn(t) || Mn(a);
|
|
1485
|
-
return r[e][o];
|
|
1486
|
-
}), o = n && Object.entries(n).reduce((e, t) => {
|
|
1487
|
-
let [n, r] = t;
|
|
1488
|
-
return r === void 0 || (e[n] = r), e;
|
|
1489
|
-
}, {});
|
|
1490
|
-
return Nn(e, a, t?.compoundVariants?.reduce((e, t) => {
|
|
1491
|
-
let { class: n, className: r, ...a } = t;
|
|
1492
|
-
return Object.entries(a).every((e) => {
|
|
1493
|
-
let [t, n] = e;
|
|
1494
|
-
return Array.isArray(n) ? n.includes({
|
|
1495
|
-
...i,
|
|
1496
|
-
...o
|
|
1497
|
-
}[t]) : {
|
|
1498
|
-
...i,
|
|
1499
|
-
...o
|
|
1500
|
-
}[t] === n;
|
|
1501
|
-
}) ? [
|
|
1502
|
-
...e,
|
|
1503
|
-
n,
|
|
1504
|
-
r
|
|
1505
|
-
] : e;
|
|
1506
|
-
}, []), n?.class, n?.className);
|
|
1507
|
-
};
|
|
1508
|
-
//#endregion
|
|
1509
|
-
//#region lib/hooks/use-fullscreen-element.ts
|
|
1510
|
-
function Fn(e) {
|
|
1511
|
-
return document.addEventListener("fullscreenchange", e), () => document.removeEventListener("fullscreenchange", e);
|
|
1512
|
-
}
|
|
1513
|
-
var In = /* @__PURE__ */ new Set([
|
|
1514
|
-
"VIDEO",
|
|
1515
|
-
"IFRAME",
|
|
1516
|
-
"CANVAS",
|
|
1517
|
-
"IMG",
|
|
1518
|
-
"EMBED"
|
|
1519
|
-
]);
|
|
1520
|
-
function Ln(e) {
|
|
1521
|
-
let t = e.fullscreenElement;
|
|
1522
|
-
return t && !In.has(t.tagName) ? t : null;
|
|
1523
|
-
}
|
|
1524
|
-
function Rn() {
|
|
1525
|
-
return h(Fn, () => Ln(document), () => null);
|
|
1526
|
-
}
|
|
1527
|
-
//#endregion
|
|
1528
|
-
//#region lib/components/ui/overlays/tooltip/tooltip.tsx
|
|
1529
|
-
function zn({ delayDuration: e = 0, ...t }) {
|
|
1530
|
-
return /* @__PURE__ */ g(En, {
|
|
1531
|
-
"data-slot": "tooltip-provider",
|
|
1532
|
-
delayDuration: e,
|
|
1533
|
-
...t
|
|
1534
|
-
});
|
|
1535
|
-
}
|
|
1536
|
-
function Bn({ content: e, children: t, className: r, container: i, side: a, ...o }) {
|
|
1537
|
-
return /* @__PURE__ */ _(Vn, {
|
|
1538
|
-
...o,
|
|
1539
|
-
children: [/* @__PURE__ */ g(Hn, {
|
|
1540
|
-
asChild: !0,
|
|
1541
|
-
children: t
|
|
1542
|
-
}), /* @__PURE__ */ g(Un, {
|
|
1543
|
-
className: n("max-w-sm text-wrap", r),
|
|
1544
|
-
container: i,
|
|
1545
|
-
side: a,
|
|
1546
|
-
children: e
|
|
1547
|
-
})]
|
|
1548
|
-
});
|
|
1549
|
-
}
|
|
1550
|
-
function Vn({ ...e }) {
|
|
1551
|
-
return /* @__PURE__ */ g(zn, { children: /* @__PURE__ */ g(Dn, {
|
|
1552
|
-
"data-slot": "tooltip",
|
|
1553
|
-
...e
|
|
1554
|
-
}) });
|
|
1555
|
-
}
|
|
1556
|
-
function Hn({ ...e }) {
|
|
1557
|
-
return /* @__PURE__ */ g(On, {
|
|
1558
|
-
"data-pw": e.name ?? "tooltip-trigger",
|
|
1559
|
-
"data-slot": "tooltip-trigger",
|
|
1560
|
-
...e
|
|
1561
|
-
});
|
|
1562
|
-
}
|
|
1563
|
-
function Un({ className: e, sideOffset: t = 0, children: r, container: i, ref: a, onEscapeKeyDown: o, ...s }) {
|
|
1564
|
-
let c = Rn(), l = m(null), u = w(l, a);
|
|
1565
|
-
return /* @__PURE__ */ g(kn, {
|
|
1566
|
-
container: i ?? c,
|
|
1567
|
-
children: /* @__PURE__ */ _(An, {
|
|
1568
|
-
ref: u,
|
|
1569
|
-
onEscapeKeyDown: (e) => {
|
|
1570
|
-
o?.(e), y(l.current, e);
|
|
1571
|
-
},
|
|
1572
|
-
"data-slot": "tooltip-content",
|
|
1573
|
-
"data-pw": "tooltip-content",
|
|
1574
|
-
sideOffset: t,
|
|
1575
|
-
className: n("bg-tooltip text-tooltip-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded px-3 py-1.5 text-xs text-balance", e),
|
|
1576
|
-
...s,
|
|
1577
|
-
children: [r, /* @__PURE__ */ g(jn, { className: "bg-tooltip fill-tooltip z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })]
|
|
1578
|
-
})
|
|
1579
|
-
});
|
|
1580
|
-
}
|
|
1581
|
-
//#endregion
|
|
1582
|
-
export { de as A, Qe as C, Ee as D, Ne as E, j as F, D as I, C as L, B as M, ie as N, W as O, O as P, w as R, Ze as S, He as T, _t as _, Rn as a, ct as b, Gt as c, Wt as d, Ot as f, gt as g, vt as h, Hn as i, se as j, U as k, qt as l, xt as m, Un as n, Pn as o, yt as p, zn as r, Jt as s, Bn as t, Kt as u, bt as v, J as w, at as x, mt as y };
|