x-next 0.0.0-alpha.3 → 0.0.0-alpha.31

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.
Files changed (96) hide show
  1. package/README.md +1 -1
  2. package/{x-next → dist}/_utils/config.d.ts +1 -1
  3. package/dist/_utils/constant.d.ts +17 -0
  4. package/{x-next → dist}/_utils/is.d.ts +2 -0
  5. package/{x-next → dist}/_utils/vue-eco.d.ts +4 -1
  6. package/{x-next/componets/button/index.vue.d.ts → dist/components/button/Button.d.ts} +5 -70
  7. package/dist/components/button/index.d.ts +181 -0
  8. package/{x-next/componets/dialog/index.vue.d.ts → dist/components/dialog/Dialog.d.ts} +13 -46
  9. package/dist/components/dialog/index.d.ts +334 -0
  10. package/{x-next/componets → dist/components}/dialog/props.d.ts +5 -5
  11. package/dist/components/index.d.ts +7 -0
  12. package/dist/components/message/Message.d.ts +108 -0
  13. package/{x-next/componets/message/index.vue.d.ts → dist/components/message/MessageVue.vue.d.ts} +22 -47
  14. package/dist/components/message/index.d.ts +193 -0
  15. package/dist/components/message-box/index.d.ts +4 -0
  16. package/dist/components/message-box/warp.d.ts +2 -0
  17. package/dist/components/notification/Notification.d.ts +89 -0
  18. package/dist/components/notification/index.d.ts +166 -0
  19. package/dist/components/scrollbar/props.d.ts +16 -0
  20. package/{x-next/componets/space/index.d.ts → dist/components/space/Space.d.ts} +1 -1
  21. package/dist/components/space/index.d.ts +82 -0
  22. package/dist/components/tag-cloud/index.d.ts +0 -0
  23. package/dist/components/trend-chart/components/TrendChart.d.ts +277 -0
  24. package/dist/components/trend-chart/components/trend-chart-curve.d.ts +111 -0
  25. package/dist/components/trend-chart/components/trend-chart-grid.d.ts +55 -0
  26. package/dist/components/trend-chart/components/trend-chart-labels.d.ts +22 -0
  27. package/dist/components/trend-chart/helpers/genPath.d.ts +8 -0
  28. package/dist/components/trend-chart/helpers/genPoints.d.ts +3 -0
  29. package/dist/components/trend-chart/helpers/getPadding.d.ts +7 -0
  30. package/dist/components/trend-chart/helpers/validatePadding.d.ts +2 -0
  31. package/dist/components/trend-chart/index.d.ts +535 -0
  32. package/dist/components/trend-chart/props.d.ts +203 -0
  33. package/dist/components/trend-chart/themes.d.ts +128 -0
  34. package/{x-next/componets/trend-chart → dist/components/trend-chart.bak}/components/trend-chart-curve.d.ts +2 -5
  35. package/{x-next/componets/trend-chart → dist/components/trend-chart.bak}/components/trend-chart.d.ts +19 -15
  36. package/dist/components/trend-chart.bak/index.d.ts +530 -0
  37. package/{x-next/componets/trend-chart → dist/components/trend-chart.bak}/props.d.ts +10 -5
  38. package/dist/components/trend-chart.bak/themes.d.ts +152 -0
  39. package/dist/directives/clipboard/cache.d.ts +8 -0
  40. package/dist/directives/clipboard/clipboard.d.ts +18 -0
  41. package/dist/directives/clipboard/convert.d.ts +3 -0
  42. package/dist/directives/clipboard/index.d.ts +3 -0
  43. package/dist/directives/clipboard/plugin.d.ts +2 -0
  44. package/dist/directives/clipboard/textarea.d.ts +3 -0
  45. package/{x-next/icons/default/exclamation-circle-fill.vue.d.ts → dist/icons/animation/animation-loading.d.ts} +4 -9
  46. package/{x-next/icons/animation/animation-loading.vue.d.ts → dist/icons/default/check-circle-fill.d.ts} +4 -9
  47. package/{x-next/icons/default/close-circle-fill.vue.d.ts → dist/icons/default/close-circle-fill.d.ts} +4 -9
  48. package/{x-next/icons/default/check-circle-fill.vue.d.ts → dist/icons/default/exclamation-circle-fill.d.ts} +4 -9
  49. package/dist/icons/default/info-circle-fill.d.ts +50 -0
  50. package/dist/icons/default/logo-simple.d.ts +50 -0
  51. package/dist/icons/default/minus-circle-fill.d.ts +50 -0
  52. package/dist/icons/icon.d.ts +51 -0
  53. package/{x-next → dist}/icons/index.d.ts +8 -7
  54. package/dist/index.d.ts +13 -0
  55. package/dist/index.es.js +2064 -0
  56. package/dist/index.umd.js +1 -0
  57. package/dist/style.css +1 -0
  58. package/dist/types.d.ts +12 -0
  59. package/package.json +23 -13
  60. package/volar.d.ts +13 -0
  61. package/x-next/_utils/icon.d.ts +0 -59
  62. package/x-next/componets/message-box/warp.d.ts +0 -2
  63. package/x-next/componets/notification/index.vue.d.ts +0 -160
  64. package/x-next/componets/trend-chart/index.d.ts +0 -2
  65. package/x-next/icons/default/info-circle-fill.vue.d.ts +0 -55
  66. package/x-next/icons/default/minus-circle-fill.vue.d.ts +0 -55
  67. package/x-next/style.css +0 -1
  68. package/x-next/ui.d.ts +0 -5
  69. package/x-next/ui.js +0 -1357
  70. package/x-next/ui.umd.cjs +0 -1
  71. /package/{x-next → dist}/_hooks/use-overflow.d.ts +0 -0
  72. /package/{x-next → dist}/_hooks/use-popup-manager.d.ts +0 -0
  73. /package/{x-next → dist}/_props/css.d.ts +0 -0
  74. /package/{x-next → dist}/_props/global.d.ts +0 -0
  75. /package/{x-next → dist}/_utils/convert-case.d.ts +0 -0
  76. /package/{x-next → dist}/_utils/dom.d.ts +0 -0
  77. /package/{x-next → dist}/_utils/helpers.d.ts +0 -0
  78. /package/{x-next → dist}/_utils/keyboard.d.ts +0 -0
  79. /package/{x-next → dist}/_utils/number.d.ts +0 -0
  80. /package/{x-next/componets → dist/components}/button/props.d.ts +0 -0
  81. /package/{x-next/componets → dist/components}/dialog/use-props.d.ts +0 -0
  82. /package/{x-next/componets → dist/components}/dialog/use.d.ts +0 -0
  83. /package/{x-next/componets → dist/components}/dialog/warp.d.ts +0 -0
  84. /package/{x-next/componets → dist/components}/message/props.d.ts +0 -0
  85. /package/{x-next/componets → dist/components}/message/warp.d.ts +0 -0
  86. /package/{x-next/componets/message-box/index.d.ts → dist/components/message-box/MessageBox.d.ts} +0 -0
  87. /package/{x-next/componets → dist/components}/message-box/props.d.ts +0 -0
  88. /package/{x-next/componets → dist/components}/notification/props.d.ts +0 -0
  89. /package/{x-next/componets → dist/components}/notification/warp.d.ts +0 -0
  90. /package/{x-next/componets/tag-cloud → dist/components/scrollbar}/index.d.ts +0 -0
  91. /package/{x-next/componets/trend-chart → dist/components/trend-chart.bak}/components/trend-chart-grid.d.ts +0 -0
  92. /package/{x-next/componets/trend-chart → dist/components/trend-chart.bak}/components/trend-chart-labels.d.ts +0 -0
  93. /package/{x-next/componets/trend-chart → dist/components/trend-chart.bak}/helpers/genPath.d.ts +0 -0
  94. /package/{x-next/componets/trend-chart → dist/components/trend-chart.bak}/helpers/genPoints.d.ts +0 -0
  95. /package/{x-next/componets/trend-chart → dist/components/trend-chart.bak}/helpers/getPadding.d.ts +0 -0
  96. /package/{x-next/componets/trend-chart → dist/components/trend-chart.bak}/helpers/validatePadding.d.ts +0 -0
@@ -0,0 +1,2064 @@
1
+ var lt = Object.defineProperty;
2
+ var nt = (e, t, l) => t in e ? lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l;
3
+ var D = (e, t, l) => nt(e, typeof t != "symbol" ? t + "" : t, l);
4
+ import { defineComponent as E, computed as g, createVNode as r, h as w, reactive as ce, getCurrentInstance as at, ref as M, watch as ee, onMounted as W, onBeforeUnmount as De, readonly as rt, Teleport as ot, Transition as te, createTextVNode as p, onUnmounted as ue, Comment as it, Fragment as Y, render as I, isVNode as O, nextTick as Ee, mergeProps as ze, resolveComponent as _, openBlock as P, createBlock as H, withCtx as st, withDirectives as ct, createElementVNode as ut, normalizeClass as Ce, normalizeStyle as dt, createElementBlock as oe, renderSlot as Pe, createCommentVNode as xe, toDisplayString as ft, vShow as mt } from "vue";
5
+ const ht = "X", yt = "x", He = (e) => e ? yt + "-" + e : e || "", B = (e) => ht + e, $ = (e) => {
6
+ const t = He(e);
7
+ return {
8
+ block: t,
9
+ element: (a) => `${t}--${a}`,
10
+ modifier: (a) => `${t}-${a}`,
11
+ is: (a) => `${t}-is-${a}`
12
+ };
13
+ }, ne = Object.prototype.toString;
14
+ function Re(e) {
15
+ return ne.call(e) === "[object Array]";
16
+ }
17
+ function Ye(e) {
18
+ return ne.call(e) === "[object Object]";
19
+ }
20
+ const We = (e) => ne.call(e) === "[object Promise]", gt = (e) => S(e) && e.constructor.name === "AsyncFunction", vt = (e) => We(e) || gt(e);
21
+ function _e(e) {
22
+ return ne.call(e) === "[object String]";
23
+ }
24
+ function bt(e) {
25
+ return ne.call(e) === "[object Number]" && e === e;
26
+ }
27
+ function S(e) {
28
+ return typeof e == "function";
29
+ }
30
+ function de() {
31
+ return typeof window < "u";
32
+ }
33
+ const L = (e) => e, Ct = (e) => !!(e && e.shapeFlag & 1), xt = (e, t) => !!(e && e.shapeFlag & 6), wt = (e, t) => !!(e && e.shapeFlag & 8), kt = (e, t) => !!(e && e.shapeFlag & 16), Lt = (e, t) => !!(e && e.shapeFlag & 32), se = (e, t = !1) => {
34
+ var n, o;
35
+ const l = [];
36
+ for (const a of e ?? [])
37
+ Ct(a) || xt(a) || t && wt(a, a.children) ? l.push(a) : kt(a, a.children) ? l.push(...se(a.children, t)) : Lt(a, a.children) ? l.push(...se((o = (n = a.children).default) == null ? void 0 : o.call(n), t)) : Re(a) && l.push(...se(a, t));
38
+ return l;
39
+ }, V = (e, t) => Object.assign(t, {
40
+ install(l) {
41
+ l.component(e) || l.component(e, t);
42
+ }
43
+ }), Nt = {
44
+ disabled: Boolean,
45
+ block: Boolean,
46
+ loading: Boolean,
47
+ loadingFill: {
48
+ type: Boolean,
49
+ default: !1
50
+ },
51
+ debounce: {
52
+ type: Number,
53
+ default: 0
54
+ },
55
+ shape: {
56
+ type: L(String),
57
+ default: void 0
58
+ },
59
+ link: {
60
+ type: Boolean,
61
+ default: !1
62
+ },
63
+ type: {
64
+ type: L(String),
65
+ default: void 0
66
+ },
67
+ status: {
68
+ type: L(String),
69
+ default: void 0
70
+ },
71
+ plain: {
72
+ type: Boolean,
73
+ default: !1
74
+ },
75
+ size: {
76
+ type: L(String),
77
+ default: "medium"
78
+ },
79
+ border: {
80
+ type: Boolean,
81
+ default: !0
82
+ }
83
+ }, Ot = (e) => _e(e) ? e.split("-").map((t) => t.charAt(0).toUpperCase() + t.slice(1)).join("") : "", St = (e, t = "px") => {
84
+ if (e === void 0) return "";
85
+ const l = typeof e == "number" ? `${e}` : e;
86
+ return ["px", "%", "vh", "vw", "calc"].some((o) => l.includes(o)) ? l : l + t;
87
+ };
88
+ function X(e, t) {
89
+ return /* @__PURE__ */ E({
90
+ name: He(`Icon${Ot(e)}`),
91
+ props: {
92
+ size: {
93
+ type: [Number, String],
94
+ default: void 0
95
+ },
96
+ rotate: {
97
+ type: Number,
98
+ default: void 0
99
+ },
100
+ spin: {
101
+ type: Boolean,
102
+ default: !1
103
+ },
104
+ color: {
105
+ type: String,
106
+ default: void 0
107
+ },
108
+ fillColor: {
109
+ type: Array,
110
+ default: void 0
111
+ }
112
+ },
113
+ setup(l) {
114
+ const n = "x-icon", o = g(() => {
115
+ const s = {};
116
+ return l.size && (s.fontSize = St(l.size)), l.rotate && (s.transform = `rotate(${l.rotate}deg)`), l.color && (s.color = l.color), s;
117
+ }), a = g(() => [n, {
118
+ [`${n}-loading`]: l.spin
119
+ }]);
120
+ return () => r("div", {
121
+ class: a.value,
122
+ style: o.value
123
+ }, [t]);
124
+ }
125
+ });
126
+ }
127
+ const Bt = X("InfoCircleFill", w(r("svg", {
128
+ viewBox: "0 0 50 50",
129
+ class: "x-icon-loading-svg"
130
+ }, [r("circle", {
131
+ cx: "25",
132
+ cy: "25",
133
+ r: "20",
134
+ class: "path",
135
+ fill: "none",
136
+ stroke: "currentColor"
137
+ }, null)]))), Tt = /* @__PURE__ */ E({
138
+ name: "Button",
139
+ props: Nt,
140
+ emits: ["click"],
141
+ // 显式导入插槽
142
+ $slots: ["prefix", "suffix"],
143
+ setup(e, {
144
+ slots: t,
145
+ emit: l
146
+ }) {
147
+ const n = ce({
148
+ clicked: !1,
149
+ isDebounce: !1
150
+ }), o = $("button"), a = g(() => [o.block, e.type && o.modifier(e.type), e.status && o.modifier(e.status), e.disabled && o.is("disabled"), e.block && o.modifier("block"), e.plain && o.is("plain"), e.shape && o.modifier(e.shape), e.link && o.modifier("is-link"), e.size && o.modifier(e.size), !e.border && o.modifier("is-hide-border"), i.value && o.modifier("is-loading")]), s = () => {
151
+ e.debounce > 0 && !n.isDebounce && (n.isDebounce = !0, setTimeout(() => {
152
+ n.isDebounce = !1;
153
+ }, e.debounce));
154
+ }, i = g(() => e.loading || n.clicked || n.isDebounce), f = at(), c = (u, d) => {
155
+ const m = u(d);
156
+ vt(m) && (n.clicked = !0, m.finally(() => {
157
+ n.clicked = !1;
158
+ }));
159
+ }, y = (u) => {
160
+ var m, C, v, N;
161
+ if (u.stopPropagation(), (C = (m = u.target).blur) == null || C.call(m), i.value) return;
162
+ s();
163
+ const d = (N = (v = f == null ? void 0 : f.vnode) == null ? void 0 : v.props) == null ? void 0 : N.onClick;
164
+ if (Re(d))
165
+ d.forEach((A) => c(A, u));
166
+ else if (S(d)) {
167
+ c(d, u);
168
+ return;
169
+ }
170
+ };
171
+ return () => {
172
+ var u;
173
+ return r("button", {
174
+ class: a.value,
175
+ type: "button",
176
+ disabled: e.disabled,
177
+ onClick: y
178
+ }, [r("span", {
179
+ style: {
180
+ display: i.value ? "flex" : "none",
181
+ marginRight: i.value ? "4px" : "0px"
182
+ },
183
+ class: o.element("loading")
184
+ }, [r(Bt, null, null)]), t.prefix && r("span", {
185
+ class: o.element("prefix")
186
+ }, [t.prefix()]), r("span", {
187
+ class: o.element("content")
188
+ }, [(u = t.default) == null ? void 0 : u.call(t)]), t.suffix && r("span", {
189
+ class: o.element("suffix")
190
+ }, [t.suffix()])]);
191
+ };
192
+ }
193
+ }), le = V(B("Button"), Tt), Mt = ["px", "%", "vh", "vw", "calc"], Ae = (e, t = "px") => {
194
+ if (e === void 0) return "";
195
+ const l = String(e);
196
+ return Mt.some((n) => l.includes(n)) ? l : l + t;
197
+ }, Et = 1e3, zt = 3e3, Pt = 1;
198
+ class At {
199
+ constructor() {
200
+ D(this, "popupStack", {
201
+ popup: /* @__PURE__ */ new Set(),
202
+ dialog: /* @__PURE__ */ new Set(),
203
+ message: /* @__PURE__ */ new Set()
204
+ });
205
+ D(this, "getNextZIndex", (t) => (t === "message" ? Array.from(this.popupStack.message).pop() || zt : Array.from(this.popupStack.popup).pop() || Et) + Pt);
206
+ D(this, "add", (t) => {
207
+ const l = this.getNextZIndex(t);
208
+ return this.popupStack[t].add(l), t === "dialog" && this.popupStack.popup.add(l), l;
209
+ });
210
+ D(this, "delete", (t, l) => {
211
+ this.popupStack[l].delete(t), l === "dialog" && this.popupStack.popup.delete(t);
212
+ });
213
+ D(this, "isLastDialog", (t) => this.popupStack.dialog.size > 1 ? t === Array.from(this.popupStack.dialog).pop() : !0);
214
+ }
215
+ }
216
+ const we = new At();
217
+ function fe(e, {
218
+ visible: t,
219
+ runOnMounted: l
220
+ } = {}) {
221
+ const n = M(0), o = () => {
222
+ n.value = we.add(e);
223
+ }, a = () => {
224
+ we.delete(n.value, e);
225
+ }, s = () => e === "dialog" ? we.isLastDialog(n.value) : !1;
226
+ return ee(
227
+ () => t == null ? void 0 : t.value,
228
+ (i) => {
229
+ i ? o() : a();
230
+ },
231
+ {
232
+ immediate: !0
233
+ }
234
+ ), l && (W(o), De(a)), {
235
+ zIndex: rt(n),
236
+ open: o,
237
+ close: a,
238
+ isLastDialog: s
239
+ };
240
+ }
241
+ const Ze = (e) => e.replace(/^./, (t) => t.toLowerCase()).replace(/-(\w)/g, (t, l) => (l == null ? void 0 : l.toUpperCase()) ?? ""), qe = () => {
242
+ }, pt = (e, t) => {
243
+ if (de)
244
+ return (t ?? document).querySelector(e) ?? void 0;
245
+ }, $t = (e) => {
246
+ if (e.tagName === "BODY")
247
+ return window.innerWidth - (document.documentElement.offsetWidth || document.body.offsetWidth);
248
+ const { borderLeftWidth: t, borderRightWidth: l } = window.getComputedStyle(e), n = Number(t.replace("px", "")) + Number(l.replace("px", ""));
249
+ return e.offsetWidth - (e.clientWidth + n);
250
+ }, Ft = (e) => e.tagName === "BODY" ? document.documentElement.scrollHeight > window.innerHeight : e.scrollHeight > e.offsetHeight, jt = (e, t) => {
251
+ var n;
252
+ if (!de || !e || !t) return "";
253
+ let l = Ze(t);
254
+ l === "float" && (l = "cssFloat");
255
+ try {
256
+ const o = e.style[l];
257
+ if (o) return o;
258
+ const a = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, "");
259
+ return a ? a[l] : "";
260
+ } catch {
261
+ return e.style[l];
262
+ }
263
+ }, Q = (e, t, l) => {
264
+ if (!(!e || !t))
265
+ if (Ye(t))
266
+ Object.entries(t).forEach(
267
+ ([n, o]) => Q(e, n, o)
268
+ );
269
+ else {
270
+ const n = Ze(t);
271
+ e.style[n] = l;
272
+ }
273
+ }, Se = (e, t) => {
274
+ if (_e(e)) {
275
+ const l = e[0] === "#" ? `[id='${e.slice(1)}']` : e;
276
+ return pt(l, t);
277
+ }
278
+ return e;
279
+ }, It = de ? (e, t, l, n = !1) => {
280
+ e.addEventListener(t, l, n);
281
+ } : qe, Vt = de ? (e, t, l, n = !1) => {
282
+ e.removeEventListener(t, l, n);
283
+ } : qe, Xt = (e, t) => {
284
+ let l = !1;
285
+ const n = {
286
+ overflow: "",
287
+ width: ""
288
+ }, o = (i) => i.tagName === "BODY", a = () => {
289
+ if (e.value) {
290
+ const i = e.value;
291
+ if (!l && i.style.overflow !== "hidden") {
292
+ const f = $t(i);
293
+ if (f > 0 || Ft(i)) {
294
+ n.overflow = i.style.overflow, n.width = i.style.width;
295
+ let c = 0;
296
+ o(i) && (c = i.getBoundingClientRect().left || 0), Q(i, {
297
+ width: `calc(100% - ${Math.ceil(f - c)}px)`,
298
+ overflow: "hidden"
299
+ }), l = !0;
300
+ }
301
+ }
302
+ }
303
+ }, s = () => {
304
+ if (e.value && l) {
305
+ const i = e.value;
306
+ Q(i, {
307
+ overflow: n.overflow,
308
+ width: n.width
309
+ }), l = !1;
310
+ }
311
+ };
312
+ return ee(
313
+ () => t == null ? void 0 : t.value,
314
+ (i) => {
315
+ e.value && !o(e.value) && (i && Q(i, {
316
+ position: "absolute"
317
+ }), jt(e.value, "position") === "static" && Q(e.value, { position: "relative" }));
318
+ }
319
+ ), {
320
+ setOverflowHidden: a,
321
+ resetOverflow: s
322
+ };
323
+ }, Dt = {
324
+ ENTER: "Enter",
325
+ ESC: "Escape",
326
+ BACKSPACE: "Backspace",
327
+ TAB: "Tab",
328
+ SPACE: " ",
329
+ ARROW_UP: "ArrowUp",
330
+ ARROW_DOWN: "ArrowDown",
331
+ ARROW_LEFT: "ArrowLeft",
332
+ ARROW_RIGHT: "ArrowRight"
333
+ }, Ht = {
334
+ renderTo: {
335
+ type: L([String, Object]),
336
+ default: "body"
337
+ },
338
+ disabled: {
339
+ type: Boolean,
340
+ default: !1
341
+ },
342
+ modelValue: {
343
+ type: Boolean,
344
+ default: !1
345
+ },
346
+ top: {
347
+ type: [String, Number],
348
+ default: "3vh"
349
+ },
350
+ center: {
351
+ type: Boolean,
352
+ default: !1
353
+ },
354
+ width: {
355
+ type: [String, Number],
356
+ default: 0
357
+ },
358
+ height: {
359
+ type: [String, Number],
360
+ default: 0
361
+ },
362
+ minWidth: {
363
+ type: [String, Number],
364
+ default: 0
365
+ },
366
+ minHeight: {
367
+ type: [String, Number],
368
+ default: 0
369
+ },
370
+ title: {
371
+ type: String,
372
+ default: ""
373
+ },
374
+ mask: {
375
+ type: Boolean,
376
+ default: !0
377
+ },
378
+ // 关闭时卸载
379
+ destroyOnClosed: {
380
+ type: Boolean,
381
+ default: !0
382
+ },
383
+ // 关闭前回调检查是否可以关闭
384
+ onBeforeCancel: {
385
+ type: Function
386
+ },
387
+ // 是否点击遮罩层关闭
388
+ maskToClose: {
389
+ type: Boolean,
390
+ default: !0
391
+ },
392
+ // esc键关闭
393
+ escToClose: {
394
+ type: Boolean,
395
+ default: !0
396
+ },
397
+ // 全屏
398
+ fullscreen: {
399
+ type: Boolean,
400
+ default: !1
401
+ },
402
+ // 是否是messageBox
403
+ messageBox: {
404
+ type: Boolean,
405
+ default: !1
406
+ },
407
+ popupClass: {
408
+ type: String,
409
+ default: void 0
410
+ },
411
+ showClose: {
412
+ type: Boolean,
413
+ default: !0
414
+ },
415
+ showHeaderBottomLine: {
416
+ type: Boolean,
417
+ default: !1
418
+ }
419
+ }, Rt = ["width", "minWidth", "height", "minHeight"], Ue = /* @__PURE__ */ E({
420
+ name: B("Dialog"),
421
+ inheritAttrs: !1,
422
+ props: Ht,
423
+ emits: ["closed", "close", "open", "opened", "update:modelValue"],
424
+ setup(e, {
425
+ emit: t,
426
+ slots: l
427
+ }) {
428
+ const n = $("dialog"), o = n.block, a = $("message-box");
429
+ a.block;
430
+ const s = g(() => [o, e.messageBox && "is-message-box", e.popupClass && e.popupClass]), i = g(() => Se(e.renderTo)), f = M(), c = g(() => e.disabled || !i.value), y = g(() => ({
431
+ zIndex: v.value
432
+ })), u = g(() => {
433
+ const x = {};
434
+ return e.fullscreen || (!e.center && e.top && (x.top = Ae(e.top)), Rt.forEach((j) => {
435
+ e[j] && (x[j] = Ae(e[j]));
436
+ })), x;
437
+ }), d = M(!1), m = g(() => e.modelValue), C = g(() => m.value || d.value), {
438
+ zIndex: v,
439
+ isLastDialog: N
440
+ } = fe("dialog", {
441
+ visible: m
442
+ }), {
443
+ setOverflowHidden: A,
444
+ resetOverflow: h
445
+ } = Xt(i, f), b = (x, j) => {
446
+ t("update:modelValue", !1), t("close", e.messageBox ? x : void 0, e.messageBox ? j : void 0);
447
+ }, k = () => {
448
+ d.value = !1, h(), t("closed");
449
+ }, z = () => {
450
+ t("opened");
451
+ }, T = ce({
452
+ ok: !1,
453
+ cancel: !1
454
+ }), F = (x, j) => {
455
+ let re = !0;
456
+ if (T[x] = !0, S(e.onBeforeCancel) && (re = e.onBeforeCancel(x) ?? !1), We(re)) {
457
+ re.then((tt) => {
458
+ T[x] = !1, tt && b(x, j);
459
+ });
460
+ return;
461
+ }
462
+ T[x] = !1, re && b(x, j);
463
+ }, ae = () => {
464
+ e.maskToClose && e.mask && F("cancel");
465
+ }, Je = (x) => {
466
+ F("cancel", x);
467
+ }, Qe = (x) => {
468
+ F("ok", x);
469
+ };
470
+ let be = !1;
471
+ const Te = (x) => {
472
+ e.escToClose && x.key === Dt.ESC && N() && F("cancel");
473
+ }, et = () => {
474
+ e.escToClose && !be && (be = !0, It(document.documentElement, "keydown", Te));
475
+ }, Me = () => {
476
+ be = !1, Vt(document.documentElement, "keydown", Te);
477
+ };
478
+ return De(() => {
479
+ h(), Me();
480
+ }), ee(() => m.value, (x) => {
481
+ x ? (t("open"), A(), d.value = !0, et()) : Me();
482
+ }, {
483
+ immediate: !0
484
+ }), () => r(ot, {
485
+ to: i.value,
486
+ disabled: c.value
487
+ }, {
488
+ default: () => [C.value && r("div", {
489
+ ref: f,
490
+ class: s.value,
491
+ style: y.value
492
+ }, [r(te, {
493
+ name: "x-fade-in-standard",
494
+ appear: !0
495
+ }, {
496
+ default: () => [e.mask && m.value && r("div", {
497
+ class: n.element("mask")
498
+ }, null)]
499
+ }), r("div", {
500
+ class: [n.element("wrapper"), {
501
+ "is-center": e.center
502
+ }],
503
+ onClick: (x) => x.target === x.currentTarget && ae()
504
+ }, [r(te, {
505
+ name: "x-zoom-in",
506
+ appear: !0,
507
+ onAfterEnter: z,
508
+ onAfterLeave: k
509
+ }, {
510
+ default: () => [m.value && r("div", {
511
+ class: [n.element("container"), {
512
+ "is-fullscreen": e.fullscreen
513
+ }],
514
+ style: u.value
515
+ }, [r("div", {
516
+ class: [e.messageBox ? a.element("header") : n.element("header"), e.showHeaderBottomLine && "is-bottom-line"]
517
+ }, [l.title ? l.title() : r("div", {
518
+ class: [n.element("header-title")]
519
+ }, [e.title])]), r("div", {
520
+ class: [e.messageBox ? a.element("body") : n.element("body")]
521
+ }, [l.default && l.default()]), r("div", {
522
+ class: [e.messageBox ? a.element("footer") : n.element("footer")]
523
+ }, [l.footer && l.footer({
524
+ cancel: Je,
525
+ ok: Qe,
526
+ "loading-obj": T
527
+ })]), e.showClose && r("span", {
528
+ class: [n.element("close-icon"), e.messageBox && a.element("close-icon")],
529
+ onClick: () => F("cancel")
530
+ }, null)])]
531
+ })])])]
532
+ });
533
+ }
534
+ }), Ge = V(B("Dialog"), Ue), me = X("CloseCircleFill", w(r("svg", {
535
+ viewBox: "0 0 48 48",
536
+ fill: "none",
537
+ xmlns: "http://www.w3.org/2000/svg",
538
+ stroke: "currentColor",
539
+ "stroke-width": "4",
540
+ "stroke-linecap": "butt",
541
+ "stroke-linejoin": "miter",
542
+ filter: ""
543
+ }, [r("path", {
544
+ "fill-rule": "evenodd",
545
+ "clip-rule": "evenodd",
546
+ d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm4.955-27.771-4.95 4.95-4.95-4.95a1 1 0 0 0-1.414 0l-1.414 1.414a1 1 0 0 0 0 1.414l4.95 4.95-4.95 4.95a1 1 0 0 0 0 1.414l1.414 1.414a1 1 0 0 0 1.414 0l4.95-4.95 4.95 4.95a1 1 0 0 0 1.414 0l1.414-1.414a1 1 0 0 0 0-1.414l-4.95-4.95 4.95-4.95a1 1 0 0 0 0-1.414l-1.414-1.414a1 1 0 0 0-1.414 0Z",
547
+ fill: "currentColor",
548
+ stroke: "none"
549
+ }, null)]))), he = X("CheckCircleFill", w(r("svg", {
550
+ viewBox: "0 0 48 48",
551
+ fill: "none",
552
+ xmlns: "http://www.w3.org/2000/svg",
553
+ stroke: "currentColor",
554
+ "stroke-width": "4",
555
+ "stroke-linecap": "butt",
556
+ "stroke-linejoin": "miter",
557
+ filter: ""
558
+ }, [r("path", {
559
+ "fill-rule": "evenodd",
560
+ "clip-rule": "evenodd",
561
+ d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm10.207-24.379a1 1 0 0 0 0-1.414l-1.414-1.414a1 1 0 0 0-1.414 0L22 26.172l-4.878-4.88a1 1 0 0 0-1.415 0l-1.414 1.415a1 1 0 0 0 0 1.414l7 7a1 1 0 0 0 1.414 0l11.5-11.5Z",
562
+ fill: "currentColor",
563
+ stroke: "none"
564
+ }, null)]))), ye = X("ExclamationCircleFill", w(r("svg", {
565
+ viewBox: "0 0 48 48",
566
+ fill: "none",
567
+ xmlns: "http://www.w3.org/2000/svg",
568
+ stroke: "currentColor",
569
+ "stroke-width": "4",
570
+ "stroke-linecap": "butt",
571
+ "stroke-linejoin": "miter",
572
+ filter: ""
573
+ }, [r("path", {
574
+ "fill-rule": "evenodd",
575
+ "clip-rule": "evenodd",
576
+ d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm2-30a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2Zm0 17h1a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h1v-8a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v11Z",
577
+ fill: "currentColor",
578
+ stroke: "none"
579
+ }, null)]))), ge = X("InfoCircleFill", w(r("svg", {
580
+ viewBox: "0 0 48 48",
581
+ fill: "none",
582
+ xmlns: "http://www.w3.org/2000/svg",
583
+ stroke: "currentColor",
584
+ "stroke-width": "4",
585
+ "stroke-linecap": "butt",
586
+ "stroke-linejoin": "miter",
587
+ filter: ""
588
+ }, [r("path", {
589
+ "fill-rule": "evenodd",
590
+ "clip-rule": "evenodd",
591
+ d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm2-30a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2Zm0 17h1a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h1v-8a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v11Z",
592
+ fill: "currentColor",
593
+ stroke: "none"
594
+ }, null)]))), ve = X("MinusCircleFill", w(r("svg", {
595
+ viewBox: "0 0 48 48",
596
+ fill: "none",
597
+ xmlns: "http://www.w3.org/2000/svg",
598
+ stroke: "currentColor",
599
+ "stroke-width": "4",
600
+ "stroke-linecap": "butt",
601
+ "stroke-linejoin": "miter",
602
+ filter: ""
603
+ }, [r("path", {
604
+ "fill-rule": "evenodd",
605
+ "clip-rule": "evenodd",
606
+ d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm-7-22a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1H17Z",
607
+ fill: "currentColor",
608
+ stroke: "none"
609
+ }, null)])));
610
+ X("LogoSimple", w(r("svg", {
611
+ width: "61.000000",
612
+ height: "41.000000",
613
+ viewBox: "0 0 61 41",
614
+ fill: "none",
615
+ xmlns: "http://www.w3.org/2000/svg",
616
+ "xmlns:xlink": "http://www.w3.org/1999/xlink"
617
+ }, [r("desc", null, [p("Created with Pixso.")]), r("defs", null, null), r("path", {
618
+ id: "path",
619
+ d: "M32 29.5L32 41L49.4 41C55.8 41 61 35.85 61 29.5C61 23.14 55.8 18 49.4 18C42.99 18 37.79 23.14 37.79 29.5L32 29.5Z",
620
+ fill: "#00C1FF",
621
+ "fill-opacity": "1.000000",
622
+ "fill-rule": "nonzero"
623
+ }, null), r("path", {
624
+ id: "path",
625
+ d: "M10 20.5C10 27.14 13.15 33.04 18.05 36.79L18.05 41L30.5 41C41.82 41 51 31.82 51 20.5C51 9.17 41.82 0 30.5 0C19.17 0 10 9.17 10 20.5Z",
626
+ fill: "#1C99FF",
627
+ "fill-opacity": "1.000000",
628
+ "fill-rule": "nonzero"
629
+ }, null), r("path", {
630
+ id: "path",
631
+ d: "M32 25C32 25.52 31.97 26.04 31.92 26.56C31.87 27.08 31.79 27.6 31.69 28.12C31.59 28.63 31.46 29.14 31.31 29.64C31.15 30.14 30.98 30.63 30.78 31.12C30.58 31.6 30.35 32.08 30.11 32.54C29.86 33 29.59 33.45 29.3 33.88C29.01 34.32 28.7 34.74 28.36 35.15C28.03 35.55 27.68 35.94 27.31 36.31C26.94 36.68 26.55 37.03 26.15 37.36C25.74 37.7 25.32 38.01 24.88 38.3C24.45 38.59 24 38.86 23.54 39.11C23.08 39.35 22.6 39.58 22.12 39.78C21.63 39.98 21.14 40.15 20.64 40.31C20.14 40.46 19.63 40.59 19.12 40.69C18.6 40.79 18.08 40.87 17.56 40.92C17.04 40.97 16.52 41 16 41C15.47 41 14.95 40.97 14.43 40.92C13.91 40.87 13.39 40.79 12.87 40.69C12.36 40.59 11.85 40.46 11.35 40.31C10.85 40.15 10.36 39.98 9.87 39.78C9.39 39.58 8.91 39.35 8.45 39.11C7.99 38.86 7.54 38.59 7.11 38.3C6.67 38.01 6.25 37.7 5.84 37.36C5.44 37.03 5.05 36.68 4.68 36.31C4.31 35.94 3.96 35.55 3.63 35.15C3.29 34.74 2.98 34.32 2.69 33.88C2.4 33.45 2.13 33 1.88 32.54C1.64 32.08 1.41 31.6 1.21 31.12C1.01 30.63 0.84 30.14 0.68 29.64C0.53 29.14 0.4 28.63 0.3 28.12C0.2 27.6 0.12 27.08 0.07 26.56C0.02 26.04 0 25.52 0 25C0 24.47 0.02 23.95 0.07 23.43C0.12 22.91 0.2 22.39 0.3 21.87C0.4 21.36 0.53 20.85 0.68 20.35C0.84 19.85 1.01 19.36 1.21 18.87C1.41 18.39 1.64 17.91 1.88 17.45C2.13 16.99 2.4 16.54 2.69 16.11C2.98 15.67 3.29 15.25 3.63 14.84C3.96 14.44 4.31 14.05 4.68 13.68C5.05 13.31 5.44 12.96 5.84 12.63C6.25 12.29 6.67 11.98 7.11 11.69C7.54 11.4 7.99 11.13 8.45 10.88C8.91 10.64 9.39 10.41 9.87 10.21C10.36 10.01 10.85 9.84 11.35 9.68C11.85 9.53 12.36 9.4 12.87 9.3C13.39 9.2 13.91 9.12 14.43 9.07C14.95 9.02 15.47 9 16 9C16.52 9 17.04 9.02 17.56 9.07C18.08 9.12 18.6 9.2 19.12 9.3C19.63 9.4 20.14 9.53 20.64 9.68C21.14 9.84 21.63 10.01 22.12 10.21C22.6 10.41 23.08 10.64 23.54 10.88C24 11.13 24.45 11.4 24.88 11.69C25.32 11.98 25.74 12.29 26.15 12.63C26.55 12.96 26.94 13.31 27.31 13.68C27.68 14.05 28.03 14.44 28.36 14.84C28.7 15.25 29.01 15.67 29.3 16.11C29.59 16.54 29.86 16.99 30.11 17.45C30.35 17.91 30.58 18.39 30.78 18.87C30.98 19.36 31.15 19.85 31.31 20.35C31.46 20.85 31.59 21.36 31.69 21.87C31.79 22.39 31.87 22.91 31.92 23.43C31.97 23.95 32 24.47 32 25Z",
632
+ fill: "#1666FF",
633
+ "fill-opacity": "1.000000",
634
+ "fill-rule": "nonzero"
635
+ }, null)])));
636
+ const Yt = /* @__PURE__ */ E({
637
+ name: B("Message"),
638
+ props: {
639
+ id: {
640
+ type: String,
641
+ default: ""
642
+ },
643
+ message: {
644
+ type: [String, Number, Object],
645
+ default: ""
646
+ },
647
+ type: {
648
+ type: String,
649
+ default: "success"
650
+ },
651
+ duration: {
652
+ type: Number,
653
+ default: 1500
654
+ },
655
+ center: {
656
+ type: Boolean,
657
+ default: !1
658
+ },
659
+ onClose: {
660
+ type: Function,
661
+ default: () => {
662
+ }
663
+ },
664
+ offset: {
665
+ type: Number,
666
+ default: 20
667
+ },
668
+ zIndex: {
669
+ type: Number,
670
+ default: 0
671
+ },
672
+ showClose: {
673
+ type: Boolean,
674
+ default: !1
675
+ },
676
+ useHTML: {
677
+ type: Boolean,
678
+ default: !1
679
+ },
680
+ popupClass: {
681
+ type: String,
682
+ default: void 0
683
+ }
684
+ },
685
+ emits: ["destroy"],
686
+ setup(e, {
687
+ emit: t,
688
+ slots: l
689
+ }) {
690
+ const n = $("message"), o = M(!1), a = M(null), s = g(() => [n.block, n.modifier(e.type), e.center && n.modifier("center"), e.showClose && !e.center && n.element("show-close"), e.popupClass]), {
691
+ zIndex: i
692
+ } = fe("message", {
693
+ runOnMounted: !0
694
+ }), f = g(() => ({
695
+ top: `${e.offset}px`,
696
+ zIndex: i.value
697
+ })), c = () => {
698
+ if (l.icon) return l.icon();
699
+ switch (e.type) {
700
+ case "success":
701
+ return r(he, null, null);
702
+ case "warning":
703
+ return r(ye, null, null);
704
+ case "strong":
705
+ return r(ve, null, null);
706
+ case "error":
707
+ return r(me, null, null);
708
+ case "info":
709
+ return r(ge, null, null);
710
+ default:
711
+ return null;
712
+ }
713
+ }, y = () => {
714
+ e.duration > 0 && (a.value = setTimeout(() => {
715
+ o.value = !1;
716
+ }, e.duration));
717
+ }, u = () => {
718
+ a.value && (clearTimeout(a.value), a.value = null);
719
+ };
720
+ W(() => {
721
+ o.value = !0, y();
722
+ }), ue(() => {
723
+ u();
724
+ });
725
+ const d = () => {
726
+ var m;
727
+ o.value = !1, u(), (m = e.onClose) == null || m.call(e);
728
+ };
729
+ return () => r(te, {
730
+ name: "x-message-slide-top",
731
+ onBeforeLeave: e.onClose,
732
+ onAfterLeave: () => t("destroy")
733
+ }, {
734
+ default: () => [o.value && r("div", {
735
+ class: s.value,
736
+ style: f.value
737
+ }, [r("span", {
738
+ class: [n.element("icon"), n.modifier(`icon-${e.type}`)]
739
+ }, [c()]), r("div", null, [l.default ? l.default() : e.useHTML ? r("span", {
740
+ innerHTML: e.message
741
+ }, null) : r("span", null, [e.message]), e.showClose && r("span", {
742
+ class: n.element("close-icon"),
743
+ onClick: d
744
+ }, null)])])]
745
+ });
746
+ }
747
+ }), Wt = V(B("Message"), Yt), _t = /* @__PURE__ */ E({
748
+ name: "Space",
749
+ props: {
750
+ direction: {
751
+ type: String,
752
+ default: "horizontal"
753
+ },
754
+ size: {
755
+ type: [Number, String],
756
+ default: "small"
757
+ },
758
+ align: {
759
+ type: String,
760
+ default: "center"
761
+ },
762
+ fill: {
763
+ type: Boolean,
764
+ default: !1
765
+ }
766
+ },
767
+ setup(e, {
768
+ slots: t
769
+ }) {
770
+ const l = $("space"), n = g(() => [l.block, l.element(e.direction), e.fill && "is-fill", l.element(`${e.direction}-${e.align}`)]);
771
+ function o(s) {
772
+ if (bt(s))
773
+ return s;
774
+ switch (s) {
775
+ case "mini":
776
+ return 4;
777
+ case "small":
778
+ return 8;
779
+ case "medium":
780
+ return 16;
781
+ case "large":
782
+ return 24;
783
+ default:
784
+ return 8;
785
+ }
786
+ }
787
+ const a = (s) => {
788
+ const i = {};
789
+ if (s) return i;
790
+ const f = `${o(e.size)}px`, c = `${o(e.size)}px`;
791
+ return e.direction === "horizontal" && (i.marginRight = f), e.direction === "vertical" && (i.marginBottom = c), i;
792
+ };
793
+ return () => {
794
+ var i;
795
+ const s = se((i = t.default) == null ? void 0 : i.call(t), !0).filter((f) => f.type !== it);
796
+ return r("div", {
797
+ class: [n.value]
798
+ }, [s.map((f, c) => {
799
+ var u;
800
+ const y = t.split && c > 0;
801
+ return r(Y, {
802
+ key: `space-item-${c}`
803
+ }, [y && r("div", {
804
+ className: l.element("split"),
805
+ style: a(!1)
806
+ }, [(u = t.split) == null ? void 0 : u.call(t)]), r("div", {
807
+ className: l.element("item"),
808
+ style: a(c === s.length - 1)
809
+ }, [f])]);
810
+ })]);
811
+ };
812
+ }
813
+ }), Be = V(B("Space"), _t), Zt = ["info", "success", "warning", "strong", "error"];
814
+ function pe(e) {
815
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !O(e);
816
+ }
817
+ const ke = $("message-box"), Oe = (e) => {
818
+ const t = document.createElement("div"), l = () => {
819
+ I(null, t);
820
+ }, n = (d) => {
821
+ if (d === "cancel")
822
+ return e.beforeOnCancel ? e.beforeOnCancel() : !0;
823
+ if (d === "ok")
824
+ return e.beforeOnOk ? e.beforeOnOk() : !0;
825
+ }, o = (d, m) => {
826
+ d === "cancel" && e.onCancel && e.onCancel(m), d === "ok" && e.onOk && e.onOk(m);
827
+ }, a = (d) => {
828
+ let m;
829
+ switch (d) {
830
+ case "warning":
831
+ m = r(ye, {
832
+ size: "22px",
833
+ color: "#f6c64b"
834
+ }, null);
835
+ break;
836
+ case "strong":
837
+ m = r(ve, {
838
+ size: "22px",
839
+ color: "#ff7125"
840
+ }, null);
841
+ break;
842
+ case "error":
843
+ m = r(me, {
844
+ size: "22px",
845
+ color: "#e24f48"
846
+ }, null);
847
+ break;
848
+ case "success":
849
+ m = r(he, {
850
+ size: "22px",
851
+ color: "#68d1ab"
852
+ }, null);
853
+ break;
854
+ case "info":
855
+ m = r(ge, {
856
+ size: "22px",
857
+ color: "#2355f5"
858
+ }, null);
859
+ break;
860
+ }
861
+ return r("div", {
862
+ class: ke.element("icon")
863
+ }, [m]);
864
+ }, s = (d) => {
865
+ if (O(d)) return d;
866
+ if (S(d)) {
867
+ const m = d();
868
+ return O(m) ? m : null;
869
+ }
870
+ return r("div", {
871
+ class: ke.element("title")
872
+ }, [p(" "), d, p(" ")]);
873
+ }, i = (d) => {
874
+ if (O(d)) return d;
875
+ if (S(d)) {
876
+ const m = d();
877
+ return O(m) ? m : null;
878
+ }
879
+ return r("div", {
880
+ class: ke.element("content")
881
+ }, [p(" "), e.content, p(" ")]);
882
+ }, f = () => () => r(Y, null, [a(e.type || "success"), e.title && s(e.title)]), c = () => () => r(Y, null, [e.content && i(e.content)]), y = () => {
883
+ if (O(e.footer) || S(e.footer))
884
+ return e.footer;
885
+ const d = (e == null ? void 0 : e.cancelText) || "取消", m = (e == null ? void 0 : e.okText) || "确认";
886
+ return (C) => r(Be, {
887
+ size: 12
888
+ }, {
889
+ default: () => {
890
+ var v, N;
891
+ return [!e.hideCancel && r(le, {
892
+ size: "small",
893
+ onClick: C.cancel,
894
+ loading: (v = C.loadingObj) == null ? void 0 : v.cancel
895
+ }, pe(d) ? d : {
896
+ default: () => [d]
897
+ }), !e.hideOk && r(le, {
898
+ type: "primary",
899
+ size: "small",
900
+ onClick: C.ok,
901
+ loading: (N = C.loadingObj) == null ? void 0 : N.ok
902
+ }, pe(m) ? m : {
903
+ default: () => [m]
904
+ })];
905
+ }
906
+ });
907
+ }, u = r(Ge, {
908
+ messageBox: !0,
909
+ width: (e == null ? void 0 : e.width) ?? 358,
910
+ height: (e == null ? void 0 : e.height) ?? "auto",
911
+ modelValue: !0,
912
+ renderTo: e == null ? void 0 : e.renderTo,
913
+ center: e != null && e.top ? !1 : (e == null ? void 0 : e.center) ?? !0,
914
+ top: (e == null ? void 0 : e.top) ?? 0,
915
+ mask: (e == null ? void 0 : e.mask) ?? !0,
916
+ maskToClose: (e == null ? void 0 : e.maskToClose) ?? !0,
917
+ popupClass: e.popupClass,
918
+ onClose: o,
919
+ onBeforeCancel: n,
920
+ "onUpdate:modelValue": () => {
921
+ u.component.props.modelValue = !1;
922
+ },
923
+ // 等待动画完全结束后销毁vm
924
+ onClosed: l,
925
+ onOpened: () => {
926
+ }
927
+ }, {
928
+ title: f(),
929
+ default: c(),
930
+ footer: y()
931
+ });
932
+ I(u, t);
933
+ }, qt = () => {
934
+ Zt.forEach((e) => {
935
+ Oe[e] = (t, l) => {
936
+ const n = [], o = [];
937
+ let a = () => !0, s = () => !0;
938
+ return setTimeout(() => {
939
+ Oe({
940
+ title: t,
941
+ content: l,
942
+ type: e,
943
+ beforeOnCancel: s,
944
+ beforeOnOk: a,
945
+ onOk: () => {
946
+ n.forEach((i) => S(i) && i());
947
+ },
948
+ onCancel: () => {
949
+ o.forEach((i) => S(i) && i());
950
+ }
951
+ });
952
+ }, 0), {
953
+ ok(...i) {
954
+ return i.length === 1 && n.push(i[0]), i.length === 2 && (a = i[0], n.push(i[1])), this;
955
+ },
956
+ cancel(...i) {
957
+ return i.length === 1 && o.push(i[0]), i.length === 2 && (s = i[0], o.push(i[1])), this;
958
+ }
959
+ };
960
+ };
961
+ });
962
+ };
963
+ qt();
964
+ const Ut = V(B("MessageBox"), Oe), Gt = {
965
+ position: {
966
+ type: String,
967
+ default: "top-right"
968
+ },
969
+ offset: {
970
+ type: Number,
971
+ default: 0
972
+ },
973
+ title: {
974
+ type: String,
975
+ default: ""
976
+ },
977
+ type: {
978
+ type: String,
979
+ default: "info"
980
+ },
981
+ message: {
982
+ type: String,
983
+ default: void 0
984
+ },
985
+ duration: {
986
+ type: Number,
987
+ default: 3e3
988
+ },
989
+ showClose: {
990
+ type: Boolean,
991
+ default: !0
992
+ },
993
+ onClose: {
994
+ type: Function,
995
+ default: () => {
996
+ }
997
+ },
998
+ renderToBody: {
999
+ type: Boolean,
1000
+ default: !1
1001
+ }
1002
+ }, Ke = /* @__PURE__ */ E({
1003
+ name: B("Notification"),
1004
+ props: Gt,
1005
+ emits: ["close", "destroy"],
1006
+ setup(e, {
1007
+ emit: t,
1008
+ slots: l
1009
+ }) {
1010
+ const n = $("notification"), o = n.block, a = g(() => [o, n.modifier(i.value.ver)]), {
1011
+ zIndex: s
1012
+ } = fe("message", {
1013
+ runOnMounted: !0
1014
+ }), i = g(() => {
1015
+ const v = e.position.split("-");
1016
+ return {
1017
+ hor: v[1],
1018
+ ver: v[0]
1019
+ };
1020
+ }), f = g(() => `x-notification-slide-${i.value.hor}`), c = g(() => {
1021
+ const v = {};
1022
+ return v.position = e.renderToBody ? "fixed" : "absolute", v.zIndex = s.value, v[i.value.hor] = "20px", v[i.value.ver] = `${e.offset}px`, v;
1023
+ }), y = M(!1);
1024
+ let u = 0;
1025
+ const d = () => {
1026
+ u = setTimeout(() => {
1027
+ y.value = !1;
1028
+ }, e.duration);
1029
+ }, m = g(() => e.type === "info" ? ge : e.type === "warning" ? ye : e.type === "strong" ? ve : e.type === "success" ? he : e.type === "error" ? me : ""), C = () => {
1030
+ y.value = !1;
1031
+ };
1032
+ return W(() => {
1033
+ e.duration !== 0 && d(), y.value = !0;
1034
+ }), ue(() => {
1035
+ clearTimeout(u);
1036
+ }), () => r(te, {
1037
+ name: f.value,
1038
+ onBeforeLeave: () => t("close"),
1039
+ onAfterLeave: () => t("destroy")
1040
+ }, {
1041
+ default: () => {
1042
+ var v;
1043
+ return [y.value && r("div", {
1044
+ class: a.value,
1045
+ style: c.value
1046
+ }, [r("div", {
1047
+ class: [n.element("header")]
1048
+ }, [r("div", {
1049
+ class: [n.element("icon"), n.modifier(`icon-${e.type}`)]
1050
+ }, [m.value && r(m.value, null, null)]), r("div", null, [r("div", {
1051
+ class: [n.element("title")]
1052
+ }, [e.title]), r("div", {
1053
+ class: [n.element("message")]
1054
+ }, [((v = l.default) == null ? void 0 : v.call(l)) || e.message])])]), e.showClose && r("span", {
1055
+ class: [n.element("close-icon")],
1056
+ onClick: C
1057
+ }, null)])];
1058
+ }
1059
+ });
1060
+ }
1061
+ }), Kt = V(B("Notification"), Ke), Jt = (e) => {
1062
+ const t = e.split(" ").filter((n) => n !== "").map((n) => parseInt(n));
1063
+ let l = {};
1064
+ switch (t.length) {
1065
+ case 4:
1066
+ l = { top: t[0], right: t[1], bottom: t[2], left: t[3] };
1067
+ break;
1068
+ case 3:
1069
+ l = { top: t[0], right: t[1], bottom: t[2], left: t[1] };
1070
+ break;
1071
+ case 2:
1072
+ l = { top: t[0], right: t[1], bottom: t[0], left: t[1] };
1073
+ break;
1074
+ default:
1075
+ l = { top: t[0], right: t[0], bottom: t[0], left: t[0] };
1076
+ }
1077
+ return l;
1078
+ }, Qt = (e) => {
1079
+ const t = e.split(" ").filter((l) => l !== "").map((l) => parseInt(l));
1080
+ return t.length < 1 || t.length > 4 ? !1 : t.every((l) => typeof l == "number" && l >= 0);
1081
+ }, el = {
1082
+ // 数据集
1083
+ dataset: {
1084
+ required: !0,
1085
+ type: L(Array),
1086
+ default: () => []
1087
+ },
1088
+ status: {
1089
+ type: L(String),
1090
+ default: void 0
1091
+ },
1092
+ // 网格属性
1093
+ grid: {
1094
+ default: null,
1095
+ type: L(Object)
1096
+ },
1097
+ // 标签属性
1098
+ labels: {
1099
+ default: null,
1100
+ type: L(Object)
1101
+ },
1102
+ // 最大值,默认数据集最大值
1103
+ max: {
1104
+ type: Number
1105
+ },
1106
+ // 最小值,默认数据集最小值
1107
+ min: {
1108
+ type: Number
1109
+ },
1110
+ // 绘制边距
1111
+ padding: {
1112
+ default: "5",
1113
+ type: String,
1114
+ validator(e) {
1115
+ return Qt(e);
1116
+ }
1117
+ },
1118
+ // 开启交互,开启后启用onmousemove事件
1119
+ interactive: {
1120
+ default: !1,
1121
+ type: Boolean
1122
+ },
1123
+ // 主题
1124
+ theme: {
1125
+ type: L(Object),
1126
+ default: () => ({
1127
+ activeLineColor: "#CCC"
1128
+ })
1129
+ }
1130
+ }, tl = {
1131
+ boundary: {
1132
+ required: !0,
1133
+ type: L(Object),
1134
+ default: () => {
1135
+ }
1136
+ },
1137
+ minValue: {
1138
+ required: !0,
1139
+ type: Number
1140
+ },
1141
+ maxValue: {
1142
+ required: !0,
1143
+ type: Number
1144
+ },
1145
+ maxAmount: {
1146
+ required: !0,
1147
+ type: Number
1148
+ },
1149
+ activeLineParams: {
1150
+ type: Object
1151
+ },
1152
+ data: {
1153
+ required: !0,
1154
+ type: L(Array),
1155
+ default: () => []
1156
+ },
1157
+ className: {
1158
+ type: String
1159
+ },
1160
+ // 平滑
1161
+ smooth: {
1162
+ default: !0,
1163
+ type: Boolean
1164
+ },
1165
+ stroke: {
1166
+ default: !0,
1167
+ type: Boolean
1168
+ },
1169
+ // 填充
1170
+ fill: {
1171
+ default: !0,
1172
+ type: Boolean
1173
+ },
1174
+ // 鼠标
1175
+ showPoints: {
1176
+ default: !0,
1177
+ type: Boolean
1178
+ },
1179
+ theme: {
1180
+ type: L(Object)
1181
+ },
1182
+ mainTheme: {
1183
+ type: L(Object)
1184
+ }
1185
+ }, ll = {
1186
+ boundary: {
1187
+ required: !0,
1188
+ type: L(Object),
1189
+ default: () => {
1190
+ }
1191
+ },
1192
+ verticalLines: {
1193
+ default: !1,
1194
+ type: Boolean
1195
+ },
1196
+ verticalLinesNumber: {
1197
+ default: 0,
1198
+ type: Number
1199
+ },
1200
+ horizontalLines: {
1201
+ default: !1,
1202
+ type: Boolean
1203
+ },
1204
+ horizontalLinesNumber: {
1205
+ default: 0,
1206
+ type: Number
1207
+ }
1208
+ }, nl = {
1209
+ boundary: {
1210
+ required: !0,
1211
+ type: L(Object),
1212
+ default: () => {
1213
+ }
1214
+ },
1215
+ minValue: {
1216
+ type: Number,
1217
+ required: !0
1218
+ },
1219
+ maxValue: {
1220
+ type: Number,
1221
+ required: !0
1222
+ },
1223
+ xLabels: {
1224
+ type: Array
1225
+ },
1226
+ yLabels: {
1227
+ type: Number,
1228
+ required: !0
1229
+ },
1230
+ yLabelsTextFormatter: {
1231
+ default: (e) => e,
1232
+ type: Function
1233
+ }
1234
+ }, $e = E({
1235
+ name: B("TrendChartGrid"),
1236
+ props: ll,
1237
+ setup(e) {
1238
+ const t = (a) => {
1239
+ const s = e.verticalLinesNumber > 1 ? (e.boundary.maxX - e.boundary.minX) / (e.verticalLinesNumber - 1) : 0, i = e.boundary.minX + s * (a - 1), f = e.boundary.minY, c = e.boundary.maxY;
1240
+ return {
1241
+ x1: i,
1242
+ x2: i,
1243
+ y1: f,
1244
+ y2: c,
1245
+ stroke: "rgba(0,0,0,0.1)"
1246
+ };
1247
+ }, l = (a) => {
1248
+ const s = e.horizontalLinesNumber > 1 ? (e.boundary.maxY - e.boundary.minY) / (e.horizontalLinesNumber - 1) : 0, i = e.boundary.maxY - s * (a - 1), f = e.boundary.minX, c = e.boundary.maxX;
1249
+ return {
1250
+ x1: f,
1251
+ x2: c,
1252
+ y1: i,
1253
+ y2: i,
1254
+ stroke: "rgba(0,0,0,0.1)"
1255
+ };
1256
+ }, n = g(() => {
1257
+ if (e.verticalLines && e.verticalLinesNumber > 0) {
1258
+ const a = [];
1259
+ for (let s = 1; s <= e.verticalLinesNumber; s++)
1260
+ a.push(
1261
+ w("line", {
1262
+ class: "line",
1263
+ ...t(s)
1264
+ })
1265
+ );
1266
+ return w("g", { class: "vertical" }, a);
1267
+ }
1268
+ return null;
1269
+ }), o = g(() => {
1270
+ if (e.horizontalLines && e.horizontalLinesNumber > 0) {
1271
+ const a = [];
1272
+ for (let s = 1; s <= e.horizontalLinesNumber; s++)
1273
+ a.push(
1274
+ w("line", {
1275
+ class: "line",
1276
+ ...l(s)
1277
+ })
1278
+ );
1279
+ return w("g", { class: "horizontal" }, a);
1280
+ }
1281
+ return null;
1282
+ });
1283
+ return () => {
1284
+ const a = [];
1285
+ return n.value && a.push(n.value), o.value && a.push(o.value), a.length === 0 ? null : w("g", null, a);
1286
+ };
1287
+ }
1288
+ }), Fe = E({
1289
+ name: B("TrendChartLabels"),
1290
+ props: nl,
1291
+ setup(e) {
1292
+ const t = ce({
1293
+ xLabelHeight: 0,
1294
+ yLabelHeight: 0
1295
+ }), l = M(null), n = M(null), o = (f) => {
1296
+ const c = (e.boundary.maxX - e.boundary.minX) / (e.xLabels.length - 1), y = e.boundary.minX + c * f, u = e.boundary.maxY;
1297
+ return { transform: `translate(${y}, ${u})` };
1298
+ }, a = (f) => {
1299
+ const c = (e.boundary.maxY - e.boundary.minY) / (e.yLabels - 1), y = e.boundary.minX, u = e.boundary.maxY - c * f;
1300
+ return { transform: `translate(${y}, ${u})` };
1301
+ };
1302
+ W(() => {
1303
+ var f, c;
1304
+ l.value && e.xLabels && e.xLabels.length && (t.xLabelHeight = ((f = l.value.querySelector("text")) == null ? void 0 : f.getBoundingClientRect().height) || 0), n.value && e.yLabels && e.yLabels > 0 && (t.yLabelHeight = ((c = n.value.querySelector("text")) == null ? void 0 : c.getBoundingClientRect().height) || 0);
1305
+ });
1306
+ const s = g(() => e.xLabels && e.xLabels.length ? w(
1307
+ "g",
1308
+ { class: "x-labels", ref: l },
1309
+ e.xLabels.map(
1310
+ (f, c) => w("g", { class: "label", ...o(c) }, [
1311
+ w(
1312
+ "text",
1313
+ {
1314
+ dy: t.xLabelHeight + 5,
1315
+ "text-anchor": "middle"
1316
+ },
1317
+ f
1318
+ ),
1319
+ w("line", { stroke: "rgba(0,0,0,0.1)", y2: 5 })
1320
+ ])
1321
+ )
1322
+ ) : null), i = g(() => {
1323
+ if (e.yLabels && e.yLabels > 0) {
1324
+ const f = [];
1325
+ for (let c = 0; c < e.yLabels; c++)
1326
+ f.push(
1327
+ w("g", { class: "label", ...a(c) }, [
1328
+ w(
1329
+ "text",
1330
+ {
1331
+ dx: -10,
1332
+ dy: t.yLabelHeight / 4,
1333
+ "text-anchor": "end"
1334
+ },
1335
+ e.yLabelsTextFormatter(
1336
+ e.minValue + (e.maxValue - e.minValue) / (e.yLabels - 1) * c
1337
+ )
1338
+ ),
1339
+ w("line", { stroke: "rgba(0,0,0,0.1)", x1: 0, x2: -5 })
1340
+ ])
1341
+ );
1342
+ return w("g", { class: "y-labels", ref: n }, f);
1343
+ }
1344
+ return null;
1345
+ });
1346
+ return () => {
1347
+ const f = [];
1348
+ return s.value && f.push(s.value), i.value && f.push(i.value), w("g", f);
1349
+ };
1350
+ }
1351
+ }), al = (e, t, l, n, o) => {
1352
+ const a = n - 1e-3, s = (t.maxX - t.minX) / (o - 1), i = (t.maxY - t.minY) / (l + 1e-3 - a);
1353
+ return e.map((f, c) => ({
1354
+ x: c * s + t.minX,
1355
+ y: t.maxY - (f - a) * i + +(c === o - 1) * 1e-5 - +(c === 0) * 1e-5
1356
+ }));
1357
+ }, rl = (e, t, { maxY: l }) => {
1358
+ const n = e.shift(), o = e[e.length - 1], s = (e[0].x - n.x) / 2;
1359
+ let i = `M ${n.x},${n.y}`;
1360
+ e.forEach((c, y) => {
1361
+ if (!t) i += ` L${c.x},${c.y}`;
1362
+ else {
1363
+ const u = e[y - 1] || n;
1364
+ i += ` C ${s + u.x},${u.y} ${s + u.x},${c.y} ${c.x},${c.y}`;
1365
+ }
1366
+ });
1367
+ let f = i;
1368
+ return o.y !== l && (f += ` L${o.x},${l}`), n.y !== l && (f += ` L${n.x},${l}`), f += " Z", { linePath: i, fillPath: f };
1369
+ }, je = /* @__PURE__ */ E({
1370
+ name: B("TrendChartCurve"),
1371
+ props: tl,
1372
+ setup(e) {
1373
+ const t = g(() => al(e.data, e.boundary, e.maxValue, e.minValue, e.maxAmount)), l = g(() => rl([...t.value], e.smooth, e.boundary)), n = g(() => {
1374
+ var s, i, f, c, y, u, d, m, C, v, N, A;
1375
+ const o = [];
1376
+ e.fill && ((s = l.value) != null && s.fillPath) && o.push(r("path", {
1377
+ class: "x-trend-chart-fill",
1378
+ d: l.value.fillPath,
1379
+ fill: "none",
1380
+ style: {
1381
+ fill: ((f = (i = e.theme) == null ? void 0 : i.fill) == null ? void 0 : f.color) || "#585858",
1382
+ opacity: ((y = (c = e.theme) == null ? void 0 : c.fill) == null ? void 0 : y.opacity) || 0.1
1383
+ }
1384
+ }, null)), e.stroke && ((u = l.value) != null && u.linePath) && o.push(r("path", {
1385
+ class: "x-trend-chart-stroke",
1386
+ d: l.value.linePath,
1387
+ fill: "none",
1388
+ stroke: "none",
1389
+ style: {
1390
+ stroke: (m = (d = e.theme) == null ? void 0 : d.stroke) == null ? void 0 : m.color,
1391
+ strokeWidth: (v = (C = e.theme) == null ? void 0 : C.stroke) == null ? void 0 : v.width,
1392
+ opacity: (A = (N = e.theme) == null ? void 0 : N.stroke) == null ? void 0 : A.opacity
1393
+ }
1394
+ }, null));
1395
+ const a = (h) => {
1396
+ var b, k, z, T;
1397
+ return h ? {
1398
+ stroke: (k = (b = e.theme) == null ? void 0 : b.point) == null ? void 0 : k.color,
1399
+ strokeWidth: (T = (z = e.theme) == null ? void 0 : z.point) == null ? void 0 : T.width,
1400
+ r: 1
1401
+ } : {};
1402
+ };
1403
+ if (e.showPoints && t.value) {
1404
+ const h = t.value.map((b, k) => {
1405
+ var z, T;
1406
+ return r("circle", {
1407
+ class: {
1408
+ point: !0,
1409
+ "x-trend-chart-point-active": ((z = e.activeLineParams) == null ? void 0 : z.index) === k
1410
+ },
1411
+ cx: b.x,
1412
+ cy: b.y,
1413
+ style: a(((T = e.activeLineParams) == null ? void 0 : T.index) === k)
1414
+ }, null);
1415
+ });
1416
+ o.push(r("g", {
1417
+ class: "x-trend-chart-points"
1418
+ }, [h]));
1419
+ }
1420
+ return o;
1421
+ });
1422
+ return () => r("g", {
1423
+ class: e.className
1424
+ }, [n.value]);
1425
+ }
1426
+ }), ie = "#f00", Z = "#ff7126", q = "#ffc703", U = "#363636", G = "#25c341", K = "#0056ff", R = {
1427
+ DANGER: {
1428
+ // 主题色
1429
+ color: "#f00",
1430
+ // 点
1431
+ point: {
1432
+ width: 3,
1433
+ color: ie
1434
+ },
1435
+ // 描边
1436
+ stroke: {
1437
+ width: 3,
1438
+ color: ie,
1439
+ opacity: 0.8
1440
+ },
1441
+ // 填充
1442
+ fill: {
1443
+ color: ie,
1444
+ opacity: 0.1
1445
+ },
1446
+ axisLine: {
1447
+ color: ie,
1448
+ width: 2,
1449
+ opacity: 0.9
1450
+ }
1451
+ },
1452
+ STRONG: {
1453
+ // 主题色
1454
+ color: Z,
1455
+ // 点
1456
+ point: {
1457
+ width: 4,
1458
+ color: Z
1459
+ },
1460
+ stroke: {
1461
+ width: 3,
1462
+ color: Z,
1463
+ opacity: 0.8
1464
+ },
1465
+ fill: {
1466
+ color: Z,
1467
+ opacity: 0.1
1468
+ },
1469
+ axisLine: {
1470
+ color: Z,
1471
+ width: 2,
1472
+ opacity: 0.9
1473
+ }
1474
+ },
1475
+ WARNING: {
1476
+ // 主题色
1477
+ color: q,
1478
+ // 点
1479
+ point: {
1480
+ width: 4,
1481
+ color: q
1482
+ },
1483
+ stroke: {
1484
+ width: 3,
1485
+ color: q,
1486
+ opacity: 1
1487
+ },
1488
+ fill: {
1489
+ color: q,
1490
+ opacity: 0.1
1491
+ },
1492
+ axisLine: {
1493
+ color: q,
1494
+ width: 2,
1495
+ opacity: 0.9
1496
+ }
1497
+ },
1498
+ SUCCESS: {
1499
+ // 主题色
1500
+ color: G,
1501
+ // 点
1502
+ point: {
1503
+ width: 4,
1504
+ color: G
1505
+ },
1506
+ stroke: {
1507
+ width: 3,
1508
+ color: G,
1509
+ opacity: 1
1510
+ },
1511
+ fill: {
1512
+ color: G,
1513
+ opacity: 0.1
1514
+ },
1515
+ axisLine: {
1516
+ color: G,
1517
+ width: 2,
1518
+ opacity: 0.9
1519
+ }
1520
+ },
1521
+ INFO: {
1522
+ // 主题色
1523
+ color: U,
1524
+ // 点
1525
+ point: {
1526
+ width: 4,
1527
+ color: U
1528
+ },
1529
+ stroke: {
1530
+ width: 3,
1531
+ color: U,
1532
+ opacity: 1
1533
+ },
1534
+ fill: {
1535
+ color: U,
1536
+ opacity: 0.1
1537
+ },
1538
+ axisLine: {
1539
+ color: U,
1540
+ width: 2,
1541
+ opacity: 0.9
1542
+ }
1543
+ },
1544
+ PRIMARY: {
1545
+ // 主题色
1546
+ color: K,
1547
+ // 点
1548
+ point: {
1549
+ width: 4,
1550
+ color: K
1551
+ },
1552
+ stroke: {
1553
+ width: 3,
1554
+ color: K,
1555
+ opacity: 0.9
1556
+ },
1557
+ fill: {
1558
+ color: K,
1559
+ opacity: 0.1
1560
+ },
1561
+ axisLine: {
1562
+ color: K,
1563
+ width: 2,
1564
+ opacity: 0.9
1565
+ }
1566
+ }
1567
+ }, ol = /* @__PURE__ */ E({
1568
+ name: B("TrendChart"),
1569
+ components: {
1570
+ TrendChartGrid: $e,
1571
+ TrendChartLabels: Fe,
1572
+ TrendChartCurve: je
1573
+ },
1574
+ props: el,
1575
+ emits: {
1576
+ "mouse-move": (e) => !0
1577
+ },
1578
+ setup(e, {
1579
+ emit: t
1580
+ }) {
1581
+ const l = ce({
1582
+ width: null,
1583
+ height: null,
1584
+ labelsOverflowObject: {
1585
+ top: 0,
1586
+ right: 0,
1587
+ bottom: 0,
1588
+ left: 0
1589
+ },
1590
+ activeLine: null,
1591
+ activeLineParams: null
1592
+ }), n = g(() => {
1593
+ let h = R.INFO;
1594
+ return e.status === "primary" ? h = R.PRIMARY : e.status === "success" ? h = R.SUCCESS : e.status === "danger" ? h = R.DANGER : e.status === "warning" ? h = R.WARNING : e.status === "strong" && (h = R.STRONG), {
1595
+ ...h,
1596
+ ...e.theme
1597
+ };
1598
+ }), o = g(() => Jt(e.padding || "0")), a = g(() => ({
1599
+ minX: Number(o.value.left) + Number(l.labelsOverflowObject.left),
1600
+ minY: Number(o.value.top) + Number(l.labelsOverflowObject.top),
1601
+ maxX: (l.width ?? 0) - Number(o.value.right) - Number(l.labelsOverflowObject.right),
1602
+ maxY: (l.height ?? 0) - Number(o.value.bottom) - Number(l.labelsOverflowObject.bottom)
1603
+ })), s = g(() => {
1604
+ let h = -1 / 0, b = 1 / 0, k = 0;
1605
+ return h = Math.max(h, ...e.dataset), b = Math.min(b, ...e.dataset), k = Math.max(k, e.dataset.length), e.max !== void 0 && (h = Math.max(h, e.max)), e.min !== void 0 && (b = Math.min(b, e.min)), {
1606
+ maxValue: h,
1607
+ minValue: b,
1608
+ maxAmount: k
1609
+ };
1610
+ }), i = g(() => ({
1611
+ x: a.value.minX,
1612
+ y: a.value.minY,
1613
+ width: Math.max(0, a.value.maxX - a.value.minX),
1614
+ height: Math.max(0, a.value.maxY - a.value.minY),
1615
+ opacity: 0
1616
+ })), f = g(() => {
1617
+ const h = (a.value.maxX - a.value.minX) / (s.value.maxAmount - 1);
1618
+ return Array.from({
1619
+ length: s.value.maxAmount
1620
+ }, (b, k) => Math.round(a.value.minX + h * k));
1621
+ }), c = M(null), y = M(null), u = () => {
1622
+ if (c.value) {
1623
+ const h = c.value.getBoundingClientRect();
1624
+ l.width = h.width, l.height = h.height;
1625
+ }
1626
+ }, d = () => {
1627
+ if (y.value) {
1628
+ const h = c.value.getBoundingClientRect(), b = y.value.$el.getBoundingClientRect();
1629
+ l.labelsOverflowObject = {
1630
+ top: Math.max(0, Number(h.top) - Number(b.top) + Number(o.value.top)),
1631
+ right: Math.max(0, Number(b.right) - Number(h.right) + Number(o.value.right)),
1632
+ bottom: Math.max(0, Number(b.bottom) - Number(h.bottom) + Number(o.value.bottom)),
1633
+ left: Math.max(0, Number(o.value.left) - Number(b.left) + Number(h.left))
1634
+ };
1635
+ } else
1636
+ l.labelsOverflowObject = {
1637
+ top: 0,
1638
+ right: 0,
1639
+ bottom: 0,
1640
+ left: 0
1641
+ };
1642
+ }, m = () => {
1643
+ u(), Ee(d);
1644
+ }, C = (h) => f.value.reduce((b, k) => Math.abs(b - h) > Math.abs(k - h) ? k : b, 1 / 0), v = (h) => {
1645
+ if (c.value) {
1646
+ const b = c.value.getBoundingClientRect();
1647
+ l.activeLine = C(h.clientX - b.left);
1648
+ }
1649
+ }, N = () => {
1650
+ l.activeLine = null, l.activeLineParams = null;
1651
+ }, A = () => {
1652
+ u();
1653
+ };
1654
+ return W(() => {
1655
+ m(), window.addEventListener("resize", A);
1656
+ }), ue(() => {
1657
+ window.removeEventListener("resize", A);
1658
+ }), ee(() => l.activeLine, (h) => {
1659
+ if (h !== null) {
1660
+ const b = f.value.indexOf(h);
1661
+ l.activeLineParams = {
1662
+ index: b
1663
+ }, t("mouse-move", {
1664
+ ...l.activeLineParams,
1665
+ data: e.dataset[b]
1666
+ });
1667
+ } else
1668
+ t("mouse-move", null);
1669
+ }), ee(() => e.labels, () => {
1670
+ l.labelsOverflowObject = {
1671
+ top: 0,
1672
+ right: 0,
1673
+ bottom: 0,
1674
+ left: 0
1675
+ }, Ee(d);
1676
+ }, {
1677
+ deep: !0
1678
+ }), () => {
1679
+ var h, b, k, z, T, F, ae;
1680
+ return r("svg", {
1681
+ class: "x-trend-chart",
1682
+ ref: c,
1683
+ xmlns: "http://www.w3.org/2000/svg",
1684
+ width: "100%",
1685
+ height: "100%"
1686
+ }, [e.grid && r($e, {
1687
+ class: "grid",
1688
+ verticalLines: e.grid.verticalLines,
1689
+ verticalLinesNumber: e.grid.verticalLinesNumber || s.value.maxAmount,
1690
+ horizontalLines: e.grid.horizontalLines,
1691
+ horizontalLinesNumber: e.grid.horizontalLinesNumber || (((h = e.labels) == null ? void 0 : h.yLabels) ?? 0),
1692
+ boundary: a.value
1693
+ }, null), e.labels && r(Fe, ze({
1694
+ ref: y,
1695
+ class: "labels"
1696
+ }, e.labels, {
1697
+ boundary: a.value,
1698
+ minValue: s.value.minValue,
1699
+ maxValue: s.value.maxValue
1700
+ }), null), r(je, {
1701
+ class: "curve",
1702
+ data: e.dataset,
1703
+ boundary: a.value,
1704
+ minValue: s.value.minValue,
1705
+ maxValue: s.value.maxValue,
1706
+ maxAmount: s.value.maxAmount,
1707
+ activeLineParams: l.activeLineParams,
1708
+ theme: n.value
1709
+ }, null), e.interactive && r(Y, null, [r("line", {
1710
+ class: "x-trend-chart-active-line",
1711
+ x1: l.activeLine ?? a.value.minX,
1712
+ x2: l.activeLine ?? a.value.minX,
1713
+ y1: a.value.minY,
1714
+ y2: a.value.maxY,
1715
+ visibility: l.activeLine ? "visible" : "hidden",
1716
+ style: {
1717
+ stroke: (k = (b = n.value) == null ? void 0 : b.axisLine) == null ? void 0 : k.color,
1718
+ strokeWidth: (T = (z = n.value) == null ? void 0 : z.axisLine) == null ? void 0 : T.width,
1719
+ strokeOpacity: (ae = (F = n.value) == null ? void 0 : F.axisLine) == null ? void 0 : ae.opacity
1720
+ }
1721
+ }, null), r("rect", ze(i.value, {
1722
+ onMousemove: v,
1723
+ onMouseout: N
1724
+ }), null)])]);
1725
+ };
1726
+ }
1727
+ }), il = V(B("TrendChart"), ol), Ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1728
+ __proto__: null,
1729
+ XButton: le,
1730
+ XDialog: Ge,
1731
+ XMessage: Wt,
1732
+ XMessageBox: Ut,
1733
+ XNotification: Kt,
1734
+ XSpace: Be,
1735
+ XTrendChart: il
1736
+ }, Symbol.toStringTag, { value: "Module" }));
1737
+ function Ve(e) {
1738
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !O(e);
1739
+ }
1740
+ const Xe = $("dialog"), bl = (e) => {
1741
+ const t = document.createElement("div"), l = () => {
1742
+ I(null, t);
1743
+ }, n = (u) => {
1744
+ if (u === "cancel")
1745
+ return e.beforeOnCancel ? e.beforeOnCancel() : !0;
1746
+ if (u === "ok")
1747
+ return e.beforeOnOk ? e.beforeOnOk() : !0;
1748
+ }, o = (u, d) => {
1749
+ u === "cancel" && e.onCancel && e.onCancel(d), u === "ok" && e.onOk && e.onOk(d);
1750
+ }, a = (u) => {
1751
+ if (O(u)) return u;
1752
+ if (S(u)) {
1753
+ const d = u();
1754
+ return O(d) ? d : null;
1755
+ }
1756
+ return r("div", {
1757
+ class: Xe.element("header-title")
1758
+ }, [p(" "), u, p(" ")]);
1759
+ }, s = (u) => {
1760
+ if (O(u)) return u;
1761
+ if (S(u)) {
1762
+ const d = u();
1763
+ return O(d) ? d : null;
1764
+ }
1765
+ return r("div", {
1766
+ class: Xe.element("content")
1767
+ }, [p(" "), e.content, p(" ")]);
1768
+ }, i = () => () => r(Y, null, [e.title && a(e.title)]), f = () => () => r(Y, null, [e.content && s(e.content)]), c = () => {
1769
+ if (O(e.footer) || S(e.footer))
1770
+ return e.footer;
1771
+ const u = (e == null ? void 0 : e.cancelText) || "取消", d = (e == null ? void 0 : e.okText) || "确认";
1772
+ return (m) => r(Be, {
1773
+ size: 12
1774
+ }, {
1775
+ default: () => {
1776
+ var C, v;
1777
+ return [!e.hideCancel && r(le, {
1778
+ size: "small",
1779
+ onClick: m.cancel,
1780
+ loading: (C = m.loadingObj) == null ? void 0 : C.cancel
1781
+ }, Ve(u) ? u : {
1782
+ default: () => [u]
1783
+ }), !e.hideOk && r(le, {
1784
+ type: "primary",
1785
+ size: "small",
1786
+ onClick: m.ok,
1787
+ loading: (v = m.loadingObj) == null ? void 0 : v.ok
1788
+ }, Ve(d) ? d : {
1789
+ default: () => [d]
1790
+ })];
1791
+ }
1792
+ });
1793
+ }, y = r(Ue, {
1794
+ width: (e == null ? void 0 : e.width) ?? 368,
1795
+ height: (e == null ? void 0 : e.height) ?? "auto",
1796
+ modelValue: !0,
1797
+ renderTo: e == null ? void 0 : e.renderTo,
1798
+ center: e != null && e.top ? !1 : (e == null ? void 0 : e.center) ?? !0,
1799
+ top: (e == null ? void 0 : e.top) ?? 0,
1800
+ mask: (e == null ? void 0 : e.mask) ?? !0,
1801
+ maskToClose: (e == null ? void 0 : e.maskToClose) ?? !0,
1802
+ popupClass: e.popupClass,
1803
+ onClose: o,
1804
+ onBeforeCancel: n,
1805
+ "onUpdate:modelValue": () => {
1806
+ y.component.props.modelValue = !1;
1807
+ },
1808
+ // 等待动画完全结束后销毁vm
1809
+ onClosed: l,
1810
+ onOpened: () => {
1811
+ }
1812
+ }, {
1813
+ title: i(),
1814
+ default: f(),
1815
+ footer: c()
1816
+ });
1817
+ I(y, t);
1818
+ }, sl = ["success", "warning", "error", "strong", "info"], cl = E({
1819
+ name: B("Message"),
1820
+ components: {
1821
+ CloseCircleFill: me,
1822
+ CheckCircleFill: he,
1823
+ ExclamationCircleFill: ye,
1824
+ InfoCircleFill: ge,
1825
+ MinusCircleFill: ve
1826
+ },
1827
+ props: {
1828
+ id: {
1829
+ type: String,
1830
+ default: ""
1831
+ },
1832
+ message: {
1833
+ type: [String, Number, Object],
1834
+ default: ""
1835
+ },
1836
+ type: {
1837
+ type: String,
1838
+ default: "success"
1839
+ },
1840
+ duration: {
1841
+ type: Number,
1842
+ default: 1500
1843
+ },
1844
+ center: {
1845
+ type: Boolean,
1846
+ default: !1
1847
+ },
1848
+ onClose: {
1849
+ type: Function,
1850
+ default: () => {
1851
+ }
1852
+ },
1853
+ offset: {
1854
+ type: Number,
1855
+ default: 20
1856
+ },
1857
+ zIndex: {
1858
+ type: Number,
1859
+ default: 0
1860
+ },
1861
+ showClose: {
1862
+ type: Boolean,
1863
+ default: !1
1864
+ },
1865
+ useHTML: Boolean,
1866
+ popupClass: {
1867
+ type: String,
1868
+ default: void 0
1869
+ }
1870
+ },
1871
+ emits: ["destroy"],
1872
+ setup(e) {
1873
+ const t = $("message"), l = g(() => [
1874
+ t.block,
1875
+ t.modifier(e.type),
1876
+ e.center && t.modifier("center"),
1877
+ e.showClose && !e.center && t.element("show-close"),
1878
+ e.popupClass && e.popupClass
1879
+ ]), n = M(!1);
1880
+ let o = null;
1881
+ const a = () => {
1882
+ o = setTimeout(() => {
1883
+ n.value = !1;
1884
+ }, e.duration);
1885
+ };
1886
+ W(() => {
1887
+ n.value = !0, e.duration !== 0 && a();
1888
+ }), ue(() => {
1889
+ clearTimeout(o);
1890
+ });
1891
+ const { zIndex: s } = fe("message", { runOnMounted: !0 }), i = g(() => ({
1892
+ top: `${e.offset}px`,
1893
+ zIndex: s.value
1894
+ }));
1895
+ return {
1896
+ cn: t,
1897
+ cls: l,
1898
+ styles: i,
1899
+ visible: n,
1900
+ handleClose: () => {
1901
+ n.value = !1;
1902
+ }
1903
+ };
1904
+ }
1905
+ }), ul = (e, t) => {
1906
+ const l = e.__vccOpts || e;
1907
+ for (const [n, o] of t)
1908
+ l[n] = o;
1909
+ return l;
1910
+ }, dl = ["innerHTML"], fl = { key: 1 };
1911
+ function ml(e, t, l, n, o, a) {
1912
+ const s = _("CheckCircleFill"), i = _("ExclamationCircleFill"), f = _("MinusCircleFill"), c = _("CloseCircleFill"), y = _("InfoCircleFill");
1913
+ return P(), H(te, {
1914
+ name: "x-message-slide-top",
1915
+ onBeforeLeave: e.onClose,
1916
+ onAfterLeave: t[1] || (t[1] = (u) => e.$emit("destroy"))
1917
+ }, {
1918
+ default: st(() => [
1919
+ ct(ut("div", {
1920
+ class: Ce(e.cls),
1921
+ style: dt(e.styles)
1922
+ }, [
1923
+ e.$slots.icon ? xe("", !0) : (P(), oe("span", {
1924
+ key: 0,
1925
+ class: Ce([e.cn.element("icon"), e.cn.modifier(`icon-${e.type}`)])
1926
+ }, [
1927
+ Pe(e.$slots, "icon", {}, () => [
1928
+ e.type === "success" ? (P(), H(s, { key: 0 })) : e.type === "warning" ? (P(), H(i, { key: 1 })) : e.type === "strong" ? (P(), H(f, { key: 2 })) : e.type === "error" ? (P(), H(c, { key: 3 })) : e.type === "info" ? (P(), H(y, { key: 4 })) : xe("", !0)
1929
+ ])
1930
+ ], 2)),
1931
+ Pe(e.$slots, "default", {}, () => [
1932
+ e.useHTML ? (P(), oe("span", {
1933
+ key: 0,
1934
+ innerHTML: e.message
1935
+ }, null, 8, dl)) : (P(), oe("span", fl, ft(e.message), 1)),
1936
+ e.showClose ? (P(), oe("span", {
1937
+ key: 2,
1938
+ class: Ce([e.cn.element("close-icon")]),
1939
+ onClick: t[0] || (t[0] = (...u) => e.handleClose && e.handleClose(...u))
1940
+ }, null, 2)) : xe("", !0)
1941
+ ])
1942
+ ], 6), [
1943
+ [mt, e.visible]
1944
+ ])
1945
+ ]),
1946
+ _: 3
1947
+ }, 8, ["onBeforeLeave"]);
1948
+ }
1949
+ const hl = /* @__PURE__ */ ul(cl, [["render", ml]]), Le = /* @__PURE__ */ new WeakMap(), Ne = (e) => {
1950
+ (typeof e == "string" || O(e)) && (e = {
1951
+ message: e
1952
+ });
1953
+ const t = Se(e.renderTo || "body"), l = document.createElement("div");
1954
+ Le.has(t) || Le.set(t, []);
1955
+ const n = Le.get(t);
1956
+ let o = e.offset || 20;
1957
+ n.forEach((u) => {
1958
+ var d;
1959
+ o += ((d = u.el) == null ? void 0 : d.offsetHeight) + 20;
1960
+ });
1961
+ const a = e.onClose;
1962
+ let s = {};
1963
+ s = { ...e, onClose: () => {
1964
+ var m;
1965
+ const u = n.findIndex((C) => C === c);
1966
+ if (u < 0) return;
1967
+ const d = ((m = c.el) == null ? void 0 : m.offsetHeight) + 20;
1968
+ n.slice(u + 1).forEach((C) => {
1969
+ var N;
1970
+ const v = (N = C.component) == null ? void 0 : N.props.offset;
1971
+ C.component.props.offset = v - d;
1972
+ }), n.splice(u, 1), a && a(c);
1973
+ }, onDestroy: () => {
1974
+ I(null, l);
1975
+ }, offset: o };
1976
+ const c = r(
1977
+ hl,
1978
+ s,
1979
+ S(s.message) || O(s.message) ? {
1980
+ default: S(s.message) ? s.message : () => s.message
1981
+ } : null
1982
+ );
1983
+ return I(c, l), t.tagName === "BODY" ? c.el.style.position = "fixed" : (t.style.position = "relative", c.el.style.position = "absolute"), t.appendChild(l.firstElementChild), n.push(c), {
1984
+ close: () => {
1985
+ c.component.proxy.handleClose();
1986
+ }
1987
+ };
1988
+ }, yl = () => {
1989
+ sl.forEach((e) => {
1990
+ Ne[e] = (t) => Ye(t) ? Ne({
1991
+ type: e,
1992
+ ...t
1993
+ }) : Ne({
1994
+ message: t,
1995
+ type: e
1996
+ });
1997
+ });
1998
+ };
1999
+ yl();
2000
+ const J = /* @__PURE__ */ new WeakMap(), Cl = (e) => {
2001
+ const t = Se(e.renderTo || "body"), l = document.createElement("div");
2002
+ J.get(t) || J.set(t, {}), J.get(t)[e.position] || (J.get(t)[e.position] = []);
2003
+ const n = J.get(t)[e.position];
2004
+ let o = e.offset || 20;
2005
+ n.forEach((y) => {
2006
+ var u;
2007
+ o += ((u = y.el) == null ? void 0 : u.offsetHeight) + 20;
2008
+ });
2009
+ const a = t.tagName === "BODY";
2010
+ a || (t.style.position = "relative", t.style.overflowX = "hidden");
2011
+ const s = e.onClose, i = () => {
2012
+ var d;
2013
+ const y = n.findIndex((m) => m === c);
2014
+ if (y < 0) return;
2015
+ const u = ((d = c.el) == null ? void 0 : d.offsetHeight) + 20;
2016
+ n.slice(y + 1).forEach((m) => {
2017
+ var v;
2018
+ const C = (v = m.component) == null ? void 0 : v.props.offset;
2019
+ m.component.props.offset = C - u;
2020
+ }), n.splice(y, 1), s && s(c);
2021
+ }, f = () => {
2022
+ I(null, l);
2023
+ }, c = r(
2024
+ Ke,
2025
+ {
2026
+ message: e.message,
2027
+ title: e.title,
2028
+ type: e.type,
2029
+ offset: o,
2030
+ renderToBody: a,
2031
+ position: e.position,
2032
+ duration: e.duration ?? 3e3,
2033
+ showClose: e.showClose ?? !0,
2034
+ onClose: i,
2035
+ onDestroy: f
2036
+ },
2037
+ S(e.message) || O(e.message) ? {
2038
+ default: S(e.message) ? e.message : () => e.message
2039
+ } : null
2040
+ );
2041
+ I(c, l), n.push(c), t == null || t.appendChild(l.firstChild);
2042
+ }, xl = {
2043
+ install: function(e) {
2044
+ Object.keys(Ie).forEach((t) => {
2045
+ const l = Ie[t];
2046
+ l.install && e.use(l);
2047
+ });
2048
+ }
2049
+ };
2050
+ export {
2051
+ bl as Dialog,
2052
+ Ne as Message,
2053
+ Oe as MessageBox,
2054
+ Cl as Notification,
2055
+ R as TrendChartTheme,
2056
+ le as XButton,
2057
+ Ge as XDialog,
2058
+ Wt as XMessage,
2059
+ Ut as XMessageBox,
2060
+ Kt as XNotification,
2061
+ Be as XSpace,
2062
+ il as XTrendChart,
2063
+ xl as default
2064
+ };