UNPKG

@konnectio/core

Version:

Konnectio Core Frontend Integration.

1,612 lines 54.2 kB
import { d as J, ak as at, al as lt, W as R, h as D, b as x, e as L, i as ye, F as pt, a as ee, q as Y, K as ne, ag as dt, n as me, $ as ht, r as de, m as ut, U as ct, w as X, f as Ee, t as ft, J as Re, am as mt, a8 as gt, a9 as wt } from "./mitt-CvmiLPAX.js"; import { W as vt, Y as re, Q as yt, a7 as $t, U as _t, R as bt, V as Tt, a8 as St } from "./SelectField.vue_vue_type_style_index_0_lang-C60Scz2U.js"; function v(e) { var t; return ((t = e.ownerDocument) == null ? void 0 : t.defaultView) || window; } function T(e) { return v(e).getComputedStyle(e); } const $e = Math.min, k = Math.max, K = Math.round; function De(e) { const t = T(e); let o = parseFloat(t.width), i = parseFloat(t.height); const s = e.offsetWidth, n = e.offsetHeight, r = K(o) !== s || K(i) !== n; return r && (o = s, i = n), { width: o, height: i, fallback: r }; } function H(e) { return Ie(e) ? (e.nodeName || "").toLowerCase() : ""; } let q; function Fe() { if (q) return q; const e = navigator.userAgentData; return e && Array.isArray(e.brands) ? (q = e.brands.map(((t) => t.brand + "/" + t.version)).join(" "), q) : navigator.userAgent; } function S(e) { return e instanceof v(e).HTMLElement; } function z(e) { return e instanceof v(e).Element; } function Ie(e) { return e instanceof v(e).Node; } function _e(e) { return typeof ShadowRoot > "u" ? !1 : e instanceof v(e).ShadowRoot || e instanceof ShadowRoot; } function te(e) { const { overflow: t, overflowX: o, overflowY: i, display: s } = T(e); return /auto|scroll|overlay|hidden|clip/.test(t + i + o) && !["inline", "contents"].includes(s); } function xt(e) { return ["table", "td", "th"].includes(H(e)); } function he(e) { const t = /firefox/i.test(Fe()), o = T(e), i = o.backdropFilter || o.WebkitBackdropFilter; return o.transform !== "none" || o.perspective !== "none" || !!i && i !== "none" || t && o.willChange === "filter" || t && !!o.filter && o.filter !== "none" || ["transform", "perspective"].some(((s) => o.willChange.includes(s))) || ["paint", "layout", "strict", "content"].some(((s) => { const n = o.contain; return n != null && n.includes(s); })); } function We() { return !/^((?!chrome|android).)*safari/i.test(Fe()); } function ge(e) { return ["html", "body", "#document"].includes(H(e)); } function je(e) { return z(e) ? e : e.contextElement; } const Ve = { x: 1, y: 1 }; function O(e) { const t = je(e); if (!S(t)) return Ve; const o = t.getBoundingClientRect(), { width: i, height: s, fallback: n } = De(t); let r = (n ? K(o.width) : o.width) / i, a = (n ? K(o.height) : o.height) / s; return r && Number.isFinite(r) || (r = 1), a && Number.isFinite(a) || (a = 1), { x: r, y: a }; } function F(e, t, o, i) { var s, n; t === void 0 && (t = !1), o === void 0 && (o = !1); const r = e.getBoundingClientRect(), a = je(e); let l = Ve; t && (i ? z(i) && (l = O(i)) : l = O(e)); const p = a ? v(a) : window, c = !We() && o; let h = (r.left + (c && ((s = p.visualViewport) == null ? void 0 : s.offsetLeft) || 0)) / l.x, u = (r.top + (c && ((n = p.visualViewport) == null ? void 0 : n.offsetTop) || 0)) / l.y, g = r.width / l.x, w = r.height / l.y; if (a) { const m = v(a), y = i && z(i) ? v(i) : i; let f = m.frameElement; for (; f && i && y !== m; ) { const b = O(f), V = f.getBoundingClientRect(), ve = getComputedStyle(f); V.x += (f.clientLeft + parseFloat(ve.paddingLeft)) * b.x, V.y += (f.clientTop + parseFloat(ve.paddingTop)) * b.y, h *= b.x, u *= b.y, g *= b.x, w *= b.y, h += V.x, u += V.y, f = v(f).frameElement; } } return { width: g, height: w, top: u, right: h + g, bottom: u + w, left: h, x: h, y: u }; } function N(e) { return ((Ie(e) ? e.ownerDocument : e.document) || window.document).documentElement; } function oe(e) { return z(e) ? { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop } : { scrollLeft: e.pageXOffset, scrollTop: e.pageYOffset }; } function qe(e) { return F(N(e)).left + oe(e).scrollLeft; } function I(e) { if (H(e) === "html") return e; const t = e.assignedSlot || e.parentNode || _e(e) && e.host || N(e); return _e(t) ? t.host : t; } function Ge(e) { const t = I(e); return ge(t) ? t.ownerDocument.body : S(t) && te(t) ? t : Ge(t); } function Q(e, t) { var o; t === void 0 && (t = []); const i = Ge(e), s = i === ((o = e.ownerDocument) == null ? void 0 : o.body), n = v(i); return s ? t.concat(n, n.visualViewport || [], te(i) ? i : []) : t.concat(i, Q(i)); } function be(e, t, o) { return t === "viewport" ? re((function(i, s) { const n = v(i), r = N(i), a = n.visualViewport; let l = r.clientWidth, p = r.clientHeight, c = 0, h = 0; if (a) { l = a.width, p = a.height; const u = We(); (u || !u && s === "fixed") && (c = a.offsetLeft, h = a.offsetTop); } return { width: l, height: p, x: c, y: h }; })(e, o)) : z(t) ? re((function(i, s) { const n = F(i, !0, s === "fixed"), r = n.top + i.clientTop, a = n.left + i.clientLeft, l = S(i) ? O(i) : { x: 1, y: 1 }; return { width: i.clientWidth * l.x, height: i.clientHeight * l.y, x: a * l.x, y: r * l.y }; })(t, o)) : re((function(i) { const s = N(i), n = oe(i), r = i.ownerDocument.body, a = k(s.scrollWidth, s.clientWidth, r.scrollWidth, r.clientWidth), l = k(s.scrollHeight, s.clientHeight, r.scrollHeight, r.clientHeight); let p = -n.scrollLeft + qe(i); const c = -n.scrollTop; return T(r).direction === "rtl" && (p += k(s.clientWidth, r.clientWidth) - a), { width: a, height: l, x: p, y: c }; })(N(e))); } function Te(e) { return S(e) && T(e).position !== "fixed" ? e.offsetParent : null; } function Se(e) { const t = v(e); let o = Te(e); for (; o && xt(o) && T(o).position === "static"; ) o = Te(o); return o && (H(o) === "html" || H(o) === "body" && T(o).position === "static" && !he(o)) ? t : o || (function(i) { let s = I(i); for (; S(s) && !ge(s); ) { if (he(s)) return s; s = I(s); } return null; })(e) || t; } function Pt(e, t, o) { const i = S(t), s = N(t), n = F(e, !0, o === "fixed", t); let r = { scrollLeft: 0, scrollTop: 0 }; const a = { x: 0, y: 0 }; if (i || !i && o !== "fixed") if ((H(t) !== "body" || te(s)) && (r = oe(t)), S(t)) { const l = F(t, !0); a.x = l.x + t.clientLeft, a.y = l.y + t.clientTop; } else s && (a.x = qe(s)); return { x: n.left + r.scrollLeft - a.x, y: n.top + r.scrollTop - a.y, width: n.width, height: n.height }; } const Ct = { getClippingRect: function(e) { let { element: t, boundary: o, rootBoundary: i, strategy: s } = e; const n = o === "clippingAncestors" ? (function(p, c) { const h = c.get(p); if (h) return h; let u = Q(p).filter(((y) => z(y) && H(y) !== "body")), g = null; const w = T(p).position === "fixed"; let m = w ? I(p) : p; for (; z(m) && !ge(m); ) { const y = T(m), f = he(m); (w ? f || g : f || y.position !== "static" || !g || !["absolute", "fixed"].includes(g.position)) ? g = y : u = u.filter(((b) => b !== m)), m = I(m); } return c.set(p, u), u; })(t, this._c) : [].concat(o), r = [...n, i], a = r[0], l = r.reduce(((p, c) => { const h = be(t, c, s); return p.top = k(h.top, p.top), p.right = $e(h.right, p.right), p.bottom = $e(h.bottom, p.bottom), p.left = k(h.left, p.left), p; }), be(t, a, s)); return { width: l.right - l.left, height: l.bottom - l.top, x: l.left, y: l.top }; }, convertOffsetParentRelativeRectToViewportRelativeRect: function(e) { let { rect: t, offsetParent: o, strategy: i } = e; const s = S(o), n = N(o); if (o === n) return t; let r = { scrollLeft: 0, scrollTop: 0 }, a = { x: 1, y: 1 }; const l = { x: 0, y: 0 }; if ((s || !s && i !== "fixed") && ((H(o) !== "body" || te(n)) && (r = oe(o)), S(o))) { const p = F(o); a = O(o), l.x = p.x + o.clientLeft, l.y = p.y + o.clientTop; } return { width: t.width * a.x, height: t.height * a.y, x: t.x * a.x - r.scrollLeft * a.x + l.x, y: t.y * a.y - r.scrollTop * a.y + l.y }; }, isElement: z, getDimensions: function(e) { return S(e) ? De(e) : e.getBoundingClientRect(); }, getOffsetParent: Se, getDocumentElement: N, getScale: O, async getElementRects(e) { let { reference: t, floating: o, strategy: i } = e; const s = this.getOffsetParent || Se, n = this.getDimensions; return { reference: Pt(t, await s(o), i), floating: { x: 0, y: 0, ...await n(o) } }; }, getClientRects: (e) => Array.from(e.getClientRects()), isRTL: (e) => T(e).direction === "rtl" }, zt = (e, t, o) => { const i = /* @__PURE__ */ new Map(), s = { platform: Ct, ...o }, n = { ...s.platform, _c: i }; return vt(e, t, { ...s, platform: n }); }; function Ue(e, t) { for (const o in t) Object.prototype.hasOwnProperty.call(t, o) && (typeof t[o] == "object" && e[o] ? Ue(e[o], t[o]) : e[o] = t[o]); } const _ = { // Disable popper components disabled: !1, // Default position offset along main axis (px) distance: 5, // Default position offset along cross axis (px) skidding: 0, // Default container where the tooltip will be appended container: "body", // Element used to compute position and size boundaries boundary: void 0, // Skip delay & CSS transitions when another popper is shown, so that the popper appear to instanly move to the new position. instantMove: !1, // Auto destroy tooltip DOM nodes (ms) disposeTimeout: 150, // Triggers on the popper itself popperTriggers: [], // Positioning strategy strategy: "absolute", // Prevent overflow preventOverflow: !0, // Flip to the opposite placement if needed flip: !0, // Shift on the cross axis to prevent the popper from overflowing shift: !0, // Overflow padding (px) overflowPadding: 0, // Arrow padding (px) arrowPadding: 0, // Compute arrow overflow (useful to hide it) arrowOverflow: !0, /** * By default, compute autohide on 'click'. */ autoHideOnMousedown: !1, // Themes themes: { tooltip: { // Default tooltip placement relative to target element placement: "top", // Default events that trigger the tooltip triggers: ["hover", "focus", "touch"], // Close tooltip on click on tooltip target hideTriggers: (e) => [...e, "click"], // Delay (ms) delay: { show: 200, hide: 0 }, // Update popper on content resize handleResize: !1, // Enable HTML content in directive html: !1, // Displayed when tooltip content is loading loadingContent: "..." }, dropdown: { // Default dropdown placement relative to target element placement: "bottom", // Default events that trigger the dropdown triggers: ["click"], // Delay (ms) delay: 0, // Update popper on content resize handleResize: !0, // Hide on clock outside autoHide: !0 }, menu: { $extend: "dropdown", triggers: ["hover", "focus"], popperTriggers: ["hover"], delay: { show: 0, hide: 400 } } } }; function W(e, t) { let o = _.themes[e] || {}, i; do i = o[t], typeof i > "u" ? o.$extend ? o = _.themes[o.$extend] || {} : (o = null, i = _[t]) : o = null; while (o); return i; } function Nt(e) { const t = [e]; let o = _.themes[e] || {}; do o.$extend && !o.$resetCss ? (t.push(o.$extend), o = _.themes[o.$extend] || {}) : o = null; while (o); return t.map((i) => `v-popper--theme-${i}`); } function xe(e) { const t = [e]; let o = _.themes[e] || {}; do o.$extend ? (t.push(o.$extend), o = _.themes[o.$extend] || {}) : o = null; while (o); return t; } let M = !1; if (typeof window < "u") { M = !1; try { const e = Object.defineProperty({}, "passive", { get() { M = !0; } }); window.addEventListener("test", null, e); } catch { } } let Ye = !1; typeof window < "u" && typeof navigator < "u" && (Ye = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream); const Xe = ["auto", "top", "bottom", "left", "right"].reduce((e, t) => e.concat([ t, `${t}-start`, `${t}-end` ]), []), Pe = { hover: "mouseenter", focus: "focus", click: "click", touch: "touchstart", pointer: "pointerdown" }, Ce = { hover: "mouseleave", focus: "blur", click: "click", touch: "touchend", pointer: "pointerup" }; function ze(e, t) { const o = e.indexOf(t); o !== -1 && e.splice(o, 1); } function ae() { return new Promise((e) => requestAnimationFrame(() => { requestAnimationFrame(e); })); } const $ = []; let A = null; const Ne = {}; function He(e) { let t = Ne[e]; return t || (t = Ne[e] = []), t; } let ue = function() { }; typeof window < "u" && (ue = window.Element); function d(e) { return function(t) { return W(t.theme, e); }; } const le = "__floating-vue__popper", Ke = () => J({ name: "VPopper", provide() { return { [le]: { parentPopper: this } }; }, inject: { [le]: { default: null } }, props: { theme: { type: String, required: !0 }, targetNodes: { type: Function, required: !0 }, referenceNode: { type: Function, default: null }, popperNode: { type: Function, required: !0 }, shown: { type: Boolean, default: !1 }, showGroup: { type: String, default: null }, // eslint-disable-next-line vue/require-prop-types ariaId: { default: null }, disabled: { type: Boolean, default: d("disabled") }, positioningDisabled: { type: Boolean, default: d("positioningDisabled") }, placement: { type: String, default: d("placement"), validator: (e) => Xe.includes(e) }, delay: { type: [String, Number, Object], default: d("delay") }, distance: { type: [Number, String], default: d("distance") }, skidding: { type: [Number, String], default: d("skidding") }, triggers: { type: Array, default: d("triggers") }, showTriggers: { type: [Array, Function], default: d("showTriggers") }, hideTriggers: { type: [Array, Function], default: d("hideTriggers") }, popperTriggers: { type: Array, default: d("popperTriggers") }, popperShowTriggers: { type: [Array, Function], default: d("popperShowTriggers") }, popperHideTriggers: { type: [Array, Function], default: d("popperHideTriggers") }, container: { type: [String, Object, ue, Boolean], default: d("container") }, boundary: { type: [String, ue], default: d("boundary") }, strategy: { type: String, validator: (e) => ["absolute", "fixed"].includes(e), default: d("strategy") }, autoHide: { type: [Boolean, Function], default: d("autoHide") }, handleResize: { type: Boolean, default: d("handleResize") }, instantMove: { type: Boolean, default: d("instantMove") }, eagerMount: { type: Boolean, default: d("eagerMount") }, popperClass: { type: [String, Array, Object], default: d("popperClass") }, computeTransformOrigin: { type: Boolean, default: d("computeTransformOrigin") }, /** * @deprecated */ autoMinSize: { type: Boolean, default: d("autoMinSize") }, autoSize: { type: [Boolean, String], default: d("autoSize") }, /** * @deprecated */ autoMaxSize: { type: Boolean, default: d("autoMaxSize") }, autoBoundaryMaxSize: { type: Boolean, default: d("autoBoundaryMaxSize") }, preventOverflow: { type: Boolean, default: d("preventOverflow") }, overflowPadding: { type: [Number, String], default: d("overflowPadding") }, arrowPadding: { type: [Number, String], default: d("arrowPadding") }, arrowOverflow: { type: Boolean, default: d("arrowOverflow") }, flip: { type: Boolean, default: d("flip") }, shift: { type: Boolean, default: d("shift") }, shiftCrossAxis: { type: Boolean, default: d("shiftCrossAxis") }, noAutoFocus: { type: Boolean, default: d("noAutoFocus") }, disposeTimeout: { type: Number, default: d("disposeTimeout") } }, emits: { show: () => !0, hide: () => !0, "update:shown": (e) => !0, "apply-show": () => !0, "apply-hide": () => !0, "close-group": () => !0, "close-directive": () => !0, "auto-hide": () => !0, resize: () => !0 }, data() { return { isShown: !1, isMounted: !1, skipTransition: !1, classes: { showFrom: !1, showTo: !1, hideFrom: !1, hideTo: !0 }, result: { x: 0, y: 0, placement: "", strategy: this.strategy, arrow: { x: 0, y: 0, centerOffset: 0 }, transformOrigin: null }, randomId: `popper_${[Math.random(), Date.now()].map((e) => e.toString(36).substring(2, 10)).join("_")}`, shownChildren: /* @__PURE__ */ new Set(), lastAutoHide: !0, pendingHide: !1, containsGlobalTarget: !1, isDisposed: !0, mouseDownContains: !1 }; }, computed: { popperId() { return this.ariaId != null ? this.ariaId : this.randomId; }, shouldMountContent() { return this.eagerMount || this.isMounted; }, slotData() { return { popperId: this.popperId, isShown: this.isShown, shouldMountContent: this.shouldMountContent, skipTransition: this.skipTransition, autoHide: typeof this.autoHide == "function" ? this.lastAutoHide : this.autoHide, show: this.show, hide: this.hide, handleResize: this.handleResize, onResize: this.onResize, classes: { ...this.classes, popperClass: this.popperClass }, result: this.positioningDisabled ? null : this.result, attrs: this.$attrs }; }, parentPopper() { var e; return (e = this[le]) == null ? void 0 : e.parentPopper; }, hasPopperShowTriggerHover() { var e, t; return ((e = this.popperTriggers) == null ? void 0 : e.includes("hover")) || ((t = this.popperShowTriggers) == null ? void 0 : t.includes("hover")); } }, watch: { shown: "$_autoShowHide", disabled(e) { e ? this.dispose() : this.init(); }, async container() { this.isShown && (this.$_ensureTeleport(), await this.$_computePosition()); }, triggers: { handler: "$_refreshListeners", deep: !0 }, positioningDisabled: "$_refreshListeners", ...[ "placement", "distance", "skidding", "boundary", "strategy", "overflowPadding", "arrowPadding", "preventOverflow", "shift", "shiftCrossAxis", "flip" ].reduce((e, t) => (e[t] = "$_computePosition", e), {}) }, created() { this.autoMinSize && console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'), this.autoMaxSize && console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead."); }, mounted() { this.init(), this.$_detachPopperNode(); }, activated() { this.$_autoShowHide(); }, deactivated() { this.hide(); }, beforeUnmount() { this.dispose(); }, methods: { show({ event: e = null, skipDelay: t = !1, force: o = !1 } = {}) { var i, s; (i = this.parentPopper) != null && i.lockedChild && this.parentPopper.lockedChild !== this || (this.pendingHide = !1, (o || !this.disabled) && (((s = this.parentPopper) == null ? void 0 : s.lockedChild) === this && (this.parentPopper.lockedChild = null), this.$_scheduleShow(e, t), this.$emit("show"), this.$_showFrameLocked = !0, requestAnimationFrame(() => { this.$_showFrameLocked = !1; })), this.$emit("update:shown", !0)); }, hide({ event: e = null, skipDelay: t = !1 } = {}) { var o; if (!this.$_hideInProgress) { if (this.shownChildren.size > 0) { this.pendingHide = !0; return; } if (this.hasPopperShowTriggerHover && this.$_isAimingPopper()) { this.parentPopper && (this.parentPopper.lockedChild = this, clearTimeout(this.parentPopper.lockedChildTimer), this.parentPopper.lockedChildTimer = setTimeout(() => { this.parentPopper.lockedChild === this && (this.parentPopper.lockedChild.hide({ skipDelay: t }), this.parentPopper.lockedChild = null); }, 1e3)); return; } ((o = this.parentPopper) == null ? void 0 : o.lockedChild) === this && (this.parentPopper.lockedChild = null), this.pendingHide = !1, this.$_scheduleHide(e, t), this.$emit("hide"), this.$emit("update:shown", !1); } }, init() { var e; this.isDisposed && (this.isDisposed = !1, this.isMounted = !1, this.$_events = [], this.$_preventShow = !1, this.$_referenceNode = ((e = this.referenceNode) == null ? void 0 : e.call(this)) ?? this.$el, this.$_targetNodes = this.targetNodes().filter((t) => t.nodeType === t.ELEMENT_NODE), this.$_popperNode = this.popperNode(), this.$_innerNode = this.$_popperNode.querySelector(".v-popper__inner"), this.$_arrowNode = this.$_popperNode.querySelector(".v-popper__arrow-container"), this.$_swapTargetAttrs("title", "data-original-title"), this.$_detachPopperNode(), this.triggers.length && this.$_addEventListeners(), this.shown && this.show()); }, dispose() { this.isDisposed || (this.isDisposed = !0, this.$_removeEventListeners(), this.hide({ skipDelay: !0 }), this.$_detachPopperNode(), this.isMounted = !1, this.isShown = !1, this.$_updateParentShownChildren(!1), this.$_swapTargetAttrs("data-original-title", "title")); }, async onResize() { this.isShown && (await this.$_computePosition(), this.$emit("resize")); }, async $_computePosition() { if (this.isDisposed || this.positioningDisabled) return; const e = { strategy: this.strategy, middleware: [] }; (this.distance || this.skidding) && e.middleware.push(yt({ mainAxis: this.distance, crossAxis: this.skidding })); const t = this.placement.startsWith("auto"); if (t ? e.middleware.push($t({ alignment: this.placement.split("-")[1] ?? "" })) : e.placement = this.placement, this.preventOverflow && (this.shift && e.middleware.push(_t({ padding: this.overflowPadding, boundary: this.boundary, crossAxis: this.shiftCrossAxis })), !t && this.flip && e.middleware.push(bt({ padding: this.overflowPadding, boundary: this.boundary }))), e.middleware.push(Tt({ element: this.$_arrowNode, padding: this.arrowPadding })), this.arrowOverflow && e.middleware.push({ name: "arrowOverflow", fn: ({ placement: i, rects: s, middlewareData: n }) => { let r; const { centerOffset: a } = n.arrow; return i.startsWith("top") || i.startsWith("bottom") ? r = Math.abs(a) > s.reference.width / 2 : r = Math.abs(a) > s.reference.height / 2, { data: { overflow: r } }; } }), this.autoMinSize || this.autoSize) { const i = this.autoSize ? this.autoSize : this.autoMinSize ? "min" : null; e.middleware.push({ name: "autoSize", fn: ({ rects: s, placement: n, middlewareData: r }) => { var a; if ((a = r.autoSize) != null && a.skip) return {}; let l, p; return n.startsWith("top") || n.startsWith("bottom") ? l = s.reference.width : p = s.reference.height, this.$_innerNode.style[i === "min" ? "minWidth" : i === "max" ? "maxWidth" : "width"] = l != null ? `${l}px` : null, this.$_innerNode.style[i === "min" ? "minHeight" : i === "max" ? "maxHeight" : "height"] = p != null ? `${p}px` : null, { data: { skip: !0 }, reset: { rects: !0 } }; } }); } (this.autoMaxSize || this.autoBoundaryMaxSize) && (this.$_innerNode.style.maxWidth = null, this.$_innerNode.style.maxHeight = null, e.middleware.push(St({ boundary: this.boundary, padding: this.overflowPadding, apply: ({ availableWidth: i, availableHeight: s }) => { this.$_innerNode.style.maxWidth = i != null ? `${i}px` : null, this.$_innerNode.style.maxHeight = s != null ? `${s}px` : null; } }))); const o = await zt(this.$_referenceNode, this.$_popperNode, e); Object.assign(this.result, { x: o.x, y: o.y, placement: o.placement, strategy: o.strategy, arrow: { ...o.middlewareData.arrow, ...o.middlewareData.arrowOverflow } }); }, $_scheduleShow(e, t = !1) { if (this.$_updateParentShownChildren(!0), this.$_hideInProgress = !1, clearTimeout(this.$_scheduleTimer), A && this.instantMove && A.instantMove && A !== this.parentPopper) { A.$_applyHide(!0), this.$_applyShow(!0); return; } t ? this.$_applyShow() : this.$_scheduleTimer = setTimeout(this.$_applyShow.bind(this), this.$_computeDelay("show")); }, $_scheduleHide(e, t = !1) { if (this.shownChildren.size > 0) { this.pendingHide = !0; return; } this.$_updateParentShownChildren(!1), this.$_hideInProgress = !0, clearTimeout(this.$_scheduleTimer), this.isShown && (A = this), t ? this.$_applyHide() : this.$_scheduleTimer = setTimeout(this.$_applyHide.bind(this), this.$_computeDelay("hide")); }, $_computeDelay(e) { const t = this.delay; return parseInt(t && t[e] || t || 0); }, async $_applyShow(e = !1) { clearTimeout(this.$_disposeTimer), clearTimeout(this.$_scheduleTimer), this.skipTransition = e, !this.isShown && (this.$_ensureTeleport(), await ae(), await this.$_computePosition(), await this.$_applyShowEffect(), this.positioningDisabled || this.$_registerEventListeners([ ...Q(this.$_referenceNode), ...Q(this.$_popperNode) ], "scroll", () => { this.$_computePosition(); })); }, async $_applyShowEffect() { if (this.$_hideInProgress) return; if (this.computeTransformOrigin) { const t = this.$_referenceNode.getBoundingClientRect(), o = this.$_popperNode.querySelector(".v-popper__wrapper"), i = o.parentNode.getBoundingClientRect(), s = t.x + t.width / 2 - (i.left + o.offsetLeft), n = t.y + t.height / 2 - (i.top + o.offsetTop); this.result.transformOrigin = `${s}px ${n}px`; } this.isShown = !0, this.$_applyAttrsToTarget({ "aria-describedby": this.popperId, "data-popper-shown": "" }); const e = this.showGroup; if (e) { let t; for (let o = 0; o < $.length; o++) t = $[o], t.showGroup !== e && (t.hide(), t.$emit("close-group")); } $.push(this), document.body.classList.add("v-popper--some-open"); for (const t of xe(this.theme)) He(t).push(this), document.body.classList.add(`v-popper--some-open--${t}`); this.$emit("apply-show"), this.classes.showFrom = !0, this.classes.showTo = !1, this.classes.hideFrom = !1, this.classes.hideTo = !1, await ae(), this.classes.showFrom = !1, this.classes.showTo = !0, this.noAutoFocus || this.$_popperNode.focus(); }, async $_applyHide(e = !1) { if (this.shownChildren.size > 0) { this.pendingHide = !0, this.$_hideInProgress = !1; return; } if (clearTimeout(this.$_scheduleTimer), !this.isShown) return; this.skipTransition = e, ze($, this), $.length === 0 && document.body.classList.remove("v-popper--some-open"); for (const o of xe(this.theme)) { const i = He(o); ze(i, this), i.length === 0 && document.body.classList.remove(`v-popper--some-open--${o}`); } A === this && (A = null), this.isShown = !1, this.$_applyAttrsToTarget({ "aria-describedby": void 0, "data-popper-shown": void 0 }), clearTimeout(this.$_disposeTimer); const t = this.disposeTimeout; t !== null && (this.$_disposeTimer = setTimeout(() => { this.$_popperNode && (this.$_detachPopperNode(), this.isMounted = !1); }, t)), this.$_removeEventListeners("scroll"), this.$emit("apply-hide"), this.classes.showFrom = !1, this.classes.showTo = !1, this.classes.hideFrom = !0, this.classes.hideTo = !1, await ae(), this.classes.hideFrom = !1, this.classes.hideTo = !0; }, $_autoShowHide() { this.shown ? this.show() : this.hide(); }, $_ensureTeleport() { if (this.isDisposed) return; let e = this.container; if (typeof e == "string" ? e = window.document.querySelector(e) : e === !1 && (e = this.$_targetNodes[0].parentNode), !e) throw new Error("No container for popover: " + this.container); e.appendChild(this.$_popperNode), this.isMounted = !0; }, $_addEventListeners() { const e = (o) => { this.isShown && !this.$_hideInProgress || (o.usedByTooltip = !0, !this.$_preventShow && this.show({ event: o })); }; this.$_registerTriggerListeners(this.$_targetNodes, Pe, this.triggers, this.showTriggers, e), this.$_registerTriggerListeners([this.$_popperNode], Pe, this.popperTriggers, this.popperShowTriggers, e); const t = (o) => { o.usedByTooltip || this.hide({ event: o }); }; this.$_registerTriggerListeners(this.$_targetNodes, Ce, this.triggers, this.hideTriggers, t), this.$_registerTriggerListeners([this.$_popperNode], Ce, this.popperTriggers, this.popperHideTriggers, t); }, $_registerEventListeners(e, t, o) { this.$_events.push({ targetNodes: e, eventType: t, handler: o }), e.forEach((i) => i.addEventListener(t, o, M ? { passive: !0 } : void 0)); }, $_registerTriggerListeners(e, t, o, i, s) { let n = o; i != null && (n = typeof i == "function" ? i(n) : i), n.forEach((r) => { const a = t[r]; a && this.$_registerEventListeners(e, a, s); }); }, $_removeEventListeners(e) { const t = []; this.$_events.forEach((o) => { const { targetNodes: i, eventType: s, handler: n } = o; !e || e === s ? i.forEach((r) => r.removeEventListener(s, n)) : t.push(o); }), this.$_events = t; }, $_refreshListeners() { this.isDisposed || (this.$_removeEventListeners(), this.$_addEventListeners()); }, $_handleGlobalClose(e, t = !1) { this.$_showFrameLocked || (this.hide({ event: e }), e.closePopover ? this.$emit("close-directive") : this.$emit("auto-hide"), t && (this.$_preventShow = !0, setTimeout(() => { this.$_preventShow = !1; }, 300))); }, $_detachPopperNode() { this.$_popperNode.parentNode && this.$_popperNode.parentNode.removeChild(this.$_popperNode); }, $_swapTargetAttrs(e, t) { for (const o of this.$_targetNodes) { const i = o.getAttribute(e); i && (o.removeAttribute(e), o.setAttribute(t, i)); } }, $_applyAttrsToTarget(e) { for (const t of this.$_targetNodes) for (const o in e) { const i = e[o]; i == null ? t.removeAttribute(o) : t.setAttribute(o, i); } }, $_updateParentShownChildren(e) { let t = this.parentPopper; for (; t; ) e ? t.shownChildren.add(this.randomId) : (t.shownChildren.delete(this.randomId), t.pendingHide && t.hide()), t = t.parentPopper; }, $_isAimingPopper() { const e = this.$_referenceNode.getBoundingClientRect(); if (B >= e.left && B <= e.right && E >= e.top && E <= e.bottom) { const t = this.$_popperNode.getBoundingClientRect(), o = B - P, i = E - C, s = t.left + t.width / 2 - P + (t.top + t.height / 2) - C + t.width + t.height, n = P + o * s, r = C + i * s; return G(P, C, n, r, t.left, t.top, t.left, t.bottom) || // Left edge G(P, C, n, r, t.left, t.top, t.right, t.top) || // Top edge G(P, C, n, r, t.right, t.top, t.right, t.bottom) || // Right edge G(P, C, n, r, t.left, t.bottom, t.right, t.bottom); } return !1; } }, render() { return this.$slots.default(this.slotData); } }); if (typeof document < "u" && typeof window < "u") { if (Ye) { const e = M ? { passive: !0, capture: !0 } : !0; document.addEventListener("touchstart", (t) => Ae(t, !0), e), document.addEventListener("touchend", (t) => Le(t, !0), e); } else window.addEventListener("mousedown", (e) => Ae(e, !1), !0), window.addEventListener("click", (e) => Le(e, !1), !0); window.addEventListener("resize", At); } function Ae(e, t) { if (_.autoHideOnMousedown) Qe(e, t); else for (let o = 0; o < $.length; o++) { const i = $[o]; try { i.mouseDownContains = i.popperNode().contains(e.target); } catch { } } } function Le(e, t) { _.autoHideOnMousedown || Qe(e, t); } function Qe(e, t) { const o = {}; for (let i = $.length - 1; i >= 0; i--) { const s = $[i]; try { const n = s.containsGlobalTarget = s.mouseDownContains || s.popperNode().contains(e.target); s.pendingHide = !1, requestAnimationFrame(() => { if (s.pendingHide = !1, !o[s.randomId] && Oe(s, n, e)) { if (s.$_handleGlobalClose(e, t), !e.closeAllPopover && e.closePopover && n) { let a = s.parentPopper; for (; a; ) o[a.randomId] = !0, a = a.parentPopper; return; } let r = s.parentPopper; for (; r && Oe(r, r.containsGlobalTarget, e); ) r.$_handleGlobalClose(e, t), r = r.parentPopper; } }); } catch { } } } function Oe(e, t, o) { return o.closeAllPopover || o.closePopover && t || Ht(e, o) && !t; } function Ht(e, t) { if (typeof e.autoHide == "function") { const o = e.autoHide(t); return e.lastAutoHide = o, o; } return e.autoHide; } function At() { for (let e = 0; e < $.length; e++) $[e].$_computePosition(); } let P = 0, C = 0, B = 0, E = 0; typeof window < "u" && window.addEventListener("mousemove", (e) => { P = B, C = E, B = e.clientX, E = e.clientY; }, M ? { passive: !0 } : void 0); function G(e, t, o, i, s, n, r, a) { const l = ((r - s) * (t - n) - (a - n) * (e - s)) / ((a - n) * (o - e) - (r - s) * (i - t)), p = ((o - e) * (t - n) - (i - t) * (e - s)) / ((a - n) * (o - e) - (r - s) * (i - t)); return l >= 0 && l <= 1 && p >= 0 && p <= 1; } const Lt = { extends: Ke() }, ie = (e, t) => { const o = e.__vccOpts || e; for (const [i, s] of t) o[i] = s; return o; }; function Ot(e, t, o, i, s, n) { return x(), D("div", { ref: "reference", class: me(["v-popper", { "v-popper--shown": e.slotData.isShown }]) }, [ Y(e.$slots, "default", gt(wt(e.slotData))) ], 2); } const Mt = /* @__PURE__ */ ie(Lt, [["render", Ot]]); function kt() { var e = window.navigator.userAgent, t = e.indexOf("MSIE "); if (t > 0) return parseInt(e.substring(t + 5, e.indexOf(".", t)), 10); var o = e.indexOf("Trident/"); if (o > 0) { var i = e.indexOf("rv:"); return parseInt(e.substring(i + 3, e.indexOf(".", i)), 10); } var s = e.indexOf("Edge/"); return s > 0 ? parseInt(e.substring(s + 5, e.indexOf(".", s)), 10) : -1; } let U; function ce() { ce.init || (ce.init = !0, U = kt() !== -1); } var se = { name: "ResizeObserver", props: { emitOnMount: { type: Boolean, default: !1 }, ignoreWidth: { type: Boolean, default: !1 }, ignoreHeight: { type: Boolean, default: !1 } }, emits: [ "notify" ], mounted() { ce(), ht(() => { this._w = this.$el.offsetWidth, this._h = this.$el.offsetHeight, this.emitOnMount && this.emitSize(); }); const e = document.createElement("object"); this._resizeObject = e, e.setAttribute("aria-hidden", "true"), e.setAttribute("tabindex", -1), e.onload = this.addResizeHandlers, e.type = "text/html", U && this.$el.appendChild(e), e.data = "about:blank", U || this.$el.appendChild(e); }, beforeUnmount() { this.removeResizeHandlers(); }, methods: { compareAndNotify() { (!this.ignoreWidth && this._w !== this.$el.offsetWidth || !this.ignoreHeight && this._h !== this.$el.offsetHeight) && (this._w = this.$el.offsetWidth, this._h = this.$el.offsetHeight, this.emitSize()); }, emitSize() { this.$emit("notify", { width: this._w, height: this._h }); }, addResizeHandlers() { this._resizeObject.contentDocument.defaultView.addEventListener("resize", this.compareAndNotify), this.compareAndNotify(); }, removeResizeHandlers() { this._resizeObject && this._resizeObject.onload && (!U && this._resizeObject.contentDocument && this._resizeObject.contentDocument.defaultView.removeEventListener("resize", this.compareAndNotify), this.$el.removeChild(this._resizeObject), this._resizeObject.onload = null, this._resizeObject = null); } } }; const Bt = /* @__PURE__ */ mt(); at("data-v-b329ee4c"); const Et = { class: "resize-observer", tabindex: "-1" }; lt(); const Rt = /* @__PURE__ */ Bt((e, t, o, i, s, n) => (x(), ee("div", Et))); se.render = Rt; se.__scopeId = "data-v-b329ee4c"; se.__file = "src/components/ResizeObserver.vue"; const Ze = (e = "theme") => ({ computed: { themeClass() { return Nt(this[e]); } } }), Dt = J({ name: "VPopperContent", components: { ResizeObserver: se }, mixins: [ Ze() ], props: { popperId: String, theme: String, shown: Boolean, mounted: Boolean, skipTransition: Boolean, autoHide: Boolean, handleResize: Boolean, classes: Object, result: Object }, emits: [ "hide", "resize" ], methods: { toPx(e) { return e != null && !isNaN(e) ? `${e}px` : null; } } }), Ft = ["id", "aria-hidden", "tabindex", "data-popper-placement"], It = { ref: "inner", class: "v-popper__inner" }, Wt = /* @__PURE__ */ L("div", { class: "v-popper__arrow-outer" }, null, -1), jt = /* @__PURE__ */ L("div", { class: "v-popper__arrow-inner" }, null, -1), Vt = [ Wt, jt ]; function qt(e, t, o, i, s, n) { const r = R("ResizeObserver"); return x(), D("div", { id: e.popperId, ref: "popover", class: me(["v-popper__popper", [ e.themeClass, e.classes.popperClass, { "v-popper__popper--shown": e.shown, "v-popper__popper--hidden": !e.shown, "v-popper__popper--show-from": e.classes.showFrom, "v-popper__popper--show-to": e.classes.showTo, "v-popper__popper--hide-from": e.classes.hideFrom, "v-popper__popper--hide-to": e.classes.hideTo, "v-popper__popper--skip-transition": e.skipTransition, "v-popper__popper--arrow-overflow": e.result && e.result.arrow.overflow, "v-popper__popper--no-positioning": !e.result } ]]), style: ne(e.result ? { position: e.result.strategy, transform: `translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)` } : void 0), "aria-hidden": e.shown ? "false" : "true", tabindex: e.autoHide ? 0 : void 0, "data-popper-placement": e.result ? e.result.placement : void 0, onKeyup: t[2] || (t[2] = dt((a) => e.autoHide && e.$emit("hide"), ["esc"])) }, [ L("div", { class: "v-popper__backdrop", onClick: t[0] || (t[0] = (a) => e.autoHide && e.$emit("hide")) }), L("div", { class: "v-popper__wrapper", style: ne(e.result ? { transformOrigin: e.result.transformOrigin } : void 0) }, [ L("div", It, [ e.mounted ? (x(), D(pt, { key: 0 }, [ L("div", null, [ Y(e.$slots, "default") ]), e.handleResize ? (x(), ee(r, { key: 0, onNotify: t[1] || (t[1] = (a) => e.$emit("resize", a)) })) : ye("", !0) ], 64)) : ye("", !0) ], 512), L("div", { ref: "arrow", class: "v-popper__arrow-container", style: ne(e.result ? { left: e.toPx(e.result.arrow.x), top: e.toPx(e.result.arrow.y) } : void 0) }, Vt, 4) ], 4) ], 46, Ft); } const Je = /* @__PURE__ */ ie(Dt, [["render", qt]]), et = { methods: { show(...e) { return this.$refs.popper.show(...e); }, hide(...e) { return this.$refs.popper.hide(...e); }, dispose(...e) { return this.$refs.popper.dispose(...e); }, onResize(...e) { return this.$refs.popper.onResize(...e); } } }; let fe = function() { }; typeof window < "u" && (fe = window.Element); const Gt = J({ name: "VPopperWrapper", components: { Popper: Mt, PopperContent: Je }, mixins: [ et, Ze("finalTheme") ], props: { theme: { type: String, default: null }, referenceNode: { type: Function, default: null }, shown: { type: Boolean, default: !1 }, showGroup: { type: String, default: null }, // eslint-disable-next-line vue/require-prop-types ariaId: { default: null }, disabled: { type: Boolean, default: void 0 }, positioningDisabled: { type: Boolean, default: void 0 }, placement: { type: String, default: void 0 }, delay: { type: [String, Number, Object], default: void 0 }, distance: { type: [Number, String], default: void 0 }, skidding: { type: [Number, String], default: void 0 }, triggers: { type: Array, default: void 0 }, showTriggers: { type: [Array, Function], default: void 0 }, hideTriggers: { type: [Array, Function], default: void 0 }, popperTriggers: { type: Array, default: void 0 }, popperShowTriggers: { type: [Array, Function], default: void 0 }, popperHideTriggers: { type: [Array, Function], default: void 0 }, container: { type: [String, Object, fe, Boolean], default: void 0 }, boundary: { type: [String, fe], default: void 0 }, strategy: { type: String, default: void 0 }, autoHide: { type: [Boolean, Function], default: void 0 }, handleResize: { type: Boolean, default: void 0 }, instantMove: { type: Boolean, default: void 0 }, eagerMount: { type: Boolean, default: void 0 }, popperClass: { type: [String, Array, Object], default: void 0 }, computeTransformOrigin: { type: Boolean, default: void 0 }, /** * @deprecated */ autoMinSize: { type: Boolean, default: void 0 }, autoSize: { type: [Boolean, String], default: void 0 }, /** * @deprecated */ autoMaxSize: { type: Boolean, default: void 0 }, autoBoundaryMaxSize: { type: Boolean, default: void 0 }, preventOverflow: { type: Boolean, default: void 0 }, overflowPadding: { type: [Number, String], default: void 0 }, arrowPadding: { type: [Number, String], default: void 0 }, arrowOverflow: { type: Boolean, default: void 0 }, flip: { type: Boolean, default: void 0 }, shift: { type: Boolean, default: void 0 }, shiftCrossAxis: { type: Boolean, default: void 0 }, noAutoFocus: { type: Boolean, default: void 0 }, disposeTimeout: { type: Number, default: void 0 } }, emits: { show: () => !0, hide: () => !0, "update:shown": (e) => !0, "apply-show": () => !0, "apply-hide": () => !0, "close-group": () => !0, "close-directive": () => !0, "auto-hide": () => !0, resize: () => !0 }, computed: { finalTheme() { return this.theme ?? this.$options.vPopperTheme; } }, methods: { getTargetNodes() { return Array.from(this.$el.children).filter((e) => e !== this.$refs.popperContent.$el); } } }); function Ut(e, t, o, i, s, n) { const r = R("PopperContent"), a = R("Popper"); return x(), ee(a, Re({ ref: "popper" }, e.$props, { theme: e.finalTheme, "target-nodes": e.getTargetNodes, "popper-node": () => e.$refs.popperContent.$el, class: [ e.themeClass ], onShow: t[0] || (t[0] = () => e.$emit("show")), onHide: t[1] || (t[1] = () => e.$emit("hide")), "onUpdate:shown": t[2] || (t[2] = (l) => e.$emit("update:shown", l)), onApplyShow: t[3] || (t[3] = () => e.$emit("apply-show")), onApplyHide: t[4] || (t[4] = () => e.$emit("apply-hide")), onCloseGroup: t[5] || (t[5] = () => e.$emit("close-group")), onCloseDirective: t[6] || (t[6] = () => e.$emit("close-directive")), onAutoHide: t[7] || (t[7] = () => e.$emit("auto-hide")), onResize: t[8] || (t[8] = () => e.$emit("resize")) }), { default: X(({ popperId: l, isShown: p, shouldMountContent: c, skipTransition: h, autoHide: u, show: g, hide: w, handleResize: m, onResize: y, classes: f, result: b }) => [ Y(e.$slots, "default", { shown: p, show: g, hide: w }), Ee(r, { ref: "popperContent", "popper-id": l, theme: e.finalTheme, shown: p, mounted: c, "skip-transition": h, "auto-hide": u, "handle-resize": m, classes: f, result: b, onHide: w, onResize: y }, { default: X(() => [ Y(e.$slots, "popper", { shown: p, hide: w }) ]), _: 2 }, 1032, ["popper-id", "theme", "shown", "mounted", "skip-transition", "auto-hide", "handle-resize", "classes", "result", "onHide", "onResize"]) ]), _: 3 }, 16, ["theme", "target-nodes", "popper-node", "class"]); } const we = /* @__PURE__ */ ie(Gt, [["render", Ut]]), Yt = { ...we, name: "VDropdown", vPopperTheme: "dropdown" }, Xt = { ...we, name: "VMenu", vPopperTheme: "menu" }, Kt = { ...we, name: "VTooltip", vPopperTheme: "tooltip" }, Qt = J({ name: "VTooltipDirective", components: { Popper: Ke(), PopperContent: Je }, mixins: [ et ], inheritAttrs: !1, props: { theme: { type: String, default: "tooltip" }, html: { type: Boolean, default: (e) => W(e.theme, "html") }, content: { type: [String, Number, Function], default: null }, loadingContent: { type: String, default: (e) => W(e.theme, "loadingContent") }, targetNodes: { type: Function, required: !0 } }, data() { return { asyncContent: null }; }, computed: { isContentAsync() { return typeof this.content == "function"; }, loading() { return this.isContentAsync && this.asyncContent == null; }, finalContent() { return this.isContentAsync ? this.loading ? this.loadingContent : this.asyncContent : this.content; } }, watch: { content: { handler() { this.fetchContent(!0); }, immediate: !0 }, async finalContent() { await this.$nextTick(), this.$refs.popper.onResize(); } }, created() { this.$_fetchId = 0; }, methods: { fetchContent(e) { if (typeof this.content == "function" && this.$_isShown && (e || !this.$_loading && this.asyncContent == null)) { this.asyncContent = null, this.$_loading = !0; const t = ++this.$_fetchId, o = this.content(this); o.then ? o.then((i) => this.onResult(t, i)) : this.onResult(t, o); } }, onResult(e, t) { e === this.$_fetchId && (this.$_loading = !1, this.asyncContent = t); }, onShow() { this.$_isShown = !0, this.fetchContent(); }, onHide() { this.$_isShown = !1; } } }), Zt = ["innerHTML"], Jt = ["textContent"]; function eo(e, t, o, i, s, n) { const r = R("PopperContent"), a = R("Popper"); return x(), ee(a, Re({ ref: "popper" }, e.$attrs, { theme: e.theme, "target-nodes": e.targetNodes, "popper-node": () => e.$refs.popperContent.$el, onApplyShow: e.onShow, onApplyHide: e.onHide }), { default: X(({ popperId: l, isShown: p, shouldMountContent: c, skipTransition: h, autoHide: u, hide: g, handleResize: w, onResize: m, classes: y, result: f }) => [ Ee(r, { ref: "popperContent", class: me({ "v-popper--tooltip-loading": e.loading }), "popper-id": l, theme: e.theme, shown: p, mounted: c, "skip-transition": h, "auto-hide": u, "handle-resize": w, classes: y, result: f, onHide: g, onResize: m }, { default: X(() => [ e.html ? (x(), D("div", { key: 0, innerHTML: e.finalContent }, null, 8, Zt)) : (x(), D("div", { key: 1, textContent: ft(e.finalContent) }, null, 8, Jt)) ]), _: 2 }, 1032, ["class", "popper-id", "theme", "shown", "mo