@idux/charts-core 0.8.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -2
- package/dist/components/Chart.d.ts +4 -3
- package/dist/components/index.d.ts +3 -1
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/useChart.d.ts +4 -4
- package/dist/composables/useReactiveAttrs.d.ts +2 -0
- package/dist/composables/useResizeObserver.d.ts +2 -2
- package/dist/composables/useStripe.d.ts +17 -8
- package/dist/index.js +1108 -957
- package/dist/index.umd.cjs +7 -7
- package/dist/types/index.d.ts +12 -5
- package/dist/utils/index.d.ts +3 -1
- package/dist/utils/withChartProps.d.ts +30 -0
- package/package.json +14 -8
package/dist/index.js
CHANGED
|
@@ -1,972 +1,1123 @@
|
|
|
1
|
-
import { DataZoomComponent as
|
|
2
|
-
import { LabelLayout as
|
|
3
|
-
import { SVGRenderer as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
1
|
+
import { DataZoomComponent as e, GridComponent as t, LegendComponent as n, TitleComponent as r, TooltipComponent as i } from "echarts/components";
|
|
2
|
+
import { LabelLayout as a, UniversalTransition as o } from "echarts/features";
|
|
3
|
+
import { SVGRenderer as s } from "echarts/renderers";
|
|
4
|
+
import { computed as c, defineComponent as l, getCurrentInstance as u, h as d, isVue2 as f, onBeforeUnmount as p, onBeforeUpdate as m, onMounted as ee, onUpdated as te, shallowRef as h, unref as g, watch as _, watchEffect as v } from "vue-demi";
|
|
5
|
+
import { PictorialBarChart as y } from "echarts/charts";
|
|
6
|
+
import { init as ne, registerTheme as b, use as x } from "echarts/core";
|
|
7
|
+
import { cloneDeep as S, isBoolean as re, isEqual as C, isNil as ie } from "lodash-es";
|
|
8
|
+
// composables/useResizeObserver.ts
|
|
9
|
+
function ae(e, t, n) {
|
|
10
|
+
_([
|
|
11
|
+
e,
|
|
12
|
+
t,
|
|
13
|
+
n
|
|
14
|
+
], ([e, n, r], i, a) => {
|
|
15
|
+
if (!e || !n || !r) return;
|
|
16
|
+
let o, s = () => {
|
|
17
|
+
o === void 0 && (o = requestAnimationFrame(() => {
|
|
18
|
+
o = void 0, t.value === n && n.resize();
|
|
19
|
+
}));
|
|
20
|
+
};
|
|
21
|
+
oe(e, s), a(() => {
|
|
22
|
+
se(e, s), o !== void 0 && cancelAnimationFrame(o);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
var w = /* @__PURE__ */ new Map();
|
|
27
|
+
function oe(e, t, n) {
|
|
28
|
+
if (e && t) {
|
|
29
|
+
if (w.has(e)) w.get(e).listeners.push(t);
|
|
30
|
+
else {
|
|
31
|
+
let r = [t], i = new ResizeObserver((e) => {
|
|
32
|
+
e.forEach((e) => r.forEach((t) => t(e)));
|
|
33
|
+
});
|
|
34
|
+
i.observe(e, n), w.set(e, {
|
|
35
|
+
listeners: r,
|
|
36
|
+
ro: i
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function se(e, t) {
|
|
42
|
+
if (!e || !t || !w.has(e)) return;
|
|
43
|
+
let { listeners: n, ro: r } = w.get(e), i = n.indexOf(t);
|
|
44
|
+
i > -1 && (n.splice(i, 1), n.length === 0 && (r.disconnect(), w.delete(e)));
|
|
45
|
+
}
|
|
46
|
+
// composables/useChart.ts
|
|
47
|
+
x([y]);
|
|
48
|
+
var T = { text: "加载中..." };
|
|
49
|
+
function E(e, t) {
|
|
50
|
+
let n = () => typeof t == "function" ? t() : t, r = h(), i = h(), a = h(), o = c(() => g(e).autoResize ?? !0), s = c(() => g(e).group), l = c(() => g(e).initOption), u = c(() => g(e).loading), d = c(() => g(e).setOptionOpts), f = c(() => g(e).theme ?? "seer"), m = [], y = (e, t) => {
|
|
51
|
+
m = m.filter((n) => {
|
|
52
|
+
let r = t.some(([e, t, r]) => e === n.name && t === n.handler && r === n.once);
|
|
53
|
+
return r || e.off(n.name, n.wrapped), r;
|
|
54
|
+
}), t.forEach(([t, n, r]) => {
|
|
55
|
+
if (m.some((e) => e.name === t && e.handler === n && e.once === r)) return;
|
|
56
|
+
let i = (...a) => {
|
|
57
|
+
r && e.off(t, i), n(...a);
|
|
58
|
+
};
|
|
59
|
+
m.push({
|
|
60
|
+
name: t,
|
|
61
|
+
handler: n,
|
|
62
|
+
once: r,
|
|
63
|
+
wrapped: i
|
|
64
|
+
}), e.on(t, i);
|
|
65
|
+
});
|
|
66
|
+
}, b = () => {
|
|
67
|
+
let t = r.value;
|
|
68
|
+
if (!t) return;
|
|
69
|
+
let o = ne(t, f.value, l.value), s = g(e), { restOptions: c, events: u } = D(s, n(), !1);
|
|
70
|
+
o.setOption(c, d.value), a.value = S(c), y(o, u);
|
|
71
|
+
let p = s.onReady || n()?.ready;
|
|
72
|
+
p && p(o), i.value = o;
|
|
73
|
+
}, x = () => {
|
|
74
|
+
i.value && (i.value.dispose(), i.value = void 0, m = []);
|
|
75
|
+
};
|
|
76
|
+
return ee(() => b()), p(() => x()), te(() => {
|
|
77
|
+
i.value && y(i.value, D(g(e), n(), !1).events);
|
|
78
|
+
}), _(() => g(e), (e) => {
|
|
79
|
+
let t = i.value;
|
|
80
|
+
if (!t) return;
|
|
81
|
+
let { restOptions: r, events: o } = D(e, n(), !1);
|
|
82
|
+
y(t, o), C(r, a.value) || (t.setOption(r, d.value), a.value = S(r));
|
|
83
|
+
}, { deep: !0 }), _([() => S(f.value), () => S(l.value)], ([e, t], [n, r]) => {
|
|
84
|
+
C(e, n) && C(t, r) || (x(), b());
|
|
85
|
+
}), v(() => {
|
|
86
|
+
let e = s.value;
|
|
87
|
+
i.value && (i.value.group = e ?? "");
|
|
88
|
+
}), v(() => {
|
|
89
|
+
let e = i.value;
|
|
90
|
+
if (!e) return;
|
|
91
|
+
let t = u.value;
|
|
92
|
+
t ? e.showLoading(re(t) ? T : {
|
|
93
|
+
...T,
|
|
94
|
+
...t
|
|
95
|
+
}) : e.hideLoading();
|
|
96
|
+
}), ae(r, i, o), {
|
|
97
|
+
containerRef: r,
|
|
98
|
+
chartRef: i
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function ce(e) {
|
|
102
|
+
return /^on[^a-z]/.test(e);
|
|
103
|
+
}
|
|
104
|
+
var le = [
|
|
105
|
+
"class",
|
|
106
|
+
"style",
|
|
107
|
+
"autoResize",
|
|
108
|
+
"initOption",
|
|
109
|
+
"group",
|
|
110
|
+
"loading",
|
|
111
|
+
"setOptionOpts",
|
|
112
|
+
"theme",
|
|
113
|
+
"onReady"
|
|
91
114
|
];
|
|
92
|
-
function
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
function D(e, t = {}, n = !0) {
|
|
116
|
+
let r = {}, i = [];
|
|
117
|
+
return Object.keys(e).forEach((t) => {
|
|
118
|
+
if (!le.includes(t)) {
|
|
119
|
+
if (ce(t)) {
|
|
120
|
+
if (n) return;
|
|
121
|
+
let r = e[t];
|
|
122
|
+
if (r) {
|
|
123
|
+
let e = t.endsWith("Once"), n = e ? t.length - 4 : void 0, a = t.charAt(2).toLowerCase() + t.substring(3, n);
|
|
124
|
+
i.push([
|
|
125
|
+
a,
|
|
126
|
+
r,
|
|
127
|
+
e
|
|
128
|
+
]);
|
|
129
|
+
}
|
|
130
|
+
} else r[t] = e[t];
|
|
131
|
+
}
|
|
132
|
+
}), f && !n && Object.keys(t).forEach((e) => {
|
|
133
|
+
if (e === "ready" || e === "~ready") return;
|
|
134
|
+
let n = t[e];
|
|
135
|
+
if (n) {
|
|
136
|
+
let t = e.startsWith("~"), r = +!!t, a = e.substring(r);
|
|
137
|
+
i.push([
|
|
138
|
+
a,
|
|
139
|
+
n,
|
|
140
|
+
t
|
|
141
|
+
]);
|
|
142
|
+
}
|
|
143
|
+
}), {
|
|
144
|
+
restOptions: r,
|
|
145
|
+
events: i
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
// composables/useTooltips.ts
|
|
149
|
+
function O(e, t) {
|
|
150
|
+
return `
|
|
120
151
|
<div class="charts-tooltips">
|
|
121
152
|
<div class="charts-tooltips-title">${e}</div>
|
|
122
|
-
${t.map((
|
|
153
|
+
${t.map((e) => `
|
|
123
154
|
<div class="charts-tooltips-item">
|
|
124
|
-
<span class="charts-tooltips-item-border" style="background: ${
|
|
125
|
-
<span class="charts-tooltips-item-name">${
|
|
126
|
-
<span class="charts-tooltips-item-value">${
|
|
155
|
+
<span class="charts-tooltips-item-border" style="background: ${e.color}"></span>
|
|
156
|
+
<span class="charts-tooltips-item-name">${e.name}</span>
|
|
157
|
+
<span class="charts-tooltips-item-value">${e.value}</span>
|
|
127
158
|
</div>`).join("")}
|
|
128
159
|
</div>`;
|
|
129
160
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
},
|
|
154
|
-
symbolRepeat: "fixed",
|
|
155
|
-
symbolMargin: 2,
|
|
156
|
-
symbol: "rect",
|
|
157
|
-
symbolClip: !0,
|
|
158
|
-
symbolSize: i,
|
|
159
|
-
symbolPosition: "start",
|
|
160
|
-
symbolOffset: r,
|
|
161
|
-
z: 1,
|
|
162
|
-
animationEasing: "elasticOut"
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
function Xt(e) {
|
|
166
|
-
return {
|
|
167
|
-
axisPointer: {
|
|
168
|
-
lineStyle: {
|
|
169
|
-
opacity: 0.6
|
|
170
|
-
}
|
|
171
|
-
},
|
|
172
|
-
formatter: function(t) {
|
|
173
|
-
if (!(t != null && t.length))
|
|
174
|
-
return "";
|
|
175
|
-
const r = t[0].name, n = t.filter((i) => !!i.seriesName).map((i) => ({
|
|
176
|
-
name: i.seriesName,
|
|
177
|
-
value: `${i.value} ${e}`,
|
|
178
|
-
color: i.color
|
|
179
|
-
}));
|
|
180
|
-
return At(r, n);
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
function Yt({
|
|
185
|
-
series: e,
|
|
186
|
-
color: t,
|
|
187
|
-
offset: r = [0, 0],
|
|
188
|
-
rotate: n,
|
|
189
|
-
size: i
|
|
190
|
-
}) {
|
|
191
|
-
return [
|
|
192
|
-
{
|
|
193
|
-
type: "bar",
|
|
194
|
-
z: 0,
|
|
195
|
-
...e
|
|
196
|
-
},
|
|
197
|
-
wt({
|
|
198
|
-
data: e.data,
|
|
199
|
-
offset: r,
|
|
200
|
-
color: t,
|
|
201
|
-
rotate: n,
|
|
202
|
-
size: i
|
|
203
|
-
})
|
|
204
|
-
];
|
|
205
|
-
}
|
|
206
|
-
function Jt() {
|
|
207
|
-
return {
|
|
208
|
-
aria: {
|
|
209
|
-
enabled: !0,
|
|
210
|
-
decal: {
|
|
211
|
-
show: !0,
|
|
212
|
-
decals: [
|
|
213
|
-
{
|
|
214
|
-
color: "white",
|
|
215
|
-
dashArrayX: [1, 0],
|
|
216
|
-
// 这个一般不用调增
|
|
217
|
-
dashArrayY: [6, 0],
|
|
218
|
-
// 调整 [x, y] 中 x 的值可以调整条纹的密度
|
|
219
|
-
symbolSize: 0.5,
|
|
220
|
-
// 这个值越大,白色条纹就越宽。0.5 的时候则是平均分
|
|
221
|
-
rotation: Math.PI / 2
|
|
222
|
-
// 这个让条纹保持竖向
|
|
223
|
-
}
|
|
224
|
-
]
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
const X = ut({
|
|
230
|
-
name: "IxChart",
|
|
231
|
-
inheritAttrs: !1,
|
|
232
|
-
// @ts-ignore
|
|
233
|
-
setup(e, { attrs: t, listeners: r }) {
|
|
234
|
-
const { containerRef: n } = Ft(t, r);
|
|
235
|
-
return { containerRef: n };
|
|
236
|
-
},
|
|
237
|
-
render() {
|
|
238
|
-
const { class: e, style: t } = this.$attrs;
|
|
239
|
-
return ct("div", {
|
|
240
|
-
ref: "containerRef",
|
|
241
|
-
class: e,
|
|
242
|
-
style: {
|
|
243
|
-
width: "100%",
|
|
244
|
-
height: "100%",
|
|
245
|
-
...t
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
});
|
|
250
|
-
function h(e, t) {
|
|
251
|
-
Rt(e) && (e = "100%");
|
|
252
|
-
var r = kt(e);
|
|
253
|
-
return e = t === 360 ? e : Math.min(t, Math.max(0, parseFloat(e))), r && (e = parseInt(String(e * t), 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : (t === 360 ? e = (e < 0 ? e % t + t : e % t) / parseFloat(String(t)) : e = e % t / parseFloat(String(t)), e);
|
|
161
|
+
// composables/useStripe.ts
|
|
162
|
+
function k({ data: e = [], color: t = "", offset: n = [0, 0], rotate: r = -20, size: i = [2, 8] }) {
|
|
163
|
+
return {
|
|
164
|
+
name: "",
|
|
165
|
+
data: e,
|
|
166
|
+
type: "pictorialBar",
|
|
167
|
+
symbolRotate: r,
|
|
168
|
+
silent: !0,
|
|
169
|
+
itemStyle: {
|
|
170
|
+
color: t,
|
|
171
|
+
opacity: 0
|
|
172
|
+
},
|
|
173
|
+
emphasis: { itemStyle: { opacity: 1 } },
|
|
174
|
+
symbolRepeat: "fixed",
|
|
175
|
+
symbolMargin: 2,
|
|
176
|
+
symbol: "rect",
|
|
177
|
+
symbolClip: !0,
|
|
178
|
+
symbolSize: i,
|
|
179
|
+
symbolPosition: "start",
|
|
180
|
+
symbolOffset: n,
|
|
181
|
+
z: 1,
|
|
182
|
+
animationEasing: "elasticOut"
|
|
183
|
+
};
|
|
254
184
|
}
|
|
185
|
+
function ue(e) {
|
|
186
|
+
return {
|
|
187
|
+
axisPointer: { lineStyle: { opacity: .6 } },
|
|
188
|
+
formatter: function(t) {
|
|
189
|
+
if (!t?.length) return "";
|
|
190
|
+
let n = t[0].name;
|
|
191
|
+
return O(n, t.filter((e) => !!e.seriesName).map((t) => ({
|
|
192
|
+
name: t.seriesName,
|
|
193
|
+
value: `${t.value} ${e}`,
|
|
194
|
+
color: t.color
|
|
195
|
+
})));
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
function de({ series: e, color: t, offset: n = [0, 0], rotate: r, size: i }) {
|
|
200
|
+
return [{
|
|
201
|
+
type: "bar",
|
|
202
|
+
z: 0,
|
|
203
|
+
...e
|
|
204
|
+
}, k({
|
|
205
|
+
data: e.data,
|
|
206
|
+
offset: n,
|
|
207
|
+
color: t,
|
|
208
|
+
rotate: r,
|
|
209
|
+
size: i
|
|
210
|
+
})];
|
|
211
|
+
}
|
|
212
|
+
function fe() {
|
|
213
|
+
return { aria: {
|
|
214
|
+
enabled: !0,
|
|
215
|
+
decal: {
|
|
216
|
+
show: !0,
|
|
217
|
+
decals: [{
|
|
218
|
+
color: "white",
|
|
219
|
+
dashArrayX: [1, 0],
|
|
220
|
+
dashArrayY: [6, 0],
|
|
221
|
+
symbolSize: .5,
|
|
222
|
+
rotation: Math.PI / 2
|
|
223
|
+
}]
|
|
224
|
+
}
|
|
225
|
+
} };
|
|
226
|
+
}
|
|
227
|
+
// composables/useReactiveAttrs.ts
|
|
228
|
+
var pe = {
|
|
229
|
+
"auto-resize": "autoResize",
|
|
230
|
+
"init-option": "initOption",
|
|
231
|
+
"set-option-opts": "setOptionOpts"
|
|
232
|
+
};
|
|
255
233
|
function A(e) {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
}
|
|
315
|
-
function
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}
|
|
349
|
-
function
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
234
|
+
let t = u()?.proxy, n = () => Object.fromEntries(Object.entries(f && t ? t.$attrs : e).map(([e, t]) => [pe[e] ?? e, t]));
|
|
235
|
+
if (f && t) return c(n);
|
|
236
|
+
let r = h(n());
|
|
237
|
+
return m(() => {
|
|
238
|
+
let e = n(), t = r.value;
|
|
239
|
+
(Object.keys(t).length !== Object.keys(e).length || Object.keys(e).some((n) => !Object.is(t[n], e[n]))) && (r.value = e);
|
|
240
|
+
}), r;
|
|
241
|
+
}
|
|
242
|
+
// utils/withChartProps.ts
|
|
243
|
+
function j() {
|
|
244
|
+
return (e) => e;
|
|
245
|
+
}
|
|
246
|
+
// components/Chart.ts
|
|
247
|
+
var me = j()(l({
|
|
248
|
+
name: "IxChart",
|
|
249
|
+
inheritAttrs: !1,
|
|
250
|
+
setup(e, t) {
|
|
251
|
+
let { containerRef: n } = E(A(t.attrs), () => t.listeners ?? {});
|
|
252
|
+
return { containerRef: n };
|
|
253
|
+
},
|
|
254
|
+
render() {
|
|
255
|
+
let { class: e, style: t } = this.$attrs;
|
|
256
|
+
return d("div", {
|
|
257
|
+
ref: "containerRef",
|
|
258
|
+
class: e,
|
|
259
|
+
style: {
|
|
260
|
+
width: "100%",
|
|
261
|
+
height: "100%",
|
|
262
|
+
...t
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
}));
|
|
267
|
+
// ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.2/node_modules/@ctrl/tinycolor/dist/module/util.js
|
|
268
|
+
function M(e, t) {
|
|
269
|
+
he(e) && (e = "100%");
|
|
270
|
+
let n = P(e);
|
|
271
|
+
return e = t === 360 ? parseFloat(e) : Math.min(t, Math.max(0, parseFloat(e))), n && (e = parseInt(String(e * t), 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : (e = t === 360 ? (e < 0 ? e % t + t : e % t) / t : e % t / t, e);
|
|
272
|
+
}
|
|
273
|
+
function N(e) {
|
|
274
|
+
return Math.min(1, Math.max(0, e));
|
|
275
|
+
}
|
|
276
|
+
function he(e) {
|
|
277
|
+
return typeof e == "string" && e.indexOf(".") !== -1 && !P(e) && parseFloat(e) === 1;
|
|
278
|
+
}
|
|
279
|
+
function P(e) {
|
|
280
|
+
return typeof e == "string" && e.indexOf("%") !== -1;
|
|
281
|
+
}
|
|
282
|
+
function F(e) {
|
|
283
|
+
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
|
|
284
|
+
}
|
|
285
|
+
function ge(e) {
|
|
286
|
+
return Number(e) <= 1 ? `${Number(e) * 100}%` : e;
|
|
287
|
+
}
|
|
288
|
+
function I(e) {
|
|
289
|
+
if (typeof e != "number" || !(e <= 1)) return ge(e);
|
|
290
|
+
let t = Math.min(100, Math.max(0, e * 100)) * 100;
|
|
291
|
+
return (t >= 1e-6 ? Math.trunc(t) : parseInt(String(t), 10)) / 100;
|
|
292
|
+
}
|
|
293
|
+
function _e(e) {
|
|
294
|
+
return e.length === 1 ? "0" + e : String(e);
|
|
295
|
+
}
|
|
296
|
+
// ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.2/node_modules/@ctrl/tinycolor/dist/module/conversion.js
|
|
297
|
+
function ve(e, t, n) {
|
|
298
|
+
return {
|
|
299
|
+
r: M(e, 255) * 255,
|
|
300
|
+
g: M(t, 255) * 255,
|
|
301
|
+
b: M(n, 255) * 255
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
function L(e, t, n) {
|
|
305
|
+
e = M(e, 255), t = M(t, 255), n = M(n, 255);
|
|
306
|
+
let r = Math.max(e, t, n), i = Math.min(e, t, n), a = 0, o, s = (r + i) / 2;
|
|
307
|
+
if (r === i) o = 0, a = 0;
|
|
308
|
+
else {
|
|
309
|
+
let c = r - i;
|
|
310
|
+
switch (o = s > .5 ? c / (2 - r - i) : c / (r + i), r) {
|
|
311
|
+
case e:
|
|
312
|
+
a = (t - n) / c + (t < n ? 6 : 0);
|
|
313
|
+
break;
|
|
314
|
+
case t:
|
|
315
|
+
a = (n - e) / c + 2;
|
|
316
|
+
break;
|
|
317
|
+
case n: a = (e - t) / c + 4;
|
|
318
|
+
}
|
|
319
|
+
a /= 6;
|
|
320
|
+
}
|
|
321
|
+
return {
|
|
322
|
+
h: a,
|
|
323
|
+
s: o,
|
|
324
|
+
l: s
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
function R(e, t, n) {
|
|
328
|
+
return n < 0 && (n += 1), n > 1 && --n, n < 1 / 6 ? e + (t - e) * (6 * n) : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
|
|
329
|
+
}
|
|
330
|
+
function ye(e, t, n) {
|
|
331
|
+
let r, i, a;
|
|
332
|
+
if (e = M(e, 360), t = M(t, 100), n = M(n, 100), t === 0) i = n, a = n, r = n;
|
|
333
|
+
else {
|
|
334
|
+
let o = n < .5 ? n * (1 + t) : n + t - n * t, s = 2 * n - o;
|
|
335
|
+
r = R(s, o, e + 1 / 3), i = R(s, o, e), a = R(s, o, e - 1 / 3);
|
|
336
|
+
}
|
|
337
|
+
return {
|
|
338
|
+
r: r * 255,
|
|
339
|
+
g: i * 255,
|
|
340
|
+
b: a * 255
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
function z(e, t, n) {
|
|
344
|
+
e = M(e, 255), t = M(t, 255), n = M(n, 255);
|
|
345
|
+
let r = Math.max(e, t, n), i = Math.min(e, t, n), a = 0, o = r, s = r - i, c = r === 0 ? 0 : s / r;
|
|
346
|
+
if (r === i) a = 0;
|
|
347
|
+
else {
|
|
348
|
+
switch (r) {
|
|
349
|
+
case e:
|
|
350
|
+
a = (t - n) / s + (t < n ? 6 : 0);
|
|
351
|
+
break;
|
|
352
|
+
case t:
|
|
353
|
+
a = (n - e) / s + 2;
|
|
354
|
+
break;
|
|
355
|
+
case n: a = (e - t) / s + 4;
|
|
356
|
+
}
|
|
357
|
+
a /= 6;
|
|
358
|
+
}
|
|
359
|
+
return {
|
|
360
|
+
h: a,
|
|
361
|
+
s: c,
|
|
362
|
+
v: o
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
function be(e, t, n) {
|
|
366
|
+
e = M(e, 360) * 6, t = M(t, 100), n = M(n, 100);
|
|
367
|
+
let r = Math.floor(e), i = e - r, a = n * (1 - t), o = n * (1 - i * t), s = n * (1 - (1 - i) * t), c = r % 6, l = [
|
|
368
|
+
n,
|
|
369
|
+
o,
|
|
370
|
+
a,
|
|
371
|
+
a,
|
|
372
|
+
s,
|
|
373
|
+
n
|
|
374
|
+
][c], u = [
|
|
375
|
+
s,
|
|
376
|
+
n,
|
|
377
|
+
n,
|
|
378
|
+
o,
|
|
379
|
+
a,
|
|
380
|
+
a
|
|
381
|
+
][c], d = [
|
|
382
|
+
a,
|
|
383
|
+
a,
|
|
384
|
+
s,
|
|
385
|
+
n,
|
|
386
|
+
n,
|
|
387
|
+
o
|
|
388
|
+
][c];
|
|
389
|
+
return {
|
|
390
|
+
r: l * 255,
|
|
391
|
+
g: u * 255,
|
|
392
|
+
b: d * 255
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
function B(e) {
|
|
396
|
+
return e < 10 ? 48 + e : 87 + e;
|
|
360
397
|
}
|
|
361
398
|
function V(e) {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
399
|
+
let t = Math.round(e);
|
|
400
|
+
return t >= 0 && t <= 255 ? String.fromCharCode(B(t >> 4), B(t & 15)) : _e(t.toString(16));
|
|
401
|
+
}
|
|
402
|
+
function xe(e) {
|
|
403
|
+
return V(parseFloat(e) * 255);
|
|
404
|
+
}
|
|
405
|
+
function H(e, t, n, r) {
|
|
406
|
+
let i = V(e), a = V(t), o = V(n);
|
|
407
|
+
return r && i.startsWith(i.charAt(1)) && a.startsWith(a.charAt(1)) && o.startsWith(o.charAt(1)) ? i.charAt(0) + a.charAt(0) + o.charAt(0) : i + a + o;
|
|
408
|
+
}
|
|
409
|
+
function Se(e, t, n, r, i) {
|
|
410
|
+
let a = V(e), o = V(t), s = V(n), c = xe(r);
|
|
411
|
+
return i && a.startsWith(a.charAt(1)) && o.startsWith(o.charAt(1)) && s.startsWith(s.charAt(1)) && c.startsWith(c.charAt(1)) ? a.charAt(0) + o.charAt(0) + s.charAt(0) + c.charAt(0) : a + o + s + c;
|
|
412
|
+
}
|
|
413
|
+
function Ce(e, t, n, r) {
|
|
414
|
+
let i = e / 100, a = t / 100, o = n / 100, s = r / 100;
|
|
415
|
+
return {
|
|
416
|
+
r: 255 * (1 - i) * (1 - s),
|
|
417
|
+
g: 255 * (1 - a) * (1 - s),
|
|
418
|
+
b: 255 * (1 - o) * (1 - s)
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
function U(e, t, n) {
|
|
422
|
+
let r = 1 - e / 255, i = 1 - t / 255, a = 1 - n / 255, o = Math.min(r, i, a);
|
|
423
|
+
return o === 1 ? (r = 0, i = 0, a = 0) : (r = (r - o) / (1 - o) * 100, i = (i - o) / (1 - o) * 100, a = (a - o) / (1 - o) * 100), o *= 100, {
|
|
424
|
+
c: Math.round(r),
|
|
425
|
+
m: Math.round(i),
|
|
426
|
+
y: Math.round(a),
|
|
427
|
+
k: Math.round(o)
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
function we(e) {
|
|
431
|
+
return {
|
|
432
|
+
r: e >> 16,
|
|
433
|
+
g: (e & 65280) >> 8,
|
|
434
|
+
b: e & 255
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
// ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.2/node_modules/@ctrl/tinycolor/dist/module/css-color-names.js
|
|
438
|
+
var W = {
|
|
439
|
+
aliceblue: "#f0f8ff",
|
|
440
|
+
antiquewhite: "#faebd7",
|
|
441
|
+
aqua: "#00ffff",
|
|
442
|
+
aquamarine: "#7fffd4",
|
|
443
|
+
azure: "#f0ffff",
|
|
444
|
+
beige: "#f5f5dc",
|
|
445
|
+
bisque: "#ffe4c4",
|
|
446
|
+
black: "#000000",
|
|
447
|
+
blanchedalmond: "#ffebcd",
|
|
448
|
+
blue: "#0000ff",
|
|
449
|
+
blueviolet: "#8a2be2",
|
|
450
|
+
brown: "#a52a2a",
|
|
451
|
+
burlywood: "#deb887",
|
|
452
|
+
cadetblue: "#5f9ea0",
|
|
453
|
+
chartreuse: "#7fff00",
|
|
454
|
+
chocolate: "#d2691e",
|
|
455
|
+
coral: "#ff7f50",
|
|
456
|
+
cornflowerblue: "#6495ed",
|
|
457
|
+
cornsilk: "#fff8dc",
|
|
458
|
+
crimson: "#dc143c",
|
|
459
|
+
cyan: "#00ffff",
|
|
460
|
+
darkblue: "#00008b",
|
|
461
|
+
darkcyan: "#008b8b",
|
|
462
|
+
darkgoldenrod: "#b8860b",
|
|
463
|
+
darkgray: "#a9a9a9",
|
|
464
|
+
darkgreen: "#006400",
|
|
465
|
+
darkgrey: "#a9a9a9",
|
|
466
|
+
darkkhaki: "#bdb76b",
|
|
467
|
+
darkmagenta: "#8b008b",
|
|
468
|
+
darkolivegreen: "#556b2f",
|
|
469
|
+
darkorange: "#ff8c00",
|
|
470
|
+
darkorchid: "#9932cc",
|
|
471
|
+
darkred: "#8b0000",
|
|
472
|
+
darksalmon: "#e9967a",
|
|
473
|
+
darkseagreen: "#8fbc8f",
|
|
474
|
+
darkslateblue: "#483d8b",
|
|
475
|
+
darkslategray: "#2f4f4f",
|
|
476
|
+
darkslategrey: "#2f4f4f",
|
|
477
|
+
darkturquoise: "#00ced1",
|
|
478
|
+
darkviolet: "#9400d3",
|
|
479
|
+
deeppink: "#ff1493",
|
|
480
|
+
deepskyblue: "#00bfff",
|
|
481
|
+
dimgray: "#696969",
|
|
482
|
+
dimgrey: "#696969",
|
|
483
|
+
dodgerblue: "#1e90ff",
|
|
484
|
+
firebrick: "#b22222",
|
|
485
|
+
floralwhite: "#fffaf0",
|
|
486
|
+
forestgreen: "#228b22",
|
|
487
|
+
fuchsia: "#ff00ff",
|
|
488
|
+
gainsboro: "#dcdcdc",
|
|
489
|
+
ghostwhite: "#f8f8ff",
|
|
490
|
+
goldenrod: "#daa520",
|
|
491
|
+
gold: "#ffd700",
|
|
492
|
+
gray: "#808080",
|
|
493
|
+
green: "#008000",
|
|
494
|
+
greenyellow: "#adff2f",
|
|
495
|
+
grey: "#808080",
|
|
496
|
+
honeydew: "#f0fff0",
|
|
497
|
+
hotpink: "#ff69b4",
|
|
498
|
+
indianred: "#cd5c5c",
|
|
499
|
+
indigo: "#4b0082",
|
|
500
|
+
ivory: "#fffff0",
|
|
501
|
+
khaki: "#f0e68c",
|
|
502
|
+
lavenderblush: "#fff0f5",
|
|
503
|
+
lavender: "#e6e6fa",
|
|
504
|
+
lawngreen: "#7cfc00",
|
|
505
|
+
lemonchiffon: "#fffacd",
|
|
506
|
+
lightblue: "#add8e6",
|
|
507
|
+
lightcoral: "#f08080",
|
|
508
|
+
lightcyan: "#e0ffff",
|
|
509
|
+
lightgoldenrodyellow: "#fafad2",
|
|
510
|
+
lightgray: "#d3d3d3",
|
|
511
|
+
lightgreen: "#90ee90",
|
|
512
|
+
lightgrey: "#d3d3d3",
|
|
513
|
+
lightpink: "#ffb6c1",
|
|
514
|
+
lightsalmon: "#ffa07a",
|
|
515
|
+
lightseagreen: "#20b2aa",
|
|
516
|
+
lightskyblue: "#87cefa",
|
|
517
|
+
lightslategray: "#778899",
|
|
518
|
+
lightslategrey: "#778899",
|
|
519
|
+
lightsteelblue: "#b0c4de",
|
|
520
|
+
lightyellow: "#ffffe0",
|
|
521
|
+
lime: "#00ff00",
|
|
522
|
+
limegreen: "#32cd32",
|
|
523
|
+
linen: "#faf0e6",
|
|
524
|
+
magenta: "#ff00ff",
|
|
525
|
+
maroon: "#800000",
|
|
526
|
+
mediumaquamarine: "#66cdaa",
|
|
527
|
+
mediumblue: "#0000cd",
|
|
528
|
+
mediumorchid: "#ba55d3",
|
|
529
|
+
mediumpurple: "#9370db",
|
|
530
|
+
mediumseagreen: "#3cb371",
|
|
531
|
+
mediumslateblue: "#7b68ee",
|
|
532
|
+
mediumspringgreen: "#00fa9a",
|
|
533
|
+
mediumturquoise: "#48d1cc",
|
|
534
|
+
mediumvioletred: "#c71585",
|
|
535
|
+
midnightblue: "#191970",
|
|
536
|
+
mintcream: "#f5fffa",
|
|
537
|
+
mistyrose: "#ffe4e1",
|
|
538
|
+
moccasin: "#ffe4b5",
|
|
539
|
+
navajowhite: "#ffdead",
|
|
540
|
+
navy: "#000080",
|
|
541
|
+
oldlace: "#fdf5e6",
|
|
542
|
+
olive: "#808000",
|
|
543
|
+
olivedrab: "#6b8e23",
|
|
544
|
+
orange: "#ffa500",
|
|
545
|
+
orangered: "#ff4500",
|
|
546
|
+
orchid: "#da70d6",
|
|
547
|
+
palegoldenrod: "#eee8aa",
|
|
548
|
+
palegreen: "#98fb98",
|
|
549
|
+
paleturquoise: "#afeeee",
|
|
550
|
+
palevioletred: "#db7093",
|
|
551
|
+
papayawhip: "#ffefd5",
|
|
552
|
+
peachpuff: "#ffdab9",
|
|
553
|
+
peru: "#cd853f",
|
|
554
|
+
pink: "#ffc0cb",
|
|
555
|
+
plum: "#dda0dd",
|
|
556
|
+
powderblue: "#b0e0e6",
|
|
557
|
+
purple: "#800080",
|
|
558
|
+
rebeccapurple: "#663399",
|
|
559
|
+
red: "#ff0000",
|
|
560
|
+
rosybrown: "#bc8f8f",
|
|
561
|
+
royalblue: "#4169e1",
|
|
562
|
+
saddlebrown: "#8b4513",
|
|
563
|
+
salmon: "#fa8072",
|
|
564
|
+
sandybrown: "#f4a460",
|
|
565
|
+
seagreen: "#2e8b57",
|
|
566
|
+
seashell: "#fff5ee",
|
|
567
|
+
sienna: "#a0522d",
|
|
568
|
+
silver: "#c0c0c0",
|
|
569
|
+
skyblue: "#87ceeb",
|
|
570
|
+
slateblue: "#6a5acd",
|
|
571
|
+
slategray: "#708090",
|
|
572
|
+
slategrey: "#708090",
|
|
573
|
+
snow: "#fffafa",
|
|
574
|
+
springgreen: "#00ff7f",
|
|
575
|
+
steelblue: "#4682b4",
|
|
576
|
+
tan: "#d2b48c",
|
|
577
|
+
teal: "#008080",
|
|
578
|
+
thistle: "#d8bfd8",
|
|
579
|
+
tomato: "#ff6347",
|
|
580
|
+
turquoise: "#40e0d0",
|
|
581
|
+
violet: "#ee82ee",
|
|
582
|
+
wheat: "#f5deb3",
|
|
583
|
+
white: "#ffffff",
|
|
584
|
+
whitesmoke: "#f5f5f5",
|
|
585
|
+
yellow: "#ffff00",
|
|
586
|
+
yellowgreen: "#9acd32"
|
|
523
587
|
};
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
588
|
+
// ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.2/node_modules/@ctrl/tinycolor/dist/module/format-input.js
|
|
589
|
+
function Te(e) {
|
|
590
|
+
let t = {
|
|
591
|
+
r: 0,
|
|
592
|
+
g: 0,
|
|
593
|
+
b: 0
|
|
594
|
+
}, n = 1, r = !1, i = !1;
|
|
595
|
+
if (typeof e == "string" && (e = Ee(e)), typeof e == "object") {
|
|
596
|
+
if (X(e.r) && X(e.g) && X(e.b)) {
|
|
597
|
+
t = ve(e.r, e.g, e.b), r = !0;
|
|
598
|
+
let { r: n } = e;
|
|
599
|
+
i = typeof n != "number" && String(n).endsWith("%") ? "prgb" : "rgb";
|
|
600
|
+
} else if (X(e.h) && X(e.s) && X(e.v)) {
|
|
601
|
+
let n = I(e.s), a = I(e.v);
|
|
602
|
+
t = be(e.h, n, a), r = !0, i = "hsv";
|
|
603
|
+
} else if (X(e.h) && X(e.s) && X(e.l)) {
|
|
604
|
+
let n = I(e.s), a = I(e.l);
|
|
605
|
+
t = ye(e.h, n, a), r = !0, i = "hsl";
|
|
606
|
+
} else X(e.c) && X(e.m) && X(e.y) && X(e.k) && (t = Ce(e.c, e.m, e.y, e.k), r = !0, i = "cmyk");
|
|
607
|
+
Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a);
|
|
608
|
+
}
|
|
609
|
+
return n = F(n), {
|
|
610
|
+
ok: r,
|
|
611
|
+
format: e.format || i,
|
|
612
|
+
r: Math.min(255, Math.max(t.r, 0)),
|
|
613
|
+
g: Math.min(255, Math.max(t.g, 0)),
|
|
614
|
+
b: Math.min(255, Math.max(t.b, 0)),
|
|
615
|
+
a: n
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
var G = "(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)", K = "[\\s|\\(]+(" + G + ")[,|\\s]+(" + G + ")[,|\\s]+(" + G + ")\\s*\\)?", q = "[\\s|\\(]+(" + G + ")[,|\\s]+(" + G + ")[,|\\s]+(" + G + ")[,|\\s]+(" + G + ")\\s*\\)?", J = {
|
|
619
|
+
CSS_UNIT: new RegExp(G),
|
|
620
|
+
rgb: RegExp("rgb" + K),
|
|
621
|
+
rgba: RegExp("rgba" + q),
|
|
622
|
+
hsl: RegExp("hsl" + K),
|
|
623
|
+
hsla: RegExp("hsla" + q),
|
|
624
|
+
hsv: RegExp("hsv" + K),
|
|
625
|
+
hsva: RegExp("hsva" + q),
|
|
626
|
+
cmyk: RegExp("cmyk" + q)
|
|
547
627
|
};
|
|
548
|
-
function
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
628
|
+
function Ee(e) {
|
|
629
|
+
if (e = e.trim().toLowerCase(), e.length === 0) return !1;
|
|
630
|
+
let t = !1;
|
|
631
|
+
if (W[e]) e = W[e], t = !0;
|
|
632
|
+
else if (e === "transparent") return {
|
|
633
|
+
r: 0,
|
|
634
|
+
g: 0,
|
|
635
|
+
b: 0,
|
|
636
|
+
a: 0,
|
|
637
|
+
format: "name"
|
|
638
|
+
};
|
|
639
|
+
if (typeof e == "string" && e.length <= 9) {
|
|
640
|
+
let n = De(e, t);
|
|
641
|
+
if (n) return n;
|
|
642
|
+
}
|
|
643
|
+
let n = J.rgb.exec(e);
|
|
644
|
+
return n ? {
|
|
645
|
+
r: n[1],
|
|
646
|
+
g: n[2],
|
|
647
|
+
b: n[3]
|
|
648
|
+
} : (n = J.rgba.exec(e), n ? {
|
|
649
|
+
r: n[1],
|
|
650
|
+
g: n[2],
|
|
651
|
+
b: n[3],
|
|
652
|
+
a: n[4]
|
|
653
|
+
} : (n = J.hsl.exec(e), n ? {
|
|
654
|
+
h: n[1],
|
|
655
|
+
s: n[2],
|
|
656
|
+
l: n[3]
|
|
657
|
+
} : (n = J.hsla.exec(e), n ? {
|
|
658
|
+
h: n[1],
|
|
659
|
+
s: n[2],
|
|
660
|
+
l: n[3],
|
|
661
|
+
a: n[4]
|
|
662
|
+
} : (n = J.hsv.exec(e), n ? {
|
|
663
|
+
h: n[1],
|
|
664
|
+
s: n[2],
|
|
665
|
+
v: n[3]
|
|
666
|
+
} : (n = J.hsva.exec(e), n ? {
|
|
667
|
+
h: n[1],
|
|
668
|
+
s: n[2],
|
|
669
|
+
v: n[3],
|
|
670
|
+
a: n[4]
|
|
671
|
+
} : (n = J.cmyk.exec(e), n ? {
|
|
672
|
+
c: n[1],
|
|
673
|
+
m: n[2],
|
|
674
|
+
y: n[3],
|
|
675
|
+
k: n[4]
|
|
676
|
+
} : !1))))));
|
|
677
|
+
}
|
|
678
|
+
function De(e, t) {
|
|
679
|
+
let n = +!!e.startsWith("#"), r = e.length - n;
|
|
680
|
+
if (r === 6 || r === 8) {
|
|
681
|
+
let i = Y(e, n) * 16 + Y(e, n + 1), a = Y(e, n + 2) * 16 + Y(e, n + 3), o = Y(e, n + 4) * 16 + Y(e, n + 5);
|
|
682
|
+
if (r === 6) return Number.isNaN(i + a + o) ? void 0 : {
|
|
683
|
+
r: i,
|
|
684
|
+
g: a,
|
|
685
|
+
b: o,
|
|
686
|
+
format: t ? "name" : "hex"
|
|
687
|
+
};
|
|
688
|
+
let s = Y(e, n + 6) * 16 + Y(e, n + 7);
|
|
689
|
+
return Number.isNaN(i + a + o + s) ? void 0 : {
|
|
690
|
+
r: i,
|
|
691
|
+
g: a,
|
|
692
|
+
b: o,
|
|
693
|
+
a: s / 255,
|
|
694
|
+
format: t ? "name" : "hex8"
|
|
695
|
+
};
|
|
696
|
+
}
|
|
697
|
+
if (r === 3 || r === 4) {
|
|
698
|
+
let i = Y(e, n) * 17, a = Y(e, n + 1) * 17, o = Y(e, n + 2) * 17;
|
|
699
|
+
if (r === 3) return Number.isNaN(i + a + o) ? void 0 : {
|
|
700
|
+
r: i,
|
|
701
|
+
g: a,
|
|
702
|
+
b: o,
|
|
703
|
+
format: t ? "name" : "hex"
|
|
704
|
+
};
|
|
705
|
+
let s = Y(e, n + 3) * 17;
|
|
706
|
+
return Number.isNaN(i + a + o + s) ? void 0 : {
|
|
707
|
+
r: i,
|
|
708
|
+
g: a,
|
|
709
|
+
b: o,
|
|
710
|
+
a: s / 255,
|
|
711
|
+
format: t ? "name" : "hex8"
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
function Y(e, t) {
|
|
716
|
+
let n = e.charCodeAt(t);
|
|
717
|
+
return n >= 48 && n <= 57 ? n - 48 : n >= 97 && n <= 102 ? n - 87 : n >= 65 && n <= 70 ? n - 55 : NaN;
|
|
718
|
+
}
|
|
719
|
+
function X(e) {
|
|
720
|
+
return typeof e == "number" ? !Number.isNaN(e) : e !== void 0 && J.CSS_UNIT.test(e);
|
|
721
|
+
}
|
|
722
|
+
// ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.2/node_modules/@ctrl/tinycolor/dist/module/index.js
|
|
723
|
+
var Oe = class e {
|
|
724
|
+
constructor(t = "", n = {}) {
|
|
725
|
+
if (t instanceof e) return t;
|
|
726
|
+
typeof t == "number" && (t = we(t)), this.originalInput = t;
|
|
727
|
+
let r = Te(t);
|
|
728
|
+
this.originalInput = t, this.r = r.r, this.g = r.g, this.b = r.b, this.a = r.a, this.roundA = Math.round(100 * this.a) / 100, this.format = n.format ?? r.format, this.gradientType = n.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = r.ok;
|
|
729
|
+
}
|
|
730
|
+
isDark() {
|
|
731
|
+
return this.getBrightness() < 128;
|
|
732
|
+
}
|
|
733
|
+
isLight() {
|
|
734
|
+
return !this.isDark();
|
|
735
|
+
}
|
|
736
|
+
getBrightness() {
|
|
737
|
+
let e = this.toRgb();
|
|
738
|
+
return (e.r * 299 + e.g * 587 + e.b * 114) / 1e3;
|
|
739
|
+
}
|
|
740
|
+
getLuminance() {
|
|
741
|
+
let e = this.toRgb(), t, n, r, i = e.r / 255, a = e.g / 255, o = e.b / 255;
|
|
742
|
+
return t = i <= .03928 ? i / 12.92 : ((i + .055) / 1.055) ** 2.4, n = a <= .03928 ? a / 12.92 : ((a + .055) / 1.055) ** 2.4, r = o <= .03928 ? o / 12.92 : ((o + .055) / 1.055) ** 2.4, .2126 * t + .7152 * n + .0722 * r;
|
|
743
|
+
}
|
|
744
|
+
getAlpha() {
|
|
745
|
+
return this.a;
|
|
746
|
+
}
|
|
747
|
+
setAlpha(e) {
|
|
748
|
+
return this.a = F(e), this.roundA = Math.round(100 * this.a) / 100, this;
|
|
749
|
+
}
|
|
750
|
+
isMonochrome() {
|
|
751
|
+
let { s: e } = this.toHsl();
|
|
752
|
+
return e === 0;
|
|
753
|
+
}
|
|
754
|
+
toHsv() {
|
|
755
|
+
let e = z(this.r, this.g, this.b);
|
|
756
|
+
return {
|
|
757
|
+
h: e.h * 360,
|
|
758
|
+
s: e.s,
|
|
759
|
+
v: e.v,
|
|
760
|
+
a: this.a
|
|
761
|
+
};
|
|
762
|
+
}
|
|
763
|
+
toHsvString() {
|
|
764
|
+
let e = z(this.r, this.g, this.b), t = Math.round(e.h * 360), n = Math.round(e.s * 100), r = Math.round(e.v * 100);
|
|
765
|
+
return this.a === 1 ? `hsv(${t}, ${n}%, ${r}%)` : `hsva(${t}, ${n}%, ${r}%, ${this.roundA})`;
|
|
766
|
+
}
|
|
767
|
+
toHsl() {
|
|
768
|
+
let e = L(this.r, this.g, this.b);
|
|
769
|
+
return {
|
|
770
|
+
h: e.h * 360,
|
|
771
|
+
s: e.s,
|
|
772
|
+
l: e.l,
|
|
773
|
+
a: this.a
|
|
774
|
+
};
|
|
775
|
+
}
|
|
776
|
+
toHslString() {
|
|
777
|
+
let e = L(this.r, this.g, this.b), t = Math.round(e.h * 360), n = Math.round(e.s * 100), r = Math.round(e.l * 100);
|
|
778
|
+
return this.a === 1 ? `hsl(${t}, ${n}%, ${r}%)` : `hsla(${t}, ${n}%, ${r}%, ${this.roundA})`;
|
|
779
|
+
}
|
|
780
|
+
toHex(e = !1) {
|
|
781
|
+
return H(this.r, this.g, this.b, e);
|
|
782
|
+
}
|
|
783
|
+
toHexString(e = !1) {
|
|
784
|
+
return "#" + this.toHex(e);
|
|
785
|
+
}
|
|
786
|
+
toHex8(e = !1) {
|
|
787
|
+
return Se(this.r, this.g, this.b, this.a, e);
|
|
788
|
+
}
|
|
789
|
+
toHex8String(e = !1) {
|
|
790
|
+
return "#" + this.toHex8(e);
|
|
791
|
+
}
|
|
792
|
+
toHexShortString(e = !1) {
|
|
793
|
+
return this.a === 1 ? this.toHexString(e) : this.toHex8String(e);
|
|
794
|
+
}
|
|
795
|
+
toRgb() {
|
|
796
|
+
return {
|
|
797
|
+
r: Math.round(this.r),
|
|
798
|
+
g: Math.round(this.g),
|
|
799
|
+
b: Math.round(this.b),
|
|
800
|
+
a: this.a
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
toRgbString() {
|
|
804
|
+
let e = Math.round(this.r), t = Math.round(this.g), n = Math.round(this.b);
|
|
805
|
+
return this.a === 1 ? `rgb(${e}, ${t}, ${n})` : `rgba(${e}, ${t}, ${n}, ${this.roundA})`;
|
|
806
|
+
}
|
|
807
|
+
toPercentageRgb() {
|
|
808
|
+
let e = (e) => `${Math.round(M(e, 255) * 100)}%`;
|
|
809
|
+
return {
|
|
810
|
+
r: e(this.r),
|
|
811
|
+
g: e(this.g),
|
|
812
|
+
b: e(this.b),
|
|
813
|
+
a: this.a
|
|
814
|
+
};
|
|
815
|
+
}
|
|
816
|
+
toPercentageRgbString() {
|
|
817
|
+
let e = (e) => Math.round(M(e, 255) * 100);
|
|
818
|
+
return this.a === 1 ? `rgb(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%)` : `rgba(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%, ${this.roundA})`;
|
|
819
|
+
}
|
|
820
|
+
toCmyk() {
|
|
821
|
+
return { ...U(this.r, this.g, this.b) };
|
|
822
|
+
}
|
|
823
|
+
toCmykString() {
|
|
824
|
+
let { c: e, m: t, y: n, k: r } = U(this.r, this.g, this.b);
|
|
825
|
+
return `cmyk(${e}, ${t}, ${n}, ${r})`;
|
|
826
|
+
}
|
|
827
|
+
toName() {
|
|
828
|
+
if (this.a === 0) return "transparent";
|
|
829
|
+
if (this.a < 1) return !1;
|
|
830
|
+
let e = "#" + H(this.r, this.g, this.b, !1), t = W;
|
|
831
|
+
for (let n in t) if (Object.prototype.hasOwnProperty.call(t, n) && t[n] === e) return n;
|
|
832
|
+
return !1;
|
|
833
|
+
}
|
|
834
|
+
toString(e) {
|
|
835
|
+
let t = !!e;
|
|
836
|
+
e ??= this.format;
|
|
837
|
+
let n = !1, r = this.a < 1 && this.a >= 0;
|
|
838
|
+
return !t && r && (e.startsWith("hex") || e === "name") ? e === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (e === "rgb" && (n = this.toRgbString()), e === "prgb" && (n = this.toPercentageRgbString()), (e === "hex" || e === "hex6") && (n = this.toHexString()), e === "hex3" && (n = this.toHexString(!0)), e === "hex4" && (n = this.toHex8String(!0)), e === "hex8" && (n = this.toHex8String()), e === "name" && (n = this.toName()), e === "hsl" && (n = this.toHslString()), e === "hsv" && (n = this.toHsvString()), e === "cmyk" && (n = this.toCmykString()), n || this.toHexString());
|
|
839
|
+
}
|
|
840
|
+
toNumber() {
|
|
841
|
+
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
|
|
842
|
+
}
|
|
843
|
+
clone() {
|
|
844
|
+
return new e(this.toString());
|
|
845
|
+
}
|
|
846
|
+
lighten(t = 10) {
|
|
847
|
+
let n = this.toHsl();
|
|
848
|
+
return n.l += t / 100, n.l = N(n.l), new e(n);
|
|
849
|
+
}
|
|
850
|
+
brighten(t = 10) {
|
|
851
|
+
let n = this.toRgb();
|
|
852
|
+
return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(t / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(t / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(t / 100)))), new e(n);
|
|
853
|
+
}
|
|
854
|
+
darken(t = 10) {
|
|
855
|
+
let n = this.toHsl();
|
|
856
|
+
return n.l -= t / 100, n.l = N(n.l), new e(n);
|
|
857
|
+
}
|
|
858
|
+
tint(e = 10) {
|
|
859
|
+
return this.mix("white", e);
|
|
860
|
+
}
|
|
861
|
+
shade(e = 10) {
|
|
862
|
+
return this.mix("black", e);
|
|
863
|
+
}
|
|
864
|
+
desaturate(t = 10) {
|
|
865
|
+
let n = this.toHsl();
|
|
866
|
+
return n.s -= t / 100, n.s = N(n.s), new e(n);
|
|
867
|
+
}
|
|
868
|
+
saturate(t = 10) {
|
|
869
|
+
let n = this.toHsl();
|
|
870
|
+
return n.s += t / 100, n.s = N(n.s), new e(n);
|
|
871
|
+
}
|
|
872
|
+
greyscale() {
|
|
873
|
+
return this.desaturate(100);
|
|
874
|
+
}
|
|
875
|
+
spin(t) {
|
|
876
|
+
let n = this.toHsl(), r = (n.h + t) % 360;
|
|
877
|
+
return n.h = r < 0 ? 360 + r : r, new e(n);
|
|
878
|
+
}
|
|
879
|
+
mix(t, n = 50) {
|
|
880
|
+
let r = this.toRgb(), i = new e(t).toRgb(), a = n / 100, o = {
|
|
881
|
+
r: (i.r - r.r) * a + r.r,
|
|
882
|
+
g: (i.g - r.g) * a + r.g,
|
|
883
|
+
b: (i.b - r.b) * a + r.b,
|
|
884
|
+
a: (i.a - r.a) * a + r.a
|
|
885
|
+
};
|
|
886
|
+
return new e(o);
|
|
887
|
+
}
|
|
888
|
+
analogous(t = 6, n = 30) {
|
|
889
|
+
let r = this.toHsl(), i = 360 / n, a = [this];
|
|
890
|
+
for (r.h = (r.h - (i * t >> 1) + 720) % 360; --t;) r.h = (r.h + i) % 360, a.push(new e(r));
|
|
891
|
+
return a;
|
|
892
|
+
}
|
|
893
|
+
complement() {
|
|
894
|
+
let t = this.toHsl();
|
|
895
|
+
return t.h = (t.h + 180) % 360, new e(t);
|
|
896
|
+
}
|
|
897
|
+
monochromatic(t = 6) {
|
|
898
|
+
let n = this.toHsv(), { h: r } = n, { s: i } = n, { v: a } = n, o = [], s = 1 / t;
|
|
899
|
+
for (; t--;) o.push(new e({
|
|
900
|
+
h: r,
|
|
901
|
+
s: i,
|
|
902
|
+
v: a
|
|
903
|
+
})), a = (a + s) % 1;
|
|
904
|
+
return o;
|
|
905
|
+
}
|
|
906
|
+
splitcomplement() {
|
|
907
|
+
let t = this.toHsl(), { h: n } = t;
|
|
908
|
+
return [
|
|
909
|
+
this,
|
|
910
|
+
new e({
|
|
911
|
+
h: (n + 72) % 360,
|
|
912
|
+
s: t.s,
|
|
913
|
+
l: t.l
|
|
914
|
+
}),
|
|
915
|
+
new e({
|
|
916
|
+
h: (n + 216) % 360,
|
|
917
|
+
s: t.s,
|
|
918
|
+
l: t.l
|
|
919
|
+
})
|
|
920
|
+
];
|
|
921
|
+
}
|
|
922
|
+
onBackground(t) {
|
|
923
|
+
let n = this.toRgb(), r = new e(t).toRgb(), i = n.a + r.a * (1 - n.a);
|
|
924
|
+
return new e({
|
|
925
|
+
r: (n.r * n.a + r.r * r.a * (1 - n.a)) / i,
|
|
926
|
+
g: (n.g * n.a + r.g * r.a * (1 - n.a)) / i,
|
|
927
|
+
b: (n.b * n.a + r.b * r.a * (1 - n.a)) / i,
|
|
928
|
+
a: i
|
|
929
|
+
});
|
|
930
|
+
}
|
|
931
|
+
triad() {
|
|
932
|
+
return this.polyad(3);
|
|
933
|
+
}
|
|
934
|
+
tetrad() {
|
|
935
|
+
return this.polyad(4);
|
|
936
|
+
}
|
|
937
|
+
polyad(t) {
|
|
938
|
+
let n = this.toHsl(), { h: r } = n, i = [this], a = 360 / t;
|
|
939
|
+
for (let o = 1; o < t; o++) i.push(new e({
|
|
940
|
+
h: (r + o * a) % 360,
|
|
941
|
+
s: n.s,
|
|
942
|
+
l: n.l
|
|
943
|
+
}));
|
|
944
|
+
return i;
|
|
945
|
+
}
|
|
946
|
+
equals(t) {
|
|
947
|
+
let n = new e(t);
|
|
948
|
+
return this.format === "cmyk" || n.format === "cmyk" ? this.toCmykString() === n.toCmykString() : this.toRgbString() === n.toRgbString();
|
|
949
|
+
}
|
|
950
|
+
}, Z = [
|
|
951
|
+
"#458FFF",
|
|
952
|
+
"#45D9A3",
|
|
953
|
+
"#FFC145",
|
|
954
|
+
"#F5654F",
|
|
955
|
+
"#6A6AFD",
|
|
956
|
+
"#6ED1FF",
|
|
957
|
+
"#008787",
|
|
958
|
+
"#FF9245",
|
|
959
|
+
"#F587B3",
|
|
960
|
+
"#8352CC",
|
|
961
|
+
"#65779B"
|
|
962
|
+
], ke = [
|
|
963
|
+
"#458FFF",
|
|
964
|
+
"#C8DEFF",
|
|
965
|
+
"#45D9A3",
|
|
966
|
+
"#C8F4E4",
|
|
967
|
+
"#FFC145",
|
|
968
|
+
"#FFEDC8",
|
|
969
|
+
"#F5654F",
|
|
970
|
+
"#FCD1CB",
|
|
971
|
+
"#6A6AFD",
|
|
972
|
+
"#D3D3FE",
|
|
973
|
+
"#6ED1FF",
|
|
974
|
+
"#D3D3FE",
|
|
975
|
+
"#008787",
|
|
976
|
+
"#B3DBDB",
|
|
977
|
+
"#FF9245",
|
|
978
|
+
"#FFDFC8",
|
|
979
|
+
"#F587B3",
|
|
980
|
+
"#FCDBE8",
|
|
981
|
+
"#8352CC",
|
|
982
|
+
"#FCDBE8",
|
|
983
|
+
"#65779B",
|
|
984
|
+
"#65779B"
|
|
985
|
+
], Ae = [
|
|
986
|
+
"#8C1604",
|
|
987
|
+
"#DB4C35",
|
|
988
|
+
"#FF9245",
|
|
989
|
+
"#FFC145",
|
|
990
|
+
"#689FFF",
|
|
991
|
+
"#45D9A3",
|
|
992
|
+
"#99ACD1"
|
|
993
|
+
], Q = {
|
|
994
|
+
color: Z,
|
|
995
|
+
textStyle: {
|
|
996
|
+
color: "#6F7785",
|
|
997
|
+
fontSize: "12px"
|
|
998
|
+
},
|
|
999
|
+
bar: {
|
|
1000
|
+
barGap: .2,
|
|
1001
|
+
barWidth: 10,
|
|
1002
|
+
label: {
|
|
1003
|
+
color: "#6F7785",
|
|
1004
|
+
position: "top"
|
|
1005
|
+
}
|
|
1006
|
+
},
|
|
1007
|
+
line: { label: {
|
|
1008
|
+
color: "#6F7785",
|
|
1009
|
+
position: "top"
|
|
1010
|
+
} },
|
|
1011
|
+
pie: {
|
|
1012
|
+
avoidLabelOverlap: !1,
|
|
1013
|
+
radius: ["70%", "80%"],
|
|
1014
|
+
itemStyle: {
|
|
1015
|
+
borderWidth: 1,
|
|
1016
|
+
borderColor: "#fff"
|
|
1017
|
+
},
|
|
1018
|
+
label: {
|
|
1019
|
+
show: !1,
|
|
1020
|
+
color: "#2F3540",
|
|
1021
|
+
formatter: "{c}",
|
|
1022
|
+
position: "inside"
|
|
1023
|
+
}
|
|
1024
|
+
},
|
|
1025
|
+
legend: {
|
|
1026
|
+
itemWidth: 12,
|
|
1027
|
+
itemHeight: 12,
|
|
1028
|
+
inactiveColor: "#BEC3CC",
|
|
1029
|
+
textStyle: {
|
|
1030
|
+
color: "#6F7785",
|
|
1031
|
+
fontSize: "12px"
|
|
1032
|
+
}
|
|
1033
|
+
},
|
|
1034
|
+
title: {
|
|
1035
|
+
itemGap: 4,
|
|
1036
|
+
textStyle: {
|
|
1037
|
+
color: "#2F3540",
|
|
1038
|
+
fontSize: "12px",
|
|
1039
|
+
fontWeight: 500
|
|
1040
|
+
},
|
|
1041
|
+
subtextStyle: {
|
|
1042
|
+
color: "#6F7785",
|
|
1043
|
+
fontSize: "12px"
|
|
1044
|
+
}
|
|
1045
|
+
},
|
|
1046
|
+
tooltip: {
|
|
1047
|
+
borderWidth: 0,
|
|
1048
|
+
padding: 12,
|
|
1049
|
+
textStyle: { color: "#2F3540" },
|
|
1050
|
+
axisPointer: {
|
|
1051
|
+
z: 1,
|
|
1052
|
+
lineStyle: {
|
|
1053
|
+
type: "solid",
|
|
1054
|
+
color: "#E1E5EB"
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
},
|
|
1058
|
+
categoryAxis: {
|
|
1059
|
+
axisLine: {
|
|
1060
|
+
show: !0,
|
|
1061
|
+
lineStyle: { color: "#EDF1F7" }
|
|
1062
|
+
},
|
|
1063
|
+
axisTick: {
|
|
1064
|
+
show: !0,
|
|
1065
|
+
alignWithLabel: !0,
|
|
1066
|
+
lineStyle: { color: "#EDF1F7" }
|
|
1067
|
+
},
|
|
1068
|
+
axisLabel: { color: "#6F7785" },
|
|
1069
|
+
splitLine: { show: !1 },
|
|
1070
|
+
splitArea: { show: !1 }
|
|
1071
|
+
},
|
|
1072
|
+
valueAxis: {
|
|
1073
|
+
axisLine: { show: !1 },
|
|
1074
|
+
axisTick: { show: !1 },
|
|
1075
|
+
axisLabel: { color: "#6F7785" },
|
|
1076
|
+
splitLine: { lineStyle: { color: "#EDF1F7" } },
|
|
1077
|
+
splitArea: { show: !1 },
|
|
1078
|
+
nameTextStyle: {
|
|
1079
|
+
color: "#6F7785",
|
|
1080
|
+
padding: [
|
|
1081
|
+
0,
|
|
1082
|
+
30,
|
|
1083
|
+
-4,
|
|
1084
|
+
0
|
|
1085
|
+
]
|
|
1086
|
+
}
|
|
1087
|
+
},
|
|
1088
|
+
dataZoom: { height: 16 }
|
|
922
1089
|
};
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
function
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
1090
|
+
// utils/index.ts
|
|
1091
|
+
function je(e) {
|
|
1092
|
+
return !!(e && e.xAxis && e.xAxis.data);
|
|
1093
|
+
}
|
|
1094
|
+
function Me(e, t) {
|
|
1095
|
+
return f ? {
|
|
1096
|
+
attrs: { ...e },
|
|
1097
|
+
on: { ...t }
|
|
1098
|
+
} : { ...e };
|
|
1099
|
+
}
|
|
1100
|
+
function Ne(e) {
|
|
1101
|
+
return Object.entries(e).reduce((e, [t, n]) => (n !== void 0 && (e[t] = n), e), {});
|
|
1102
|
+
}
|
|
1103
|
+
function Pe(e) {
|
|
1104
|
+
return ie(e) ? [] : Array.isArray(e) ? e : [e];
|
|
1105
|
+
}
|
|
1106
|
+
var Fe = (e, t) => new Oe(e).setAlpha(t).toRgbString();
|
|
1107
|
+
function $(e, t) {
|
|
1108
|
+
return x(t), b("seer", Q), e.install = (t) => {
|
|
1109
|
+
t.component(e.name, e);
|
|
1110
|
+
}, e;
|
|
1111
|
+
}
|
|
1112
|
+
// components/index.ts
|
|
1113
|
+
var Ie = $(me, [
|
|
1114
|
+
e,
|
|
1115
|
+
n,
|
|
1116
|
+
t,
|
|
1117
|
+
r,
|
|
1118
|
+
i,
|
|
1119
|
+
a,
|
|
1120
|
+
o,
|
|
1121
|
+
s
|
|
952
1122
|
]);
|
|
953
|
-
|
|
954
|
-
export {
|
|
955
|
-
ae as IxChart,
|
|
956
|
-
ne as convertArray,
|
|
957
|
-
jt as createInstall,
|
|
958
|
-
re as filterEmptyProps,
|
|
959
|
-
ie as getAlphaColor,
|
|
960
|
-
te as isVertical,
|
|
961
|
-
ee as mergeAttrs,
|
|
962
|
-
Pt as seerColors,
|
|
963
|
-
Kt as seerColorsForMore,
|
|
964
|
-
Qt as seerColorsForRisk,
|
|
965
|
-
Wt as seerTheme,
|
|
966
|
-
Ft as useChart,
|
|
967
|
-
wt as useStripe,
|
|
968
|
-
Jt as useStripeArea,
|
|
969
|
-
Yt as useStripeBarSeries,
|
|
970
|
-
Xt as useStripeBarTooltip,
|
|
971
|
-
At as useTooltipsFormatter
|
|
972
|
-
};
|
|
1123
|
+
export { Ie as IxChart, Pe as convertArray, $ as createInstall, Ne as filterEmptyProps, Fe as getAlphaColor, je as isVertical, Me as mergeAttrs, Z as seerColors, ke as seerColorsForMore, Ae as seerColorsForRisk, Q as seerTheme, E as useChart, A as useReactiveAttrs, k as useStripe, fe as useStripeArea, de as useStripeBarSeries, ue as useStripeBarTooltip, O as useTooltipsFormatter, j as withChartProps };
|