UNPKG

vue-data-ui-hq

Version:

A user-empowering data visualization Vue 3 components library for eloquent data storytelling

851 lines (850 loc) 42.9 kB
import { useSlots as O, onMounted as G, ref as R, computed as _, watch as T, openBlock as i, createElementBlock as n, normalizeStyle as s, unref as t, createElementVNode as l, toDisplayString as c, createCommentVNode as d, normalizeClass as z, withKeys as M, createTextVNode as S, createStaticVNode as $ } from "vue"; import { u as P, o as q, e as J, i as x, f as b, X as v, w as m } from "./index-WrV3SAID.js"; import { u as Q } from "./useNestedProp-Cj0kHD7k.js"; import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.js"; const Z = { key: 0, class: "vue-ui-rating-title", style: { width: "100%" } }, tt = ["xmlns", "stroke"], ot = { id: "vueUiSmiley0" }, et = ["stop-color"], lt = ["stop-color"], st = ["fill"], it = ["stroke"], nt = ["xmlns", "viewBox", "stroke"], at = { id: "vueUiSmiley0" }, rt = ["stop-color"], dt = ["stop-color"], pt = ["fill"], ut = ["viewBox", "stroke"], ft = ["xmlns", "stroke"], yt = { id: "vueUiSmiley1" }, vt = ["stop-color"], ht = ["stop-color"], ct = ["fill"], gt = ["xmlns", "stroke"], kt = ["xmlns", "viewBox", "stroke"], mt = { id: "vueUiSmiley1" }, xt = ["stop-color"], bt = ["stop-color"], $t = ["fill"], wt = ["viewBox", "stroke"], zt = ["xmlns", "stroke"], Mt = { id: "vueUiSmiley2" }, St = ["stop-color"], _t = ["stop-color"], Rt = ["fill"], Ct = ["xmlns", "stroke"], Bt = ["xmlns", "viewBox", "stroke"], jt = { id: "vueUiSmiley2" }, Ht = ["stop-color"], Ut = ["stop-color"], Gt = ["fill"], Vt = ["xmlns", "viewBox", "stroke"], Xt = ["xmlns", "stroke"], At = { id: "vueUiSmiley3" }, Yt = ["stop-color"], Nt = ["stop-color"], Ft = ["fill"], It = ["xmlns", "stroke"], Kt = ["xmlns", "viewBox", "stroke"], Lt = { id: "vueUiSmiley3" }, Dt = ["stop-color"], Et = ["stop-color"], Ot = ["fill"], Tt = ["xmlns", "viewBox", "stroke"], Pt = ["xmlns", "stroke"], qt = { id: "vueUiSmiley4" }, Jt = ["stop-color"], Qt = ["stop-color"], Wt = ["fill"], Zt = ["xmlns", "stroke"], to = ["xmlns", "viewBox", "stroke"], oo = { id: "vueUiSmiley4" }, eo = ["stop-color"], lo = ["stop-color"], so = ["fill"], io = ["xmlns", "viewBox", "stroke"], no = { __name: "vue-ui-smiley", props: { config: { type: Object, default() { return {}; } }, dataset: { type: Object, default() { return {}; } } }, emits: ["rate"], setup(V, { expose: X, emit: A }) { const { vue_ui_smiley: Y } = P(), p = V, N = O(); G(() => { N["chart-background"] && console.warn("VueUiSmiley does not support the #chart-background slot."); }), G(() => { C(); }); function C() { q(p.dataset) && J({ componentName: "VueUiSmiley", type: "dataset" }); } const B = R(!1), u = R(void 0), F = A, o = _({ get: () => j(), set: (r) => r }); function j() { return Q({ userConfig: p.config, defaultConfig: Y }); } T(() => p.config, (r) => { o.value = j(), C(); }, { deep: !0 }); const I = _(() => typeof p.dataset.rating == "object" && !Array.isArray(p.dataset.rating) ? K(p.dataset.rating) : p.dataset.rating || null), w = _(() => typeof p.dataset.rating == "object" && !Array.isArray(p.dataset.rating)), f = R(I.value), y = _(() => o.value.readonly); function K(r) { if (r === null) return null; let e = 0, a = 0; for (const H in r) { const E = parseInt(H), U = r[H]; e += E * U, a += U; } return a === 0 ? 0 : e / a; } function g(r) { const e = f.value - r, a = 24; switch (!0) { case e < 0: return 0; case e > 1: return 1 * a; default: return e * a; } } function k(r) { y.value || (f.value = r, F("rate", r)); } function L() { return f.value; } function D(r = !0) { y.value = r; } X({ getData: L, toggleReadonly: D }); function h(r) { return o.value.readonly ? o.value.style.colors.inactive[r] : f.value === r + 1 ? o.value.style.icons.useGradient && o.value.style.icons.filled ? `url(#vueUiSmiley${r})` : o.value.style.colors.active[r] : u.value !== void 0 && u.value === r ? o.value.style.icons.useGradient && o.value.style.icons.filled ? `url(#vueUiSmiley${r})` : o.value.style.colors.active[r] : o.value.style.colors.inactive[r]; } return (r, e) => (i(), n("div", { style: s(`background:${t(o).style.backgroundColor};font-family:${t(o).style.fontFamily};width:100%;`), onMouseover: e[20] || (e[20] = (a) => B.value = !0), onMouseleave: e[21] || (e[21] = (a) => { B.value = !1, u.value = void 0; }) }, [ t(o).style.title.text ? (i(), n("div", Z, [ l("div", { style: s(`color:${t(o).style.title.color};font-weight:${t(o).style.title.bold ? "bold" : "normal"};text-align:${t(o).style.title.textAlign};margin-bottom:${t(o).style.title.offsetY}px;font-size:${t(o).style.title.fontSize}px`) }, c(t(o).style.title.text), 5), t(o).style.title.subtitle.text ? (i(), n("div", { key: 0, style: s(`color:${t(o).style.title.subtitle.color};font-size:${t(o).style.title.subtitle.fontSize}px;text-align:${t(o).style.title.textAlign};margin-bottom:${t(o).style.title.subtitle.offsetY}px;font-weight:${t(o).style.title.subtitle.bold ? "bold" : "normal"}`) }, c(t(o).style.title.subtitle.text), 5)) : d("", !0) ])) : d("", !0), t(o).style.rating.show && t(o).style.rating.position === "top" ? (i(), n("div", { key: 1, style: s(`width:100%;text-align:center;margin-bottom:${t(o).style.rating.offsetY}px;font-size:${t(o).style.rating.fontSize}px;font-weight:${t(o).style.rating.bold ? "bold" : "normal"};margin-left:${t(o).style.rating.offsetX}px`) }, c(t(x)( t(o).style.rating.formatter, t(f), t(b)({ v: t(f), r: t(o).style.rating.roundingValue }), t(o) )), 5)) : d("", !0), l("div", { class: "vue-ui-smiley-wrapper", style: s(`overflow:visible;height:${t(o).style.itemSize}px;width:fit-content;margin:0 auto;display:flex;align-items:center;justify-content:center;`) }, [ t(o).style.rating.show && t(o).style.rating.position === "left" ? (i(), n("div", { key: 0, style: s(`width:fit-content;text-align:center;margin-bottom:${t(o).style.rating.offsetY}px;font-size:${t(o).style.rating.fontSize}px;font-weight:${t(o).style.rating.bold ? "bold" : "normal"};padding-right:${t(o).style.rating.offsetX}px`) }, c(t(x)( t(o).style.rating.formatter, t(f), t(b)({ v: t(f), r: t(o).style.rating.roundingValue }), t(o) )), 5)) : d("", !0), l("div", { tabindex: "0", class: z({ "vue-ui-smiley-rated": !t(o).readonly && t(f) === 1 }), style: s(`cursor:${t(o).readonly ? "default" : "pointer"};height:${t(o).style.itemSize}px;aspect-ratio:1/1; position:relative`), onMouseenter: e[0] || (e[0] = (a) => u.value = 0), onMouseleave: e[1] || (e[1] = (a) => u.value = void 0), onClick: e[2] || (e[2] = (a) => k(1)), onKeyup: e[3] || (e[3] = M((a) => k(1), ["enter"])) }, [ t(o).style.tooltip.show && t(w) && t(y) ? (i(), n("div", { key: 0, class: "vue-ui-rating-tooltip", style: s(`border:1px solid ${t(o).style.tooltip.borderColor};position:absolute;top:${-48 + t(o).style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t(o).style.tooltip.backgroundColor};display:${t(u) === 0 ? "block" : "none"};padding:2px 12px;border-radius:${t(o).style.tooltip.borderRadius}px;box-shadow:${t(o).style.tooltip.boxShadow}`) }, [ l("div", { style: s(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t(o).style.tooltip.color}`) }, [ l("span", { style: s(`font-size:${t(o).style.tooltip.fontSize}px`) }, "1:", 4), e[22] || (e[22] = S()), l("span", { style: s(`font-weight:${t(o).style.tooltip.bold ? "bold" : "normal"};font-size:${t(o).style.tooltip.fontSize}px`) }, c(t(x)( t(o).style.tooltip.formatter, p.dataset.rating[1], t(b)({ v: p.dataset.rating[1], r: t(o).style.tooltip.roundingValue }), t(o) )), 5), l("div", { style: s(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t(o).style.tooltip.borderColor}`) }, " ▼ ", 4) ], 4) ], 4)) : d("", !0), t(o).style.icons.filled ? (i(), n("svg", { key: 1, xmlns: t(v), style: { transition: "all 0.1s ease-in-out", position: "absolute", top: "0", left: "0" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(0), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ l("defs", null, [ l("radialGradient", ot, [ l("stop", { offset: "0%", "stop-color": t(m)(t(o).style.colors.active[0], 0.05) }, null, 8, et), l("stop", { offset: "100%", "stop-color": t(o).style.colors.active[0] }, null, 8, lt) ]) ]), e[23] || (e[23] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-5 9.86a4.5 4.5 0 0 0 -3.214 1.35a1 1 0 1 0 1.428 1.4a2.5 2.5 0 0 1 3.572 0a1 1 0 0 0 1.428 -1.4a4.5 4.5 0 0 0 -3.214 -1.35zm-2.99 -4.2l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z", "stroke-width": "0", fill: h(0) }, null, 8, st) ], 8, tt)) : (i(), n("svg", { key: 2, style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(0), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[24] || (e[24] = [ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-79483fb9></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-79483fb9></path><path d="M9 10l.01 0" data-v-79483fb9></path><path d="M15 10l.01 0" data-v-79483fb9></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-79483fb9></path>', 5) ]), 8, it)), t(o).style.icons.filled && t(y) ? (i(), n("svg", { key: 3, xmlns: t(v), style: { transition: "all 0.1s ease-in-out", position: "absolute", top: "0", left: "0" }, height: "100%", viewBox: `0 0 ${g(0)} 24`, "stroke-width": "1.5", stroke: t(o).style.colors.activeReadonly[0], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ l("defs", null, [ l("radialGradient", at, [ l("stop", { offset: "0%", "stop-color": t(m)(t(o).style.colors.activeReadonly[0], 0.05) }, null, 8, rt), l("stop", { offset: "100%", "stop-color": t(o).style.colors.activeReadonly[0] }, null, 8, dt) ]) ]), e[25] || (e[25] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-5 9.86a4.5 4.5 0 0 0 -3.214 1.35a1 1 0 1 0 1.428 1.4a2.5 2.5 0 0 1 3.572 0a1 1 0 0 0 1.428 -1.4a4.5 4.5 0 0 0 -3.214 -1.35zm-2.99 -4.2l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z", "stroke-width": "0", fill: t(o).style.icons.useGradient ? "url(#vueUiSmiley0)" : t(o).style.colors.activeReadonly[0] }, null, 8, pt) ], 8, nt)) : d("", !0), !t(o).style.icons.filled && t(y) ? (i(), n("svg", { key: 4, style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: `0 0 ${g(0)} 24`, "stroke-width": "1.5", stroke: t(o).style.colors.activeReadonly[0], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[26] || (e[26] = [ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-79483fb9></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-79483fb9></path><path d="M9 10l.01 0" data-v-79483fb9></path><path d="M15 10l.01 0" data-v-79483fb9></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-79483fb9></path>', 5) ]), 8, ut)) : d("", !0) ], 38), l("div", { tabindex: "0", class: z({ "vue-ui-smiley-rated": !t(o).readonly && t(f) === 2 }), style: s(`cursor:${t(o).readonly ? "default" : "pointer"};height:${t(o).style.itemSize}px;aspect-ratio:1/1;position:relative`), onMouseenter: e[4] || (e[4] = (a) => u.value = 1), onMouseleave: e[5] || (e[5] = (a) => u.value = void 0), onClick: e[6] || (e[6] = (a) => k(2)), onKeyup: e[7] || (e[7] = M((a) => k(2), ["enter"])) }, [ t(o).style.tooltip.show && t(w) && t(y) ? (i(), n("div", { key: 0, class: "vue-ui-rating-tooltip", style: s(`border:1px solid ${t(o).style.tooltip.borderColor};position:absolute;top:${-48 + t(o).style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t(o).style.tooltip.backgroundColor};display:${t(u) === 1 ? "block" : "none"};padding:2px 12px;border-radius:${t(o).style.tooltip.borderRadius}px;box-shadow:${t(o).style.tooltip.boxShadow}`) }, [ l("div", { style: s(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t(o).style.tooltip.color}`) }, [ l("span", { style: s(`font-size:${t(o).style.tooltip.fontSize}px`) }, "2:", 4), e[27] || (e[27] = S()), l("span", { style: s(`font-weight:${t(o).style.tooltip.bold ? "bold" : "normal"};font-size:${t(o).style.tooltip.fontSize}px`) }, c(t(x)( t(o).style.tooltip.formatter, p.dataset.rating[2], t(b)({ v: p.dataset.rating[2], r: t(o).style.tooltip.roundingValue }), t(o) )), 5), l("div", { style: s(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t(o).style.tooltip.borderColor}`) }, " ▼ ", 4) ], 4) ], 4)) : d("", !0), t(o).style.icons.filled ? (i(), n("svg", { key: 1, xmlns: t(v), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(1), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ l("defs", null, [ l("radialGradient", yt, [ l("stop", { offset: "0%", "stop-color": t(m)(t(o).style.colors.active[1], 0.05) }, null, 8, vt), l("stop", { offset: "100%", "stop-color": t(o).style.colors.active[1] }, null, 8, ht) ]) ]), e[28] || (e[28] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 10.66h-6l-.117 .007a1 1 0 0 0 0 1.986l.117 .007h6l.117 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-5.99 -5l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z", "stroke-width": "0", fill: h(1) }, null, 8, ct) ], 8, ft)) : (i(), n("svg", { key: 2, xmlns: t(v), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(1), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[29] || (e[29] = [ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-79483fb9></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-79483fb9></path><path d="M9 10l.01 0" data-v-79483fb9></path><path d="M15 10l.01 0" data-v-79483fb9></path><path d="M9 15l6 0" data-v-79483fb9></path>', 5) ]), 8, gt)), t(o).style.icons.filled && t(y) ? (i(), n("svg", { key: 3, xmlns: t(v), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: `0 0 ${g(1)} 24`, "stroke-width": "1.5", stroke: t(o).style.colors.activeReadonly[1], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ l("defs", null, [ l("radialGradient", mt, [ l("stop", { offset: "0%", "stop-color": t(m)(t(o).style.colors.activeReadonly[1], 0.05) }, null, 8, xt), l("stop", { offset: "100%", "stop-color": t(o).style.colors.activeReadonly[1] }, null, 8, bt) ]) ]), e[30] || (e[30] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 10.66h-6l-.117 .007a1 1 0 0 0 0 1.986l.117 .007h6l.117 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-5.99 -5l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z", "stroke-width": "0", fill: t(o).style.icons.useGradient ? "url(#vueUiSmiley1)" : t(o).style.colors.activeReadonly[1] }, null, 8, $t) ], 8, kt)) : d("", !0), !t(o).style.icons.filled && t(y) ? (i(), n("svg", { key: 4, style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: `0 0 ${g(1)} 24`, "stroke-width": "1.5", stroke: t(o).style.colors.activeReadonly[1], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[31] || (e[31] = [ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-79483fb9></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-79483fb9></path><path d="M9 10l.01 0" data-v-79483fb9></path><path d="M15 10l.01 0" data-v-79483fb9></path><path d="M9 15l6 0" data-v-79483fb9></path>', 5) ]), 8, wt)) : d("", !0) ], 38), l("div", { tabindex: "0", class: z({ "vue-ui-smiley-rated": !t(o).readonly && t(f) === 3 }), style: s(`cursor:${t(o).readonly ? "default" : "pointer"};height:${t(o).style.itemSize}px;aspect-ratio:1/1;position:relative`), onMouseenter: e[8] || (e[8] = (a) => u.value = 2), onMouseleave: e[9] || (e[9] = (a) => u.value = void 0), onClick: e[10] || (e[10] = (a) => k(3)), onKeyup: e[11] || (e[11] = M((a) => k(3), ["enter"])) }, [ t(o).style.tooltip.show && t(w) && t(y) ? (i(), n("div", { key: 0, class: "vue-ui-rating-tooltip", style: s(`border:1px solid ${t(o).style.tooltip.borderColor};position:absolute;top:${-48 + t(o).style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t(o).style.tooltip.backgroundColor};display:${t(u) === 2 ? "block" : "none"};padding:2px 12px;border-radius:${t(o).style.tooltip.borderRadius}px;box-shadow:${t(o).style.tooltip.boxShadow}`) }, [ l("div", { style: s(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t(o).style.tooltip.color}`) }, [ l("span", { style: s(`font-size:${t(o).style.tooltip.fontSize}px`) }, "3:", 4), e[32] || (e[32] = S()), l("span", { style: s(`font-weight:${t(o).style.tooltip.bold ? "bold" : "normal"};font-size:${t(o).style.tooltip.fontSize}px`) }, c(t(x)( t(o).style.tooltip.formatter, p.dataset.rating[3], t(b)({ v: p.dataset.rating[3], r: t(o).style.tooltip.roundingValue }), t(o) )), 5), l("div", { style: s(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t(o).style.tooltip.borderColor}`) }, " ▼ ", 4) ], 4) ], 4)) : d("", !0), t(o).style.icons.filled ? (i(), n("svg", { key: 1, xmlns: t(v), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(2), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ l("defs", null, [ l("radialGradient", Mt, [ l("stop", { offset: "0%", "stop-color": t(m)(t(o).style.colors.activeReadonly[2], 0.05) }, null, 8, St), l("stop", { offset: "100%", "stop-color": t(o).style.colors.activeReadonly[2] }, null, 8, _t) ]) ]), e[33] || (e[33] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-7.99 5.66l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z", "stroke-width": "0", fill: h(2) }, null, 8, Rt) ], 8, zt)) : (i(), n("svg", { key: 2, xmlns: t(v), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(2), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[34] || (e[34] = [ l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1), l("path", { d: "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" }, null, -1), l("path", { d: "M9 10l.01 0" }, null, -1), l("path", { d: "M15 10l.01 0" }, null, -1) ]), 8, Ct)), t(o).style.icons.filled && t(y) ? (i(), n("svg", { key: 3, xmlns: t(v), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: `0 0 ${g(2)} 24`, "stroke-width": "1.5", stroke: t(o).style.colors.activeReadonly[2], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ e[35] || (e[35] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("defs", null, [ l("radialGradient", jt, [ l("stop", { offset: "0%", "stop-color": t(m)(t(o).style.colors.activeReadonly[2], 0.05) }, null, 8, Ht), l("stop", { offset: "100%", "stop-color": t(o).style.colors.activeReadonly[2] }, null, 8, Ut) ]) ]), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-7.99 5.66l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z", "stroke-width": "0", fill: t(o).style.icons.useGradient ? "url(#vueUiSmiley2)" : t(o).style.colors.activeReadonly[2] }, null, 8, Gt) ], 8, Bt)) : d("", !0), !t(o).style.icons.filled && t(y) ? (i(), n("svg", { key: 4, xmlns: t(v), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: `0 0 ${g(2)} 24`, "stroke-width": "1.5", stroke: t(o).style.colors.activeReadonly[2], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[36] || (e[36] = [ l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1), l("path", { d: "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" }, null, -1), l("path", { d: "M9 10l.01 0" }, null, -1), l("path", { d: "M15 10l.01 0" }, null, -1) ]), 8, Vt)) : d("", !0) ], 38), l("div", { tabindex: "0", class: z({ "vue-ui-smiley-rated": !t(o).readonly && t(f) === 4 }), style: s(`cursor:${t(o).readonly ? "default" : "pointer"};height:${t(o).style.itemSize}px;aspect-ratio:1/1;position:relative`), onMouseenter: e[12] || (e[12] = (a) => u.value = 3), onMouseleave: e[13] || (e[13] = (a) => u.value = void 0), onClick: e[14] || (e[14] = (a) => k(4)), onKeyup: e[15] || (e[15] = M((a) => k(4), ["enter"])) }, [ t(o).style.tooltip.show && t(w) && t(y) ? (i(), n("div", { key: 0, class: "vue-ui-rating-tooltip", style: s(`border:1px solid ${t(o).style.tooltip.borderColor};position:absolute;top:${-48 + t(o).style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t(o).style.tooltip.backgroundColor};display:${t(u) === 3 ? "block" : "none"};padding:2px 12px;border-radius:${t(o).style.tooltip.borderRadius}px;box-shadow:${t(o).style.tooltip.boxShadow}`) }, [ l("div", { style: s(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t(o).style.tooltip.color}`) }, [ l("span", { style: s(`font-size:${t(o).style.tooltip.fontSize}px`) }, "4:", 4), e[37] || (e[37] = S()), l("span", { style: s(`font-weight:${t(o).style.tooltip.bold ? "bold" : "normal"};font-size:${t(o).style.tooltip.fontSize}px`) }, c(t(x)( t(o).style.tooltip.formatter, p.dataset.rating[4], t(b)({ v: p.dataset.rating[4], r: t(o).style.tooltip.roundingValue }), t(o) )), 5), l("div", { style: s(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t(o).style.tooltip.borderColor}`) }, " ▼ ", 4) ], 4) ], 4)) : d("", !0), t(o).style.icons.filled ? (i(), n("svg", { key: 1, xmlns: t(v), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(3), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ l("defs", null, [ l("radialGradient", At, [ l("stop", { offset: "0%", "stop-color": t(m)(t(o).style.colors.activeReadonly[3], 0.95) }, null, 8, Yt), l("stop", { offset: "100%", "stop-color": t(o).style.colors.activeReadonly[3] }, null, 8, Nt) ]) ]), e[38] || (e[38] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.8 10.946a1 1 0 0 0 -1.414 .014a2.5 2.5 0 0 1 -3.572 0a1 1 0 0 0 -1.428 1.4a4.5 4.5 0 0 0 6.428 0a1 1 0 0 0 -.014 -1.414zm-6.19 -5.286l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z", "stroke-width": "0", fill: h(3) }, null, 8, Ft) ], 8, Xt)) : (i(), n("svg", { key: 2, xmlns: t(v), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(3), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[39] || (e[39] = [ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-79483fb9></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-79483fb9></path><path d="M9 10l.01 0" data-v-79483fb9></path><path d="M15 10l.01 0" data-v-79483fb9></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-79483fb9></path>', 5) ]), 8, It)), t(o).style.icons.filled && t(y) ? (i(), n("svg", { key: 3, xmlns: t(v), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: `0 0 ${g(3)} 24`, "stroke-width": "1.5", stroke: t(o).style.colors.activeReadonly[3], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ e[40] || (e[40] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("defs", null, [ l("radialGradient", Lt, [ l("stop", { offset: "0%", "stop-color": t(m)(t(o).style.colors.activeReadonly[3], 0.95) }, null, 8, Dt), l("stop", { offset: "100%", "stop-color": t(o).style.colors.activeReadonly[3] }, null, 8, Et) ]) ]), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.8 10.946a1 1 0 0 0 -1.414 .014a2.5 2.5 0 0 1 -3.572 0a1 1 0 0 0 -1.428 1.4a4.5 4.5 0 0 0 6.428 0a1 1 0 0 0 -.014 -1.414zm-6.19 -5.286l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z", "stroke-width": "0", fill: t(o).style.icons.useGradient ? "url(#vueUiSmiley3)" : t(o).style.colors.activeReadonly[3] }, null, 8, Ot) ], 8, Kt)) : d("", !0), !t(o).style.icons.filled && t(y) ? (i(), n("svg", { key: 4, xmlns: t(v), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: `0 0 ${g(3)} 24`, "stroke-width": "1.5", stroke: t(o).style.colors.activeReadonly[3], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[41] || (e[41] = [ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-79483fb9></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-79483fb9></path><path d="M9 10l.01 0" data-v-79483fb9></path><path d="M15 10l.01 0" data-v-79483fb9></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-79483fb9></path>', 5) ]), 8, Tt)) : d("", !0) ], 38), l("div", { tabindex: "0", class: z({ "vue-ui-smiley-rated": !t(o).readonly && t(f) === 5 }), style: s(`cursor:${t(o).readonly ? "default" : "pointer"};height:${t(o).style.itemSize}px;aspect-ratio:1/1;position:relative`), onMouseenter: e[16] || (e[16] = (a) => u.value = 4), onMouseleave: e[17] || (e[17] = (a) => u.value = void 0), onClick: e[18] || (e[18] = (a) => k(5)), onKeyup: e[19] || (e[19] = M((a) => k(5), ["enter"])) }, [ t(o).style.tooltip.show && t(w) && t(y) ? (i(), n("div", { key: 0, class: "vue-ui-rating-tooltip", style: s(`border:1px solid ${t(o).style.tooltip.borderColor};position:absolute;top:${-48 + t(o).style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t(o).style.tooltip.backgroundColor};display:${t(u) === 4 ? "block" : "none"};padding:2px 12px;border-radius:${t(o).style.tooltip.borderRadius}px;box-shadow:${t(o).style.tooltip.boxShadow}`) }, [ l("div", { style: s(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t(o).style.tooltip.color}`) }, [ l("span", { style: s(`font-size:${t(o).style.tooltip.fontSize}px`) }, "5:", 4), e[42] || (e[42] = S()), l("span", { style: s(`font-weight:${t(o).style.tooltip.bold ? "bold" : "normal"};font-size:${t(o).style.tooltip.fontSize}px`) }, c(t(x)( t(o).style.tooltip.formatter, p.dataset.rating[5], t(b)({ v: p.dataset.rating[5], r: t(o).style.tooltip.roundingValue }), t(o) )), 5), l("div", { style: s(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t(o).style.tooltip.borderColor}`) }, " ▼ ", 4) ], 4) ], 4)) : d("", !0), t(o).style.icons.filled ? (i(), n("svg", { key: 1, xmlns: t(v), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(4), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ l("defs", null, [ l("radialGradient", qt, [ l("stop", { offset: "0%", "stop-color": t(m)(t(o).style.colors.activeReadonly[4], 0.9) }, null, 8, Jt), l("stop", { offset: "100%", "stop-color": t(o).style.colors.activeReadonly[4] }, null, 8, Qt) ]) ]), e[43] || (e[43] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 9.66h-6a1 1 0 0 0 -1 1v.05a3.975 3.975 0 0 0 3.777 3.97l.227 .005a4.026 4.026 0 0 0 3.99 -3.79l.006 -.206a1 1 0 0 0 -1 -1.029zm-5.99 -5l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z", "stroke-width": "0", fill: h(4) }, null, 8, Wt) ], 8, Pt)) : (i(), n("svg", { key: 2, xmlns: t(v), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(4), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[44] || (e[44] = [ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-79483fb9></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-79483fb9></path><path d="M9 9l.01 0" data-v-79483fb9></path><path d="M15 9l.01 0" data-v-79483fb9></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-79483fb9></path>', 5) ]), 8, Zt)), t(o).style.icons.filled && t(y) ? (i(), n("svg", { key: 3, xmlns: t(v), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: `0 0 ${g(4)} 24`, "stroke-width": "1.5", stroke: t(o).style.colors.activeReadonly[4], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ e[45] || (e[45] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("defs", null, [ l("radialGradient", oo, [ l("stop", { offset: "0%", "stop-color": t(m)(t(o).style.colors.activeReadonly[4], 0.9) }, null, 8, eo), l("stop", { offset: "100%", "stop-color": t(o).style.colors.activeReadonly[4] }, null, 8, lo) ]) ]), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 9.66h-6a1 1 0 0 0 -1 1v.05a3.975 3.975 0 0 0 3.777 3.97l.227 .005a4.026 4.026 0 0 0 3.99 -3.79l.006 -.206a1 1 0 0 0 -1 -1.029zm-5.99 -5l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z", "stroke-width": "0", fill: t(o).style.icons.useGradient ? "url(#vueUiSmiley4)" : t(o).style.colors.activeReadonly[4] }, null, 8, so) ], 8, to)) : d("", !0), !t(o).style.icons.filled && t(y) ? (i(), n("svg", { key: 4, xmlns: t(v), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: `0 0 ${g(4)} 24`, "stroke-width": "1.5", stroke: t(o).style.colors.activeReadonly[4], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[46] || (e[46] = [ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-79483fb9></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-79483fb9></path><path d="M9 9l.01 0" data-v-79483fb9></path><path d="M15 9l.01 0" data-v-79483fb9></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-79483fb9></path>', 5) ]), 8, io)) : d("", !0) ], 38), t(o).style.rating.show && t(o).style.rating.position === "right" ? (i(), n("div", { key: 1, style: s(`width:fit-content;text-align:center;margin-bottom:${t(o).style.rating.offsetY}px;font-size:${t(o).style.rating.fontSize}px;font-weight:${t(o).style.rating.bold ? "bold" : "normal"};padding-left:${t(o).style.rating.offsetX}px`) }, c(t(x)( t(o).style.rating.formatter, t(f), t(b)({ v: t(f), r: t(o).style.rating.roundingValue }), t(o) )), 5)) : d("", !0) ], 4), t(o).style.rating.show && t(o).style.rating.position === "bottom" ? (i(), n("div", { key: 2, style: s(`width:100%;text-align:center;margin-top:${t(o).style.rating.offsetY}px;font-size:${t(o).style.rating.fontSize}px;font-weight:${t(o).style.rating.bold ? "bold" : "normal"};margin-left:${t(o).style.rating.offsetX}px`) }, c(t(x)( t(o).style.rating.formatter, t(f), t(b)({ v: t(f), r: t(o).style.rating.roundingValue }), t(o) )), 5)) : d("", !0) ], 36)); } }, yo = /* @__PURE__ */ W(no, [["__scopeId", "data-v-79483fb9"]]); export { yo as default };