UNPKG

@stackoverfloweth/prefect-design

Version:

A collection of low-level Vue components.

1,803 lines 2.62 MB
var y9 = Object.defineProperty; var v9 = (i, d, t) => d in i ? y9(i, d, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[d] = t; var wl = (i, d, t) => v9(i, typeof d != "symbol" ? d + "" : d, t); import { computed as x, unref as C, ref as j, shallowRef as zo, watch as ti, getCurrentScope as iu, onScopeDispose as g1, shallowReadonly as C1, getCurrentInstance as jt, toRef as cu, camelize as Eo, defineComponent as M, Comment as w9, mergeProps as nl, cloneVNode as U9, h as ji, toRefs as ac, openBlock as Z, createBlock as E, withCtx as f, renderSlot as w, withKeys as dn, normalizeProps as Rl, guardReactiveProps as Cl, reactive as It, createVNode as cl, createCommentVNode as Il, watchEffect as l0, markRaw as FX, nextTick as gi, onMounted as Bi, withModifiers as Rt, withDirectives as bc, vShow as y1, createTextVNode as fl, toDisplayString as hl, isRef as tu, normalizeStyle as vc, toHandlers as x9, resolveDynamicComponent as pc, effectScope as jI, readonly as B1, Fragment as _l, toHandlerKey as f9, onUnmounted as Jt, Teleport as hI, createElementBlock as m, renderList as Ml, useSlots as Sc, inject as Un, provide as k1, mergeDefaults as jo, customRef as Q9, onBeforeUnmount as Mo, onBeforeUpdate as g9, onUpdated as B9, useAttrs as sb, toValue as kc, createElementVNode as V, resolveComponent as Xi, Transition as Ib, createStaticVNode as xn, normalizeClass as vl, createSlots as V0, TransitionGroup as Do, vModelCheckbox as Oo, vModelText as m1, vModelSelect as k9, KeepAlive as S9, onErrorCaptured as T9, useModel as VI, vModelRadio as H9, mergeModels as z9, useCssVars as E9, createApp as j9 } from "vue"; const M9 = ["top", "right", "bottom", "left"], Nn = Math.min, tt = Math.max, MI = Math.round, UI = Math.floor, Fn = (i) => ({ x: i, y: i }), D9 = { left: "right", right: "left", bottom: "top", top: "bottom" }, O9 = { start: "end", end: "start" }; function LX(i, d, t) { return tt(i, Nn(d, t)); } function en(i, d) { return typeof i == "function" ? i(d) : i; } function sn(i) { return i.split("-")[0]; } function S1(i) { return i.split("-")[1]; } function du(i) { return i === "x" ? "y" : "x"; } function nu(i) { return i === "y" ? "height" : "width"; } function T1(i) { return ["top", "bottom"].includes(sn(i)) ? "y" : "x"; } function eu(i) { return du(T1(i)); } function P9(i, d, t) { t === void 0 && (t = !1); const e = S1(i), s = eu(i), b = nu(s); let a = s === "x" ? e === (t ? "end" : "start") ? "right" : "left" : e === "start" ? "bottom" : "top"; return d.reference[b] > d.floating[b] && (a = DI(a)), [a, DI(a)]; } function K9(i) { const d = DI(i); return [pX(i), d, pX(d)]; } function pX(i) { return i.replace(/start|end/g, (d) => O9[d]); } function _9(i, d, t) { const e = ["left", "right"], s = ["right", "left"], b = ["top", "bottom"], a = ["bottom", "top"]; switch (i) { case "top": case "bottom": return t ? d ? s : e : d ? e : s; case "left": case "right": return d ? b : a; default: return []; } } function A9(i, d, t, e) { const s = S1(i); let b = _9(sn(i), t === "start", e); return s && (b = b.map((a) => a + "-" + s), d && (b = b.concat(b.map(pX)))), b; } function DI(i) { return i.replace(/left|right|bottom|top/g, (d) => D9[d]); } function $9(i) { return { top: 0, right: 0, bottom: 0, left: 0, ...i }; } function Po(i) { return typeof i != "number" ? $9(i) : { top: i, right: i, bottom: i, left: i }; } function OI(i) { const { x: d, y: t, width: e, height: s } = i; return { width: e, height: s, top: t, left: d, right: d + e, bottom: t + s, x: d, y: t }; } function Au(i, d, t) { let { reference: e, floating: s } = i; const b = T1(d), a = eu(d), X = nu(a), o = sn(d), u = b === "y", R = e.x + e.width / 2 - s.width / 2, r = e.y + e.height / 2 - s.height / 2, h = e[X] / 2 - s[X] / 2; let N; switch (o) { case "top": N = { x: R, y: e.y - s.height }; break; case "bottom": N = { x: R, y: e.y + e.height }; break; case "right": N = { x: e.x + e.width, y: r }; break; case "left": N = { x: e.x - s.width, y: r }; break; default: N = { x: e.x, y: e.y }; } switch (S1(d)) { case "start": N[a] -= h * (t && u ? -1 : 1); break; case "end": N[a] += h * (t && u ? -1 : 1); break; } return N; } const q9 = async (i, d, t) => { const { placement: e = "bottom", strategy: s = "absolute", middleware: b = [], platform: a } = t, X = b.filter(Boolean), o = await (a.isRTL == null ? void 0 : a.isRTL(d)); let u = await a.getElementRects({ reference: i, floating: d, strategy: s }), { x: R, y: r } = Au(u, e, o), h = e, N = {}, L = 0; for (let v = 0; v < X.length; v++) { const { name: S, fn: P } = X[v], { x: A, y: U, data: B, reset: D } = await P({ x: R, y: r, initialPlacement: e, placement: h, strategy: s, middlewareData: N, rects: u, platform: a, elements: { reference: i, floating: d } }); R = A ?? R, r = U ?? r, N = { ...N, [S]: { ...N[S], ...B } }, D && L <= 50 && (L++, typeof D == "object" && (D.placement && (h = D.placement), D.rects && (u = D.rects === !0 ? await a.getElementRects({ reference: i, floating: d, strategy: s }) : D.rects), { x: R, y: r } = Au(u, h, o)), v = -1); } return { x: R, y: r, placement: h, strategy: s, middlewareData: N }; }; async function oI(i, d) { var t; d === void 0 && (d = {}); const { x: e, y: s, platform: b, rects: a, elements: X, strategy: o } = i, { boundary: u = "clippingAncestors", rootBoundary: R = "viewport", elementContext: r = "floating", altBoundary: h = !1, padding: N = 0 } = en(d, i), L = Po(N), S = X[h ? r === "floating" ? "reference" : "floating" : r], P = OI(await b.getClippingRect({ element: (t = await (b.isElement == null ? void 0 : b.isElement(S))) == null || t ? S : S.contextElement || await (b.getDocumentElement == null ? void 0 : b.getDocumentElement(X.floating)), boundary: u, rootBoundary: R, strategy: o })), A = r === "floating" ? { x: e, y: s, width: a.floating.width, height: a.floating.height } : a.reference, U = await (b.getOffsetParent == null ? void 0 : b.getOffsetParent(X.floating)), B = await (b.isElement == null ? void 0 : b.isElement(U)) ? await (b.getScale == null ? void 0 : b.getScale(U)) || { x: 1, y: 1 } : { x: 1, y: 1 }, D = OI(b.convertOffsetParentRelativeRectToViewportRelativeRect ? await b.convertOffsetParentRelativeRectToViewportRelativeRect({ elements: X, rect: A, offsetParent: U, strategy: o }) : A); return { top: (P.top - D.top + L.top) / B.y, bottom: (D.bottom - P.bottom + L.bottom) / B.y, left: (P.left - D.left + L.left) / B.x, right: (D.right - P.right + L.right) / B.x }; } const lr = (i) => ({ name: "arrow", options: i, async fn(d) { const { x: t, y: e, placement: s, rects: b, platform: a, elements: X, middlewareData: o } = d, { element: u, padding: R = 0 } = en(i, d) || {}; if (u == null) return {}; const r = Po(R), h = { x: t, y: e }, N = eu(s), L = nu(N), v = await a.getDimensions(u), S = N === "y", P = S ? "top" : "left", A = S ? "bottom" : "right", U = S ? "clientHeight" : "clientWidth", B = b.reference[L] + b.reference[N] - h[N] - b.floating[L], D = h[N] - b.reference[N], _ = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(u)); let ll = _ ? _[U] : 0; (!ll || !await (a.isElement == null ? void 0 : a.isElement(_))) && (ll = X.floating[U] || b.floating[L]); const T = B / 2 - D / 2, tl = ll / 2 - v[L] / 2 - 1, q = Nn(r[P], tl), ml = Nn(r[A], tl), Xl = q, Yl = ll - v[L] - ml, Ul = ll / 2 - v[L] / 2 + T, ol = LX(Xl, Ul, Yl), Dl = !o.arrow && S1(s) != null && Ul !== ol && b.reference[L] / 2 - (Ul < Xl ? q : ml) - v[L] / 2 < 0, Al = Dl ? Ul < Xl ? Ul - Xl : Ul - Yl : 0; return { [N]: h[N] + Al, data: { [N]: ol, centerOffset: Ul - ol - Al, ...Dl && { alignmentOffset: Al } }, reset: Dl }; } }), ir = function(i) { return i === void 0 && (i = {}), { name: "flip", options: i, async fn(d) { var t, e; const { placement: s, middlewareData: b, rects: a, initialPlacement: X, platform: o, elements: u } = d, { mainAxis: R = !0, crossAxis: r = !0, fallbackPlacements: h, fallbackStrategy: N = "bestFit", fallbackAxisSideDirection: L = "none", flipAlignment: v = !0, ...S } = en(i, d); if ((t = b.arrow) != null && t.alignmentOffset) return {}; const P = sn(s), A = sn(X) === X, U = await (o.isRTL == null ? void 0 : o.isRTL(u.floating)), B = h || (A || !v ? [DI(X)] : K9(X)); !h && L !== "none" && B.push(...A9(X, v, L, U)); const D = [X, ...B], _ = await oI(d, S), ll = []; let T = ((e = b.flip) == null ? void 0 : e.overflows) || []; if (R && ll.push(_[P]), r) { const Xl = P9(s, a, U); ll.push(_[Xl[0]], _[Xl[1]]); } if (T = [...T, { placement: s, overflows: ll }], !ll.every((Xl) => Xl <= 0)) { var tl, q; const Xl = (((tl = b.flip) == null ? void 0 : tl.index) || 0) + 1, Yl = D[Xl]; if (Yl) return { data: { index: Xl, overflows: T }, reset: { placement: Yl } }; let Ul = (q = T.filter((ol) => ol.overflows[0] <= 0).sort((ol, Dl) => ol.overflows[1] - Dl.overflows[1])[0]) == null ? void 0 : q.placement; if (!Ul) switch (N) { case "bestFit": { var ml; const ol = (ml = T.map((Dl) => [Dl.placement, Dl.overflows.filter((Al) => Al > 0).reduce((Al, Ui) => Al + Ui, 0)]).sort((Dl, Al) => Dl[1] - Al[1])[0]) == null ? void 0 : ml[0]; ol && (Ul = ol); break; } case "initialPlacement": Ul = X; break; } if (s !== Ul) return { reset: { placement: Ul } }; } return {}; } }; }; function $u(i, d) { return { top: i.top - d.height, right: i.right - d.width, bottom: i.bottom - d.height, left: i.left - d.width }; } function qu(i) { return M9.some((d) => i[d] >= 0); } const cr = function(i) { return i === void 0 && (i = {}), { name: "hide", options: i, async fn(d) { const { rects: t } = d, { strategy: e = "referenceHidden", ...s } = en(i, d); switch (e) { case "referenceHidden": { const b = await oI(d, { ...s, elementContext: "reference" }), a = $u(b, t.reference); return { data: { referenceHiddenOffsets: a, referenceHidden: qu(a) } }; } case "escaped": { const b = await oI(d, { ...s, altBoundary: !0 }), a = $u(b, t.floating); return { data: { escapedOffsets: a, escaped: qu(a) } }; } default: return {}; } } }; }; async function tr(i, d) { const { placement: t, platform: e, elements: s } = i, b = await (e.isRTL == null ? void 0 : e.isRTL(s.floating)), a = sn(t), X = S1(t), o = T1(t) === "y", u = ["left", "top"].includes(a) ? -1 : 1, R = b && o ? -1 : 1, r = en(d, i); let { mainAxis: h, crossAxis: N, alignmentAxis: L } = typeof r == "number" ? { mainAxis: r, crossAxis: 0, alignmentAxis: null } : { mainAxis: 0, crossAxis: 0, alignmentAxis: null, ...r }; return X && typeof L == "number" && (N = X === "end" ? L * -1 : L), o ? { x: N * R, y: h * u } : { x: h * u, y: N * R }; } const dr = function(i) { return i === void 0 && (i = 0), { name: "offset", options: i, async fn(d) { var t, e; const { x: s, y: b, placement: a, middlewareData: X } = d, o = await tr(d, i); return a === ((t = X.offset) == null ? void 0 : t.placement) && (e = X.arrow) != null && e.alignmentOffset ? {} : { x: s + o.x, y: b + o.y, data: { ...o, placement: a } }; } }; }, nr = function(i) { return i === void 0 && (i = {}), { name: "shift", options: i, async fn(d) { const { x: t, y: e, placement: s } = d, { mainAxis: b = !0, crossAxis: a = !1, limiter: X = { fn: (S) => { let { x: P, y: A } = S; return { x: P, y: A }; } }, ...o } = en(i, d), u = { x: t, y: e }, R = await oI(d, o), r = T1(sn(s)), h = du(r); let N = u[h], L = u[r]; if (b) { const S = h === "y" ? "top" : "left", P = h === "y" ? "bottom" : "right", A = N + R[S], U = N - R[P]; N = LX(A, N, U); } if (a) { const S = r === "y" ? "top" : "left", P = r === "y" ? "bottom" : "right", A = L + R[S], U = L - R[P]; L = LX(A, L, U); } const v = X.fn({ ...d, [h]: N, [r]: L }); return { ...v, data: { x: v.x - t, y: v.y - e } }; } }; }, er = function(i) { return i === void 0 && (i = {}), { options: i, fn(d) { const { x: t, y: e, placement: s, rects: b, middlewareData: a } = d, { offset: X = 0, mainAxis: o = !0, crossAxis: u = !0 } = en(i, d), R = { x: t, y: e }, r = T1(s), h = du(r); let N = R[h], L = R[r]; const v = en(X, d), S = typeof v == "number" ? { mainAxis: v, crossAxis: 0 } : { mainAxis: 0, crossAxis: 0, ...v }; if (o) { const U = h === "y" ? "height" : "width", B = b.reference[h] - b.floating[U] + S.mainAxis, D = b.reference[h] + b.reference[U] - S.mainAxis; N < B ? N = B : N > D && (N = D); } if (u) { var P, A; const U = h === "y" ? "width" : "height", B = ["top", "left"].includes(sn(s)), D = b.reference[r] - b.floating[U] + (B && ((P = a.offset) == null ? void 0 : P[r]) || 0) + (B ? 0 : S.crossAxis), _ = b.reference[r] + b.reference[U] + (B ? 0 : ((A = a.offset) == null ? void 0 : A[r]) || 0) - (B ? S.crossAxis : 0); L < D ? L = D : L > _ && (L = _); } return { [h]: N, [r]: L }; } }; }, sr = function(i) { return i === void 0 && (i = {}), { name: "size", options: i, async fn(d) { const { placement: t, rects: e, platform: s, elements: b } = d, { apply: a = () => { }, ...X } = en(i, d), o = await oI(d, X), u = sn(t), R = S1(t), r = T1(t) === "y", { width: h, height: N } = e.floating; let L, v; u === "top" || u === "bottom" ? (L = u, v = R === (await (s.isRTL == null ? void 0 : s.isRTL(b.floating)) ? "start" : "end") ? "left" : "right") : (v = u, L = R === "end" ? "top" : "bottom"); const S = N - o[L], P = h - o[v], A = !d.middlewareData.shift; let U = S, B = P; if (r) { const _ = h - o.left - o.right; B = R || A ? Nn(P, _) : _; } else { const _ = N - o.top - o.bottom; U = R || A ? Nn(S, _) : _; } if (A && !R) { const _ = tt(o.left, 0), ll = tt(o.right, 0), T = tt(o.top, 0), tl = tt(o.bottom, 0); r ? B = h - 2 * (_ !== 0 || ll !== 0 ? _ + ll : tt(o.left, o.right)) : U = N - 2 * (T !== 0 || tl !== 0 ? T + tl : tt(o.top, o.bottom)); } await a({ ...d, availableWidth: B, availableHeight: U }); const D = await s.getDimensions(b.floating); return h !== D.width || N !== D.height ? { reset: { rects: !0 } } : {}; } }; }; function W1(i) { return su(i) ? (i.nodeName || "").toLowerCase() : "#document"; } function nt(i) { var d; return (i == null || (d = i.ownerDocument) == null ? void 0 : d.defaultView) || window; } function In(i) { var d; return (d = (su(i) ? i.ownerDocument : i.document) || window.document) == null ? void 0 : d.documentElement; } function su(i) { return i instanceof Node || i instanceof nt(i).Node; } function dd(i) { return i instanceof Element || i instanceof nt(i).Element; } function nd(i) { return i instanceof HTMLElement || i instanceof nt(i).HTMLElement; } function lo(i) { return typeof ShadowRoot > "u" ? !1 : i instanceof ShadowRoot || i instanceof nt(i).ShadowRoot; } function CI(i) { const { overflow: d, overflowX: t, overflowY: e, display: s } = Et(i); return /auto|scroll|overlay|hidden|clip/.test(d + e + t) && !["inline", "contents"].includes(s); } function Ir(i) { return ["table", "td", "th"].includes(W1(i)); } function Iu(i) { const d = bu(), t = Et(i); return t.transform !== "none" || t.perspective !== "none" || (t.containerType ? t.containerType !== "normal" : !1) || !d && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !d && (t.filter ? t.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((e) => (t.willChange || "").includes(e)) || ["paint", "layout", "strict", "content"].some((e) => (t.contain || "").includes(e)); } function br(i) { let d = Ln(i); for (; nd(d) && !v1(d); ) { if (Iu(d)) return d; d = Ln(d); } return null; } function bu() { return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none"); } function v1(i) { return ["html", "body", "#document"].includes(W1(i)); } function Et(i) { return nt(i).getComputedStyle(i); } function bb(i) { return dd(i) ? { scrollLeft: i.scrollLeft, scrollTop: i.scrollTop } : { scrollLeft: i.pageXOffset, scrollTop: i.pageYOffset }; } function Ln(i) { if (W1(i) === "html") return i; const d = ( // Step into the shadow DOM of the parent of a slotted node. i.assignedSlot || // DOM Element detected. i.parentNode || // ShadowRoot detected. lo(i) && i.host || // Fallback. In(i) ); return lo(d) ? d.host : d; } function Ko(i) { const d = Ln(i); return v1(d) ? i.ownerDocument ? i.ownerDocument.body : i.body : nd(d) && CI(d) ? d : Ko(d); } function GI(i, d, t) { var e; d === void 0 && (d = []), t === void 0 && (t = !0); const s = Ko(i), b = s === ((e = i.ownerDocument) == null ? void 0 : e.body), a = nt(s); return b ? d.concat(a, a.visualViewport || [], CI(s) ? s : [], a.frameElement && t ? GI(a.frameElement) : []) : d.concat(s, GI(s, [], t)); } function _o(i) { const d = Et(i); let t = parseFloat(d.width) || 0, e = parseFloat(d.height) || 0; const s = nd(i), b = s ? i.offsetWidth : t, a = s ? i.offsetHeight : e, X = MI(t) !== b || MI(e) !== a; return X && (t = b, e = a), { width: t, height: e, $: X }; } function Zu(i) { return dd(i) ? i : i.contextElement; } function L1(i) { const d = Zu(i); if (!nd(d)) return Fn(1); const t = d.getBoundingClientRect(), { width: e, height: s, $: b } = _o(d); let a = (b ? MI(t.width) : t.width) / e, X = (b ? MI(t.height) : t.height) / s; return (!a || !Number.isFinite(a)) && (a = 1), (!X || !Number.isFinite(X)) && (X = 1), { x: a, y: X }; } const Zr = /* @__PURE__ */ Fn(0); function Ao(i) { const d = nt(i); return !bu() || !d.visualViewport ? Zr : { x: d.visualViewport.offsetLeft, y: d.visualViewport.offsetTop }; } function Vr(i, d, t) { return d === void 0 && (d = !1), !t || d && t !== nt(i) ? !1 : d; } function s1(i, d, t, e) { d === void 0 && (d = !1), t === void 0 && (t = !1); const s = i.getBoundingClientRect(), b = Zu(i); let a = Fn(1); d && (e ? dd(e) && (a = L1(e)) : a = L1(i)); const X = Vr(b, t, e) ? Ao(b) : Fn(0); let o = (s.left + X.x) / a.x, u = (s.top + X.y) / a.y, R = s.width / a.x, r = s.height / a.y; if (b) { const h = nt(b), N = e && dd(e) ? nt(e) : e; let L = h, v = L.frameElement; for (; v && e && N !== L; ) { const S = L1(v), P = v.getBoundingClientRect(), A = Et(v), U = P.left + (v.clientLeft + parseFloat(A.paddingLeft)) * S.x, B = P.top + (v.clientTop + parseFloat(A.paddingTop)) * S.y; o *= S.x, u *= S.y, R *= S.x, r *= S.y, o += U, u += B, L = nt(v), v = L.frameElement; } } return OI({ width: R, height: r, x: o, y: u }); } const ar = [":popover-open", ":modal"]; function Vu(i) { return ar.some((d) => { try { return i.matches(d); } catch { return !1; } }); } function mr(i) { let { elements: d, rect: t, offsetParent: e, strategy: s } = i; const b = s === "fixed", a = In(e), X = d ? Vu(d.floating) : !1; if (e === a || X && b) return t; let o = { scrollLeft: 0, scrollTop: 0 }, u = Fn(1); const R = Fn(0), r = nd(e); if ((r || !r && !b) && ((W1(e) !== "body" || CI(a)) && (o = bb(e)), nd(e))) { const h = s1(e); u = L1(e), R.x = h.x + e.clientLeft, R.y = h.y + e.clientTop; } return { width: t.width * u.x, height: t.height * u.y, x: t.x * u.x - o.scrollLeft * u.x + R.x, y: t.y * u.y - o.scrollTop * u.y + R.y }; } function Wr(i) { return Array.from(i.getClientRects()); } function $o(i) { return s1(In(i)).left + bb(i).scrollLeft; } function Xr(i) { const d = In(i), t = bb(i), e = i.ownerDocument.body, s = tt(d.scrollWidth, d.clientWidth, e.scrollWidth, e.clientWidth), b = tt(d.scrollHeight, d.clientHeight, e.scrollHeight, e.clientHeight); let a = -t.scrollLeft + $o(i); const X = -t.scrollTop; return Et(e).direction === "rtl" && (a += tt(d.clientWidth, e.clientWidth) - s), { width: s, height: b, x: a, y: X }; } function ur(i, d) { const t = nt(i), e = In(i), s = t.visualViewport; let b = e.clientWidth, a = e.clientHeight, X = 0, o = 0; if (s) { b = s.width, a = s.height; const u = bu(); (!u || u && d === "fixed") && (X = s.offsetLeft, o = s.offsetTop); } return { width: b, height: a, x: X, y: o }; } function or(i, d) { const t = s1(i, !0, d === "fixed"), e = t.top + i.clientTop, s = t.left + i.clientLeft, b = nd(i) ? L1(i) : Fn(1), a = i.clientWidth * b.x, X = i.clientHeight * b.y, o = s * b.x, u = e * b.y; return { width: a, height: X, x: o, y: u }; } function io(i, d, t) { let e; if (d === "viewport") e = ur(i, t); else if (d === "document") e = Xr(In(i)); else if (dd(d)) e = or(d, t); else { const s = Ao(i); e = { ...d, x: d.x - s.x, y: d.y - s.y }; } return OI(e); } function qo(i, d) { const t = Ln(i); return t === d || !dd(t) || v1(t) ? !1 : Et(t).position === "fixed" || qo(t, d); } function Gr(i, d) { const t = d.get(i); if (t) return t; let e = GI(i, [], !1).filter((X) => dd(X) && W1(X) !== "body"), s = null; const b = Et(i).position === "fixed"; let a = b ? Ln(i) : i; for (; dd(a) && !v1(a); ) { const X = Et(a), o = Iu(a); !o && X.position === "fixed" && (s = null), (b ? !o && !s : !o && X.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || CI(a) && !o && qo(i, a)) ? e = e.filter((R) => R !== a) : s = X, a = Ln(a); } return d.set(i, e), e; } function Rr(i) { let { element: d, boundary: t, rootBoundary: e, strategy: s } = i; const a = [...t === "clippingAncestors" ? Vu(d) ? [] : Gr(d, this._c) : [].concat(t), e], X = a[0], o = a.reduce((u, R) => { const r = io(d, R, s); return u.top = tt(r.top, u.top), u.right = Nn(r.right, u.right), u.bottom = Nn(r.bottom, u.bottom), u.left = tt(r.left, u.left), u; }, io(d, X, s)); return { width: o.right - o.left, height: o.bottom - o.top, x: o.left, y: o.top }; } function rr(i) { const { width: d, height: t } = _o(i); return { width: d, height: t }; } function Jr(i, d, t) { const e = nd(d), s = In(d), b = t === "fixed", a = s1(i, !0, b, d); let X = { scrollLeft: 0, scrollTop: 0 }; const o = Fn(0); if (e || !e && !b) if ((W1(d) !== "body" || CI(s)) && (X = bb(d)), e) { const r = s1(d, !0, b, d); o.x = r.x + d.clientLeft, o.y = r.y + d.clientTop; } else s && (o.x = $o(s)); const u = a.left + X.scrollLeft - o.x, R = a.top + X.scrollTop - o.y; return { x: u, y: R, width: a.width, height: a.height }; } function eX(i) { return Et(i).position === "static"; } function co(i, d) { return !nd(i) || Et(i).position === "fixed" ? null : d ? d(i) : i.offsetParent; } function lG(i, d) { const t = nt(i); if (Vu(i)) return t; if (!nd(i)) { let s = Ln(i); for (; s && !v1(s); ) { if (dd(s) && !eX(s)) return s; s = Ln(s); } return t; } let e = co(i, d); for (; e && Ir(e) && eX(e); ) e = co(e, d); return e && v1(e) && eX(e) && !Iu(e) ? t : e || br(i) || t; } const hr = async function(i) { const d = this.getOffsetParent || lG, t = this.getDimensions, e = await t(i.floating); return { reference: Jr(i.reference, await d(i.floating), i.strategy), floating: { x: 0, y: 0, width: e.width, height: e.height } }; }; function Cr(i) { return Et(i).direction === "rtl"; } const Yr = { convertOffsetParentRelativeRectToViewportRelativeRect: mr, getDocumentElement: In, getClippingRect: Rr, getOffsetParent: lG, getElementRects: hr, getClientRects: Wr, getDimensions: rr, getScale: L1, isElement: dd, isRTL: Cr }; function Nr(i, d) { let t = null, e; const s = In(i); function b() { var X; clearTimeout(e), (X = t) == null || X.disconnect(), t = null; } function a(X, o) { X === void 0 && (X = !1), o === void 0 && (o = 1), b(); const { left: u, top: R, width: r, height: h } = i.getBoundingClientRect(); if (X || d(), !r || !h) return; const N = UI(R), L = UI(s.clientWidth - (u + r)), v = UI(s.clientHeight - (R + h)), S = UI(u), A = { rootMargin: -N + "px " + -L + "px " + -v + "px " + -S + "px", threshold: tt(0, Nn(1, o)) || 1 }; let U = !0; function B(D) { const _ = D[0].intersectionRatio; if (_ !== o) { if (!U) return a(); _ ? a(!1, _) : e = setTimeout(() => { a(!1, 1e-7); }, 1e3); } U = !1; } try { t = new IntersectionObserver(B, { ...A, // Handle <iframe>s root: s.ownerDocument }); } catch { t = new IntersectionObserver(B, A); } t.observe(i); } return a(!0), b; } function Fr(i, d, t, e) { e === void 0 && (e = {}); const { ancestorScroll: s = !0, ancestorResize: b = !0, elementResize: a = typeof ResizeObserver == "function", layoutShift: X = typeof IntersectionObserver == "function", animationFrame: o = !1 } = e, u = Zu(i), R = s || b ? [...u ? GI(u) : [], ...GI(d)] : []; R.forEach((P) => { s && P.addEventListener("scroll", t, { passive: !0 }), b && P.addEventListener("resize", t); }); const r = u && X ? Nr(u, t) : null; let h = -1, N = null; a && (N = new ResizeObserver((P) => { let [A] = P; A && A.target === u && N && (N.unobserve(d), cancelAnimationFrame(h), h = requestAnimationFrame(() => { var U; (U = N) == null || U.observe(d); })), t(); }), u && !o && N.observe(u), N.observe(d)); let L, v = o ? s1(i) : null; o && S(); function S() { const P = s1(i); v && (P.x !== v.x || P.y !== v.y || P.width !== v.width || P.height !== v.height) && t(), v = P, L = requestAnimationFrame(S); } return t(), () => { var P; R.forEach((A) => { s && A.removeEventListener("scroll", t), b && A.removeEventListener("resize", t); }), r == null || r(), (P = N) == null || P.disconnect(), N = null, o && cancelAnimationFrame(L); }; } const Lr = dr, pr = nr, to = ir, yr = sr, vr = cr, wr = lr, Ur = er, xr = (i, d, t) => { const e = /* @__PURE__ */ new Map(), s = { platform: Yr, ...t }, b = { ...s.platform, _c: e }; return q9(i, d, { ...s, platform: b }); }; function fr(i) { return i != null && typeof i == "object" && "$el" in i; } function yX(i) { if (fr(i)) { const d = i.$el; return su(d) && W1(d) === "#comment" ? null : d; } return i; } function Qr(i) { return { name: "arrow", options: i, fn(d) { const t = yX(C(i.element)); return t == null ? {} : wr({ element: t, padding: i.padding }).fn(d); } }; } function iG(i) { return typeof window > "u" ? 1 : (i.ownerDocument.defaultView || window).devicePixelRatio || 1; } function no(i, d) { const t = iG(i); return Math.round(d * t) / t; } function gr(i, d, t) { t === void 0 && (t = {}); const e = t.whileElementsMounted, s = x(() => { var ll; return (ll = C(t.open)) != null ? ll : !0; }), b = x(() => C(t.middleware)), a = x(() => { var ll; return (ll = C(t.placement)) != null ? ll : "bottom"; }), X = x(() => { var ll; return (ll = C(t.strategy)) != null ? ll : "absolute"; }), o = x(() => { var ll; return (ll = C(t.transform)) != null ? ll : !0; }), u = x(() => yX(i.value)), R = x(() => yX(d.value)), r = j(0), h = j(0), N = j(X.value), L = j(a.value), v = zo({}), S = j(!1), P = x(() => { const ll = { position: N.value, left: "0", top: "0" }; if (!R.value) return ll; const T = no(R.value, r.value), tl = no(R.value, h.value); return o.value ? { ...ll, transform: "translate(" + T + "px, " + tl + "px)", ...iG(R.value) >= 1.5 && { willChange: "transform" } } : { position: N.value, left: T + "px", top: tl + "px" }; }); let A; function U() { u.value == null || R.value == null || xr(u.value, R.value, { middleware: b.value, placement: a.value, strategy: X.value }).then((ll) => { r.value = ll.x, h.value = ll.y, N.value = ll.strategy, L.value = ll.placement, v.value = ll.middlewareData, S.value = !0; }); } function B() { typeof A == "function" && (A(), A = void 0); } function D() { if (B(), e === void 0) { U(); return; } if (u.value != null && R.value != null) { A = e(u.value, R.value, U); return; } } function _() { s.value || (S.value = !1); } return ti([b, a, X], U, { flush: "sync" }), ti([u, R], D, { flush: "sync" }), ti(s, _, { flush: "sync" }), iu() && g1(B), { x: C1(r), y: C1(h), strategy: C1(N), placement: C1(L), middlewareData: C1(v), isPositioned: C1(S), floatingStyles: P, update: U }; } function w0(i, d) { const t = typeof i == "string" && !d ? `${i}Context` : d, e = Symbol(t); return [(s) => { const b = Un(e, s); if (b || b === null) return b; throw new Error( `Injection \`${e.toString()}\` not found. Component must be used within ${Array.isArray(i) ? `one of the following components: ${i.join( ", " )}` : `\`${i}\``}` ); }, (s) => (k1(e, s), s)]; } function au(i, d, t) { const e = t.originalEvent.target, s = new CustomEvent(i, { bubbles: !1, cancelable: !0, detail: t }); d && e.addEventListener(i, d, { once: !0 }), e.dispatchEvent(s); } function sX(i) { return i == null; } function Br(i, d) { var t; const e = zo(); return l0(() => { e.value = i(); }, { ...d, flush: (t = void 0) != null ? t : "sync" }), B1(e); } function H1(i) { return iu() ? (g1(i), !0) : !1; } function kr() { const i = /* @__PURE__ */ new Set(), d = (t) => { i.delete(t); }; return { on: (t) => { i.add(t); const e = () => d(t); return H1(e), { off: e }; }, off: d, trigger: (...t) => Promise.all(Array.from(i).map((e) => e(...t))) }; } function Sr(i) { let d = !1, t; const e = jI(!0); return (...s) => (d || (t = e.run(() => i(...s)), d = !0), t); } function Tr(i) { let d = 0, t, e; const s = () => { d -= 1, e && d <= 0 && (e.stop(), t = void 0, e = void 0); }; return (...b) => (d += 1, t || (e = jI(!0), t = e.run(() => i(...b))), H1(s), t); } function nn(i) { return typeof i == "function" ? i() : C(i); } const sd = typeof window < "u" && typeof document < "u"; typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope; const Hr = (i) => typeof i < "u", zr = (i) => i != null, Er = Object.prototype.toString, jr = (i) => Er.call(i) === "[object Object]", Mr = () => { }, eo = /* @__PURE__ */ Dr(); function Dr() { var i, d; return sd && ((i = window == null ? void 0 : window.navigator) == null ? void 0 : i.userAgent) && (/iP(ad|hone|od)/.test(window.navigator.userAgent) || ((d = window == null ? void 0 : window.navigator) == null ? void 0 : d.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent)); } function Or(i) { return jt(); } function cG(i, d = 1e4) { return Q9((t, e) => { let s = nn(i), b; const a = () => setTimeout(() => { s = nn(i), e(); }, nn(d)); return H1(() => { clearTimeout(b); }), { get() { return t(), s; }, set(X) { s = X, e(), clearTimeout(b), b = a(); } }; }); } function Pr(i, d) { Or() && Mo(i, d); } function tG(i, d, t = {}) { const { immediate: e = !0 } = t, s = j(!1); let b = null; function a() { b && (clearTimeout(b), b = null); } function X() { s.value = !1, a(); } function o(...u) { a(), s.value = !0, b = setTimeout(() => { s.value = !1, b = null, i(...u); }, nn(d)); } return e && (s.value = !0, sd && o()), H1(X), { isPending: B1(s), start: o, stop: X }; } function bn(i) { var d; const t = nn(i); return (d = t == null ? void 0 : t.$el) != null ? d : t; } const mu = sd ? window : void 0; function PI(...i) { let d, t, e, s; if (typeof i[0] == "string" || Array.isArray(i[0]) ? ([t, e, s] = i, d = mu) : [d, t, e, s] = i, !d) return Mr; Array.isArray(t) || (t = [t]), Array.isArray(e) || (e = [e]); const b = [], a = () => { b.forEach((R) => R()), b.length = 0; }, X = (R, r, h, N) => (R.addEventListener(r, h, N), () => R.removeEventListener(r, h, N)), o = ti( () => [bn(d), nn(s)], ([R, r]) => { if (a(), !R) return; const h = jr(r) ? { ...r } : r; b.push( ...t.flatMap((N) => e.map((L) => X(R, N, L, h))) ); }, { immediate: !0, flush: "post" } ), u = () => { o(), a(); }; return H1(u), u; } function Kr(i) { return typeof i == "function" ? i : typeof i == "string" ? (d) => d.key === i : Array.isArray(i) ? (d) => i.includes(d.key) : () => !0; } function _r(...i) { let d, t, e = {}; i.length === 3 ? (d = i[0], t = i[1], e = i[2]) : i.length === 2 ? typeof i[1] == "object" ? (d = !0, t = i[0], e = i[1]) : (d = i[0], t = i[1]) : (d = !0, t = i[0]); const { target: s = mu, eventName: b = "keydown", passive: a = !1, dedupe: X = !1 } = e, o = Kr(d); return PI(s, b, (u) => { u.repeat && nn(X) || o(u) && t(u); }, a); } function dG() { const i = j(!1), d = jt(); return d && Bi(() => { i.value = !0; }, d), i; } function Ar(i) { const d = dG(); return x(() => (d.value, !!i())); } function $r(i) { return JSON.parse(JSON.stringify(i)); } function qr(i, d, t = {}) { const { window: e = mu, ...s } = t; let b; const a = Ar(() => e && "MutationObserver" in e), X = () => { b && (b.disconnect(), b = void 0); }, o = x(() => { const h = nn(i), N = (Array.isArray(h) ? h : [h]).map(bn).filter(zr); return new Set(N); }), u = ti( () => o.value, (h) => { X(), a.value && e && h.size && (b = new MutationObserver(d), h.forEach((N) => b.observe(N, s))); }, { immediate: !0, flush: "post" } ), R = () => b == null ? void 0 : b.takeRecords(), r = () => { X(), u(); }; return H1(r), { isSupported: a, stop: r, takeRecords: R }; } function Gt(i, d, t, e = {}) { var s, b, a; const { clone: X = !1, passive: o = !1, eventName: u, deep: R = !1, defaultValue: r, shouldEmit: h } = e, N = jt(), L = t || (N == null ? void 0 : N.emit) || ((s = N == null ? void 0 : N.$emit) == null ? void 0 : s.bind(N)) || ((a = (b = N == null ? void 0 : N.proxy) == null ? void 0 : b.$emit) == null ? void 0 : a.bind(N == null ? void 0 : N.proxy)); let v = u; d || (d = "modelValue"), v = v || `update:${d.toString()}`; const S = (U) => X ? typeof X == "function" ? X(U) : $r(U) : U, P = () => Hr(i[d]) ? S(i[d]) : r, A = (U) => { h ? h(U) && L(v, U) : L(v, U); }; if (o) { const U = P(), B = j(U); let D = !1; return ti( () => i[d], (_) => { D || (D = !0, B.value = S(_), gi(() => D = !1)); } ), ti( B, (_) => { !D && (_ !== i[d] || R) && A(_); }, { deep: R } ), B; } else return x({ get() { return P(); }, set(U) { A(U); } }); } function Wu(i) { return i ? i.flatMap((d) => d.type === _l ? Wu(d.children) : [d]) : []; } const lJ = ["INPUT", "TEXTAREA"]; function nG(i, d, t, e = {}) { if (!d || e.enableIgnoredElement && lJ.includes(d.nodeName)) return null; const { arrowKeyOptions: s = "both", attributeName: b = "[data-radix-vue-collection-item]", itemsArray: a = [], loop: X = !0, dir: o = "ltr", preventScroll: u = !0, focus: R = !1 } = e, [r, h, N, L, v, S] = [ i.key === "ArrowRight", i.key === "ArrowLeft", i.key === "ArrowUp", i.key === "ArrowDown", i.key === "Home", i.key === "End" ], P = N || L, A = r || h; if (!v && !S && (!P && !A || s === "vertical" && A || s === "horizontal" && P)) return null; const U = t ? Array.from(t.querySelectorAll(b)) : a; if (!U.length) return null; u && i.preventDefault(); let B = null; return A || P ? B = eG(U, d, { goForward: P ? L : o === "ltr" ? r : h, loop: X }) : v ? B = U.at(0) || null : S && (B = U.at(-1) || null), R && (B == null || B.focus()), B; } function eG(i, d, t, e = i.length) { if (--e === 0) return null; const s = i.indexOf(d), b = t.goForward ? s + 1 : s - 1; if (!t.loop && (b < 0 || b >= i.length)) return null; const a = (b + i.length) % i.length, X = i[a]; return X ? X.hasAttribute("disabled") && X.getAttribute("disabled") !== "false" ? eG( i, X, t, e ) : X : null; } function IX(i) { if (i === null || typeof i != "object") return !1; const d = Object.getPrototypeOf(i); return d !== null && d !== Object.prototype && Object.getPrototypeOf(d) !== null || Symbol.iterator in i ? !1 : Symbol.toStringTag in i ? Object.prototype.toString.call(i) === "[object Module]" : !0; } function vX(i, d, t = ".", e) { if (!IX(d)) return vX(i, {}, t); const s = Object.assign({}, d); for (const b in i) { if (b === "__proto__" || b === "constructor") continue; const a = i[b]; a != null && (Array.isArray(a) && Array.isArray(s[b]) ? s[b] = [...a, ...s[b]] : IX(a) && IX(s[b]) ? s[b] = vX( a, s[b], (t ? `${t}.` : "") + b.toString() ) : s[b] = a); } return s; } function iJ(i) { return (...d) => ( // eslint-disable-next-line unicorn/no-array-reduce d.reduce((t, e) => vX(t, e, ""), {}) ); } const cJ = iJ(), [Xu, vll] = w0("ConfigProvider"); let tJ = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", dJ = (i = 21) => { let d = "", t = i; for (; t--; ) d += tJ[Math.random() * 64 | 0]; return d; }; const nJ = Tr(() => { const i = j(/* @__PURE__ */ new Map()), d = j(), t = x(() => { for (const a of i.value.values()) if (a) return !0; return !1; }), e = Xu({ scrollBody: j(!0) }); let s = null; const b = () => { document.body.style.paddingRight = "", document.body.style.marginRight = "", document.body.style.pointerEvents = "", document.body.style.removeProperty("--scrollbar-width"), document.body.style.overflow = d.value ?? "", eo && (s == null || s()), d.value = void 0; }; return ti(t, (a, X) => { var o; if (!sd) return; if (!a) { X && b(); return; } d.value === void 0 && (d.value = document.body.style.overflow); const u = window.innerWidth - document.documentElement.clientWidth, R = { padding: u, margin: 0 }, r = (o = e.scrollBody) != null && o.value ? typeof e.scrollBody.value == "object" ? cJ({ padding: e.scrollBody.value.padding === !0 ? u : e.scrollBody.value.padding, margin: e.scrollBody.value.margin === !0 ? u : e.scrollBody.value.margin }, R) : R : { padding: 0, margin: 0 }; u > 0 && (document.body.style.paddingRight = `${r.padding}px`, document.body.style.marginRight = `${r.margin}px`, document.body.style.setProperty("--scrollbar-width", `${u}px`), document.body.style.overflow = "hidden"), eo && (s = PI( document, "touchmove", (h) => { var N; h.target === document.documentElement && (h.touches.length > 1 || (N = h.preventDefault) == null || N.call(h)); }, { passive: !1 } )), gi(() => { document.body.style.pointerEvents = "none", document.body.style.overflow = "hidden"; }); }, { immediate: !0, flush: "sync" }), i; }); function uu(i) { const d = dJ(6), t = nJ(); t.value.set(d, i ?? !1); const e = x({ get: () => t.value.get(d) ?? !1, set: (s) => t.value.set(d, s) }); return Pr(() => { t.value.delete(d); }), e; } const eJ = "data-radix-vue-collection-item"; function ou(i, d = eJ) { const t = i ?? Symbol(); return { createCollection: (e) => { const s = j([]); function b() { const a = bn(e); return a ? s.value = Array.from( a.querySelectorAll(`[${d}]:not([data-disabled])`) ) : s.value = []; } return g9(() => { s.value = []; }), Bi(b), B9(b), ti(() => e == null ? void 0 : e.value, b, { immediate: !0 }), k1(t, s), s; }, injectCollection: () => Un(t, j([])) }; } function z1(i) { const d = Xu({ dir: j("ltr") }); return x(() => { var t; return (i == null ? void 0 : i.value) || ((t = d.dir) == null ? void 0 : t.value) || "ltr"; }); } function YI(i) { const d = jt(), t = d == null ? void 0 : d.type.emits, e = {}; return t != null && t.length || console.warn( `No emitted event found. Please check component: ${d == null ? void 0 : d.type.__name}` ), t == null || t.forEach((s) => { e[f9(Eo(s))] = (...b) => i(s, ...b); }), e; } let bX = 0; function sJ() { l0((i) => { if (!sd) return; const d = document.querySelectorAll("[data-radix-focus-guard]"); document.body.insertAdjacentElement( "afterbegin", d[0] ?? so() ), document.body.insertAdjacentElement( "beforeend", d[1] ?? so() ), bX++, i(() => { bX === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), bX--; }); }); } function so() { const i = document.createElement("span"); return i.setAttribute("data-radix-focus-guard", ""), i.tabIndex = 0, i.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none", i; } function IJ(i) { return x(() => { var d; return nn(i) ? !!((d = bn(i)) != null && d.closest("form")) : !0; }); } function X1(i) { const d = jt(), t = Object.keys((d == null ? void 0 : d.type.props) ?? {}).reduce((s, b) => { const a = (d == null ? void 0 : d.type.props[b]).default; return a !== void 0 && (s[b] = a), s; }, {}), e = cu(i); return x(() => { const s = {}, b = (d == null ? void 0 : d.vnode.props) ?? {}; return Object.keys(b).forEach((a) => { s[Eo(a)] = b[a]; }), Object.keys({ ...t, ...s }).reduce((a, X) => (e.value[X] !== void 0 && (a[X] = e.value[X]), a), {}); }); } function j0(i, d) { const t = X1(i), e = d ? YI(d) : {}; return x(() => ({ ...t.value, ...e })); } function Pl() { const i = jt(), d = j(), t = x(() => { var a, X; return ["#text", "#comment"].includes((a = d.value) == null ? void 0 : a.$el.nodeName) ? (X = d.value) == null ? void 0 : X.$el.nextElementSibling : bn(d); }), e = Object.assign({}, i.exposed), s = {}; for (const a in i.props) Object.defineProperty(s, a, { enumerable: !0, configurable: !0, get: () => i.props[a] }); if (Object.keys(e).length > 0) for (const a in e) Object.defineProperty(s, a, { enumerable: !0, configurable: !0, get: () => e[a] }); Object.defineProperty(s, "$el", { enumerable: !0, configurable: !0, get: () => i.vnode.el }), i.exposed = s; function b(a) { d.value = a, !(a instanceof Element || !a) && (Object.defineProperty(s, "$el", { enumerable: !0, configurable: !0, get: () => a.$el }), i.exposed = s); } return { forwardRef: b, currentRef: d, currentElement: t }; } function bJ(i, d) { const t = cG(!1, 300), e = j(null), s = kr(); function b() { e.value = null, t.value = !1; } function a(X, o) { const u = X.currentTarget, R = { x: X.clientX, y: X.clientY }, r = ZJ(R, u.getBoundingClientRect()), h = VJ(R, r), N = aJ(o.getBoundingClientRect()), L = WJ([...h, ...N]); e.value = L, t.value = !0; } return l0((X) => { if (i.value && d.value) { const o = (R) => a(R, d.value), u = (R) => a(R, i.value); i.value.addEventListener("pointerleave", o), d.value.addEventListener("pointerleave", u), X(() => { var R, r; (R = i.value) == null || R.removeEventListener("pointerleave", o), (r = d.value) == null || r.removeEventListener("pointerleave", u); }); } }), l0((X) => { if (e.value) { const o = (u) => { var R, r; if (!e.value) return; const h = u.target, N = { x: u.clientX, y: u.clientY }, L = ((R = i.value) == null ? void 0 : R.contains(h)) || ((r = d.value) == null ? void 0 : r.contains(h)), v = !mJ(N, e.value); L ? b() : v && (b(), s.trigger()); }; document.addEventListener("pointermove", o), X(() => document.removeEventListener("pointermove", o)); } }), { isPointerInTransit: t, onPointerExit: s.on }; } function ZJ(i, d) { const t = Math.abs(d.top - i.y), e = Math.abs(d.bottom - i.y), s = Math.abs(d.right - i.x), b = Math.abs(d.left - i.x); switch (Math.min(t, e, s, b)) { case b: return "left"; case s: return "right"; case t: return "top"; case e: return "bottom"; default: throw new Error("unreachable"); } } function VJ(i, d, t = 5) { const e = []; switch (d) { case "top": e.push( { x: i.x - t, y: i.y + t }, { x: i.x + t, y: i.y + t } ); break; case "bottom": e.push( { x: i.x - t, y: i.y - t }, { x: i.x + t, y: i.y - t } ); break; case "left": e.push( { x: i.x + t, y: i.y - t }, { x: i.x + t, y: i.y + t } ); break; case "right": e.push( { x: i.x - t, y: i.y - t }, { x: i.x - t, y: i.y + t } ); break; } return e; } function aJ(i) { const { top: d, right: t, bottom: e, left: s } = i; return [ { x: s, y: d }, { x: t, y: d }, { x: t, y: e }, { x: s, y: e } ]; } function mJ(i, d) { const { x: t, y: e } = i; let s = !1; for (let b = 0, a = d.length - 1; b < d.length; a = b++) { const X = d[b].x, o = d[b].y, u = d[a].x, R = d[a].y; o > e != R > e && t < (u - X) * (e - o) / (R - o) + X && (s = !s); } return s; } function WJ(i) { const d = i.slice(); return d.sort((t, e) => t.x < e.x ? -1 : t.x > e.x ? 1 : t.y < e.y ? -1 : t.y > e.y ? 1 : 0), XJ(d); } function XJ(i) { if (i.length <= 1) return i.slice(); const d = []; for (let e = 0; e < i.length; e++) { const s = i[e]; for (; d.length >= 2; ) { const b = d[d.length - 1], a = d[d.length - 2]; if ((b.x - a.x) * (s.y - a.y) >= (b.y - a.y) * (s.x - a.x)) d.pop(); else break; } d.push(s); } d.pop(); const t = []; for (let e = i.length - 1; e >= 0; e--) { const s = i[e]; for (; t.length >= 2; ) { const b = t[t.length - 1], a = t[t.length - 2]; if ((b.x - a.x) * (s.y - a.y) >= (b.y - a.y) * (s.x - a.x)) t.pop(); else break; } t.push(s); } return t.pop(), d.length === 1 && t.length === 1 && d[0].x === t[0].x && d[0].y === t[0].y ? d : d.concat(t); } var uJ = function(i) { if (typeof document > "u") return null; var d = Array.isArray(i) ? i[0] : i; return d.ownerDocument.body; }, Y1 = /* @__PURE__ */ new WeakMap(), xI = /* @__PURE__ */ new WeakMap(), fI = {