UNPKG

vue-amazing-ui

Version:

An Amazing Vue3 UI Components Library, Using TypeScript.

1,292 lines (1,291 loc) 555 kB
import { onMounted as vt, onUnmounted as Tl, ref as c, computed as v, toValue as rl, watch as ze, onBeforeUnmount as Lt, useSlots as ba, reactive as yl, inject as Yl, toRefs as ql, getCurrentInstance as wa, Comment as ka, Text as $a, defineComponent as ge, createBlock as ke, openBlock as a, Transition as it, withCtx as ie, createElementBlock as n, createCommentVNode as F, normalizeStyle as R, normalizeClass as A, unref as j, createElementVNode as s, Fragment as de, renderSlot as H, createTextVNode as Q, toDisplayString as Y, withKeys as qe, withModifiers as Pe, nextTick as Ge, resolveDynamicComponent as at, createVNode as we, withDirectives as De, vShow as We, mergeProps as pe, createSlots as $l, renderList as Be, createStaticVNode as Nt, watchEffect as st, vModelText as Dl, mergeModels as Gl, useModel as Ca, provide as Xl, normalizeProps as Qt, guardReactiveProps as Jt, h as Sa, Teleport as Ma, TransitionGroup as Hl, isVNode as bl, shallowRef as al } from "vue"; import { TinyColor as Ht } from "@ctrl/tinycolor"; import { generate as Vl } from "@ant-design/colors"; import { getYear as vl, getMonth as qt, parse as za, format as Gt, startOfDay as pl, startOfMonth as Sl, getTime as Rt, addDays as hl, getDay as Ba, startOfYear as La, addMonths as Fa, set as Zl, isSameDay as Ea, isSameMonth as Ql, getDate as Pa } from "date-fns"; import { useTransition as sa, TransitionPresets as Ra } from "@vueuse/core"; import { toRgbaString as St, toHexString as ol, rgba as Mt, rgb2hsv as Ml, hsla as Xt, hsl2hsv as Jl, hsva as Wt, hsl2rgb as zl, hsv2rgb as At, rgb2hsl as Bl, hsv2hsl as ml, toHexaString as Tt, toHslaString as Dt, toRgbString as Ll, toHslString as Fl, toHsvaString as Ot, toHsvString as El } from "seemly"; import Aa from "@vuepic/vue-datepicker"; import gl from "qrcode"; import { Swiper as Pl, SwiperSlide as Rl } from "swiper/vue"; import { Autoplay as _l, Navigation as ea, Pagination as ta, Mousewheel as Ta, EffectCreative as Da, EffectCards as Ha, EffectCoverflow as Va, EffectFlip as Ia, EffectCube as Wa, EffectFade as Oa } from "swiper/modules"; function _c($ = Date.now(), l = "YYYY-MM-DD HH:mm:ss") { try { let e; if (typeof $ == "number" || typeof $ == "string") { if (e = new Date($), isNaN(e.getTime())) throw new Error("Invalid date"); } else e = $; const t = (i, u = 2) => String(i).padStart(u, "0"), r = (i) => { switch (i) { case "YYYY": return t(e.getFullYear()); case "YY": return t(e.getFullYear()).slice(2, 4); case "MM": return t(e.getMonth() + 1); case "M": return String(e.getMonth() + 1); case "DD": return t(e.getDate()); case "D": return String(e.getDate()); case "HH": return t(e.getHours()); case "H": return String(e.getHours()); case "mm": return t(e.getMinutes()); case "m": return String(e.getMinutes()); case "ss": return t(e.getSeconds()); case "s": return String(e.getSeconds()); case "SSS": return t(e.getMilliseconds(), 3); default: return i; } }; return l.replace(/(YYYY|YY|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS)/g, r); } catch (e) { return console.error("Error formatting date:", e), ""; } } function na($, l = 2, e = ",", t = ".", r, i) { typeof $ != "number" && typeof $ != "string" && console.warn("Expected value to be of type number or string"), typeof l != "number" && console.warn("Expected precision to be of type number"); const u = Number($); if (isNaN(u) || !isFinite(u)) return ""; if (u === 0) return u.toFixed(l); let o = u.toFixed(l); if (typeof e == "string" && e !== "") { const [p, d] = o.split("."); o = p.replace(/(\d)(?=(\d{3})+$)/g, "$1" + e) + (d ? t + d : ""); } return (r || "") + o + (i || ""); } function zt($, l = 0, e = !1) { let t = null; function r(u) { if (t || (t = u), u - t >= l) { try { $(); } catch (p) { console.error("Error executing rafTimeout function:", p); } e && (t = u, i.id = requestAnimationFrame(r)); } else i.id = requestAnimationFrame(r); } const i = { id: requestAnimationFrame(r) }; return i; } function dt($) { $ && $.id && typeof $.id == "number" ? cancelAnimationFrame($.id) : console.warn("cancelRaf received an invalid id:", $); } function xa($, l = 300) { let e = !0; return function(...t) { if (!e) return !1; e && ($(...t), e = !1, setTimeout(() => { e = !0; }, l)); }; } function Zt($, l = 300) { let e = null; return function(...t) { e && clearTimeout(e), e = setTimeout(() => { $(...t); }, l); }; } function nl($, l) { if (Number.isNaN($) || Number.isNaN(l)) throw new Error("Both num1 and num2 must be valid numbers."); const e = $ % 1 !== 0, t = l % 1 !== 0; if (!e && !t) return $ + l; const r = String($).split(".")[1] ?? "", i = String(l).split(".")[1] ?? "", u = Math.max(r.length, i.length), o = Math.pow(10, u), p = $.toFixed(u), d = l.toFixed(u); return (+p.replace(".", "") + +d.replace(".", "")) / o; } function ja($, l) { if (!$) { console.error("无效的 url"); return; } const e = l || $.split("?")[0].split("/").pop() || "download"; try { fetch($).then((t) => { t.ok ? t.blob().then((r) => { const i = URL.createObjectURL(r), u = document.createElement("a"); u.href = i, u.download = e, document.body.appendChild(u), u.click(), document.body.removeChild(u), URL.revokeObjectURL(i); }) : console.error("请求文件失败,状态码:", t.status); }); } catch (t) { console.error("文件下载失败:", t); } } function e2() { const $ = document.documentElement; $.classList.toggle("dark"), $.classList.contains("dark") ? $.style.colorScheme = "dark" : $.style.colorScheme = "light"; } function Na() { const $ = c(!1), l = wa(); return l && vt(() => { $.value = !0; }, l), $; } function ra($) { const l = Na(); return v(() => (l.value, !!$())); } function _t($, l, e) { vt(() => $.addEventListener(l, e)), Tl(() => $.removeEventListener(l, e)); } function il($, l, e = {}) { const t = ra(() => window && "MutationObserver" in window), r = c(!1); let i; const u = v(() => { const h = rl($); return h ? Array.isArray(h) ? h.map((g) => rl(g)).filter((g) => g) : [h] : []; }), o = () => { i && (i.disconnect(), i = void 0); }, p = () => { t.value && u.value.length && !r.value && (i = new MutationObserver(l), u.value.forEach((h) => i.observe(h, e))); }; ze( () => u.value, () => { o(), p(); }, { immediate: !0, // 立即触发回调,以便初始状态也被观察 flush: "post" } ); const d = () => { r.value = !1, p(); }, w = () => { r.value = !0, o(); }; return Lt(() => o()), { start: d, stop: w }; } function Ua($ = window, l = 0, e, t) { const r = c(0), i = c(0), u = c(0), o = c(0), p = c(!1), d = c(!1), w = c(!1), h = c(!1), g = c(!1), E = c(0), y = c(0); function M(V) { p.value = !0; const x = V.target.documentElement ?? V.target; r.value = x.scrollLeft, u.value = x.scrollTop, d.value = r.value < E.value, w.value = r.value > E.value, h.value = u.value < y.value, g.value = u.value > y.value, E.value = r.value, y.value = u.value, L(V), e && e(V); } const m = xa(M, l); function f(V) { p.value && (p.value = !1, d.value = !1, w.value = !1, h.value = !1, g.value = !1, t && t(V)); } const L = Zt(f, l + 200), k = v(() => { const V = rl($); return V || null; }); ze( () => k.value, (V, x) => { var B; if (x && b(x), V) { const C = ((B = V == null ? void 0 : V.document) == null ? void 0 : B.documentElement) || (V == null ? void 0 : V.documentElement) || V; i.value = C.scrollWidth - C.clientWidth, o.value = C.scrollHeight - C.clientHeight, C.addEventListener("scroll", m), C.addEventListener("scrollend", L); } }, { immediate: !0, flush: "post" } ); function b(V) { var B; const x = ((B = V == null ? void 0 : V.document) == null ? void 0 : B.documentElement) || (V == null ? void 0 : V.documentElement) || V; x.removeEventListener("scroll", m), x.removeEventListener("scrollend", L); } return Lt(() => b(k.value)), { x: r, xScrollMax: i, y: u, yScrollMax: o, isScrolling: p, left: d, right: w, top: h, bottom: g }; } function t2() { const $ = c(0), l = c(0); let e = performance.now(); const t = 10, r = (i) => { if (l.value++, l.value >= t) { const u = i - e; $.value = Math.round(1e3 / (u / t)), e = i, l.value = 0; } requestAnimationFrame(r); }; return requestAnimationFrame(r), { fps: $ }; } function l2($) { if (!$ || typeof $ != "string" || $.trim() === "") throw new Error("Invalid mediaQuery parameter. It must be a non-empty string."); const l = c(window && window.matchMedia($).matches), e = window.matchMedia($), t = (r) => { l.value = r.matches; }; return vt(() => { e.addEventListener("change", t); }), Lt(() => { e.removeEventListener("change", t); }), { match: l }; } function $t($, l, e = {}) { const t = ra(() => window && "ResizeObserver" in window); let r; const i = c(!1), u = v(() => { const h = rl($); return h ? Array.isArray(h) ? h.map((g) => rl(g)).filter((g) => g) : [h] : []; }), o = () => { r && (r.disconnect(), r = void 0); }, p = () => { t.value && u.value.length && !i.value && (r = new ResizeObserver(l), u.value.forEach((h) => r.observe(h, e))); }; ze( () => u.value, () => { o(), p(); }, { immediate: !0, // 立即触发回调,以便初始状态也被观察 flush: "post" } ); const d = () => { i.value = !1, p(); }, w = () => { i.value = !0, o(); }; return Lt(() => o()), { start: d, stop: w }; } function Ze($) { const l = ba(), e = (t) => { var u; const r = (u = l[t]) == null ? void 0 : u.call(l), i = (o) => { if (o.type === ka || Array.isArray(o.children) && !o.children.length) return !1; if (o.type !== $a) return !0; if (typeof o.children == "string") return o.children.trim() !== ""; }; return r && (r != null && r.length) ? r.some((p) => i(p)) : !1; }; if (Array.isArray($)) { const t = yl({}); return $.forEach((r) => { const i = v(() => e(r)); t[r] = i; }), t; } else return v(() => e($)); } function Qe($) { const l = Ka("#1677ff"), e = Yl("common", yl({ colorPalettes: l, shadowColor: Ya(l[0]) })), t = Yl("components", null); return t !== null && $ in t && t[$].colorPalettes.length ? ql(t[$]) : ql(e); } function Ka($) { return Vl($); } function Al($) { return $ >= 0 && $ <= 255; } function Ya($, l = "#ffffff") { const { r: e, g: t, b: r, a: i } = new Ht($).toRgb(); if (i < 1) return $; const { r: u, g: o, b: p } = new Ht(l).toRgb(); for (let d = 0.01; d <= 1; d += 0.01) { const w = Math.round((e - u * (1 - d)) / d), h = Math.round((t - o * (1 - d)) / d), g = Math.round((r - p * (1 - d)) / d); if (Al(w) && Al(h) && Al(g)) return new Ht({ r: w, g: h, b: g, a: Math.round(d * 100) / 100 }).toRgbString(); } return new Ht({ r: e, g: t, b: r, a: 1 }).toRgbString(); } function ul($) { const l = c(!1); try { const e = { get [$]() { return l.value = !0, !1; } }; window.addEventListener("test", () => null, e), window.removeEventListener("test", () => null, e); } catch { l.value = !1; } return { isSupported: l }; } const qa = { key: 0, class: "m-alert-icon" }, Ga = ["src"], Xa = { key: 1, class: "icon-svg", focusable: "false", "data-icon": "info-circle", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, Za = { key: 2, class: "icon-svg", focusable: "false", "data-icon": "check-circle", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, Qa = { key: 3, class: "icon-svg", focusable: "false", "data-icon": "exclamation-circle", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, Ja = { key: 4, class: "icon-svg", focusable: "false", "data-icon": "close-circle", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, _a = { key: 1, class: "m-big-icon" }, eo = ["src"], to = { key: 1, class: "icon-svg", focusable: "false", "data-icon": "info-circle", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, lo = { key: 2, class: "icon-svg", focusable: "false", "data-icon": "check-circle", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, ao = { key: 3, class: "icon-svg", focusable: "false", "data-icon": "exclamation-circle", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, oo = { key: 4, class: "icon-svg", focusable: "false", "data-icon": "close-circle", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, so = { class: "m-alert-content" }, no = { class: "alert-message" }, ro = { key: 0, class: "alert-description" }, io = { key: 1, class: "m-alert-actions" }, uo = ["onKeydown"], co = { key: 0 }, fo = { key: 1, class: "alert-close", focusable: "false", "data-icon": "close", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, vo = /* @__PURE__ */ ge({ __name: "Alert", props: { message: { default: void 0 }, description: { default: void 0 }, type: { default: "default" }, bordered: { type: Boolean, default: !0 }, closable: { type: Boolean, default: !1 }, closeText: { default: void 0 }, icon: { default: void 0 }, showIcon: { type: Boolean, default: !1 }, actions: { type: Function, default: void 0 } }, emits: ["close"], setup($, { emit: l }) { const e = $, t = c(), r = c(!1), { colorPalettes: i } = Qe("Alert"), u = l, o = Ze(["icon", "description", "actions"]), p = v(() => o.icon || e.icon || ["success", "info", "warning", "error"].includes(e.type)), d = v(() => o.description || e.description); async function w(h) { t.value.style.maxHeight = `${t.value.offsetHeight}px`, await Ge(), r.value = !0, u("close", h); } return (h, g) => (a(), ke(it, { name: "alert-motion", "leave-from-class": "alert-motion-leave", "leave-active-class": "alert-motion-leave alert-motion-leave-active", "leave-to-class": "alert-motion-leave alert-motion-leave-active" }, { default: ie(() => [ r.value ? F("", !0) : (a(), n("div", { key: 0, ref_key: "alertRef", ref: t, class: A(["m-alert", [ `alert-${h.type}`, { "alert-borderless": !h.bordered, "alert-width-description": d.value } ]]), style: R(` --alert-primary-color: ${j(i)[5]}; --alert-primary-bg-color: ${j(i)[0]}; --alert-primary-border-color: ${j(i)[2]}; --alert-success-color: #52c41a; --alert-success-bg-color: #f6ffed; --alert-success-border-color: #b7eb8f; --alert-warning-color: #faad14; --alert-warning-bg-color: #fffbe6; --alert-warning-border-color: #ffe58f; --alert-error-color: #ff4d4f; --alert-error-bg-color: #fff2f0; --alert-error-border-color: #ffccc7; `) }, [ h.showIcon && p.value ? (a(), n(de, { key: 0 }, [ d.value ? (a(), n("span", _a, [ H(h.$slots, "icon", {}, () => [ h.icon ? (a(), n("img", { key: 0, src: h.icon, class: "big-icon-img" }, null, 8, eo)) : h.type === "info" ? (a(), n("svg", to, g[4] || (g[4] = [ s("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" }, null, -1), s("path", { d: "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" }, null, -1) ]))) : h.type === "success" ? (a(), n("svg", lo, g[5] || (g[5] = [ s("path", { d: "M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z" }, null, -1), s("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" }, null, -1) ]))) : h.type === "warning" ? (a(), n("svg", ao, g[6] || (g[6] = [ s("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" }, null, -1), s("path", { d: "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" }, null, -1) ]))) : h.type === "error" ? (a(), n("svg", oo, g[7] || (g[7] = [ s("path", { d: "M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z" }, null, -1), s("path", { d: "M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" }, null, -1) ]))) : F("", !0) ], !0) ])) : (a(), n("span", qa, [ H(h.$slots, "icon", {}, () => [ h.icon ? (a(), n("img", { key: 0, src: h.icon, class: "icon-img" }, null, 8, Ga)) : h.type === "info" ? (a(), n("svg", Xa, g[0] || (g[0] = [ s("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" }, null, -1) ]))) : h.type === "success" ? (a(), n("svg", Za, g[1] || (g[1] = [ s("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" }, null, -1) ]))) : h.type === "warning" ? (a(), n("svg", Qa, g[2] || (g[2] = [ s("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" }, null, -1) ]))) : h.type === "error" ? (a(), n("svg", Ja, g[3] || (g[3] = [ s("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z" }, null, -1) ]))) : F("", !0) ], !0) ])) ], 64)) : F("", !0), s("div", so, [ s("div", no, [ H(h.$slots, "default", {}, () => [ Q(Y(h.message), 1) ], !0) ]), d.value ? (a(), n("div", ro, [ H(h.$slots, "description", {}, () => [ Q(Y(h.description), 1) ], !0) ])) : F("", !0) ]), j(o).actions ? (a(), n("div", io, [ H(h.$slots, "actions", {}, void 0, !0) ])) : F("", !0), h.closable ? (a(), n("a", { key: 2, tabindex: "0", class: "m-alert-close", onClick: w, onKeydown: qe(Pe(w, ["prevent"]), ["enter"]) }, [ H(h.$slots, "closeText", {}, () => [ h.closeText ? (a(), n("span", co, Y(h.closeText), 1)) : (a(), n("svg", fo, g[8] || (g[8] = [ s("path", { d: "M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" }, null, -1) ]))) ], !0) ], 40, uo)) : F("", !0) ], 6)) ]), _: 3 })); } }), $e = ($, l) => { const e = $.__vccOpts || $; for (const [t, r] of l) e[t] = r; return e; }, po = /* @__PURE__ */ $e(vo, [["__scopeId", "data-v-63f6fc40"]]), ye = ($) => { const l = $; return l.install = function(e) { e.component(l.__name, $); }, $; }, ho = ye(po), mo = ["src", "alt"], go = /* @__PURE__ */ ge({ __name: "Avatar", props: { color: { default: "rgba(0, 0, 0, 0.25)" }, shape: { default: "circle" }, size: { default: "middle" }, src: { default: void 0 }, alt: { default: void 0 }, icon: { type: [Object, Function], default: void 0 }, href: { default: void 0 }, target: { default: "_self" } }, setup($) { const l = $, e = c(window.innerWidth), t = Ze(["default", "icon"]), r = v(() => l.src ? !1 : !!(t.icon || l.icon)), i = v(() => { if (typeof l.size == "number") return r.value ? { backgroundColor: l.color, width: `${l.size}px`, height: `${l.size}px`, lineHeight: `${l.size}px`, fontSize: `${l.size / 2}px` } : { backgroundColor: l.color, width: `${l.size}px`, height: `${l.size}px`, lineHeight: `${l.size}px`, fontSize: "18px" }; if (typeof l.size == "object") { let d = 32; return e.value >= 1600 && l.size.xxl !== void 0 ? d = l.size.xxl : e.value >= 1200 && l.size.xl !== void 0 ? d = l.size.xl : e.value >= 992 && l.size.lg !== void 0 ? d = l.size.lg : e.value >= 768 && l.size.md !== void 0 ? d = l.size.md : e.value >= 576 && l.size.sm !== void 0 ? d = l.size.sm : e.value < 576 && l.size.xs !== void 0 && (d = l.size.xs), { backgroundColor: l.color, width: `${d}px`, height: `${d}px`, lineHeight: `${d}px`, fontSize: `${d / 2}px` }; } return { backgroundColor: l.color }; }), u = v(() => !l.src && !r.value ? t.default : !1), o = v(() => { if (typeof l.size == "string") return { transform: "scale(1) translateX(-50%)" }; if (typeof l.size == "number") { const d = Math.min(1, Math.max(0.022222222222222223, (1 + (l.size - 9) * 1) / 45)); return { lineHeight: `${l.size}px`, transform: `scale(${d}) translateX(-50%)` }; } return {}; }); _t(window, "resize", p); function p() { e.value = window.innerWidth; } return (d, w) => (a(), ke(at(d.href ? "a" : "div"), { class: A(["m-avatar", [ `avatar-${d.shape}`, { [`avatar-${d.size}`]: typeof d.size == "string" && ["small", "middle", "large"].includes(d.size), "avatar-image": d.src, "avatar-link": d.href } ]]), style: R(i.value), href: d.href, target: d.target }, { default: ie(() => [ d.src ? (a(), n("img", { key: 0, class: "image-item", src: d.src, alt: d.alt }, null, 8, mo)) : F("", !0), !d.src && r.value ? H(d.$slots, "icon", { key: 1 }, () => [ (a(), ke(at(d.icon))) ], !0) : F("", !0), u.value ? (a(), n("span", { key: 2, class: "string-item", style: R(o.value) }, [ H(d.$slots, "default", {}, void 0, !0) ], 4)) : F("", !0) ]), _: 3 }, 8, ["class", "style", "href", "target"])); } }), yo = /* @__PURE__ */ $e(go, [["__scopeId", "data-v-ace37eba"]]), ia = ye(yo), bo = /* @__PURE__ */ ge({ __name: "Tooltip", props: { maxWidth: { default: 240 }, content: { default: void 0 }, contentClass: { default: void 0 }, contentStyle: { default: () => ({}) }, tooltip: { default: void 0 }, tooltipClass: { default: void 0 }, tooltipStyle: { default: () => ({}) }, bgColor: { default: "rgba(0, 0, 0, 0.85)" }, arrow: { type: Boolean, default: !0 }, placement: { default: "top" }, flip: { type: Boolean, default: !0 }, trigger: { default: "hover" }, keyboard: { type: Boolean, default: !1 }, transitionDuration: { default: 100 }, showDelay: { default: 100 }, hideDelay: { default: 100 }, show: { type: Boolean, default: !1 }, showControl: { type: Boolean, default: !1 } }, emits: ["update:show", "openChange", "animationend"], setup($, { expose: l, emit: e }) { const t = $, r = c(!1), i = c(), u = c(null), o = c(0), p = c(0), d = c("top"), w = c(), h = c(0), g = c(0), E = c(), y = c(), M = c(0), m = c(0), f = c(document.documentElement.clientWidth), L = c(document.documentElement.clientHeight), { isSupported: k } = ul("passive"), { isSupported: b } = ul("capture"), V = e, x = Ze(["tooltip"]), B = v(() => typeof t.maxWidth == "number" ? `${t.maxWidth}px` : t.maxWidth), C = v(() => x.tooltip || t.tooltip), P = v(() => { switch (d.value) { case "top": return { transformOrigin: `50% ${o.value}px`, top: `${-o.value}px`, left: `${-p.value}px` }; case "bottom": return { transformOrigin: `50% ${t.arrow ? -4 : -6}px`, bottom: `${-o.value}px`, left: `${-p.value}px` }; case "left": return { transformOrigin: `${p.value}px 50%`, top: `${-o.value}px`, left: `${-p.value}px` }; case "right": return { transformOrigin: `${t.arrow ? -4 : -6}px 50%`, top: `${-o.value}px`, right: `${-p.value}px` }; default: return { transformOrigin: `50% ${o.value}px`, top: `${-o.value}px`, left: `${-p.value}px` }; } }); ze( () => [t.placement, t.arrow, t.flip], () => { ae(); }, { deep: !0 } ), ze( () => t.show, (re) => { re && !r.value && ue(), !re && r.value && D(); }, { immediate: !0 } ), vt(() => { N(); }), Lt(() => { U(); }); const I = il( u, () => { ae(); }, { subtree: !0, childList: !0, attributes: !0, characterData: !0 } ); _t(window, "resize", z), $t([y, w], (re) => { if (re.length === 1 && re[0].target.className === "tooltip-card") { const { blockSize: me, inlineSize: Se } = re[0].borderBoxSize[0]; if (me === m.value && Se === M.value) return; } ae(); }); function z() { f.value = document.documentElement.clientWidth, L.value = document.documentElement.clientHeight, N(), ae(); } function N() { U(), u.value = ee(w.value), u.value && u.value.addEventListener( "scroll", ae, k.value ? { passive: !0 } : void 0 ), u.value === document.documentElement && I.start(); } function U() { u.value && u.value.removeEventListener("scroll", ae), u.value = null, I.stop(); } function se(re) { return re === document.documentElement ? null : re.parentElement; } function ee(re) { if (re === null) return null; const me = se(re); return me === null ? null : me === document.documentElement ? document.documentElement : ((He) => { const { overflow: ot, overflowX: fe, overflowY: Ee } = getComputedStyle(He); return /(auto|scroll|overlay)/.test(ot + Ee + fe); })(me) ? me : ee(me); } function ae() { r.value && J(); } async function J() { await Ge(), h.value = w.value.offsetWidth, g.value = w.value.offsetHeight, M.value = y.value.offsetWidth, m.value = y.value.offsetHeight, t.flip && (d.value = Le()), ["top", "bottom"].includes(d.value) ? (o.value = m.value + (t.arrow ? 16 : 6), p.value = (M.value - h.value) / 2) : (o.value = (m.value - g.value) / 2, p.value = M.value + (t.arrow ? 16 : 6)); } function te() { return u.value && u.value !== document.documentElement ? u.value.getBoundingClientRect() : { top: 0, left: 0, bottom: L.value, right: f.value }; } function Le() { const { top: re, bottom: me, left: Se, right: He } = w.value.getBoundingClientRect(), { top: ot, bottom: fe, left: Ee, right: K } = te(), ve = re - ot - (t.arrow ? 12 : 0), Te = fe - me - (t.arrow ? 12 : 0), Ve = Se - Ee - (t.arrow ? 12 : 0), lt = K - He - (t.arrow ? 12 : 0), et = (M.value - h.value) / 2, Xe = (m.value - g.value) / 2; return O(t.placement, []); function O(G, le) { if (G === "top") { if (le.includes("top")) return le.includes("bottom") ? le.includes("left") ? O("right", le) : O("left", le) : O("bottom", le); if (ve < m.value + (t.arrow ? 4 : 6) && le.length !== 3) return O("bottom", [...le, "top"]); if (Ve >= et && lt >= et) return "top"; if (le.length !== 3) { if (Ve >= et) return O("left", ["top", "bottom", "right"]); if (lt >= et) return O("right", ["top", "bottom", "left"]); } } else if (G === "bottom") { if (le.includes("bottom")) return le.includes("top") ? le.includes("left") ? O("right", le) : O("left", le) : O("top", le); if (Te < m.value + (t.arrow ? 4 : 6) && le.length !== 3) return O("top", [...le, "bottom"]); if (Ve >= et && lt >= et) return "bottom"; if (le.length !== 3) { if (Ve >= et) return O("left", ["top", "bottom", "right"]); if (lt >= et) return O("right", ["top", "bottom", "left"]); } } else if (G === "left") { if (le.includes("left")) return le.includes("right") ? le.includes("top") ? O("bottom", le) : O("top", le) : O("right", le); if (Ve < M.value + (t.arrow ? 4 : 6) && le.length !== 3) return O("right", [...le, "left"]); if (ve >= Xe && Te >= Xe) return "left"; if (le.length !== 3) { if (ve >= Xe) return O("top", ["left", "right", "bottom"]); if (Te >= Xe) return O("bottom", ["left", "right", "top"]); } } else if (G === "right") { if (le.includes("right")) return le.includes("left") ? le.includes("top") ? O("bottom", le) : O("top", le) : O("left", le); if (lt < M.value + (t.arrow ? 4 : 6) && le.length !== 3) return O("left", [...le, "right"]); if (ve >= Xe && Te >= Xe) return "right"; if (le.length !== 3) { if (ve >= Xe) return O("top", ["left", "right", "bottom"]); if (Te >= Xe) return O("bottom", ["left", "right", "top"]); } } return t.placement; } } function ue() { i.value && dt(i.value), r.value || (i.value = zt(() => { r.value = !0, J(), V("update:show", !0), V("openChange", !0), C.value && t.trigger === "click" && document.addEventListener("click", oe, b.value ? { capture: !0 } : !0); }, t.showDelay)); } function D() { i.value && dt(i.value), r.value && (i.value = zt(() => { r.value = !1, V("update:show", !1), V("openChange", !1), C.value && t.trigger === "click" && document.removeEventListener("click", oe, b.value ? { capture: !0 } : !0); }, t.hideDelay)); } function Z() { r.value ? D() : ue(); } function oe(re) { E.value.contains(re.target) || D(); } function be() { C.value && t.trigger === "hover" && !t.showControl && ue(); } function he() { C.value && t.trigger === "hover" && !t.showControl && D(); } function Re() { V("animationend", r.value); } function Oe() { t.trigger === "hover" && !t.showControl && ue(); } function ne() { t.trigger === "hover" && !t.showControl && D(); } return l({ show: ue, hide: D, observeScroll: N }), (re, me) => (a(), n("div", { class: "m-tooltip-wrap", style: R(`--tooltip-max-width: ${B.value}; --tooltip-background-color: ${re.bgColor}; --transition-duration: ${re.transitionDuration}ms;`), onMouseenter: be, onMouseleave: he }, [ we(it, { name: "zoom", "enter-from-class": "zoom-enter", "enter-active-class": "zoom-enter", "enter-to-class": "zoom-enter zoom-enter-active", "leave-from-class": "zoom-leave", "leave-active-class": "zoom-leave zoom-leave-active", "leave-to-class": "zoom-leave zoom-leave-active", onAnimationend: Re }, { default: ie(() => [ De(s("div", { ref_key: "tooltipRef", ref: E, class: A(["m-tooltip-card", { [`tooltip-${d.value}-padding`]: re.arrow }]), style: R(P.value), onMouseenter: Oe, onMouseleave: ne, onKeydown: me[0] || (me[0] = qe((Se) => re.trigger === "click" && re.keyboard && r.value ? D() : () => !1, ["esc"])) }, [ s("div", { ref_key: "tooltipCardRef", ref: y, class: A(["tooltip-card", re.tooltipClass]), style: R(re.tooltipStyle) }, [ H(re.$slots, "tooltip", {}, () => [ Q(Y(re.tooltip), 1) ], !0) ], 6), re.arrow ? (a(), n("div", { key: 0, class: A(["tooltip-arrow", `arrow-${d.value || "top"}`]) }, null, 2)) : F("", !0) ], 38), [ [We, C.value && r.value] ]) ]), _: 3 }), s("span", { ref_key: "contentRef", ref: w, class: A(["tooltip-content", re.contentClass]), style: R(re.contentStyle), onClick: me[1] || (me[1] = (Se) => C.value && re.trigger === "click" && !r.value ? ue() : () => !1), onKeydown: [ me[2] || (me[2] = qe((Se) => C.value && re.trigger === "click" && re.keyboard ? Z() : () => !1, ["enter"])), me[3] || (me[3] = qe((Se) => C.value && re.trigger === "click" && re.keyboard && r.value ? D() : () => !1, ["esc"])) ] }, [ H(re.$slots, "default", {}, () => [ Q(Y(re.content), 1) ], !0) ], 38) ], 36)); } }), wo = /* @__PURE__ */ $e(bo, [["__scopeId", "data-v-b5f0b4d5"]]), kt = ye(wo), ko = { key: 1, width: "1em", height: "1em", viewBox: "0 0 24 24", version: "1.1", xmlns: "http://www.w3.org/2000/svg", xlinkHref: "http://www.w3.org/1999/xlink" }, $o = { key: 0, class: "backtop-description" }, Co = /* @__PURE__ */ ge({ __name: "BackTop", props: { icon: { type: [Object, Function], default: void 0 }, description: { default: void 0 }, tooltip: { default: void 0 }, tooltipProps: { default: () => ({}) }, type: { default: "default" }, shape: { default: "circle" }, bottom: { default: 40 }, right: { default: 40 }, zIndex: { default: 9 }, visibilityHeight: { default: 180 }, to: { default: "body" }, listenTo: { default: void 0 } }, emits: ["click", "show"], setup($, { emit: l }) { const e = $, t = c(null), r = c(0), i = c(null), u = c(null), { colorPalettes: o } = Qe("BackTop"), { isSupported: p } = ul("passive"), d = l, w = Ze(["tooltip", "icon", "description"]), h = v(() => ({ bottom: typeof e.bottom == "number" ? `${e.bottom}px` : e.bottom, right: typeof e.right == "number" ? `${e.right}px` : e.right })), g = v(() => r.value >= e.visibilityHeight), E = v(() => w.tooltip || e.tooltip), y = v(() => w.description || e.description); ze( () => e.to, () => { k(); }, { flush: "post" } ), ze( () => e.listenTo, () => { f(); }, { flush: "post" } ), ze(g, (B) => { d("show", B); }), vt(() => { f(); }), Lt(() => { var B; L(), (B = t.value) == null || B.remove(); }); const M = il( i, () => { var B; r.value = ((B = i.value) == null ? void 0 : B.scrollTop) ?? 0; }, { subtree: !0, childList: !0, attributes: !0, characterData: !0 } ); function m(B) { r.value = B.target.scrollTop; } function f() { L(), e.listenTo === void 0 ? i.value = V(t.value) : typeof e.listenTo == "string" ? i.value = document.getElementsByTagName(e.listenTo)[0] : e.listenTo instanceof HTMLElement && (i.value = e.listenTo), i.value || console.warn("Container of back-top element is not found."), i.value && i.value.addEventListener( "scroll", m, p.value ? { passive: !0 } : void 0 ), i.value === document.documentElement && M.start(), k(); } function L() { i.value && i.value.removeEventListener("scroll", m), i.value = null, M.stop(); } function k() { var B; typeof e.to == "string" ? u.value = document.getElementsByTagName(e.to)[0] : e.to instanceof HTMLElement && (u.value = e.to), u.value && ((B = u.value) == null || B.appendChild(t.value)); } function b(B) { return B === document.documentElement ? null : B.parentElement; } function V(B) { if (B === null) return null; const C = b(B); return C === null ? null : C === document.documentElement ? document.documentElement : ((I) => { const { overflow: z, overflowX: N, overflowY: U } = getComputedStyle(I); return /(auto|scroll|overlay)/.test(z + U + N); })(C) ? C : V(C); } function x() { i.value && i.value.scrollTo({ top: 0, behavior: "smooth" // 平滑滚动并产生过渡效果 }), d("click"); } return (B, C) => (a(), ke(it, { name: "zoom" }, { default: ie(() => [ De(s("div", { ref_key: "backtopRef", ref: t, class: "m-backtop", style: R([ h.value, ` --backtop-z-index: ${B.zIndex}; --backtop-width: 44px; --backtop-height: 44px; --backtop-icon-size: 26px; --backtop-icon-with-desc-size: 24px; --backtop-desc-font-size: 12px; --backtop-default-color: rgba(0, 0, 0, 0.88); --backtop-default-color-hover: ${j(o)[5]}; --backtop-default-bg-color: rgba(255, 255, 255, 0.88); --backtop-default-bg-color-hover: rgba(255, 255, 255); --backtop-default-shadow-color: rgba(0, 0, 0, 0.12); --backtop-default-shadow-color-hover: rgba(0, 0, 0, 0.12); --backtop-primary-color: #fff; --backtop-primary-color-hover: #fff; --backtop-primary-bg-color: ${j(o)[5]}; --backtop-primary-bg-color-hover: ${j(o)[4]}; --backtop-primary-shadow-color: rgba(9, 88, 217, 0.32); --backtop-primary-shadow-color-hover: rgba(9, 88, 217, 0.32); --backtop-circle-border-radius: calc(var(--backtop-width) / 2); --backtop-square-border-radius: 8px; ` ]), onClick: x }, [ we(j(kt), pe({ style: `border-radius: var(--${B.shape}-border-radius)`, "content-style": { borderRadius: `var(--${B.shape}-border-radius)` } }, B.tooltipProps), $l({ default: ie(() => [ s("div", { class: A(["backtop-wrap", `backtop-${B.type} backtop-${B.shape}`]) }, [ H(B.$slots, "default", {}, () => [ s("span", { class: A(["backtop-icon", { "icon-with-description": y.value }]) }, [ H(B.$slots, "icon", {}, () => [ B.icon ? (a(), ke(at(B.icon), { key: 0 })) : (a(), n("svg", ko, C[0] || (C[0] = [ s("g", { stroke: "none", "stroke-width": "1", "fill-rule": "evenodd" }, [ s("g", { transform: "translate(-139.000000, -4423.000000)", "fill-rule": "nonzero" }, [ s("g", { transform: "translate(120.000000, 4285.000000)" }, [ s("g", { transform: "translate(7.000000, 126.000000)" }, [ s("g", { transform: "translate(24.000000, 24.000000) scale(1, -1) translate(-24.000000, -24.000000) translate(12.000000, 12.000000)" }, [ s("g", { transform: "translate(4.000000, 2.000000)" }, [ s("path", { d: "M8,0 C8.51283584,0 8.93550716,0.38604019 8.99327227,0.883378875 L9,1 L9,10.584 L12.2928932,7.29289322 C12.6834175,6.90236893 13.3165825,6.90236893 13.7071068,7.29289322 C14.0675907,7.65337718 14.0953203,8.22060824 13.7902954,8.61289944 L13.7071068,8.70710678 L8.70710678,13.7071068 L8.62544899,13.7803112 L8.618,13.784 L8.59530661,13.8036654 L8.4840621,13.8753288 L8.37133602,13.9287745 L8.22929083,13.9735893 L8.14346259,13.9897165 L8.03324678,13.9994506 L7.9137692,13.9962979 L7.77070917,13.9735893 L7.6583843,13.9401293 L7.57677845,13.9063266 L7.47929125,13.8540045 L7.4048407,13.8036865 L7.38131006,13.7856883 C7.35030318,13.7612383 7.32077858,13.7349921 7.29289322,13.7071068 L2.29289322,8.70710678 L2.20970461,8.61289944 C1.90467972,8.22060824 1.93240926,7.65337718 2.29289322,7.29289322 C2.65337718,6.93240926 3.22060824,6.90467972 3.61289944,7.20970461 L3.70710678,7.29289322 L7,10.585 L7,1 L7.00672773,0.883378875 C7.06449284,0.38604019 7.48716416,0 8,0 Z" }), s("path", { d: "M14.9333333,15.9994506 C15.5224371,15.9994506 16,16.4471659 16,16.9994506 C16,17.5122865 15.5882238,17.9349578 15.0577292,17.9927229 L14.9333333,17.9994506 L1.06666667,17.9994506 C0.477562934,17.9994506 0,17.5517354 0,16.9994506 C0,16.4866148 0.411776203,16.0639435 0.9422708,16.0061783 L1.06666667,15.9994506 L14.9333333,15.9994506 Z" }) ]) ]) ]) ]) ]) ], -1) ]))) ], !0) ], 2), y.value ? (a(), n("span", $o, [ H(B.$slots, "description", {}, () => [ Q(Y(B.description), 1) ], !0) ])) : F("", !0) ], !0) ], 2) ]), _: 2 }, [ E.value ? { name: "tooltip", fn: ie(() => [ H(B.$slots, "tooltip", {}, () => [ Q(Y(B.tooltip), 1) ], !0) ]), key: "0" } : void 0 ]), 1040, ["style", "content-style"]) ], 4), [ [We, g.value] ]) ]), _: 3 })); } }), So = /* @__PURE__ */ $e(Co, [["__scopeId", "data-v-1a62a7e2"]]), Mo = ye(So), zo = { class: "status-text" }, Bo = ["title"], Lo = { key: 0, class: "m-number", style: { transition: "none 0s ease 0s" } }, Fo = { class: "u-number" }, Eo = /* @__PURE__ */ ge({ __name: "Badge", props: { color: { default: void 0 }, value: { default: void 0 }, max: { default: 99 }, showZero: { type: Boolean, default: !1 }, dot: { type: Boolean, default: !1 }, offset: { default: void 0 }, status: { default: void 0 }, text: { default: void 0 }, valueStyle: { default: () => ({}) }, zIndex: { default: 9 }, title: { default: void 0 }, ripple: { type: Boolean, default: !1 } }, setup($) { const l = $, e = [ "pink", "red", "yellow", "orange", "cyan", "green", "blue", "purple", "geekblue", "magenta", "volcano", "gold", "lime" ], t = Ze(["default", "value"]), r = v(() => { if (l.color && !e.includes(l.color)) return l.value !== void 0 && l.value !== 0 || l.showZero && l.value === 0 ? { backgroundColor: l.color } : { color: l.color, backgroundColor: l.color }; }), i = v(() => { if (l.color && e.includes(l.color)) return l.value !== void 0 && l.value !== 0 || l.showZero && l.value === 0 ? `color-${l.color} white` : `color-${l.color}`; if (l.status) return l.value !== void 0 && l.value !== 0 || l.showZero && l.value === 0 ? `status-${l.status} white` : `status-${l.status}`; }), u = v(() => l.value !== void 0 || l.dot || !l.color && !l.status ? t.default : !1), o = v(() => !l.color && !l.status ? t.value : !1), p = v(() => !!(l.value !== void 0 && l.value !== 0 || l.showZero && l.value === 0 || l.dot)), d = v(() => l.value === void 0 || l.value === 0 && !l.showZero || l.dot), w = v(() => { var E; return (E = l.offset) != null && E.length ? { right: h(l.offset[0]) ? -l.offset[0] + "px" : g(l.offset[0]), marginTop: h(l.offset[1]) ? l.offset[1] + "px" : l.offset[1] } : {}; }); function h(E) { return typeof E == "number"; } function g(E) { return E.includes("-") ? E.replace("-", "") : `-${E}`; } return (E, y) => (a(), n("div", { class: A(["m-badge", { "badge-status-color": E.value === void 0 && (E.color || E.status) }]), style: R([`--badge-z-index: ${E.zIndex}`, E.value === void 0 && !E.dot ? w.value : null]) }, [ E.value === void 0 && !E.dot && (E.color || E.status) ? (a(), n(de, { key: 0 }, [ s("span", { class: A(["status-dot", [i.value, { "dot-ripple": E.ripple }]]), style: R(r.value) }, null, 6), s("span", zo, [ H(E.$slots, "default", {}, () => [ Q(Y(E.text), 1) ], !0) ]) ], 64)) : (a(), n(de, { key: 1 }, [ u.value ? H(E.$slots, "default", { key: 0 }, void 0, !0) : F("", !0), o.value ? (a(), n("span", { key: 1, class: A(["m-value", { "only-number": !u.value }]) }, [ H(E.$slots, "value", {}, void 0, !0) ], 2)) : (a(), ke(it, { key: 2, name: "zoom", "enter-from-class": "zoom-enter", "enter-active-class": "zoom-enter", "enter-to-class": "zoom-enter", "leave-from-class": "zoom-leave", "leave-active-class": "zoom-leave", "leave-to-class": "zoom-leave" }, { default: ie(() => [ p.value ? (a(), n("div", { key: 0, class: A(["m-badge-value", [ { "small-num": typeof E.value == "number" && E.value < 10, "only-number": !u.value, "only-dot": d.value }, i.value ]]), style: R([r.value, w.value, E.valueStyle]), title: E.title || (E.value !== void 0 ? String(E.value) : "") }, [ E.dot ? F("", !0) : (a(), n("span", Lo, [ s("span", Fo, Y(typeof E.value == "number" && E.value > E.max ? E.max + "+" : E.value), 1) ])) ], 14, Bo)) : F("", !0) ]), _: 1 })) ], 64)) ], 6)); } }), Po = /* @__PURE__ */ $e(Eo, [["__scopeId", "data-v-dc82b2cd"]]), ua = ye(Po), Ro = { key: 0 }, Ao = { key: 1, focusable: "false", "data-icon": "right", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, To = /* @__PURE__ */ ge({ __name: "Breadcrumb", props: { routes: { default: () => [] }, breadcrumbClass: { default: void 0 }, breadcrumbStyle: { default: () => ({}) }, maxWidth: { default: "100%" }, separator: { default: void 0 }, separatorStyle: { default: () => ({}) }, target: { default: "_self" } }, setup($) { const l = $, e = v(() => l.routes.length); function t(r) { let i = ""; if (r.path && (i = r.path), r.query && JSON.stringify(r.query) !== "{}") { const u = r.query; Object.keys(u).forEach((o, p) => {