sky-ui-kit 0.0.0-stage → 0.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.
@@ -0,0 +1,1550 @@
1
+ import * as v from "element-plus";
2
+ import { ElSelectV2 as Sn, ElIcon as ee, ElDatePicker as $n, ElTree as Dn, ElEmpty as En } from "element-plus";
3
+ import { defineComponent as ie, ref as P, h as Dt, isVNode as In, computed as s, openBlock as d, createBlock as K, unref as C, mergeProps as Pn, useSlots as Un, watch as R, nextTick as be, onMounted as Pt, onBeforeUnmount as Ut, createElementBlock as b, normalizeClass as N, createElementVNode as u, createVNode as L, withCtx as j, toDisplayString as $, renderSlot as An, withKeys as Oe, withModifiers as de, normalizeStyle as Ee, Fragment as z, renderList as se, createCommentVNode as G, withDirectives as Ye, vModelText as At, Transition as Bn, resolveDynamicComponent as it, vShow as Bt } from "vue";
4
+ import { VideoPause as Ln, VideoPlay as Nn, ArrowLeft as Vn, ArrowRight as Rn, RefreshRight as Lt, ArrowDown as Fn, DataAnalysis as Nt, Pouring as On, List as ot, TrendCharts as Et, Sunny as Yn, WindPower as jn, Search as zn, Monitor as Wn, LocationFilled as Hn, Grid as Gn, Operation as Jn, Aim as Zn, Setting as Kn, Mouse as Qn, DArrowRight as qn, DArrowLeft as Xn } from "@element-plus/icons-vue";
5
+ import { motion as st } from "motion-v";
6
+ function m(i) {
7
+ return ie({
8
+ inheritAttrs: !1,
9
+ setup(T, { attrs: n, slots: h, expose: p }) {
10
+ const c = P();
11
+ return p(new Proxy({}, { get: (x, g) => {
12
+ var f;
13
+ return (f = c.value) == null ? void 0 : f[g];
14
+ }, has: (x, g) => g in (c.value || {}) })), () => Dt("div", { class: "userssite-theme", style: "display: contents" }, [Dt(i, {
15
+ ...n,
16
+ ref: c,
17
+ ...ea(i, n),
18
+ class: ["userssite-theme", n.class]
19
+ }, h)]);
20
+ }
21
+ });
22
+ }
23
+ const Sl = m(v.ElAlert), $l = m(v.ElBadge), Dl = m(v.ElButton), El = m(v.ElButtonGroup), Il = m(v.ElCard), Pl = m(v.ElCarousel), Ul = m(v.ElCarouselItem), Al = m(v.ElCascader), Bl = m(v.ElCheckbox), Ll = m(v.ElCol), Nl = m(v.ElCollapse), Vl = m(v.ElCollapseItem), Rl = m(v.ElColorPicker), Fl = v.ElConfigProvider, Ol = m(v.ElDatePicker), Yl = m(v.ElDescriptions), jl = m(v.ElDescriptionsItem), zl = m(v.ElDialog), Wl = m(v.ElDrawer), Hl = m(v.ElDropdown), Gl = m(v.ElDropdownItem), Jl = m(v.ElDropdownMenu), Zl = m(v.ElEmpty), Kl = m(v.ElFooter), Ql = m(v.ElForm), ql = m(v.ElFormItem), Xl = m(v.ElIcon), eo = m(v.ElImage), to = m(v.ElInput), no = m(v.ElInputNumber), ao = ut(v.ElMessage), lo = ut(v.ElMessageBox), oo = ut(v.ElNotification), so = v.ElOption, io = m(v.ElPagination), uo = m(v.ElPopconfirm), ro = m(v.ElPopover), co = m(v.ElProgress), vo = m(v.ElRadio), mo = m(v.ElRadioGroup), fo = m(v.ElRate), po = m(v.ElRow), ho = m(v.ElScrollbar), bo = m(v.ElSelect), yo = m(v.ElSelectV2), go = m(v.ElSlider), _o = m(v.ElSwitch), ko = v.ElTabPane, xo = m(v.ElTable), To = v.ElTableColumn, Mo = m(v.ElTabs), wo = m(v.ElTag), Co = m(v.ElTooltip), So = m(v.ElTree), $o = m(v.ElTreeSelect), Do = m(v.ElUpload), Eo = m(v.ElCheckboxGroup), Io = m(v.ElRadioButton), Po = m(v.ElDivider), Uo = {
24
+ ...v.ElLoadingDirective,
25
+ mounted(i, T, n, h) {
26
+ var p, c;
27
+ i.classList.add("userssite-theme"), (c = (p = v.ElLoadingDirective).mounted) == null || c.call(p, i, It(i, T), n, h);
28
+ },
29
+ updated(i, T, n, h) {
30
+ var p, c;
31
+ (c = (p = v.ElLoadingDirective).updated) == null || c.call(p, i, It(i, T), n, h);
32
+ }
33
+ };
34
+ function It(i, T) {
35
+ if (!T.value)
36
+ return T;
37
+ const n = typeof T.value == "object" ? T.value : Object.fromEntries(["text", "svg", "svgViewBox", "spinner", "background"].map((h) => [h, i.getAttribute("element-loading-" + h.replace(/[A-Z]/g, (p) => "-" + p.toLowerCase()))]));
38
+ return { ...T, value: { ...n, customClass: ["userssite-theme", n.customClass || i.getAttribute("element-loading-custom-class") || ""].join(" ") } };
39
+ }
40
+ function ea(i, T) {
41
+ const n = i.props || {}, h = {}, p = (c) => Array.isArray(n) ? n.includes(c) : c in n;
42
+ p("teleported") && (h.teleported = T.teleported ?? !1);
43
+ for (const c of ["popperClass", "modalClass"])
44
+ p(c) && (h[c] = ["userssite-theme", T[c] || T[c.replace(/[A-Z]/g, (x) => "-" + x.toLowerCase())] || ""].join(" "));
45
+ return h;
46
+ }
47
+ function ut(i) {
48
+ const T = (n) => ({ ...typeof n == "object" && n !== null && !In(n) ? n : { message: n }, customClass: ["userssite-theme", (n == null ? void 0 : n.customClass) || ""].join(" ") });
49
+ return new Proxy(i, {
50
+ apply(n, h, p) {
51
+ return Reflect.apply(n, h, [T(p[0]), ...p.slice(1)]);
52
+ },
53
+ get(n, h) {
54
+ const p = n[h];
55
+ return ["success", "warning", "info", "error"].includes(String(h)) ? (c) => p(T(c)) : ["alert", "confirm", "prompt"].includes(String(h)) ? (c, x, g) => typeof x == "string" ? p(c, x, T(g || {})) : p(c, T(x || {})) : p;
56
+ }
57
+ });
58
+ }
59
+ const ta = /* @__PURE__ */ ie({
60
+ __name: "AppSelect",
61
+ props: {
62
+ modelValue: { type: [String, Number, Boolean, Object, Array, null], default: void 0 },
63
+ options: { default: () => [] },
64
+ emptyLabel: { default: "暂无可选项" },
65
+ popperClass: { default: "" },
66
+ teleported: { type: Boolean, default: !1 }
67
+ },
68
+ emits: ["update:modelValue", "change"],
69
+ setup(i, { emit: T }) {
70
+ const n = i, h = T, p = s(() => n.options.map((f) => typeof f == "object" && f !== null ? {
71
+ label: f.label,
72
+ value: f.value,
73
+ disabled: f.disabled
74
+ } : {
75
+ label: String(f),
76
+ value: f
77
+ })), c = s(() => ["userssite-app-select-popper", n.popperClass].filter(Boolean).join(" ")), x = (f) => {
78
+ h("update:modelValue", f);
79
+ }, g = (f) => {
80
+ h("change", f);
81
+ };
82
+ return (f, _) => (d(), K(C(Sn), Pn(f.$attrs, {
83
+ class: "userssite-app-select",
84
+ "model-value": i.modelValue,
85
+ options: p.value,
86
+ "no-data-text": i.emptyLabel,
87
+ "no-match-text": i.emptyLabel,
88
+ "popper-class": c.value,
89
+ teleported: i.teleported,
90
+ "onUpdate:modelValue": x,
91
+ onChange: g
92
+ }), null, 16, ["model-value", "options", "no-data-text", "no-match-text", "popper-class", "teleported"]));
93
+ }
94
+ });
95
+ const na = { class: "timeline-controls" }, aa = ["aria-label"], la = {
96
+ class: "timeline-button-group",
97
+ role: "group",
98
+ "aria-label": "时间步进"
99
+ }, oa = {
100
+ key: 0,
101
+ class: "timeline-date-slot"
102
+ }, sa = { class: "timeline-body" }, ia = ["aria-valuemax", "aria-valuenow", "aria-valuetext"], ua = ["title", "disabled", "onClick"], ra = { class: "timeline-segment-label" }, ca = {
103
+ key: 1,
104
+ class: "timeline-scale"
105
+ }, da = { class: "timeline-scale-item timeline-scale-window-start is-forecast" }, va = { class: "timeline-scale-item timeline-scale-window-end is-forecast" }, ma = {
106
+ key: 0,
107
+ class: "timeline-scale-item timeline-scale-observed"
108
+ }, fa = {
109
+ key: 2,
110
+ class: "timeline-scale-item timeline-scale-forecast"
111
+ }, pa = /* @__PURE__ */ ie({
112
+ __name: "MapTimeline",
113
+ props: {
114
+ modelValue: { default: 0 },
115
+ startTime: { default: () => /* @__PURE__ */ new Date() },
116
+ points: { default: () => [] },
117
+ steps: { default: 24 },
118
+ pastSteps: {},
119
+ futureSteps: {},
120
+ interval: { default: 1 },
121
+ unit: { default: "hour" },
122
+ playing: { type: Boolean, default: !1 },
123
+ speed: { default: 1 },
124
+ speeds: { default: () => [0.5, 1, 2, 4] },
125
+ internalPlayback: { type: Boolean, default: !0 },
126
+ pageSize: { default: 24 },
127
+ loop: { type: Boolean, default: !0 },
128
+ minTime: {},
129
+ maxTime: {},
130
+ forecastCount: {},
131
+ showScale: { type: Boolean, default: !0 },
132
+ showCurrentMarker: { type: Boolean, default: !0 },
133
+ timeZone: {}
134
+ },
135
+ emits: ["update:modelValue", "update:startTime", "update:playing", "update:speed", "change", "play", "pause"],
136
+ setup(i, { emit: T }) {
137
+ const n = i, h = T, p = Un(), c = P(null), x = /* @__PURE__ */ new Map(), g = P(n.playing), f = P(n.speed), _ = P(0), y = P(null), U = P(n.startTime), F = P(""), W = P("");
138
+ let O = null, ve = null, fe = 0, te = !1;
139
+ const ye = s(() => !!p["date-select"]), D = s(() => Je(U.value)), J = s(() => Math.max(1, n.interval)), we = s(() => Ne(n.minTime)), Ce = s(() => Ne(n.maxTime)), Q = s(() => Math.max(1, Math.floor(Number(n.pageSize) || 24))), ne = s(() => !Array.isArray(n.points) || !n.points.length ? [] : n.points.map((e, t) => {
140
+ const a = Je(e.time || e.value || n.startTime);
141
+ return {
142
+ index: typeof e.index == "number" ? e.index : t,
143
+ offset: typeof e.offset == "number" ? e.offset : t,
144
+ time: a,
145
+ value: e.value || a.toISOString(),
146
+ label: e.label || $e(a, n.unit),
147
+ kind: e.kind || "forecast",
148
+ disabled: !!e.disabled || Ze(a)
149
+ };
150
+ })), E = s(() => ne.value.length > 0), Ie = s(() => {
151
+ if (!ne.value.length)
152
+ return;
153
+ const e = ne.value.map((t) => t.time.getTime());
154
+ return {
155
+ min: new Date(Math.min(...e)),
156
+ max: new Date(Math.max(...e))
157
+ };
158
+ }), ae = s(() => {
159
+ var e;
160
+ return Ne(n.minTime) || ((e = Ie.value) == null ? void 0 : e.min);
161
+ }), pe = s(() => {
162
+ var e;
163
+ return Ne(n.maxTime) || ((e = Ie.value) == null ? void 0 : e.max) || D.value;
164
+ }), ue = s(() => !E.value && (n.unit === "minute" && J.value === 60 || n.unit === "hour" && J.value === 1)), le = s(() => !E.value && n.unit === "day" && J.value >= 10 && J.value <= 11), q = s(() => !E.value && n.unit === "day" && !le.value), he = s(() => !E.value && n.unit === "month"), Z = s(() => ue.value || q.value || he.value || le.value), Pe = s(() => Math.min(Math.max(D.value.getHours(), 0), 23)), je = s(() => Math.min(Math.max(D.value.getDate() - 1, 0), Qe(D.value) - 1)), Ue = s(() => Math.min(Math.max(D.value.getMonth(), 0), 11)), k = s(() => _t(D.value)), M = s(() => ue.value ? Pe.value : q.value ? je.value : he.value ? Ue.value : le.value ? k.value : 0), A = s(() => ue.value ? 24 : q.value ? Qe(D.value) : he.value ? 12 : le.value ? 3 : 0), Y = s(() => Math.max(0, _.value) * Q.value), rt = s(() => Math.max(1, Math.ceil(ne.value.length / Q.value))), I = s(() => E.value ? 0 : Z.value ? M.value : typeof n.pastSteps == "number" ? Math.max(0, n.pastSteps) : Math.floor((Math.max(1, n.steps) - 1) / 2)), re = s(() => E.value ? Math.min(Q.value, ne.value.length) : Z.value ? Math.max(0, A.value - M.value - 1) : typeof n.futureSteps == "number" ? Math.max(0, n.futureSteps) : Math.max(0, Math.max(1, n.steps) - I.value - 1)), ke = s(() => !E.value && I.value > 0 && re.value > 0), ze = s(() => Z.value ? A.value : Math.max(1, I.value + re.value + (ke.value ? 1 : 0))), Ae = s(() => !E.value), w = s(() => {
165
+ if (E.value)
166
+ return ne.value.slice(Y.value, Y.value + Q.value);
167
+ if (Z.value)
168
+ return Array.from({ length: A.value }, (t, a) => {
169
+ const l = un(a), o = a <= M.value ? "observed" : "forecast";
170
+ return {
171
+ index: a,
172
+ offset: a - M.value,
173
+ time: l,
174
+ value: l.toISOString(),
175
+ label: $e(l, n.unit),
176
+ kind: o,
177
+ disabled: Ze(l)
178
+ };
179
+ });
180
+ const e = ze.value;
181
+ return Array.from({ length: e }, (t, a) => {
182
+ const l = en(a), o = ce(D.value, J.value * l, n.unit), r = tn(a);
183
+ return {
184
+ index: a,
185
+ offset: l,
186
+ time: o,
187
+ value: o.toISOString(),
188
+ label: $e(o, n.unit),
189
+ kind: r,
190
+ disabled: Ze(o)
191
+ };
192
+ });
193
+ }), ge = s(() => {
194
+ var t, a, l;
195
+ if (E.value) {
196
+ const o = w.value.findIndex((S) => S.index === n.modelValue), r = o >= 0 ? o : Math.min(Math.max(Number(n.modelValue) - Y.value, 0), w.value.length - 1);
197
+ return (t = w.value[r]) != null && t.disabled ? X(r) : r;
198
+ }
199
+ if (Z.value) {
200
+ const o = Number(n.modelValue), r = Math.min(Math.max(Number.isFinite(o) ? o : M.value, 0), A.value - 1);
201
+ return (a = w.value[r]) != null && a.disabled ? X(r) : r;
202
+ }
203
+ const e = Math.min(Math.max(n.modelValue, 0), w.value.length - 1);
204
+ return (l = w.value[e]) != null && l.disabled ? X(e) : e;
205
+ }), ct = s(() => Math.max(w.value.length - 1, 0)), _e = s(() => Math.min(Math.max(Math.floor(ge.value), 0), ct.value)), Be = s(() => Math.min(Math.max(ge.value, 0), ct.value)), xe = s(() => w.value[_e.value]), dt = s(() => {
206
+ var e;
207
+ return ((e = xe.value) == null ? void 0 : e.label) || "";
208
+ }), vt = s(() => {
209
+ var e;
210
+ return ((e = xe.value) == null ? void 0 : e.kind) || "forecast";
211
+ }), Vt = s(() => n.unit === "year" ? "year" : n.unit === "month" ? "month" : n.unit === "day" ? "date" : "datetime"), Rt = s(() => n.unit === "year" ? "YYYY" : n.unit === "month" ? "YYYY-MM" : n.unit === "day" ? "MM-DD" : "YYYY-MM-DD HH:mm"), mt = s(() => _.value === 0), ft = s(() => n.showScale), Ft = s(() => !!((we.value || Ce.value) && (typeof n.forecastCount == "number" && Number.isFinite(n.forecastCount) && n.forecastCount > 0 || E.value))), Ot = s(() => Tt(we.value)), Yt = s(() => Tt(Ce.value)), jt = s(() => w.value.some((e) => e.kind === "observed")), zt = s(() => w.value.some((e) => e.kind === "forecast")), We = s(() => n.showCurrentMarker && mt.value && I.value > 0 && re.value > 0), Wt = s(() => {
212
+ var e;
213
+ return ((e = w.value.find((t) => t.kind === "observed")) == null ? void 0 : e.label) || "";
214
+ }), Ht = s(() => $e(D.value, n.unit)), Gt = s(() => {
215
+ var e;
216
+ return ((e = [...w.value].reverse().find((t) => t.kind === "forecast")) == null ? void 0 : e.label) || "";
217
+ }), Jt = s(() => {
218
+ var e;
219
+ return ((e = w.value[0]) == null ? void 0 : e.label) || "";
220
+ }), Zt = s(() => {
221
+ var e;
222
+ return ((e = w.value[w.value.length - 1]) == null ? void 0 : e.label) || "";
223
+ }), Kt = s(() => _.value < 0 ? "历史" : "预报"), He = s(() => _.value < 0 ? "is-observed" : "is-forecast"), Se = s(() => Math.max(w.value.length, 1)), pt = s(() => W.value ? W.value : Z.value ? Le(M.value + 1) : I.value <= 0 ? "0%" : I.value >= Se.value ? "100%" : ke.value ? Le(I.value + 1) : Le(I.value)), Qt = s(() => F.value ? F.value : Ae.value ? Le(Be.value + 1) : Be.value === 0 ? "0%" : Be.value >= Se.value - 1 ? "100%" : an(Be.value)), qt = s(() => ({
224
+ "is-start": !Ae.value && _e.value === 0,
225
+ "is-end": _e.value >= Se.value - 1,
226
+ "is-observed": vt.value === "observed",
227
+ "is-forecast": vt.value === "forecast"
228
+ })), Ge = s(() => w.value.map((e, t) => ({
229
+ key: `${e.index}-${e.value}`,
230
+ startIndex: t,
231
+ kind: e.kind,
232
+ title: $e(e.time, n.unit),
233
+ label: vn(e),
234
+ disabled: !!e.disabled
235
+ }))), Xt = s(() => `repeat(${Math.max(Ge.value.length, 1)}, minmax(0, 1fr))`);
236
+ function en(e) {
237
+ const t = ze.value;
238
+ return I.value <= 0 ? _.value * t + e : _.value > 0 ? re.value + (_.value - 1) * t + e + 1 : _.value < 0 ? -I.value + _.value * t + e : e < I.value ? e - I.value : ke.value && e === I.value ? 0 : e - I.value + (ke.value ? 0 : 1);
239
+ }
240
+ function tn(e) {
241
+ return _.value > 0 ? "forecast" : _.value < 0 ? "observed" : ke.value ? e <= I.value ? "observed" : "forecast" : e < I.value ? "observed" : "forecast";
242
+ }
243
+ function nn(e) {
244
+ return `${Number(e.toFixed(6))}%`;
245
+ }
246
+ function ht(e, t) {
247
+ const a = nn(e), l = Number(t.toFixed(6));
248
+ return Math.abs(l) < 1e-6 ? a : l > 0 ? `calc(${a} + var(--timeline-segment-gap) * ${l})` : `calc(${a} - var(--timeline-segment-gap) * ${Math.abs(l)})`;
249
+ }
250
+ function an(e) {
251
+ const t = Se.value, a = (e + 0.5) / t * 100, l = e - (e + 0.5) * (t - 1) / t;
252
+ return ht(a, l);
253
+ }
254
+ function Le(e) {
255
+ const t = Se.value, a = e / t * 100, l = e / t - 0.5;
256
+ return ht(a, l);
257
+ }
258
+ function ln(e, t) {
259
+ t instanceof HTMLElement ? (x.set(e, t), Te()) : x.delete(e);
260
+ }
261
+ function bt(e, t = "center") {
262
+ const a = c.value, l = x.get(e);
263
+ if (!a || !l)
264
+ return "";
265
+ const o = a.getBoundingClientRect(), r = l.getBoundingClientRect();
266
+ if (!o.width)
267
+ return "";
268
+ const S = t === "end" ? r.right - o.left : r.left + r.width / 2 - o.left;
269
+ return `${Number(S.toFixed(3))}px`;
270
+ }
271
+ function on() {
272
+ F.value = E.value ? "" : bt(_e.value, Ae.value ? "end" : "center"), W.value = We.value ? bt(Z.value ? M.value : I.value, Ae.value ? "end" : "center") : "";
273
+ }
274
+ function Te() {
275
+ fe || (fe = window.requestAnimationFrame(() => {
276
+ fe = 0, on();
277
+ }));
278
+ }
279
+ function Je(e) {
280
+ const t = new Date(e);
281
+ return Number.isNaN(t.getTime()) ? /* @__PURE__ */ new Date() : t;
282
+ }
283
+ function Ne(e) {
284
+ if (e == null || e === "")
285
+ return null;
286
+ const t = new Date(e);
287
+ return Number.isNaN(t.getTime()) ? null : t;
288
+ }
289
+ function B(e, t = n.timeZone) {
290
+ if (!t)
291
+ return { year: e.getFullYear(), month: e.getMonth() + 1, day: e.getDate(), hour: e.getHours(), minute: e.getMinutes(), second: e.getSeconds() };
292
+ const a = new Intl.DateTimeFormat("en-US", { timeZone: t, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", hourCycle: "h23" }).formatToParts(e), l = (o) => {
293
+ var r;
294
+ return Number(((r = a.find((S) => S.type === o)) == null ? void 0 : r.value) || 0);
295
+ };
296
+ return { year: l("year"), month: l("month"), day: l("day"), hour: l("hour"), minute: l("minute"), second: l("second") };
297
+ }
298
+ function yt(e) {
299
+ if (!n.timeZone)
300
+ return new Date(e);
301
+ const t = B(e);
302
+ return new Date(t.year, t.month - 1, t.day, t.hour, t.minute, t.second);
303
+ }
304
+ function sn(e) {
305
+ if (!n.timeZone)
306
+ return e;
307
+ const t = { year: e.getFullYear(), month: e.getMonth() + 1, day: e.getDate(), hour: e.getHours(), minute: e.getMinutes(), second: e.getSeconds() }, a = Date.UTC(t.year, t.month - 1, t.day, t.hour, t.minute, t.second);
308
+ let l = a;
309
+ for (let o = 0; o < 3; o += 1) {
310
+ const r = B(new Date(l));
311
+ l += a - Date.UTC(r.year, r.month - 1, r.day, r.hour, r.minute, r.second);
312
+ }
313
+ return new Date(l);
314
+ }
315
+ function Ze(e) {
316
+ const t = we.value, a = Ce.value;
317
+ return !!(t && e.getTime() < t.getTime() || a && e.getTime() > a.getTime());
318
+ }
319
+ function Ve(e) {
320
+ const t = new Date(e);
321
+ return t.setHours(0, 0, 0, 0), t;
322
+ }
323
+ function Ke(e) {
324
+ const t = Ve(e);
325
+ return t.setDate(1), t;
326
+ }
327
+ function gt(e) {
328
+ const t = Ve(e);
329
+ return t.setMonth(0, 1), t;
330
+ }
331
+ function Qe(e) {
332
+ return new Date(e.getFullYear(), e.getMonth() + 1, 0).getDate();
333
+ }
334
+ function _t(e) {
335
+ const t = e.getDate();
336
+ return t <= 10 ? 0 : t <= 20 ? 1 : 2;
337
+ }
338
+ function kt(e) {
339
+ return e <= 0 ? 1 : e === 1 ? 11 : 21;
340
+ }
341
+ function un(e) {
342
+ if (ue.value)
343
+ return ce(Ve(D.value), e, "hour");
344
+ if (q.value)
345
+ return ce(Ke(D.value), e, "day");
346
+ if (he.value)
347
+ return ce(gt(D.value), e, "month");
348
+ if (le.value) {
349
+ const t = Ke(D.value);
350
+ return t.setDate(kt(e)), t;
351
+ }
352
+ return ce(D.value, J.value * e, n.unit);
353
+ }
354
+ function rn(e, t) {
355
+ if (ue.value) {
356
+ const a = Ve(ce(D.value, e, "day"));
357
+ return ce(a, t, "hour");
358
+ }
359
+ if (q.value || le.value) {
360
+ const a = Ke(ce(D.value, e, "month"));
361
+ return a.setDate(le.value ? kt(t) : t + 1), a;
362
+ }
363
+ if (he.value) {
364
+ const a = gt(ce(D.value, e, "year"));
365
+ return a.setMonth(t), a;
366
+ }
367
+ return ce(D.value, e, n.unit);
368
+ }
369
+ function xt(e) {
370
+ return ue.value ? Math.min(Math.max(e.getHours(), 0), 23) : q.value ? Math.min(Math.max(e.getDate() - 1, 0), Qe(e) - 1) : he.value ? Math.min(Math.max(e.getMonth(), 0), 11) : le.value ? _t(e) : 0;
371
+ }
372
+ function cn(e) {
373
+ const t = Je(e);
374
+ U.value = e, y.value = t, _.value = 0, h("update:startTime", e);
375
+ }
376
+ function ce(e, t, a) {
377
+ const l = new Date(e);
378
+ return a === "minute" && l.setMinutes(l.getMinutes() + t), a === "hour" && l.setHours(l.getHours() + t), a === "day" && l.setDate(l.getDate() + t), a === "month" && l.setMonth(l.getMonth() + t), a === "year" && l.setFullYear(l.getFullYear() + t), l;
379
+ }
380
+ function H(e) {
381
+ return String(e).padStart(2, "0");
382
+ }
383
+ function dn(e) {
384
+ return e <= 10 ? "上旬" : e <= 20 ? "中旬" : "下旬";
385
+ }
386
+ function vn(e) {
387
+ const t = e.time;
388
+ if (!(t instanceof Date) || Number.isNaN(t.getTime()))
389
+ return "";
390
+ const a = B(t), l = H(a.month), o = H(a.day), r = H(a.hour), S = H(a.minute), lt = String(e.label || "").match(/(?:^|\D)(\d{1,2})(上旬|中旬|下旬)/);
391
+ return lt ? `${H(Number(lt[1]))}${lt[2]}` : n.unit === "minute" ? J.value === 60 && S === "00" ? r : `${r}:${S}` : n.unit === "hour" ? J.value >= 24 ? `${l}-${o}` : r : n.unit === "day" ? J.value >= 10 && J.value <= 11 ? `${l}${dn(a.day)}` : o : n.unit === "month" ? l : n.unit === "year" ? String(a.year) : e.label || "";
392
+ }
393
+ function $e(e, t) {
394
+ const a = B(e), l = a.year, o = H(a.month), r = H(a.day), S = H(a.hour), oe = H(a.minute);
395
+ return t === "year" ? `${l}` : t === "month" ? `${l}-${o}` : t === "day" ? `${l}-${o}-${r}` : t === "minute" ? `${o}-${r} ${S}:${oe}` : `${o}-${r} ${S}时`;
396
+ }
397
+ function Tt(e) {
398
+ if (!(e instanceof Date) || Number.isNaN(e.getTime()))
399
+ return "";
400
+ const t = B(e);
401
+ return `${t.year}-${H(t.month)}-${H(t.day)} ${H(t.hour)}:${H(t.minute)}:${H(t.second)}`;
402
+ }
403
+ function mn(e, t, a) {
404
+ return a === "minute" ? (e.getTime() - t.getTime()) / 6e4 : a === "hour" ? (e.getTime() - t.getTime()) / 36e5 : a === "day" ? (e.getTime() - t.getTime()) / 864e5 : a === "month" ? (e.getFullYear() - t.getFullYear()) * 12 + e.getMonth() - t.getMonth() : e.getFullYear() - t.getFullYear();
405
+ }
406
+ function V(e) {
407
+ const t = Math.min(Math.max(e, 0), w.value.length - 1), a = w.value[t];
408
+ !a || a.disabled || (h("update:modelValue", E.value ? a.index : t), h("change", a));
409
+ }
410
+ function X(e) {
411
+ return fn(e, 1);
412
+ }
413
+ function fn(e, t) {
414
+ var r;
415
+ const a = Math.min(Math.max(e, 0), w.value.length - 1);
416
+ if (!((r = w.value[a]) != null && r.disabled))
417
+ return a;
418
+ const l = qe(a, t);
419
+ if (l !== null)
420
+ return l;
421
+ const o = qe(a, t > 0 ? -1 : 1);
422
+ return o !== null ? o : a;
423
+ }
424
+ function qe(e, t) {
425
+ var a;
426
+ if (t > 0) {
427
+ const l = w.value.findIndex((o, r) => r >= e && !o.disabled);
428
+ return l >= 0 ? l : null;
429
+ }
430
+ for (let l = e; l >= 0; l -= 1)
431
+ if (!((a = w.value[l]) != null && a.disabled))
432
+ return l;
433
+ return null;
434
+ }
435
+ function Re(e, t) {
436
+ _.value = e, V(t);
437
+ }
438
+ function Mt(e, t) {
439
+ const a = rn(e, t), l = Xe(a), o = l.getTime() === a.getTime() ? t : xt(l);
440
+ U.value = l, y.value = l, _.value = 0, h("update:startTime", l), V(o);
441
+ }
442
+ function wt(e) {
443
+ const t = _.value + e, a = e > 0 ? 0 : w.value.length - 1;
444
+ Re(t, a);
445
+ }
446
+ function De(e) {
447
+ const t = e >= 0 ? 1 : -1, l = qe(ge.value + e, t) ?? (t > 0 ? w.value.length : -1), o = w.value.length - 1;
448
+ if (l > o) {
449
+ if (Z.value) {
450
+ n.loop ? Mt(1, 0) : V(o);
451
+ return;
452
+ }
453
+ if (E.value) {
454
+ if (_.value < rt.value - 1) {
455
+ _.value += 1, V(X(0));
456
+ return;
457
+ }
458
+ n.loop && (_.value = 0), V(X(n.loop ? 0 : o));
459
+ return;
460
+ }
461
+ if (!n.loop) {
462
+ V(o);
463
+ return;
464
+ }
465
+ wt(1);
466
+ return;
467
+ }
468
+ if (l < 0) {
469
+ if (Z.value) {
470
+ n.loop ? Mt(-1, o) : V(0);
471
+ return;
472
+ }
473
+ if (E.value) {
474
+ if (_.value > 0) {
475
+ _.value -= 1, V(X(w.value.length - 1));
476
+ return;
477
+ }
478
+ n.loop && (_.value = rt.value - 1), V(X(n.loop ? o : 0));
479
+ return;
480
+ }
481
+ if (!n.loop) {
482
+ V(0);
483
+ return;
484
+ }
485
+ wt(-1);
486
+ return;
487
+ }
488
+ V(l);
489
+ }
490
+ function pn() {
491
+ if (E.value) {
492
+ _.value = 0, V(X(0));
493
+ return;
494
+ }
495
+ if (Z.value) {
496
+ _.value = 0, V(X(M.value));
497
+ return;
498
+ }
499
+ const e = re.value > 0 ? Math.min(I.value, w.value.length - 1) : 0;
500
+ Re(0, X(e));
501
+ }
502
+ function hn(e) {
503
+ const t = ze.value;
504
+ if (I.value <= 0) {
505
+ const o = Math.floor(e / t), r = e - o * t;
506
+ return { page: o, index: r };
507
+ }
508
+ if (e === 0)
509
+ return {
510
+ page: 0,
511
+ index: re.value > 0 ? Math.min(I.value, t - 1) : Math.max(I.value - 1, 0)
512
+ };
513
+ if (e >= 1 && e <= re.value)
514
+ return { page: 0, index: I.value + e + (ke.value ? 0 : -1) };
515
+ if (e <= -1 && e >= -I.value)
516
+ return { page: 0, index: I.value + e };
517
+ if (e > re.value) {
518
+ const o = Math.ceil((e - re.value) / t), r = re.value + (o - 1) * t + 1;
519
+ return { page: o, index: e - r };
520
+ }
521
+ const a = -Math.ceil((-I.value - e) / t), l = -I.value + a * t;
522
+ return { page: a, index: e - l };
523
+ }
524
+ function bn(e) {
525
+ if (E.value) {
526
+ let l = 0, o = Number.POSITIVE_INFINITY;
527
+ ne.value.forEach((r, S) => {
528
+ const oe = Math.abs(r.time.getTime() - e.getTime());
529
+ oe < o && (o = oe, l = S);
530
+ }), _.value = Math.floor(l / Q.value), V(l - Y.value);
531
+ return;
532
+ }
533
+ if (Z.value) {
534
+ U.value = e, _.value = 0, h("update:startTime", e), Re(0, xt(e)), y.value = e;
535
+ return;
536
+ }
537
+ const t = Math.round(mn(e, D.value, n.unit) / J.value), a = hn(t);
538
+ Re(a.page, a.index);
539
+ }
540
+ function Xe(e) {
541
+ const t = ae.value, a = pe.value;
542
+ return t && e.getTime() < t.getTime() ? new Date(t) : a && e.getTime() > a.getTime() ? new Date(a) : e;
543
+ }
544
+ function yn(e) {
545
+ const t = et(e), a = ae.value ? B(ae.value) : null, l = pe.value ? B(pe.value) : null, o = (r) => Date.UTC(r.year, r.month - 1, r.day);
546
+ return !!(a && o(t) < o(a) || l && o(t) > o(l));
547
+ }
548
+ function et(e) {
549
+ return n.timeZone ? { year: e.getFullYear(), month: e.getMonth() + 1, day: e.getDate(), hour: e.getHours(), minute: e.getMinutes(), second: e.getSeconds() } : B(e);
550
+ }
551
+ function Me(e, t) {
552
+ const a = et(e), l = B(t);
553
+ return a.year === l.year && a.month === l.month && a.day === l.day;
554
+ }
555
+ function gn() {
556
+ const e = y.value || ae.value || D.value;
557
+ et(e);
558
+ const t = /* @__PURE__ */ new Set(), a = ae.value, l = pe.value;
559
+ return a && Me(e, a) && Array.from({ length: 24 }, (o, r) => r).filter((o) => o < B(a).hour).forEach((o) => t.add(o)), l && Me(e, l) && Array.from({ length: 24 }, (o, r) => r).filter((o) => o > B(l).hour).forEach((o) => t.add(o)), Array.from(t).sort((o, r) => o - r);
560
+ }
561
+ function _n(e) {
562
+ const t = y.value || ae.value || D.value, a = /* @__PURE__ */ new Set(), l = ae.value, o = pe.value;
563
+ return l && Me(t, l) && e === B(l).hour && Array.from({ length: 60 }, (r, S) => S).filter((r) => r < B(l).minute).forEach((r) => a.add(r)), o && Me(t, o) && e === B(o).hour && Array.from({ length: 60 }, (r, S) => S).filter((r) => r > B(o).minute).forEach((r) => a.add(r)), Array.from(a).sort((r, S) => r - S);
564
+ }
565
+ function kn(e, t) {
566
+ const a = y.value || ae.value || D.value, l = /* @__PURE__ */ new Set(), o = ae.value, r = pe.value;
567
+ return o && Me(a, o) && e === B(o).hour && t === B(o).minute && Array.from({ length: 60 }, (S, oe) => oe).filter((S) => S < B(o).second).forEach((S) => l.add(S)), r && Me(a, r) && e === B(r).hour && t === B(r).minute && Array.from({ length: 60 }, (S, oe) => oe).filter((S) => S > B(r).second).forEach((S) => l.add(S)), Array.from(l).sort((S, oe) => S - oe);
568
+ }
569
+ function Ct() {
570
+ xe.value && (y.value = yt(Xe(xe.value.time)));
571
+ }
572
+ function St(e) {
573
+ const t = e ? new Date(e) : null;
574
+ if (!t || Number.isNaN(t.getTime()))
575
+ return;
576
+ const a = sn(t), l = Xe(a);
577
+ y.value = yt(l), bn(l);
578
+ }
579
+ function tt() {
580
+ O && (window.clearInterval(O), O = null);
581
+ }
582
+ function Fe() {
583
+ tt(), !(!g.value || !n.internalPlayback) && (O = window.setInterval(() => De(1), Math.max(240, 1200 / f.value)));
584
+ }
585
+ function xn() {
586
+ g.value = !0, h("update:playing", !0), h("play"), Fe();
587
+ }
588
+ function Tn() {
589
+ g.value = !1, h("update:playing", !1), h("pause"), tt();
590
+ }
591
+ function Mn() {
592
+ if (g.value) {
593
+ Tn();
594
+ return;
595
+ }
596
+ xn();
597
+ }
598
+ function wn() {
599
+ const e = n.speeds.length ? n.speeds : [1], t = e.findIndex((l) => l === f.value), a = e[(t + 1) % e.length];
600
+ f.value = a, h("update:speed", a), Fe();
601
+ }
602
+ function $t(e) {
603
+ var l;
604
+ const t = (l = c.value) == null ? void 0 : l.getBoundingClientRect();
605
+ if (!t)
606
+ return ge.value;
607
+ const a = Math.min(Math.max((e - t.left) / t.width, 0), 1);
608
+ return Math.min(Math.floor(a * w.value.length), w.value.length - 1);
609
+ }
610
+ function Cn(e) {
611
+ var t;
612
+ te = !0, (t = c.value) == null || t.setPointerCapture(e.pointerId), V($t(e.clientX)), window.addEventListener("pointermove", nt), window.addEventListener("pointerup", at);
613
+ }
614
+ function nt(e) {
615
+ te && V($t(e.clientX));
616
+ }
617
+ function at() {
618
+ te = !1, window.removeEventListener("pointermove", nt), window.removeEventListener("pointerup", at);
619
+ }
620
+ return R(() => n.playing, (e) => {
621
+ g.value = e, Fe();
622
+ }), R(() => n.speed, (e) => {
623
+ f.value = e, Fe();
624
+ }), R(() => [n.steps, n.pastSteps, n.futureSteps], () => {
625
+ ge.value > w.value.length - 1 && V(w.value.length - 1), be(Te);
626
+ }), R(
627
+ () => [n.modelValue, E.value, Q.value, ne.value.length],
628
+ () => {
629
+ if (!E.value)
630
+ return;
631
+ const e = Math.min(Math.max(Number(n.modelValue) || 0, 0), ne.value.length - 1);
632
+ _.value = Math.floor(e / Q.value);
633
+ },
634
+ { immediate: !0 }
635
+ ), R(() => n.startTime, (e) => {
636
+ U.value = e, _.value = 0, be(Te);
637
+ }), R(xe, Ct, { immediate: !0 }), R(() => [n.minTime, n.maxTime], Ct), R(
638
+ () => [
639
+ _e.value,
640
+ Pe.value,
641
+ w.value.length,
642
+ Ge.value.map((e) => e.key).join("|")
643
+ ],
644
+ () => {
645
+ be(Te);
646
+ },
647
+ { immediate: !0 }
648
+ ), Pt(() => {
649
+ typeof ResizeObserver < "u" && c.value && (ve = new ResizeObserver(Te), ve.observe(c.value)), be(Te);
650
+ }), Ut(() => {
651
+ tt(), fe && (window.cancelAnimationFrame(fe), fe = 0), ve == null || ve.disconnect(), ve = null, window.removeEventListener("pointermove", nt), window.removeEventListener("pointerup", at);
652
+ }), (e, t) => (d(), b("section", {
653
+ class: N(["map-timeline", {
654
+ "is-playing": g.value,
655
+ "is-external-points": E.value,
656
+ "is-scale-hidden": !ft.value
657
+ }])
658
+ }, [
659
+ u("div", na, [
660
+ u("button", {
661
+ class: "control-button is-primary",
662
+ type: "button",
663
+ "aria-label": g.value ? "暂停" : "播放",
664
+ onClick: Mn
665
+ }, [
666
+ L(C(ee), null, {
667
+ default: j(() => [
668
+ g.value ? (d(), K(C(Ln), { key: 0 })) : (d(), K(C(Nn), { key: 1 }))
669
+ ]),
670
+ _: 1
671
+ })
672
+ ], 8, aa),
673
+ u("div", la, [
674
+ u("button", {
675
+ class: "control-button",
676
+ type: "button",
677
+ "aria-label": "上一帧",
678
+ onClick: t[0] || (t[0] = (a) => De(-1))
679
+ }, [
680
+ L(C(ee), null, {
681
+ default: j(() => [
682
+ L(C(Vn))
683
+ ]),
684
+ _: 1
685
+ })
686
+ ]),
687
+ u("button", {
688
+ class: "control-button",
689
+ type: "button",
690
+ "aria-label": "下一帧",
691
+ onClick: t[1] || (t[1] = (a) => De(1))
692
+ }, [
693
+ L(C(ee), null, {
694
+ default: j(() => [
695
+ L(C(Rn))
696
+ ]),
697
+ _: 1
698
+ })
699
+ ])
700
+ ]),
701
+ u("button", {
702
+ class: "speed-button",
703
+ type: "button",
704
+ title: "播放速度",
705
+ onClick: wn
706
+ }, $(f.value) + "x", 1),
707
+ u("button", {
708
+ class: "control-button",
709
+ type: "button",
710
+ title: "回到初始时窗",
711
+ "aria-label": "回到初始时窗",
712
+ onClick: pn
713
+ }, [
714
+ L(C(ee), null, {
715
+ default: j(() => [
716
+ L(C(Lt))
717
+ ]),
718
+ _: 1
719
+ })
720
+ ]),
721
+ ye.value ? (d(), b("div", oa, [
722
+ An(e.$slots, "date-select", {
723
+ startTime: D.value,
724
+ activePoint: xe.value,
725
+ activeIndex: ge.value,
726
+ value: y.value,
727
+ setStartTime: cn,
728
+ jumpToTime: St
729
+ }, void 0, !0)
730
+ ])) : (d(), K(C($n), {
731
+ key: 1,
732
+ modelValue: y.value,
733
+ "onUpdate:modelValue": t[2] || (t[2] = (a) => y.value = a),
734
+ class: "timeline-jump-picker",
735
+ type: Vt.value,
736
+ format: Rt.value,
737
+ clearable: !1,
738
+ editable: !1,
739
+ "disabled-date": yn,
740
+ "disabled-hours": gn,
741
+ "disabled-minutes": _n,
742
+ "disabled-seconds": kn,
743
+ title: "跳转到指定时间",
744
+ "aria-label": "跳转到指定时间",
745
+ onChange: St,
746
+ style: { "--el-date-editor-width": "calc(var(--cp-font-1) * 140)" }
747
+ }, null, 8, ["modelValue", "type", "format"]))
748
+ ]),
749
+ u("div", sa, [
750
+ u("div", {
751
+ ref_key: "trackRef",
752
+ ref: c,
753
+ class: "timeline-track",
754
+ role: "slider",
755
+ tabindex: "0",
756
+ "aria-valuemin": 0,
757
+ "aria-valuemax": w.value.length - 1,
758
+ "aria-valuenow": ge.value,
759
+ "aria-valuetext": dt.value,
760
+ onPointerdown: Cn,
761
+ onKeydown: [
762
+ t[4] || (t[4] = Oe(de((a) => De(-1), ["prevent"]), ["left"])),
763
+ t[5] || (t[5] = Oe(de((a) => De(1), ["prevent"]), ["right"])),
764
+ t[6] || (t[6] = Oe(de((a) => V(X(0)), ["prevent"]), ["home"])),
765
+ t[7] || (t[7] = Oe(de((a) => V(X(w.value.length - 1)), ["prevent"]), ["end"]))
766
+ ]
767
+ }, [
768
+ u("div", {
769
+ class: N(["active-time-popover", qt.value]),
770
+ style: Ee({ left: Qt.value })
771
+ }, [
772
+ u("span", null, $(dt.value), 1)
773
+ ], 6),
774
+ u("div", {
775
+ class: "timeline-segments",
776
+ style: Ee({ gridTemplateColumns: Xt.value })
777
+ }, [
778
+ (d(!0), b(z, null, se(Ge.value, (a) => (d(), b("button", {
779
+ key: a.key,
780
+ ref_for: !0,
781
+ ref: (l) => ln(a.startIndex, l),
782
+ class: N(["timeline-segment", {
783
+ "is-observed": a.kind === "observed",
784
+ "is-forecast": a.kind === "forecast",
785
+ "is-current": a.startIndex === _e.value,
786
+ "is-passed": a.startIndex <= _e.value,
787
+ "is-disabled": a.disabled
788
+ }]),
789
+ type: "button",
790
+ title: a.title,
791
+ disabled: a.disabled,
792
+ onPointerdown: t[3] || (t[3] = de(() => {
793
+ }, ["stop"])),
794
+ onClick: de((l) => V(a.startIndex), ["stop"])
795
+ }, [
796
+ u("span", ra, $(a.label), 1)
797
+ ], 42, ua))), 128))
798
+ ], 4),
799
+ We.value ? (d(), b("div", {
800
+ key: 0,
801
+ class: "now-divider",
802
+ style: Ee({ left: pt.value })
803
+ }, null, 4)) : G("", !0),
804
+ ft.value ? (d(), b("div", ca, [
805
+ Ft.value ? (d(), b(z, { key: 0 }, [
806
+ u("span", da, [
807
+ t[8] || (t[8] = u("span", { class: "footer-kind is-forecast" }, "预报开始", -1)),
808
+ u("span", null, $(Ot.value), 1)
809
+ ]),
810
+ u("span", va, [
811
+ u("span", null, $(Yt.value), 1),
812
+ t[9] || (t[9] = u("span", { class: "footer-kind is-forecast" }, "预报结束", -1))
813
+ ])
814
+ ], 64)) : mt.value ? (d(), b(z, { key: 1 }, [
815
+ jt.value ? (d(), b("span", ma, [
816
+ t[10] || (t[10] = u("span", { class: "footer-kind is-observed" }, "实况", -1)),
817
+ u("span", null, $(Wt.value), 1)
818
+ ])) : G("", !0),
819
+ We.value ? (d(), b("span", {
820
+ key: 1,
821
+ class: "timeline-scale-item timeline-scale-now",
822
+ style: Ee({ left: pt.value })
823
+ }, [
824
+ t[11] || (t[11] = u("span", { class: "footer-kind is-current" }, "当前", -1)),
825
+ u("span", null, $(Ht.value), 1)
826
+ ], 4)) : G("", !0),
827
+ zt.value ? (d(), b("span", fa, [
828
+ t[12] || (t[12] = u("span", { class: "footer-kind is-forecast" }, "预报", -1)),
829
+ u("span", null, $(Gt.value), 1)
830
+ ])) : G("", !0)
831
+ ], 64)) : (d(), b(z, { key: 2 }, [
832
+ u("span", {
833
+ class: N(["timeline-scale-item timeline-scale-window-start", He.value])
834
+ }, [
835
+ u("span", {
836
+ class: N(["footer-kind", He.value])
837
+ }, $(Kt.value), 3),
838
+ u("span", null, $(Jt.value), 1)
839
+ ], 2),
840
+ u("span", {
841
+ class: N(["timeline-scale-item timeline-scale-window-end", He.value])
842
+ }, [
843
+ u("span", null, $(Zt.value), 1)
844
+ ], 2)
845
+ ], 64))
846
+ ])) : G("", !0)
847
+ ], 40, ia)
848
+ ])
849
+ ], 2));
850
+ }
851
+ });
852
+ const me = (i, T) => {
853
+ const n = i.__vccOpts || i;
854
+ for (const [h, p] of T)
855
+ n[h] = p;
856
+ return n;
857
+ }, ha = /* @__PURE__ */ me(pa, [["__scopeId", "data-v-c0137427"]]), ba = { class: "tree-trigger__type" }, ya = { class: "tree-trigger__content" }, ga = ["placeholder"], _a = {
858
+ key: 0,
859
+ class: "tree-tabs",
860
+ role: "tablist"
861
+ }, ka = ["aria-selected", "onClick"], xa = { class: "tree-tab__label" }, Ta = { class: "tree-body" }, Ma = { class: "tree-node__label" }, wa = {
862
+ key: 0,
863
+ class: "tree-node__tag"
864
+ }, Ca = 72, Sa = /* @__PURE__ */ ie({
865
+ __name: "TreeSelectPanel",
866
+ props: {
867
+ modelValue: { default: null },
868
+ categories: { default: () => [] },
869
+ placeholder: { default: "请选择行政区或流域" },
870
+ searchPlaceholder: { default: "搜索名称" },
871
+ emptyText: { default: "暂无树数据" },
872
+ fallbackTypeLabel: { default: "行政区" },
873
+ popoverWidth: { default: "calc(var(--cp-font-1) * 328)" },
874
+ defaultActiveType: { default: "" },
875
+ defaultExpandAll: { type: Boolean, default: !0 },
876
+ closeOnSelect: { type: Boolean, default: !1 },
877
+ closeOnMouseLeave: { type: Boolean, default: !1 },
878
+ dark: { type: Boolean, default: !1 }
879
+ },
880
+ emits: ["update:modelValue", "change", "select"],
881
+ setup(i, { emit: T }) {
882
+ const n = i, h = T, p = P(!1), c = P(""), x = P(""), g = P(""), f = P(null), _ = P();
883
+ let y = null;
884
+ const U = {
885
+ type: "spring",
886
+ stiffness: 520,
887
+ damping: 38,
888
+ mass: 0.7
889
+ }, F = { y: -1 }, W = { opacity: 0, y: -6, scale: 0.98 }, O = { opacity: 1, y: 0, scale: 1 }, ve = {
890
+ type: "spring",
891
+ stiffness: 480,
892
+ damping: 34,
893
+ mass: 0.7
894
+ }, fe = {
895
+ type: "spring",
896
+ stiffness: 520,
897
+ damping: 42,
898
+ mass: 0.6
899
+ }, te = s(() => n.categories), ye = s(() => te.value.find((k) => k.type === g.value) || te.value[0]), D = s(() => {
900
+ var k;
901
+ return ((k = ye.value) == null ? void 0 : k.children) || [];
902
+ }), J = s(() => {
903
+ var k;
904
+ return ((k = ye.value) == null ? void 0 : k.label) || n.fallbackTypeLabel;
905
+ }), we = s(() => !!(c.value || n.modelValue !== null)), Ce = s(() => typeof n.popoverWidth == "number" ? `${n.popoverWidth}px` : n.popoverWidth), Q = s(() => {
906
+ for (const k of te.value) {
907
+ const M = Ue(k.children, n.modelValue);
908
+ if (M)
909
+ return M.label;
910
+ }
911
+ return "";
912
+ }), ne = {
913
+ label: "label",
914
+ children: "children",
915
+ disabled: "disabled"
916
+ }, E = () => {
917
+ q(), p.value = !0;
918
+ }, Ie = () => {
919
+ E(), c.value === Q.value && (x.value = "");
920
+ }, ae = () => {
921
+ x.value = c.value, E();
922
+ }, pe = () => {
923
+ c.value = "", x.value = "", h("update:modelValue", null), E(), be(() => {
924
+ var k;
925
+ return (k = _.value) == null ? void 0 : k.filter("");
926
+ });
927
+ }, ue = () => {
928
+ q(), p.value = !1;
929
+ }, le = (k) => {
930
+ var A;
931
+ const M = k.target;
932
+ M && ((A = f.value) != null && A.contains(M)) || ue();
933
+ }, q = () => {
934
+ y && (window.clearTimeout(y), y = null);
935
+ }, he = () => q(), Z = () => {
936
+ q(), y = window.setTimeout(() => {
937
+ ue(), y = null;
938
+ }, 120);
939
+ }, Pe = (k) => {
940
+ k.disabled || !ye.value || (h("update:modelValue", k.id), h("select", k, ye.value), h("change", { node: k, category: ye.value }), c.value = k.label, x.value = "", be(() => {
941
+ var M;
942
+ return (M = _.value) == null ? void 0 : M.filter("");
943
+ }), n.closeOnSelect && ue());
944
+ }, je = (k, M) => k ? String(M.label ?? "").toLowerCase().includes(k.trim().toLowerCase()) : !0, Ue = (k, M) => {
945
+ if (M == null)
946
+ return null;
947
+ for (const A of k) {
948
+ if (A.id === M)
949
+ return A;
950
+ const Y = Ue(A.children || [], M);
951
+ if (Y)
952
+ return Y;
953
+ }
954
+ return null;
955
+ };
956
+ return R(te, (k) => {
957
+ if (!k.length) {
958
+ g.value = "";
959
+ return;
960
+ }
961
+ const M = k.some((Y) => Y.type === n.defaultActiveType) ? n.defaultActiveType : k[0].type, A = k.some((Y) => Y.type === g.value);
962
+ g.value = A ? g.value : M;
963
+ }, { immediate: !0 }), R(() => n.defaultActiveType, (k) => {
964
+ k && te.value.some((M) => M.type === k) && (g.value = k);
965
+ }), R(x, (k) => {
966
+ var M;
967
+ (M = _.value) == null || M.filter(k);
968
+ }), R(g, () => {
969
+ be(() => {
970
+ var k;
971
+ return (k = _.value) == null ? void 0 : k.filter(x.value);
972
+ });
973
+ }), R(Q, (k) => {
974
+ p.value || (c.value = k, x.value = "");
975
+ }, { immediate: !0 }), R(p, (k) => {
976
+ if (k) {
977
+ c.value === Q.value && (x.value = "", be(() => {
978
+ var M;
979
+ return (M = _.value) == null ? void 0 : M.filter("");
980
+ }));
981
+ return;
982
+ }
983
+ c.value = Q.value, x.value = "";
984
+ }), Pt(() => {
985
+ document.addEventListener("pointerdown", le);
986
+ }), Ut(() => {
987
+ q(), document.removeEventListener("pointerdown", le);
988
+ }), (k, M) => (d(), b("div", {
989
+ ref_key: "selectRef",
990
+ ref: f,
991
+ class: N(["tree-select", { "is-dark": i.dark }]),
992
+ onMouseenter: he,
993
+ onMouseleave: Z
994
+ }, [
995
+ L(C(st).div, {
996
+ class: "tree-trigger",
997
+ role: "combobox",
998
+ tabindex: "0",
999
+ "aria-expanded": p.value,
1000
+ "while-hover": F,
1001
+ transition: U,
1002
+ onClick: de(E, ["stop"])
1003
+ }, {
1004
+ default: j(() => [
1005
+ u("span", ba, $(J.value), 1),
1006
+ u("span", ya, [
1007
+ Ye(u("input", {
1008
+ "onUpdate:modelValue": M[0] || (M[0] = (A) => c.value = A),
1009
+ class: "tree-trigger__input",
1010
+ placeholder: i.placeholder,
1011
+ onFocus: Ie,
1012
+ onClick: de(E, ["stop"]),
1013
+ onInput: ae
1014
+ }, null, 40, ga), [
1015
+ [At, c.value]
1016
+ ]),
1017
+ we.value ? (d(), b("button", {
1018
+ key: 0,
1019
+ class: "tree-trigger__clear",
1020
+ type: "button",
1021
+ "aria-label": "清空",
1022
+ onClick: de(pe, ["stop"])
1023
+ })) : G("", !0),
1024
+ u("span", {
1025
+ class: N(["tree-trigger__arrow", { "is-open": p.value }])
1026
+ }, null, 2)
1027
+ ])
1028
+ ]),
1029
+ _: 1
1030
+ }, 8, ["aria-expanded"]),
1031
+ L(Bn, { name: "tree-panel-fade" }, {
1032
+ default: j(() => [
1033
+ p.value ? (d(), K(C(st).section, {
1034
+ key: 0,
1035
+ class: "tree-panel",
1036
+ style: Ee({ width: Ce.value }),
1037
+ initial: W,
1038
+ animate: O,
1039
+ transition: ve,
1040
+ onClick: M[1] || (M[1] = de(() => {
1041
+ }, ["stop"]))
1042
+ }, {
1043
+ default: j(() => [
1044
+ te.value.length > 1 ? (d(), b("div", _a, [
1045
+ (d(!0), b(z, null, se(te.value, (A) => (d(), b("button", {
1046
+ key: A.type,
1047
+ class: N(["tree-tab", { "is-active": A.type === g.value }]),
1048
+ type: "button",
1049
+ role: "tab",
1050
+ "aria-selected": A.type === g.value,
1051
+ onClick: (Y) => g.value = A.type
1052
+ }, [
1053
+ A.type === g.value ? (d(), K(C(st).span, {
1054
+ key: 0,
1055
+ class: "tree-tab__active",
1056
+ "layout-id": "tree-select-active-tab",
1057
+ transition: fe
1058
+ })) : G("", !0),
1059
+ u("span", xa, $(A.label), 1)
1060
+ ], 10, ka))), 128))
1061
+ ])) : G("", !0),
1062
+ u("div", Ta, [
1063
+ D.value.length ? (d(), K(C(Dn), {
1064
+ key: 0,
1065
+ ref_key: "treeRef",
1066
+ ref: _,
1067
+ data: D.value,
1068
+ "node-key": "id",
1069
+ props: ne,
1070
+ "filter-node-method": je,
1071
+ "expand-on-click-node": !1,
1072
+ "default-expand-all": i.defaultExpandAll,
1073
+ "highlight-current": "",
1074
+ onNodeClick: Pe
1075
+ }, {
1076
+ default: j(({ node: A, data: Y }) => [
1077
+ u("button", {
1078
+ class: N(["tree-node", { "is-selected": Y.id === i.modelValue }]),
1079
+ type: "button"
1080
+ }, [
1081
+ u("span", Ma, $(A.label), 1),
1082
+ Y.tag ? (d(), b("span", wa, $(Y.tag), 1)) : G("", !0)
1083
+ ], 2)
1084
+ ]),
1085
+ _: 1
1086
+ }, 8, ["data", "default-expand-all"])) : (d(), K(C(En), {
1087
+ key: 1,
1088
+ class: "tree-empty",
1089
+ "image-size": Ca,
1090
+ description: i.emptyText
1091
+ }, null, 8, ["description"]))
1092
+ ])
1093
+ ]),
1094
+ _: 1
1095
+ }, 8, ["style"])) : G("", !0)
1096
+ ]),
1097
+ _: 1
1098
+ })
1099
+ ], 34));
1100
+ }
1101
+ });
1102
+ const $a = /* @__PURE__ */ me(Sa, [["__scopeId", "data-v-bb2a715c"]]), Da = ["aria-label"], Ea = ["onClick"], Ia = /* @__PURE__ */ ie({
1103
+ __name: "TimeRangeQuickSelect",
1104
+ props: {
1105
+ modelValue: {},
1106
+ options: {},
1107
+ ariaLabel: { default: "时间范围快捷选择" }
1108
+ },
1109
+ emits: ["update:modelValue", "change"],
1110
+ setup(i, { emit: T }) {
1111
+ const n = T;
1112
+ function h(p) {
1113
+ n("update:modelValue", p.key), n("change", p);
1114
+ }
1115
+ return (p, c) => (d(), b("div", {
1116
+ class: "time-range-quick-select",
1117
+ role: "group",
1118
+ "aria-label": i.ariaLabel
1119
+ }, [
1120
+ (d(!0), b(z, null, se(i.options, (x) => (d(), b("button", {
1121
+ key: x.key,
1122
+ type: "button",
1123
+ class: N(["time-range-quick-select__button", { "is-active": i.modelValue === x.key }]),
1124
+ onClick: (g) => h(x)
1125
+ }, $(x.label), 11, Ea))), 128))
1126
+ ], 8, Da));
1127
+ }
1128
+ });
1129
+ const Pa = /* @__PURE__ */ me(Ia, [["__scopeId", "data-v-d0145980"]]), Ua = {
1130
+ key: 0,
1131
+ class: "project-menu primary-nav",
1132
+ "aria-label": "横向菜单样式"
1133
+ }, Aa = { class: "primary-nav-scroll" }, Ba = ["onClick", "disabled", "aria-disabled", "aria-current"], La = {
1134
+ key: 1,
1135
+ class: "project-menu vertical-menu",
1136
+ "aria-label": "纵向菜单样式"
1137
+ }, Na = ["aria-expanded", "onClick"], Va = { class: "menu-list" }, Ra = ["onClick", "disabled", "aria-disabled", "aria-current"], Fa = { class: "menu-label" }, Oa = /* @__PURE__ */ ie({
1138
+ __name: "ProjectMenu",
1139
+ props: {
1140
+ direction: { default: "horizontal" },
1141
+ active: { default: "" },
1142
+ items: { default: () => [] },
1143
+ groups: { default: () => [] }
1144
+ },
1145
+ emits: ["update:active", "select"],
1146
+ setup(i, { emit: T }) {
1147
+ const n = i, h = T, p = P(n.active), c = P([]);
1148
+ R(() => n.active, (f) => p.value = f);
1149
+ function x(f) {
1150
+ f.disabled || (p.value = f.key, h("update:active", f.key), h("select", f));
1151
+ }
1152
+ function g(f) {
1153
+ c.value = c.value.includes(f) ? c.value.filter((_) => _ !== f) : [...c.value, f];
1154
+ }
1155
+ return (f, _) => i.direction === "horizontal" ? (d(), b("nav", Ua, [
1156
+ u("div", Aa, [
1157
+ (d(!0), b(z, null, se(i.items, (y) => (d(), b("button", {
1158
+ type: "button",
1159
+ onClick: (U) => x(y),
1160
+ disabled: y.disabled,
1161
+ key: y.key,
1162
+ class: N(["primary-nav-link", { active: p.value === y.key, "is-disabled": y.disabled }]),
1163
+ "aria-disabled": y.disabled || void 0,
1164
+ "aria-current": p.value === y.key ? "page" : void 0
1165
+ }, $(y.label), 11, Ba))), 128))
1166
+ ])
1167
+ ])) : (d(), b("nav", La, [
1168
+ (d(!0), b(z, null, se(i.groups, (y) => (d(), b("section", {
1169
+ key: y.label,
1170
+ class: "menu-section"
1171
+ }, [
1172
+ u("button", {
1173
+ type: "button",
1174
+ class: "section-title",
1175
+ "aria-expanded": !c.value.includes(y.label),
1176
+ onClick: (U) => g(y.label)
1177
+ }, [
1178
+ u("span", null, $(y.label), 1),
1179
+ L(C(ee), {
1180
+ class: N(["section-arrow", { open: !c.value.includes(y.label) }])
1181
+ }, {
1182
+ default: j(() => [
1183
+ L(C(Fn))
1184
+ ]),
1185
+ _: 1
1186
+ }, 8, ["class"])
1187
+ ], 8, Na),
1188
+ Ye(u("ul", Va, [
1189
+ (d(!0), b(z, null, se(y.items, (U) => (d(), b("li", {
1190
+ key: U.key
1191
+ }, [
1192
+ u("button", {
1193
+ type: "button",
1194
+ onClick: (F) => x(U),
1195
+ disabled: U.disabled,
1196
+ class: N(["menu-link", { active: p.value === U.key, "is-disabled": U.disabled }]),
1197
+ "aria-disabled": U.disabled || void 0,
1198
+ "aria-current": p.value === U.key ? "page" : void 0
1199
+ }, [
1200
+ L(C(ee), { class: "menu-icon" }, {
1201
+ default: j(() => [
1202
+ (d(), K(it(U.icon || C(Nt))))
1203
+ ]),
1204
+ _: 2
1205
+ }, 1024),
1206
+ u("span", Fa, $(U.label), 1)
1207
+ ], 10, Ra)
1208
+ ]))), 128))
1209
+ ], 512), [
1210
+ [Bt, !c.value.includes(y.label)]
1211
+ ])
1212
+ ]))), 128))
1213
+ ]));
1214
+ }
1215
+ });
1216
+ const Ya = /* @__PURE__ */ me(Oa, [["__scopeId", "data-v-47dc81dc"]]), ja = { class: "tree-tools" }, za = { class: "tool-row" }, Wa = ["aria-expanded"], Ha = {
1217
+ key: 0,
1218
+ class: "tree-search"
1219
+ }, Ga = { class: "tree-scroll" }, Ja = ["aria-expanded"], Za = { class: "node-orb node-orb--parent" }, Ka = { class: "node-label node-label--parent" }, Qa = { class: "child-list" }, qa = ["onClick", "aria-current"], Xa = { class: "node-orb node-orb--child" }, el = { class: "node-label node-label--child" }, tl = {
1220
+ key: 0,
1221
+ class: "empty-menu"
1222
+ }, nl = /* @__PURE__ */ ie({
1223
+ __name: "MapSideMenu",
1224
+ props: {
1225
+ title: { default: "实况(测站)" },
1226
+ active: { default: "rain" },
1227
+ dark: { type: Boolean, default: !1 },
1228
+ compact: { type: Boolean, default: !1 },
1229
+ items: { default: () => [
1230
+ { key: "rain", label: "降水", icon: On },
1231
+ { key: "reservoir-level", label: "水库水位", icon: ot },
1232
+ { key: "reservoir-flow", label: "水库径流", icon: Et },
1233
+ { key: "river-level", label: "河道水位", icon: ot },
1234
+ { key: "river-flow", label: "河道径流", icon: Et },
1235
+ { key: "temperature", label: "气温", icon: Yn },
1236
+ { key: "wind", label: "风速", icon: jn }
1237
+ ] }
1238
+ },
1239
+ emits: ["update:active", "update:compact", "select"],
1240
+ setup(i, { emit: T }) {
1241
+ const n = i, h = T, p = P(n.active), c = P(n.compact), x = P(!0), g = P(!1), f = P("");
1242
+ R(() => n.active, (F) => p.value = F), R(() => n.compact, (F) => c.value = F);
1243
+ const _ = s(() => n.items.filter((F) => F.label.toLowerCase().includes(f.value.trim().toLowerCase())));
1244
+ function y(F) {
1245
+ p.value = F.key, h("update:active", F.key), h("select", F);
1246
+ }
1247
+ function U() {
1248
+ c.value = !c.value, h("update:compact", c.value);
1249
+ }
1250
+ return (F, W) => (d(), b("nav", {
1251
+ class: N(["map-side-menu has-tools", { "is-dark": i.dark, "is-labels-hidden": c.value, "is-searching": g.value }]),
1252
+ "aria-label": "地图胶囊菜单样式"
1253
+ }, [
1254
+ u("div", ja, [
1255
+ u("div", za, [
1256
+ u("button", {
1257
+ type: "button",
1258
+ class: "tool-toggle",
1259
+ "aria-expanded": g.value,
1260
+ onClick: W[0] || (W[0] = (O) => g.value = !g.value)
1261
+ }, [
1262
+ L(C(ee), null, {
1263
+ default: j(() => [
1264
+ L(C(zn))
1265
+ ]),
1266
+ _: 1
1267
+ }),
1268
+ W[3] || (W[3] = u("span", null, "搜索菜单", -1))
1269
+ ], 8, Wa),
1270
+ u("button", {
1271
+ type: "button",
1272
+ class: "tool-toggle label-toggle",
1273
+ "aria-label": "切换图标模式",
1274
+ onClick: U
1275
+ }, [
1276
+ L(C(ee), null, {
1277
+ default: j(() => [
1278
+ L(C(Wn))
1279
+ ]),
1280
+ _: 1
1281
+ })
1282
+ ])
1283
+ ]),
1284
+ g.value ? (d(), b("label", Ha, [
1285
+ Ye(u("input", {
1286
+ "onUpdate:modelValue": W[1] || (W[1] = (O) => f.value = O),
1287
+ placeholder: "搜索菜单项"
1288
+ }, null, 512), [
1289
+ [At, f.value]
1290
+ ])
1291
+ ])) : G("", !0)
1292
+ ]),
1293
+ u("div", Ga, [
1294
+ u("section", {
1295
+ class: N(["tree-section", { "is-open": x.value }])
1296
+ }, [
1297
+ u("button", {
1298
+ type: "button",
1299
+ class: "tree-node tree-node--parent active",
1300
+ "aria-expanded": x.value,
1301
+ onClick: W[2] || (W[2] = (O) => x.value = !x.value)
1302
+ }, [
1303
+ u("span", Za, [
1304
+ L(C(ee), null, {
1305
+ default: j(() => [
1306
+ L(C(Hn))
1307
+ ]),
1308
+ _: 1
1309
+ })
1310
+ ]),
1311
+ u("span", Ka, $(i.title), 1)
1312
+ ], 8, Ja),
1313
+ Ye(u("div", Qa, [
1314
+ (d(!0), b(z, null, se(_.value, (O) => (d(), b("button", {
1315
+ type: "button",
1316
+ onClick: (ve) => y(O),
1317
+ key: O.key,
1318
+ class: N(["tree-node tree-node--child", { active: O.key === p.value }]),
1319
+ "aria-current": O.key === p.value ? "page" : void 0
1320
+ }, [
1321
+ u("span", Xa, [
1322
+ L(C(ee), null, {
1323
+ default: j(() => [
1324
+ (d(), K(it(O.icon || C(ot))))
1325
+ ]),
1326
+ _: 2
1327
+ }, 1024)
1328
+ ]),
1329
+ u("span", el, $(O.label), 1)
1330
+ ], 10, qa))), 128)),
1331
+ _.value.length ? G("", !0) : (d(), b("span", tl, "未找到匹配菜单"))
1332
+ ], 512), [
1333
+ [Bt, x.value]
1334
+ ])
1335
+ ], 2)
1336
+ ])
1337
+ ], 2));
1338
+ }
1339
+ });
1340
+ const al = /* @__PURE__ */ me(nl, [["__scopeId", "data-v-ba8d91c3"]]), ll = {
1341
+ class: "map-toolbar__buttons",
1342
+ role: "group",
1343
+ "aria-label": "地图工具样式"
1344
+ }, ol = ["onClick", "title", "aria-label"], sl = /* @__PURE__ */ ie({
1345
+ __name: "MapTools",
1346
+ props: {
1347
+ active: { default: "layers" },
1348
+ horizontal: { type: Boolean, default: !1 },
1349
+ icons: { default: () => ({}) }
1350
+ },
1351
+ emits: ["update:active", "tool-click", "context-change"],
1352
+ setup(i, { emit: T }) {
1353
+ const n = i, h = [
1354
+ { key: "layers", label: "图层", icon: Gn },
1355
+ { key: "module", label: "模块操作", icon: Jn },
1356
+ { key: "refresh", label: "刷新", icon: Lt },
1357
+ { key: "locate", label: "定位", icon: Zn },
1358
+ { key: "settings", label: "地图设置", icon: Kn },
1359
+ { key: "analysis", label: "空间分析", icon: Nt },
1360
+ { key: "context", label: "右键菜单", icon: Qn }
1361
+ ], p = T, c = P(n.active), x = P(!1);
1362
+ R(() => n.active, (f) => c.value = f);
1363
+ function g(f) {
1364
+ f === "context" ? (x.value = !x.value, p("context-change", x.value)) : f !== "refresh" && f !== "locate" && (c.value = c.value === f ? "" : f, p("update:active", c.value)), p("tool-click", f);
1365
+ }
1366
+ return (f, _) => (d(), b("div", {
1367
+ class: N(["map-toolbar", { horizontal: i.horizontal }])
1368
+ }, [
1369
+ u("div", ll, [
1370
+ (d(), b(z, null, se(h, (y) => u("button", {
1371
+ type: "button",
1372
+ onClick: (U) => g(y.key),
1373
+ key: y.key,
1374
+ class: N(["tool-button", { "is-active": y.key === "context" ? x.value : c.value === y.key }]),
1375
+ title: y.label,
1376
+ "aria-label": y.label
1377
+ }, [
1378
+ L(C(ee), null, {
1379
+ default: j(() => [
1380
+ (d(), K(it(i.icons[y.key] || y.icon)))
1381
+ ]),
1382
+ _: 2
1383
+ }, 1024)
1384
+ ], 10, ol)), 64))
1385
+ ])
1386
+ ], 2));
1387
+ }
1388
+ });
1389
+ const il = /* @__PURE__ */ me(sl, [["__scopeId", "data-v-35c19d2b"]]), ul = { key: 0 }, rl = /* @__PURE__ */ ie({
1390
+ __name: "AtlasMapTitle",
1391
+ props: {
1392
+ title: {},
1393
+ subtitle: { default: "" },
1394
+ rightOpen: { type: Boolean, default: !1 }
1395
+ },
1396
+ setup(i) {
1397
+ return (T, n) => (d(), b("div", {
1398
+ class: N(["atlas-map-title", { "is-right-open": i.rightOpen }])
1399
+ }, [
1400
+ u("h2", null, $(i.title), 1),
1401
+ i.subtitle ? (d(), b("p", ul, $(i.subtitle), 1)) : G("", !0)
1402
+ ], 2));
1403
+ }
1404
+ });
1405
+ const cl = /* @__PURE__ */ me(rl, [["__scopeId", "data-v-3eb3cdeb"]]), dl = ["title", "aria-label"], vl = /* @__PURE__ */ ie({
1406
+ __name: "AtlasRightToggleButton",
1407
+ props: {
1408
+ open: { type: Boolean, default: !1 },
1409
+ openTitle: { default: "展开右侧面板" },
1410
+ closeTitle: { default: "收起右侧面板" }
1411
+ },
1412
+ emits: ["toggle"],
1413
+ setup(i) {
1414
+ return (T, n) => (d(), b("button", {
1415
+ type: "button",
1416
+ class: N(["atlas-right-toggle-button", { "is-open": i.open }]),
1417
+ title: i.open ? i.closeTitle : i.openTitle,
1418
+ "aria-label": i.open ? i.closeTitle : i.openTitle,
1419
+ onClick: n[0] || (n[0] = (h) => T.$emit("toggle"))
1420
+ }, [
1421
+ L(C(ee), null, {
1422
+ default: j(() => [
1423
+ i.open ? (d(), K(C(qn), { key: 0 })) : (d(), K(C(Xn), { key: 1 }))
1424
+ ]),
1425
+ _: 1
1426
+ })
1427
+ ], 10, dl));
1428
+ }
1429
+ });
1430
+ const ml = /* @__PURE__ */ me(vl, [["__scopeId", "data-v-dde1443b"]]), fl = { class: "process-data-table" }, pl = { key: 0 }, hl = { class: "process-data-table__scroll" }, bl = { key: 0 }, yl = { class: "process-data-table__pages" }, gl = ["disabled"], _l = ["disabled"], kl = /* @__PURE__ */ ie({
1431
+ __name: "ProcessDataTable",
1432
+ props: {
1433
+ times: {},
1434
+ series: {},
1435
+ loading: { type: Boolean }
1436
+ },
1437
+ setup(i) {
1438
+ const T = i, n = P(0), h = s(() => n.value * 100), p = s(() => Math.max(1, Math.ceil(T.times.length / 100))), c = s(() => T.times.slice(h.value, h.value + 100));
1439
+ return R(() => T.times, () => {
1440
+ n.value = 0;
1441
+ }), (x, g) => (d(), b("div", fl, [
1442
+ i.loading ? (d(), b("p", pl, "查询中…")) : (d(), b(z, { key: 1 }, [
1443
+ u("div", hl, [
1444
+ u("table", null, [
1445
+ u("thead", null, [
1446
+ u("tr", null, [
1447
+ g[2] || (g[2] = u("th", null, "时间", -1)),
1448
+ (d(!0), b(z, null, se(i.series, (f, _) => (d(), b("th", { key: _ }, $(f.name), 1))), 128))
1449
+ ])
1450
+ ]),
1451
+ u("tbody", null, [
1452
+ (d(!0), b(z, null, se(c.value, (f, _) => (d(), b("tr", { key: f }, [
1453
+ u("th", null, $(f), 1),
1454
+ (d(!0), b(z, null, se(i.series, (y, U) => (d(), b("td", { key: U }, $(y.data[h.value + _] ?? "—"), 1))), 128))
1455
+ ]))), 128))
1456
+ ])
1457
+ ]),
1458
+ i.times.length ? G("", !0) : (d(), b("p", bl, "暂无数据"))
1459
+ ]),
1460
+ u("div", yl, [
1461
+ u("button", {
1462
+ type: "button",
1463
+ disabled: n.value === 0,
1464
+ onClick: g[0] || (g[0] = (f) => n.value--)
1465
+ }, "上一页", 8, gl),
1466
+ u("span", null, $(n.value + 1) + " / " + $(p.value) + " · 共 " + $(i.times.length) + " 条", 1),
1467
+ u("button", {
1468
+ type: "button",
1469
+ disabled: n.value + 1 >= p.value,
1470
+ onClick: g[1] || (g[1] = (f) => n.value++)
1471
+ }, "下一页", 8, _l)
1472
+ ])
1473
+ ], 64))
1474
+ ]));
1475
+ }
1476
+ });
1477
+ const xl = /* @__PURE__ */ me(kl, [["__scopeId", "data-v-c7c380b1"]]), Ao = m(ta), Bo = m(ha), Lo = m($a), No = m(Pa), Vo = m(Ya), Ro = m(al), Fo = m(il), Oo = m(cl), Yo = m(ml), jo = m(xl);
1478
+ export {
1479
+ Ao as AppSelect,
1480
+ Oo as AtlasMapTitle,
1481
+ Yo as AtlasRightToggleButton,
1482
+ Ro as MapSideMenu,
1483
+ Bo as MapTimeline,
1484
+ Fo as MapTools,
1485
+ jo as ProcessDataTable,
1486
+ Vo as ProjectMenu,
1487
+ No as TimeRangeQuickSelect,
1488
+ Lo as TreeSelectPanel,
1489
+ Sl as UiAlert,
1490
+ $l as UiBadge,
1491
+ Dl as UiButton,
1492
+ El as UiButtonGroup,
1493
+ Il as UiCard,
1494
+ Pl as UiCarousel,
1495
+ Ul as UiCarouselItem,
1496
+ Al as UiCascader,
1497
+ Bl as UiCheckbox,
1498
+ Eo as UiCheckboxGroup,
1499
+ Ll as UiCol,
1500
+ Nl as UiCollapse,
1501
+ Vl as UiCollapseItem,
1502
+ Rl as UiColorPicker,
1503
+ Fl as UiConfigProvider,
1504
+ Ol as UiDatePicker,
1505
+ Yl as UiDescriptions,
1506
+ jl as UiDescriptionsItem,
1507
+ zl as UiDialog,
1508
+ Po as UiDivider,
1509
+ Wl as UiDrawer,
1510
+ Hl as UiDropdown,
1511
+ Gl as UiDropdownItem,
1512
+ Jl as UiDropdownMenu,
1513
+ Zl as UiEmpty,
1514
+ Kl as UiFooter,
1515
+ Ql as UiForm,
1516
+ ql as UiFormItem,
1517
+ Xl as UiIcon,
1518
+ eo as UiImage,
1519
+ to as UiInput,
1520
+ no as UiInputNumber,
1521
+ ao as UiMessage,
1522
+ lo as UiMessageBox,
1523
+ oo as UiNotification,
1524
+ so as UiOption,
1525
+ io as UiPagination,
1526
+ uo as UiPopconfirm,
1527
+ ro as UiPopover,
1528
+ co as UiProgress,
1529
+ vo as UiRadio,
1530
+ Io as UiRadioButton,
1531
+ mo as UiRadioGroup,
1532
+ fo as UiRate,
1533
+ po as UiRow,
1534
+ ho as UiScrollbar,
1535
+ bo as UiSelect,
1536
+ yo as UiSelectV2,
1537
+ go as UiSlider,
1538
+ _o as UiSwitch,
1539
+ ko as UiTabPane,
1540
+ xo as UiTable,
1541
+ To as UiTableColumn,
1542
+ Mo as UiTabs,
1543
+ wo as UiTag,
1544
+ Co as UiTooltip,
1545
+ So as UiTree,
1546
+ $o as UiTreeSelect,
1547
+ Do as UiUpload,
1548
+ m as themed,
1549
+ Uo as vUiLoading
1550
+ };