@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/dist/index.js CHANGED
@@ -1,972 +1,1123 @@
1
- import { DataZoomComponent as tt, LegendComponent as et, GridComponent as rt, TitleComponent as nt, TooltipComponent as it } from "echarts/components";
2
- import { LabelLayout as at, UniversalTransition as ot } from "echarts/features";
3
- import { SVGRenderer as st } from "echarts/renderers";
4
- import { watch as O, shallowRef as k, computed as x, unref as b, onMounted as ft, onBeforeUnmount as ht, watchEffect as N, isVue2 as _, defineComponent as ut, h as ct } from "vue-demi";
5
- import { throttle as lt, use as Z, init as dt, registerTheme as gt } from "echarts/core";
6
- import { isEqual as pt, cloneDeep as P, isBoolean as bt, isNil as vt } from "lodash-es";
7
- import { PictorialBarChart as mt } from "echarts/charts";
8
- function yt(e, t, r) {
9
- let n;
10
- O(
11
- [e, t, r],
12
- ([i, a, o], s, f) => {
13
- !i || !a || (o ? (n ?? (n = lt(() => a.resize(), 16)), xt(i, n)) : W(i, n), f(() => W(i, n)));
14
- }
15
- );
16
- }
17
- const F = /* @__PURE__ */ new Map();
18
- function xt(e, t, r) {
19
- if (!(!e || !t))
20
- if (F.has(e))
21
- F.get(e).listeners.push(t);
22
- else {
23
- const n = [t], i = new ResizeObserver((a) => {
24
- a.forEach((o) => n.forEach((s) => s(o)));
25
- });
26
- i.observe(e, r), F.set(e, { listeners: n, ro: i });
27
- }
28
- }
29
- function W(e, t) {
30
- if (!e || !t || !F.has(e))
31
- return;
32
- const { listeners: r, ro: n } = F.get(e), i = r.indexOf(t);
33
- i > -1 && (r.splice(i, 1), r.length === 0 && (n.disconnect(), F.delete(e)));
34
- }
35
- Z([mt]);
36
- const j = { text: "加载中..." };
37
- function Ft(e, t) {
38
- const r = k(), n = k(), i = k(), a = x(() => b(e).autoResize ?? !0), o = x(() => b(e).group), s = x(() => b(e).initOption), f = x(() => b(e).loading), p = x(() => b(e).setOptionOpts), S = x(() => b(e).theme ?? "seer"), M = () => {
39
- const l = r.value;
40
- if (!l)
41
- return;
42
- const c = dt(l, S.value, s.value), y = b(e), { restOptions: D, events: J } = G(y, t, !1);
43
- c.setOption(D, p.value), i.value = P(D), J.forEach(([z, L, K]) => {
44
- let R = L;
45
- K && (R = (...Q) => {
46
- L(...Q), c.off(z, R);
47
- }), c.on(z, R);
48
- });
49
- const I = y.onReady || (t == null ? void 0 : t.ready);
50
- I && I(c), n.value = c;
51
- }, B = () => {
52
- n.value && (n.value.dispose(), n.value = void 0);
53
- };
54
- return ft(() => M()), ht(() => B()), O(
55
- () => b(e),
56
- (l) => {
57
- const c = n.value;
58
- if (!c)
59
- return;
60
- const { restOptions: y } = G(l);
61
- pt(y, i.value) || (c.setOption(y, p.value), i.value = P(y));
62
- },
63
- {
64
- deep: !0
65
- }
66
- ), O([S, s], () => {
67
- B(), M();
68
- }), N(() => {
69
- const l = o.value;
70
- l && n.value && (n.value.group = l);
71
- }), N(() => {
72
- const l = n.value;
73
- if (!l)
74
- return;
75
- const c = f.value;
76
- c ? l.showLoading(bt(c) ? j : { ...j, ...c }) : l.hideLoading();
77
- }), yt(r, n, a), { containerRef: r, chartRef: n };
78
- }
79
- function St(e) {
80
- return /^on[^a-z]/.test(e);
81
- }
82
- const Mt = [
83
- "class",
84
- "style",
85
- "autoResize",
86
- "group",
87
- "loading",
88
- "setOptionOpts",
89
- "theme",
90
- "onReady"
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 G(e, t = {}, r = !0) {
93
- const n = {}, i = [];
94
- return Object.keys(e).forEach((a) => {
95
- if (!Mt.includes(a)) {
96
- if (St(a)) {
97
- if (r)
98
- return;
99
- const o = e[a];
100
- if (o) {
101
- const s = a.endsWith("Once"), f = s ? a.length - 4 : void 0, p = a.charAt(2).toLowerCase() + a.substring(3, f);
102
- i.push([p, o, s]);
103
- }
104
- return;
105
- }
106
- n[a] = e[a];
107
- }
108
- }), _ && !r && Object.keys(t).forEach((a) => {
109
- if (a !== "ready")
110
- return;
111
- const o = t[a];
112
- if (o) {
113
- const s = a.startsWith("~"), f = s ? 1 : 0, p = a.substring(f);
114
- i.push([p, o, s]);
115
- }
116
- }), { restOptions: n, events: i };
117
- }
118
- function At(e, t) {
119
- return `
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((r) => `
153
+ ${t.map((e) => `
123
154
  <div class="charts-tooltips-item">
124
- <span class="charts-tooltips-item-border" style="background: ${r.color}"></span>
125
- <span class="charts-tooltips-item-name">${r.name}</span>
126
- <span class="charts-tooltips-item-value">${r.value}</span>
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
- function wt({
131
- data: e = [],
132
- color: t = "",
133
- offset: r = [0, 0],
134
- rotate: n = -20,
135
- size: i = [2, 8]
136
- }) {
137
- return {
138
- // 分隔线
139
- name: "",
140
- data: e,
141
- // @ts-ignore
142
- type: "pictorialBar",
143
- symbolRotate: n,
144
- silent: !0,
145
- itemStyle: {
146
- color: t,
147
- opacity: 0
148
- },
149
- emphasis: {
150
- itemStyle: {
151
- opacity: 1
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
- return Math.min(1, Math.max(0, e));
257
- }
258
- function Rt(e) {
259
- return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
260
- }
261
- function kt(e) {
262
- return typeof e == "string" && e.indexOf("%") !== -1;
263
- }
264
- function Y(e) {
265
- return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
266
- }
267
- function w(e) {
268
- return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
269
- }
270
- function m(e) {
271
- return e.length === 1 ? "0" + e : String(e);
272
- }
273
- function Ht(e, t, r) {
274
- return {
275
- r: h(e, 255) * 255,
276
- g: h(t, 255) * 255,
277
- b: h(r, 255) * 255
278
- };
279
- }
280
- function $(e, t, r) {
281
- e = h(e, 255), t = h(t, 255), r = h(r, 255);
282
- var n = Math.max(e, t, r), i = Math.min(e, t, r), a = 0, o = 0, s = (n + i) / 2;
283
- if (n === i)
284
- o = 0, a = 0;
285
- else {
286
- var f = n - i;
287
- switch (o = s > 0.5 ? f / (2 - n - i) : f / (n + i), n) {
288
- case e:
289
- a = (t - r) / f + (t < r ? 6 : 0);
290
- break;
291
- case t:
292
- a = (r - e) / f + 2;
293
- break;
294
- case r:
295
- a = (e - t) / f + 4;
296
- break;
297
- }
298
- a /= 6;
299
- }
300
- return { h: a, s: o, l: s };
301
- }
302
- function H(e, t, r) {
303
- return r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? e + (t - e) * (6 * r) : r < 1 / 2 ? t : r < 2 / 3 ? e + (t - e) * (2 / 3 - r) * 6 : e;
304
- }
305
- function Ct(e, t, r) {
306
- var n, i, a;
307
- if (e = h(e, 360), t = h(t, 100), r = h(r, 100), t === 0)
308
- i = r, a = r, n = r;
309
- else {
310
- var o = r < 0.5 ? r * (1 + t) : r + t - r * t, s = 2 * r - o;
311
- n = H(s, o, e + 1 / 3), i = H(s, o, e), a = H(s, o, e - 1 / 3);
312
- }
313
- return { r: n * 255, g: i * 255, b: a * 255 };
314
- }
315
- function q(e, t, r) {
316
- e = h(e, 255), t = h(t, 255), r = h(r, 255);
317
- var n = Math.max(e, t, r), i = Math.min(e, t, r), a = 0, o = n, s = n - i, f = n === 0 ? 0 : s / n;
318
- if (n === i)
319
- a = 0;
320
- else {
321
- switch (n) {
322
- case e:
323
- a = (t - r) / s + (t < r ? 6 : 0);
324
- break;
325
- case t:
326
- a = (r - e) / s + 2;
327
- break;
328
- case r:
329
- a = (e - t) / s + 4;
330
- break;
331
- }
332
- a /= 6;
333
- }
334
- return { h: a, s: f, v: o };
335
- }
336
- function Et(e, t, r) {
337
- e = h(e, 360) * 6, t = h(t, 100), r = h(r, 100);
338
- var n = Math.floor(e), i = e - n, a = r * (1 - t), o = r * (1 - i * t), s = r * (1 - (1 - i) * t), f = n % 6, p = [r, o, a, a, s, r][f], S = [s, r, r, o, a, a][f], M = [a, a, s, r, r, o][f];
339
- return { r: p * 255, g: S * 255, b: M * 255 };
340
- }
341
- function U(e, t, r, n) {
342
- var i = [
343
- m(Math.round(e).toString(16)),
344
- m(Math.round(t).toString(16)),
345
- m(Math.round(r).toString(16))
346
- ];
347
- return n && i[0].startsWith(i[0].charAt(1)) && i[1].startsWith(i[1].charAt(1)) && i[2].startsWith(i[2].charAt(1)) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) : i.join("");
348
- }
349
- function Ot(e, t, r, n, i) {
350
- var a = [
351
- m(Math.round(e).toString(16)),
352
- m(Math.round(t).toString(16)),
353
- m(Math.round(r).toString(16)),
354
- m(Tt(n))
355
- ];
356
- return i && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) && a[3].startsWith(a[3].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
357
- }
358
- function Tt(e) {
359
- return Math.round(parseFloat(e) * 255).toString(16);
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
- return u(e) / 255;
363
- }
364
- function u(e) {
365
- return parseInt(e, 16);
366
- }
367
- function Bt(e) {
368
- return {
369
- r: e >> 16,
370
- g: (e & 65280) >> 8,
371
- b: e & 255
372
- };
373
- }
374
- var T = {
375
- aliceblue: "#f0f8ff",
376
- antiquewhite: "#faebd7",
377
- aqua: "#00ffff",
378
- aquamarine: "#7fffd4",
379
- azure: "#f0ffff",
380
- beige: "#f5f5dc",
381
- bisque: "#ffe4c4",
382
- black: "#000000",
383
- blanchedalmond: "#ffebcd",
384
- blue: "#0000ff",
385
- blueviolet: "#8a2be2",
386
- brown: "#a52a2a",
387
- burlywood: "#deb887",
388
- cadetblue: "#5f9ea0",
389
- chartreuse: "#7fff00",
390
- chocolate: "#d2691e",
391
- coral: "#ff7f50",
392
- cornflowerblue: "#6495ed",
393
- cornsilk: "#fff8dc",
394
- crimson: "#dc143c",
395
- cyan: "#00ffff",
396
- darkblue: "#00008b",
397
- darkcyan: "#008b8b",
398
- darkgoldenrod: "#b8860b",
399
- darkgray: "#a9a9a9",
400
- darkgreen: "#006400",
401
- darkgrey: "#a9a9a9",
402
- darkkhaki: "#bdb76b",
403
- darkmagenta: "#8b008b",
404
- darkolivegreen: "#556b2f",
405
- darkorange: "#ff8c00",
406
- darkorchid: "#9932cc",
407
- darkred: "#8b0000",
408
- darksalmon: "#e9967a",
409
- darkseagreen: "#8fbc8f",
410
- darkslateblue: "#483d8b",
411
- darkslategray: "#2f4f4f",
412
- darkslategrey: "#2f4f4f",
413
- darkturquoise: "#00ced1",
414
- darkviolet: "#9400d3",
415
- deeppink: "#ff1493",
416
- deepskyblue: "#00bfff",
417
- dimgray: "#696969",
418
- dimgrey: "#696969",
419
- dodgerblue: "#1e90ff",
420
- firebrick: "#b22222",
421
- floralwhite: "#fffaf0",
422
- forestgreen: "#228b22",
423
- fuchsia: "#ff00ff",
424
- gainsboro: "#dcdcdc",
425
- ghostwhite: "#f8f8ff",
426
- goldenrod: "#daa520",
427
- gold: "#ffd700",
428
- gray: "#808080",
429
- green: "#008000",
430
- greenyellow: "#adff2f",
431
- grey: "#808080",
432
- honeydew: "#f0fff0",
433
- hotpink: "#ff69b4",
434
- indianred: "#cd5c5c",
435
- indigo: "#4b0082",
436
- ivory: "#fffff0",
437
- khaki: "#f0e68c",
438
- lavenderblush: "#fff0f5",
439
- lavender: "#e6e6fa",
440
- lawngreen: "#7cfc00",
441
- lemonchiffon: "#fffacd",
442
- lightblue: "#add8e6",
443
- lightcoral: "#f08080",
444
- lightcyan: "#e0ffff",
445
- lightgoldenrodyellow: "#fafad2",
446
- lightgray: "#d3d3d3",
447
- lightgreen: "#90ee90",
448
- lightgrey: "#d3d3d3",
449
- lightpink: "#ffb6c1",
450
- lightsalmon: "#ffa07a",
451
- lightseagreen: "#20b2aa",
452
- lightskyblue: "#87cefa",
453
- lightslategray: "#778899",
454
- lightslategrey: "#778899",
455
- lightsteelblue: "#b0c4de",
456
- lightyellow: "#ffffe0",
457
- lime: "#00ff00",
458
- limegreen: "#32cd32",
459
- linen: "#faf0e6",
460
- magenta: "#ff00ff",
461
- maroon: "#800000",
462
- mediumaquamarine: "#66cdaa",
463
- mediumblue: "#0000cd",
464
- mediumorchid: "#ba55d3",
465
- mediumpurple: "#9370db",
466
- mediumseagreen: "#3cb371",
467
- mediumslateblue: "#7b68ee",
468
- mediumspringgreen: "#00fa9a",
469
- mediumturquoise: "#48d1cc",
470
- mediumvioletred: "#c71585",
471
- midnightblue: "#191970",
472
- mintcream: "#f5fffa",
473
- mistyrose: "#ffe4e1",
474
- moccasin: "#ffe4b5",
475
- navajowhite: "#ffdead",
476
- navy: "#000080",
477
- oldlace: "#fdf5e6",
478
- olive: "#808000",
479
- olivedrab: "#6b8e23",
480
- orange: "#ffa500",
481
- orangered: "#ff4500",
482
- orchid: "#da70d6",
483
- palegoldenrod: "#eee8aa",
484
- palegreen: "#98fb98",
485
- paleturquoise: "#afeeee",
486
- palevioletred: "#db7093",
487
- papayawhip: "#ffefd5",
488
- peachpuff: "#ffdab9",
489
- peru: "#cd853f",
490
- pink: "#ffc0cb",
491
- plum: "#dda0dd",
492
- powderblue: "#b0e0e6",
493
- purple: "#800080",
494
- rebeccapurple: "#663399",
495
- red: "#ff0000",
496
- rosybrown: "#bc8f8f",
497
- royalblue: "#4169e1",
498
- saddlebrown: "#8b4513",
499
- salmon: "#fa8072",
500
- sandybrown: "#f4a460",
501
- seagreen: "#2e8b57",
502
- seashell: "#fff5ee",
503
- sienna: "#a0522d",
504
- silver: "#c0c0c0",
505
- skyblue: "#87ceeb",
506
- slateblue: "#6a5acd",
507
- slategray: "#708090",
508
- slategrey: "#708090",
509
- snow: "#fffafa",
510
- springgreen: "#00ff7f",
511
- steelblue: "#4682b4",
512
- tan: "#d2b48c",
513
- teal: "#008080",
514
- thistle: "#d8bfd8",
515
- tomato: "#ff6347",
516
- turquoise: "#40e0d0",
517
- violet: "#ee82ee",
518
- wheat: "#f5deb3",
519
- white: "#ffffff",
520
- whitesmoke: "#f5f5f5",
521
- yellow: "#ffff00",
522
- yellowgreen: "#9acd32"
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
- function Dt(e) {
525
- var t = { r: 0, g: 0, b: 0 }, r = 1, n = null, i = null, a = null, o = !1, s = !1;
526
- return typeof e == "string" && (e = Lt(e)), typeof e == "object" && (g(e.r) && g(e.g) && g(e.b) ? (t = Ht(e.r, e.g, e.b), o = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : g(e.h) && g(e.s) && g(e.v) ? (n = w(e.s), i = w(e.v), t = Et(e.h, n, i), o = !0, s = "hsv") : g(e.h) && g(e.s) && g(e.l) && (n = w(e.s), a = w(e.l), t = Ct(e.h, n, a), o = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (r = e.a)), r = Y(r), {
527
- ok: o,
528
- format: e.format || s,
529
- r: Math.min(255, Math.max(t.r, 0)),
530
- g: Math.min(255, Math.max(t.g, 0)),
531
- b: Math.min(255, Math.max(t.b, 0)),
532
- a: r
533
- };
534
- }
535
- var It = "[-\\+]?\\d+%?", zt = "[-\\+]?\\d*\\.\\d+%?", v = "(?:".concat(zt, ")|(?:").concat(It, ")"), C = "[\\s|\\(]+(".concat(v, ")[,|\\s]+(").concat(v, ")[,|\\s]+(").concat(v, ")\\s*\\)?"), E = "[\\s|\\(]+(".concat(v, ")[,|\\s]+(").concat(v, ")[,|\\s]+(").concat(v, ")[,|\\s]+(").concat(v, ")\\s*\\)?"), d = {
536
- CSS_UNIT: new RegExp(v),
537
- rgb: new RegExp("rgb" + C),
538
- rgba: new RegExp("rgba" + E),
539
- hsl: new RegExp("hsl" + C),
540
- hsla: new RegExp("hsla" + E),
541
- hsv: new RegExp("hsv" + C),
542
- hsva: new RegExp("hsva" + E),
543
- hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
544
- hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
545
- hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
546
- hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
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 Lt(e) {
549
- if (e = e.trim().toLowerCase(), e.length === 0)
550
- return !1;
551
- var t = !1;
552
- if (T[e])
553
- e = T[e], t = !0;
554
- else if (e === "transparent")
555
- return { r: 0, g: 0, b: 0, a: 0, format: "name" };
556
- var r = d.rgb.exec(e);
557
- return r ? { r: r[1], g: r[2], b: r[3] } : (r = d.rgba.exec(e), r ? { r: r[1], g: r[2], b: r[3], a: r[4] } : (r = d.hsl.exec(e), r ? { h: r[1], s: r[2], l: r[3] } : (r = d.hsla.exec(e), r ? { h: r[1], s: r[2], l: r[3], a: r[4] } : (r = d.hsv.exec(e), r ? { h: r[1], s: r[2], v: r[3] } : (r = d.hsva.exec(e), r ? { h: r[1], s: r[2], v: r[3], a: r[4] } : (r = d.hex8.exec(e), r ? {
558
- r: u(r[1]),
559
- g: u(r[2]),
560
- b: u(r[3]),
561
- a: V(r[4]),
562
- format: t ? "name" : "hex8"
563
- } : (r = d.hex6.exec(e), r ? {
564
- r: u(r[1]),
565
- g: u(r[2]),
566
- b: u(r[3]),
567
- format: t ? "name" : "hex"
568
- } : (r = d.hex4.exec(e), r ? {
569
- r: u(r[1] + r[1]),
570
- g: u(r[2] + r[2]),
571
- b: u(r[3] + r[3]),
572
- a: V(r[4] + r[4]),
573
- format: t ? "name" : "hex8"
574
- } : (r = d.hex3.exec(e), r ? {
575
- r: u(r[1] + r[1]),
576
- g: u(r[2] + r[2]),
577
- b: u(r[3] + r[3]),
578
- format: t ? "name" : "hex"
579
- } : !1)))))))));
580
- }
581
- function g(e) {
582
- return !!d.CSS_UNIT.exec(String(e));
583
- }
584
- var Nt = (
585
- /** @class */
586
- function() {
587
- function e(t, r) {
588
- t === void 0 && (t = ""), r === void 0 && (r = {});
589
- var n;
590
- if (t instanceof e)
591
- return t;
592
- typeof t == "number" && (t = Bt(t)), this.originalInput = t;
593
- var i = Dt(t);
594
- this.originalInput = t, this.r = i.r, this.g = i.g, this.b = i.b, this.a = i.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (n = r.format) !== null && n !== void 0 ? n : i.format, this.gradientType = r.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 = i.ok;
595
- }
596
- return e.prototype.isDark = function() {
597
- return this.getBrightness() < 128;
598
- }, e.prototype.isLight = function() {
599
- return !this.isDark();
600
- }, e.prototype.getBrightness = function() {
601
- var t = this.toRgb();
602
- return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
603
- }, e.prototype.getLuminance = function() {
604
- var t = this.toRgb(), r, n, i, a = t.r / 255, o = t.g / 255, s = t.b / 255;
605
- return a <= 0.03928 ? r = a / 12.92 : r = Math.pow((a + 0.055) / 1.055, 2.4), o <= 0.03928 ? n = o / 12.92 : n = Math.pow((o + 0.055) / 1.055, 2.4), s <= 0.03928 ? i = s / 12.92 : i = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * r + 0.7152 * n + 0.0722 * i;
606
- }, e.prototype.getAlpha = function() {
607
- return this.a;
608
- }, e.prototype.setAlpha = function(t) {
609
- return this.a = Y(t), this.roundA = Math.round(100 * this.a) / 100, this;
610
- }, e.prototype.isMonochrome = function() {
611
- var t = this.toHsl().s;
612
- return t === 0;
613
- }, e.prototype.toHsv = function() {
614
- var t = q(this.r, this.g, this.b);
615
- return { h: t.h * 360, s: t.s, v: t.v, a: this.a };
616
- }, e.prototype.toHsvString = function() {
617
- var t = q(this.r, this.g, this.b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), i = Math.round(t.v * 100);
618
- return this.a === 1 ? "hsv(".concat(r, ", ").concat(n, "%, ").concat(i, "%)") : "hsva(".concat(r, ", ").concat(n, "%, ").concat(i, "%, ").concat(this.roundA, ")");
619
- }, e.prototype.toHsl = function() {
620
- var t = $(this.r, this.g, this.b);
621
- return { h: t.h * 360, s: t.s, l: t.l, a: this.a };
622
- }, e.prototype.toHslString = function() {
623
- var t = $(this.r, this.g, this.b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), i = Math.round(t.l * 100);
624
- return this.a === 1 ? "hsl(".concat(r, ", ").concat(n, "%, ").concat(i, "%)") : "hsla(".concat(r, ", ").concat(n, "%, ").concat(i, "%, ").concat(this.roundA, ")");
625
- }, e.prototype.toHex = function(t) {
626
- return t === void 0 && (t = !1), U(this.r, this.g, this.b, t);
627
- }, e.prototype.toHexString = function(t) {
628
- return t === void 0 && (t = !1), "#" + this.toHex(t);
629
- }, e.prototype.toHex8 = function(t) {
630
- return t === void 0 && (t = !1), Ot(this.r, this.g, this.b, this.a, t);
631
- }, e.prototype.toHex8String = function(t) {
632
- return t === void 0 && (t = !1), "#" + this.toHex8(t);
633
- }, e.prototype.toHexShortString = function(t) {
634
- return t === void 0 && (t = !1), this.a === 1 ? this.toHexString(t) : this.toHex8String(t);
635
- }, e.prototype.toRgb = function() {
636
- return {
637
- r: Math.round(this.r),
638
- g: Math.round(this.g),
639
- b: Math.round(this.b),
640
- a: this.a
641
- };
642
- }, e.prototype.toRgbString = function() {
643
- var t = Math.round(this.r), r = Math.round(this.g), n = Math.round(this.b);
644
- return this.a === 1 ? "rgb(".concat(t, ", ").concat(r, ", ").concat(n, ")") : "rgba(".concat(t, ", ").concat(r, ", ").concat(n, ", ").concat(this.roundA, ")");
645
- }, e.prototype.toPercentageRgb = function() {
646
- var t = function(r) {
647
- return "".concat(Math.round(h(r, 255) * 100), "%");
648
- };
649
- return {
650
- r: t(this.r),
651
- g: t(this.g),
652
- b: t(this.b),
653
- a: this.a
654
- };
655
- }, e.prototype.toPercentageRgbString = function() {
656
- var t = function(r) {
657
- return Math.round(h(r, 255) * 100);
658
- };
659
- return this.a === 1 ? "rgb(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%)") : "rgba(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%, ").concat(this.roundA, ")");
660
- }, e.prototype.toName = function() {
661
- if (this.a === 0)
662
- return "transparent";
663
- if (this.a < 1)
664
- return !1;
665
- for (var t = "#" + U(this.r, this.g, this.b, !1), r = 0, n = Object.entries(T); r < n.length; r++) {
666
- var i = n[r], a = i[0], o = i[1];
667
- if (t === o)
668
- return a;
669
- }
670
- return !1;
671
- }, e.prototype.toString = function(t) {
672
- var r = !!t;
673
- t = t ?? this.format;
674
- var n = !1, i = this.a < 1 && this.a >= 0, a = !r && i && (t.startsWith("hex") || t === "name");
675
- return a ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (n = this.toRgbString()), t === "prgb" && (n = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (n = this.toHexString()), t === "hex3" && (n = this.toHexString(!0)), t === "hex4" && (n = this.toHex8String(!0)), t === "hex8" && (n = this.toHex8String()), t === "name" && (n = this.toName()), t === "hsl" && (n = this.toHslString()), t === "hsv" && (n = this.toHsvString()), n || this.toHexString());
676
- }, e.prototype.toNumber = function() {
677
- return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
678
- }, e.prototype.clone = function() {
679
- return new e(this.toString());
680
- }, e.prototype.lighten = function(t) {
681
- t === void 0 && (t = 10);
682
- var r = this.toHsl();
683
- return r.l += t / 100, r.l = A(r.l), new e(r);
684
- }, e.prototype.brighten = function(t) {
685
- t === void 0 && (t = 10);
686
- var r = this.toRgb();
687
- return r.r = Math.max(0, Math.min(255, r.r - Math.round(255 * -(t / 100)))), r.g = Math.max(0, Math.min(255, r.g - Math.round(255 * -(t / 100)))), r.b = Math.max(0, Math.min(255, r.b - Math.round(255 * -(t / 100)))), new e(r);
688
- }, e.prototype.darken = function(t) {
689
- t === void 0 && (t = 10);
690
- var r = this.toHsl();
691
- return r.l -= t / 100, r.l = A(r.l), new e(r);
692
- }, e.prototype.tint = function(t) {
693
- return t === void 0 && (t = 10), this.mix("white", t);
694
- }, e.prototype.shade = function(t) {
695
- return t === void 0 && (t = 10), this.mix("black", t);
696
- }, e.prototype.desaturate = function(t) {
697
- t === void 0 && (t = 10);
698
- var r = this.toHsl();
699
- return r.s -= t / 100, r.s = A(r.s), new e(r);
700
- }, e.prototype.saturate = function(t) {
701
- t === void 0 && (t = 10);
702
- var r = this.toHsl();
703
- return r.s += t / 100, r.s = A(r.s), new e(r);
704
- }, e.prototype.greyscale = function() {
705
- return this.desaturate(100);
706
- }, e.prototype.spin = function(t) {
707
- var r = this.toHsl(), n = (r.h + t) % 360;
708
- return r.h = n < 0 ? 360 + n : n, new e(r);
709
- }, e.prototype.mix = function(t, r) {
710
- r === void 0 && (r = 50);
711
- var n = this.toRgb(), i = new e(t).toRgb(), a = r / 100, o = {
712
- r: (i.r - n.r) * a + n.r,
713
- g: (i.g - n.g) * a + n.g,
714
- b: (i.b - n.b) * a + n.b,
715
- a: (i.a - n.a) * a + n.a
716
- };
717
- return new e(o);
718
- }, e.prototype.analogous = function(t, r) {
719
- t === void 0 && (t = 6), r === void 0 && (r = 30);
720
- var n = this.toHsl(), i = 360 / r, a = [this];
721
- for (n.h = (n.h - (i * t >> 1) + 720) % 360; --t; )
722
- n.h = (n.h + i) % 360, a.push(new e(n));
723
- return a;
724
- }, e.prototype.complement = function() {
725
- var t = this.toHsl();
726
- return t.h = (t.h + 180) % 360, new e(t);
727
- }, e.prototype.monochromatic = function(t) {
728
- t === void 0 && (t = 6);
729
- for (var r = this.toHsv(), n = r.h, i = r.s, a = r.v, o = [], s = 1 / t; t--; )
730
- o.push(new e({ h: n, s: i, v: a })), a = (a + s) % 1;
731
- return o;
732
- }, e.prototype.splitcomplement = function() {
733
- var t = this.toHsl(), r = t.h;
734
- return [
735
- this,
736
- new e({ h: (r + 72) % 360, s: t.s, l: t.l }),
737
- new e({ h: (r + 216) % 360, s: t.s, l: t.l })
738
- ];
739
- }, e.prototype.onBackground = function(t) {
740
- var r = this.toRgb(), n = new e(t).toRgb(), i = r.a + n.a * (1 - r.a);
741
- return new e({
742
- r: (r.r * r.a + n.r * n.a * (1 - r.a)) / i,
743
- g: (r.g * r.a + n.g * n.a * (1 - r.a)) / i,
744
- b: (r.b * r.a + n.b * n.a * (1 - r.a)) / i,
745
- a: i
746
- });
747
- }, e.prototype.triad = function() {
748
- return this.polyad(3);
749
- }, e.prototype.tetrad = function() {
750
- return this.polyad(4);
751
- }, e.prototype.polyad = function(t) {
752
- for (var r = this.toHsl(), n = r.h, i = [this], a = 360 / t, o = 1; o < t; o++)
753
- i.push(new e({ h: (n + o * a) % 360, s: r.s, l: r.l }));
754
- return i;
755
- }, e.prototype.equals = function(t) {
756
- return this.toRgbString() === new e(t).toRgbString();
757
- }, e;
758
- }()
759
- );
760
- const Pt = [
761
- "#458FFF",
762
- "#45D9A3",
763
- "#FFC145",
764
- "#F5654F",
765
- "#6A6AFD",
766
- "#6ED1FF",
767
- "#008787",
768
- "#FF9245",
769
- "#F587B3",
770
- "#8352CC",
771
- "#65779B"
772
- ], Kt = [
773
- "#458FFF",
774
- "#C8DEFF",
775
- "#45D9A3",
776
- "#C8F4E4",
777
- "#FFC145",
778
- "#FFEDC8",
779
- "#F5654F",
780
- "#FCD1CB",
781
- "#6A6AFD",
782
- "#D3D3FE",
783
- "#6ED1FF",
784
- "#D3D3FE",
785
- "#008787",
786
- "#B3DBDB",
787
- "#FF9245",
788
- "#FFDFC8",
789
- "#F587B3",
790
- "#FCDBE8",
791
- "#8352CC",
792
- "#FCDBE8",
793
- "#65779B",
794
- "#65779B"
795
- ], Qt = [
796
- "#8C1604",
797
- "#DB4C35",
798
- "#FF9245",
799
- "#FFC145",
800
- "#689FFF",
801
- "#45D9A3",
802
- "#99ACD1"
803
- ], Wt = {
804
- color: Pt,
805
- textStyle: {
806
- color: "#6F7785",
807
- fontSize: "12px"
808
- },
809
- bar: {
810
- barGap: 0.2,
811
- barWidth: 10,
812
- label: {
813
- color: "#6F7785",
814
- position: "top"
815
- }
816
- },
817
- line: {
818
- label: {
819
- color: "#6F7785",
820
- position: "top"
821
- }
822
- },
823
- pie: {
824
- avoidLabelOverlap: !1,
825
- radius: ["70%", "80%"],
826
- itemStyle: {
827
- borderWidth: 1,
828
- borderColor: "#fff"
829
- },
830
- label: {
831
- show: !1,
832
- color: "#2F3540",
833
- formatter: "{c}",
834
- position: "inside"
835
- }
836
- },
837
- legend: {
838
- itemWidth: 12,
839
- itemHeight: 12,
840
- inactiveColor: "#BEC3CC",
841
- textStyle: {
842
- color: "#6F7785",
843
- fontSize: "12px"
844
- }
845
- },
846
- title: {
847
- itemGap: 4,
848
- textStyle: {
849
- color: "#2F3540",
850
- fontSize: "12px",
851
- fontWeight: 500
852
- },
853
- subtextStyle: {
854
- color: "#6F7785",
855
- fontSize: "12px"
856
- }
857
- },
858
- tooltip: {
859
- borderWidth: 0,
860
- padding: 12,
861
- textStyle: {
862
- color: "#2F3540"
863
- },
864
- axisPointer: {
865
- z: 1,
866
- lineStyle: {
867
- type: "solid",
868
- color: "#E1E5EB"
869
- }
870
- }
871
- },
872
- categoryAxis: {
873
- axisLine: {
874
- show: !0,
875
- lineStyle: {
876
- color: "#EDF1F7"
877
- }
878
- },
879
- axisTick: {
880
- show: !0,
881
- alignWithLabel: !0,
882
- lineStyle: {
883
- color: "#EDF1F7"
884
- }
885
- },
886
- axisLabel: {
887
- color: "#6F7785"
888
- },
889
- splitLine: {
890
- show: !1
891
- },
892
- splitArea: {
893
- show: !1
894
- }
895
- },
896
- valueAxis: {
897
- axisLine: {
898
- show: !1
899
- },
900
- axisTick: {
901
- show: !1
902
- },
903
- axisLabel: {
904
- color: "#6F7785"
905
- },
906
- splitLine: {
907
- lineStyle: {
908
- color: "#EDF1F7"
909
- }
910
- },
911
- splitArea: {
912
- show: !1
913
- },
914
- nameTextStyle: {
915
- color: "#6F7785",
916
- padding: [0, 30, -4, 0]
917
- }
918
- },
919
- dataZoom: {
920
- height: 16
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
- function te(e) {
924
- return !!(e && e.xAxis && e.xAxis.data);
925
- }
926
- function ee(e, t) {
927
- return _ ? { attrs: { ...e }, on: { ...t } } : { ...e };
928
- }
929
- function re(e) {
930
- return Object.entries(e).reduce((t, [r, n]) => (n !== void 0 && (t[r] = n), t), {});
931
- }
932
- function ne(e) {
933
- return vt(e) ? [] : Array.isArray(e) ? e : [e];
934
- }
935
- const ie = (e, t) => new Nt(e).setAlpha(t).toRgbString();
936
- function jt(e, t) {
937
- Z(t), gt("seer", Wt);
938
- const r = (n) => {
939
- n.component(e.name, e);
940
- };
941
- e.install = r;
942
- }
943
- jt(X, [
944
- tt,
945
- et,
946
- rt,
947
- nt,
948
- it,
949
- at,
950
- ot,
951
- st
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
- const ae = X;
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 };