UNPKG

vue2-color-picker-gradient

Version:

vue2,颜色选择器,线性(纯色)、渐变选择器,支持角度、多点渐变

1,260 lines 274 kB
import vt from "vue"; var yt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function ve(P) { return P && P.__esModule && Object.prototype.hasOwnProperty.call(P, "default") ? P.default : P; } var dt = {}, qt; function ge() { if (qt) return dt; qt = 1, Object.defineProperty(dt, "__esModule", { value: !0 }), dt.validateAlphaValue = dt.validateColorStops = dt.validateMinMaxValues = void 0; function P(r, t) { if (r === t) throw new Error("The minimum value cannot be equal to the maximum value."); if (r > t) throw new Error("The minimum value must be less than the maximum value."); } dt.validateMinMaxValues = P; function _(r) { if (r.length < 2) throw new Error("At least two colors must be provided."); } dt.validateColorStops = _; function i(r) { if (r < 0 || r > 1) throw new Error("The alpha value must be between 0 and 1."); } return dt.validateAlphaValue = i, dt; } var Tt, Ut; function xe() { if (Ut) return Tt; Ut = 1; const P = ge(); function _(t) { const n = t.toString(16); return n.length === 1 ? "0" + n : n; } function i(t) { const n = Math.floor(t.r * t.a), s = Math.floor(t.g * t.a), l = Math.floor(t.b * t.a); return `#${_(n)}${_(s)}${_(l)}`; } class r { constructor(n, s, l, e = 1) { P.validateAlphaValue(e), this.r = n, this.g = s, this.b = l, this.a = e; } toRGBString() { return `rgb(${Math.floor(this.r * this.a)},${Math.floor(this.g * this.a)},${Math.floor(this.b * this.a)})`; } toRGBAString() { return `rgba(${this.r},${this.g},${this.b},${this.a})`; } toHexString() { return i(this); } } return Tt = r, Tt; } var $t, Wt; function ye() { if (Wt) return $t; Wt = 1; const P = xe(), _ = ge(); function i(t, n) { const s = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t); if (s) return new P(parseInt(s[1], 16), parseInt(s[2], 16), parseInt(s[3], 16), n); throw new Error(`${t} is not a valid hex value.`); } class r { constructor(n, s, l, e = 1) { _.validateMinMaxValues(n, s), _.validateColorStops(l), _.validateAlphaValue(e), this.min = n, this.max = s, this.alpha = e, this.colorStops = l.map((c) => i(c, e)); } getColor(n) { const s = this.colorStops.length; if (n < this.min) return this.colorStops[0]; if (n > this.max) return this.colorStops[s - 1]; const l = this.max - this.min; let e = (n - this.min) / l; const c = Math.max(Math.ceil(e * (s - 1)), 1), o = this.colorStops[c - 1], u = this.colorStops[c]; e = e * (s - 1) - (c - 1); const v = Math.floor(e * u.r + (1 - e) * o.r), f = Math.floor(e * u.g + (1 - e) * o.g), C = Math.floor(e * u.b + (1 - e) * o.b); return new P(v, f, C, this.alpha); } } return $t = r, $t; } var Dt, Xt; function _e() { return Xt || (Xt = 1, Dt = ye()), Dt; } var we = _e(); const Ce = /* @__PURE__ */ ve(we); function pt(P) { let _; if (Array.isArray(P)) _ = [], P.forEach((i) => { _.push(pt(i)); }); else if (typeof P == "object" && P !== null) { _ = {}; for (const i in P) Object.hasOwnProperty.call(P, i) && (_[i] = pt(P[i])); } else _ = P; return _; } function Se(P, _ = 2) { const i = new RegExp(`^\\d+(?:\\.\\d{0,${_}})?`, "g"); return P.match(i) ? P.match(i) : ""; } function Gt(P, _) { for (; P; ) { if (P.matches(_)) return P; P = P.parentElement; } return null; } var It = { exports: {} }, Lt = { exports: {} }, Rt, Yt; function ke() { return Yt || (Yt = 1, Rt = function(P, _, i, r) { var t, n = 0; typeof _ != "boolean" && (r = i, i = _, _ = void 0); function s() { var l = this, e = Number(/* @__PURE__ */ new Date()) - n, c = arguments; function o() { n = Number(/* @__PURE__ */ new Date()), i.apply(l, c); } function u() { t = void 0; } r && !t && o(), t && clearTimeout(t), r === void 0 && e > P ? o() : _ !== !0 && (t = setTimeout(r ? u : o, r === void 0 ? P - e : P)); } return s; }), Rt; } var Vt, Jt; function Ee() { if (Jt) return Vt; Jt = 1; var P = ke(); return Vt = function(_, i, r) { return r === void 0 ? P(_, i, !1) : P(_, r, i !== !1); }, Vt; } var Y = {}, Kt; function At() { if (Kt) return Y; Kt = 1, Y.__esModule = !0, Y.isInContainer = Y.getScrollContainer = Y.isScroll = Y.getStyle = Y.once = Y.off = Y.on = void 0; var P = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(d) { return typeof d; } : function(d) { return d && typeof Symbol == "function" && d.constructor === Symbol && d !== Symbol.prototype ? "symbol" : typeof d; }; Y.hasClass = v, Y.addClass = f, Y.removeClass = C, Y.setStyle = k; var _ = vt, i = r(_); function r(d) { return d && d.__esModule ? d : { default: d }; } var t = i.default.prototype.$isServer, n = /([\:\-\_]+(.))/g, s = /^moz([A-Z])/, l = t ? 0 : Number(document.documentMode), e = function(a) { return (a || "").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, ""); }, c = function(a) { return a.replace(n, function(m, S, w, h) { return h ? w.toUpperCase() : w; }).replace(s, "Moz$1"); }, o = Y.on = function() { return !t && document.addEventListener ? function(d, a, m) { d && a && m && d.addEventListener(a, m, !1); } : function(d, a, m) { d && a && m && d.attachEvent("on" + a, m); }; }(), u = Y.off = function() { return !t && document.removeEventListener ? function(d, a, m) { d && a && d.removeEventListener(a, m, !1); } : function(d, a, m) { d && a && d.detachEvent("on" + a, m); }; }(); Y.once = function(a, m, S) { var w = function h() { S && S.apply(this, arguments), u(a, m, h); }; o(a, m, w); }; function v(d, a) { if (!d || !a) return !1; if (a.indexOf(" ") !== -1) throw new Error("className should not contain space."); return d.classList ? d.classList.contains(a) : (" " + d.className + " ").indexOf(" " + a + " ") > -1; } function f(d, a) { if (d) { for (var m = d.className, S = (a || "").split(" "), w = 0, h = S.length; w < h; w++) { var p = S[w]; p && (d.classList ? d.classList.add(p) : v(d, p) || (m += " " + p)); } d.classList || d.setAttribute("class", m); } } function C(d, a) { if (!(!d || !a)) { for (var m = a.split(" "), S = " " + d.className + " ", w = 0, h = m.length; w < h; w++) { var p = m[w]; p && (d.classList ? d.classList.remove(p) : v(d, p) && (S = S.replace(" " + p + " ", " "))); } d.classList || d.setAttribute("class", e(S)); } } var F = Y.getStyle = l < 9 ? function(d, a) { if (!t) { if (!d || !a) return null; a = c(a), a === "float" && (a = "styleFloat"); try { switch (a) { case "opacity": try { return d.filters.item("alpha").opacity / 100; } catch { return 1; } default: return d.style[a] || d.currentStyle ? d.currentStyle[a] : null; } } catch { return d.style[a]; } } } : function(d, a) { if (!t) { if (!d || !a) return null; a = c(a), a === "float" && (a = "cssFloat"); try { var m = document.defaultView.getComputedStyle(d, ""); return d.style[a] || m ? m[a] : null; } catch { return d.style[a]; } } }; function k(d, a, m) { if (!(!d || !a)) if ((typeof a > "u" ? "undefined" : P(a)) === "object") for (var S in a) a.hasOwnProperty(S) && k(d, S, a[S]); else a = c(a), a === "opacity" && l < 9 ? d.style.filter = isNaN(m) ? "" : "alpha(opacity=" + m * 100 + ")" : d.style[a] = m; } var y = Y.isScroll = function(a, m) { if (!t) { var S = m != null, w = S ? m ? F(a, "overflow-y") : F(a, "overflow-x") : F(a, "overflow"); return w.match(/(scroll|auto|overlay)/); } }; return Y.getScrollContainer = function(a, m) { if (!t) { for (var S = a; S; ) { if ([window, document, document.documentElement].includes(S)) return window; if (y(S, m)) return S; S = S.parentNode; } return S; } }, Y.isInContainer = function(a, m) { if (t || !a || !m) return !1; var S = a.getBoundingClientRect(), w = void 0; return [window, document, document.documentElement, null, void 0].includes(m) ? w = { top: 0, right: window.innerWidth, bottom: window.innerHeight, left: 0 } : w = m.getBoundingClientRect(), S.top < w.bottom && S.bottom > w.top && S.right > w.left && S.left < w.right; }, Y; } var N = {}, ut = {}, Zt; function Oe() { if (Zt) return ut; Zt = 1, ut.__esModule = !0, ut.isDefined = ut.isUndefined = ut.isFunction = void 0; var P = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; } : function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }; ut.isString = t, ut.isObject = n, ut.isHtmlElement = s; var _ = vt, i = r(_); function r(e) { return e && e.__esModule ? e : { default: e }; } function t(e) { return Object.prototype.toString.call(e) === "[object String]"; } function n(e) { return Object.prototype.toString.call(e) === "[object Object]"; } function s(e) { return e && e.nodeType === Node.ELEMENT_NODE; } var l = function(c) { var o = {}; return c && o.toString.call(c) === "[object Function]"; }; return typeof /./ != "function" && (typeof Int8Array > "u" ? "undefined" : P(Int8Array)) !== "object" && (i.default.prototype.$isServer || typeof document.childNodes != "function") && (ut.isFunction = l = function(c) { return typeof c == "function" || !1; }), ut.isFunction = l, ut.isUndefined = function(c) { return c === void 0; }, ut.isDefined = function(c) { return c != null; }, ut; } var Qt; function Ht() { if (Qt) return N; Qt = 1, N.__esModule = !0, N.isMac = N.isEmpty = N.isEqual = N.arrayEquals = N.looseEqual = N.capitalize = N.kebabCase = N.autoprefixer = N.isFirefox = N.isEdge = N.isIE = N.coerceTruthyValueToArray = N.arrayFind = N.arrayFindIndex = N.escapeRegexpString = N.valueEquals = N.generateId = N.getValueByPath = void 0; var P = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(y) { return typeof y; } : function(y) { return y && typeof Symbol == "function" && y.constructor === Symbol && y !== Symbol.prototype ? "symbol" : typeof y; }; N.noop = s, N.hasOwn = l, N.toObject = c, N.getPropByPath = o, N.rafThrottle = F, N.objToArray = k; var _ = vt, i = t(_), r = Oe(); function t(y) { return y && y.__esModule ? y : { default: y }; } var n = Object.prototype.hasOwnProperty; function s() { } function l(y, d) { return n.call(y, d); } function e(y, d) { for (var a in d) y[a] = d[a]; return y; } function c(y) { for (var d = {}, a = 0; a < y.length; a++) y[a] && e(d, y[a]); return d; } N.getValueByPath = function(d, a) { a = a || ""; for (var m = a.split("."), S = d, w = null, h = 0, p = m.length; h < p; h++) { var b = m[h]; if (!S) break; if (h === p - 1) { w = S[b]; break; } S = S[b]; } return w; }; function o(y, d, a) { var m = y; d = d.replace(/\[(\w+)\]/g, ".$1"), d = d.replace(/^\./, ""); for (var S = d.split("."), w = 0, h = S.length; w < h - 1 && !(!m && !a); ++w) { var p = S[w]; if (p in m) m = m[p]; else { if (a) throw new Error("please transfer a valid prop path to form item!"); break; } } return { o: m, k: S[w], v: m ? m[S[w]] : null }; } N.generateId = function() { return Math.floor(Math.random() * 1e4); }, N.valueEquals = function(d, a) { if (d === a) return !0; if (!(d instanceof Array) || !(a instanceof Array) || d.length !== a.length) return !1; for (var m = 0; m !== d.length; ++m) if (d[m] !== a[m]) return !1; return !0; }, N.escapeRegexpString = function() { var d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; return String(d).replace(/[|\\{}()[\]^$+*?.]/g, "\\$&"); }; var u = N.arrayFindIndex = function(d, a) { for (var m = 0; m !== d.length; ++m) if (a(d[m])) return m; return -1; }; N.arrayFind = function(d, a) { var m = u(d, a); return m !== -1 ? d[m] : void 0; }, N.coerceTruthyValueToArray = function(d) { return Array.isArray(d) ? d : d ? [d] : []; }, N.isIE = function() { return !i.default.prototype.$isServer && !isNaN(Number(document.documentMode)); }, N.isEdge = function() { return !i.default.prototype.$isServer && navigator.userAgent.indexOf("Edge") > -1; }, N.isFirefox = function() { return !i.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i); }, N.autoprefixer = function(d) { if ((typeof d > "u" ? "undefined" : P(d)) !== "object") return d; var a = ["transform", "transition", "animation"], m = ["ms-", "webkit-"]; return a.forEach(function(S) { var w = d[S]; S && w && m.forEach(function(h) { d[h + S] = w; }); }), d; }, N.kebabCase = function(d) { var a = /([^-])([A-Z])/g; return d.replace(a, "$1-$2").replace(a, "$1-$2").toLowerCase(); }, N.capitalize = function(d) { return (0, r.isString)(d) ? d.charAt(0).toUpperCase() + d.slice(1) : d; }; var v = N.looseEqual = function(d, a) { var m = (0, r.isObject)(d), S = (0, r.isObject)(a); return m && S ? JSON.stringify(d) === JSON.stringify(a) : !m && !S ? String(d) === String(a) : !1; }, f = N.arrayEquals = function(d, a) { if (d = d || [], a = a || [], d.length !== a.length) return !1; for (var m = 0; m < d.length; m++) if (!v(d[m], a[m])) return !1; return !0; }; N.isEqual = function(d, a) { return Array.isArray(d) && Array.isArray(a) ? f(d, a) : v(d, a); }; var C = N.isEmpty = function(d) { if (d == null) return !0; if (typeof d == "boolean") return !1; if (typeof d == "number") return !d; if (d instanceof Error) return d.message === ""; switch (Object.prototype.toString.call(d)) { // String or Array case "[object String]": case "[object Array]": return !d.length; // Map or Set or File case "[object File]": case "[object Map]": case "[object Set]": return !d.size; // Plain Object case "[object Object]": return !Object.keys(d).length; } return !1; }; function F(y) { var d = !1; return function() { for (var a = this, m = arguments.length, S = Array(m), w = 0; w < m; w++) S[w] = arguments[w]; d || (d = !0, window.requestAnimationFrame(function(h) { y.apply(a, S), d = !1; })); }; } function k(y) { return Array.isArray(y) ? y : C(y) ? [] : [y]; } return N.isMac = function() { return !i.default.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent); }, N; } var _t = {}, mt = {}, wt = {}, te; function me() { return te || (te = 1, wt.__esModule = !0, wt.default = function(P) { for (var _ = 1, i = arguments.length; _ < i; _++) { var r = arguments[_] || {}; for (var t in r) if (r.hasOwnProperty(t)) { var n = r[t]; n !== void 0 && (P[t] = n); } } return P; }), wt; } var Ct = {}, ee; function Me() { if (ee) return Ct; ee = 1, Ct.__esModule = !0; var P = vt, _ = r(P), i = At(); function r(u) { return u && u.__esModule ? u : { default: u }; } var t = !1, n = !1, s = void 0, l = function() { if (!_.default.prototype.$isServer) { var v = c.modalDom; return v ? t = !0 : (t = !1, v = document.createElement("div"), c.modalDom = v, v.addEventListener("touchmove", function(f) { f.preventDefault(), f.stopPropagation(); }), v.addEventListener("click", function() { c.doOnModalClick && c.doOnModalClick(); })), v; } }, e = {}, c = { modalFade: !0, getInstance: function(v) { return e[v]; }, register: function(v, f) { v && f && (e[v] = f); }, deregister: function(v) { v && (e[v] = null, delete e[v]); }, nextZIndex: function() { return c.zIndex++; }, modalStack: [], doOnModalClick: function() { var v = c.modalStack[c.modalStack.length - 1]; if (v) { var f = c.getInstance(v.id); f && f.closeOnClickModal && f.close(); } }, openModal: function(v, f, C, F, k) { if (!_.default.prototype.$isServer && !(!v || f === void 0)) { this.modalFade = k; for (var y = this.modalStack, d = 0, a = y.length; d < a; d++) { var m = y[d]; if (m.id === v) return; } var S = l(); if ((0, i.addClass)(S, "v-modal"), this.modalFade && !t && (0, i.addClass)(S, "v-modal-enter"), F) { var w = F.trim().split(/\s+/); w.forEach(function(h) { return (0, i.addClass)(S, h); }); } setTimeout(function() { (0, i.removeClass)(S, "v-modal-enter"); }, 200), C && C.parentNode && C.parentNode.nodeType !== 11 ? C.parentNode.appendChild(S) : document.body.appendChild(S), f && (S.style.zIndex = f), S.tabIndex = 0, S.style.display = "", this.modalStack.push({ id: v, zIndex: f, modalClass: F }); } }, closeModal: function(v) { var f = this.modalStack, C = l(); if (f.length > 0) { var F = f[f.length - 1]; if (F.id === v) { if (F.modalClass) { var k = F.modalClass.trim().split(/\s+/); k.forEach(function(d) { return (0, i.removeClass)(C, d); }); } f.pop(), f.length > 0 && (C.style.zIndex = f[f.length - 1].zIndex); } else for (var y = f.length - 1; y >= 0; y--) if (f[y].id === v) { f.splice(y, 1); break; } } f.length === 0 && (this.modalFade && (0, i.addClass)(C, "v-modal-leave"), setTimeout(function() { f.length === 0 && (C.parentNode && C.parentNode.removeChild(C), C.style.display = "none", c.modalDom = void 0), (0, i.removeClass)(C, "v-modal-leave"); }, 200)); } }; Object.defineProperty(c, "zIndex", { configurable: !0, get: function() { return n || (s = s || (_.default.prototype.$ELEMENT || {}).zIndex || 2e3, n = !0), s; }, set: function(v) { s = v; } }); var o = function() { if (!_.default.prototype.$isServer && c.modalStack.length > 0) { var v = c.modalStack[c.modalStack.length - 1]; if (!v) return; var f = c.getInstance(v.id); return f; } }; return _.default.prototype.$isServer || window.addEventListener("keydown", function(u) { if (u.keyCode === 27) { var v = o(); v && v.closeOnPressEscape && (v.handleClose ? v.handleClose() : v.handleAction ? v.handleAction("cancel") : v.close()); } }), Ct.default = c, Ct; } var St = {}, ne; function Pe() { if (ne) return St; ne = 1, St.__esModule = !0, St.default = function() { if (_.default.prototype.$isServer) return 0; if (r !== void 0) return r; var t = document.createElement("div"); t.className = "el-scrollbar__wrap", t.style.visibility = "hidden", t.style.width = "100px", t.style.position = "absolute", t.style.top = "-9999px", document.body.appendChild(t); var n = t.offsetWidth; t.style.overflow = "scroll"; var s = document.createElement("div"); s.style.width = "100%", t.appendChild(s); var l = s.offsetWidth; return t.parentNode.removeChild(t), r = n - l, r; }; var P = vt, _ = i(P); function i(t) { return t && t.__esModule ? t : { default: t }; } var r = void 0; return St; } var re; function Fe() { if (re) return mt; re = 1, mt.__esModule = !0, mt.PopupManager = void 0; var P = vt, _ = c(P), i = me(), r = c(i), t = Me(), n = c(t), s = Pe(), l = c(s), e = At(); function c(v) { return v && v.__esModule ? v : { default: v }; } var o = 1, u = void 0; return mt.default = { props: { visible: { type: Boolean, default: !1 }, openDelay: {}, closeDelay: {}, zIndex: {}, modal: { type: Boolean, default: !1 }, modalFade: { type: Boolean, default: !0 }, modalClass: {}, modalAppendToBody: { type: Boolean, default: !1 }, lockScroll: { type: Boolean, default: !0 }, closeOnPressEscape: { type: Boolean, default: !1 }, closeOnClickModal: { type: Boolean, default: !1 } }, beforeMount: function() { this._popupId = "popup-" + o++, n.default.register(this._popupId, this); }, beforeDestroy: function() { n.default.deregister(this._popupId), n.default.closeModal(this._popupId), this.restoreBodyStyle(); }, data: function() { return { opened: !1, bodyPaddingRight: null, computedBodyPaddingRight: 0, withoutHiddenClass: !0, rendered: !1 }; }, watch: { visible: function(f) { var C = this; if (f) { if (this._opening) return; this.rendered ? this.open() : (this.rendered = !0, _.default.nextTick(function() { C.open(); })); } else this.close(); } }, methods: { open: function(f) { var C = this; this.rendered || (this.rendered = !0); var F = (0, r.default)({}, this.$props || this, f); this._closeTimer && (clearTimeout(this._closeTimer), this._closeTimer = null), clearTimeout(this._openTimer); var k = Number(F.openDelay); k > 0 ? this._openTimer = setTimeout(function() { C._openTimer = null, C.doOpen(F); }, k) : this.doOpen(F); }, doOpen: function(f) { if (!this.$isServer && !(this.willOpen && !this.willOpen()) && !this.opened) { this._opening = !0; var C = this.$el, F = f.modal, k = f.zIndex; if (k && (n.default.zIndex = k), F && (this._closing && (n.default.closeModal(this._popupId), this._closing = !1), n.default.openModal(this._popupId, n.default.nextZIndex(), this.modalAppendToBody ? void 0 : C, f.modalClass, f.modalFade), f.lockScroll)) { this.withoutHiddenClass = !(0, e.hasClass)(document.body, "el-popup-parent--hidden"), this.withoutHiddenClass && (this.bodyPaddingRight = document.body.style.paddingRight, this.computedBodyPaddingRight = parseInt((0, e.getStyle)(document.body, "paddingRight"), 10)), u = (0, l.default)(); var y = document.documentElement.clientHeight < document.body.scrollHeight, d = (0, e.getStyle)(document.body, "overflowY"); u > 0 && (y || d === "scroll") && this.withoutHiddenClass && (document.body.style.paddingRight = this.computedBodyPaddingRight + u + "px"), (0, e.addClass)(document.body, "el-popup-parent--hidden"); } getComputedStyle(C).position === "static" && (C.style.position = "absolute"), C.style.zIndex = n.default.nextZIndex(), this.opened = !0, this.onOpen && this.onOpen(), this.doAfterOpen(); } }, doAfterOpen: function() { this._opening = !1; }, close: function() { var f = this; if (!(this.willClose && !this.willClose())) { this._openTimer !== null && (clearTimeout(this._openTimer), this._openTimer = null), clearTimeout(this._closeTimer); var C = Number(this.closeDelay); C > 0 ? this._closeTimer = setTimeout(function() { f._closeTimer = null, f.doClose(); }, C) : this.doClose(); } }, doClose: function() { this._closing = !0, this.onClose && this.onClose(), this.lockScroll && setTimeout(this.restoreBodyStyle, 200), this.opened = !1, this.doAfterClose(); }, doAfterClose: function() { n.default.closeModal(this._popupId), this._closing = !1; }, restoreBodyStyle: function() { this.modal && this.withoutHiddenClass && (document.body.style.paddingRight = this.bodyPaddingRight, (0, e.removeClass)(document.body, "el-popup-parent--hidden")), this.withoutHiddenClass = !0; } } }, mt.PopupManager = n.default, mt; } var jt = { exports: {} }, ie; function Ae() { return ie || (ie = 1, function(P) { var _ = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(i) { return typeof i; } : function(i) { return i && typeof Symbol == "function" && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : typeof i; }; (function(i, r) { _(P) === "object" && P.exports ? P.exports = r() : i.Popper = r(); })(void 0, function() { var i = window, r = { // placement of the popper placement: "bottom", gpuAcceleration: !0, // shift popper from its origin by the given amount of pixels (can be negative) offset: 0, // the element which will act as boundary of the popper boundariesElement: "viewport", // amount of pixel used to define a minimum distance between the boundaries and the popper boundariesPadding: 5, // popper will try to prevent overflow following this order, // by default, then, it could overflow on the left and on top of the boundariesElement preventOverflowOrder: ["left", "right", "top", "bottom"], // the behavior used by flip to change the placement of the popper flipBehavior: "flip", arrowElement: "[x-arrow]", arrowOffset: 0, // list of functions used to modify the offsets before they are applied to the popper modifiers: ["shift", "offset", "preventOverflow", "keepTogether", "arrow", "flip", "applyStyle"], modifiersIgnored: [], forceAbsolute: !1 }; function t(a, m, S) { this._reference = a.jquery ? a[0] : a, this.state = {}; var w = typeof m > "u" || m === null, h = m && Object.prototype.toString.call(m) === "[object Object]"; return w || h ? this._popper = this.parse(h ? m : {}) : this._popper = m.jquery ? m[0] : m, this._options = Object.assign({}, r, S), this._options.modifiers = this._options.modifiers.map((function(p) { if (this._options.modifiersIgnored.indexOf(p) === -1) return p === "applyStyle" && this._popper.setAttribute("x-placement", this._options.placement), this.modifiers[p] || p; }).bind(this)), this.state.position = this._getPosition(this._popper, this._reference), f(this._popper, { position: this.state.position, top: 0 }), this.update(), this._setupEventListeners(), this; } t.prototype.destroy = function() { return this._popper.removeAttribute("x-placement"), this._popper.style.left = "", this._popper.style.position = "", this._popper.style.top = "", this._popper.style[d("transform")] = "", this._removeEventListeners(), this._options.removeOnDestroy && this._popper.remove(), this; }, t.prototype.update = function() { var a = { instance: this, styles: {} }; a.placement = this._options.placement, a._originalPlacement = this._options.placement, a.offsets = this._getOffsets(this._popper, this._reference, a.placement), a.boundaries = this._getBoundaries(a, this._options.boundariesPadding, this._options.boundariesElement), a = this.runModifiers(a, this._options.modifiers), typeof this.state.updateCallback == "function" && this.state.updateCallback(a); }, t.prototype.onCreate = function(a) { return a(this), this; }, t.prototype.onUpdate = function(a) { return this.state.updateCallback = a, this; }, t.prototype.parse = function(a) { var m = { tagName: "div", classNames: ["popper"], attributes: [], parent: i.document.body, content: "", contentType: "text", arrowTagName: "div", arrowClassNames: ["popper__arrow"], arrowAttributes: ["x-arrow"] }; a = Object.assign({}, m, a); var S = i.document, w = S.createElement(a.tagName); if (b(w, a.classNames), O(w, a.attributes), a.contentType === "node" ? w.appendChild(a.content.jquery ? a.content[0] : a.content) : a.contentType === "html" ? w.innerHTML = a.content : w.textContent = a.content, a.arrowTagName) { var h = S.createElement(a.arrowTagName); b(h, a.arrowClassNames), O(h, a.arrowAttributes), w.appendChild(h); } var p = a.parent.jquery ? a.parent[0] : a.parent; if (typeof p == "string") { if (p = S.querySelectorAll(a.parent), p.length > 1 && console.warn("WARNING: the given `parent` query(" + a.parent + ") matched more than one element, the first one will be used"), p.length === 0) throw "ERROR: the given `parent` doesn't exists!"; p = p[0]; } return p.length > 1 && !(p instanceof Element) && (console.warn("WARNING: you have passed as parent a list of elements, the first one will be used"), p = p[0]), p.appendChild(w), w; function b(M, $) { $.forEach(function(R) { M.classList.add(R); }); } function O(M, $) { $.forEach(function(R) { M.setAttribute(R.split(":")[0], R.split(":")[1] || ""); }); } }, t.prototype._getPosition = function(a, m) { if (o(m), this._options.forceAbsolute) return "absolute"; var S = v(m); return S ? "fixed" : "absolute"; }, t.prototype._getOffsets = function(a, m, S) { S = S.split("-")[0]; var w = {}; w.position = this.state.position; var h = w.position === "fixed", p = y(m, o(a), h), b = n(a); return ["right", "left"].indexOf(S) !== -1 ? (w.top = p.top + p.height / 2 - b.height / 2, S === "left" ? w.left = p.left - b.width : w.left = p.right) : (w.left = p.left + p.width / 2 - b.width / 2, S === "top" ? w.top = p.top - b.height : w.top = p.bottom), w.width = b.width, w.height = b.height, { popper: w, reference: p }; }, t.prototype._setupEventListeners = function() { if (this.state.updateBound = this.update.bind(this), i.addEventListener("resize", this.state.updateBound), this._options.boundariesElement !== "window") { var a = u(this._reference); (a === i.document.body || a === i.document.documentElement) && (a = i), a.addEventListener("scroll", this.state.updateBound), this.state.scrollTarget = a; } }, t.prototype._removeEventListeners = function() { i.removeEventListener("resize", this.state.updateBound), this._options.boundariesElement !== "window" && this.state.scrollTarget && (this.state.scrollTarget.removeEventListener("scroll", this.state.updateBound), this.state.scrollTarget = null), this.state.updateBound = null; }, t.prototype._getBoundaries = function(a, m, S) { var w = {}, h, p; if (S === "window") { var b = i.document.body, O = i.document.documentElement; p = Math.max(b.scrollHeight, b.offsetHeight, O.clientHeight, O.scrollHeight, O.offsetHeight), h = Math.max(b.scrollWidth, b.offsetWidth, O.clientWidth, O.scrollWidth, O.offsetWidth), w = { top: 0, right: h, bottom: p, left: 0 }; } else if (S === "viewport") { var M = o(this._popper), $ = u(this._popper), R = F(M), q = function(W) { return W == document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : W.scrollTop; }, I = function(W) { return W == document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : W.scrollLeft; }, z = a.offsets.popper.position === "fixed" ? 0 : q($), H = a.offsets.popper.position === "fixed" ? 0 : I($); w = { top: 0 - (R.top - z), right: i.document.documentElement.clientWidth - (R.left - H), bottom: i.document.documentElement.clientHeight - (R.top - z), left: 0 - (R.left - H) }; } else o(this._popper) === S ? w = { top: 0, left: 0, right: S.clientWidth, bottom: S.clientHeight } : w = F(S); return w.left += m, w.right -= m, w.top = w.top + m, w.bottom = w.bottom - m, w; }, t.prototype.runModifiers = function(a, m, S) { var w = m.slice(); return S !== void 0 && (w = this._options.modifiers.slice(0, e(this._options.modifiers, S))), w.forEach((function(h) { C(h) && (a = h.call(this, a)); }).bind(this)), a; }, t.prototype.isModifierRequired = function(a, m) { var S = e(this._options.modifiers, a); return !!this._options.modifiers.slice(0, S).filter(function(w) { return w === m; }).length; }, t.prototype.modifiers = {}, t.prototype.modifiers.applyStyle = function(a) { var m = { position: a.offsets.popper.position }, S = Math.round(a.offsets.popper.left), w = Math.round(a.offsets.popper.top), h; return this._options.gpuAcceleration && (h = d("transform")) ? (m[h] = "translate3d(" + S + "px, " + w + "px, 0)", m.top = 0, m.left = 0) : (m.left = S, m.top = w), Object.assign(m, a.styles), f(this._popper, m), this._popper.setAttribute("x-placement", a.placement), this.isModifierRequired(this.modifiers.applyStyle, this.modifiers.arrow) && a.offsets.arrow && f(a.arrowElement, a.offsets.arrow), a; }, t.prototype.modifiers.shift = function(a) { var m = a.placement, S = m.split("-")[0], w = m.split("-")[1]; if (w) { var h = a.offsets.reference, p = l(a.offsets.popper), b = { y: { start: { top: h.top }, end: { top: h.top + h.height - p.height } }, x: { start: { left: h.left }, end: { left: h.left + h.width - p.width } } }, O = ["bottom", "top"].indexOf(S) !== -1 ? "x" : "y"; a.offsets.popper = Object.assign(p, b[O][w]); } return a; }, t.prototype.modifiers.preventOverflow = function(a) { var m = this._options.preventOverflowOrder, S = l(a.offsets.popper), w = { left: function() { var p = S.left; return S.left < a.boundaries.left && (p = Math.max(S.left, a.boundaries.left)), { left: p }; }, right: function() { var p = S.left; return S.right > a.boundaries.right && (p = Math.min(S.left, a.boundaries.right - S.width)), { left: p }; }, top: function() { var p = S.top; return S.top < a.boundaries.top && (p = Math.max(S.top, a.boundaries.top)), { top: p }; }, bottom: function() { var p = S.top; return S.bottom > a.boundaries.bottom && (p = Math.min(S.top, a.boundaries.bottom - S.height)), { top: p }; } }; return m.forEach(function(h) { a.offsets.popper = Object.assign(S, w[h]()); }), a; }, t.prototype.modifiers.keepTogether = function(a) { var m = l(a.offsets.popper), S = a.offsets.reference, w = Math.floor; return m.right < w(S.left) && (a.offsets.popper.left = w(S.left) - m.width), m.left > w(S.right) && (a.offsets.popper.left = w(S.right)), m.bottom < w(S.top) && (a.offsets.popper.top = w(S.top) - m.height), m.top > w(S.bottom) && (a.offsets.popper.top = w(S.bottom)), a; }, t.prototype.modifiers.flip = function(a) { if (!this.isModifierRequired(this.modifiers.flip, this.modifiers.preventOverflow)) return console.warn("WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!"), a; if (a.flipped && a.placement === a._originalPlacement) return a; var m = a.placement.split("-")[0], S = s(m), w = a.placement.split("-")[1] || "", h = []; return this._options.flipBehavior === "flip" ? h = [m, S] : h = this._options.flipBehavior, h.forEach((function(p, b) { if (!(m !== p || h.length === b + 1)) { m = a.placement.split("-")[0], S = s(m); var O = l(a.offsets.popper), M = ["right", "bottom"].indexOf(m) !== -1; (M && Math.floor(a.offsets.reference[m]) > Math.floor(O[S]) || !M && Math.floor(a.offsets.reference[m]) < Math.floor(O[S])) && (a.flipped = !0, a.placement = h[b + 1], w && (a.placement += "-" + w), a.offsets.popper = this._getOffsets(this._popper, this._reference, a.placement).popper, a = this.runModifiers(a, this._options.modifiers, this._flip)); } }).bind(this)), a; }, t.prototype.modifiers.offset = function(a) { var m = this._options.offset, S = a.offsets.popper; return a.placement.indexOf("left") !== -1 ? S.top -= m : a.placement.indexOf("right") !== -1 ? S.top += m : a.placement.indexOf("top") !== -1 ? S.left -= m : a.placement.indexOf("bottom") !== -1 && (S.left += m), a; }, t.prototype.modifiers.arrow = function(a) { var m = this._options.arrowElement, S = this._options.arrowOffset; if (typeof m == "string" && (m = this._popper.querySelector(m)), !m) return a; if (!this._popper.contains(m)) return console.warn("WARNING: `arrowElement` must be child of its popper element!"), a; if (!this.isModifierRequired(this.modifiers.arrow, this.modifiers.keepTogether)) return console.warn("WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!"), a; var w = {}, h = a.placement.split("-")[0], p = l(a.offsets.popper), b = a.offsets.reference, O = ["left", "right"].indexOf(h) !== -1, M = O ? "height" : "width", $ = O ? "top" : "left", R = O ? "left" : "top", q = O ? "bottom" : "right", I = n(m)[M]; b[q] - I < p[$] && (a.offsets.popper[$] -= p[$] - (b[q] - I)), b[$] + I > p[q] && (a.offsets.popper[$] += b[$] + I - p[q]); var z = b[$] + (S || b[M] / 2 - I / 2), H = z - p[$]; return H = Math.max(Math.min(p[M] - I - 8, H), 8), w[$] = H, w[R] = "", a.offsets.arrow = w, a.arrowElement = m, a; }; function n(a) { var m = a.style.display, S = a.style.visibility; a.style.display = "block", a.style.visibility = "hidden", a.offsetWidth; var w = i.getComputedStyle(a), h = parseFloat(w.marginTop) + parseFloat(w.marginBottom), p = parseFloat(w.marginLeft) + parseFloat(w.marginRight), b = { width: a.offsetWidth + p, height: a.offsetHeight + h }; return a.style.display = m, a.style.visibility = S, b; } function s(a) { var m = { left: "right", right: "left", bottom: "top", top: "bottom" }; return a.replace(/left|right|bottom|top/g, function(S) { return m[S]; }); } function l(a) { var m = Object.assign({}, a); return m.right = m.left + m.width, m.bottom = m.top + m.height, m; } function e(a, m) { var S = 0, w; for (w in a) { if (a[w] === m) return S; S++; } return null; } function c(a, m) { var S = i.getComputedStyle(a, null); return S[m]; } function o(a) { var m = a.offsetParent; return m === i.document.body || !m ? i.document.documentElement : m; } function u(a) { var m = a.parentNode; return m ? m === i.document ? i.document.body.scrollTop || i.document.body.scrollLeft ? i.document.body : i.document.documentElement : ["scroll", "auto"].indexOf(c(m, "overflow")) !== -1 || ["scroll", "auto"].indexOf(c(m, "overflow-x")) !== -1 || ["scroll", "auto"].indexOf(c(m, "overflow-y")) !== -1 ? m : u(a.parentNode) : a; } function v(a) { return a === i.document.body ? !1 : c(a, "position") === "fixed" ? !0 : a.parentNode ? v(a.parentNode) : a; } function f(a, m) { function S(w) { return w !== "" && !isNaN(parseFloat(w)) && isFinite(w); } Object.keys(m).forEach(function(w) { var h = ""; ["width", "height", "top", "right", "bottom", "left"].indexOf(w) !== -1 && S(m[w]) && (h = "px"), a.style[w] = m[w] + h; }); } function C(a) { var m = {}; return a && m.toString.call(a) === "[object Function]"; } function F(a) { var m = { width: a.offsetWidth, height: a.offsetHeight, left: a.offsetLeft, top: a.offsetTop }; return m.right = m.left + m.width, m.bottom = m.top + m.height, m; } function k(a) { var m = a.getBoundingClientRect(), S = navigator.userAgent.indexOf("MSIE") != -1, w = S && a.tagName === "HTML" ? -a.scrollTop : m.top; return { left: m.left, top: w, right: m.right, bottom: m.bottom, width: m.right - m.left, height: m.bottom - w }; } function y(a, m, S) { var w = k(a), h = k(m); if (S) { var p = u(m); h.top += p.scrollTop, h.bottom += p.scrollTop, h.left += p.scrollLeft, h.right += p.scrollLeft; } var b = { top: w.top - h.top, left: w.left - h.left, bottom: w.top - h.top + w.height, right: w.left - h.left + w.width, width: w.width, height: w.height }; return b; } function d(a) { for (var m = ["", "ms", "webkit", "moz", "o"], S = 0; S < m.length; S++) { var w = m[S] ? m[S] + a.charAt(0).toUpperCase() + a.slice(1) : a; if (typeof i.document.body.style[w] < "u") return w; } return null; } return Object.assign || Object.defineProperty(Object, "assign", { enumerable: !1, configurable: !0, writable: !0, value: function(m) { if (m == null) throw new TypeError("Cannot convert first argument to object"); for (var S = Object(m), w = 1; w < arguments.length; w++) { var h = arguments[w]; if (h != null) { h = Object(h); for (var p = Object.keys(h), b = 0, O = p.length; b < O; b++) { var M = p[b], $ = Object.getOwnPropertyDescriptor(h, M); $ !== void 0 && $.enumerable && (S[M] = h[M]); } } } return S; } }), t; }); }(jt)), jt.exports; } var oe; function Te() { if (oe) return _t; oe = 1, _t.__esModule = !0; var P = vt, _ = r(P), i = Fe(); function r(s) { return s && s.__esModule ? s : { default: s }; } var t = _.default.prototype.$isServer ? function() { } : Ae(), n = function(l) { return l.stopPropagation(); }; return _t.default = { props: { transformOrigin: { type: [Boolean, String], default: !0 }, placement: { type: String, default: "bottom" }, boundariesPadding: { type: Number, default: 5 }, reference: {}, popper: {}, offset: { default: 0 }, value: Boolean, visibleArrow: Boolean, arrowOffset: { type: Number, default: 35 }, appendToBody: { type: Boolean, default: !0 }, popperOptions: { type: Object, default: function() { return { gpuAcceleration: !1 }; } } }, data: function() { return { showPopper: !1, currentPlacement: "" }; }, watch: { value: { immediate: !0, handler: function(l) { this.showPopper = l, this.$emit("input", l); } }, showPopper: function(l) { this.disabled || (l ? this.updatePopper() : this.destroyPopper(), this.$emit("input", l)); } }, methods: { createPopper: function() { var l = this; if (!this.$isServer && (this.currentPlacement = this.currentPlacement || this.placement, !!/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement))) { var e = this.popperOptions, c = this.popperElm = this.popperElm || this.popper || this.$refs.popper, o = this.referenceElm = this.referenceElm || this.reference || this.$refs.reference; !o && this.$slots.reference && this.$slots.reference[0] && (o = this.referenceElm = this.$slots.reference[0].elm), !(!c || !o) && (this.visibleArrow && this.appendArrow(c), this.appendToBody && document.body.appendChild(this.popperElm), this.popperJS && this.popperJS.destroy && this.popperJS.destroy(), e.placement = this.currentPlacement, e.offset = this.offset, e.arrowOffset = this.arrowOffset, this.popperJS = new t(o, c, e), this.popperJS.onCreate(function(u) { l.$emit("created", l), l.resetTransformOrigin(), l.$nextTick(l.updatePopper); }), typeof e.onUpdate == "function" && this.popperJS.onUpdate(e.onUpdate), this.popperJS._popper.style.zIndex = i.PopupManager.nextZIndex(), this.popperElm.addEventListener("click", n)); } }, updatePopper: function() { var l = this.popperJS; l ? (l.update(), l._popper && (l._popper.style.zIndex = i.PopupManager.nextZIndex())) : this.createPopper(); }, doDestroy: function(l) { !this.popperJS || this.showPopper && !l || (this.popperJS.destroy(), this.popperJS = null); }, destroyPopper: function() { this.popperJS && this.resetTransformOrigin(); }, resetTransformOrigin: function() { if (this.transformOrigin) { var l = { top: "bottom", bottom: "top", left: "right", right: "left" }, e = this.popperJS._popper.getAttribute("x-placement").split("-")[0], c = l[e]; this.popperJS._popper.style.transformOrigin = typeof this.transformOrigin == "string" ? this.transformOrigin : ["top", "bottom"].indexOf(e) > -1 ? "center " + c : c + " center"; } }, appendArrow: function(l) { var e = void 0; if (!this.appended) { this.appended = !0; for (var c in l.attributes) if (/^_v-/.test(l.attributes[c].name)) { e = l.attributes[c].name; break; } var o = document.createElement("div"); e && o.setAttribute(e, ""), o.setAttribute("x-arrow", ""), o.className = "popper__arrow", l.appendChild(o); } } }, beforeDestroy: function() { this.doDestroy(!0), this.popperElm && this.popperElm.parentNode === document.body && (this.popperElm.removeEventListener("click", n), document.body.removeChild(this.popperElm)); }, // call destroy in keep-alive mode deactivated: function() { this.$options.beforeDestroy[0].call(this); } }, _t; } var se; function $e() { return se || (se = 1, function(P) { P.exports = /******/ function(_) { var i = {}; function r(t) { if (i[t]) return i[t].exports; var n = i[t] = { /******/ i: t, /******/ l: !1, /******/ exports: {} /******/ }; return _[t].call(n.exports, n, n.exports, r), n.l = !0, n.exports; } return r.m = _, r.c = i, r.d = function(t, n, s) { r.o(t, n) || Object.defineProperty(t, n, { enumerable: !0, get: s }); }, r.r = function(t) { typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t, "__esModule", { value: !0 }); }, r.t = function(t, n) { if (n & 1 && (t = r(t)), n & 8 || n & 4 && typeof t == "object" && t && t.__esModule) return t; var s = /* @__PURE__ */ Object.create(null); if (r.r(s), Object.defineProperty(s, "default", { enumerable: !0, value: t }), n & 2 && typeof t != "string") for (var l in t) r.d(s, l, (function(e) { return t[e]; }).bind(null, l)); return s; }, r.n = function(t) { var n = t && t.__esModule ? ( /******/ function() { return t.default; } ) : ( /******/ function() { return t; } ); return r.d(n, "a", n), n; }, r.o = function(t, n) { return Object.prototype.hasOwnProperty.call(t, n); }, r.p = "/dist/", r(r.s = 138); }({ /***/ 138: ( /***/ function(_, i, r) { r.r(i); var t = r(5), n = /* @__PURE__ */ r.n(t), s = r(19), l = /* @__PURE__ */ r.n(s), e = r(2), c = r(3), o = r(7), u = /* @__PURE__ */ r.n(o), v = { name: "ElTooltip", mixins: [n.a], props: { openDelay: { type: Number, default: 0 }, disabled: Boolean, manual: Boolean, effect: { type: String, default: "dark" }, arrowOffse