UNPKG

@asicupv/paella-extra-plugins

Version:
1,524 lines 52.7 kB
import { t as e } from "./paella-extra-plugins-rolldown-runtime.esm.js"; //#region ../../node_modules/shepherd.js/dist/js/shepherd.mjs var t = /* @__PURE__ */ e({ ShepherdBase: () => ht, default: () => $ }); function n(e) { return e instanceof HTMLElement; } function r(e) { return typeof e == "function"; } function i(e) { return typeof e == "string"; } function a(e) { return e === void 0; } var o = class { on(e, t, n, r = !1) { var i; return a(this.bindings) && (this.bindings = {}), a(this.bindings[e]) && (this.bindings[e] = []), (i = this.bindings[e]) == null || i.push({ handler: t, ctx: n, once: r }), this; } once(e, t, n) { return this.on(e, t, n, !0); } off(e, t) { if (a(this.bindings) || a(this.bindings[e])) return this; var n; return a(t) ? delete this.bindings[e] : (n = this.bindings[e]) == null || n.forEach((n, r) => { var i; n.handler === t && ((i = this.bindings[e]) == null || i.splice(r, 1)); }), this; } trigger(e, ...t) { var n; return !a(this.bindings) && this.bindings[e] && ((n = this.bindings[e]) == null || n.forEach((n, r) => { let { ctx: i, handler: a, once: o } = n, s = i || this; var c; (a.apply(s, t), o) && ((c = this.bindings[e]) == null || c.splice(r, 1)); })), this; } }; function s() { return s = Object.assign ? Object.assign.bind() : function(e) { for (var t = 1; t < arguments.length; t++) { var n = arguments[t]; for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]); } return e; }, s.apply(null, arguments); } function c(e, t) { if (e == null) return {}; var n = {}; for (var r in e) if ({}.hasOwnProperty.call(e, r)) { if (t.indexOf(r) !== -1) continue; n[r] = e[r]; } return n; } var l = { defaultMerge: Symbol("deepmerge-ts: default merge"), skip: Symbol("deepmerge-ts: skip") }; function u(e, t) { return t; } function d(e, t) { return e.filter((e) => e !== void 0); } var f; function p(e) { return typeof e != "object" || !e ? 0 : Array.isArray(e) ? 2 : function(e) { if (!g.includes(Object.prototype.toString.call(e))) return !1; let { constructor: t } = e; if (t === void 0) return !0; let n = t.prototype; return !(typeof n != "object" || !n || !g.includes(Object.prototype.toString.call(n)) || !n.hasOwnProperty("isPrototypeOf")); }(e) ? 1 : e instanceof Set ? 3 : e instanceof Map ? 4 : 5; } function m(e, t) { return typeof e == "object" && Object.prototype.propertyIsEnumerable.call(e, t); } function h(e) { let t = 0, n = e[0]?.[Symbol.iterator](); return { [Symbol.iterator]: () => ({ next() { for (;;) { if (n === void 0) return { done: !0, value: void 0 }; let r = n.next(); if (!0 !== r.done) return { done: !1, value: r.value }; t += 1, n = e[t]?.[Symbol.iterator](); } } }) }; } (function(e) { e[e.NOT = 0] = "NOT", e[e.RECORD = 1] = "RECORD", e[e.ARRAY = 2] = "ARRAY", e[e.SET = 3] = "SET", e[e.MAP = 4] = "MAP", e[e.OTHER = 5] = "OTHER"; })(f ||= {}); var g = ["[object Object]", "[object Module]"], _ = { mergeRecords: function(e, t, n) { let r = {}; for (let i of function(e) { let t = /* @__PURE__ */ new Set(); for (let n of e) for (let e of [...Object.keys(n), ...Object.getOwnPropertySymbols(n)]) t.add(e); return t; }(e)) { let a = []; for (let t of e) m(t, i) && a.push(t[i]); if (a.length === 0) continue; let o = y(a, t, t.metaDataUpdater(n, { key: i, parents: e })); o !== l.skip && (i === "__proto__" ? Object.defineProperty(r, i, { value: o, configurable: !0, enumerable: !0, writable: !0 }) : r[i] = o); } return r; }, mergeArrays: function(e) { return e.flat(); }, mergeSets: function(e) { return new Set(h(e)); }, mergeMaps: function(e) { return new Map(h(e)); }, mergeOthers: function(e) { return e.at(-1); } }; function v(...e) { return function(e, t) { let n = function(e, t) { var n; return { defaultMergeFunctions: _, mergeFunctions: s({}, _, Object.fromEntries(Object.entries(e).filter(([e, t]) => Object.hasOwn(_, e)).map(([e, t]) => !1 === t ? [e, _.mergeOthers] : [e, t]))), metaDataUpdater: e.metaDataUpdater ?? u, deepmerge: t, useImplicitDefaultMerging: (n = e.enableImplicitDefaultMerging) != null && n, filterValues: !1 === e.filterValues ? void 0 : e.filterValues ?? d, actions: l }; }(e, r); function r(...e) { return y(e, n, t); } return r; }({})(...e); } function y(e, t, n) { let r = (t.filterValues == null ? void 0 : t.filterValues(e, n)) ?? e; if (r.length === 0) return; if (r.length === 1) return b(r, t, n); let i = p(r[0]); if (i !== 0 && i !== 5) { for (let e = 1; e < r.length; e++) if (p(r[e]) !== i) return b(r, t, n); } switch (i) { case 1: return function(e, t, n) { let r = t.mergeFunctions.mergeRecords(e, t, n); return r === l.defaultMerge || t.useImplicitDefaultMerging && r === void 0 && t.mergeFunctions.mergeRecords !== t.defaultMergeFunctions.mergeRecords ? t.defaultMergeFunctions.mergeRecords(e, t, n) : r; }(r, t, n); case 2: return function(e, t, n) { let r = t.mergeFunctions.mergeArrays(e, t, n); return r === l.defaultMerge || t.useImplicitDefaultMerging && r === void 0 && t.mergeFunctions.mergeArrays !== t.defaultMergeFunctions.mergeArrays ? t.defaultMergeFunctions.mergeArrays(e) : r; }(r, t, n); case 3: return function(e, t, n) { let r = t.mergeFunctions.mergeSets(e, t, n); return r === l.defaultMerge || t.useImplicitDefaultMerging && r === void 0 && t.mergeFunctions.mergeSets !== t.defaultMergeFunctions.mergeSets ? t.defaultMergeFunctions.mergeSets(e) : r; }(r, t, n); case 4: return function(e, t, n) { let r = t.mergeFunctions.mergeMaps(e, t, n); return r === l.defaultMerge || t.useImplicitDefaultMerging && r === void 0 && t.mergeFunctions.mergeMaps !== t.defaultMergeFunctions.mergeMaps ? t.defaultMergeFunctions.mergeMaps(e) : r; }(r, t, n); default: return b(r, t, n); } } function b(e, t, n) { let r = t.mergeFunctions.mergeOthers(e, t, n); return r === l.defaultMerge || t.useImplicitDefaultMerging && r === void 0 && t.mergeFunctions.mergeOthers !== t.defaultMergeFunctions.mergeOthers ? t.defaultMergeFunctions.mergeOthers(e) : r; } function x(e) { let t = Object.getOwnPropertyNames(e.constructor.prototype); for (let n = 0; n < t.length; n++) { let r = t[n], i = e[r]; r !== "constructor" && typeof i == "function" && (e[r] = i.bind(e)); } return e; } function S(e) { let { event: t, selector: n } = e.options.advanceOn || {}; if (t) { let r = function(e, t) { return (n) => { if (e.isOpen()) { let r = e.el && n.currentTarget === e.el; (!a(t) && n.currentTarget.matches(t) || r) && e.tour.next(); } }; }(e, n), i = null; if (!a(n) && (i = document.querySelector(n), !i)) return; i ? (i.addEventListener(t, r), e.on("destroy", () => i.removeEventListener(t, r))) : (document.body.addEventListener(t, r, !0), e.on("destroy", () => document.body.removeEventListener(t, r, !0))); } } function C(e) { return i(e) && e !== "" ? e.charAt(e.length - 1) === "-" ? e : `${e}-` : ""; } function w(e) { return e == null || !e.element || !e.on; } function T() { let e = Date.now(); return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (t) => { let n = (e + 16 * Math.random()) % 16 | 0; return e = Math.floor(e / 16), (t == "x" ? n : 3 & n | 8).toString(16); }); } var E = ["start", "end"], D = [ "top", "right", "bottom", "left" ].reduce((e, t) => e.concat(t, t + "-" + E[0], t + "-" + E[1]), []), O = Math.min, k = Math.max, A = Math.round, j = Math.floor, M = (e) => ({ x: e, y: e }), ee = { left: "right", right: "left", bottom: "top", top: "bottom" }, N = { start: "end", end: "start" }; function te(e, t, n) { return k(e, O(t, n)); } function P(e, t) { return typeof e == "function" ? e(t) : e; } function F(e) { return e.split("-")[0]; } function I(e) { return e.split("-")[1]; } function ne(e) { return e === "x" ? "y" : "x"; } function re(e) { return e === "y" ? "height" : "width"; } var ie = new Set(["top", "bottom"]); function L(e) { return ie.has(F(e)) ? "y" : "x"; } function ae(e) { return ne(L(e)); } function oe(e, t, n) { n === void 0 && (n = !1); let r = I(e), i = ae(e), a = re(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top"; return t.reference[a] > t.floating[a] && (o = pe(o)), [o, pe(o)]; } function se(e) { return e.replace(/start|end/g, (e) => N[e]); } var ce = ["left", "right"], le = ["right", "left"], ue = ["top", "bottom"], de = ["bottom", "top"]; function fe(e, t, n, r) { let i = I(e), a = function(e, t, n) { switch (e) { case "top": case "bottom": return n ? t ? le : ce : t ? ce : le; case "left": case "right": return t ? ue : de; default: return []; } }(F(e), n === "start", r); return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(se)))), a; } function pe(e) { return e.replace(/left|right|bottom|top/g, (e) => ee[e]); } function me(e) { return typeof e == "number" ? { top: e, right: e, bottom: e, left: e } : function(e) { return s({ top: 0, right: 0, bottom: 0, left: 0 }, e); }(e); } function R(e) { let { x: t, y: n, width: r, height: i } = e; return { width: r, height: i, top: n, left: t, right: t + r, bottom: n + i, x: t, y: n }; } var he = [ "crossAxis", "alignment", "allowedPlacements", "autoAlignment" ], ge = [ "mainAxis", "crossAxis", "fallbackPlacements", "fallbackStrategy", "fallbackAxisSideDirection", "flipAlignment" ], _e = [ "mainAxis", "crossAxis", "limiter" ]; function ve(e, t, n) { let { reference: r, floating: i } = e, a = L(t), o = ae(t), s = re(o), c = F(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p; switch (c) { case "top": p = { x: u, y: r.y - i.height }; break; case "bottom": p = { x: u, y: r.y + r.height }; break; case "right": p = { x: r.x + r.width, y: d }; break; case "left": p = { x: r.x - i.width, y: d }; break; default: p = { x: r.x, y: r.y }; } switch (I(t)) { case "start": p[o] -= f * (n && l ? -1 : 1); break; case "end": p[o] += f * (n && l ? -1 : 1); } return p; } async function ye(e, t) { var n; t === void 0 && (t = {}); let { x: r, y: i, platform: a, rects: o, elements: s, strategy: c } = e, { boundary: l = "clippingAncestors", rootBoundary: u = "viewport", elementContext: d = "floating", altBoundary: f = !1, padding: p = 0 } = P(t, e), m = me(p), h = s[f ? d === "floating" ? "reference" : "floating" : d], g = R(await a.getClippingRect({ element: (n = await (a.isElement == null ? void 0 : a.isElement(h))) == null || n ? h : h.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(s.floating)), boundary: l, rootBoundary: u, strategy: c })), _ = d === "floating" ? { x: r, y: i, width: o.floating.width, height: o.floating.height } : o.reference, v = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(s.floating)), y = await (a.isElement == null ? void 0 : a.isElement(v)) && await (a.getScale == null ? void 0 : a.getScale(v)) || { x: 1, y: 1 }, b = R(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({ elements: s, rect: _, offsetParent: v, strategy: c }) : _); return { top: (g.top - b.top + m.top) / y.y, bottom: (b.bottom - g.bottom + m.bottom) / y.y, left: (g.left - b.left + m.left) / y.x, right: (b.right - g.right + m.right) / y.x }; } var be = new Set(["left", "top"]); function z() { return typeof window < "u"; } function B(e) { return xe(e) ? (e.nodeName || "").toLowerCase() : "#document"; } function V(e) { var t; return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window; } function H(e) { return ((xe(e) ? e.ownerDocument : e.document) || window.document)?.documentElement; } function xe(e) { return !!z() && (e instanceof Node || e instanceof V(e).Node); } function U(e) { return !!z() && (e instanceof Element || e instanceof V(e).Element); } function W(e) { return !!z() && (e instanceof HTMLElement || e instanceof V(e).HTMLElement); } function Se(e) { return !(!z() || typeof ShadowRoot > "u") && (e instanceof ShadowRoot || e instanceof V(e).ShadowRoot); } var Ce = new Set(["inline", "contents"]); function G(e) { let { overflow: t, overflowX: n, overflowY: r, display: i } = q(e); return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !Ce.has(i); } var we = new Set([ "table", "td", "th" ]); function Te(e) { return we.has(B(e)); } var Ee = [":popover-open", ":modal"]; function De(e) { return Ee.some((t) => { try { return e.matches(t); } catch { return !1; } }); } var Oe = [ "transform", "translate", "scale", "rotate", "perspective" ], ke = [ "transform", "translate", "scale", "rotate", "perspective", "filter" ], Ae = [ "paint", "layout", "strict", "content" ]; function je(e) { let t = Me(), n = U(e) ? q(e) : e; return Oe.some((e) => !!n[e] && n[e] !== "none") || !!n.containerType && n.containerType !== "normal" || !t && !!n.backdropFilter && n.backdropFilter !== "none" || !t && !!n.filter && n.filter !== "none" || ke.some((e) => (n.willChange || "").includes(e)) || Ae.some((e) => (n.contain || "").includes(e)); } function Me() { return !(typeof CSS > "u" || !CSS.supports) && CSS.supports("-webkit-backdrop-filter", "none"); } var Ne = new Set([ "html", "body", "#document" ]); function K(e) { return Ne.has(B(e)); } function q(e) { return V(e).getComputedStyle(e); } function Pe(e) { return U(e) ? { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop } : { scrollLeft: e.scrollX, scrollTop: e.scrollY }; } function J(e) { if (B(e) === "html") return e; let t = e.assignedSlot || e.parentNode || Se(e) && e.host || H(e); return Se(t) ? t.host : t; } function Fe(e) { let t = J(e); return K(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : W(t) && G(t) ? t : Fe(t); } function Y(e, t, n) { t === void 0 && (t = []), n === void 0 && (n = !0); let r = Fe(e), i = r === e.ownerDocument?.body, a = V(r); if (i) { let e = Ie(a); return t.concat(a, a.visualViewport || [], G(r) ? r : [], e && n ? Y(e) : []); } return t.concat(r, Y(r, [], n)); } function Ie(e) { return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null; } function Le(e) { let t = q(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = W(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = A(n) !== a || A(r) !== o; return s && (n = a, r = o), { width: n, height: r, $: s }; } function Re(e) { return U(e) ? e : e.contextElement; } function X(e) { let t = Re(e); if (!W(t)) return M(1); let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = Le(t), o = (a ? A(n.width) : n.width) / r, s = (a ? A(n.height) : n.height) / i; return o && Number.isFinite(o) || (o = 1), s && Number.isFinite(s) || (s = 1), { x: o, y: s }; } var ze = M(0); function Be(e) { let t = V(e); return Me() && t.visualViewport ? { x: t.visualViewport.offsetLeft, y: t.visualViewport.offsetTop } : ze; } function Z(e, t, n, r) { t === void 0 && (t = !1), n === void 0 && (n = !1); let i = e.getBoundingClientRect(), a = Re(e), o = M(1); t && (r ? U(r) && (o = X(r)) : o = X(e)); let s = function(e, t, n) { return t === void 0 && (t = !1), !(!n || t && n !== V(e)) && t; }(a, n, r) ? Be(a) : M(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y; if (a) { let e = V(a), t = r && U(r) ? V(r) : r, n = e, i = Ie(n); for (; i && r && t !== n;) { let e = X(i), t = i.getBoundingClientRect(), r = q(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y; c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = V(i), i = Ie(n); } } return R({ width: u, height: d, x: c, y: l }); } function Ve(e, t) { let n = Pe(e).scrollLeft; return t ? t.left + n : Z(H(e)).left + n; } function He(e, t) { let n = e.getBoundingClientRect(); return { x: n.left + t.scrollLeft - Ve(e, n), y: n.top + t.scrollTop }; } var Ue = new Set(["absolute", "fixed"]); function We(e, t, n) { let r; if (t === "viewport") r = function(e, t) { let n = V(e), r = H(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0; if (i) { a = i.width, o = i.height; let e = Me(); (!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop); } let l = Ve(r); if (l <= 0) { let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i); o <= 25 && (a -= o); } else l <= 25 && (a += l); return { width: a, height: o, x: s, y: c }; }(e, n); else if (t === "document") r = function(e) { let t = H(e), n = Pe(e), r = e.ownerDocument.body, i = k(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = k(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + Ve(e), s = -n.scrollTop; return q(r).direction === "rtl" && (o += k(t.clientWidth, r.clientWidth) - i), { width: i, height: a, x: o, y: s }; }(H(e)); else if (U(t)) r = function(e, t) { let n = Z(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = W(e) ? X(e) : M(1); return { width: e.clientWidth * a.x, height: e.clientHeight * a.y, x: i * a.x, y: r * a.y }; }(t, n); else { let n = Be(e); r = { x: t.x - n.x, y: t.y - n.y, width: t.width, height: t.height }; } return R(r); } function Ge(e, t) { let n = J(e); return !(n === t || !U(n) || K(n)) && (q(n).position === "fixed" || Ge(n, t)); } function Ke(e, t, n) { let r = W(t), i = H(t), a = n === "fixed", o = Z(e, !0, a, t), s = { scrollLeft: 0, scrollTop: 0 }, c = M(0); function l() { c.x = Ve(i); } if (r || !r && !a) if ((B(t) !== "body" || G(i)) && (s = Pe(t)), r) { let e = Z(t, !0, a, t); c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop; } else i && l(); a && !r && i && l(); let u = !i || r || a ? M(0) : He(i, s); return { x: o.left + s.scrollLeft - c.x - u.x, y: o.top + s.scrollTop - c.y - u.y, width: o.width, height: o.height }; } function qe(e) { return q(e).position === "static"; } function Je(e, t) { if (!W(e) || q(e).position === "fixed") return null; if (t) return t(e); let n = e.offsetParent; return H(e) === n && (n = n.ownerDocument.body), n; } function Ye(e, t) { let n = V(e); if (De(e)) return n; if (!W(e)) { let t = J(e); for (; t && !K(t);) { if (U(t) && !qe(t)) return t; t = J(t); } return n; } let r = Je(e, t); for (; r && Te(r) && qe(r);) r = Je(r, t); return r && K(r) && qe(r) && !je(r) ? n : r || function(e) { let t = J(e); for (; W(t) && !K(t);) { if (je(t)) return t; if (De(t)) return null; t = J(t); } return null; }(e) || n; } var Xe = { convertOffsetParentRelativeRectToViewportRelativeRect: function(e) { let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = H(r), s = !!t && De(t.floating); if (r === o || s && a) return n; let c = { scrollLeft: 0, scrollTop: 0 }, l = M(1), u = M(0), d = W(r); if ((d || !d && !a) && ((B(r) !== "body" || G(o)) && (c = Pe(r)), W(r))) { let e = Z(r); l = X(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop; } let f = !o || d || a ? M(0) : He(o, c); return { width: n.width * l.x, height: n.height * l.y, x: n.x * l.x - c.scrollLeft * l.x + u.x + f.x, y: n.y * l.y - c.scrollTop * l.y + u.y + f.y }; }, getDocumentElement: H, getClippingRect: function(e) { let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? De(t) ? [] : function(e, t) { let n = t.get(e); if (n) return n; let r = Y(e, [], !1).filter((e) => U(e) && B(e) !== "body"), i = null, a = q(e).position === "fixed", o = a ? J(e) : e; for (; U(o) && !K(o);) { let t = q(o), n = je(o); n || t.position !== "fixed" || (i = null), (a ? !n && !i : !n && t.position === "static" && i && Ue.has(i.position) || G(o) && !n && Ge(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = J(o); } return t.set(e, r), r; }(t, this._c) : [].concat(n), r], o = a[0], s = a.reduce((e, n) => { let r = We(t, n, i); return e.top = k(r.top, e.top), e.right = O(r.right, e.right), e.bottom = O(r.bottom, e.bottom), e.left = k(r.left, e.left), e; }, We(t, o, i)); return { width: s.right - s.left, height: s.bottom - s.top, x: s.left, y: s.top }; }, getOffsetParent: Ye, getElementRects: async function(e) { let t = this.getOffsetParent || Ye, n = this.getDimensions, r = await n(e.floating); return { reference: Ke(e.reference, await t(e.floating), e.strategy), floating: { x: 0, y: 0, width: r.width, height: r.height } }; }, getClientRects: function(e) { return Array.from(e.getClientRects()); }, getDimensions: function(e) { let { width: t, height: n } = Le(e); return { width: t, height: n }; }, getScale: X, isElement: U, isRTL: function(e) { return q(e).direction === "rtl"; } }; function Ze(e, t) { return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height; } function Qe(e, t, n, r) { r === void 0 && (r = {}); let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: c = typeof IntersectionObserver == "function", animationFrame: l = !1 } = r, u = Re(e), d = i || a ? [...u ? Y(u) : [], ...Y(t)] : []; d.forEach((e) => { i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n); }); let f = u && c ? function(e, t) { let n, r = null, i = H(e); function a() { var e; clearTimeout(n), (e = r) == null || e.disconnect(), r = null; } return function o(c, l) { c === void 0 && (c = !1), l === void 0 && (l = 1), a(); let u = e.getBoundingClientRect(), { left: d, top: f, width: p, height: m } = u; if (c || t(), !p || !m) return; let h = { rootMargin: -j(f) + "px " + -j(i.clientWidth - (d + p)) + "px " + -j(i.clientHeight - (f + m)) + "px " + -j(d) + "px", threshold: k(0, O(1, l)) || 1 }, g = !0; function _(t) { let r = t[0].intersectionRatio; if (r !== l) { if (!g) return o(); r ? o(!1, r) : n = setTimeout(() => { o(!1, 1e-7); }, 1e3); } r !== 1 || Ze(u, e.getBoundingClientRect()) || o(), g = !1; } try { r = new IntersectionObserver(_, s({}, h, { root: i.ownerDocument })); } catch { r = new IntersectionObserver(_, h); } r.observe(e); }(!0), a; }(u, n) : null, p, m = -1, h = null; o && (h = new ResizeObserver((e) => { let [r] = e; r && r.target === u && h && (h.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => { var e; (e = h) == null || e.observe(t); })), n(); }), u && !l && h.observe(u), h.observe(t)); let g = l ? Z(e) : null; return l && function t() { let r = Z(e); g && !Ze(g, r) && n(), g = r, p = requestAnimationFrame(t); }(), n(), () => { var e; d.forEach((e) => { i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n); }), f?.(), (e = h) == null || e.disconnect(), h = null, l && cancelAnimationFrame(p); }; } var $e = function(e) { return e === void 0 && (e = {}), { name: "autoPlacement", options: e, async fn(t) { let { rects: n, middlewareData: r, placement: i, platform: a, elements: o } = t, s = P(e, t), { crossAxis: l = !1, alignment: u, allowedPlacements: d = D, autoAlignment: f = !0 } = s, p = c(s, he), m = u !== void 0 || d === D ? function(e, t, n) { return (e ? [...n.filter((t) => I(t) === e), ...n.filter((t) => I(t) !== e)] : n.filter((e) => F(e) === e)).filter((n) => !e || I(n) === e || !!t && se(n) !== n); }(u || null, f, d) : d, h = await a.detectOverflow(t, p), g = r.autoPlacement?.index || 0, _ = m[g]; if (_ == null) return {}; let v = oe(_, n, await (a.isRTL == null ? void 0 : a.isRTL(o.floating))); if (i !== _) return { reset: { placement: m[0] } }; let y = [ h[F(_)], h[v[0]], h[v[1]] ], b = [...r.autoPlacement?.overflows || [], { placement: _, overflows: y }], x = m[g + 1]; if (x) return { data: { index: g + 1, overflows: b }, reset: { placement: x } }; let S = b.map((e) => { let t = I(e.placement); return [ e.placement, t && l ? e.overflows.slice(0, 2).reduce((e, t) => e + t, 0) : e.overflows[0], e.overflows ]; }).sort((e, t) => e[1] - t[1]), C = S.filter((e) => e[2].slice(0, I(e[0]) ? 2 : 3).every((e) => e <= 0))[0]?.[0] || S[0][0]; return C === i ? {} : { data: { index: g + 1, overflows: b }, reset: { placement: C } }; } }; }, et = function(e) { return e === void 0 && (e = {}), { name: "shift", options: e, async fn(t) { let { x: n, y: r, placement: i, platform: a } = t, o = P(e, t), { mainAxis: l = !0, crossAxis: u = !1, limiter: d = { fn: (e) => { let { x: t, y: n } = e; return { x: t, y: n }; } } } = o, f = c(o, _e), p = { x: n, y: r }, m = await a.detectOverflow(t, f), h = L(F(i)), g = ne(h), _ = p[g], v = p[h]; if (l) { let e = g === "y" ? "bottom" : "right"; _ = te(_ + m[g === "y" ? "top" : "left"], _, _ - m[e]); } if (u) { let e = h === "y" ? "bottom" : "right"; v = te(v + m[h === "y" ? "top" : "left"], v, v - m[e]); } let y = d.fn(s({}, t, { [g]: _, [h]: v })); return s({}, y, { data: { x: y.x - n, y: y.y - r, enabled: { [g]: l, [h]: u } } }); } }; }, tt = function(e) { return e === void 0 && (e = {}), { name: "flip", options: e, async fn(t) { var n; let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: l } = t, u = P(e, t), { mainAxis: d = !0, crossAxis: f = !0, fallbackPlacements: p, fallbackStrategy: m = "bestFit", fallbackAxisSideDirection: h = "none", flipAlignment: g = !0 } = u, _ = c(u, ge); if ((n = i.arrow) != null && n.alignmentOffset) return {}; let v = F(r), y = L(o), b = F(o) === o, x = await (s.isRTL == null ? void 0 : s.isRTL(l.floating)), S = p || (b || !g ? [pe(o)] : function(e) { let t = pe(e); return [ se(e), t, se(t) ]; }(o)), C = h !== "none"; !p && C && S.push(...fe(o, g, h, x)); let w = [o, ...S], T = await s.detectOverflow(t, _), E = [], D = i.flip?.overflows || []; if (d && E.push(T[v]), f) { let e = oe(r, a, x); E.push(T[e[0]], T[e[1]]); } if (D = [...D, { placement: r, overflows: E }], !E.every((e) => e <= 0)) { let e = (i.flip?.index || 0) + 1, t = w[e]; if (t && (!(f === "alignment" && y !== L(t)) || D.every((e) => L(e.placement) !== y || e.overflows[0] > 0))) return { data: { index: e, overflows: D }, reset: { placement: t } }; let n = D.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement; if (!n) switch (m) { case "bestFit": { let e = D.filter((e) => { if (C) { let t = L(e.placement); return t === y || t === "y"; } return !0; }).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0]?.[0]; e && (n = e); break; } case "initialPlacement": n = o; } if (r !== n) return { reset: { placement: n } }; } return {}; } }; }, nt = (e) => ({ name: "arrow", options: e, async fn(t) { let { x: n, y: r, placement: i, rects: a, platform: o, elements: c, middlewareData: l } = t, { element: u, padding: d = 0 } = P(e, t) || {}; if (u == null) return {}; let f = me(d), p = { x: n, y: r }, m = ae(i), h = re(m), g = await o.getDimensions(u), _ = m === "y", v = _ ? "top" : "left", y = _ ? "bottom" : "right", b = _ ? "clientHeight" : "clientWidth", x = a.reference[h] + a.reference[m] - p[m] - a.floating[h], S = p[m] - a.reference[m], C = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(u)), w = C ? C[b] : 0; w && await (o.isElement == null ? void 0 : o.isElement(C)) || (w = c.floating[b] || a.floating[h]); let T = x / 2 - S / 2, E = w / 2 - g[h] / 2 - 1, D = O(f[v], E), k = O(f[y], E), A = D, j = w - g[h] - k, M = w / 2 - g[h] / 2 + T, ee = te(A, M, j), N = !l.arrow && I(i) != null && M !== ee && a.reference[h] / 2 - (M < A ? D : k) - g[h] / 2 < 0, F = N ? M < A ? M - A : M - j : 0; return { [m]: p[m] + F, data: s({ [m]: ee, centerOffset: M - ee - F }, N && { alignmentOffset: F }), reset: N }; } }), rt = function(e) { return e === void 0 && (e = {}), { options: e, fn(t) { let { x: n, y: r, placement: i, rects: a, middlewareData: o } = t, { offset: c = 0, mainAxis: l = !0, crossAxis: u = !0 } = P(e, t), d = { x: n, y: r }, f = L(i), p = ne(f), m = d[p], h = d[f], g = P(c, t), _ = typeof g == "number" ? { mainAxis: g, crossAxis: 0 } : s({ mainAxis: 0, crossAxis: 0 }, g); if (l) { let e = p === "y" ? "height" : "width", t = a.reference[p] - a.floating[e] + _.mainAxis, n = a.reference[p] + a.reference[e] - _.mainAxis; m < t ? m = t : m > n && (m = n); } if (u) { let e = p === "y" ? "width" : "height", t = be.has(F(i)), n = a.reference[f] - a.floating[e] + (t && o.offset?.[f] || 0) + (t ? 0 : _.crossAxis), r = a.reference[f] + a.reference[e] + (t ? 0 : o.offset?.[f] || 0) - (t ? _.crossAxis : 0); h < n ? h = n : h > r && (h = r); } return { [p]: m, [f]: h }; } }; }, it = (e, t, n) => { let r = /* @__PURE__ */ new Map(), i = s({ platform: Xe }, n), a = s({}, i.platform, { _c: r }); return (async (e, t, n) => { let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, c = a.filter(Boolean), l = await (o.isRTL == null ? void 0 : o.isRTL(t)), u = await o.getElementRects({ reference: e, floating: t, strategy: i }), { x: d, y: f } = ve(u, r, l), p = r, m = {}, h = 0; for (let n = 0; n < c.length; n++) { let { name: a, fn: g } = c[n], { x: _, y: v, data: y, reset: b } = await g({ x: d, y: f, initialPlacement: r, placement: p, strategy: i, middlewareData: m, rects: u, platform: s({}, o, { detectOverflow: o.detectOverflow ?? ye }), elements: { reference: e, floating: t } }); d = _ ?? d, f = v ?? f, m = s({}, m, { [a]: s({}, m[a], y) }), b && h <= 50 && (h++, typeof b == "object" && (b.placement && (p = b.placement), b.rects && (u = !0 === b.rects ? await o.getElementRects({ reference: e, floating: t, strategy: i }) : b.rects), {x: d, y: f} = ve(u, p, l)), n = -1); } return { x: d, y: f, placement: p, strategy: i, middlewareData: m }; })(e, t, s({}, i, { platform: a })); }; function at(e) { e.cleanup && e.cleanup(); let t = e._getResolvedAttachToOptions(), r = t.element, i = function(e, t) { var n, r; let i = { strategy: "absolute", middleware: [] }, a = function(e) { return e.options.arrow && e.el ? e.el.querySelector(".shepherd-arrow") : !1; }(t), o = w(e), s = e.on?.includes("auto"), c = (e == null || (n = e.on) == null ? void 0 : n.includes("-start")) || (e == null || (r = e.on) == null ? void 0 : r.includes("-end")); if (!o) { var l; if (s ? i.middleware.push($e({ crossAxis: !0, alignment: c ? e == null || (l = e.on) == null ? void 0 : l.split("-").pop() : null })) : i.middleware.push(tt()), i.middleware.push(et({ limiter: rt(), crossAxis: !0 })), a) { let e = typeof t.options.arrow == "object" ? t.options.arrow : { padding: 4 }; i.middleware.push(nt({ element: a, padding: c ? e.padding : 0 })); } s || (i.placement = e.on); } return v(i, t.options.floatingUIOptions || {}); }(t, e), a = w(t); return a && (r = document.body, (e.shepherdElementComponent?.element)?.classList.add("shepherd-centered")), e.cleanup = Qe(r, e.el, () => { e.el ? function(e, t, r, i) { it(e, t.el, r).then(function(e, t) { return ({ x: r, y: i, placement: a, middlewareData: o }) => e.el ? (t ? Object.assign(e.el.style, { position: "fixed", left: "50%", top: "50%", transform: "translate(-50%, -50%)" }) : Object.assign(e.el.style, { position: "absolute", left: `${r}px`, top: `${i}px` }), e.el.dataset.popperPlacement = a, function(e, t) { let r = e.querySelector(".shepherd-arrow"); if (n(r) && t.arrow) { let { x: e, y: n } = t.arrow; Object.assign(r.style, { left: e == null ? "" : `${e}px`, top: n == null ? "" : `${n}px` }); } }(e.el, o), e) : e; }(t, i)).then((e) => new Promise((t) => { setTimeout(() => t(e), 300); })).then((e) => { e != null && e.el && (e.el.tabIndex = 0, e.el.focus({ preventScroll: !0 })); }); }(r, e, i, a) : e.cleanup == null || e.cleanup(); }), e.target = t.element, i; } function Q(e, t, ...n) { let r = document.createElement(e); return st(r, t), ct(r, n), r; } function ot(e, t, ...n) { let r = document.createElementNS("http://www.w3.org/2000/svg", e); return st(r, t), ct(r, n), r; } function st(e, t) { if (t) for (let [n, r] of Object.entries(t)) r != null && !1 !== r && (n.startsWith("on") && typeof r == "function" ? e.addEventListener(n.slice(2).toLowerCase(), r) : n === "disabled" && !0 === r ? e.disabled = !0 : e.setAttribute(n, String(r))); } function ct(e, t) { for (let n of t) n != null && !1 !== n && e.append(typeof n == "string" ? document.createTextNode(n) : n); } function lt(e, t) { return r(e) ? e.call(t) : e; } function ut(e, t) { let n = e.action ? e.action.bind(t.tour) : null, r = !!e.disabled && lt(e.disabled, t), i = e.label ? lt(e.label, t) : null, a = e.text ? lt(e.text, t) : null, o = Q("button", s({}, e.attrs || {}, { "aria-label": i || null, class: `${e.classes || ""} shepherd-button ${e.secondary ? "shepherd-button-secondary" : ""}`, disabled: r || null, onclick: n, tabindex: "0", type: "button" })); return a && (o.innerHTML = a), o; } function dt(e, t) { let n = Q("header", { class: "shepherd-header" }); return t.options.title && n.append(function(e, t) { let n = Q("h3", { id: e, class: "shepherd-title" }); return n.innerHTML = r(t) ? t() : t, n; }(e, t.options.title)), t.options.cancelIcon && t.options.cancelIcon.enabled && n.append(function(e, t) { return Q("button", s({}, e.attrs || {}, { "aria-label": e.label ? e.label : "Close Tour", class: "shepherd-cancel-icon", onclick: (e) => { e.preventDefault(), t.cancel(); }, type: "button" }), Q("span", { "aria-hidden": "true" }, "×")); }(t.options.cancelIcon, t)), n; } function ft(e, t, i) { let o = Q("div", { class: "shepherd-content" }); return (!a(i.options.title) || i.options.cancelIcon && i.options.cancelIcon.enabled) && o.append(dt(t, i)), a(i.options.text) || o.append(function(e, t) { let i = Q("div", { class: "shepherd-text", id: e }), a = t.options.text; return r(a) && (a = a.call(t)), n(a) ? i.appendChild(a) : i.innerHTML = a, i; }(e, i)), Array.isArray(i.options.buttons) && i.options.buttons.length && o.append(function(e) { let t = Q("footer", { class: "shepherd-footer" }); if (e.options.buttons) for (let n of e.options.buttons) t.append(ut(n, e)); return t; }(i)), o; } var pt = class extends o { constructor(e, t = {}) { return super(), this._resolvedAttachTo = void 0, this._resolvedExtraHighlightElements = void 0, this._originalTabIndexes = void 0, this.classPrefix = void 0, this.el = void 0, this.shepherdElementComponent = void 0, this.target = void 0, this.tour = void 0, this.tour = e, this.classPrefix = this.tour.options ? C(this.tour.options.classPrefix) : "", this.styles = e.styles, this._resolvedAttachTo = null, this._originalTabIndexes = /* @__PURE__ */ new Map(), x(this), this._setOptions(t), this; } cancel() { this.tour.cancel(), this.trigger("cancel"); } complete() { this.tour.complete(), this.trigger("complete"); } destroy() { this._teardownElements(), this.trigger("destroy"); } _teardownElements() { var e; (e = this).cleanup && e.cleanup(), e.cleanup = null, this.shepherdElementComponent &&= (this.shepherdElementComponent.cleanup(), void 0), n(this.el) && (this.el.remove(), this.el = null), this._updateStepTargetOnHide(), this._originalTabIndexes.clear(); } getTour() { return this.tour; } hide() { var e; (e = this.tour.modal) == null || e.hide(), this.trigger("before-hide"), this.el && (this.el.hidden = !0), this._updateStepTargetOnHide(), this.trigger("hide"); } _resolveExtraHiglightElements() { var e; return this._resolvedExtraHighlightElements = (e = this).options.extraHighlights ? e.options.extraHighlights.flatMap((e) => Array.from(document.querySelectorAll(e))) : [], this._resolvedExtraHighlightElements; } _resolveAttachToOptions() { return this._resolvedAttachTo = function(e) { let t = e.options.attachTo || {}, n = Object.assign({}, t); if (r(n.element) && (n.element = n.element.call(e)), i(n.element)) { try { n.element = document.querySelector(n.element); } catch {} n.element; } return n; }(this), this._resolvedAttachTo; } _getResolvedAttachToOptions() { return this._resolvedAttachTo === null ? this._resolveAttachToOptions() : this._resolvedAttachTo; } isOpen() { return !!(this.el && !this.el.hidden); } show() { return r(this.options.beforeShowPromise) ? Promise.resolve(this.options.beforeShowPromise()).then(() => this._show()) : Promise.resolve(this._show()); } updateStepOptions(e) { Object.assign(this.options, e), this.shepherdElementComponent && this.el && (this._teardownElements(), this._setupElements()); } getElement() { return this.el; } getTarget() { return this.target; } _storeOriginalTabIndex(e) { let t = e.getAttribute("tabindex"); t !== null && this._originalTabIndexes.set(e, t); } _restoreOriginalTabIndexes() { let e = this.target; e && (this._originalTabIndexes.has(e) ? e.setAttribute("tabindex", this._originalTabIndexes.get(e)) : e.removeAttribute("tabindex")); } _createTooltipContent() { let e = `${this.id}-description`, t = `${this.id}-label`; return this.shepherdElementComponent = function(e) { var t, n, r; let { classPrefix: o, descriptionId: s, labelId: c, step: l } = e, u, d, f, p, m, h, g, _ = (t = (n = l.options) == null || (n = n.cancelIcon) == null ? void 0 : n.enabled) != null && t, v = (r = l.options?.title) != null && r, y = (e) => { let { tour: t } = l; switch (e.keyCode) { case 9: if ((!d || d.length === 0) && h && h.length === 0) { e.preventDefault(); break; } var n, r, i; if (e.shiftKey) { if (document.activeElement === m || (n = document.activeElement) != null && n.classList.contains("shepherd-element")) e.preventDefault(), (r = p ?? g) == null || r.focus(); else if (document.activeElement === f) { var a; e.preventDefault(), (a = g) == null || a.focus(); } } else if (document.activeElement === g) e.preventDefault(), (i = f ?? m) == null || i.focus(); else if (document.activeElement === p) { var o; e.preventDefault(), (o = m) == null || o.focus(); } break; case 27: t.options.exitOnEsc && (e.preventDefault(), e.stopPropagation(), l.cancel()); break; case 37: t.options.keyboardNavigation && (e.preventDefault(), e.stopPropagation(), t.back()); break; case 39: t.options.keyboardNavigation && (e.preventDefault(), e.stopPropagation(), t.next()); } }, b = Q("dialog", { "aria-describedby": a(l.options.text) ? null : s, "aria-labelledby": l.options.title ? c : null, class: [ "shepherd-element", _ ? "shepherd-has-cancel-icon" : "", v ? "shepherd-has-title" : "" ].filter(Boolean).join(" "), [`data-${o}shepherd-step-id`]: l.id, onkeydown: y, open: "true" }); if (l.options.arrow && l.options.attachTo && l.options.attachTo.element && l.options.attachTo.on && b.append(Q("div", { class: "shepherd-arrow", "data-popper-arrow": "" })), b.append(ft(s, c, l)), i(l.options.classes)) { let e = l.options.classes.split(" ").filter((e) => !!e.length); e.length && b.classList.add(...e); } let x = "a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex=\"0\"]"; h = [...b.querySelectorAll(x)], m = h[0], g = h[h.length - 1]; let S = l._getResolvedAttachToOptions(); return S != null && S.element && (u = S.element, l._storeOriginalTabIndex(u), u.tabIndex = 0, d = [u, ...u.querySelectorAll(x)], f = d[0], p = d[d.length - 1], u.addEventListener("keydown", y)), { element: b, cleanup: () => { var e; (e = u) == null || e.removeEventListener("keydown", y); } }; }({ classPrefix: this.classPrefix, descriptionId: e, labelId: t, step: this }), (this.tour.options.stepsContainer || document.body).append(this.shepherdElementComponent.element), this.shepherdElementComponent.element; } _scrollTo(e) { let { element: t } = this._getResolvedAttachToOptions(); r(this.options.scrollToHandler) ? this.options.scrollToHandler(t) : t instanceof Element && typeof t.scrollIntoView == "function" && t.scrollIntoView(e); } _getClassOptions(e) { let t = this.tour && this.tour.options && this.tour.options.defaultStepOptions, n = e.classes ? e.classes : "", r = t && t.classes ? t.classes : "", i = [...n.split(" "), ...r.split(" ")], a = new Set(i); return Array.from(a).join(" ").trim(); } _setOptions(e = {}) { let t = this.tour && this.tour.options && this.tour.options.defaultStepOptions; t = v({}, t || {}), this.options = Object.assign({ arrow: !0 }, t, e, function(e, t) { return { floatingUIOptions: v(e.floatingUIOptions || {}, t.floatingUIOptions || {}) }; }(t, e)); let { when: n } = this.options; this.options.classes = this._getClassOptions(e), this.destroy(), this.id = this.options.id || `step-${T()}`, n && Object.keys(n).forEach((e) => { this.on(e, n[e], this); }); } _setupElements() { a(this.el) || this.destroy(), this.el = this._createTooltipContent(), this.options.advanceOn && S(this), at(this); } _show() { var e; this.trigger("before-show"), this._resolveAttachToOptions(), this._resolveExtraHiglightElements(), this._setupElements(), this.tour.modal || this.tour.setupModal(), (e = this.tour.modal) == null || e.setupForStep(this), this._styleTargetElementForStep(this), this.el && (this.el.hidden = !1), this.options.scrollTo && setTimeout(() => { this._scrollTo(this.options.scrollTo); }), this.el && (this.el.hidden = !1); let t = this.shepherdElementComponent.element, n = this.target || document.body, r = this._resolvedExtraHighlightElements; n.classList.add(`${this.classPrefix}shepherd-enabled`), n.classList.add(`${this.classPrefix}shepherd-target`), t.classList.add("shepherd-enabled"), r?.forEach((e) => { e.classList.add(`${this.classPrefix}shepherd-enabled`), e.classList.add(`${this.classPrefix}shepherd-target`); }), this.trigger("show"); } _styleTargetElementForStep(e) { let t = e.target, n = e._resolvedExtraHighlightElements; if (!t) return; let r = e.options.highlightClass; r && (t.classList.add(r), n?.forEach((e) => e.classList.add(r))), t.classList.remove("shepherd-target-click-disabled"), n?.forEach((e) => e.classList.remove("shepherd-target-click-disabled")), !1 === e.options.canClickTarget && (t.classList.add("shepherd-target-click-disabled"), n?.forEach((e) => e.classList.add("shepherd-target-click-disabled"))); } _updateStepTargetOnHide() { let e = this.target || document.body, t = this._resolvedExtraHighlightElements, n = this.options.highlightClass; n && (e.classList.remove(n), t?.forEach((e) => e.classList.remove(n))), e.classList.remove("shepherd-target-click-disabled", `${this.classPrefix}shepherd-enabled`, `${this.classPrefix}shepherd-target`), t?.forEach((e) => { e.classList.remove("shepherd-target-click-disabled", `${this.classPrefix}shepherd-enabled`, `${this.classPrefix}shepherd-target`); }), this._restoreOriginalTabIndexes(); } }; function mt(e) { let t, n = [{ width: 0, height: 0, x: 0, y: 0, r: 0 }], r = ot("path"), i = ot("svg", { class: "shepherd-modal-overlay-container" }, r); function a() { r.setAttribute("d", function(e) { let t = "", { innerWidth: n, innerHeight: r } = window; return e.forEach((e) => { let { width: n, height: r, x: i = 0, y: a = 0, r: o = 0 } = e, { topLeft: s = 0, topRight: c = 0, bottomRight: l = 0, bottomLeft: u = 0 } = typeof o == "number" ? { topLeft: o, topRight: o, bottomRight: o, bottomLeft: o } : o; t += `M${i + s},${a}a${s},${s},0,0,0-${s},${s}V` + (r + a - u) + `a${u},${u},0,0,0,${u},${u}H` + (n + i - l) + `a${l},${l},0,0,0,${l}-${l}V${a + c}a${c},${c},0,0,0-${c}-${c}Z`; }), `M${n},${r}H0V0H${n}V${r}Z${t}`.replace(/\s/g, ""); }(n)); } function o() { n = [{ width: 0, height: 0, x: 0, y: 0, r: 0 }], a(); } function s() { i.classList.remove("shepherd-modal-is-visible"), f(); } function c() { i.classList.add("shepherd-modal-is-visible"); } function l(e = 0, t = 0, r = 0, i = 0, s, c, l) { if (c) { { let a = [c, ...l || []], o = []; for (let n of a) { if (!n || a.indexOf(n) !== a.lastIndexOf(n)) continue; let { y: c, height: l } = m(n, s), { x: u, width: d, left: f } = n.getBoundingClientRect(); a.some((e) => { if (e === n) return !1; let t = e.getBoundingClientRect(), { y: r, height: i } = m(e, s); return u >= t.left && u + d <= t.left + t.width && c >= r && c + l <= r + i; }) || o.push({ width: d + 2 * e, height: l + 2 * e, x: (u || f) + r - e, y: c + i - e, r: t }); } n = o; } a(); } else o(); } function u(e) { e.stopPropagation(); } i.addEventListener("touchmove", u), a(), e.append(i); let d = (e) => { e.preventDefault(); }; function f() { t &&= (cancelAnimationFrame(t), void 0), window.removeEventListener("touchmove", d, { passive: !1 }); } function p(e) { if (!e) return null; let t = e instanceof HTMLElement && window.getComputedStyle(e).overflowY; return t !== "hidden" && t !== "visible" && e.scrollHeight >= e.clientHeight ? e : p(e.parentElement); } function m(e, t) { let n = e.getBoundingClientRect(), r = n.y || n.top, i = n.bottom || r + n.height; if (t) { let e = t.getBoundingClientRect(), n = e.y || e.top, a = e.bottom || n + e.height; r = Math.max(r, n), i = Math.min(i, a); } return { y: r, height: Math.max(i - r, 0) }; } return { closeModalOpening: o, destroy: function() { f(), i.removeEventListener("touchmove", u), i.remove(); }, hide: s, positionModal: l, setupForStep: function(e) { f(), e.tour.options.useModalOverlay ? (function(e) { let { modalOverlayOpeningPadding: n, modalOverlayOpeningRadius: r, modalOverlayOpeningXOffset: i = 0, modalOverlayOpeningYOffset: a = 0 } = e.options, o = function(e) { let t = { top: 0, left: 0 }; if (!e) return t; let n = e.ownerDocument.defaultView; try { for (; n && n !== window.top;) { let e = n?.frameElement; if (e) { let n = e.getBoundingClientRect(); t.top += n.top + e.scrollTop, t.left += n.left + e.scrollLeft; } n = n.parent; } } catch {} return t; }(e.target), s = p(e.target), c = () => { t = void 0, l(n, r, i + o.left, a + o.top, s, e.target, e._resolvedExtraHighlightElements), t = requestAnimationFrame(c); }; c(), window.addEventListener("touchmove", d, { passive: !1 }); }(e), c()) : s(); }, show: c, getElement: function() { return i; } }; } var ht = class extends o { constructor() { super(), this.activeTour = void 0, x(this); } }, $ = new ht(), gt = typeof window > "u"; $.Step = gt ? class { constructor(e) {} } : pt, $.Tour = gt ? class { constructor(e, t) {} } : class extends o { constructor(e = {}) { return super(), this.trackedEvents = [ "active", "cancel", "complete", "show" ], this.classPrefix = void 0, this.currentStep = void 0, this.focusedElBeforeOpen = void 0, this.id = void 0, this.modal = void 0, this.options = void 0, this.steps = void 0, x(this), this.options = Object.assign({}, { exitOnEsc: !0, keyboardNavigation: !0 }, e), this.classPrefix = C(this.options.classPrefix), this.steps = [], this.addSteps(this.options.steps), [ "active", "cancel", "complete", "inactive", "show", "start" ].map((e) => { ((e) => { this.on(e, (t) => { (t ||= {}).tour = this, $.trigger(e, t); }); })(e); }), this._setTourID(e.id), this; } addStep(e, t) { let n = e; return n instanceof pt ? n.tour = this : n = new pt(this, n), a(t) ? this.steps.push(n) : this.steps.splice(t, 0, n), n; } addSteps(e) { return Array.isArray(e) && e.forEach((e) => { this.addStep(e); }), this; } back() { let e = this.steps.indexOf(this.currentStep); this.show(e - 1, !1); } async cancel() { if (this.options.confirmCancel) { let e = this.options.confirmCancelMessage || "Are you sure you want to stop the tour?", t; t = r(this.options.confirmCancel) ? await this.options.confirmCancel() : window.con