@golocalinteractive/golocal-cloud-wrapper 1.3.2 → 1.3.4
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/components/ui/badge.d.ts +2 -1
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/context/PermissionsContext.d.ts +1 -0
- package/dist/context/PermissionsContext.d.ts.map +1 -1
- package/dist/golocal-cloud-wrapper.cjs.js +7 -7
- package/dist/golocal-cloud-wrapper.css +1 -1
- package/dist/golocal-cloud-wrapper.es.js +456 -426
- package/dist/lib/auth/permissions.d.ts +1 -0
- package/dist/lib/auth/permissions.d.ts.map +1 -1
- package/dist/lib/auth/server.d.ts.map +1 -1
- package/dist/server.cjs.js +4 -4
- package/dist/server.es.js +642 -640
- package/package.json +1 -1
- package/tailwind.preset.js +85 -0
- package/dist/hooks/use-active-route.test.d.ts +0 -2
- package/dist/hooks/use-active-route.test.d.ts.map +0 -1
|
@@ -150,13 +150,13 @@ function Xi() {
|
|
|
150
150
|
configurable: !0
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function u() {
|
|
154
154
|
var x = e(this.type);
|
|
155
155
|
return S[x] || (S[x] = !0, console.error(
|
|
156
156
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
157
157
|
)), x = this.props.ref, x !== void 0 ? x : null;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function d(x, T, F, k, O, Z, te, q) {
|
|
160
160
|
return F = Z.ref, x = {
|
|
161
161
|
$$typeof: p,
|
|
162
162
|
type: x,
|
|
@@ -165,7 +165,7 @@ function Xi() {
|
|
|
165
165
|
_owner: O
|
|
166
166
|
}, (F !== void 0 ? F : null) !== null ? Object.defineProperty(x, "ref", {
|
|
167
167
|
enumerable: !1,
|
|
168
|
-
get:
|
|
168
|
+
get: u
|
|
169
169
|
}) : Object.defineProperty(x, "ref", { enumerable: !1, value: null }), x._store = {}, Object.defineProperty(x._store, "validated", {
|
|
170
170
|
configurable: !1,
|
|
171
171
|
enumerable: !1,
|
|
@@ -227,7 +227,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
227
227
|
return z && i(
|
|
228
228
|
F,
|
|
229
229
|
typeof x == "function" ? x.displayName || x.name || "Unknown" : x
|
|
230
|
-
),
|
|
230
|
+
), d(
|
|
231
231
|
x,
|
|
232
232
|
z,
|
|
233
233
|
Z,
|
|
@@ -312,10 +312,10 @@ function se(...e) {
|
|
|
312
312
|
// @__NO_SIDE_EFFECTS__
|
|
313
313
|
function ft(e) {
|
|
314
314
|
const t = /* @__PURE__ */ Mi(e), n = A.forwardRef((r, o) => {
|
|
315
|
-
const { children: a, ...s } = r, i = A.Children.toArray(a),
|
|
316
|
-
if (
|
|
317
|
-
const
|
|
318
|
-
return /* @__PURE__ */ l.jsx(t, { ...s, ref: o, children: A.isValidElement(
|
|
315
|
+
const { children: a, ...s } = r, i = A.Children.toArray(a), u = i.find(Oi);
|
|
316
|
+
if (u) {
|
|
317
|
+
const d = u.props.children, f = i.map((c) => c === u ? A.Children.count(d) > 1 ? A.Children.only(null) : A.isValidElement(d) ? d.props.children : null : c);
|
|
318
|
+
return /* @__PURE__ */ l.jsx(t, { ...s, ref: o, children: A.isValidElement(d) ? A.cloneElement(d, void 0, f) : null });
|
|
319
319
|
}
|
|
320
320
|
return /* @__PURE__ */ l.jsx(t, { ...s, ref: o, children: a });
|
|
321
321
|
});
|
|
@@ -348,8 +348,8 @@ function zi(e, t) {
|
|
|
348
348
|
for (const r in t) {
|
|
349
349
|
const o = e[r], a = t[r];
|
|
350
350
|
/^on[A-Z]/.test(r) ? o && a ? n[r] = (...i) => {
|
|
351
|
-
const
|
|
352
|
-
return o(...i),
|
|
351
|
+
const u = a(...i);
|
|
352
|
+
return o(...i), u;
|
|
353
353
|
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...a } : r === "className" && (n[r] = [o, a].filter(Boolean).join(" "));
|
|
354
354
|
}
|
|
355
355
|
return { ...e, ...n };
|
|
@@ -379,8 +379,8 @@ var Wi = [
|
|
|
379
379
|
"ul"
|
|
380
380
|
], re = Wi.reduce((e, t) => {
|
|
381
381
|
const n = /* @__PURE__ */ ft(`Primitive.${t}`), r = A.forwardRef((o, a) => {
|
|
382
|
-
const { asChild: s, ...i } = o,
|
|
383
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l.jsx(
|
|
382
|
+
const { asChild: s, ...i } = o, u = s ? n : t;
|
|
383
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l.jsx(u, { ...i, ref: a });
|
|
384
384
|
});
|
|
385
385
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
386
386
|
}, {});
|
|
@@ -428,8 +428,8 @@ const rr = "-", Ji = (e) => {
|
|
|
428
428
|
return i[0] === "" && i.length !== 1 && i.shift(), Ho(i, t) || Yi(s);
|
|
429
429
|
},
|
|
430
430
|
getConflictingClassGroupIds: (s, i) => {
|
|
431
|
-
const
|
|
432
|
-
return i && r[s] ? [...
|
|
431
|
+
const u = n[s] || [];
|
|
432
|
+
return i && r[s] ? [...u, ...r[s]] : u;
|
|
433
433
|
}
|
|
434
434
|
};
|
|
435
435
|
}, Ho = (e, t) => {
|
|
@@ -523,22 +523,22 @@ const rr = "-", Ji = (e) => {
|
|
|
523
523
|
} = e;
|
|
524
524
|
let r = (o) => {
|
|
525
525
|
const a = [];
|
|
526
|
-
let s = 0, i = 0,
|
|
526
|
+
let s = 0, i = 0, u = 0, d;
|
|
527
527
|
for (let h = 0; h < o.length; h++) {
|
|
528
528
|
let m = o[h];
|
|
529
529
|
if (s === 0 && i === 0) {
|
|
530
530
|
if (m === Jn) {
|
|
531
|
-
a.push(o.slice(
|
|
531
|
+
a.push(o.slice(u, h)), u = h + Ki;
|
|
532
532
|
continue;
|
|
533
533
|
}
|
|
534
534
|
if (m === "/") {
|
|
535
|
-
|
|
535
|
+
d = h;
|
|
536
536
|
continue;
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
539
|
m === "[" ? s++ : m === "]" ? s-- : m === "(" ? i++ : m === ")" && i--;
|
|
540
540
|
}
|
|
541
|
-
const f = a.length === 0 ? o : o.substring(
|
|
541
|
+
const f = a.length === 0 ? o : o.substring(u), c = _i(f), v = c !== f, p = d && d > u ? d - u : void 0;
|
|
542
542
|
return {
|
|
543
543
|
modifiers: a,
|
|
544
544
|
hasImportantModifier: v,
|
|
@@ -587,9 +587,9 @@ const rr = "-", Ji = (e) => {
|
|
|
587
587
|
getConflictingClassGroupIds: o,
|
|
588
588
|
sortModifiers: a
|
|
589
589
|
} = t, s = [], i = e.trim().split(tc);
|
|
590
|
-
let
|
|
591
|
-
for (let
|
|
592
|
-
const f = i[
|
|
590
|
+
let u = "";
|
|
591
|
+
for (let d = i.length - 1; d >= 0; d -= 1) {
|
|
592
|
+
const f = i[d], {
|
|
593
593
|
isExternal: c,
|
|
594
594
|
modifiers: v,
|
|
595
595
|
hasImportantModifier: p,
|
|
@@ -597,17 +597,17 @@ const rr = "-", Ji = (e) => {
|
|
|
597
597
|
maybePostfixModifierPosition: m
|
|
598
598
|
} = n(f);
|
|
599
599
|
if (c) {
|
|
600
|
-
|
|
600
|
+
u = f + (u.length > 0 ? " " + u : u);
|
|
601
601
|
continue;
|
|
602
602
|
}
|
|
603
603
|
let g = !!m, b = r(g ? h.substring(0, m) : h);
|
|
604
604
|
if (!b) {
|
|
605
605
|
if (!g) {
|
|
606
|
-
|
|
606
|
+
u = f + (u.length > 0 ? " " + u : u);
|
|
607
607
|
continue;
|
|
608
608
|
}
|
|
609
609
|
if (b = r(h), !b) {
|
|
610
|
-
|
|
610
|
+
u = f + (u.length > 0 ? " " + u : u);
|
|
611
611
|
continue;
|
|
612
612
|
}
|
|
613
613
|
g = !1;
|
|
@@ -621,9 +621,9 @@ const rr = "-", Ji = (e) => {
|
|
|
621
621
|
const j = L[N];
|
|
622
622
|
s.push(w + j);
|
|
623
623
|
}
|
|
624
|
-
|
|
624
|
+
u = f + (u.length > 0 ? " " + u : u);
|
|
625
625
|
}
|
|
626
|
-
return
|
|
626
|
+
return u;
|
|
627
627
|
};
|
|
628
628
|
function rc() {
|
|
629
629
|
let e = 0, t, n, r = "";
|
|
@@ -641,16 +641,16 @@ const Mo = (e) => {
|
|
|
641
641
|
};
|
|
642
642
|
function oc(e, ...t) {
|
|
643
643
|
let n, r, o, a = s;
|
|
644
|
-
function s(
|
|
645
|
-
const
|
|
646
|
-
return n = ec(
|
|
644
|
+
function s(u) {
|
|
645
|
+
const d = t.reduce((f, c) => c(f), e());
|
|
646
|
+
return n = ec(d), r = n.cache.get, o = n.cache.set, a = i, i(u);
|
|
647
647
|
}
|
|
648
|
-
function i(
|
|
649
|
-
const
|
|
650
|
-
if (
|
|
651
|
-
return
|
|
652
|
-
const f = nc(
|
|
653
|
-
return o(
|
|
648
|
+
function i(u) {
|
|
649
|
+
const d = r(u);
|
|
650
|
+
if (d)
|
|
651
|
+
return d;
|
|
652
|
+
const f = nc(u, n);
|
|
653
|
+
return o(u, f), f;
|
|
654
654
|
}
|
|
655
655
|
return function() {
|
|
656
656
|
return a(rc.apply(null, arguments));
|
|
@@ -671,7 +671,7 @@ const ae = (e) => {
|
|
|
671
671
|
const r = Oo.exec(e);
|
|
672
672
|
return r ? r[1] ? t(r[1]) : n : !1;
|
|
673
673
|
}, Go = (e) => e === "position" || e === "percentage", Wo = (e) => e === "image" || e === "url", Fo = (e) => e === "length" || e === "size" || e === "bg-size", Zo = (e) => e === "length", yc = (e) => e === "number", wc = (e) => e === "family-name", Bo = (e) => e === "shadow", Pc = () => {
|
|
674
|
-
const e = ae("color"), t = ae("font"), n = ae("text"), r = ae("font-weight"), o = ae("tracking"), a = ae("leading"), s = ae("breakpoint"), i = ae("container"),
|
|
674
|
+
const e = ae("color"), t = ae("font"), n = ae("text"), r = ae("font-weight"), o = ae("tracking"), a = ae("leading"), s = ae("breakpoint"), i = ae("container"), u = ae("spacing"), d = ae("radius"), f = ae("shadow"), c = ae("inset-shadow"), v = ae("text-shadow"), p = ae("drop-shadow"), h = ae("blur"), m = ae("perspective"), g = ae("aspect"), b = ae("ease"), y = ae("animate"), w = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], P = () => [
|
|
675
675
|
"center",
|
|
676
676
|
"top",
|
|
677
677
|
"bottom",
|
|
@@ -689,7 +689,7 @@ const ae = (e) => {
|
|
|
689
689
|
"bottom-left",
|
|
690
690
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
691
691
|
"left-bottom"
|
|
692
|
-
], L = () => [...P(), H, X], N = () => ["auto", "hidden", "clip", "visible", "scroll"], j = () => ["auto", "contain", "none"], E = () => [H, X,
|
|
692
|
+
], L = () => [...P(), H, X], N = () => ["auto", "hidden", "clip", "visible", "scroll"], j = () => ["auto", "contain", "none"], E = () => [H, X, u], W = () => [it, "full", "auto", ...E()], Y = () => [Fe, "none", "subgrid", H, X], $ = () => ["auto", {
|
|
693
693
|
span: ["full", Fe, H, X]
|
|
694
694
|
}, Fe, H, X], Q = () => [Fe, "auto", H, X], U = () => ["auto", "min", "max", "fr", H, X], V = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], _ = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], S = () => ["auto", ...E()], C = () => [it, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...E()], R = () => [e, H, X], D = () => [...P(), qr, Vr, {
|
|
695
695
|
position: [H, X]
|
|
@@ -702,7 +702,7 @@ const ae = (e) => {
|
|
|
702
702
|
"",
|
|
703
703
|
"none",
|
|
704
704
|
"full",
|
|
705
|
-
|
|
705
|
+
d,
|
|
706
706
|
H,
|
|
707
707
|
X
|
|
708
708
|
], O = () => ["", K, Pt, Qe], Z = () => ["solid", "dashed", "dotted", "double"], te = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], q = () => [K, kn, qr, Vr], z = () => [
|
|
@@ -3164,15 +3164,15 @@ or.displayName = So.displayName;
|
|
|
3164
3164
|
const Kr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Qr = Xo, dn = (e, t) => (n) => {
|
|
3165
3165
|
var r;
|
|
3166
3166
|
if ((t == null ? void 0 : t.variants) == null) return Qr(e, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
|
|
3167
|
-
const { variants: o, defaultVariants: a } = t, s = Object.keys(o).map((
|
|
3168
|
-
const f = n == null ? void 0 : n[
|
|
3167
|
+
const { variants: o, defaultVariants: a } = t, s = Object.keys(o).map((d) => {
|
|
3168
|
+
const f = n == null ? void 0 : n[d], c = a == null ? void 0 : a[d];
|
|
3169
3169
|
if (f === null) return null;
|
|
3170
3170
|
const v = Kr(f) || Kr(c);
|
|
3171
|
-
return o[
|
|
3172
|
-
}), i = n && Object.entries(n).reduce((
|
|
3171
|
+
return o[d][v];
|
|
3172
|
+
}), i = n && Object.entries(n).reduce((d, f) => {
|
|
3173
3173
|
let [c, v] = f;
|
|
3174
|
-
return v === void 0 || (
|
|
3175
|
-
}, {}),
|
|
3174
|
+
return v === void 0 || (d[c] = v), d;
|
|
3175
|
+
}, {}), u = t == null || (r = t.compoundVariants) === null || r === void 0 ? void 0 : r.reduce((d, f) => {
|
|
3176
3176
|
let { class: c, className: v, ...p } = f;
|
|
3177
3177
|
return Object.entries(p).every((h) => {
|
|
3178
3178
|
let [m, g] = h;
|
|
@@ -3184,12 +3184,12 @@ const Kr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Qr = Xo, d
|
|
|
3184
3184
|
...i
|
|
3185
3185
|
}[m] === g;
|
|
3186
3186
|
}) ? [
|
|
3187
|
-
...
|
|
3187
|
+
...d,
|
|
3188
3188
|
c,
|
|
3189
3189
|
v
|
|
3190
|
-
] :
|
|
3190
|
+
] : d;
|
|
3191
3191
|
}, []);
|
|
3192
|
-
return Qr(e, s,
|
|
3192
|
+
return Qr(e, s, u, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
|
|
3193
3193
|
};
|
|
3194
3194
|
/**
|
|
3195
3195
|
* @license lucide-react v0.522.0 - ISC
|
|
@@ -3241,10 +3241,10 @@ const kc = Io(
|
|
|
3241
3241
|
children: a,
|
|
3242
3242
|
iconNode: s,
|
|
3243
3243
|
...i
|
|
3244
|
-
},
|
|
3244
|
+
}, u) => Fn(
|
|
3245
3245
|
"svg",
|
|
3246
3246
|
{
|
|
3247
|
-
ref:
|
|
3247
|
+
ref: u,
|
|
3248
3248
|
...jc,
|
|
3249
3249
|
width: t,
|
|
3250
3250
|
height: t,
|
|
@@ -3255,7 +3255,7 @@ const kc = Io(
|
|
|
3255
3255
|
...i
|
|
3256
3256
|
},
|
|
3257
3257
|
[
|
|
3258
|
-
...s.map(([
|
|
3258
|
+
...s.map(([d, f]) => Fn(d, f)),
|
|
3259
3259
|
...Array.isArray(a) ? a : [a]
|
|
3260
3260
|
]
|
|
3261
3261
|
)
|
|
@@ -3830,12 +3830,20 @@ const nd = dn(
|
|
|
3830
3830
|
{
|
|
3831
3831
|
variants: {
|
|
3832
3832
|
variant: {
|
|
3833
|
-
default: "bg-
|
|
3834
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
3835
|
-
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
3833
|
+
default: "bg-brand-blue text-white hover:bg-brand-blue/90",
|
|
3836
3834
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
3835
|
+
destructive: "bg-red-600 text-white hover:bg-red-700",
|
|
3836
|
+
outline: "border border-input bg-background text-brand-blue hover:bg-accent hover:text-accent-foreground",
|
|
3837
3837
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
3838
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
3838
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
3839
|
+
// Brand color variants
|
|
3840
|
+
brand: "bg-brand-navy text-white hover:bg-brand-navy/90",
|
|
3841
|
+
orange: "bg-brand-orange text-white hover:bg-brand-orange/90",
|
|
3842
|
+
green: "bg-brand-green text-white hover:bg-brand-green/90",
|
|
3843
|
+
lime: "bg-brand-lime text-white hover:bg-brand-lime/90",
|
|
3844
|
+
caribbean: "bg-caribbean-600 text-white hover:bg-caribbean-600/90",
|
|
3845
|
+
// Error variants
|
|
3846
|
+
error: "bg-red-300 text-red-900 hover:bg-red-400"
|
|
3839
3847
|
},
|
|
3840
3848
|
size: {
|
|
3841
3849
|
default: "h-10 px-4 py-2",
|
|
@@ -3886,8 +3894,8 @@ function G(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
|
3886
3894
|
}
|
|
3887
3895
|
function rd(e, t) {
|
|
3888
3896
|
const n = A.createContext(t), r = (a) => {
|
|
3889
|
-
const { children: s, ...i } = a,
|
|
3890
|
-
return /* @__PURE__ */ l.jsx(n.Provider, { value:
|
|
3897
|
+
const { children: s, ...i } = a, u = A.useMemo(() => i, Object.values(i));
|
|
3898
|
+
return /* @__PURE__ */ l.jsx(n.Provider, { value: u, children: s });
|
|
3891
3899
|
};
|
|
3892
3900
|
r.displayName = e + "Provider";
|
|
3893
3901
|
function o(a) {
|
|
@@ -3901,30 +3909,30 @@ function rd(e, t) {
|
|
|
3901
3909
|
function tt(e, t = []) {
|
|
3902
3910
|
let n = [];
|
|
3903
3911
|
function r(a, s) {
|
|
3904
|
-
const i = A.createContext(s),
|
|
3912
|
+
const i = A.createContext(s), u = n.length;
|
|
3905
3913
|
n = [...n, s];
|
|
3906
|
-
const
|
|
3914
|
+
const d = (c) => {
|
|
3907
3915
|
var b;
|
|
3908
|
-
const { scope: v, children: p, ...h } = c, m = ((b = v == null ? void 0 : v[e]) == null ? void 0 : b[
|
|
3916
|
+
const { scope: v, children: p, ...h } = c, m = ((b = v == null ? void 0 : v[e]) == null ? void 0 : b[u]) || i, g = A.useMemo(() => h, Object.values(h));
|
|
3909
3917
|
return /* @__PURE__ */ l.jsx(m.Provider, { value: g, children: p });
|
|
3910
3918
|
};
|
|
3911
|
-
|
|
3919
|
+
d.displayName = a + "Provider";
|
|
3912
3920
|
function f(c, v) {
|
|
3913
3921
|
var m;
|
|
3914
|
-
const p = ((m = v == null ? void 0 : v[e]) == null ? void 0 : m[
|
|
3922
|
+
const p = ((m = v == null ? void 0 : v[e]) == null ? void 0 : m[u]) || i, h = A.useContext(p);
|
|
3915
3923
|
if (h) return h;
|
|
3916
3924
|
if (s !== void 0) return s;
|
|
3917
3925
|
throw new Error(`\`${c}\` must be used within \`${a}\``);
|
|
3918
3926
|
}
|
|
3919
|
-
return [
|
|
3927
|
+
return [d, f];
|
|
3920
3928
|
}
|
|
3921
3929
|
const o = () => {
|
|
3922
3930
|
const a = n.map((s) => A.createContext(s));
|
|
3923
3931
|
return function(i) {
|
|
3924
|
-
const
|
|
3932
|
+
const u = (i == null ? void 0 : i[e]) || a;
|
|
3925
3933
|
return A.useMemo(
|
|
3926
|
-
() => ({ [`__scope${e}`]: { ...i, [e]:
|
|
3927
|
-
[i,
|
|
3934
|
+
() => ({ [`__scope${e}`]: { ...i, [e]: u } }),
|
|
3935
|
+
[i, u]
|
|
3928
3936
|
);
|
|
3929
3937
|
};
|
|
3930
3938
|
};
|
|
@@ -3939,8 +3947,8 @@ function od(...e) {
|
|
|
3939
3947
|
scopeName: o.scopeName
|
|
3940
3948
|
}));
|
|
3941
3949
|
return function(a) {
|
|
3942
|
-
const s = r.reduce((i, { useScope:
|
|
3943
|
-
const c =
|
|
3950
|
+
const s = r.reduce((i, { useScope: u, scopeName: d }) => {
|
|
3951
|
+
const c = u(a)[`__scope${d}`];
|
|
3944
3952
|
return { ...i, ...c };
|
|
3945
3953
|
}, {});
|
|
3946
3954
|
return A.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
|
|
@@ -3968,7 +3976,7 @@ function Nt({
|
|
|
3968
3976
|
const [o, a, s] = cd({
|
|
3969
3977
|
defaultProp: t,
|
|
3970
3978
|
onChange: n
|
|
3971
|
-
}), i = e !== void 0,
|
|
3979
|
+
}), i = e !== void 0, u = i ? e : o;
|
|
3972
3980
|
{
|
|
3973
3981
|
const f = A.useRef(e !== void 0);
|
|
3974
3982
|
A.useEffect(() => {
|
|
@@ -3978,7 +3986,7 @@ function Nt({
|
|
|
3978
3986
|
), f.current = i;
|
|
3979
3987
|
}, [i, r]);
|
|
3980
3988
|
}
|
|
3981
|
-
const
|
|
3989
|
+
const d = A.useCallback(
|
|
3982
3990
|
(f) => {
|
|
3983
3991
|
var c;
|
|
3984
3992
|
if (i) {
|
|
@@ -3989,7 +3997,7 @@ function Nt({
|
|
|
3989
3997
|
},
|
|
3990
3998
|
[i, e, a, s]
|
|
3991
3999
|
);
|
|
3992
|
-
return [
|
|
4000
|
+
return [u, d];
|
|
3993
4001
|
}
|
|
3994
4002
|
function cd({
|
|
3995
4003
|
defaultProp: e,
|
|
@@ -4037,30 +4045,30 @@ var ud = "DismissableLayer", Un = "dismissableLayer.update", Ad = "dismissableLa
|
|
|
4037
4045
|
onFocusOutside: a,
|
|
4038
4046
|
onInteractOutside: s,
|
|
4039
4047
|
onDismiss: i,
|
|
4040
|
-
...
|
|
4041
|
-
} = e,
|
|
4042
|
-
const E = j.target, W = [...
|
|
4048
|
+
...u
|
|
4049
|
+
} = e, d = A.useContext(qo), [f, c] = A.useState(null), v = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, p] = A.useState({}), h = se(t, (j) => c(j)), m = Array.from(d.layers), [g] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), b = m.indexOf(g), y = f ? m.indexOf(f) : -1, w = d.layersWithOutsidePointerEventsDisabled.size > 0, P = y >= b, L = md((j) => {
|
|
4050
|
+
const E = j.target, W = [...d.branches].some((Y) => Y.contains(E));
|
|
4043
4051
|
!P || W || (o == null || o(j), s == null || s(j), j.defaultPrevented || i == null || i());
|
|
4044
4052
|
}, v), N = hd((j) => {
|
|
4045
4053
|
const E = j.target;
|
|
4046
|
-
[...
|
|
4054
|
+
[...d.branches].some((Y) => Y.contains(E)) || (a == null || a(j), s == null || s(j), j.defaultPrevented || i == null || i());
|
|
4047
4055
|
}, v);
|
|
4048
4056
|
return dd((j) => {
|
|
4049
|
-
y ===
|
|
4057
|
+
y === d.layers.size - 1 && (r == null || r(j), !j.defaultPrevented && i && (j.preventDefault(), i()));
|
|
4050
4058
|
}, v), A.useEffect(() => {
|
|
4051
4059
|
if (f)
|
|
4052
|
-
return n && (
|
|
4053
|
-
n &&
|
|
4060
|
+
return n && (d.layersWithOutsidePointerEventsDisabled.size === 0 && ($r = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), d.layersWithOutsidePointerEventsDisabled.add(f)), d.layers.add(f), eo(), () => {
|
|
4061
|
+
n && d.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = $r);
|
|
4054
4062
|
};
|
|
4055
|
-
}, [f, v, n,
|
|
4056
|
-
f && (
|
|
4057
|
-
}, [f,
|
|
4063
|
+
}, [f, v, n, d]), A.useEffect(() => () => {
|
|
4064
|
+
f && (d.layers.delete(f), d.layersWithOutsidePointerEventsDisabled.delete(f), eo());
|
|
4065
|
+
}, [f, d]), A.useEffect(() => {
|
|
4058
4066
|
const j = () => p({});
|
|
4059
4067
|
return document.addEventListener(Un, j), () => document.removeEventListener(Un, j);
|
|
4060
4068
|
}, []), /* @__PURE__ */ l.jsx(
|
|
4061
4069
|
re.div,
|
|
4062
4070
|
{
|
|
4063
|
-
...
|
|
4071
|
+
...u,
|
|
4064
4072
|
ref: h,
|
|
4065
4073
|
style: {
|
|
4066
4074
|
pointerEvents: w ? P ? "auto" : "none" : void 0,
|
|
@@ -4094,16 +4102,16 @@ function md(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
4094
4102
|
return A.useEffect(() => {
|
|
4095
4103
|
const a = (i) => {
|
|
4096
4104
|
if (i.target && !r.current) {
|
|
4097
|
-
let
|
|
4105
|
+
let u = function() {
|
|
4098
4106
|
Ko(
|
|
4099
4107
|
Ad,
|
|
4100
4108
|
n,
|
|
4101
|
-
|
|
4109
|
+
d,
|
|
4102
4110
|
{ discrete: !0 }
|
|
4103
4111
|
);
|
|
4104
4112
|
};
|
|
4105
|
-
const
|
|
4106
|
-
i.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current =
|
|
4113
|
+
const d = { originalEvent: i };
|
|
4114
|
+
i.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = u, t.addEventListener("click", o.current, { once: !0 })) : u();
|
|
4107
4115
|
} else
|
|
4108
4116
|
t.removeEventListener("click", o.current);
|
|
4109
4117
|
r.current = !1;
|
|
@@ -4147,7 +4155,7 @@ var Dn = "focusScope.autoFocusOnMount", Sn = "focusScope.autoFocusOnUnmount", to
|
|
|
4147
4155
|
onMountAutoFocus: o,
|
|
4148
4156
|
onUnmountAutoFocus: a,
|
|
4149
4157
|
...s
|
|
4150
|
-
} = e, [i,
|
|
4158
|
+
} = e, [i, u] = A.useState(null), d = Se(o), f = Se(a), c = A.useRef(null), v = se(t, (m) => u(m)), p = A.useRef({
|
|
4151
4159
|
paused: !1,
|
|
4152
4160
|
pause() {
|
|
4153
4161
|
this.paused = !0;
|
|
@@ -4183,16 +4191,16 @@ var Dn = "focusScope.autoFocusOnMount", Sn = "focusScope.autoFocusOnUnmount", to
|
|
|
4183
4191
|
const m = document.activeElement;
|
|
4184
4192
|
if (!i.contains(m)) {
|
|
4185
4193
|
const b = new CustomEvent(Dn, to);
|
|
4186
|
-
i.addEventListener(Dn,
|
|
4194
|
+
i.addEventListener(Dn, d), i.dispatchEvent(b), b.defaultPrevented || (gd(Rd(Qo(i)), { select: !0 }), document.activeElement === m && Ze(i));
|
|
4187
4195
|
}
|
|
4188
4196
|
return () => {
|
|
4189
|
-
i.removeEventListener(Dn,
|
|
4197
|
+
i.removeEventListener(Dn, d), setTimeout(() => {
|
|
4190
4198
|
const b = new CustomEvent(Sn, to);
|
|
4191
4199
|
i.addEventListener(Sn, f), i.dispatchEvent(b), b.defaultPrevented || Ze(m ?? document.body, { select: !0 }), i.removeEventListener(Sn, f), ro.remove(p);
|
|
4192
4200
|
}, 0);
|
|
4193
4201
|
};
|
|
4194
4202
|
}
|
|
4195
|
-
}, [i,
|
|
4203
|
+
}, [i, d, f, p]);
|
|
4196
4204
|
const h = A.useCallback(
|
|
4197
4205
|
(m) => {
|
|
4198
4206
|
if (!n && !r || p.paused) return;
|
|
@@ -4286,7 +4294,7 @@ var Ge = (e) => {
|
|
|
4286
4294
|
};
|
|
4287
4295
|
Ge.displayName = "Presence";
|
|
4288
4296
|
function Ld(e) {
|
|
4289
|
-
const [t, n] = A.useState(), r = A.useRef(null), o = A.useRef(e), a = A.useRef("none"), s = e ? "mounted" : "unmounted", [i,
|
|
4297
|
+
const [t, n] = A.useState(), r = A.useRef(null), o = A.useRef(e), a = A.useRef("none"), s = e ? "mounted" : "unmounted", [i, u] = Id(s, {
|
|
4290
4298
|
mounted: {
|
|
4291
4299
|
UNMOUNT: "unmounted",
|
|
4292
4300
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -4300,22 +4308,22 @@ function Ld(e) {
|
|
|
4300
4308
|
}
|
|
4301
4309
|
});
|
|
4302
4310
|
return A.useEffect(() => {
|
|
4303
|
-
const
|
|
4304
|
-
a.current = i === "mounted" ?
|
|
4311
|
+
const d = Bt(r.current);
|
|
4312
|
+
a.current = i === "mounted" ? d : "none";
|
|
4305
4313
|
}, [i]), Be(() => {
|
|
4306
|
-
const
|
|
4314
|
+
const d = r.current, f = o.current;
|
|
4307
4315
|
if (f !== e) {
|
|
4308
|
-
const v = a.current, p = Bt(
|
|
4309
|
-
e ?
|
|
4316
|
+
const v = a.current, p = Bt(d);
|
|
4317
|
+
e ? u("MOUNT") : p === "none" || (d == null ? void 0 : d.display) === "none" ? u("UNMOUNT") : u(f && v !== p ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
|
|
4310
4318
|
}
|
|
4311
|
-
}, [e,
|
|
4319
|
+
}, [e, u]), Be(() => {
|
|
4312
4320
|
if (t) {
|
|
4313
|
-
let
|
|
4321
|
+
let d;
|
|
4314
4322
|
const f = t.ownerDocument.defaultView ?? window, c = (p) => {
|
|
4315
4323
|
const m = Bt(r.current).includes(p.animationName);
|
|
4316
|
-
if (p.target === t && m && (
|
|
4324
|
+
if (p.target === t && m && (u("ANIMATION_END"), !o.current)) {
|
|
4317
4325
|
const g = t.style.animationFillMode;
|
|
4318
|
-
t.style.animationFillMode = "forwards",
|
|
4326
|
+
t.style.animationFillMode = "forwards", d = f.setTimeout(() => {
|
|
4319
4327
|
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = g);
|
|
4320
4328
|
});
|
|
4321
4329
|
}
|
|
@@ -4323,14 +4331,14 @@ function Ld(e) {
|
|
|
4323
4331
|
p.target === t && (a.current = Bt(r.current));
|
|
4324
4332
|
};
|
|
4325
4333
|
return t.addEventListener("animationstart", v), t.addEventListener("animationcancel", c), t.addEventListener("animationend", c), () => {
|
|
4326
|
-
f.clearTimeout(
|
|
4334
|
+
f.clearTimeout(d), t.removeEventListener("animationstart", v), t.removeEventListener("animationcancel", c), t.removeEventListener("animationend", c);
|
|
4327
4335
|
};
|
|
4328
4336
|
} else
|
|
4329
|
-
|
|
4330
|
-
}, [t,
|
|
4337
|
+
u("ANIMATION_END");
|
|
4338
|
+
}, [t, u]), {
|
|
4331
4339
|
isPresent: ["mounted", "unmountSuspended"].includes(i),
|
|
4332
|
-
ref: A.useCallback((
|
|
4333
|
-
r.current =
|
|
4340
|
+
ref: A.useCallback((d) => {
|
|
4341
|
+
r.current = d ? getComputedStyle(d) : null, n(d);
|
|
4334
4342
|
}, [])
|
|
4335
4343
|
};
|
|
4336
4344
|
}
|
|
@@ -4462,15 +4470,15 @@ function Md(e, t) {
|
|
|
4462
4470
|
var i = n;
|
|
4463
4471
|
n = [], i.forEach(a), s = n;
|
|
4464
4472
|
}
|
|
4465
|
-
var
|
|
4473
|
+
var u = function() {
|
|
4466
4474
|
var f = s;
|
|
4467
4475
|
s = [], f.forEach(a);
|
|
4468
|
-
},
|
|
4469
|
-
return Promise.resolve().then(
|
|
4476
|
+
}, d = function() {
|
|
4477
|
+
return Promise.resolve().then(u);
|
|
4470
4478
|
};
|
|
4471
|
-
|
|
4479
|
+
d(), n = {
|
|
4472
4480
|
push: function(f) {
|
|
4473
|
-
s.push(f),
|
|
4481
|
+
s.push(f), d();
|
|
4474
4482
|
},
|
|
4475
4483
|
filter: function(f) {
|
|
4476
4484
|
return s = s.filter(f), n;
|
|
@@ -4504,12 +4512,12 @@ var ta = Cd(), Hn = function() {
|
|
|
4504
4512
|
onScrollCapture: Hn,
|
|
4505
4513
|
onWheelCapture: Hn,
|
|
4506
4514
|
onTouchMoveCapture: Hn
|
|
4507
|
-
}), o = r[0], a = r[1], s = e.forwardProps, i = e.children,
|
|
4515
|
+
}), o = r[0], a = r[1], s = e.forwardProps, i = e.children, u = e.className, d = e.removeScrollBar, f = e.enabled, c = e.shards, v = e.sideCar, p = e.noRelative, h = e.noIsolation, m = e.inert, g = e.allowPinchZoom, b = e.as, y = b === void 0 ? "div" : b, w = e.gapMode, P = $o(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), L = v, N = Xd([n, t]), j = ke(ke({}, P), o);
|
|
4508
4516
|
return A.createElement(
|
|
4509
4517
|
A.Fragment,
|
|
4510
4518
|
null,
|
|
4511
|
-
f && A.createElement(L, { sideCar: ta, removeScrollBar:
|
|
4512
|
-
s ? A.cloneElement(A.Children.only(i), ke(ke({}, j), { ref: N })) : A.createElement(y, ke({}, j, { className:
|
|
4519
|
+
f && A.createElement(L, { sideCar: ta, removeScrollBar: d, shards: c, noRelative: p, noIsolation: h, inert: m, setCallbacks: a, allowPinchZoom: !!g, lockRef: n, gapMode: w }),
|
|
4520
|
+
s ? A.cloneElement(A.Children.only(i), ke(ke({}, j), { ref: N })) : A.createElement(y, ke({}, j, { className: u, ref: N }), i)
|
|
4513
4521
|
);
|
|
4514
4522
|
});
|
|
4515
4523
|
An.defaultProps = {
|
|
@@ -4707,7 +4715,7 @@ var ct = Vn ? { passive: !1 } : !1, _d = function(e) {
|
|
|
4707
4715
|
}, ru = function(e, t) {
|
|
4708
4716
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
4709
4717
|
}, ou = function(e, t, n, r, o) {
|
|
4710
|
-
var a = ru(e, window.getComputedStyle(t).direction), s = a * r, i = n.target,
|
|
4718
|
+
var a = ru(e, window.getComputedStyle(t).direction), s = a * r, i = n.target, u = t.contains(i), d = !1, f = s > 0, c = 0, v = 0;
|
|
4711
4719
|
do {
|
|
4712
4720
|
if (!i)
|
|
4713
4721
|
break;
|
|
@@ -4717,10 +4725,10 @@ var ct = Vn ? { passive: !1 } : !1, _d = function(e) {
|
|
|
4717
4725
|
i = y && y.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? y.host : y;
|
|
4718
4726
|
} while (
|
|
4719
4727
|
// portaled content
|
|
4720
|
-
!
|
|
4721
|
-
|
|
4728
|
+
!u && i !== document.body || // self content
|
|
4729
|
+
u && (t.contains(i) || t === i)
|
|
4722
4730
|
);
|
|
4723
|
-
return (f && Math.abs(c) < 1 || !f && Math.abs(v) < 1) && (
|
|
4731
|
+
return (f && Math.abs(c) < 1 || !f && Math.abs(v) < 1) && (d = !0), d;
|
|
4724
4732
|
}, Yt = function(e) {
|
|
4725
4733
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
4726
4734
|
}, lo = function(e) {
|
|
@@ -4767,7 +4775,7 @@ function cu(e) {
|
|
|
4767
4775
|
return !0;
|
|
4768
4776
|
var W = r.current || L;
|
|
4769
4777
|
return ou(W, g, m, W === "h" ? w : P);
|
|
4770
|
-
}, []),
|
|
4778
|
+
}, []), u = A.useCallback(function(m) {
|
|
4771
4779
|
var g = m;
|
|
4772
4780
|
if (!(!lt.length || lt[lt.length - 1] !== a)) {
|
|
4773
4781
|
var b = "deltaY" in g ? lo(g) : Yt(g), y = t.current.filter(function(L) {
|
|
@@ -4784,7 +4792,7 @@ function cu(e) {
|
|
|
4784
4792
|
P && g.cancelable && g.preventDefault();
|
|
4785
4793
|
}
|
|
4786
4794
|
}
|
|
4787
|
-
}, []),
|
|
4795
|
+
}, []), d = A.useCallback(function(m, g, b, y) {
|
|
4788
4796
|
var w = { name: m, delta: g, target: b, should: y, shadowParent: lu(b) };
|
|
4789
4797
|
t.current.push(w), setTimeout(function() {
|
|
4790
4798
|
t.current = t.current.filter(function(P) {
|
|
@@ -4794,19 +4802,19 @@ function cu(e) {
|
|
|
4794
4802
|
}, []), f = A.useCallback(function(m) {
|
|
4795
4803
|
n.current = Yt(m), r.current = void 0;
|
|
4796
4804
|
}, []), c = A.useCallback(function(m) {
|
|
4797
|
-
|
|
4805
|
+
d(m.type, lo(m), m.target, i(m, e.lockRef.current));
|
|
4798
4806
|
}, []), v = A.useCallback(function(m) {
|
|
4799
|
-
|
|
4807
|
+
d(m.type, Yt(m), m.target, i(m, e.lockRef.current));
|
|
4800
4808
|
}, []);
|
|
4801
4809
|
A.useEffect(function() {
|
|
4802
4810
|
return lt.push(a), e.setCallbacks({
|
|
4803
4811
|
onScrollCapture: c,
|
|
4804
4812
|
onWheelCapture: c,
|
|
4805
4813
|
onTouchMoveCapture: v
|
|
4806
|
-
}), document.addEventListener("wheel",
|
|
4814
|
+
}), document.addEventListener("wheel", u, ct), document.addEventListener("touchmove", u, ct), document.addEventListener("touchstart", f, ct), function() {
|
|
4807
4815
|
lt = lt.filter(function(m) {
|
|
4808
4816
|
return m !== a;
|
|
4809
|
-
}), document.removeEventListener("wheel",
|
|
4817
|
+
}), document.removeEventListener("wheel", u, ct), document.removeEventListener("touchmove", u, ct), document.removeEventListener("touchstart", f, ct);
|
|
4810
4818
|
};
|
|
4811
4819
|
}, []);
|
|
4812
4820
|
var p = e.removeScrollBar, h = e.inert;
|
|
@@ -4846,12 +4854,12 @@ var uu = function(e) {
|
|
|
4846
4854
|
}, fu = function(e, t, n, r) {
|
|
4847
4855
|
var o = Au(t, Array.isArray(e) ? e : [e]);
|
|
4848
4856
|
Vt[n] || (Vt[n] = /* @__PURE__ */ new WeakMap());
|
|
4849
|
-
var a = Vt[n], s = [], i = /* @__PURE__ */ new Set(),
|
|
4850
|
-
!c || i.has(c) || (i.add(c),
|
|
4857
|
+
var a = Vt[n], s = [], i = /* @__PURE__ */ new Set(), u = new Set(o), d = function(c) {
|
|
4858
|
+
!c || i.has(c) || (i.add(c), d(c.parentNode));
|
|
4851
4859
|
};
|
|
4852
|
-
o.forEach(
|
|
4860
|
+
o.forEach(d);
|
|
4853
4861
|
var f = function(c) {
|
|
4854
|
-
!c ||
|
|
4862
|
+
!c || u.has(c) || Array.prototype.forEach.call(c.children, function(v) {
|
|
4855
4863
|
if (i.has(v))
|
|
4856
4864
|
f(v);
|
|
4857
4865
|
else
|
|
@@ -4883,7 +4891,7 @@ var uu = function(e) {
|
|
|
4883
4891
|
defaultOpen: o,
|
|
4884
4892
|
onOpenChange: a,
|
|
4885
4893
|
modal: s = !0
|
|
4886
|
-
} = e, i = A.useRef(null),
|
|
4894
|
+
} = e, i = A.useRef(null), u = A.useRef(null), [d, f] = Nt({
|
|
4887
4895
|
prop: r,
|
|
4888
4896
|
defaultProp: o ?? !1,
|
|
4889
4897
|
onChange: a,
|
|
@@ -4894,11 +4902,11 @@ var uu = function(e) {
|
|
|
4894
4902
|
{
|
|
4895
4903
|
scope: t,
|
|
4896
4904
|
triggerRef: i,
|
|
4897
|
-
contentRef:
|
|
4905
|
+
contentRef: u,
|
|
4898
4906
|
contentId: Ce(),
|
|
4899
4907
|
titleId: Ce(),
|
|
4900
4908
|
descriptionId: Ce(),
|
|
4901
|
-
open:
|
|
4909
|
+
open: d,
|
|
4902
4910
|
onOpenChange: f,
|
|
4903
4911
|
onOpenToggle: A.useCallback(() => f((c) => !c), [f]),
|
|
4904
4912
|
modal: s,
|
|
@@ -5007,17 +5015,17 @@ var bu = A.forwardRef(
|
|
|
5007
5015
|
(s = e.onCloseAutoFocus) == null || s.call(e, a), a.defaultPrevented || (r.current || (i = n.triggerRef.current) == null || i.focus(), a.preventDefault()), r.current = !1, o.current = !1;
|
|
5008
5016
|
},
|
|
5009
5017
|
onInteractOutside: (a) => {
|
|
5010
|
-
var
|
|
5011
|
-
(
|
|
5018
|
+
var u, d;
|
|
5019
|
+
(u = e.onInteractOutside) == null || u.call(e, a), a.defaultPrevented || (r.current = !0, a.detail.originalEvent.type === "pointerdown" && (o.current = !0));
|
|
5012
5020
|
const s = a.target;
|
|
5013
|
-
((
|
|
5021
|
+
((d = n.triggerRef.current) == null ? void 0 : d.contains(s)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && o.current && a.preventDefault();
|
|
5014
5022
|
}
|
|
5015
5023
|
}
|
|
5016
5024
|
);
|
|
5017
5025
|
}
|
|
5018
5026
|
), ma = A.forwardRef(
|
|
5019
5027
|
(e, t) => {
|
|
5020
|
-
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...s } = e, i = Le(_e, n),
|
|
5028
|
+
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...s } = e, i = Le(_e, n), u = A.useRef(null), d = se(t, u);
|
|
5021
5029
|
return _o(), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
5022
5030
|
/* @__PURE__ */ l.jsx(
|
|
5023
5031
|
ar,
|
|
@@ -5036,7 +5044,7 @@ var bu = A.forwardRef(
|
|
|
5036
5044
|
"aria-labelledby": i.titleId,
|
|
5037
5045
|
"data-state": dr(i.open),
|
|
5038
5046
|
...s,
|
|
5039
|
-
ref:
|
|
5047
|
+
ref: d,
|
|
5040
5048
|
onDismiss: () => i.onOpenChange(!1)
|
|
5041
5049
|
}
|
|
5042
5050
|
)
|
|
@@ -5044,7 +5052,7 @@ var bu = A.forwardRef(
|
|
|
5044
5052
|
),
|
|
5045
5053
|
/* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
5046
5054
|
/* @__PURE__ */ l.jsx(xu, { titleId: i.titleId }),
|
|
5047
|
-
/* @__PURE__ */ l.jsx(wu, { contentRef:
|
|
5055
|
+
/* @__PURE__ */ l.jsx(wu, { contentRef: u, descriptionId: i.descriptionId })
|
|
5048
5056
|
] })
|
|
5049
5057
|
] });
|
|
5050
5058
|
}
|
|
@@ -5315,9 +5323,9 @@ function fo(e, t, n) {
|
|
|
5315
5323
|
reference: r,
|
|
5316
5324
|
floating: o
|
|
5317
5325
|
} = e;
|
|
5318
|
-
const a = Ne(t), s = fr(t), i = Ar(s),
|
|
5326
|
+
const a = Ne(t), s = fr(t), i = Ar(s), u = ze(t), d = a === "y", f = r.x + r.width / 2 - o.width / 2, c = r.y + r.height / 2 - o.height / 2, v = r[i] / 2 - o[i] / 2;
|
|
5319
5327
|
let p;
|
|
5320
|
-
switch (
|
|
5328
|
+
switch (u) {
|
|
5321
5329
|
case "top":
|
|
5322
5330
|
p = {
|
|
5323
5331
|
x: f,
|
|
@@ -5350,10 +5358,10 @@ function fo(e, t, n) {
|
|
|
5350
5358
|
}
|
|
5351
5359
|
switch (bt(t)) {
|
|
5352
5360
|
case "start":
|
|
5353
|
-
p[s] -= v * (n &&
|
|
5361
|
+
p[s] -= v * (n && d ? -1 : 1);
|
|
5354
5362
|
break;
|
|
5355
5363
|
case "end":
|
|
5356
|
-
p[s] += v * (n &&
|
|
5364
|
+
p[s] += v * (n && d ? -1 : 1);
|
|
5357
5365
|
break;
|
|
5358
5366
|
}
|
|
5359
5367
|
return p;
|
|
@@ -5364,15 +5372,15 @@ const Ou = async (e, t, n) => {
|
|
|
5364
5372
|
strategy: o = "absolute",
|
|
5365
5373
|
middleware: a = [],
|
|
5366
5374
|
platform: s
|
|
5367
|
-
} = n, i = a.filter(Boolean),
|
|
5368
|
-
let
|
|
5375
|
+
} = n, i = a.filter(Boolean), u = await (s.isRTL == null ? void 0 : s.isRTL(t));
|
|
5376
|
+
let d = await s.getElementRects({
|
|
5369
5377
|
reference: e,
|
|
5370
5378
|
floating: t,
|
|
5371
5379
|
strategy: o
|
|
5372
5380
|
}), {
|
|
5373
5381
|
x: f,
|
|
5374
5382
|
y: c
|
|
5375
|
-
} = fo(
|
|
5383
|
+
} = fo(d, r, u), v = r, p = {}, h = 0;
|
|
5376
5384
|
for (let m = 0; m < i.length; m++) {
|
|
5377
5385
|
const {
|
|
5378
5386
|
name: g,
|
|
@@ -5389,7 +5397,7 @@ const Ou = async (e, t, n) => {
|
|
|
5389
5397
|
placement: v,
|
|
5390
5398
|
strategy: o,
|
|
5391
5399
|
middlewareData: p,
|
|
5392
|
-
rects:
|
|
5400
|
+
rects: d,
|
|
5393
5401
|
platform: s,
|
|
5394
5402
|
elements: {
|
|
5395
5403
|
reference: e,
|
|
@@ -5402,14 +5410,14 @@ const Ou = async (e, t, n) => {
|
|
|
5402
5410
|
...p[g],
|
|
5403
5411
|
...P
|
|
5404
5412
|
}
|
|
5405
|
-
}, L && h <= 50 && (h++, typeof L == "object" && (L.placement && (v = L.placement), L.rects && (
|
|
5413
|
+
}, L && h <= 50 && (h++, typeof L == "object" && (L.placement && (v = L.placement), L.rects && (d = L.rects === !0 ? await s.getElementRects({
|
|
5406
5414
|
reference: e,
|
|
5407
5415
|
floating: t,
|
|
5408
5416
|
strategy: o
|
|
5409
5417
|
}) : L.rects), {
|
|
5410
5418
|
x: f,
|
|
5411
5419
|
y: c
|
|
5412
|
-
} = fo(
|
|
5420
|
+
} = fo(d, v, u)), m = -1);
|
|
5413
5421
|
}
|
|
5414
5422
|
return {
|
|
5415
5423
|
x: f,
|
|
@@ -5428,18 +5436,18 @@ async function Et(e, t) {
|
|
|
5428
5436
|
platform: a,
|
|
5429
5437
|
rects: s,
|
|
5430
5438
|
elements: i,
|
|
5431
|
-
strategy:
|
|
5439
|
+
strategy: u
|
|
5432
5440
|
} = e, {
|
|
5433
|
-
boundary:
|
|
5441
|
+
boundary: d = "clippingAncestors",
|
|
5434
5442
|
rootBoundary: f = "viewport",
|
|
5435
5443
|
elementContext: c = "floating",
|
|
5436
5444
|
altBoundary: v = !1,
|
|
5437
5445
|
padding: p = 0
|
|
5438
5446
|
} = Oe(t, e), h = Xa(p), g = i[v ? c === "floating" ? "reference" : "floating" : c], b = rn(await a.getClippingRect({
|
|
5439
5447
|
element: (n = await (a.isElement == null ? void 0 : a.isElement(g))) == null || n ? g : g.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(i.floating)),
|
|
5440
|
-
boundary:
|
|
5448
|
+
boundary: d,
|
|
5441
5449
|
rootBoundary: f,
|
|
5442
|
-
strategy:
|
|
5450
|
+
strategy: u
|
|
5443
5451
|
})), y = c === "floating" ? {
|
|
5444
5452
|
x: r,
|
|
5445
5453
|
y: o,
|
|
@@ -5455,7 +5463,7 @@ async function Et(e, t) {
|
|
|
5455
5463
|
elements: i,
|
|
5456
5464
|
rect: y,
|
|
5457
5465
|
offsetParent: w,
|
|
5458
|
-
strategy:
|
|
5466
|
+
strategy: u
|
|
5459
5467
|
}) : y);
|
|
5460
5468
|
return {
|
|
5461
5469
|
top: (b.top - L.top + h.top) / P.y,
|
|
@@ -5475,20 +5483,20 @@ const zu = (e) => ({
|
|
|
5475
5483
|
rects: a,
|
|
5476
5484
|
platform: s,
|
|
5477
5485
|
elements: i,
|
|
5478
|
-
middlewareData:
|
|
5486
|
+
middlewareData: u
|
|
5479
5487
|
} = t, {
|
|
5480
|
-
element:
|
|
5488
|
+
element: d,
|
|
5481
5489
|
padding: f = 0
|
|
5482
5490
|
} = Oe(e, t) || {};
|
|
5483
|
-
if (
|
|
5491
|
+
if (d == null)
|
|
5484
5492
|
return {};
|
|
5485
5493
|
const c = Xa(f), v = {
|
|
5486
5494
|
x: n,
|
|
5487
5495
|
y: r
|
|
5488
|
-
}, p = fr(o), h = Ar(p), m = await s.getDimensions(
|
|
5496
|
+
}, p = fr(o), h = Ar(p), m = await s.getDimensions(d), g = p === "y", b = g ? "top" : "left", y = g ? "bottom" : "right", w = g ? "clientHeight" : "clientWidth", P = a.reference[h] + a.reference[p] - v[p] - a.floating[h], L = v[p] - a.reference[p], N = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(d));
|
|
5489
5497
|
let j = N ? N[w] : 0;
|
|
5490
5498
|
(!j || !await (s.isElement == null ? void 0 : s.isElement(N))) && (j = i.floating[w] || a.floating[h]);
|
|
5491
|
-
const E = P / 2 - L / 2, W = j / 2 - m[h] / 2 - 1, Y = Je(c[b], W), $ = Je(c[y], W), Q = Y, U = j - m[h] - $, V = j / 2 - m[h] / 2 + E, _ = qn(Q, V, U), S = !
|
|
5499
|
+
const E = P / 2 - L / 2, W = j / 2 - m[h] / 2 - 1, Y = Je(c[b], W), $ = Je(c[y], W), Q = Y, U = j - m[h] - $, V = j / 2 - m[h] / 2 + E, _ = qn(Q, V, U), S = !u.arrow && bt(o) != null && V !== _ && a.reference[h] / 2 - (V < Q ? Y : $) - m[h] / 2 < 0, C = S ? V < Q ? V - Q : V - U : 0;
|
|
5492
5500
|
return {
|
|
5493
5501
|
[p]: v[p] + C,
|
|
5494
5502
|
data: {
|
|
@@ -5512,8 +5520,8 @@ const zu = (e) => ({
|
|
|
5512
5520
|
middlewareData: a,
|
|
5513
5521
|
rects: s,
|
|
5514
5522
|
initialPlacement: i,
|
|
5515
|
-
platform:
|
|
5516
|
-
elements:
|
|
5523
|
+
platform: u,
|
|
5524
|
+
elements: d
|
|
5517
5525
|
} = t, {
|
|
5518
5526
|
mainAxis: f = !0,
|
|
5519
5527
|
crossAxis: c = !0,
|
|
@@ -5525,7 +5533,7 @@ const zu = (e) => ({
|
|
|
5525
5533
|
} = Oe(e, t);
|
|
5526
5534
|
if ((n = a.arrow) != null && n.alignmentOffset)
|
|
5527
5535
|
return {};
|
|
5528
|
-
const b = ze(o), y = Ne(i), w = ze(i) === i, P = await (
|
|
5536
|
+
const b = ze(o), y = Ne(i), w = ze(i) === i, P = await (u.isRTL == null ? void 0 : u.isRTL(d.floating)), L = v || (w || !m ? [nn(i)] : Xu(i)), N = h !== "none";
|
|
5529
5537
|
!v && N && L.push(...Mu(i, m, h, P));
|
|
5530
5538
|
const j = [i, ...L], E = await Et(t, g), W = [];
|
|
5531
5539
|
let Y = ((r = a.flip) == null ? void 0 : r.overflows) || [];
|
|
@@ -5641,7 +5649,7 @@ async function Fu(e, t) {
|
|
|
5641
5649
|
placement: n,
|
|
5642
5650
|
platform: r,
|
|
5643
5651
|
elements: o
|
|
5644
|
-
} = e, a = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = ze(n), i = bt(n),
|
|
5652
|
+
} = e, a = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = ze(n), i = bt(n), u = Ne(n) === "y", d = ["left", "top"].includes(s) ? -1 : 1, f = a && u ? -1 : 1, c = Oe(t, e);
|
|
5645
5653
|
let {
|
|
5646
5654
|
mainAxis: v,
|
|
5647
5655
|
crossAxis: p,
|
|
@@ -5655,11 +5663,11 @@ async function Fu(e, t) {
|
|
|
5655
5663
|
crossAxis: c.crossAxis || 0,
|
|
5656
5664
|
alignmentAxis: c.alignmentAxis
|
|
5657
5665
|
};
|
|
5658
|
-
return i && typeof h == "number" && (p = i === "end" ? h * -1 : h),
|
|
5666
|
+
return i && typeof h == "number" && (p = i === "end" ? h * -1 : h), u ? {
|
|
5659
5667
|
x: p * f,
|
|
5660
|
-
y: v *
|
|
5668
|
+
y: v * d
|
|
5661
5669
|
} : {
|
|
5662
|
-
x: v *
|
|
5670
|
+
x: v * d,
|
|
5663
5671
|
y: p * f
|
|
5664
5672
|
};
|
|
5665
5673
|
}
|
|
@@ -5674,12 +5682,12 @@ const Zu = function(e) {
|
|
|
5674
5682
|
y: a,
|
|
5675
5683
|
placement: s,
|
|
5676
5684
|
middlewareData: i
|
|
5677
|
-
} = t,
|
|
5685
|
+
} = t, u = await Fu(t, e);
|
|
5678
5686
|
return s === ((n = i.offset) == null ? void 0 : n.placement) && (r = i.arrow) != null && r.alignmentOffset ? {} : {
|
|
5679
|
-
x: o +
|
|
5680
|
-
y: a +
|
|
5687
|
+
x: o + u.x,
|
|
5688
|
+
y: a + u.y,
|
|
5681
5689
|
data: {
|
|
5682
|
-
...
|
|
5690
|
+
...u,
|
|
5683
5691
|
placement: s
|
|
5684
5692
|
}
|
|
5685
5693
|
};
|
|
@@ -5709,12 +5717,12 @@ const Zu = function(e) {
|
|
|
5709
5717
|
};
|
|
5710
5718
|
}
|
|
5711
5719
|
},
|
|
5712
|
-
...
|
|
5713
|
-
} = Oe(e, t),
|
|
5720
|
+
...u
|
|
5721
|
+
} = Oe(e, t), d = {
|
|
5714
5722
|
x: n,
|
|
5715
5723
|
y: r
|
|
5716
|
-
}, f = await Et(t,
|
|
5717
|
-
let p =
|
|
5724
|
+
}, f = await Et(t, u), c = Ne(ze(o)), v = ur(c);
|
|
5725
|
+
let p = d[v], h = d[c];
|
|
5718
5726
|
if (a) {
|
|
5719
5727
|
const g = v === "y" ? "top" : "left", b = v === "y" ? "bottom" : "right", y = p + f[g], w = p - f[b];
|
|
5720
5728
|
p = qn(y, p, w);
|
|
@@ -5753,8 +5761,8 @@ const Zu = function(e) {
|
|
|
5753
5761
|
middlewareData: s
|
|
5754
5762
|
} = t, {
|
|
5755
5763
|
offset: i = 0,
|
|
5756
|
-
mainAxis:
|
|
5757
|
-
crossAxis:
|
|
5764
|
+
mainAxis: u = !0,
|
|
5765
|
+
crossAxis: d = !0
|
|
5758
5766
|
} = Oe(e, t), f = {
|
|
5759
5767
|
x: n,
|
|
5760
5768
|
y: r
|
|
@@ -5768,11 +5776,11 @@ const Zu = function(e) {
|
|
|
5768
5776
|
crossAxis: 0,
|
|
5769
5777
|
...m
|
|
5770
5778
|
};
|
|
5771
|
-
if (
|
|
5779
|
+
if (u) {
|
|
5772
5780
|
const w = v === "y" ? "height" : "width", P = a.reference[v] - a.floating[w] + g.mainAxis, L = a.reference[v] + a.reference[w] - g.mainAxis;
|
|
5773
5781
|
p < P ? p = P : p > L && (p = L);
|
|
5774
5782
|
}
|
|
5775
|
-
if (
|
|
5783
|
+
if (d) {
|
|
5776
5784
|
var b, y;
|
|
5777
5785
|
const w = v === "y" ? "width" : "height", P = ["top", "left"].includes(ze(o)), L = a.reference[c] - a.floating[w] + (P && ((b = s.offset) == null ? void 0 : b[c]) || 0) + (P ? 0 : g.crossAxis), N = a.reference[c] + a.reference[w] + (P ? 0 : ((y = s.offset) == null ? void 0 : y[c]) || 0) - (P ? g.crossAxis : 0);
|
|
5778
5786
|
h < L ? h = L : h > N && (h = N);
|
|
@@ -5795,10 +5803,10 @@ const Zu = function(e) {
|
|
|
5795
5803
|
platform: s,
|
|
5796
5804
|
elements: i
|
|
5797
5805
|
} = t, {
|
|
5798
|
-
apply:
|
|
5806
|
+
apply: u = () => {
|
|
5799
5807
|
},
|
|
5800
|
-
...
|
|
5801
|
-
} = Oe(e, t), f = await Et(t,
|
|
5808
|
+
...d
|
|
5809
|
+
} = Oe(e, t), f = await Et(t, d), c = ze(o), v = bt(o), p = Ne(o) === "y", {
|
|
5802
5810
|
width: h,
|
|
5803
5811
|
height: m
|
|
5804
5812
|
} = a.floating;
|
|
@@ -5810,7 +5818,7 @@ const Zu = function(e) {
|
|
|
5810
5818
|
const Y = be(f.left, 0), $ = be(f.right, 0), Q = be(f.top, 0), U = be(f.bottom, 0);
|
|
5811
5819
|
p ? E = h - 2 * (Y !== 0 || $ !== 0 ? Y + $ : be(f.left, f.right)) : j = m - 2 * (Q !== 0 || U !== 0 ? Q + U : be(f.top, f.bottom));
|
|
5812
5820
|
}
|
|
5813
|
-
await
|
|
5821
|
+
await u({
|
|
5814
5822
|
...t,
|
|
5815
5823
|
availableWidth: E,
|
|
5816
5824
|
availableHeight: j
|
|
@@ -5978,20 +5986,20 @@ function $e(e, t, n, r) {
|
|
|
5978
5986
|
let s = De(1);
|
|
5979
5987
|
t && (r ? Ee(r) && (s = At(r)) : s = At(e));
|
|
5980
5988
|
const i = Ku(a, n, r) ? Oa(a) : De(0);
|
|
5981
|
-
let
|
|
5989
|
+
let u = (o.left + i.x) / s.x, d = (o.top + i.y) / s.y, f = o.width / s.x, c = o.height / s.y;
|
|
5982
5990
|
if (a) {
|
|
5983
5991
|
const v = ge(a), p = r && Ee(r) ? ge(r) : r;
|
|
5984
5992
|
let h = v, m = Qn(h);
|
|
5985
5993
|
for (; m && r && p !== h; ) {
|
|
5986
5994
|
const g = At(m), b = m.getBoundingClientRect(), y = Ie(m), w = b.left + (m.clientLeft + parseFloat(y.paddingLeft)) * g.x, P = b.top + (m.clientTop + parseFloat(y.paddingTop)) * g.y;
|
|
5987
|
-
|
|
5995
|
+
u *= g.x, d *= g.y, f *= g.x, c *= g.y, u += w, d += P, h = ge(m), m = Qn(h);
|
|
5988
5996
|
}
|
|
5989
5997
|
}
|
|
5990
5998
|
return rn({
|
|
5991
5999
|
width: f,
|
|
5992
6000
|
height: c,
|
|
5993
|
-
x:
|
|
5994
|
-
y:
|
|
6001
|
+
x: u,
|
|
6002
|
+
y: d
|
|
5995
6003
|
});
|
|
5996
6004
|
}
|
|
5997
6005
|
function hr(e, t) {
|
|
@@ -6019,21 +6027,21 @@ function Qu(e) {
|
|
|
6019
6027
|
const a = o === "fixed", s = Xe(r), i = t ? pn(t.floating) : !1;
|
|
6020
6028
|
if (r === s || i && a)
|
|
6021
6029
|
return n;
|
|
6022
|
-
let
|
|
6030
|
+
let u = {
|
|
6023
6031
|
scrollLeft: 0,
|
|
6024
6032
|
scrollTop: 0
|
|
6025
|
-
},
|
|
6033
|
+
}, d = De(1);
|
|
6026
6034
|
const f = De(0), c = Te(r);
|
|
6027
|
-
if ((c || !c && !a) && ((gt(r) !== "body" || Dt(s)) && (
|
|
6035
|
+
if ((c || !c && !a) && ((gt(r) !== "body" || Dt(s)) && (u = mn(r)), Te(r))) {
|
|
6028
6036
|
const p = $e(r);
|
|
6029
|
-
|
|
6037
|
+
d = At(r), f.x = p.x + r.clientLeft, f.y = p.y + r.clientTop;
|
|
6030
6038
|
}
|
|
6031
|
-
const v = s && !c && !a ? za(s,
|
|
6039
|
+
const v = s && !c && !a ? za(s, u, !0) : De(0);
|
|
6032
6040
|
return {
|
|
6033
|
-
width: n.width *
|
|
6034
|
-
height: n.height *
|
|
6035
|
-
x: n.x *
|
|
6036
|
-
y: n.y *
|
|
6041
|
+
width: n.width * d.x,
|
|
6042
|
+
height: n.height * d.y,
|
|
6043
|
+
x: n.x * d.x - u.scrollLeft * d.x + f.x + v.x,
|
|
6044
|
+
y: n.y * d.y - u.scrollTop * d.y + f.y + v.y
|
|
6037
6045
|
};
|
|
6038
6046
|
}
|
|
6039
6047
|
function _u(e) {
|
|
@@ -6052,26 +6060,26 @@ function $u(e) {
|
|
|
6052
6060
|
}
|
|
6053
6061
|
function eA(e, t) {
|
|
6054
6062
|
const n = ge(e), r = Xe(e), o = n.visualViewport;
|
|
6055
|
-
let a = r.clientWidth, s = r.clientHeight, i = 0,
|
|
6063
|
+
let a = r.clientWidth, s = r.clientHeight, i = 0, u = 0;
|
|
6056
6064
|
if (o) {
|
|
6057
6065
|
a = o.width, s = o.height;
|
|
6058
|
-
const
|
|
6059
|
-
(!
|
|
6066
|
+
const d = pr();
|
|
6067
|
+
(!d || d && t === "fixed") && (i = o.offsetLeft, u = o.offsetTop);
|
|
6060
6068
|
}
|
|
6061
6069
|
return {
|
|
6062
6070
|
width: a,
|
|
6063
6071
|
height: s,
|
|
6064
6072
|
x: i,
|
|
6065
|
-
y:
|
|
6073
|
+
y: u
|
|
6066
6074
|
};
|
|
6067
6075
|
}
|
|
6068
6076
|
function tA(e, t) {
|
|
6069
|
-
const n = $e(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, a = Te(e) ? At(e) : De(1), s = e.clientWidth * a.x, i = e.clientHeight * a.y,
|
|
6077
|
+
const n = $e(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, a = Te(e) ? At(e) : De(1), s = e.clientWidth * a.x, i = e.clientHeight * a.y, u = o * a.x, d = r * a.y;
|
|
6070
6078
|
return {
|
|
6071
6079
|
width: s,
|
|
6072
6080
|
height: i,
|
|
6073
|
-
x:
|
|
6074
|
-
y:
|
|
6081
|
+
x: u,
|
|
6082
|
+
y: d
|
|
6075
6083
|
};
|
|
6076
6084
|
}
|
|
6077
6085
|
function ho(e, t, n) {
|
|
@@ -6105,8 +6113,8 @@ function nA(e, t) {
|
|
|
6105
6113
|
const a = Ie(e).position === "fixed";
|
|
6106
6114
|
let s = a ? Ye(e) : e;
|
|
6107
6115
|
for (; Ee(s) && !vt(s); ) {
|
|
6108
|
-
const i = Ie(s),
|
|
6109
|
-
!
|
|
6116
|
+
const i = Ie(s), u = vr(s);
|
|
6117
|
+
!u && i.position === "fixed" && (o = null), (a ? !u && !o : !u && i.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || Dt(s) && !u && Ga(e, s)) ? r = r.filter((f) => f !== s) : o = i, s = Ye(s);
|
|
6110
6118
|
}
|
|
6111
6119
|
return t.set(e, r), r;
|
|
6112
6120
|
}
|
|
@@ -6117,15 +6125,15 @@ function rA(e) {
|
|
|
6117
6125
|
rootBoundary: r,
|
|
6118
6126
|
strategy: o
|
|
6119
6127
|
} = e;
|
|
6120
|
-
const s = [...n === "clippingAncestors" ? pn(t) ? [] : nA(t, this._c) : [].concat(n), r], i = s[0],
|
|
6128
|
+
const s = [...n === "clippingAncestors" ? pn(t) ? [] : nA(t, this._c) : [].concat(n), r], i = s[0], u = s.reduce((d, f) => {
|
|
6121
6129
|
const c = ho(t, f, o);
|
|
6122
|
-
return
|
|
6130
|
+
return d.top = be(c.top, d.top), d.right = Je(c.right, d.right), d.bottom = Je(c.bottom, d.bottom), d.left = be(c.left, d.left), d;
|
|
6123
6131
|
}, ho(t, i, o));
|
|
6124
6132
|
return {
|
|
6125
|
-
width:
|
|
6126
|
-
height:
|
|
6127
|
-
x:
|
|
6128
|
-
y:
|
|
6133
|
+
width: u.right - u.left,
|
|
6134
|
+
height: u.bottom - u.top,
|
|
6135
|
+
x: u.left,
|
|
6136
|
+
y: u.top
|
|
6129
6137
|
};
|
|
6130
6138
|
}
|
|
6131
6139
|
function oA(e) {
|
|
@@ -6144,17 +6152,17 @@ function aA(e, t, n) {
|
|
|
6144
6152
|
scrollLeft: 0,
|
|
6145
6153
|
scrollTop: 0
|
|
6146
6154
|
};
|
|
6147
|
-
const
|
|
6148
|
-
function
|
|
6149
|
-
|
|
6155
|
+
const u = De(0);
|
|
6156
|
+
function d() {
|
|
6157
|
+
u.x = hr(o);
|
|
6150
6158
|
}
|
|
6151
6159
|
if (r || !r && !a)
|
|
6152
6160
|
if ((gt(t) !== "body" || Dt(o)) && (i = mn(t)), r) {
|
|
6153
6161
|
const p = $e(t, !0, a, t);
|
|
6154
|
-
|
|
6155
|
-
} else o &&
|
|
6156
|
-
a && !r && o &&
|
|
6157
|
-
const f = o && !r && !a ? za(o, i) : De(0), c = s.left + i.scrollLeft -
|
|
6162
|
+
u.x = p.x + t.clientLeft, u.y = p.y + t.clientTop;
|
|
6163
|
+
} else o && d();
|
|
6164
|
+
a && !r && o && d();
|
|
6165
|
+
const f = o && !r && !a ? za(o, i) : De(0), c = s.left + i.scrollLeft - u.x - f.x, v = s.top + i.scrollTop - u.y - f.y;
|
|
6158
6166
|
return {
|
|
6159
6167
|
x: c,
|
|
6160
6168
|
y: v,
|
|
@@ -6228,31 +6236,31 @@ function lA(e, t) {
|
|
|
6228
6236
|
var i;
|
|
6229
6237
|
clearTimeout(r), (i = n) == null || i.disconnect(), n = null;
|
|
6230
6238
|
}
|
|
6231
|
-
function s(i,
|
|
6232
|
-
i === void 0 && (i = !1),
|
|
6233
|
-
const
|
|
6239
|
+
function s(i, u) {
|
|
6240
|
+
i === void 0 && (i = !1), u === void 0 && (u = 1), a();
|
|
6241
|
+
const d = e.getBoundingClientRect(), {
|
|
6234
6242
|
left: f,
|
|
6235
6243
|
top: c,
|
|
6236
6244
|
width: v,
|
|
6237
6245
|
height: p
|
|
6238
|
-
} =
|
|
6246
|
+
} = d;
|
|
6239
6247
|
if (i || t(), !v || !p)
|
|
6240
6248
|
return;
|
|
6241
6249
|
const h = qt(c), m = qt(o.clientWidth - (f + v)), g = qt(o.clientHeight - (c + p)), b = qt(f), w = {
|
|
6242
6250
|
rootMargin: -h + "px " + -m + "px " + -g + "px " + -b + "px",
|
|
6243
|
-
threshold: be(0, Je(1,
|
|
6251
|
+
threshold: be(0, Je(1, u)) || 1
|
|
6244
6252
|
};
|
|
6245
6253
|
let P = !0;
|
|
6246
6254
|
function L(N) {
|
|
6247
6255
|
const j = N[0].intersectionRatio;
|
|
6248
|
-
if (j !==
|
|
6256
|
+
if (j !== u) {
|
|
6249
6257
|
if (!P)
|
|
6250
6258
|
return s();
|
|
6251
6259
|
j ? s(!1, j) : r = setTimeout(() => {
|
|
6252
6260
|
s(!1, 1e-7);
|
|
6253
6261
|
}, 1e3);
|
|
6254
6262
|
}
|
|
6255
|
-
j === 1 && !Fa(
|
|
6263
|
+
j === 1 && !Fa(d, e.getBoundingClientRect()) && s(), P = !1;
|
|
6256
6264
|
}
|
|
6257
6265
|
try {
|
|
6258
6266
|
n = new IntersectionObserver(L, {
|
|
@@ -6274,24 +6282,24 @@ function dA(e, t, n, r) {
|
|
|
6274
6282
|
ancestorResize: a = !0,
|
|
6275
6283
|
elementResize: s = typeof ResizeObserver == "function",
|
|
6276
6284
|
layoutShift: i = typeof IntersectionObserver == "function",
|
|
6277
|
-
animationFrame:
|
|
6278
|
-
} = r,
|
|
6285
|
+
animationFrame: u = !1
|
|
6286
|
+
} = r, d = mr(e), f = o || a ? [...d ? It(d) : [], ...It(t)] : [];
|
|
6279
6287
|
f.forEach((b) => {
|
|
6280
6288
|
o && b.addEventListener("scroll", n, {
|
|
6281
6289
|
passive: !0
|
|
6282
6290
|
}), a && b.addEventListener("resize", n);
|
|
6283
6291
|
});
|
|
6284
|
-
const c =
|
|
6292
|
+
const c = d && i ? lA(d, n) : null;
|
|
6285
6293
|
let v = -1, p = null;
|
|
6286
6294
|
s && (p = new ResizeObserver((b) => {
|
|
6287
6295
|
let [y] = b;
|
|
6288
|
-
y && y.target ===
|
|
6296
|
+
y && y.target === d && p && (p.unobserve(t), cancelAnimationFrame(v), v = requestAnimationFrame(() => {
|
|
6289
6297
|
var w;
|
|
6290
6298
|
(w = p) == null || w.observe(t);
|
|
6291
6299
|
})), n();
|
|
6292
|
-
}),
|
|
6293
|
-
let h, m =
|
|
6294
|
-
|
|
6300
|
+
}), d && !u && p.observe(d), p.observe(t));
|
|
6301
|
+
let h, m = u ? $e(e) : null;
|
|
6302
|
+
u && g();
|
|
6295
6303
|
function g() {
|
|
6296
6304
|
const b = $e(e);
|
|
6297
6305
|
m && !Fa(m, b) && n(), m = b, h = requestAnimationFrame(g);
|
|
@@ -6300,7 +6308,7 @@ function dA(e, t, n, r) {
|
|
|
6300
6308
|
var b;
|
|
6301
6309
|
f.forEach((y) => {
|
|
6302
6310
|
o && y.removeEventListener("scroll", n), a && y.removeEventListener("resize", n);
|
|
6303
|
-
}), c == null || c(), (b = p) == null || b.disconnect(), p = null,
|
|
6311
|
+
}), c == null || c(), (b = p) == null || b.disconnect(), p = null, u && cancelAnimationFrame(h);
|
|
6304
6312
|
};
|
|
6305
6313
|
}
|
|
6306
6314
|
const uA = Zu, AA = Bu, fA = Gu, vA = Yu, pA = Wu, go = zu, mA = Ju, hA = (e, t, n) => {
|
|
@@ -6373,8 +6381,8 @@ function xA(e) {
|
|
|
6373
6381
|
floating: s
|
|
6374
6382
|
} = {},
|
|
6375
6383
|
transform: i = !0,
|
|
6376
|
-
whileElementsMounted:
|
|
6377
|
-
open:
|
|
6384
|
+
whileElementsMounted: u,
|
|
6385
|
+
open: d
|
|
6378
6386
|
} = e, [f, c] = A.useState({
|
|
6379
6387
|
x: 0,
|
|
6380
6388
|
y: 0,
|
|
@@ -6388,7 +6396,7 @@ function xA(e) {
|
|
|
6388
6396
|
R !== N.current && (N.current = R, m(R));
|
|
6389
6397
|
}, []), w = A.useCallback((R) => {
|
|
6390
6398
|
R !== j.current && (j.current = R, b(R));
|
|
6391
|
-
}, []), P = a || h, L = s || g, N = A.useRef(null), j = A.useRef(null), E = A.useRef(f), W =
|
|
6399
|
+
}, []), P = a || h, L = s || g, N = A.useRef(null), j = A.useRef(null), E = A.useRef(f), W = u != null, Y = zn(u), $ = zn(o), Q = zn(d), U = A.useCallback(() => {
|
|
6392
6400
|
if (!N.current || !j.current)
|
|
6393
6401
|
return;
|
|
6394
6402
|
const R = {
|
|
@@ -6411,11 +6419,11 @@ function xA(e) {
|
|
|
6411
6419
|
});
|
|
6412
6420
|
}, [v, t, n, $, Q]);
|
|
6413
6421
|
$t(() => {
|
|
6414
|
-
|
|
6422
|
+
d === !1 && E.current.isPositioned && (E.current.isPositioned = !1, c((R) => ({
|
|
6415
6423
|
...R,
|
|
6416
6424
|
isPositioned: !1
|
|
6417
6425
|
})));
|
|
6418
|
-
}, [
|
|
6426
|
+
}, [d]);
|
|
6419
6427
|
const V = A.useRef(!1);
|
|
6420
6428
|
$t(() => (V.current = !0, () => {
|
|
6421
6429
|
V.current = !1;
|
|
@@ -6534,8 +6542,8 @@ function DA(e) {
|
|
|
6534
6542
|
const a = o[0];
|
|
6535
6543
|
let s, i;
|
|
6536
6544
|
if ("borderBoxSize" in a) {
|
|
6537
|
-
const
|
|
6538
|
-
s =
|
|
6545
|
+
const u = a.borderBoxSize, d = Array.isArray(u) ? u[0] : u;
|
|
6546
|
+
s = d.inlineSize, i = d.blockSize;
|
|
6539
6547
|
} else
|
|
6540
6548
|
s = e.offsetWidth, i = e.offsetHeight;
|
|
6541
6549
|
n({ width: s, height: i });
|
|
@@ -6569,15 +6577,15 @@ var gr = "PopperContent", [TA, XA] = Ja(gr), Ka = A.forwardRef(
|
|
|
6569
6577
|
align: a = "center",
|
|
6570
6578
|
alignOffset: s = 0,
|
|
6571
6579
|
arrowPadding: i = 0,
|
|
6572
|
-
avoidCollisions:
|
|
6573
|
-
collisionBoundary:
|
|
6580
|
+
avoidCollisions: u = !0,
|
|
6581
|
+
collisionBoundary: d = [],
|
|
6574
6582
|
collisionPadding: f = 0,
|
|
6575
6583
|
sticky: c = "partial",
|
|
6576
6584
|
hideWhenDetached: v = !1,
|
|
6577
6585
|
updatePositionStrategy: p = "optimized",
|
|
6578
6586
|
onPlaced: h,
|
|
6579
6587
|
...m
|
|
6580
|
-
} = e, g = Ya(gr, n), [b, y] = A.useState(null), w = se(t, (Ve) => y(Ve)), [P, L] = A.useState(null), N = DA(P), j = (N == null ? void 0 : N.width) ?? 0, E = (N == null ? void 0 : N.height) ?? 0, W = r + (a !== "center" ? "-" + a : ""), Y = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, $ = Array.isArray(
|
|
6588
|
+
} = e, g = Ya(gr, n), [b, y] = A.useState(null), w = se(t, (Ve) => y(Ve)), [P, L] = A.useState(null), N = DA(P), j = (N == null ? void 0 : N.width) ?? 0, E = (N == null ? void 0 : N.height) ?? 0, W = r + (a !== "center" ? "-" + a : ""), Y = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, $ = Array.isArray(d) ? d : [d], Q = $.length > 0, U = {
|
|
6581
6589
|
padding: Y,
|
|
6582
6590
|
boundary: $.filter(MA),
|
|
6583
6591
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
@@ -6594,13 +6602,13 @@ var gr = "PopperContent", [TA, XA] = Ja(gr), Ka = A.forwardRef(
|
|
|
6594
6602
|
},
|
|
6595
6603
|
middleware: [
|
|
6596
6604
|
wA({ mainAxis: o + E, alignmentAxis: s }),
|
|
6597
|
-
|
|
6605
|
+
u && PA({
|
|
6598
6606
|
mainAxis: !0,
|
|
6599
6607
|
crossAxis: !1,
|
|
6600
6608
|
limiter: c === "partial" ? RA() : void 0,
|
|
6601
6609
|
...U
|
|
6602
6610
|
}),
|
|
6603
|
-
|
|
6611
|
+
u && EA({ ...U }),
|
|
6604
6612
|
IA({
|
|
6605
6613
|
...U,
|
|
6606
6614
|
apply: ({ elements: Ve, rects: rt, availableWidth: In, availableHeight: Mt }) => {
|
|
@@ -6733,9 +6741,9 @@ var CA = (e) => ({
|
|
|
6733
6741
|
options: e,
|
|
6734
6742
|
fn(t) {
|
|
6735
6743
|
var g, b, y;
|
|
6736
|
-
const { placement: n, rects: r, middlewareData: o } = t, s = ((g = o.arrow) == null ? void 0 : g.centerOffset) !== 0, i = s ? 0 : e.arrowWidth,
|
|
6744
|
+
const { placement: n, rects: r, middlewareData: o } = t, s = ((g = o.arrow) == null ? void 0 : g.centerOffset) !== 0, i = s ? 0 : e.arrowWidth, u = s ? 0 : e.arrowHeight, [d, f] = $a(n), c = { start: "0%", center: "50%", end: "100%" }[f], v = (((b = o.arrow) == null ? void 0 : b.x) ?? 0) + i / 2, p = (((y = o.arrow) == null ? void 0 : y.y) ?? 0) + u / 2;
|
|
6737
6745
|
let h = "", m = "";
|
|
6738
|
-
return
|
|
6746
|
+
return d === "bottom" ? (h = s ? c : `${v}px`, m = `${-u}px`) : d === "top" ? (h = s ? c : `${v}px`, m = `${r.floating.height + u}px`) : d === "right" ? (h = `${-u}px`, m = s ? c : `${p}px`) : d === "left" && (h = `${r.floating.width + u}px`, m = s ? c : `${p}px`), { data: { x: h, y: m } };
|
|
6739
6747
|
}
|
|
6740
6748
|
});
|
|
6741
6749
|
function $a(e) {
|
|
@@ -6774,10 +6782,10 @@ var GA = rs, [bn, Pm] = tt("Tooltip", [
|
|
|
6774
6782
|
skipDelayDuration: r = 300,
|
|
6775
6783
|
disableHoverableContent: o = !1,
|
|
6776
6784
|
children: a
|
|
6777
|
-
} = e, s = A.useRef(!0), i = A.useRef(!1),
|
|
6785
|
+
} = e, s = A.useRef(!0), i = A.useRef(!1), u = A.useRef(0);
|
|
6778
6786
|
return A.useEffect(() => {
|
|
6779
|
-
const
|
|
6780
|
-
return () => window.clearTimeout(
|
|
6787
|
+
const d = u.current;
|
|
6788
|
+
return () => window.clearTimeout(d);
|
|
6781
6789
|
}, []), /* @__PURE__ */ l.jsx(
|
|
6782
6790
|
FA,
|
|
6783
6791
|
{
|
|
@@ -6785,17 +6793,17 @@ var GA = rs, [bn, Pm] = tt("Tooltip", [
|
|
|
6785
6793
|
isOpenDelayedRef: s,
|
|
6786
6794
|
delayDuration: n,
|
|
6787
6795
|
onOpen: A.useCallback(() => {
|
|
6788
|
-
window.clearTimeout(
|
|
6796
|
+
window.clearTimeout(u.current), s.current = !1;
|
|
6789
6797
|
}, []),
|
|
6790
6798
|
onClose: A.useCallback(() => {
|
|
6791
|
-
window.clearTimeout(
|
|
6799
|
+
window.clearTimeout(u.current), u.current = window.setTimeout(
|
|
6792
6800
|
() => s.current = !0,
|
|
6793
6801
|
r
|
|
6794
6802
|
);
|
|
6795
6803
|
}, [r]),
|
|
6796
6804
|
isPointerInTransitRef: i,
|
|
6797
|
-
onPointerInTransitChange: A.useCallback((
|
|
6798
|
-
i.current =
|
|
6805
|
+
onPointerInTransitChange: A.useCallback((d) => {
|
|
6806
|
+
i.current = d;
|
|
6799
6807
|
}, []),
|
|
6800
6808
|
disableHoverableContent: o,
|
|
6801
6809
|
children: a
|
|
@@ -6812,11 +6820,11 @@ var Lt = "Tooltip", [ZA, xn] = bn(Lt), ss = (e) => {
|
|
|
6812
6820
|
onOpenChange: a,
|
|
6813
6821
|
disableHoverableContent: s,
|
|
6814
6822
|
delayDuration: i
|
|
6815
|
-
} = e,
|
|
6823
|
+
} = e, u = yr(Lt, e.__scopeTooltip), d = gn(t), [f, c] = A.useState(null), v = Ce(), p = A.useRef(0), h = s ?? u.disableHoverableContent, m = i ?? u.delayDuration, g = A.useRef(!1), [b, y] = Nt({
|
|
6816
6824
|
prop: r,
|
|
6817
6825
|
defaultProp: o ?? !1,
|
|
6818
6826
|
onChange: (j) => {
|
|
6819
|
-
j ? (
|
|
6827
|
+
j ? (u.onOpen(), document.dispatchEvent(new CustomEvent(_n))) : u.onClose(), a == null || a(j);
|
|
6820
6828
|
},
|
|
6821
6829
|
caller: Lt
|
|
6822
6830
|
}), w = A.useMemo(() => b ? g.current ? "delayed-open" : "instant-open" : "closed", [b]), P = A.useCallback(() => {
|
|
@@ -6830,7 +6838,7 @@ var Lt = "Tooltip", [ZA, xn] = bn(Lt), ss = (e) => {
|
|
|
6830
6838
|
}, [m, y]);
|
|
6831
6839
|
return A.useEffect(() => () => {
|
|
6832
6840
|
p.current && (window.clearTimeout(p.current), p.current = 0);
|
|
6833
|
-
}, []), /* @__PURE__ */ l.jsx(xr, { ...
|
|
6841
|
+
}, []), /* @__PURE__ */ l.jsx(xr, { ...d, children: /* @__PURE__ */ l.jsx(
|
|
6834
6842
|
ZA,
|
|
6835
6843
|
{
|
|
6836
6844
|
scope: t,
|
|
@@ -6840,8 +6848,8 @@ var Lt = "Tooltip", [ZA, xn] = bn(Lt), ss = (e) => {
|
|
|
6840
6848
|
trigger: f,
|
|
6841
6849
|
onTriggerChange: c,
|
|
6842
6850
|
onTriggerEnter: A.useCallback(() => {
|
|
6843
|
-
|
|
6844
|
-
}, [
|
|
6851
|
+
u.isOpenDelayedRef.current ? N() : P();
|
|
6852
|
+
}, [u.isOpenDelayedRef, N, P]),
|
|
6845
6853
|
onTriggerLeave: A.useCallback(() => {
|
|
6846
6854
|
h ? L() : (window.clearTimeout(p.current), p.current = 0);
|
|
6847
6855
|
}, [L, h]),
|
|
@@ -6855,14 +6863,14 @@ var Lt = "Tooltip", [ZA, xn] = bn(Lt), ss = (e) => {
|
|
|
6855
6863
|
ss.displayName = Lt;
|
|
6856
6864
|
var $n = "TooltipTrigger", is = A.forwardRef(
|
|
6857
6865
|
(e, t) => {
|
|
6858
|
-
const { __scopeTooltip: n, ...r } = e, o = xn($n, n), a = yr($n, n), s = gn(n), i = A.useRef(null),
|
|
6866
|
+
const { __scopeTooltip: n, ...r } = e, o = xn($n, n), a = yr($n, n), s = gn(n), i = A.useRef(null), u = se(t, i, o.onTriggerChange), d = A.useRef(!1), f = A.useRef(!1), c = A.useCallback(() => d.current = !1, []);
|
|
6859
6867
|
return A.useEffect(() => () => document.removeEventListener("pointerup", c), [c]), /* @__PURE__ */ l.jsx(es, { asChild: !0, ...s, children: /* @__PURE__ */ l.jsx(
|
|
6860
6868
|
re.button,
|
|
6861
6869
|
{
|
|
6862
6870
|
"aria-describedby": o.open ? o.contentId : void 0,
|
|
6863
6871
|
"data-state": o.stateAttribute,
|
|
6864
6872
|
...r,
|
|
6865
|
-
ref:
|
|
6873
|
+
ref: u,
|
|
6866
6874
|
onPointerMove: G(e.onPointerMove, (v) => {
|
|
6867
6875
|
v.pointerType !== "touch" && !f.current && !a.isPointerInTransitRef.current && (o.onTriggerEnter(), f.current = !0);
|
|
6868
6876
|
}),
|
|
@@ -6870,10 +6878,10 @@ var $n = "TooltipTrigger", is = A.forwardRef(
|
|
|
6870
6878
|
o.onTriggerLeave(), f.current = !1;
|
|
6871
6879
|
}),
|
|
6872
6880
|
onPointerDown: G(e.onPointerDown, () => {
|
|
6873
|
-
o.open && o.onClose(),
|
|
6881
|
+
o.open && o.onClose(), d.current = !0, document.addEventListener("pointerup", c, { once: !0 });
|
|
6874
6882
|
}),
|
|
6875
6883
|
onFocus: G(e.onFocus, () => {
|
|
6876
|
-
|
|
6884
|
+
d.current || o.onOpen();
|
|
6877
6885
|
}),
|
|
6878
6886
|
onBlur: G(e.onBlur, o.onClose),
|
|
6879
6887
|
onClick: G(e.onClick, o.onClose)
|
|
@@ -6890,7 +6898,7 @@ var BA = "TooltipPortal", [Rm, JA] = bn(BA, {
|
|
|
6890
6898
|
return /* @__PURE__ */ l.jsx(Ge, { present: r || s.open, children: s.disableHoverableContent ? /* @__PURE__ */ l.jsx(ls, { side: o, ...a, ref: t }) : /* @__PURE__ */ l.jsx(YA, { side: o, ...a, ref: t }) });
|
|
6891
6899
|
}
|
|
6892
6900
|
), YA = A.forwardRef((e, t) => {
|
|
6893
|
-
const n = xn(pt, e.__scopeTooltip), r = yr(pt, e.__scopeTooltip), o = A.useRef(null), a = se(t, o), [s, i] = A.useState(null), { trigger:
|
|
6901
|
+
const n = xn(pt, e.__scopeTooltip), r = yr(pt, e.__scopeTooltip), o = A.useRef(null), a = se(t, o), [s, i] = A.useState(null), { trigger: u, onClose: d } = n, f = o.current, { onPointerInTransitChange: c } = r, v = A.useCallback(() => {
|
|
6894
6902
|
i(null), c(!1);
|
|
6895
6903
|
}, [c]), p = A.useCallback(
|
|
6896
6904
|
(h, m) => {
|
|
@@ -6900,21 +6908,21 @@ var BA = "TooltipPortal", [Rm, JA] = bn(BA, {
|
|
|
6900
6908
|
[c]
|
|
6901
6909
|
);
|
|
6902
6910
|
return A.useEffect(() => () => v(), [v]), A.useEffect(() => {
|
|
6903
|
-
if (
|
|
6904
|
-
const h = (g) => p(g, f), m = (g) => p(g,
|
|
6905
|
-
return
|
|
6906
|
-
|
|
6911
|
+
if (u && f) {
|
|
6912
|
+
const h = (g) => p(g, f), m = (g) => p(g, u);
|
|
6913
|
+
return u.addEventListener("pointerleave", h), f.addEventListener("pointerleave", m), () => {
|
|
6914
|
+
u.removeEventListener("pointerleave", h), f.removeEventListener("pointerleave", m);
|
|
6907
6915
|
};
|
|
6908
6916
|
}
|
|
6909
|
-
}, [
|
|
6917
|
+
}, [u, f, p, v]), A.useEffect(() => {
|
|
6910
6918
|
if (s) {
|
|
6911
6919
|
const h = (m) => {
|
|
6912
|
-
const g = m.target, b = { x: m.clientX, y: m.clientY }, y = (
|
|
6913
|
-
y ? v() : w && (v(),
|
|
6920
|
+
const g = m.target, b = { x: m.clientX, y: m.clientY }, y = (u == null ? void 0 : u.contains(g)) || (f == null ? void 0 : f.contains(g)), w = !ef(b, s);
|
|
6921
|
+
y ? v() : w && (v(), d());
|
|
6914
6922
|
};
|
|
6915
6923
|
return document.addEventListener("pointermove", h), () => document.removeEventListener("pointermove", h);
|
|
6916
6924
|
}
|
|
6917
|
-
}, [
|
|
6925
|
+
}, [u, f, s, d, v]), /* @__PURE__ */ l.jsx(ls, { ...e, ref: a });
|
|
6918
6926
|
}), [UA, VA] = bn(Lt, { isInside: !1 }), qA = /* @__PURE__ */ Ci("TooltipContent"), ls = A.forwardRef(
|
|
6919
6927
|
(e, t) => {
|
|
6920
6928
|
const {
|
|
@@ -6924,16 +6932,16 @@ var BA = "TooltipPortal", [Rm, JA] = bn(BA, {
|
|
|
6924
6932
|
onEscapeKeyDown: a,
|
|
6925
6933
|
onPointerDownOutside: s,
|
|
6926
6934
|
...i
|
|
6927
|
-
} = e,
|
|
6935
|
+
} = e, u = xn(pt, n), d = gn(n), { onClose: f } = u;
|
|
6928
6936
|
return A.useEffect(() => (document.addEventListener(_n, f), () => document.removeEventListener(_n, f)), [f]), A.useEffect(() => {
|
|
6929
|
-
if (
|
|
6937
|
+
if (u.trigger) {
|
|
6930
6938
|
const c = (v) => {
|
|
6931
6939
|
const p = v.target;
|
|
6932
|
-
p != null && p.contains(
|
|
6940
|
+
p != null && p.contains(u.trigger) && f();
|
|
6933
6941
|
};
|
|
6934
6942
|
return window.addEventListener("scroll", c, { capture: !0 }), () => window.removeEventListener("scroll", c, { capture: !0 });
|
|
6935
6943
|
}
|
|
6936
|
-
}, [
|
|
6944
|
+
}, [u.trigger, f]), /* @__PURE__ */ l.jsx(
|
|
6937
6945
|
un,
|
|
6938
6946
|
{
|
|
6939
6947
|
asChild: !0,
|
|
@@ -6945,8 +6953,8 @@ var BA = "TooltipPortal", [Rm, JA] = bn(BA, {
|
|
|
6945
6953
|
children: /* @__PURE__ */ l.jsxs(
|
|
6946
6954
|
ts,
|
|
6947
6955
|
{
|
|
6948
|
-
"data-state":
|
|
6949
|
-
...
|
|
6956
|
+
"data-state": u.stateAttribute,
|
|
6957
|
+
...d,
|
|
6950
6958
|
...i,
|
|
6951
6959
|
ref: t,
|
|
6952
6960
|
style: {
|
|
@@ -6959,7 +6967,7 @@ var BA = "TooltipPortal", [Rm, JA] = bn(BA, {
|
|
|
6959
6967
|
},
|
|
6960
6968
|
children: [
|
|
6961
6969
|
/* @__PURE__ */ l.jsx(qA, { children: r }),
|
|
6962
|
-
/* @__PURE__ */ l.jsx(UA, { scope: n, isInside: !0, children: /* @__PURE__ */ l.jsx(GA, { id:
|
|
6970
|
+
/* @__PURE__ */ l.jsx(UA, { scope: n, isInside: !0, children: /* @__PURE__ */ l.jsx(GA, { id: u.contentId, role: "tooltip", children: o || r }) })
|
|
6963
6971
|
]
|
|
6964
6972
|
}
|
|
6965
6973
|
)
|
|
@@ -7036,8 +7044,8 @@ function ef(e, t) {
|
|
|
7036
7044
|
const { x: n, y: r } = e;
|
|
7037
7045
|
let o = !1;
|
|
7038
7046
|
for (let a = 0, s = t.length - 1; a < t.length; s = a++) {
|
|
7039
|
-
const i = t[a],
|
|
7040
|
-
f > r != v > r && n < (c -
|
|
7047
|
+
const i = t[a], u = t[s], d = i.x, f = i.y, c = u.x, v = u.y;
|
|
7048
|
+
f > r != v > r && n < (c - d) * (r - f) / (v - f) + d && (o = !o);
|
|
7041
7049
|
}
|
|
7042
7050
|
return o;
|
|
7043
7051
|
}
|
|
@@ -7100,13 +7108,13 @@ function ff({
|
|
|
7100
7108
|
children: a,
|
|
7101
7109
|
...s
|
|
7102
7110
|
}) {
|
|
7103
|
-
const i = td(), [
|
|
7111
|
+
const i = td(), [u, d] = A.useState(!1), [f, c] = A.useState(e), v = t ?? f, p = A.useCallback(
|
|
7104
7112
|
(b) => {
|
|
7105
7113
|
const y = typeof b == "function" ? b(v) : b;
|
|
7106
7114
|
n ? n(y) : c(y), document.cookie = `${sf}=${y}; path=/; max-age=${cf}`;
|
|
7107
7115
|
},
|
|
7108
7116
|
[n, v]
|
|
7109
|
-
), h = A.useCallback(() => i ?
|
|
7117
|
+
), h = A.useCallback(() => i ? d((b) => !b) : p((b) => !b), [i, p, d]);
|
|
7110
7118
|
A.useEffect(() => {
|
|
7111
7119
|
const b = (y) => {
|
|
7112
7120
|
y.key === Af && (y.metaKey || y.ctrlKey) && (y.preventDefault(), h());
|
|
@@ -7119,11 +7127,11 @@ function ff({
|
|
|
7119
7127
|
open: v,
|
|
7120
7128
|
setOpen: p,
|
|
7121
7129
|
isMobile: i,
|
|
7122
|
-
openMobile:
|
|
7123
|
-
setOpenMobile:
|
|
7130
|
+
openMobile: u,
|
|
7131
|
+
setOpenMobile: d,
|
|
7124
7132
|
toggleSidebar: h
|
|
7125
7133
|
}),
|
|
7126
|
-
[m, v, p, i,
|
|
7134
|
+
[m, v, p, i, u, d, h]
|
|
7127
7135
|
);
|
|
7128
7136
|
return /* @__PURE__ */ l.jsx(ps.Provider, { value: g, children: /* @__PURE__ */ l.jsx(As, { delayDuration: 0, children: /* @__PURE__ */ l.jsx(
|
|
7129
7137
|
"div",
|
|
@@ -7151,7 +7159,7 @@ function vf({
|
|
|
7151
7159
|
children: o,
|
|
7152
7160
|
...a
|
|
7153
7161
|
}) {
|
|
7154
|
-
const { isMobile: s, state: i, openMobile:
|
|
7162
|
+
const { isMobile: s, state: i, openMobile: u, setOpenMobile: d } = yn();
|
|
7155
7163
|
return n === "none" ? /* @__PURE__ */ l.jsx(
|
|
7156
7164
|
"div",
|
|
7157
7165
|
{
|
|
@@ -7163,7 +7171,7 @@ function vf({
|
|
|
7163
7171
|
...a,
|
|
7164
7172
|
children: o
|
|
7165
7173
|
}
|
|
7166
|
-
) : s ? /* @__PURE__ */ l.jsx(Iu, { open:
|
|
7174
|
+
) : s ? /* @__PURE__ */ l.jsx(Iu, { open: u, onOpenChange: d, ...a, children: /* @__PURE__ */ l.jsxs(
|
|
7167
7175
|
Na,
|
|
7168
7176
|
{
|
|
7169
7177
|
"data-sidebar": "sidebar",
|
|
@@ -7479,7 +7487,7 @@ function Sm({
|
|
|
7479
7487
|
className: a,
|
|
7480
7488
|
...s
|
|
7481
7489
|
}) {
|
|
7482
|
-
const i = e ? et : "button", { isMobile:
|
|
7490
|
+
const i = e ? et : "button", { isMobile: u, state: d } = yn(), f = /* @__PURE__ */ l.jsx(
|
|
7483
7491
|
i,
|
|
7484
7492
|
{
|
|
7485
7493
|
"data-slot": "sidebar-menu-button",
|
|
@@ -7499,7 +7507,7 @@ function Sm({
|
|
|
7499
7507
|
{
|
|
7500
7508
|
side: "right",
|
|
7501
7509
|
align: "center",
|
|
7502
|
-
hidden:
|
|
7510
|
+
hidden: d !== "collapsed" || u,
|
|
7503
7511
|
...o
|
|
7504
7512
|
}
|
|
7505
7513
|
)
|
|
@@ -7654,13 +7662,13 @@ function ms(e) {
|
|
|
7654
7662
|
return /* @__PURE__ */ l.jsx(o, { scope: g, itemMap: w, collectionRef: y, children: b });
|
|
7655
7663
|
};
|
|
7656
7664
|
s.displayName = t;
|
|
7657
|
-
const i = e + "CollectionSlot",
|
|
7665
|
+
const i = e + "CollectionSlot", u = /* @__PURE__ */ ft(i), d = I.forwardRef(
|
|
7658
7666
|
(m, g) => {
|
|
7659
7667
|
const { scope: b, children: y } = m, w = a(i, b), P = se(g, w.collectionRef);
|
|
7660
|
-
return /* @__PURE__ */ l.jsx(
|
|
7668
|
+
return /* @__PURE__ */ l.jsx(u, { ref: P, children: y });
|
|
7661
7669
|
}
|
|
7662
7670
|
);
|
|
7663
|
-
|
|
7671
|
+
d.displayName = i;
|
|
7664
7672
|
const f = e + "CollectionItemSlot", c = "data-radix-collection-item", v = /* @__PURE__ */ ft(f), p = I.forwardRef(
|
|
7665
7673
|
(m, g) => {
|
|
7666
7674
|
const { scope: b, children: y, ...w } = m, P = I.useRef(null), L = se(g, P), N = a(f, b);
|
|
@@ -7680,7 +7688,7 @@ function ms(e) {
|
|
|
7680
7688
|
}, [g.collectionRef, g.itemMap]);
|
|
7681
7689
|
}
|
|
7682
7690
|
return [
|
|
7683
|
-
{ Provider: s, Slot:
|
|
7691
|
+
{ Provider: s, Slot: d, ItemSlot: p },
|
|
7684
7692
|
h,
|
|
7685
7693
|
r
|
|
7686
7694
|
];
|
|
@@ -7705,16 +7713,16 @@ var Sf = A.forwardRef((e, t) => {
|
|
|
7705
7713
|
dir: a,
|
|
7706
7714
|
currentTabStopId: s,
|
|
7707
7715
|
defaultCurrentTabStopId: i,
|
|
7708
|
-
onCurrentTabStopIdChange:
|
|
7709
|
-
onEntryFocus:
|
|
7716
|
+
onCurrentTabStopIdChange: u,
|
|
7717
|
+
onEntryFocus: d,
|
|
7710
7718
|
preventScrollOnEntryFocus: f = !1,
|
|
7711
7719
|
...c
|
|
7712
7720
|
} = e, v = A.useRef(null), p = se(t, v), h = hs(a), [m, g] = Nt({
|
|
7713
7721
|
prop: s,
|
|
7714
7722
|
defaultProp: i ?? null,
|
|
7715
|
-
onChange:
|
|
7723
|
+
onChange: u,
|
|
7716
7724
|
caller: St
|
|
7717
|
-
}), [b, y] = A.useState(!1), w = Se(
|
|
7725
|
+
}), [b, y] = A.useState(!1), w = Se(d), P = bs(n), L = A.useRef(!1), [N, j] = A.useState(0);
|
|
7718
7726
|
return A.useEffect(() => {
|
|
7719
7727
|
const E = v.current;
|
|
7720
7728
|
if (E)
|
|
@@ -7778,7 +7786,7 @@ var Sf = A.forwardRef((e, t) => {
|
|
|
7778
7786
|
tabStopId: a,
|
|
7779
7787
|
children: s,
|
|
7780
7788
|
...i
|
|
7781
|
-
} = e,
|
|
7789
|
+
} = e, u = Ce(), d = a || u, f = Df(ys, n), c = f.currentTabStopId === d, v = bs(n), { onFocusableItemAdd: p, onFocusableItemRemove: h, currentTabStopId: m } = f;
|
|
7782
7790
|
return A.useEffect(() => {
|
|
7783
7791
|
if (r)
|
|
7784
7792
|
return p(), () => h();
|
|
@@ -7786,7 +7794,7 @@ var Sf = A.forwardRef((e, t) => {
|
|
|
7786
7794
|
er.ItemSlot,
|
|
7787
7795
|
{
|
|
7788
7796
|
scope: n,
|
|
7789
|
-
id:
|
|
7797
|
+
id: d,
|
|
7790
7798
|
focusable: r,
|
|
7791
7799
|
active: o,
|
|
7792
7800
|
children: /* @__PURE__ */ l.jsx(
|
|
@@ -7797,9 +7805,9 @@ var Sf = A.forwardRef((e, t) => {
|
|
|
7797
7805
|
...i,
|
|
7798
7806
|
ref: t,
|
|
7799
7807
|
onMouseDown: G(e.onMouseDown, (g) => {
|
|
7800
|
-
r ? f.onItemFocus(
|
|
7808
|
+
r ? f.onItemFocus(d) : g.preventDefault();
|
|
7801
7809
|
}),
|
|
7802
|
-
onFocus: G(e.onFocus, () => f.onItemFocus(
|
|
7810
|
+
onFocus: G(e.onFocus, () => f.onItemFocus(d)),
|
|
7803
7811
|
onKeyDown: G(e.onKeyDown, (g) => {
|
|
7804
7812
|
if (g.key === "Tab" && g.shiftKey) {
|
|
7805
7813
|
f.onItemShiftTab();
|
|
@@ -7865,7 +7873,7 @@ var Cf = xs, Of = ws, tr = ["Enter", " "], zf = ["ArrowDown", "PageUp", "Home"],
|
|
|
7865
7873
|
hn,
|
|
7866
7874
|
gs
|
|
7867
7875
|
]), Xt = hn(), Is = gs(), [Ls, Ue] = nt(Tt), [Jf, Ht] = nt(Tt), js = (e) => {
|
|
7868
|
-
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: a, modal: s = !0 } = e, i = Xt(t), [
|
|
7876
|
+
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: a, modal: s = !0 } = e, i = Xt(t), [u, d] = A.useState(null), f = A.useRef(!1), c = Se(a), v = hs(o);
|
|
7869
7877
|
return A.useEffect(() => {
|
|
7870
7878
|
const p = () => {
|
|
7871
7879
|
f.current = !0, document.addEventListener("pointerdown", h, { capture: !0, once: !0 }), document.addEventListener("pointermove", h, { capture: !0, once: !0 });
|
|
@@ -7879,8 +7887,8 @@ var Cf = xs, Of = ws, tr = ["Enter", " "], zf = ["ArrowDown", "PageUp", "Home"],
|
|
|
7879
7887
|
scope: t,
|
|
7880
7888
|
open: n,
|
|
7881
7889
|
onOpenChange: c,
|
|
7882
|
-
content:
|
|
7883
|
-
onContentChange:
|
|
7890
|
+
content: u,
|
|
7891
|
+
onContentChange: d,
|
|
7884
7892
|
children: /* @__PURE__ */ l.jsx(
|
|
7885
7893
|
Jf,
|
|
7886
7894
|
{
|
|
@@ -7960,8 +7968,8 @@ var ye = "MenuContent", [Vf, Er] = nt(ye), Ds = A.forwardRef(
|
|
|
7960
7968
|
onOpenAutoFocus: a,
|
|
7961
7969
|
onCloseAutoFocus: s,
|
|
7962
7970
|
disableOutsidePointerEvents: i,
|
|
7963
|
-
onEntryFocus:
|
|
7964
|
-
onEscapeKeyDown:
|
|
7971
|
+
onEntryFocus: u,
|
|
7972
|
+
onEscapeKeyDown: d,
|
|
7965
7973
|
onPointerDownOutside: f,
|
|
7966
7974
|
onFocusOutside: c,
|
|
7967
7975
|
onInteractOutside: v,
|
|
@@ -8023,7 +8031,7 @@ var ye = "MenuContent", [Vf, Er] = nt(ye), Ds = A.forwardRef(
|
|
|
8023
8031
|
{
|
|
8024
8032
|
asChild: !0,
|
|
8025
8033
|
disableOutsidePointerEvents: i,
|
|
8026
|
-
onEscapeKeyDown:
|
|
8034
|
+
onEscapeKeyDown: d,
|
|
8027
8035
|
onPointerDownOutside: f,
|
|
8028
8036
|
onFocusOutside: c,
|
|
8029
8037
|
onInteractOutside: v,
|
|
@@ -8038,7 +8046,7 @@ var ye = "MenuContent", [Vf, Er] = nt(ye), Ds = A.forwardRef(
|
|
|
8038
8046
|
loop: r,
|
|
8039
8047
|
currentTabStopId: L,
|
|
8040
8048
|
onCurrentTabStopIdChange: N,
|
|
8041
|
-
onEntryFocus: G(
|
|
8049
|
+
onEntryFocus: G(u, (D) => {
|
|
8042
8050
|
b.isUsingKeyboardRef.current || D.preventDefault();
|
|
8043
8051
|
}),
|
|
8044
8052
|
preventScrollOnEntryFocus: !0,
|
|
@@ -8105,27 +8113,27 @@ var $f = "MenuLabel", Ss = A.forwardRef(
|
|
|
8105
8113
|
Ss.displayName = $f;
|
|
8106
8114
|
var an = "MenuItem", yo = "menu.itemSelect", wn = A.forwardRef(
|
|
8107
8115
|
(e, t) => {
|
|
8108
|
-
const { disabled: n = !1, onSelect: r, ...o } = e, a = A.useRef(null), s = Ht(an, e.__scopeMenu), i = Er(an, e.__scopeMenu),
|
|
8116
|
+
const { disabled: n = !1, onSelect: r, ...o } = e, a = A.useRef(null), s = Ht(an, e.__scopeMenu), i = Er(an, e.__scopeMenu), u = se(t, a), d = A.useRef(!1), f = () => {
|
|
8109
8117
|
const c = a.current;
|
|
8110
8118
|
if (!n && c) {
|
|
8111
8119
|
const v = new CustomEvent(yo, { bubbles: !0, cancelable: !0 });
|
|
8112
|
-
c.addEventListener(yo, (p) => r == null ? void 0 : r(p), { once: !0 }), No(c, v), v.defaultPrevented ?
|
|
8120
|
+
c.addEventListener(yo, (p) => r == null ? void 0 : r(p), { once: !0 }), No(c, v), v.defaultPrevented ? d.current = !1 : s.onClose();
|
|
8113
8121
|
}
|
|
8114
8122
|
};
|
|
8115
8123
|
return /* @__PURE__ */ l.jsx(
|
|
8116
8124
|
Ts,
|
|
8117
8125
|
{
|
|
8118
8126
|
...o,
|
|
8119
|
-
ref:
|
|
8127
|
+
ref: u,
|
|
8120
8128
|
disabled: n,
|
|
8121
8129
|
onClick: G(e.onClick, f),
|
|
8122
8130
|
onPointerDown: (c) => {
|
|
8123
8131
|
var v;
|
|
8124
|
-
(v = e.onPointerDown) == null || v.call(e, c),
|
|
8132
|
+
(v = e.onPointerDown) == null || v.call(e, c), d.current = !0;
|
|
8125
8133
|
},
|
|
8126
8134
|
onPointerUp: G(e.onPointerUp, (c) => {
|
|
8127
8135
|
var v;
|
|
8128
|
-
|
|
8136
|
+
d.current || (v = c.currentTarget) == null || v.click();
|
|
8129
8137
|
}),
|
|
8130
8138
|
onKeyDown: G(e.onKeyDown, (c) => {
|
|
8131
8139
|
const v = i.searchRef.current !== "";
|
|
@@ -8138,9 +8146,9 @@ var an = "MenuItem", yo = "menu.itemSelect", wn = A.forwardRef(
|
|
|
8138
8146
|
wn.displayName = an;
|
|
8139
8147
|
var Ts = A.forwardRef(
|
|
8140
8148
|
(e, t) => {
|
|
8141
|
-
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...a } = e, s = Er(an, n), i = Is(n),
|
|
8149
|
+
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...a } = e, s = Er(an, n), i = Is(n), u = A.useRef(null), d = se(t, u), [f, c] = A.useState(!1), [v, p] = A.useState("");
|
|
8142
8150
|
return A.useEffect(() => {
|
|
8143
|
-
const h =
|
|
8151
|
+
const h = u.current;
|
|
8144
8152
|
h && p((h.textContent ?? "").trim());
|
|
8145
8153
|
}, [a.children]), /* @__PURE__ */ l.jsx(
|
|
8146
8154
|
jt.ItemSlot,
|
|
@@ -8156,7 +8164,7 @@ var Ts = A.forwardRef(
|
|
|
8156
8164
|
"aria-disabled": r || void 0,
|
|
8157
8165
|
"data-disabled": r ? "" : void 0,
|
|
8158
8166
|
...a,
|
|
8159
|
-
ref:
|
|
8167
|
+
ref: d,
|
|
8160
8168
|
onPointerMove: G(
|
|
8161
8169
|
e.onPointerMove,
|
|
8162
8170
|
kt((h) => {
|
|
@@ -8276,14 +8284,14 @@ var av = "MenuArrow", Fs = A.forwardRef(
|
|
|
8276
8284
|
);
|
|
8277
8285
|
Fs.displayName = av;
|
|
8278
8286
|
var kr = "MenuSub", [sv, Zs] = nt(kr), Bs = (e) => {
|
|
8279
|
-
const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: o } = e, a = Ue(kr, t), s = Xt(t), [i,
|
|
8287
|
+
const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: o } = e, a = Ue(kr, t), s = Xt(t), [i, u] = A.useState(null), [d, f] = A.useState(null), c = Se(o);
|
|
8280
8288
|
return A.useEffect(() => (a.open === !1 && c(!1), () => c(!1)), [a.open, c]), /* @__PURE__ */ l.jsx(xr, { ...s, children: /* @__PURE__ */ l.jsx(
|
|
8281
8289
|
Ls,
|
|
8282
8290
|
{
|
|
8283
8291
|
scope: t,
|
|
8284
8292
|
open: r,
|
|
8285
8293
|
onOpenChange: c,
|
|
8286
|
-
content:
|
|
8294
|
+
content: d,
|
|
8287
8295
|
onContentChange: f,
|
|
8288
8296
|
children: /* @__PURE__ */ l.jsx(
|
|
8289
8297
|
sv,
|
|
@@ -8292,7 +8300,7 @@ var kr = "MenuSub", [sv, Zs] = nt(kr), Bs = (e) => {
|
|
|
8292
8300
|
contentId: Ce(),
|
|
8293
8301
|
triggerId: Ce(),
|
|
8294
8302
|
trigger: i,
|
|
8295
|
-
onTriggerChange:
|
|
8303
|
+
onTriggerChange: u,
|
|
8296
8304
|
children: n
|
|
8297
8305
|
}
|
|
8298
8306
|
)
|
|
@@ -8302,15 +8310,15 @@ var kr = "MenuSub", [sv, Zs] = nt(kr), Bs = (e) => {
|
|
|
8302
8310
|
Bs.displayName = kr;
|
|
8303
8311
|
var Rt = "MenuSubTrigger", Js = A.forwardRef(
|
|
8304
8312
|
(e, t) => {
|
|
8305
|
-
const n = Ue(Rt, e.__scopeMenu), r = Ht(Rt, e.__scopeMenu), o = Zs(Rt, e.__scopeMenu), a = Er(Rt, e.__scopeMenu), s = A.useRef(null), { pointerGraceTimerRef: i, onPointerGraceIntentChange:
|
|
8313
|
+
const n = Ue(Rt, e.__scopeMenu), r = Ht(Rt, e.__scopeMenu), o = Zs(Rt, e.__scopeMenu), a = Er(Rt, e.__scopeMenu), s = A.useRef(null), { pointerGraceTimerRef: i, onPointerGraceIntentChange: u } = a, d = { __scopeMenu: e.__scopeMenu }, f = A.useCallback(() => {
|
|
8306
8314
|
s.current && window.clearTimeout(s.current), s.current = null;
|
|
8307
8315
|
}, []);
|
|
8308
8316
|
return A.useEffect(() => f, [f]), A.useEffect(() => {
|
|
8309
8317
|
const c = i.current;
|
|
8310
8318
|
return () => {
|
|
8311
|
-
window.clearTimeout(c),
|
|
8319
|
+
window.clearTimeout(c), u(null);
|
|
8312
8320
|
};
|
|
8313
|
-
}, [i,
|
|
8321
|
+
}, [i, u]), /* @__PURE__ */ l.jsx(Pr, { asChild: !0, ...d, children: /* @__PURE__ */ l.jsx(
|
|
8314
8322
|
Ts,
|
|
8315
8323
|
{
|
|
8316
8324
|
id: o.triggerId,
|
|
@@ -8373,14 +8381,14 @@ var Rt = "MenuSubTrigger", Js = A.forwardRef(
|
|
|
8373
8381
|
Js.displayName = Rt;
|
|
8374
8382
|
var Ys = "MenuSubContent", Us = A.forwardRef(
|
|
8375
8383
|
(e, t) => {
|
|
8376
|
-
const n = ks(ye, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, a = Ue(ye, e.__scopeMenu), s = Ht(ye, e.__scopeMenu), i = Zs(Ys, e.__scopeMenu),
|
|
8384
|
+
const n = ks(ye, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, a = Ue(ye, e.__scopeMenu), s = Ht(ye, e.__scopeMenu), i = Zs(Ys, e.__scopeMenu), u = A.useRef(null), d = se(t, u);
|
|
8377
8385
|
return /* @__PURE__ */ l.jsx(jt.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(Ge, { present: r || a.open, children: /* @__PURE__ */ l.jsx(jt.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(
|
|
8378
8386
|
Ir,
|
|
8379
8387
|
{
|
|
8380
8388
|
id: i.contentId,
|
|
8381
8389
|
"aria-labelledby": i.triggerId,
|
|
8382
8390
|
...o,
|
|
8383
|
-
ref:
|
|
8391
|
+
ref: d,
|
|
8384
8392
|
align: "start",
|
|
8385
8393
|
side: s.dir === "rtl" ? "left" : "right",
|
|
8386
8394
|
disableOutsidePointerEvents: !1,
|
|
@@ -8388,7 +8396,7 @@ var Ys = "MenuSubContent", Us = A.forwardRef(
|
|
|
8388
8396
|
trapFocus: !1,
|
|
8389
8397
|
onOpenAutoFocus: (f) => {
|
|
8390
8398
|
var c;
|
|
8391
|
-
s.isUsingKeyboardRef.current && ((c =
|
|
8399
|
+
s.isUsingKeyboardRef.current && ((c = u.current) == null || c.focus()), f.preventDefault();
|
|
8392
8400
|
},
|
|
8393
8401
|
onCloseAutoFocus: (f) => f.preventDefault(),
|
|
8394
8402
|
onFocusOutside: G(e.onFocusOutside, (f) => {
|
|
@@ -8425,20 +8433,20 @@ function cv(e, t) {
|
|
|
8425
8433
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
8426
8434
|
}
|
|
8427
8435
|
function lv(e, t, n) {
|
|
8428
|
-
const o = t.length > 1 && Array.from(t).every((
|
|
8436
|
+
const o = t.length > 1 && Array.from(t).every((d) => d === t[0]) ? t[0] : t, a = n ? e.indexOf(n) : -1;
|
|
8429
8437
|
let s = cv(e, Math.max(a, 0));
|
|
8430
|
-
o.length === 1 && (s = s.filter((
|
|
8431
|
-
const
|
|
8432
|
-
(
|
|
8438
|
+
o.length === 1 && (s = s.filter((d) => d !== n));
|
|
8439
|
+
const u = s.find(
|
|
8440
|
+
(d) => d.toLowerCase().startsWith(o.toLowerCase())
|
|
8433
8441
|
);
|
|
8434
|
-
return
|
|
8442
|
+
return u !== n ? u : void 0;
|
|
8435
8443
|
}
|
|
8436
8444
|
function dv(e, t) {
|
|
8437
8445
|
const { x: n, y: r } = e;
|
|
8438
8446
|
let o = !1;
|
|
8439
8447
|
for (let a = 0, s = t.length - 1; a < t.length; s = a++) {
|
|
8440
|
-
const i = t[a],
|
|
8441
|
-
f > r != v > r && n < (c -
|
|
8448
|
+
const i = t[a], u = t[s], d = i.x, f = i.y, c = u.x, v = u.y;
|
|
8449
|
+
f > r != v > r && n < (c - d) * (r - f) / (v - f) + d && (o = !o);
|
|
8442
8450
|
}
|
|
8443
8451
|
return o;
|
|
8444
8452
|
}
|
|
@@ -8462,7 +8470,7 @@ var Av = js, fv = Pr, vv = Ns, pv = Ds, mv = Lr, hv = Ss, bv = wn, gv = Xs, xv =
|
|
|
8462
8470
|
defaultOpen: a,
|
|
8463
8471
|
onOpenChange: s,
|
|
8464
8472
|
modal: i = !0
|
|
8465
|
-
} = e,
|
|
8473
|
+
} = e, u = de(t), d = A.useRef(null), [f, c] = Nt({
|
|
8466
8474
|
prop: o,
|
|
8467
8475
|
defaultProp: a ?? !1,
|
|
8468
8476
|
onChange: s,
|
|
@@ -8473,13 +8481,13 @@ var Av = js, fv = Pr, vv = Ns, pv = Ds, mv = Lr, hv = Ss, bv = wn, gv = Xs, xv =
|
|
|
8473
8481
|
{
|
|
8474
8482
|
scope: t,
|
|
8475
8483
|
triggerId: Ce(),
|
|
8476
|
-
triggerRef:
|
|
8484
|
+
triggerRef: d,
|
|
8477
8485
|
contentId: Ce(),
|
|
8478
8486
|
open: f,
|
|
8479
8487
|
onOpenChange: c,
|
|
8480
8488
|
onOpenToggle: A.useCallback(() => c((v) => !v), [c]),
|
|
8481
8489
|
modal: i,
|
|
8482
|
-
children: /* @__PURE__ */ l.jsx(Av, { ...
|
|
8490
|
+
children: /* @__PURE__ */ l.jsx(Av, { ...u, open: f, onOpenChange: c, dir: r, modal: i, children: n })
|
|
8483
8491
|
}
|
|
8484
8492
|
);
|
|
8485
8493
|
};
|
|
@@ -8528,11 +8536,11 @@ var ei = "DropdownMenuContent", ti = A.forwardRef(
|
|
|
8528
8536
|
...r,
|
|
8529
8537
|
ref: t,
|
|
8530
8538
|
onCloseAutoFocus: G(e.onCloseAutoFocus, (i) => {
|
|
8531
|
-
var
|
|
8532
|
-
s.current || (
|
|
8539
|
+
var u;
|
|
8540
|
+
s.current || (u = o.triggerRef.current) == null || u.focus(), s.current = !1, i.preventDefault();
|
|
8533
8541
|
}),
|
|
8534
8542
|
onInteractOutside: G(e.onInteractOutside, (i) => {
|
|
8535
|
-
const
|
|
8543
|
+
const u = i.detail.originalEvent, d = u.button === 0 && u.ctrlKey === !0, f = u.button === 2 || d;
|
|
8536
8544
|
(!o.modal || f) && (s.current = !0);
|
|
8537
8545
|
}),
|
|
8538
8546
|
style: {
|
|
@@ -8602,13 +8610,13 @@ var zv = "DropdownMenuArrow", Gv = A.forwardRef(
|
|
|
8602
8610
|
);
|
|
8603
8611
|
Gv.displayName = zv;
|
|
8604
8612
|
var Wv = (e) => {
|
|
8605
|
-
const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: o, defaultOpen: a } = e, s = de(t), [i,
|
|
8613
|
+
const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: o, defaultOpen: a } = e, s = de(t), [i, u] = Nt({
|
|
8606
8614
|
prop: r,
|
|
8607
8615
|
defaultProp: a ?? !1,
|
|
8608
8616
|
onChange: o,
|
|
8609
8617
|
caller: "DropdownMenuSub"
|
|
8610
8618
|
});
|
|
8611
|
-
return /* @__PURE__ */ l.jsx(Ev, { ...s, open: i, onOpenChange:
|
|
8619
|
+
return /* @__PURE__ */ l.jsx(Ev, { ...s, open: i, onOpenChange: u, children: n });
|
|
8612
8620
|
}, Fv = "DropdownMenuSubTrigger", di = A.forwardRef((e, t) => {
|
|
8613
8621
|
const { __scopeDropdownMenu: n, ...r } = e, o = de(n);
|
|
8614
8622
|
return /* @__PURE__ */ l.jsx(Iv, { ...o, ...r, ref: t });
|
|
@@ -8892,18 +8900,37 @@ const cp = ({ onLogout: e }) => {
|
|
|
8892
8900
|
] }),
|
|
8893
8901
|
/* @__PURE__ */ l.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ l.jsx(cp, { onLogout: e }) })
|
|
8894
8902
|
] }) }), dp = dn(
|
|
8895
|
-
"inline-flex items-center justify-center rounded-md border h-8
|
|
8903
|
+
"inline-flex items-center justify-center rounded-md border h-8 gap-1.5 px-3 has-[>svg]:px-2.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
8896
8904
|
{
|
|
8897
8905
|
variants: {
|
|
8898
8906
|
variant: {
|
|
8899
|
-
default: "bg-
|
|
8907
|
+
default: "bg-brand-blue text-white border-none",
|
|
8900
8908
|
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
8901
|
-
|
|
8902
|
-
|
|
8909
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
8910
|
+
// Status badge variants
|
|
8911
|
+
inactive: "bg-neutral-10 text-neutral-300 border-none",
|
|
8912
|
+
"not-subscribed": "bg-caribbean-50 text-brand-navy border-none",
|
|
8913
|
+
subscribed: "bg-green-50 text-green-900 border-none",
|
|
8914
|
+
warning: "bg-orange-200 text-orange-900 border-none",
|
|
8915
|
+
tag: "bg-brand-blue-200 border-none",
|
|
8916
|
+
// Brand color variants
|
|
8917
|
+
brand: "bg-brand-navy text-white border-none",
|
|
8918
|
+
orange: "bg-brand-orange text-white border-none",
|
|
8919
|
+
green: "bg-brand-green text-white border-none",
|
|
8920
|
+
lime: "bg-brand-lime text-white border-none",
|
|
8921
|
+
caribbean: "bg-caribbean-600 text-white border-none",
|
|
8922
|
+
// Error variants
|
|
8923
|
+
error: "bg-red-300 text-red-900 border-none"
|
|
8924
|
+
},
|
|
8925
|
+
size: {
|
|
8926
|
+
default: "h-8 px-3",
|
|
8927
|
+
sm: "h-9 rounded-md px-3",
|
|
8928
|
+
lg: "h-11 rounded-md px-8"
|
|
8903
8929
|
}
|
|
8904
8930
|
},
|
|
8905
8931
|
defaultVariants: {
|
|
8906
|
-
variant: "default"
|
|
8932
|
+
variant: "default",
|
|
8933
|
+
size: "default"
|
|
8907
8934
|
}
|
|
8908
8935
|
}
|
|
8909
8936
|
);
|
|
@@ -9012,9 +9039,9 @@ function Ap({
|
|
|
9012
9039
|
className: s,
|
|
9013
9040
|
disabled: i = !1
|
|
9014
9041
|
}) {
|
|
9015
|
-
const [
|
|
9042
|
+
const [u, d] = A.useState(r);
|
|
9016
9043
|
A.useEffect(() => {
|
|
9017
|
-
a &&
|
|
9044
|
+
a && d(!0);
|
|
9018
9045
|
}, [a]);
|
|
9019
9046
|
const f = !i && t;
|
|
9020
9047
|
return /* @__PURE__ */ l.jsx(xf, { className: s, children: /* @__PURE__ */ l.jsxs("div", { className: "flex flex-col", children: [
|
|
@@ -9053,11 +9080,11 @@ function Ap({
|
|
|
9053
9080
|
i ? "cursor-default opacity-50" : "hover:bg-gray-100 hover:text-black"
|
|
9054
9081
|
),
|
|
9055
9082
|
onClick: (c) => {
|
|
9056
|
-
c.preventDefault(), c.stopPropagation(), i ||
|
|
9083
|
+
c.preventDefault(), c.stopPropagation(), i || d(!u);
|
|
9057
9084
|
},
|
|
9058
9085
|
disabled: i,
|
|
9059
|
-
"aria-label":
|
|
9060
|
-
children:
|
|
9086
|
+
"aria-label": u ? "Collapse section" : "Expand section",
|
|
9087
|
+
children: u ? /* @__PURE__ */ l.jsx(Qc, { className: "h-4 w-4" }) : /* @__PURE__ */ l.jsx(Yo, { className: "h-4 w-4" })
|
|
9061
9088
|
}
|
|
9062
9089
|
)
|
|
9063
9090
|
] }),
|
|
@@ -9066,7 +9093,7 @@ function Ap({
|
|
|
9066
9093
|
{
|
|
9067
9094
|
className: M(
|
|
9068
9095
|
"transition-all",
|
|
9069
|
-
|
|
9096
|
+
u && !i ? "overflow-y-auto max-h-full" : "overflow-hidden max-h-0"
|
|
9070
9097
|
),
|
|
9071
9098
|
children: n
|
|
9072
9099
|
}
|
|
@@ -9074,15 +9101,15 @@ function Ap({
|
|
|
9074
9101
|
] }) });
|
|
9075
9102
|
}
|
|
9076
9103
|
var fp = (e, t, n, r, o, a, s, i) => {
|
|
9077
|
-
let
|
|
9104
|
+
let u = document.documentElement, d = ["light", "dark"];
|
|
9078
9105
|
function f(p) {
|
|
9079
9106
|
(Array.isArray(e) ? e : [e]).forEach((h) => {
|
|
9080
9107
|
let m = h === "class", g = m && a ? o.map((b) => a[b] || b) : o;
|
|
9081
|
-
m ? (
|
|
9108
|
+
m ? (u.classList.remove(...g), u.classList.add(a && a[p] ? a[p] : p)) : u.setAttribute(h, p);
|
|
9082
9109
|
}), c(p);
|
|
9083
9110
|
}
|
|
9084
9111
|
function c(p) {
|
|
9085
|
-
i &&
|
|
9112
|
+
i && d.includes(p) && (u.style.colorScheme = p);
|
|
9086
9113
|
}
|
|
9087
9114
|
function v() {
|
|
9088
9115
|
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
@@ -9098,9 +9125,9 @@ var fp = (e, t, n, r, o, a, s, i) => {
|
|
|
9098
9125
|
var e;
|
|
9099
9126
|
return (e = A.useContext(vp)) != null ? e : pp;
|
|
9100
9127
|
};
|
|
9101
|
-
A.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: r, enableColorScheme: o, defaultTheme: a, value: s, themes: i, nonce:
|
|
9128
|
+
A.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: r, enableColorScheme: o, defaultTheme: a, value: s, themes: i, nonce: u, scriptProps: d }) => {
|
|
9102
9129
|
let f = JSON.stringify([n, t, a, e, i, s, r, o]).slice(1, -1);
|
|
9103
|
-
return A.createElement("script", { ...
|
|
9130
|
+
return A.createElement("script", { ...d, suppressHydrationWarning: !0, nonce: typeof window > "u" ? u : "", dangerouslySetInnerHTML: { __html: `(${fp.toString()})(${f})` } });
|
|
9104
9131
|
});
|
|
9105
9132
|
function hp(e) {
|
|
9106
9133
|
if (typeof document > "u") return;
|
|
@@ -9215,19 +9242,19 @@ class Lp {
|
|
|
9215
9242
|
];
|
|
9216
9243
|
}, this.create = (t) => {
|
|
9217
9244
|
var n;
|
|
9218
|
-
const { message: r, ...o } = t, a = typeof (t == null ? void 0 : t.id) == "number" || ((n = t.id) == null ? void 0 : n.length) > 0 ? t.id : nr++, s = this.toasts.find((
|
|
9219
|
-
return this.dismissedToasts.has(a) && this.dismissedToasts.delete(a), s ? this.toasts = this.toasts.map((
|
|
9220
|
-
...
|
|
9245
|
+
const { message: r, ...o } = t, a = typeof (t == null ? void 0 : t.id) == "number" || ((n = t.id) == null ? void 0 : n.length) > 0 ? t.id : nr++, s = this.toasts.find((u) => u.id === a), i = t.dismissible === void 0 ? !0 : t.dismissible;
|
|
9246
|
+
return this.dismissedToasts.has(a) && this.dismissedToasts.delete(a), s ? this.toasts = this.toasts.map((u) => u.id === a ? (this.publish({
|
|
9247
|
+
...u,
|
|
9221
9248
|
...t,
|
|
9222
9249
|
id: a,
|
|
9223
9250
|
title: r
|
|
9224
9251
|
}), {
|
|
9225
|
-
...
|
|
9252
|
+
...u,
|
|
9226
9253
|
...t,
|
|
9227
9254
|
id: a,
|
|
9228
9255
|
dismissible: i,
|
|
9229
9256
|
title: r
|
|
9230
|
-
}) :
|
|
9257
|
+
}) : u) : this.addToast({
|
|
9231
9258
|
title: r,
|
|
9232
9259
|
...o,
|
|
9233
9260
|
dismissible: i,
|
|
@@ -9277,19 +9304,19 @@ class Lp {
|
|
|
9277
9304
|
}));
|
|
9278
9305
|
const o = Promise.resolve(t instanceof Function ? t() : t);
|
|
9279
9306
|
let a = r !== void 0, s;
|
|
9280
|
-
const i = o.then(async (
|
|
9307
|
+
const i = o.then(async (d) => {
|
|
9281
9308
|
if (s = [
|
|
9282
9309
|
"resolve",
|
|
9283
|
-
|
|
9284
|
-
], I.isValidElement(
|
|
9310
|
+
d
|
|
9311
|
+
], I.isValidElement(d))
|
|
9285
9312
|
a = !1, this.create({
|
|
9286
9313
|
id: r,
|
|
9287
9314
|
type: "default",
|
|
9288
|
-
message:
|
|
9315
|
+
message: d
|
|
9289
9316
|
});
|
|
9290
|
-
else if (kp(
|
|
9317
|
+
else if (kp(d) && !d.ok) {
|
|
9291
9318
|
a = !1;
|
|
9292
|
-
const c = typeof n.error == "function" ? await n.error(`HTTP error! status: ${
|
|
9319
|
+
const c = typeof n.error == "function" ? await n.error(`HTTP error! status: ${d.status}`) : n.error, v = typeof n.description == "function" ? await n.description(`HTTP error! status: ${d.status}`) : n.description, h = typeof c == "object" && !I.isValidElement(c) ? c : {
|
|
9293
9320
|
message: c
|
|
9294
9321
|
};
|
|
9295
9322
|
this.create({
|
|
@@ -9298,9 +9325,9 @@ class Lp {
|
|
|
9298
9325
|
description: v,
|
|
9299
9326
|
...h
|
|
9300
9327
|
});
|
|
9301
|
-
} else if (
|
|
9328
|
+
} else if (d instanceof Error) {
|
|
9302
9329
|
a = !1;
|
|
9303
|
-
const c = typeof n.error == "function" ? await n.error(
|
|
9330
|
+
const c = typeof n.error == "function" ? await n.error(d) : n.error, v = typeof n.description == "function" ? await n.description(d) : n.description, h = typeof c == "object" && !I.isValidElement(c) ? c : {
|
|
9304
9331
|
message: c
|
|
9305
9332
|
};
|
|
9306
9333
|
this.create({
|
|
@@ -9311,7 +9338,7 @@ class Lp {
|
|
|
9311
9338
|
});
|
|
9312
9339
|
} else if (n.success !== void 0) {
|
|
9313
9340
|
a = !1;
|
|
9314
|
-
const c = typeof n.success == "function" ? await n.success(
|
|
9341
|
+
const c = typeof n.success == "function" ? await n.success(d) : n.success, v = typeof n.description == "function" ? await n.description(d) : n.description, h = typeof c == "object" && !I.isValidElement(c) ? c : {
|
|
9315
9342
|
message: c
|
|
9316
9343
|
};
|
|
9317
9344
|
this.create({
|
|
@@ -9321,13 +9348,13 @@ class Lp {
|
|
|
9321
9348
|
...h
|
|
9322
9349
|
});
|
|
9323
9350
|
}
|
|
9324
|
-
}).catch(async (
|
|
9351
|
+
}).catch(async (d) => {
|
|
9325
9352
|
if (s = [
|
|
9326
9353
|
"reject",
|
|
9327
|
-
|
|
9354
|
+
d
|
|
9328
9355
|
], n.error !== void 0) {
|
|
9329
9356
|
a = !1;
|
|
9330
|
-
const f = typeof n.error == "function" ? await n.error(
|
|
9357
|
+
const f = typeof n.error == "function" ? await n.error(d) : n.error, c = typeof n.description == "function" ? await n.description(d) : n.description, p = typeof f == "object" && !I.isValidElement(f) ? f : {
|
|
9331
9358
|
message: f
|
|
9332
9359
|
};
|
|
9333
9360
|
this.create({
|
|
@@ -9339,11 +9366,11 @@ class Lp {
|
|
|
9339
9366
|
}
|
|
9340
9367
|
}).finally(() => {
|
|
9341
9368
|
a && (this.dismiss(r), r = void 0), n.finally == null || n.finally.call(n);
|
|
9342
|
-
}),
|
|
9369
|
+
}), u = () => new Promise((d, f) => i.then(() => s[0] === "reject" ? f(s[1]) : d(s[1])).catch(f));
|
|
9343
9370
|
return typeof r != "string" && typeof r != "number" ? {
|
|
9344
|
-
unwrap:
|
|
9371
|
+
unwrap: u
|
|
9345
9372
|
} : Object.assign(r, {
|
|
9346
|
-
unwrap:
|
|
9373
|
+
unwrap: u
|
|
9347
9374
|
});
|
|
9348
9375
|
}, this.custom = (t, n) => {
|
|
9349
9376
|
const r = (n == null ? void 0 : n.id) || nr++;
|
|
@@ -9389,7 +9416,7 @@ function Gp(e) {
|
|
|
9389
9416
|
return t && r.push(t), n && r.push(n), r;
|
|
9390
9417
|
}
|
|
9391
9418
|
const Wp = (e) => {
|
|
9392
|
-
var t, n, r, o, a, s, i,
|
|
9419
|
+
var t, n, r, o, a, s, i, u, d;
|
|
9393
9420
|
const { invert: f, toast: c, unstyled: v, interacting: p, setHeights: h, visibleToasts: m, heights: g, index: b, toasts: y, expanded: w, removeToast: P, defaultRichColors: L, closeButton: N, style: j, cancelButtonStyle: E, actionButtonStyle: W, className: Y = "", descriptionClassName: $ = "", duration: Q, position: U, gap: V, expandByDefault: _, classNames: S, icons: C, closeButtonAriaLabel: R = "Close toast" } = e, [D, x] = I.useState(null), [T, F] = I.useState(null), [k, O] = I.useState(!1), [Z, te] = I.useState(!1), [q, z] = I.useState(!1), [ee, oe] = I.useState(!1), [ve, ue] = I.useState(!1), [Ve, rt] = I.useState(0), [In, Mt] = I.useState(0), qe = I.useRef(c.duration || Q || Po), Ct = I.useRef(null), Ae = I.useRef(null), mi = b === 0, hi = b + 1 <= m, pe = c.type, ot = c.dismissible !== !1, bi = c.className || "", gi = c.descriptionClassName || "", Ot = I.useMemo(() => g.findIndex((B) => B.toastId === c.id) || 0, [
|
|
9394
9421
|
g,
|
|
9395
9422
|
c.id
|
|
@@ -9623,7 +9650,7 @@ const Wp = (e) => {
|
|
|
9623
9650
|
onClick: (B) => {
|
|
9624
9651
|
Kt(c.cancel) && ot && (c.cancel.onClick == null || c.cancel.onClick.call(c.cancel, B), We());
|
|
9625
9652
|
},
|
|
9626
|
-
className: je(S == null ? void 0 : S.cancelButton, c == null || (
|
|
9653
|
+
className: je(S == null ? void 0 : S.cancelButton, c == null || (u = c.classNames) == null ? void 0 : u.cancelButton)
|
|
9627
9654
|
}, c.cancel.label) : null, /* @__PURE__ */ I.isValidElement(c.action) ? c.action : c.action && Kt(c.action) ? /* @__PURE__ */ I.createElement("button", {
|
|
9628
9655
|
"data-button": !0,
|
|
9629
9656
|
"data-action": !0,
|
|
@@ -9631,7 +9658,7 @@ const Wp = (e) => {
|
|
|
9631
9658
|
onClick: (B) => {
|
|
9632
9659
|
Kt(c.action) && (c.action.onClick == null || c.action.onClick.call(c.action, B), !B.defaultPrevented && We());
|
|
9633
9660
|
},
|
|
9634
|
-
className: je(S == null ? void 0 : S.actionButton, c == null || (
|
|
9661
|
+
className: je(S == null ? void 0 : S.actionButton, c == null || (d = c.classNames) == null ? void 0 : d.actionButton)
|
|
9635
9662
|
}, c.action.label) : null);
|
|
9636
9663
|
};
|
|
9637
9664
|
function Ro() {
|
|
@@ -9646,31 +9673,31 @@ function Fp(e, t) {
|
|
|
9646
9673
|
t
|
|
9647
9674
|
].forEach((r, o) => {
|
|
9648
9675
|
const a = o === 1, s = a ? "--mobile-offset" : "--offset", i = a ? Hp : Xp;
|
|
9649
|
-
function d
|
|
9676
|
+
function u(d) {
|
|
9650
9677
|
[
|
|
9651
9678
|
"top",
|
|
9652
9679
|
"right",
|
|
9653
9680
|
"bottom",
|
|
9654
9681
|
"left"
|
|
9655
9682
|
].forEach((f) => {
|
|
9656
|
-
n[`${s}-${f}`] = typeof
|
|
9683
|
+
n[`${s}-${f}`] = typeof d == "number" ? `${d}px` : d;
|
|
9657
9684
|
});
|
|
9658
9685
|
}
|
|
9659
|
-
typeof r == "number" || typeof r == "string" ?
|
|
9686
|
+
typeof r == "number" || typeof r == "string" ? u(r) : typeof r == "object" ? [
|
|
9660
9687
|
"top",
|
|
9661
9688
|
"right",
|
|
9662
9689
|
"bottom",
|
|
9663
9690
|
"left"
|
|
9664
|
-
].forEach((
|
|
9665
|
-
r[
|
|
9666
|
-
}) :
|
|
9691
|
+
].forEach((d) => {
|
|
9692
|
+
r[d] === void 0 ? n[`${s}-${d}`] = i : n[`${s}-${d}`] = typeof r[d] == "number" ? `${r[d]}px` : r[d];
|
|
9693
|
+
}) : u(i);
|
|
9667
9694
|
}), n;
|
|
9668
9695
|
}
|
|
9669
9696
|
const Zp = /* @__PURE__ */ I.forwardRef(function(t, n) {
|
|
9670
9697
|
const { id: r, invert: o, position: a = "bottom-right", hotkey: s = [
|
|
9671
9698
|
"altKey",
|
|
9672
9699
|
"KeyT"
|
|
9673
|
-
], expand: i, closeButton:
|
|
9700
|
+
], expand: i, closeButton: u, className: d, offset: f, mobileOffset: c, theme: v = "light", richColors: p, duration: h, style: m, visibleToasts: g = Tp, toastOptions: b, dir: y = Ro(), gap: w = Cp, icons: P, containerAriaLabel: L = "Notifications" } = t, [N, j] = I.useState([]), E = I.useMemo(() => r ? N.filter((k) => k.toasterId === r) : N.filter((k) => !k.toasterId), [
|
|
9674
9701
|
N,
|
|
9675
9702
|
r
|
|
9676
9703
|
]), W = I.useMemo(() => Array.from(new Set([
|
|
@@ -9778,7 +9805,7 @@ const Zp = /* @__PURE__ */ I.forwardRef(function(t, n) {
|
|
|
9778
9805
|
dir: y === "auto" ? Ro() : y,
|
|
9779
9806
|
tabIndex: -1,
|
|
9780
9807
|
ref: R,
|
|
9781
|
-
className:
|
|
9808
|
+
className: d,
|
|
9782
9809
|
"data-sonner-toaster": !0,
|
|
9783
9810
|
"data-sonner-theme": S,
|
|
9784
9811
|
"data-y-position": te,
|
|
@@ -9821,7 +9848,7 @@ const Zp = /* @__PURE__ */ I.forwardRef(function(t, n) {
|
|
|
9821
9848
|
descriptionClassName: b == null ? void 0 : b.descriptionClassName,
|
|
9822
9849
|
invert: o,
|
|
9823
9850
|
visibleToasts: g,
|
|
9824
|
-
closeButton: (ve = b == null ? void 0 : b.closeButton) != null ? ve :
|
|
9851
|
+
closeButton: (ve = b == null ? void 0 : b.closeButton) != null ? ve : u,
|
|
9825
9852
|
interacting: V,
|
|
9826
9853
|
position: k,
|
|
9827
9854
|
style: b == null ? void 0 : b.style,
|
|
@@ -9923,6 +9950,7 @@ const vi = Li(
|
|
|
9923
9950
|
paid: e.paid,
|
|
9924
9951
|
web: e.web,
|
|
9925
9952
|
priceMonster: e.priceMonster,
|
|
9953
|
+
management: e.management,
|
|
9926
9954
|
se_company_id: e.se_company_id
|
|
9927
9955
|
};
|
|
9928
9956
|
};
|
|
@@ -9938,28 +9966,29 @@ function Qm({
|
|
|
9938
9966
|
paid: !1,
|
|
9939
9967
|
web: !1,
|
|
9940
9968
|
priceMonster: !1,
|
|
9969
|
+
management: !1,
|
|
9941
9970
|
se_company_id: null
|
|
9942
9971
|
}
|
|
9943
|
-
), [a, s] = Re(!n), [i,
|
|
9972
|
+
), [a, s] = Re(!n), [i, u] = Re(null), d = async () => {
|
|
9944
9973
|
try {
|
|
9945
|
-
s(!0),
|
|
9974
|
+
s(!0), u(null);
|
|
9946
9975
|
const f = await fetch(t);
|
|
9947
9976
|
if (!f.ok)
|
|
9948
9977
|
throw new Error(`Failed to fetch permissions: ${f.statusText}`);
|
|
9949
9978
|
const c = await f.json();
|
|
9950
9979
|
o(c);
|
|
9951
9980
|
} catch (f) {
|
|
9952
|
-
console.error("Error fetching product access:", f),
|
|
9981
|
+
console.error("Error fetching product access:", f), u(f instanceof Error ? f : new Error("Unknown error"));
|
|
9953
9982
|
} finally {
|
|
9954
9983
|
s(!1);
|
|
9955
9984
|
}
|
|
9956
9985
|
};
|
|
9957
9986
|
return cn(() => {
|
|
9958
|
-
n ||
|
|
9987
|
+
n || d();
|
|
9959
9988
|
}, [n]), /* @__PURE__ */ l.jsx(
|
|
9960
9989
|
vi.Provider,
|
|
9961
9990
|
{
|
|
9962
|
-
value: { permissions: r, loading: a, error: i, fetchPermissions:
|
|
9991
|
+
value: { permissions: r, loading: a, error: i, fetchPermissions: d },
|
|
9963
9992
|
children: e
|
|
9964
9993
|
}
|
|
9965
9994
|
);
|
|
@@ -9970,20 +9999,20 @@ function qp(e) {
|
|
|
9970
9999
|
(async () => {
|
|
9971
10000
|
try {
|
|
9972
10001
|
o(!0), s(null);
|
|
9973
|
-
const
|
|
10002
|
+
const u = process.env.APP_ENV === "local" ? "https://dev.cloud.golocal.com/api/navigation-config" : "/api/navigation-config", d = await fetch(u, {
|
|
9974
10003
|
cache: "no-store",
|
|
9975
10004
|
mode: "cors",
|
|
9976
10005
|
headers: {
|
|
9977
10006
|
"Content-Type": "application/json"
|
|
9978
10007
|
}
|
|
9979
10008
|
});
|
|
9980
|
-
if (!
|
|
9981
|
-
throw new Error(`Failed to fetch navigation config: ${
|
|
9982
|
-
const f = await
|
|
10009
|
+
if (!d.ok)
|
|
10010
|
+
throw new Error(`Failed to fetch navigation config: ${d.status}`);
|
|
10011
|
+
const f = await d.json();
|
|
9983
10012
|
n(f);
|
|
9984
|
-
} catch (
|
|
9985
|
-
const
|
|
9986
|
-
s(
|
|
10013
|
+
} catch (u) {
|
|
10014
|
+
const d = u instanceof Error ? u.message : "Failed to fetch navigation config";
|
|
10015
|
+
s(d), e && n(e);
|
|
9987
10016
|
} finally {
|
|
9988
10017
|
o(!1);
|
|
9989
10018
|
}
|
|
@@ -10110,13 +10139,13 @@ function Kp({ ...e }) {
|
|
|
10110
10139
|
a.key === "essentialInsights" && (i = a.items.filter((f) => s ? f.permissions && f.permissions !== void 0 ? f.permissions.some(
|
|
10111
10140
|
(c) => n[c]
|
|
10112
10141
|
) : !0 : !1));
|
|
10113
|
-
const
|
|
10142
|
+
const u = s && (t(a.url) || i.some((f) => t(f.url))), d = /* @__PURE__ */ l.jsx(
|
|
10114
10143
|
Ap,
|
|
10115
10144
|
{
|
|
10116
10145
|
url: s ? a.url : void 0,
|
|
10117
10146
|
title: a.title,
|
|
10118
10147
|
icon: Wn(a.icon, "h-4 w-4"),
|
|
10119
|
-
isActive: !!
|
|
10148
|
+
isActive: !!u,
|
|
10120
10149
|
disabled: !s,
|
|
10121
10150
|
className: M(!s && "opacity-50"),
|
|
10122
10151
|
children: s && /* @__PURE__ */ l.jsx(yf, { children: /* @__PURE__ */ l.jsx(Pf, { children: i.map((f) => {
|
|
@@ -10140,9 +10169,9 @@ function Kp({ ...e }) {
|
|
|
10140
10169
|
a.title
|
|
10141
10170
|
);
|
|
10142
10171
|
return a.tooltip && !s ? /* @__PURE__ */ l.jsxs(fs, { children: [
|
|
10143
|
-
/* @__PURE__ */ l.jsx(vs, { asChild: !0, children: /* @__PURE__ */ l.jsx("div", { children:
|
|
10172
|
+
/* @__PURE__ */ l.jsx(vs, { asChild: !0, children: /* @__PURE__ */ l.jsx("div", { children: d }) }),
|
|
10144
10173
|
/* @__PURE__ */ l.jsx(wr, { side: "top", align: "center", children: a.tooltip })
|
|
10145
|
-
] }, a.title) :
|
|
10174
|
+
] }, a.title) : d;
|
|
10146
10175
|
}) })
|
|
10147
10176
|
] }),
|
|
10148
10177
|
/* @__PURE__ */ l.jsx(mf, {})
|
|
@@ -10406,7 +10435,7 @@ function um({
|
|
|
10406
10435
|
onSubmit: n,
|
|
10407
10436
|
isLoading: r = !1
|
|
10408
10437
|
}) {
|
|
10409
|
-
const o = om(e), [a, s] = Re({}), i = Tr[e],
|
|
10438
|
+
const o = om(e), [a, s] = Re({}), i = Tr[e], u = i.icon, d = (v, p) => {
|
|
10410
10439
|
s((h) => ({ ...h, [v]: p }));
|
|
10411
10440
|
}, f = (v) => {
|
|
10412
10441
|
v.preventDefault();
|
|
@@ -10434,11 +10463,11 @@ function um({
|
|
|
10434
10463
|
/* @__PURE__ */ l.jsx("div", { className: `p-2 rounded-full ${i.bgColor}`, children: i.isImage ? /* @__PURE__ */ l.jsx(
|
|
10435
10464
|
"img",
|
|
10436
10465
|
{
|
|
10437
|
-
src:
|
|
10466
|
+
src: u,
|
|
10438
10467
|
alt: `${i.name} icon`,
|
|
10439
10468
|
className: "w-6 h-6 object-contain"
|
|
10440
10469
|
}
|
|
10441
|
-
) : /* @__PURE__ */ l.jsx(
|
|
10470
|
+
) : /* @__PURE__ */ l.jsx(u, { className: `w-6 h-6 ${i.color}` }) }),
|
|
10442
10471
|
/* @__PURE__ */ l.jsxs("h1", { className: "text-2xl font-bold text-gray-900", children: [
|
|
10443
10472
|
"Connect to ",
|
|
10444
10473
|
i.name
|
|
@@ -10472,7 +10501,7 @@ function um({
|
|
|
10472
10501
|
type: o.connectionNameField.type,
|
|
10473
10502
|
id: o.connectionNameField.name,
|
|
10474
10503
|
value: a[o.connectionNameField.name] || "",
|
|
10475
|
-
onChange: (v) =>
|
|
10504
|
+
onChange: (v) => d(
|
|
10476
10505
|
o.connectionNameField.name,
|
|
10477
10506
|
v.target.value
|
|
10478
10507
|
),
|
|
@@ -10502,7 +10531,7 @@ function um({
|
|
|
10502
10531
|
type: v.type,
|
|
10503
10532
|
id: v.name,
|
|
10504
10533
|
value: a[v.name] || "",
|
|
10505
|
-
onChange: (p) =>
|
|
10534
|
+
onChange: (p) => d(v.name, p.target.value),
|
|
10506
10535
|
className: "w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",
|
|
10507
10536
|
placeholder: v.placeholder,
|
|
10508
10537
|
required: v.required
|
|
@@ -10544,7 +10573,7 @@ const _m = ({
|
|
|
10544
10573
|
isLoading: t
|
|
10545
10574
|
}
|
|
10546
10575
|
) : /* @__PURE__ */ l.jsx("div", { children: /* @__PURE__ */ l.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", children: Object.entries(Tr).sort(([, s], [, i]) => s.name.localeCompare(i.name)).map(([s, i]) => {
|
|
10547
|
-
const
|
|
10576
|
+
const u = i.icon;
|
|
10548
10577
|
return /* @__PURE__ */ l.jsx(
|
|
10549
10578
|
Rn,
|
|
10550
10579
|
{
|
|
@@ -10558,11 +10587,11 @@ const _m = ({
|
|
|
10558
10587
|
children: i.isImage ? /* @__PURE__ */ l.jsx(
|
|
10559
10588
|
"img",
|
|
10560
10589
|
{
|
|
10561
|
-
src:
|
|
10590
|
+
src: u,
|
|
10562
10591
|
alt: `${i.name} icon`,
|
|
10563
10592
|
className: "w-8 h-8 object-contain"
|
|
10564
10593
|
}
|
|
10565
|
-
) : /* @__PURE__ */ l.jsx(
|
|
10594
|
+
) : /* @__PURE__ */ l.jsx(u, { className: `w-8 h-8 ${i.color}` })
|
|
10566
10595
|
}
|
|
10567
10596
|
),
|
|
10568
10597
|
/* @__PURE__ */ l.jsx(Dr, { className: "text-xl", children: i.name })
|
|
@@ -10581,7 +10610,7 @@ const _m = ({
|
|
|
10581
10610
|
statusChangeLoadingStates: s = {},
|
|
10582
10611
|
refreshResultStates: i = {}
|
|
10583
10612
|
}) => {
|
|
10584
|
-
const
|
|
10613
|
+
const u = Tr[e.software], d = u.icon, f = a[e.provider.id], c = s[e.provider.id], v = i[e.provider.id], p = (y) => {
|
|
10585
10614
|
switch (y) {
|
|
10586
10615
|
case he.ACTIVE:
|
|
10587
10616
|
return "bg-green-500";
|
|
@@ -10619,15 +10648,15 @@ const _m = ({
|
|
|
10619
10648
|
/* @__PURE__ */ l.jsx(
|
|
10620
10649
|
"div",
|
|
10621
10650
|
{
|
|
10622
|
-
className: `w-16 h-16 rounded-full ${
|
|
10623
|
-
children:
|
|
10651
|
+
className: `w-16 h-16 rounded-full ${u.bgColor} mx-auto flex items-center justify-center mb-4`,
|
|
10652
|
+
children: u.isImage ? /* @__PURE__ */ l.jsx(
|
|
10624
10653
|
"img",
|
|
10625
10654
|
{
|
|
10626
|
-
src:
|
|
10627
|
-
alt: `${
|
|
10655
|
+
src: d,
|
|
10656
|
+
alt: `${u.name} icon`,
|
|
10628
10657
|
className: "w-8 h-8 object-contain"
|
|
10629
10658
|
}
|
|
10630
|
-
) : /* @__PURE__ */ l.jsx(
|
|
10659
|
+
) : /* @__PURE__ */ l.jsx(d, { className: `w-8 h-8 ${u.color}` })
|
|
10631
10660
|
}
|
|
10632
10661
|
),
|
|
10633
10662
|
/* @__PURE__ */ l.jsx(
|
|
@@ -10639,7 +10668,7 @@ const _m = ({
|
|
|
10639
10668
|
)
|
|
10640
10669
|
] }),
|
|
10641
10670
|
/* @__PURE__ */ l.jsx(Dr, { className: "text-lg", children: e.name }),
|
|
10642
|
-
/* @__PURE__ */ l.jsx("p", { className: "text-sm text-gray-600", children:
|
|
10671
|
+
/* @__PURE__ */ l.jsx("p", { className: "text-sm text-gray-600", children: u.name })
|
|
10643
10672
|
] }),
|
|
10644
10673
|
/* @__PURE__ */ l.jsx(Sr, { className: "pt-0", children: /* @__PURE__ */ l.jsxs("div", { className: "space-y-3", children: [
|
|
10645
10674
|
/* @__PURE__ */ l.jsxs("div", { className: "flex gap-2", children: [
|
|
@@ -10697,8 +10726,8 @@ const _m = ({
|
|
|
10697
10726
|
isLoading: a = !1,
|
|
10698
10727
|
editLoadingStates: s = {},
|
|
10699
10728
|
refreshLoadingStates: i = {},
|
|
10700
|
-
statusChangeLoadingStates:
|
|
10701
|
-
refreshResultStates:
|
|
10729
|
+
statusChangeLoadingStates: u = {},
|
|
10730
|
+
refreshResultStates: d = {}
|
|
10702
10731
|
}) => a ? /* @__PURE__ */ l.jsxs("div", { className: "max-w-6xl mx-auto p-6", children: [
|
|
10703
10732
|
/* @__PURE__ */ l.jsxs("div", { className: "mb-8", children: [
|
|
10704
10733
|
/* @__PURE__ */ l.jsx("h1", { className: "text-3xl font-bold text-gray-900 mb-2", children: "Your Connections" }),
|
|
@@ -10728,28 +10757,29 @@ const _m = ({
|
|
|
10728
10757
|
onStatusChange: r,
|
|
10729
10758
|
editLoadingStates: s,
|
|
10730
10759
|
refreshLoadingStates: i,
|
|
10731
|
-
statusChangeLoadingStates:
|
|
10732
|
-
refreshResultStates:
|
|
10760
|
+
statusChangeLoadingStates: u,
|
|
10761
|
+
refreshResultStates: d
|
|
10733
10762
|
},
|
|
10734
10763
|
f.provider.id
|
|
10735
10764
|
)) }) });
|
|
10736
10765
|
async function eh() {
|
|
10737
|
-
var e, t, n, r, o, a;
|
|
10766
|
+
var e, t, n, r, o, a, s;
|
|
10738
10767
|
try {
|
|
10739
|
-
const
|
|
10740
|
-
if (!
|
|
10741
|
-
return { essentialInsights: !1, organic: !1, paid: !1, web: !1, priceMonster: !1, se_company_id: null };
|
|
10742
|
-
const d = (e = Si(
|
|
10768
|
+
const i = await Di();
|
|
10769
|
+
if (!i || i === "No token available")
|
|
10770
|
+
return { essentialInsights: !1, organic: !1, paid: !1, web: !1, priceMonster: !1, management: !1, se_company_id: null };
|
|
10771
|
+
const d = (e = Si(i)["https://cloud.golocal.com/org_metadata"]) == null ? void 0 : e.metadata;
|
|
10743
10772
|
return {
|
|
10744
10773
|
essentialInsights: ((t = d == null ? void 0 : d["essential-insights"]) == null ? void 0 : t.enabled) === !0,
|
|
10745
10774
|
organic: ((n = d == null ? void 0 : d.organic) == null ? void 0 : n.enabled) === !0,
|
|
10746
10775
|
paid: ((r = d == null ? void 0 : d.paid) == null ? void 0 : r.enabled) === !0,
|
|
10747
10776
|
web: ((o = d == null ? void 0 : d.web) == null ? void 0 : o.enabled) === !0,
|
|
10748
10777
|
priceMonster: ((a = d == null ? void 0 : d["price-monster"]) == null ? void 0 : a.enabled) === !0,
|
|
10778
|
+
management: ((s = d == null ? void 0 : d.management) == null ? void 0 : s.enabled) === !0,
|
|
10749
10779
|
se_company_id: (d == null ? void 0 : d.se_company_id) || null
|
|
10750
10780
|
};
|
|
10751
|
-
} catch (
|
|
10752
|
-
return console.error("Error getting user permissions:",
|
|
10781
|
+
} catch (i) {
|
|
10782
|
+
return console.error("Error getting user permissions:", i), { essentialInsights: !1, organic: !1, paid: !1, web: !1, priceMonster: !1, management: !1, se_company_id: null };
|
|
10753
10783
|
}
|
|
10754
10784
|
}
|
|
10755
10785
|
const pi = A.createContext(null);
|