bootstrap-vue-3
Version:
Early (but lovely) implementation of Vue 3, Bootstrap 5 and Typescript
1,432 lines • 245 kB
JavaScript
var yn = Object.defineProperty;
var Bn = (e, t, a) => t in e ? yn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
var be = (e, t, a) => (Bn(e, typeof t != "symbol" ? t + "" : t, a), a);
import { shallowRef as Za, watchEffect as Qe, readonly as Nt, unref as o, ref as U, isRef as Ze, watch as de, getCurrentScope as $n, onScopeDispose as Sn, getCurrentInstance as el, onMounted as Be, nextTick as Ee, computed as i, Comment as kn, reactive as De, inject as He, onBeforeUnmount as Zt, toRef as s, onActivated as ea, defineComponent as P, provide as et, openBlock as f, createElementBlock as g, normalizeClass as E, renderSlot as $, createBlock as z, resolveDynamicComponent as Y, withCtx as H, createElementVNode as M, withDirectives as tt, createTextVNode as ee, toDisplayString as G, createVNode as fe, Transition as Cn, normalizeProps as he, guardReactiveProps as Ce, useSlots as Se, createCommentVNode as W, mergeProps as J, resolveComponent as tl, Fragment as oe, normalizeStyle as Ie, renderList as ve, isReactive as wn, onUnmounted as _n, h as le, useAttrs as al, withModifiers as ta, vModelCheckbox as Tn, vModelRadio as Vn, vModelSelect as An, Teleport as On, withKeys as xn, vShow as Pn, createSlots as ll } from "vue";
import { Collapse as In, Popover as Dt, Tooltip as Ft, Carousel as Fn, Dropdown as En, Offcanvas as Ln } from "bootstrap";
var zn = Object.defineProperty, Nn = Object.defineProperties, Dn = Object.getOwnPropertyDescriptors, da = Object.getOwnPropertySymbols, Hn = Object.prototype.hasOwnProperty, Rn = Object.prototype.propertyIsEnumerable, ca = (e, t, a) => t in e ? zn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a, jn = (e, t) => {
for (var a in t || (t = {}))
Hn.call(t, a) && ca(e, a, t[a]);
if (da)
for (var a of da(t))
Rn.call(t, a) && ca(e, a, t[a]);
return e;
}, Mn = (e, t) => Nn(e, Dn(t));
function nl(e, t) {
var a;
const l = Za();
return Qe(() => {
l.value = e();
}, Mn(jn({}, t), {
flush: (a = t == null ? void 0 : t.flush) != null ? a : "sync"
})), Nt(l);
}
var fa;
const ht = typeof window < "u", ol = (e) => typeof e == "function", qn = (e) => typeof e == "string", Gn = () => {
};
ht && ((fa = window == null ? void 0 : window.navigator) == null ? void 0 : fa.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function qe(e) {
return typeof e == "function" ? e() : o(e);
}
function Un(e, t) {
function a(...l) {
e(() => t.apply(this, l), { fn: t, thisArg: this, args: l });
}
return a;
}
const sl = (e) => e();
function Wn(e = sl) {
const t = U(!0);
function a() {
t.value = !1;
}
function l() {
t.value = !0;
}
return { isActive: t, pause: a, resume: l, eventFilter: (...r) => {
t.value && e(...r);
} };
}
function Kn(e) {
return e;
}
function yt(e) {
return $n() ? (Sn(e), !0) : !1;
}
function Xn(e) {
return typeof e == "function" ? i(e) : U(e);
}
function rl(e, t = !0) {
el() ? Be(e) : t ? e() : Ee(e);
}
function Jn(e, t = 1e3, a = {}) {
const {
immediate: l = !0,
immediateCallback: n = !1
} = a;
let r = null;
const c = U(!1);
function d() {
r && (clearInterval(r), r = null);
}
function v() {
c.value = !1, d();
}
function b() {
o(t) <= 0 || (c.value = !0, n && e(), d(), r = setInterval(e, qe(t)));
}
if (l && ht && b(), Ze(t) || ol(t)) {
const B = de(t, () => {
c.value && ht && b();
});
yt(B);
}
return yt(v), {
isActive: c,
pause: v,
resume: b
};
}
var va = Object.getOwnPropertySymbols, Qn = Object.prototype.hasOwnProperty, Yn = Object.prototype.propertyIsEnumerable, Zn = (e, t) => {
var a = {};
for (var l in e)
Qn.call(e, l) && t.indexOf(l) < 0 && (a[l] = e[l]);
if (e != null && va)
for (var l of va(e))
t.indexOf(l) < 0 && Yn.call(e, l) && (a[l] = e[l]);
return a;
};
function eo(e, t, a = {}) {
const l = a, {
eventFilter: n = sl
} = l, r = Zn(l, [
"eventFilter"
]);
return de(e, Un(n, t), r);
}
var to = Object.defineProperty, ao = Object.defineProperties, lo = Object.getOwnPropertyDescriptors, Bt = Object.getOwnPropertySymbols, il = Object.prototype.hasOwnProperty, ul = Object.prototype.propertyIsEnumerable, ma = (e, t, a) => t in e ? to(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a, no = (e, t) => {
for (var a in t || (t = {}))
il.call(t, a) && ma(e, a, t[a]);
if (Bt)
for (var a of Bt(t))
ul.call(t, a) && ma(e, a, t[a]);
return e;
}, oo = (e, t) => ao(e, lo(t)), so = (e, t) => {
var a = {};
for (var l in e)
il.call(e, l) && t.indexOf(l) < 0 && (a[l] = e[l]);
if (e != null && Bt)
for (var l of Bt(e))
t.indexOf(l) < 0 && ul.call(e, l) && (a[l] = e[l]);
return a;
};
function ro(e, t, a = {}) {
const l = a, {
eventFilter: n
} = l, r = so(l, [
"eventFilter"
]), { eventFilter: c, pause: d, resume: v, isActive: b } = Wn(n);
return { stop: eo(e, t, oo(no({}, r), {
eventFilter: c
})), pause: d, resume: v, isActive: b };
}
function io(e) {
var t;
const a = qe(e);
return (t = a == null ? void 0 : a.$el) != null ? t : a;
}
const st = ht ? window : void 0;
function uo(...e) {
let t, a, l, n;
if (qn(e[0]) || Array.isArray(e[0]) ? ([a, l, n] = e, t = st) : [t, a, l, n] = e, !t)
return Gn;
Array.isArray(a) || (a = [a]), Array.isArray(l) || (l = [l]);
const r = [], c = () => {
r.forEach((B) => B()), r.length = 0;
}, d = (B, m, p) => (B.addEventListener(m, p, n), () => B.removeEventListener(m, p, n)), v = de(() => io(t), (B) => {
c(), B && r.push(...a.flatMap((m) => l.map((p) => d(B, m, p))));
}, { immediate: !0, flush: "post" }), b = () => {
v(), c();
};
return yt(b), b;
}
function co(e, t = !1) {
const a = U(), l = () => a.value = Boolean(e());
return l(), rl(l, t), a;
}
function fo(e, t = {}) {
const { window: a = st } = t, l = co(() => a && "matchMedia" in a && typeof a.matchMedia == "function");
let n;
const r = U(!1), c = () => {
!n || ("removeEventListener" in n ? n.removeEventListener("change", d) : n.removeListener(d));
}, d = () => {
!l.value || (c(), n = a.matchMedia(Xn(e).value), r.value = n.matches, "addEventListener" in n ? n.addEventListener("change", d) : n.addListener(d));
};
return Qe(d), yt(() => c()), r;
}
const Ht = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Rt = "__vueuse_ssr_handlers__";
Ht[Rt] = Ht[Rt] || {};
const vo = Ht[Rt];
function dl(e, t) {
return vo[e] || t;
}
function mo(e) {
return e == null ? "any" : e instanceof Set ? "set" : e instanceof Map ? "map" : e instanceof Date ? "date" : typeof e == "boolean" ? "boolean" : typeof e == "string" ? "string" : typeof e == "object" ? "object" : Number.isNaN(e) ? "any" : "number";
}
var bo = Object.defineProperty, ba = Object.getOwnPropertySymbols, po = Object.prototype.hasOwnProperty, go = Object.prototype.propertyIsEnumerable, pa = (e, t, a) => t in e ? bo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a, ga = (e, t) => {
for (var a in t || (t = {}))
po.call(t, a) && pa(e, a, t[a]);
if (ba)
for (var a of ba(t))
go.call(t, a) && pa(e, a, t[a]);
return e;
};
const ho = {
boolean: {
read: (e) => e === "true",
write: (e) => String(e)
},
object: {
read: (e) => JSON.parse(e),
write: (e) => JSON.stringify(e)
},
number: {
read: (e) => Number.parseFloat(e),
write: (e) => String(e)
},
any: {
read: (e) => e,
write: (e) => String(e)
},
string: {
read: (e) => e,
write: (e) => String(e)
},
map: {
read: (e) => new Map(JSON.parse(e)),
write: (e) => JSON.stringify(Array.from(e.entries()))
},
set: {
read: (e) => new Set(JSON.parse(e)),
write: (e) => JSON.stringify(Array.from(e))
},
date: {
read: (e) => new Date(e),
write: (e) => e.toISOString()
}
};
function yo(e, t, a, l = {}) {
var n;
const {
flush: r = "pre",
deep: c = !0,
listenToStorageChanges: d = !0,
writeDefaults: v = !0,
mergeDefaults: b = !1,
shallow: B,
window: m = st,
eventFilter: p,
onError: V = (O) => {
console.error(O);
}
} = l, w = (B ? Za : U)(t);
if (!a)
try {
a = dl("getDefaultStorage", () => {
var O;
return (O = st) == null ? void 0 : O.localStorage;
})();
} catch (O) {
V(O);
}
if (!a)
return w;
const y = qe(t), k = mo(y), h = (n = l.serializer) != null ? n : ho[k], { pause: S, resume: I } = ro(w, () => F(w.value), { flush: r, deep: c, eventFilter: p });
return m && d && uo(m, "storage", T), T(), w;
function F(O) {
try {
if (O == null)
a.removeItem(e);
else {
const A = h.write(O), C = a.getItem(e);
C !== A && (a.setItem(e, A), m && (m == null || m.dispatchEvent(new StorageEvent("storage", {
key: e,
oldValue: C,
newValue: A,
storageArea: a
}))));
}
} catch (A) {
V(A);
}
}
function x(O) {
const A = O ? O.newValue : a.getItem(e);
if (A == null)
return v && y !== null && a.setItem(e, h.write(y)), y;
if (!O && b) {
const C = h.read(A);
return ol(b) ? b(C, y) : k === "object" && !Array.isArray(C) ? ga(ga({}, y), C) : C;
} else
return typeof A != "string" ? A : h.read(A);
}
function T(O) {
if (!(O && O.storageArea !== a)) {
if (O && O.key == null) {
w.value = y;
return;
}
if (!(O && O.key !== e)) {
S();
try {
w.value = x(O);
} catch (A) {
V(A);
} finally {
O ? Ee(I) : I();
}
}
}
}
}
function Bo(e) {
return fo("(prefers-color-scheme: dark)", e);
}
var $o = Object.defineProperty, ha = Object.getOwnPropertySymbols, So = Object.prototype.hasOwnProperty, ko = Object.prototype.propertyIsEnumerable, ya = (e, t, a) => t in e ? $o(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a, Co = (e, t) => {
for (var a in t || (t = {}))
So.call(t, a) && ya(e, a, t[a]);
if (ha)
for (var a of ha(t))
ko.call(t, a) && ya(e, a, t[a]);
return e;
};
function wo(e = {}) {
const {
selector: t = "html",
attribute: a = "class",
initialValue: l = "auto",
window: n = st,
storage: r,
storageKey: c = "vueuse-color-scheme",
listenToStorageChanges: d = !0,
storageRef: v,
emitAuto: b
} = e, B = Co({
auto: "",
light: "light",
dark: "dark"
}, e.modes || {}), m = Bo({ window: n }), p = i(() => m.value ? "dark" : "light"), V = v || (c == null ? U(l) : yo(c, l, r, { window: n, listenToStorageChanges: d })), w = i({
get() {
return V.value === "auto" && !b ? p.value : V.value;
},
set(S) {
V.value = S;
}
}), y = dl("updateHTMLAttrs", (S, I, F) => {
const x = n == null ? void 0 : n.document.querySelector(S);
if (!!x)
if (I === "class") {
const T = F.split(/\s/g);
Object.values(B).flatMap((O) => (O || "").split(/\s/g)).filter(Boolean).forEach((O) => {
T.includes(O) ? x.classList.add(O) : x.classList.remove(O);
});
} else
x.setAttribute(I, F);
});
function k(S) {
var I;
const F = S === "auto" ? p.value : S;
y(t, a, (I = B[F]) != null ? I : F);
}
function h(S) {
e.onChanged ? e.onChanged(S, k) : k(S);
}
return de(w, h, { flush: "post", immediate: !0 }), b && de(p, () => h(w.value), { flush: "post" }), rl(() => h(w.value)), w;
}
var Ba;
(function(e) {
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
})(Ba || (Ba = {}));
var _o = Object.defineProperty, $a = Object.getOwnPropertySymbols, To = Object.prototype.hasOwnProperty, Vo = Object.prototype.propertyIsEnumerable, Sa = (e, t, a) => t in e ? _o(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a, Ao = (e, t) => {
for (var a in t || (t = {}))
To.call(t, a) && Sa(e, a, t[a]);
if ($a)
for (var a of $a(t))
Vo.call(t, a) && Sa(e, a, t[a]);
return e;
};
const Oo = {
easeInSine: [0.12, 0, 0.39, 0],
easeOutSine: [0.61, 1, 0.88, 1],
easeInOutSine: [0.37, 0, 0.63, 1],
easeInQuad: [0.11, 0, 0.5, 0],
easeOutQuad: [0.5, 1, 0.89, 1],
easeInOutQuad: [0.45, 0, 0.55, 1],
easeInCubic: [0.32, 0, 0.67, 0],
easeOutCubic: [0.33, 1, 0.68, 1],
easeInOutCubic: [0.65, 0, 0.35, 1],
easeInQuart: [0.5, 0, 0.75, 0],
easeOutQuart: [0.25, 1, 0.5, 1],
easeInOutQuart: [0.76, 0, 0.24, 1],
easeInQuint: [0.64, 0, 0.78, 0],
easeOutQuint: [0.22, 1, 0.36, 1],
easeInOutQuint: [0.83, 0, 0.17, 1],
easeInExpo: [0.7, 0, 0.84, 0],
easeOutExpo: [0.16, 1, 0.3, 1],
easeInOutExpo: [0.87, 0, 0.13, 1],
easeInCirc: [0.55, 0, 1, 0.45],
easeOutCirc: [0, 0.55, 0.45, 1],
easeInOutCirc: [0.85, 0, 0.15, 1],
easeInBack: [0.36, 0, 0.66, -0.56],
easeOutBack: [0.34, 1.56, 0.64, 1],
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
};
Ao({
linear: Kn
}, Oo);
const it = (e) => nl(() => e.value ? `justify-content-${e.value}` : "");
class Ue {
constructor(t, a = {}) {
be(this, "cancelable", !0);
be(this, "componentId", null);
be(this, "_defaultPrevented", !1);
be(this, "eventType", "");
be(this, "nativeEvent", null);
be(this, "_preventDefault");
be(this, "relatedTarget", null);
be(this, "target", null);
if (!t)
throw new TypeError(
`Failed to construct '${this.constructor.name}'. 1 argument required, ${arguments.length} given.`
);
Object.assign(this, Ue.Defaults, a, { eventType: t }), this._preventDefault = function() {
this.cancelable && (this.defaultPrevented = !0);
};
}
get defaultPrevented() {
return this._defaultPrevented;
}
set defaultPrevented(t) {
this._defaultPrevented = t;
}
get preventDefault() {
return this._preventDefault;
}
set preventDefault(t) {
this._preventDefault = t;
}
static get Defaults() {
return {
cancelable: !0,
componentId: null,
eventType: "",
nativeEvent: null,
relatedTarget: null,
target: null
};
}
}
class cl extends Ue {
constructor(a, l = {}) {
super(a, l);
be(this, "trigger", null);
Object.assign(this, Ue.Defaults, l, { eventType: a });
}
static get Defaults() {
return {
...super.Defaults,
trigger: null
};
}
}
const jt = (e) => e !== null && typeof e == "object", fl = (e) => /^[0-9]*\.?[0-9]+$/.test(String(e)), xo = (e) => Object.prototype.toString.call(e) === "[object Object]", ze = (e) => e === null, vl = /_/g, ml = /([a-z])([A-Z])/g, Po = /(\s|^)(\w)/g, Io = /(\s|^)(\w)/, mt = /\s+/, Fo = /^#/, Eo = /^#[A-Za-z]+[\w\-:.]*$/, Lo = /-u-.+/, $t = (e, t = 2) => typeof e == "string" ? e : e == null ? "" : Array.isArray(e) || xo(e) && e.toString === Object.prototype.toString ? JSON.stringify(e, null, t) : String(e), ka = (e) => e.replace(vl, " ").replace(ml, (t, a, l) => `${a} ${l}`).replace(Io, (t, a, l) => a + l.toUpperCase()), Ca = (e) => e.replace(vl, " ").replace(ml, (t, a, l) => `${a} ${l}`).replace(Po, (t, a, l) => a + l.toUpperCase()), zo = (e) => {
const t = e.trim();
return t.charAt(0).toUpperCase() + t.slice(1);
}, Et = (e) => `\\${e}`, No = (e) => {
const t = $t(e), { length: a } = t, l = t.charCodeAt(0);
return t.split("").reduce((n, r, c) => {
const d = t.charCodeAt(c);
return d === 0 ? `${n}\uFFFD` : d === 127 || d >= 1 && d <= 31 || c === 0 && d >= 48 && d <= 57 || c === 1 && d >= 48 && d <= 57 && l === 45 ? n + Et(`${d.toString(16)} `) : c === 0 && d === 45 && a === 1 ? n + Et(r) : d >= 128 || d === 45 || d === 95 || d >= 48 && d <= 57 || d >= 65 && d <= 90 || d >= 97 && d <= 122 ? n + r : n + Et(r);
}, "");
}, aa = typeof window < "u", Do = typeof document < "u", Ho = typeof navigator < "u", bl = aa && Do && Ho, wa = aa ? window : {}, Ro = (() => {
let e = !1;
if (bl)
try {
const t = {
get passive() {
e = !0;
}
};
wa.addEventListener("test", t, t), wa.removeEventListener("test", t, t);
} catch {
e = !1;
}
return e;
})(), pl = typeof window < "u", gl = typeof document < "u", jo = typeof Element < "u", hl = typeof navigator < "u", wt = pl && gl && hl, Ge = pl ? window : {}, _t = gl ? document : {}, yl = hl ? navigator : {}, Bl = (yl.userAgent || "").toLowerCase();
Bl.indexOf("jsdom") > 0;
/msie|trident/.test(Bl);
(() => {
let e = !1;
if (wt)
try {
const t = {
get passive() {
return e = !0, e;
}
};
Ge.addEventListener("test", t, t), Ge.removeEventListener("test", t, t);
} catch {
e = !1;
}
return e;
})();
wt && ("ontouchstart" in _t.documentElement || yl.maxTouchPoints > 0);
wt && Boolean(Ge.PointerEvent || Ge.MSPointerEvent);
wt && "IntersectionObserver" in Ge && "IntersectionObserverEntry" in Ge && "intersectionRatio" in Ge.IntersectionObserverEntry.prototype;
const Oe = jo ? Element.prototype : void 0, Mo = (Oe == null ? void 0 : Oe.matches) || (Oe == null ? void 0 : Oe.msMatchesSelector) || (Oe == null ? void 0 : Oe.webkitMatchesSelector), Le = (e) => !!(e && e.nodeType === Node.ELEMENT_NODE), qo = (e) => Le(e) ? e.getBoundingClientRect() : null, Go = (e = []) => {
const { activeElement: t } = document;
return t && !e.some((a) => a === t) ? t : null;
}, Uo = (e) => Le(e) && e === Go(), Wo = (e, t = {}) => {
try {
e.focus(t);
} catch (a) {
console.error(a);
}
return Uo(e);
}, Ko = (e, t) => t && Le(e) && e.getAttribute(t) || null, Xo = (e) => {
if (Ko(e, "display") === "none")
return !1;
const t = qo(e);
return !!(t && t.height > 0 && t.width > 0);
}, Ve = (e, t) => !e || e(t).filter((a) => a.type !== kn).length < 1, $l = (e, t) => (Le(t) ? t : _t).querySelector(e) || null, Jo = (e, t) => Array.from([(Le(t) ? t : _t).querySelectorAll(e)]), la = (e, t) => t && Le(e) ? e.getAttribute(t) : null, Qo = (e) => _t.getElementById(/^#/.test(e) ? e.slice(1) : e) || null, Yo = (e, t, a) => {
t && Le(e) && e.setAttribute(t, a);
}, Zo = (e, t) => {
t && Le(e) && e.removeAttribute(t);
}, es = (e, t) => $t(e).toLowerCase() === $t(t).toLowerCase(), ct = aa ? window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame || ((e) => setTimeout(e, 16)) : (e) => setTimeout(e, 0), Sl = (e, t) => Le(e) ? Mo.call(e, t) : !1, ts = (Oe == null ? void 0 : Oe.closest) || function(e) {
let t = this;
if (!t)
return null;
do {
if (Sl(t, e))
return t;
t = t.parentElement || t.parentNode;
} while (t !== null && t.nodeType === Node.ELEMENT_NODE);
return null;
}, _a = (e, t, a = !1) => {
if (!Le(t))
return null;
const l = ts.call(t, e);
return a ? l : l === t ? null : l;
}, Tt = (e, t, a) => t.concat(["sm", "md", "lg", "xl", "xxl"]).reduce((l, n) => (l[e ? `${e}${n.charAt(0).toUpperCase() + n.slice(1)}` : n] = a, l), /* @__PURE__ */ Object.create(null)), kl = (e, t, a, l = a) => Object.keys(t).reduce((n, r) => (e[r] && n.push(
[l, r.replace(a, ""), e[r]].filter((c) => c && typeof c != "boolean").join("-").toLowerCase()
), n), []), Ne = (e = "") => `__BVID__${Math.random().toString().slice(2, 8)}___BV_${e}__`, Vt = (e, t) => e === !0 || e === "true" || e === "" ? "true" : e === "grammar" || e === "spelling" ? e : t === !1 ? "true" : e === !1 || e === "false" ? "false" : void 0, Lt = (e) => !!e && typeof e == "object" && e.constructor === Object, Mt = (e, t, a = !0) => {
const l = e instanceof Date && typeof e.getMonth == "function" ? new Date(e.getTime()) : Object.assign({}, e);
return Lt(e) && Lt(t) && Object.keys(t).forEach((n) => {
Lt(t[n]) ? n in e ? l[n] = Mt(e[n], t[n], a) : Object.assign(l, { [n]: t[n] }) : Array.isArray(t[n]) && Array.isArray(e[n]) ? Object.assign(l, {
[n]: a ? e[n].concat(
t[n].filter((r) => !e[n].includes(r))
) : t[n]
}) : Object.assign(l, { [n]: t[n] });
}), l;
}, Pe = (e, t = {}, a = {}) => {
const l = [e];
let n;
for (let r = 0; r < l.length && !n; r++) {
const c = l[r];
n = a[c];
}
return n && typeof n == "function" ? n(t) : n;
}, je = (e, t = NaN) => Number.isInteger(e) ? e : t, lt = (e, t = NaN) => {
const a = Number.parseInt(e, 10);
return Number.isNaN(a) ? t : a;
}, ot = (e, t = NaN) => {
const a = Number.parseFloat(e.toString());
return Number.isNaN(a) ? t : a;
}, At = (e, t) => Object.keys(e).filter((a) => !t.includes(a)).reduce((a, l) => ({ ...a, [l]: e[l] }), {}), St = (e) => Array.isArray(e) ? e.map((t) => St(t)) : e instanceof Date ? new Date(e.getTime()) : e && typeof e == "object" ? Object.getOwnPropertyNames(e).reduce((t, a) => {
var l;
return Object.defineProperty(t, a, (l = Object.getOwnPropertyDescriptor(e, a)) != null ? l : {}), t[a] = St(e[a]), t;
}, Object.create(Object.getPrototypeOf(e))) : e, qt = (e) => new Promise((t) => t(St(e))), Ta = (e, t) => t + (e ? zo(e) : ""), na = (e, t) => (Array.isArray(t) ? t.slice() : Object.keys(t)).reduce(
(a, l) => (a[l] = e[l], a),
{}
), as = (e) => typeof e == "boolean" ? e : e === "" ? !0 : e === "true", rt = (e) => !!(e.href || e.to);
function u(e) {
return nl(
() => e.value === void 0 || e.value === null ? e.value : as(e.value)
);
}
const Cl = Symbol(), wl = {
items: De([]),
reset() {
this.items = De([]);
}
}, ls = (e) => {
e.provide(Cl, wl);
}, _l = () => {
var e;
return (e = He(Cl)) != null ? e : wl;
}, _e = (e, t, a) => {
Be(() => {
var l;
(l = e == null ? void 0 : e.value) == null || l.addEventListener(t, a);
}), Zt(() => {
var l;
(l = e == null ? void 0 : e.value) == null || l.removeEventListener(t, a);
});
}, Tl = (e) => i(() => ({
"form-check": e.plain === !1 && e.button === !1,
"form-check-inline": e.inline === !0,
"form-switch": e.switch === !0,
[`form-control-${e.size}`]: e.size !== void 0 && e.size !== "md"
})), Vl = (e) => i(() => ({
"form-check-input": e.plain === !1 && e.button === !1,
"is-valid": e.state === !0,
"is-invalid": e.state === !1,
"btn-check": e.button === !0
})), Al = (e) => i(() => ({
"form-check-label": e.plain === !1 && e.button === !1,
btn: e.button === !0,
[`btn-${e.buttonVariant}`]: e.button === !0 && e.buttonVariant !== void 0,
[`btn-${e.size}`]: e.button && e.size && e.size !== "md"
})), Ol = (e) => i(() => ({
"aria-invalid": Vt(e.ariaInvalid, e.state),
"aria-required": e.required === !0 ? !0 : void 0
})), xl = (e) => i(() => ({
"was-validated": e.validated === !0,
"btn-group": e.buttons === !0 && e.stacked === !1,
"btn-group-vertical": e.stacked === !0,
[`btn-group-${e.size}`]: e.size !== void 0
})), kt = (e, t, a) => e.reduce(
(l, n) => n.type.toString() === "Symbol(Fragment)" ? l.concat(n.children) : l.concat([n]),
[]
).filter((l) => l.type.__name === t || l.type.name === t).map((l) => {
const n = (l.children.default ? l.children.default() : []).find(
(r) => r.type.toString() === "Symbol(Text)"
);
return {
props: {
disabled: a,
...l.props
},
text: n ? n.children : ""
};
}), Pl = (e, t) => typeof e == "string" ? {
props: {
value: e,
disabled: t.disabled
},
text: e
} : {
props: {
value: e[t.valueField],
disabled: t.disabled || e[t.disabledField],
...e.props
},
text: e[t.textField],
html: e[t.htmlField]
}, Il = (e, t, a, l, n) => ({
...e,
props: {
"button-variant": a.buttonVariant,
form: a.form,
name: l.value,
id: `${n.value}_option_${t}`,
button: a.buttons,
state: a.state,
plain: a.plain,
size: a.size,
inline: !a.stacked,
required: a.required,
...e.props
}
}), $e = (e, t) => i(() => (e == null ? void 0 : e.value) || Ne(t)), Fl = {
ariaInvalid: {
type: [Boolean, String],
default: void 0
},
autocomplete: { type: String, required: !1 },
autofocus: { type: Boolean, default: !1 },
disabled: { type: Boolean, default: !1 },
form: { type: String, required: !1 },
formatter: { type: Function, required: !1 },
id: { type: String, required: !1 },
lazy: { type: Boolean, default: !1 },
lazyFormatter: { type: Boolean, default: !1 },
list: { type: String, required: !1 },
modelValue: { type: [String, Number], default: "" },
name: { type: String, required: !1 },
number: { type: Boolean, default: !1 },
placeholder: { type: String, required: !1 },
plaintext: { type: Boolean, default: !1 },
readonly: { type: Boolean, default: !1 },
required: { type: Boolean, default: !1 },
size: { type: String, required: !1 },
state: { type: Boolean, default: null },
trim: { type: Boolean, default: !1 }
}, El = (e, t) => {
const a = U();
let l = null, n = !0;
const r = $e(s(e, "id"), "input"), c = (y, k, h = !1) => (y = String(y), typeof e.formatter == "function" && (!e.lazyFormatter || h) ? (n = !1, e.formatter(y, k)) : y), d = (y) => e.trim ? y.trim() : e.number ? Number.parseFloat(y) : y, v = () => {
Ee(() => {
var y;
e.autofocus && ((y = a.value) == null || y.focus());
});
};
Be(v), Be(() => {
a.value && (a.value.value = e.modelValue);
}), ea(v);
const b = i(
() => {
var y;
return Vt(e.ariaInvalid, (y = e.state) != null ? y : void 0);
}
), B = (y) => {
const { value: k } = y.target, h = c(k, y);
if (h === !1 || y.defaultPrevented) {
y.preventDefault();
return;
}
if (e.lazy)
return;
const S = d(h);
e.modelValue !== S && (l = k, t("update:modelValue", S)), t("input", h);
}, m = (y) => {
const { value: k } = y.target, h = c(k, y);
if (h === !1 || y.defaultPrevented) {
y.preventDefault();
return;
}
if (!e.lazy)
return;
l = k, t("update:modelValue", h);
const S = d(h);
e.modelValue !== S && t("change", h);
}, p = (y) => {
if (t("blur", y), !e.lazy && !e.lazyFormatter)
return;
const { value: k } = y.target, h = c(k, y, !0);
l = k, t("update:modelValue", h);
}, V = () => {
var y;
e.disabled || (y = a.value) == null || y.focus();
}, w = () => {
var y;
e.disabled || (y = a.value) == null || y.blur();
};
return de(
() => e.modelValue,
(y) => {
!a.value || (a.value.value = l && n ? l : y, l = null, n = !0);
}
), {
input: a,
computedId: r,
computedAriaInvalid: b,
onInput: B,
onChange: m,
onBlur: p,
focus: V,
blur: w
};
}, Je = (e, t) => {
if (!e)
return e;
if (t in e)
return e[t];
const a = t.split(".");
return Je(e[a[0]], a.splice(1).join("."));
}, zt = (e, t = null, a, l) => {
if (Object.prototype.toString.call(e) === "[object Object]") {
const n = Je(e, l.valueField), r = Je(e, l.textField), c = Je(e, l.htmlField), d = Je(e, l.disabledField), v = e[l.optionsField] || null;
return v !== null ? {
label: String(Je(e, l.labelField) || r),
options: oa(v, a, l)
} : {
value: typeof n > "u" ? t || r : n,
text: String(typeof r > "u" ? t : r),
html: c,
disabled: Boolean(d)
};
}
return {
value: t || e,
text: String(e),
disabled: !1
};
}, oa = (e, t, a) => Array.isArray(e) ? e.map((l) => zt(l, null, t, a)) : Object.prototype.toString.call(e) === "[object Object]" ? (console.warn(
`[BootstrapVue warn]: ${t} - Setting prop "options" to an object is deprecated. Use the array format instead.`
), Object.keys(e).map((l) => {
const n = e[l];
switch (typeof n) {
case "object":
return zt(n.text, String(n.value), t, a);
default:
return zt(n, String(l), t, a);
}
})) : [], ns = (e = !1, t = {}) => {
var n, r;
const a = "data-bs-theme", l = "body";
return wo({
attribute: a,
selector: l,
storageKey: e ? `${(n = t.attribute) != null ? n : a}-${(r = t.selector) != null ? r : l}` : null,
...t
});
}, os = ["id"], Ll = Symbol(), ss = /* @__PURE__ */ P({
__name: "BAccordion",
props: {
flush: { default: !1 },
free: { default: !1 },
id: null
},
setup(e) {
const t = e, a = $e(s(t, "id"), "accordion"), l = u(s(t, "flush")), n = u(s(t, "free")), r = i(() => ({
"accordion-flush": l.value
}));
return n.value || et(Ll, a.value), (c, d) => (f(), g("div", {
id: o(a),
class: E(["accordion", o(r)])
}, [
$(c.$slots, "default")
], 10, os));
}
}), zl = /* @__PURE__ */ P({
__name: "BCollapse",
props: {
accordion: null,
id: { default: Ne() },
modelValue: { default: !1 },
tag: { default: "div" },
toggle: { default: !1 },
visible: { default: !1 },
isNav: { default: !1 }
},
emits: ["update:modelValue", "show", "shown", "hide", "hidden"],
setup(e, { emit: t }) {
const a = e, l = u(s(a, "modelValue")), n = u(s(a, "toggle")), r = u(s(a, "visible")), c = u(s(a, "isNav")), d = U(), v = U(), b = i(() => ({
show: l.value,
"navbar-collapse": c.value
})), B = () => t("update:modelValue", !1);
return de(
() => l.value,
(m) => {
var p, V;
m ? (p = v.value) == null || p.show() : (V = v.value) == null || V.hide();
}
), de(
() => r.value,
(m) => {
var p, V;
m ? (t("update:modelValue", !!m), (p = v.value) == null || p.show()) : (t("update:modelValue", !!m), (V = v.value) == null || V.hide());
}
), _e(d, "show.bs.collapse", () => {
t("show"), t("update:modelValue", !0);
}), _e(d, "hide.bs.collapse", () => {
t("hide"), t("update:modelValue", !1);
}), _e(d, "shown.bs.collapse", () => t("shown")), _e(d, "hidden.bs.collapse", () => t("hidden")), Be(() => {
var m;
v.value = new In(d.value, {
parent: a.accordion ? `#${a.accordion}` : void 0,
toggle: n.value
}), (r.value || l.value) && (t("update:modelValue", !0), (m = v.value) == null || m.show());
}), (m, p) => (f(), z(Y(e.tag), {
id: e.id,
ref_key: "element",
ref: d,
class: E(["collapse", o(b)]),
"data-bs-parent": e.accordion || null,
"is-nav": o(c)
}, {
default: H(() => [
$(m.$slots, "default", {
visible: o(l),
close: B
})
]),
_: 3
}, 8, ["id", "class", "data-bs-parent", "is-nav"]));
}
}), Va = (e, t) => e.setAttribute("data-bs-theme", t), rs = {
mounted(e, t) {
Va(e, t.value);
},
updated(e, t) {
Va(e, t.value);
}
}, is = {
mounted(e, t) {
const a = t.modifiers.left ? "left" : t.modifiers.right ? "right" : t.modifiers.bottom ? "bottom" : t.modifiers.top ? "top" : "right", l = [];
t.modifiers.manual ? l.push("manual") : (t.modifiers.click && l.push("click"), t.modifiers.hover && l.push("hover"), t.modifiers.focus && l.push("focus")), e.setAttribute("data-bs-toggle", "popover"), new Dt(e, {
trigger: l.length === 0 ? "click" : l.join(" "),
placement: a,
content: t.value,
html: t.modifiers.html
});
},
unmounted(e) {
const t = Dt.getInstance(e);
t !== null && t.dispose();
}
}, us = (e) => {
if (e.classList.contains("offcanvas"))
return "offcanvas";
if (e.classList.contains("collapse"))
return "collapse";
throw Error("Couldn't resolve toggle type");
}, ds = (e, t) => {
const { modifiers: a, arg: l, value: n } = e, r = Object.keys(a || {}), c = typeof n == "string" ? n.split(mt) : n;
if (es(t.tagName, "a")) {
const d = la(t, "href") || "";
Eo.test(d) && r.push(d.replace(Fo, ""));
}
return Array.prototype.concat.apply([], [l, c]).forEach((d) => typeof d == "string" && r.push(d)), r.filter((d, v, b) => d && b.indexOf(d) === v);
}, sa = {
mounted(e, t) {
const a = ds(t, e), l = [], n = e.tagName === "a" ? "href" : "data-bs-target";
a.forEach((r) => {
const c = document.getElementById(r);
c !== null && (e.setAttribute("data-bs-toggle", us(c)), l.push(`#${r}`));
}), l.length > 0 && e.setAttribute(n, l.join(","));
}
}, cs = (e, t) => {
if (t != null && t.trigger)
return t.trigger;
if (e.manual)
return "manual";
const a = [];
return e.click && a.push("click"), e.hover && a.push("hover"), e.focus && a.push("focus"), a.length > 0 ? a.join(" ") : "hover focus";
}, fs = (e, t) => t != null && t.placement ? t.placement : e.left ? "left" : e.right ? "right" : e.bottom ? "bottom" : "top", vs = (e) => e != null && e.delay ? e.delay : 0, Aa = (e) => typeof e > "u" ? (console.warn(
"Review tooltip directive usage. Some uses are not defining a title in root component or a value like `v-b-tooltip='{title: \"my title\"}'` nor `v-b-tooltip=\"'my title'\"` to define a title"
), "") : typeof e == "object" ? e == null ? void 0 : e.title : e, ms = {
beforeMount(e, t) {
e.setAttribute("data-bs-toggle", "tooltip"), e.getAttribute("title") || e.setAttribute("title", Aa(t.value).toString());
const a = /<("[^"]*"|'[^']*'|[^'">])*>/.test(e.title), l = cs(t.modifiers, t.value), n = fs(t.modifiers, t.value), r = vs(t.value), c = e.getAttribute("title");
new Ft(e, {
trigger: l,
placement: n,
delay: r,
html: a
}), c && e.setAttribute("data-bs-original-title", c);
},
updated(e, t) {
e.getAttribute("title") || e.setAttribute("title", Aa(t.value).toString());
const a = e.getAttribute("title"), l = e.getAttribute("data-bs-original-title"), n = Ft.getInstance(e);
e.removeAttribute("title"), a && a !== l && (n == null || n.setContent({ ".tooltip-inner": a }), e.setAttribute("data-bs-original-title", a));
},
unmounted(e) {
const t = Ft.getInstance(e);
t !== null && t.dispose();
}
}, bt = /* @__PURE__ */ new Map();
class bs {
constructor(t, a, l, n, r) {
be(this, "element");
be(this, "margin");
be(this, "once");
be(this, "callback");
be(this, "instance");
be(this, "observer");
be(this, "doneOnce");
be(this, "visible");
this.element = t, this.margin = a, this.once = l, this.callback = n, this.instance = r, this.createObserver();
}
createObserver() {
if (this.observer && this.stop(), !(this.doneOnce || typeof this.callback != "function")) {
try {
this.observer = new IntersectionObserver(this.handler.bind(this), {
root: null,
rootMargin: this.margin,
threshold: 0
});
} catch {
console.error("Intersection Observer not supported"), this.doneOnce = !0, this.observer = void 0, this.callback(null);
return;
}
this.instance.$nextTick(() => {
this.observer && this.observer.observe(this.element);
});
}
}
handler(t) {
const [a] = t, l = Boolean(a.isIntersecting || a.intersectionRatio > 0);
l !== this.visible && (this.visible = l, this.callback(l), this.once && this.visible && (this.doneOnce = !0, this.stop()));
}
stop() {
this.observer && this.observer.disconnect(), this.observer = null;
}
}
const Nl = (e) => {
if (bt.has(e)) {
const t = bt.get(e);
t && t.stop && t.stop(), bt.delete(e);
}
}, Oa = (e, t) => {
const a = {
margin: "0px",
once: !1,
callback: t.value
};
Object.keys(t.modifiers).forEach((n) => {
Number.isInteger(n) ? a.margin = `${n}px` : n.toLowerCase() === "once" && (a.once = !0);
}), Nl(e);
const l = new bs(
e,
a.margin,
a.once,
a.callback,
t.instance
);
bt.set(e, l);
}, ps = {
beforeMount(e, t) {
Oa(e, t);
},
updated(e, t) {
Oa(e, t);
},
unmounted(e) {
Nl(e);
}
}, gs = { class: "accordion-item" }, hs = ["id"], ys = ["aria-expanded", "aria-controls"], Bs = { class: "accordion-body" }, $s = /* @__PURE__ */ P({
__name: "BAccordionItem",
props: {
id: null,
title: null,
visible: { default: !1 }
},
setup(e) {
const t = e, a = He(Ll, ""), l = $e(s(t, "id"), "accordion_item"), n = u(s(t, "visible"));
return (r, c) => (f(), g("div", gs, [
M("h2", {
id: `${o(l)}heading`,
class: "accordion-header"
}, [
tt((f(), g("button", {
class: E(["accordion-button", { collapsed: !o(n) }]),
type: "button",
"aria-expanded": o(n) ? "true" : "false",
"aria-controls": o(l)
}, [
$(r.$slots, "title", {}, () => [
ee(G(e.title), 1)
])
], 10, ys)), [
[o(sa), void 0, o(l)]
])
], 8, hs),
fe(zl, {
id: o(l),
class: "accordion-collapse",
visible: e.visible,
accordion: o(a),
"aria-labelledby": `heading${o(l)}`
}, {
default: H(() => [
M("div", Bs, [
$(r.$slots, "default")
])
]),
_: 3
}, 8, ["id", "visible", "accordion", "aria-labelledby"])
]));
}
}), ut = /* @__PURE__ */ P({
__name: "BTransition",
props: {
appear: { default: !1 },
mode: null,
noFade: { default: !1 },
transProps: null
},
setup(e) {
const t = e, a = u(s(t, "appear")), l = u(s(t, "noFade")), n = i(() => {
const d = {
name: "",
enterActiveClass: "",
enterToClass: "",
leaveActiveClass: "",
leaveToClass: "showing",
enterFromClass: "showing",
leaveFromClass: ""
}, v = {
...d,
enterActiveClass: "fade showing",
leaveActiveClass: "fade showing"
};
return l.value ? d : v;
}), r = i(() => ({ mode: t.mode, css: !0, ...n.value })), c = i(
() => t.transProps !== void 0 ? {
...r.value,
...t.transProps
} : a.value ? {
...r.value,
appear: !0,
appearActiveClass: n.value.enterActiveClass,
appearToClass: n.value.enterToClass
} : r.value
);
return (d, v) => (f(), z(Cn, he(Ce(o(c))), {
default: H(() => [
$(d.$slots, "default")
]),
_: 3
}, 16));
}
}), Ss = ["type", "disabled", "aria-label"], at = /* @__PURE__ */ P({
__name: "BCloseButton",
props: {
ariaLabel: { default: "Close" },
disabled: { default: !1 },
white: { default: !1 },
type: { default: "button" }
},
emits: ["click"],
setup(e, { emit: t }) {
const a = e, l = u(s(a, "disabled")), n = u(s(a, "white")), r = i(() => ({
"btn-close-white": n.value
}));
return (c, d) => (f(), g("button", {
type: e.type,
class: E(["btn-close", o(r)]),
disabled: o(l),
"aria-label": e.ariaLabel,
onClick: d[0] || (d[0] = (v) => t("click", v))
}, null, 10, Ss));
}
}), ks = {
key: 0,
class: "visually-hidden"
}, Ot = /* @__PURE__ */ P({
__name: "BSpinner",
props: {
label: null,
role: { default: "status" },
small: { default: !1 },
tag: { default: "span" },
type: { default: "border" },
variant: null
},
setup(e) {
const t = e, a = Se(), l = u(s(t, "small")), n = i(() => ({
"spinner-border": t.type === "border",
"spinner-border-sm": t.type === "border" && l.value,
"spinner-grow": t.type === "grow",
"spinner-grow-sm": t.type === "grow" && l.value,
[`text-${t.variant}`]: t.variant !== void 0
})), r = i(() => !Ve(a.label));
return (c, d) => (f(), z(Y(e.tag), {
class: E(o(n)),
role: e.label || o(r) ? e.role : null,
"aria-hidden": e.label || o(r) ? null : !0
}, {
default: H(() => [
e.label || o(r) ? (f(), g("span", ks, [
$(c.$slots, "label", {}, () => [
ee(G(e.label), 1)
])
])) : W("", !0)
]),
_: 3
}, 8, ["class", "role", "aria-hidden"]));
}
}), We = {
active: { type: [Boolean, String], default: !1 },
activeClass: { type: String, default: "router-link-active" },
append: { type: [Boolean, String], default: !1 },
disabled: { type: [Boolean, String], default: !1 },
event: { type: [String, Array], default: "click" },
exact: { type: [Boolean, String], default: !1 },
exactActiveClass: { type: String, default: "router-link-exact-active" },
href: { type: String },
rel: { type: String, default: null },
replace: { type: [Boolean, String], default: !1 },
routerComponentName: { type: String, default: "router-link" },
routerTag: { type: String, default: "a" },
target: { type: String, default: "_self" },
to: { type: [String, Object], default: null }
}, Cs = P({
props: We,
emits: ["click"],
setup(e, { emit: t, attrs: a }) {
const l = u(s(e, "active")), n = u(s(e, "append")), r = u(s(e, "disabled")), c = u(s(e, "exact")), d = u(s(e, "replace")), v = el(), b = U(null), B = i(() => {
const y = e.routerComponentName.split("-").map((h) => h.charAt(0).toUpperCase() + h.slice(1)).join("");
return !((v == null ? void 0 : v.appContext.app.component(y)) !== void 0) || r.value || !e.to ? "a" : e.routerComponentName;
}), m = i(() => {
const y = "#";
if (e.href)
return e.href;
if (typeof e.to == "string")
return e.to || y;
const k = e.to;
if (Object.prototype.toString.call(k) === "[object Object]" && (k.path || k.query || k.hash)) {
const h = k.path || "", S = k.query ? `?${Object.keys(k.query).map((F) => `${F}=${k.query[F]}`).join("=")}` : "", I = !k.hash || k.hash.charAt(0) === "#" ? k.hash || "" : `#${k.hash}`;
return `${h}${S}${I}` || y;
}
return y;
}), p = i(() => ({
to: e.to,
href: m.value,
target: e.target,
rel: e.target === "_blank" && e.rel === null ? "noopener" : e.rel || null,
tabindex: r.value ? "-1" : typeof a.tabindex > "u" ? null : a.tabindex,
"aria-disabled": r.value ? "true" : null
}));
return {
computedLinkClasses: i(() => ({
active: l.value,
disabled: r.value
})),
tag: B,
routerAttr: p,
link: b,
clicked: (y) => {
if (r.value) {
y.preventDefault(), y.stopImmediatePropagation();
return;
}
t("click", y);
},
activeBoolean: l,
appendBoolean: n,
disabledBoolean: r,
replaceBoolean: d,
exactBoolean: c
};
}
}), Te = (e, t) => {
const a = e.__vccOpts || e;
for (const [l, n] of t)
a[l] = n;
return a;
};
function ws(e, t, a, l, n, r) {
return e.tag === "router-link" ? (f(), z(Y(e.tag), J({ key: 0 }, e.routerAttr, { custom: "" }), {
default: H(({ href: c, navigate: d, isActive: v, isExactActive: b }) => [
(f(), z(Y(e.routerTag), J({
ref: "link",
href: c,
class: [
(v || e.activeBoolean) && e.activeClass,
(b || e.exactBoolean) && e.exactActiveClass
]
}, e.$attrs, { onClick: d }), {
default: H(() => [
$(e.$slots, "default")
]),
_: 2
}, 1040, ["href", "class", "onClick"]))
]),
_: 3
}, 16)) : (f(), z(Y(e.tag), J({
key: 1,
ref: "link",
class: e.computedLinkClasses
}, e.routerAttr, { onClick: e.clicked }), {
default: H(() => [
$(e.$slots, "default")
]),
_: 3
}, 16, ["class", "onClick"]));
}
const Ae = /* @__PURE__ */ Te(Cs, [["render", ws]]), _s = P({
components: { BLink: Ae, BSpinner: Ot },
props: {
...We,
active: { type: [Boolean, String], default: !1 },
disabled: { type: [Boolean, String], default: !1 },
href: { type: String, required: !1 },
pill: { type: [Boolean, String], default: !1 },
pressed: { type: [Boolean, String], default: !1 },
rel: { type: String, default: void 0 },
size: { type: String, default: "md" },
squared: { type: [Boolean, String], default: !1 },
tag: { type: String, default: "button" },
target: { type: String, default: "_self" },
type: { type: String, default: "button" },
variant: { type: String, default: "secondary" },
loading: { type: [Boolean, String], default: !1 },
loadingMode: { type: String, default: "inline" }
},
emits: ["click", "update:pressed"],
setup(e, { emit: t }) {
const a = u(s(e, "active")), l = u(s(e, "disabled")), n = u(s(e, "pill")), r = u(s(e, "pressed")), c = u(s(e, "squared")), d = u(s(e, "loading")), v = i(() => r.value === !0), b = i(
() => e.tag === "button" && e.href === void 0 && e.to === null
), B = i(() => rt(e)), m = i(() => e.to !== null), p = i(
() => e.href !== void 0 ? !1 : !b.value
), V = i(() => [
[`btn-${e.variant}`],
[`btn-${e.size}`],
{
active: a.value || r.value,
"rounded-pill": n.value,
"rounded-0": c.value,
disabled: l.value
}
]), w = i(() => ({
"aria-disabled": p.value ? l.value : null,
"aria-pressed": v.value ? r.value : null,
autocomplete: v.value ? "off" : null,
disabled: b.value ? l.value : null,
href: e.href,
rel: B.value ? e.rel : null,
role: p.value || B.value ? "button" : null,
target: B.value ? e.target : null,
type: b.value ? e.type : null,
to: b.value ? null : e.to,
append: B.value ? e.append : null,
activeClass: m.value ? e.activeClass : null,
event: m.value ? e.event : null,
exact: m.value ? e.exact : null,
exactActiveClass: m.value ? e.exactActiveClass : null,
replace: m.value ? e.replace : null,
routerComponentName: m.value ? e.routerComponentName : null,
routerTag: m.value ? e.routerTag : null
})), y = i(
() => m.value ? Ae : e.href ? "a" : e.tag
);
return {
computedClasses: V,
computedAttrs: w,
computedTag: y,
clicked: (h) => {
if (l.value) {
h.preventDefault(), h.stopPropagation();
return;
}
t("click", h), v.value && t("update:pressed", !r.value);
},
loadingBoolean: d
};
}
});
function Ts(e, t, a, l, n, r) {
const c = tl("b-spinner");
return f(), z(Y(e.computedTag), J({
class: ["btn", e.computedClasses]
}, e.computedAttrs, { onClick: e.clicked }), {
default: H(() => [
e.loadingBoolean ? (f(), g("div", {
key: 0,
class: E(["btn-loading", { "mode-fill": e.loadingMode === "fill", "mode-inline": e.loadingMode === "inline" }])
}, [
$(e.$slots, "loading", {}, () => [
fe(c, {
class: "btn-spinner",
small: e.size !== "lg"
}, null, 8, ["small"])
])
], 2)) : W("", !0),
M("div", {
class: E(["btn-content", { "btn-loading-fill": e.loadingBoolean && e.loadingMode === "fill" }])
}, [
$(e.$slots, "default")
], 2)
]),
_: 3
}, 16, ["class", "onClick"]);
}
const Ye = /* @__PURE__ */ Te(_s, [["render", Ts]]), Vs = (e, t = U(1e3), a = {}) => {
const l = U(!1), n = U(0), r = U(qe(e)), c = U(qe(t)), d = i(() => Math.ceil(r.value / c.value)), v = i(
() => m.value || l.value ? Math.round(r.value - n.value * c.value) : 0
), { pause: b, resume: B, isActive: m } = Jn(
() => n.value = n.value + 1,
t,
a
), p = () => {
l.value = !1, n.value = 0, B();
}, V = () => {
l.value = !1, n.value = d.value;
};
Qe(() => {
const k = qe(e), h = r.value;
k !== h && (r.value = k, V(), p());
}), Qe(() => {
const k = qe(t), h = c.value;
k !== h && (c.value = k, V(), p());
}), Qe(() => {
n.value > d.value && (n.value = d.value), n.value === d.value && b();
});
const w = () => {
m.value !== !1 && (l.value = !0, b());
}, y = () => {
n.value !== d.value && (l.value = !1, B());
};
return {
isActive: Nt(m),
isPaused: Nt(l),
restart: p,
stop: V,
pause: w,
resume: y,
value: v
};
}, As = /* @__PURE__ */ P({
__name: "BAlert",
props: {
dismissLabel: { default: "Close" },
dismissible: { default: !1 },
fade: { default: !1 },
modelValue: { type: [Boolean, Number], default: !1 },
variant: { default: "info" },
closeContent: null,
immediate: { default: !0 },
interval: { default: 1e3 },
showOnPause: { default: !0 }
},
emits: ["closed", "close-countdown", "update:modelValue"],
setup(e, { expose: t, emit: a }) {
const l = e, n = u(s(l, "dismissible")), r = u(s(l, "fade")), c = u(s(l, "immediate")), d = u(s(l, "showOnPause")), v = Se(), b = i(() => !Ve(v.close)), B = i(() => [
[`alert-${l.variant}`],
{
"alert-dismissible": n.value
}
]), {
isActive: m,
pause: p,
restart: V,
resume: w,
stop: y,
isPaused: k,
value: h
} = Vs(
typeof l.modelValue == "boolean" ? 0 : s(l, "modelValue"),
s(l, "interval"),
{
immediate: typeof l.modelValue == "number" && c.value
}
), S = i(
() => typeof l.modelValue == "boolean" ? l.modelValue : m.value || d.value && k.value
);
Qe(() => a("close-countdown", h.value));
const I = () => {
typeof l.modelValue == "boolean" ? a("update:modelValue", !1) : (a("update:modelValue", 0), y()), a("closed");
};
return Zt(() => y()), t({ pause: p, resume: w, restart: V, stop: y }), (F, x) => (f(), z(ut, {
"no-fade": !o(r),
"trans-props": { enterToClass: "show" }
}, {
default: H(() => [
o(S) ? (f(), g("div", {
key: 0,
class: E(["alert", o(B)]),
role: "alert",
"aria-live": "polite",
"aria-atomic": "true"
}, [
$(F.$slots, "default"),
o(n) ? (f(), g(oe, { key: 0 }, [
o(b) || e.closeContent ? (f(), z(Ye, {
key: 0,
type: "button",
onClick: I
}, {
default: H(() => [
$(F.$slots, "close", {}, () => [
ee(G(e.closeContent), 1)
])
]),
_: 3
})) : (f(), z(at, {
key: 1,
"aria-label": e.dismissLabel,
onClick: I
}, null, 8, ["aria-label"]))
], 64)) : W("