@jctrans-materials/comps-vue3 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.esm.js +943 -858
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { locationSearchV2 as
|
|
3
|
-
import { MODAL_ACTION as
|
|
4
|
-
import { ElDialog as
|
|
5
|
-
function
|
|
6
|
-
const t =
|
|
1
|
+
import { ref as E, computed as M, onMounted as Ke, onBeforeUnmount as yt, defineComponent as qe, toRef as He, watch as Te, createElementBlock as b, openBlock as A, createElementVNode as m, createBlock as Ge, normalizeClass as se, createCommentVNode as I, withDirectives as Ee, Fragment as oe, renderList as me, toDisplayString as _, withModifiers as ne, withKeys as Mt, normalizeStyle as _e, vModelText as Ye, unref as h, Teleport as At, renderSlot as Me, createTextVNode as ze, vShow as Ut, reactive as Qe, createVNode as L, onUnmounted as Pt, withCtx as N, Transition as st, nextTick as Ht, createApp as Qt } from "vue";
|
|
2
|
+
import { locationSearchV2 as je, emitter as ce, MODAL_ACTION as ue, initSharedConfig as $t } from "@jctrans-materials/shared";
|
|
3
|
+
import { MODAL_ACTION as Bl, emitter as Ll, initSharedConfig as Nl } from "@jctrans-materials/shared";
|
|
4
|
+
import { ElDialog as Jt, ElForm as Wt, ElRow as Ue, ElCol as xe, ElFormItem as pe, ElInput as be, ElCheckbox as Kt, ElButton as it } from "element-plus";
|
|
5
|
+
function qt(e) {
|
|
6
|
+
const t = E([]), n = "_search_history_cache", o = typeof window < "u" && typeof localStorage < "u", l = M(
|
|
7
7
|
() => (e.value || "") + n
|
|
8
|
-
), i =
|
|
8
|
+
), i = M(
|
|
9
9
|
() => !!e.value && e.value !== ""
|
|
10
10
|
), s = (c) => {
|
|
11
11
|
if (!c || !o) return;
|
|
12
|
-
const
|
|
13
|
-
(
|
|
12
|
+
const a = t.value.filter(
|
|
13
|
+
(f) => f.id && f.id !== c.id || f.display !== c.display
|
|
14
14
|
);
|
|
15
|
-
|
|
16
|
-
const u =
|
|
15
|
+
a.unshift(c);
|
|
16
|
+
const u = a.slice(0, 4);
|
|
17
17
|
if (i.value) {
|
|
18
18
|
t.value = u;
|
|
19
19
|
try {
|
|
20
20
|
localStorage.setItem(l.value, JSON.stringify(u));
|
|
21
|
-
} catch (
|
|
22
|
-
console.warn("LocalStorage save failed:",
|
|
21
|
+
} catch (f) {
|
|
22
|
+
console.warn("LocalStorage save failed:", f);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
},
|
|
25
|
+
}, r = () => {
|
|
26
26
|
t.value = [], o && localStorage.removeItem(l.value);
|
|
27
27
|
};
|
|
28
|
-
return
|
|
28
|
+
return Ke(() => {
|
|
29
29
|
if (o && i.value) {
|
|
30
30
|
const c = localStorage.getItem(l.value);
|
|
31
31
|
if (c)
|
|
@@ -38,30 +38,30 @@ function Wt(e) {
|
|
|
38
38
|
}), {
|
|
39
39
|
searchHistory: t,
|
|
40
40
|
saveToHistory: s,
|
|
41
|
-
clearHistory:
|
|
41
|
+
clearHistory: r,
|
|
42
42
|
HasHistory: i
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
async function
|
|
45
|
+
async function Gt(e, t = [
|
|
46
46
|
"Continent",
|
|
47
47
|
"Country",
|
|
48
48
|
"City",
|
|
49
49
|
"Seaport",
|
|
50
50
|
"Airport"
|
|
51
51
|
], n = {}) {
|
|
52
|
-
return
|
|
52
|
+
return je.searchByName({
|
|
53
53
|
keyword: e,
|
|
54
54
|
displayInfo: t,
|
|
55
55
|
...n
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
const
|
|
59
|
-
function
|
|
60
|
-
const n =
|
|
58
|
+
const at = (e, t) => je.searchByIdWithType(e, t);
|
|
59
|
+
function Yt(e, t) {
|
|
60
|
+
const n = E([]), o = E(!1), l = E(!1), i = E(1), s = E(0), r = E(10), c = M(() => s.value === 0 ? !1 : n.value.length >= s.value), a = M(() => {
|
|
61
61
|
const d = [...t.value];
|
|
62
62
|
return d.includes("Country") && !d.includes("Region") && d.push("Region"), d;
|
|
63
63
|
}), u = (d) => !d || !Array.isArray(d) ? [] : d.filter(
|
|
64
|
-
(
|
|
64
|
+
(p) => a.value.includes(p.type)
|
|
65
65
|
);
|
|
66
66
|
return {
|
|
67
67
|
searchResults: n,
|
|
@@ -70,24 +70,24 @@ function qt(e, t) {
|
|
|
70
70
|
isFinished: c,
|
|
71
71
|
currentPage: i,
|
|
72
72
|
total: s,
|
|
73
|
-
fetchData: async (d = 1,
|
|
74
|
-
if (!e.value.trim() && !
|
|
73
|
+
fetchData: async (d = 1, p = !1) => {
|
|
74
|
+
if (!e.value.trim() && !p) {
|
|
75
75
|
n.value = [], s.value = 0;
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
if (!(
|
|
79
|
-
|
|
78
|
+
if (!(p && (l.value || c.value)) && !(!p && o.value)) {
|
|
79
|
+
p ? l.value = !0 : (o.value = !0, i.value = 1);
|
|
80
80
|
try {
|
|
81
|
-
const v = await
|
|
81
|
+
const v = await Gt(
|
|
82
82
|
e.value,
|
|
83
83
|
t.value,
|
|
84
84
|
{
|
|
85
85
|
current: d,
|
|
86
86
|
// 使用传入的 page 参数
|
|
87
|
-
size:
|
|
87
|
+
size: r.value
|
|
88
88
|
}
|
|
89
|
-
),
|
|
90
|
-
|
|
89
|
+
), w = v.records || [], x = u(w);
|
|
90
|
+
p ? n.value = [...n.value, ...x] : n.value = x, s.value = v.total || 0, i.value = d;
|
|
91
91
|
} catch (v) {
|
|
92
92
|
console.error("Failed to fetch search results:", v);
|
|
93
93
|
} finally {
|
|
@@ -98,78 +98,78 @@ function qt(e, t) {
|
|
|
98
98
|
filterByTypes: u
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
const
|
|
101
|
+
const ve = Math.min, $ = Math.max, Ve = Math.round, Oe = Math.floor, X = (e) => ({
|
|
102
102
|
x: e,
|
|
103
103
|
y: e
|
|
104
|
-
}),
|
|
104
|
+
}), zt = {
|
|
105
105
|
left: "right",
|
|
106
106
|
right: "left",
|
|
107
107
|
bottom: "top",
|
|
108
108
|
top: "bottom"
|
|
109
|
-
},
|
|
109
|
+
}, jt = {
|
|
110
110
|
start: "end",
|
|
111
111
|
end: "start"
|
|
112
112
|
};
|
|
113
|
-
function
|
|
114
|
-
return $(e,
|
|
113
|
+
function rt(e, t, n) {
|
|
114
|
+
return $(e, ve(t, n));
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function Se(e, t) {
|
|
117
117
|
return typeof e == "function" ? e(t) : e;
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function ie(e) {
|
|
120
120
|
return e.split("-")[0];
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function ke(e) {
|
|
123
123
|
return e.split("-")[1];
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function wt(e) {
|
|
126
126
|
return e === "x" ? "y" : "x";
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function xt(e) {
|
|
129
129
|
return e === "y" ? "height" : "width";
|
|
130
130
|
}
|
|
131
131
|
const Xt = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
132
|
-
function
|
|
133
|
-
return Xt.has(
|
|
132
|
+
function le(e) {
|
|
133
|
+
return Xt.has(ie(e)) ? "y" : "x";
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
return
|
|
135
|
+
function bt(e) {
|
|
136
|
+
return wt(le(e));
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Zt(e, t, n) {
|
|
139
139
|
n === void 0 && (n = !1);
|
|
140
|
-
const o =
|
|
140
|
+
const o = ke(e), l = bt(e), i = xt(l);
|
|
141
141
|
let s = l === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
142
|
-
return t.reference[i] > t.floating[i] && (s =
|
|
142
|
+
return t.reference[i] > t.floating[i] && (s = De(s)), [s, De(s)];
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
const t =
|
|
146
|
-
return [
|
|
144
|
+
function en(e) {
|
|
145
|
+
const t = De(e);
|
|
146
|
+
return [$e(e), t, $e(t)];
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
return e.replace(/start|end/g, (t) =>
|
|
148
|
+
function $e(e) {
|
|
149
|
+
return e.replace(/start|end/g, (t) => jt[t]);
|
|
150
150
|
}
|
|
151
|
-
const
|
|
152
|
-
function
|
|
151
|
+
const ct = ["left", "right"], ut = ["right", "left"], tn = ["top", "bottom"], nn = ["bottom", "top"];
|
|
152
|
+
function on(e, t, n) {
|
|
153
153
|
switch (e) {
|
|
154
154
|
case "top":
|
|
155
155
|
case "bottom":
|
|
156
|
-
return n ? t ?
|
|
156
|
+
return n ? t ? ut : ct : t ? ct : ut;
|
|
157
157
|
case "left":
|
|
158
158
|
case "right":
|
|
159
|
-
return t ?
|
|
159
|
+
return t ? tn : nn;
|
|
160
160
|
default:
|
|
161
161
|
return [];
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
const l =
|
|
166
|
-
let i =
|
|
167
|
-
return l && (i = i.map((s) => s + "-" + l), t && (i = i.concat(i.map(
|
|
164
|
+
function ln(e, t, n, o) {
|
|
165
|
+
const l = ke(e);
|
|
166
|
+
let i = on(ie(e), n === "start", o);
|
|
167
|
+
return l && (i = i.map((s) => s + "-" + l), t && (i = i.concat(i.map($e)))), i;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
169
|
+
function De(e) {
|
|
170
|
+
return e.replace(/left|right|bottom|top/g, (t) => zt[t]);
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function sn(e) {
|
|
173
173
|
return {
|
|
174
174
|
top: 0,
|
|
175
175
|
right: 0,
|
|
@@ -178,15 +178,15 @@ function ln(e) {
|
|
|
178
178
|
...e
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
|
-
function
|
|
182
|
-
return typeof e != "number" ?
|
|
181
|
+
function an(e) {
|
|
182
|
+
return typeof e != "number" ? sn(e) : {
|
|
183
183
|
top: e,
|
|
184
184
|
right: e,
|
|
185
185
|
bottom: e,
|
|
186
186
|
left: e
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function Be(e) {
|
|
190
190
|
const {
|
|
191
191
|
x: t,
|
|
192
192
|
y: n,
|
|
@@ -204,113 +204,113 @@ function Ve(e) {
|
|
|
204
204
|
y: n
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function dt(e, t, n) {
|
|
208
208
|
let {
|
|
209
209
|
reference: o,
|
|
210
210
|
floating: l
|
|
211
211
|
} = e;
|
|
212
|
-
const i =
|
|
213
|
-
let
|
|
212
|
+
const i = le(t), s = bt(t), r = xt(s), c = ie(t), a = i === "y", u = o.x + o.width / 2 - l.width / 2, f = o.y + o.height / 2 - l.height / 2, d = o[r] / 2 - l[r] / 2;
|
|
213
|
+
let p;
|
|
214
214
|
switch (c) {
|
|
215
215
|
case "top":
|
|
216
|
-
|
|
216
|
+
p = {
|
|
217
217
|
x: u,
|
|
218
218
|
y: o.y - l.height
|
|
219
219
|
};
|
|
220
220
|
break;
|
|
221
221
|
case "bottom":
|
|
222
|
-
|
|
222
|
+
p = {
|
|
223
223
|
x: u,
|
|
224
224
|
y: o.y + o.height
|
|
225
225
|
};
|
|
226
226
|
break;
|
|
227
227
|
case "right":
|
|
228
|
-
|
|
228
|
+
p = {
|
|
229
229
|
x: o.x + o.width,
|
|
230
|
-
y:
|
|
230
|
+
y: f
|
|
231
231
|
};
|
|
232
232
|
break;
|
|
233
233
|
case "left":
|
|
234
|
-
|
|
234
|
+
p = {
|
|
235
235
|
x: o.x - l.width,
|
|
236
|
-
y:
|
|
236
|
+
y: f
|
|
237
237
|
};
|
|
238
238
|
break;
|
|
239
239
|
default:
|
|
240
|
-
|
|
240
|
+
p = {
|
|
241
241
|
x: o.x,
|
|
242
242
|
y: o.y
|
|
243
243
|
};
|
|
244
244
|
}
|
|
245
|
-
switch (
|
|
245
|
+
switch (ke(t)) {
|
|
246
246
|
case "start":
|
|
247
|
-
|
|
247
|
+
p[s] -= d * (n && a ? -1 : 1);
|
|
248
248
|
break;
|
|
249
249
|
case "end":
|
|
250
|
-
|
|
250
|
+
p[s] += d * (n && a ? -1 : 1);
|
|
251
251
|
break;
|
|
252
252
|
}
|
|
253
|
-
return
|
|
253
|
+
return p;
|
|
254
254
|
}
|
|
255
|
-
const
|
|
255
|
+
const rn = async (e, t, n) => {
|
|
256
256
|
const {
|
|
257
257
|
placement: o = "bottom",
|
|
258
258
|
strategy: l = "absolute",
|
|
259
259
|
middleware: i = [],
|
|
260
260
|
platform: s
|
|
261
|
-
} = n,
|
|
262
|
-
let
|
|
261
|
+
} = n, r = i.filter(Boolean), c = await (s.isRTL == null ? void 0 : s.isRTL(t));
|
|
262
|
+
let a = await s.getElementRects({
|
|
263
263
|
reference: e,
|
|
264
264
|
floating: t,
|
|
265
265
|
strategy: l
|
|
266
266
|
}), {
|
|
267
267
|
x: u,
|
|
268
|
-
y:
|
|
269
|
-
} =
|
|
270
|
-
for (let
|
|
268
|
+
y: f
|
|
269
|
+
} = dt(a, o, c), d = o, p = {}, v = 0;
|
|
270
|
+
for (let w = 0; w < r.length; w++) {
|
|
271
271
|
const {
|
|
272
|
-
name:
|
|
272
|
+
name: x,
|
|
273
273
|
fn: g
|
|
274
|
-
} =
|
|
275
|
-
x:
|
|
276
|
-
y:
|
|
274
|
+
} = r[w], {
|
|
275
|
+
x: S,
|
|
276
|
+
y: R,
|
|
277
277
|
data: V,
|
|
278
278
|
reset: D
|
|
279
279
|
} = await g({
|
|
280
280
|
x: u,
|
|
281
|
-
y:
|
|
281
|
+
y: f,
|
|
282
282
|
initialPlacement: o,
|
|
283
283
|
placement: d,
|
|
284
284
|
strategy: l,
|
|
285
|
-
middlewareData:
|
|
286
|
-
rects:
|
|
285
|
+
middlewareData: p,
|
|
286
|
+
rects: a,
|
|
287
287
|
platform: s,
|
|
288
288
|
elements: {
|
|
289
289
|
reference: e,
|
|
290
290
|
floating: t
|
|
291
291
|
}
|
|
292
292
|
});
|
|
293
|
-
u =
|
|
294
|
-
...
|
|
295
|
-
[
|
|
296
|
-
...
|
|
293
|
+
u = S ?? u, f = R ?? f, p = {
|
|
294
|
+
...p,
|
|
295
|
+
[x]: {
|
|
296
|
+
...p[x],
|
|
297
297
|
...V
|
|
298
298
|
}
|
|
299
|
-
}, D && v <= 50 && (v++, typeof D == "object" && (D.placement && (d = D.placement), D.rects && (
|
|
299
|
+
}, D && v <= 50 && (v++, typeof D == "object" && (D.placement && (d = D.placement), D.rects && (a = D.rects === !0 ? await s.getElementRects({
|
|
300
300
|
reference: e,
|
|
301
301
|
floating: t,
|
|
302
302
|
strategy: l
|
|
303
303
|
}) : D.rects), {
|
|
304
304
|
x: u,
|
|
305
|
-
y:
|
|
306
|
-
} =
|
|
305
|
+
y: f
|
|
306
|
+
} = dt(a, d, c)), w = -1);
|
|
307
307
|
}
|
|
308
308
|
return {
|
|
309
309
|
x: u,
|
|
310
|
-
y:
|
|
310
|
+
y: f,
|
|
311
311
|
placement: d,
|
|
312
312
|
strategy: l,
|
|
313
|
-
middlewareData:
|
|
313
|
+
middlewareData: p
|
|
314
314
|
};
|
|
315
315
|
};
|
|
316
316
|
async function Xe(e, t) {
|
|
@@ -321,36 +321,36 @@ async function Xe(e, t) {
|
|
|
321
321
|
y: l,
|
|
322
322
|
platform: i,
|
|
323
323
|
rects: s,
|
|
324
|
-
elements:
|
|
324
|
+
elements: r,
|
|
325
325
|
strategy: c
|
|
326
326
|
} = e, {
|
|
327
|
-
boundary:
|
|
327
|
+
boundary: a = "clippingAncestors",
|
|
328
328
|
rootBoundary: u = "viewport",
|
|
329
|
-
elementContext:
|
|
329
|
+
elementContext: f = "floating",
|
|
330
330
|
altBoundary: d = !1,
|
|
331
|
-
padding:
|
|
332
|
-
} =
|
|
333
|
-
element: (n = await (i.isElement == null ? void 0 : i.isElement(
|
|
334
|
-
boundary:
|
|
331
|
+
padding: p = 0
|
|
332
|
+
} = Se(t, e), v = an(p), x = r[d ? f === "floating" ? "reference" : "floating" : f], g = Be(await i.getClippingRect({
|
|
333
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(x))) == null || n ? x : x.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(r.floating)),
|
|
334
|
+
boundary: a,
|
|
335
335
|
rootBoundary: u,
|
|
336
336
|
strategy: c
|
|
337
|
-
})),
|
|
337
|
+
})), S = f === "floating" ? {
|
|
338
338
|
x: o,
|
|
339
339
|
y: l,
|
|
340
340
|
width: s.floating.width,
|
|
341
341
|
height: s.floating.height
|
|
342
|
-
} : s.reference,
|
|
342
|
+
} : s.reference, R = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(r.floating)), V = await (i.isElement == null ? void 0 : i.isElement(R)) ? await (i.getScale == null ? void 0 : i.getScale(R)) || {
|
|
343
343
|
x: 1,
|
|
344
344
|
y: 1
|
|
345
345
|
} : {
|
|
346
346
|
x: 1,
|
|
347
347
|
y: 1
|
|
348
|
-
}, D =
|
|
349
|
-
elements:
|
|
350
|
-
rect:
|
|
351
|
-
offsetParent:
|
|
348
|
+
}, D = Be(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
349
|
+
elements: r,
|
|
350
|
+
rect: S,
|
|
351
|
+
offsetParent: R,
|
|
352
352
|
strategy: c
|
|
353
|
-
}) :
|
|
353
|
+
}) : S);
|
|
354
354
|
return {
|
|
355
355
|
top: (g.top - D.top + v.top) / V.y,
|
|
356
356
|
bottom: (D.bottom - g.bottom + v.bottom) / V.y,
|
|
@@ -358,7 +358,7 @@ async function Xe(e, t) {
|
|
|
358
358
|
right: (D.right - g.right + v.right) / V.x
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
|
-
const
|
|
361
|
+
const cn = function(e) {
|
|
362
362
|
return e === void 0 && (e = {}), {
|
|
363
363
|
name: "flip",
|
|
364
364
|
options: e,
|
|
@@ -368,106 +368,106 @@ const rn = function(e) {
|
|
|
368
368
|
placement: l,
|
|
369
369
|
middlewareData: i,
|
|
370
370
|
rects: s,
|
|
371
|
-
initialPlacement:
|
|
371
|
+
initialPlacement: r,
|
|
372
372
|
platform: c,
|
|
373
|
-
elements:
|
|
373
|
+
elements: a
|
|
374
374
|
} = t, {
|
|
375
375
|
mainAxis: u = !0,
|
|
376
|
-
crossAxis:
|
|
376
|
+
crossAxis: f = !0,
|
|
377
377
|
fallbackPlacements: d,
|
|
378
|
-
fallbackStrategy:
|
|
378
|
+
fallbackStrategy: p = "bestFit",
|
|
379
379
|
fallbackAxisSideDirection: v = "none",
|
|
380
|
-
flipAlignment:
|
|
381
|
-
...
|
|
382
|
-
} =
|
|
380
|
+
flipAlignment: w = !0,
|
|
381
|
+
...x
|
|
382
|
+
} = Se(e, t);
|
|
383
383
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
384
384
|
return {};
|
|
385
|
-
const g =
|
|
386
|
-
!d && W && D.push(...
|
|
387
|
-
const
|
|
388
|
-
let
|
|
389
|
-
if (u && K.push(
|
|
390
|
-
const
|
|
391
|
-
K.push(
|
|
385
|
+
const g = ie(l), S = le(r), R = ie(r) === r, V = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), D = d || (R || !w ? [De(r)] : en(r)), W = v !== "none";
|
|
386
|
+
!d && W && D.push(...ln(r, w, v, V));
|
|
387
|
+
const U = [r, ...D], Q = await Xe(t, x), K = [];
|
|
388
|
+
let P = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
389
|
+
if (u && K.push(Q[g]), f) {
|
|
390
|
+
const q = Zt(l, s, V);
|
|
391
|
+
K.push(Q[q[0]], Q[q[1]]);
|
|
392
392
|
}
|
|
393
|
-
if (
|
|
393
|
+
if (P = [...P, {
|
|
394
394
|
placement: l,
|
|
395
395
|
overflows: K
|
|
396
|
-
}], !K.every((
|
|
397
|
-
var
|
|
398
|
-
const
|
|
399
|
-
if (
|
|
396
|
+
}], !K.every((q) => q <= 0)) {
|
|
397
|
+
var te, z;
|
|
398
|
+
const q = (((te = i.flip) == null ? void 0 : te.index) || 0) + 1, re = U[q];
|
|
399
|
+
if (re && (!(f === "alignment" ? S !== le(re) : !1) || // We leave the current main axis only if every placement on that axis
|
|
400
400
|
// overflows the main axis.
|
|
401
|
-
|
|
401
|
+
P.every((T) => le(T.placement) === S ? T.overflows[0] > 0 : !0)))
|
|
402
402
|
return {
|
|
403
403
|
data: {
|
|
404
|
-
index:
|
|
405
|
-
overflows:
|
|
404
|
+
index: q,
|
|
405
|
+
overflows: P
|
|
406
406
|
},
|
|
407
407
|
reset: {
|
|
408
|
-
placement:
|
|
408
|
+
placement: re
|
|
409
409
|
}
|
|
410
410
|
};
|
|
411
|
-
let
|
|
412
|
-
if (!
|
|
413
|
-
switch (
|
|
411
|
+
let k = (z = P.filter((O) => O.overflows[0] <= 0).sort((O, T) => O.overflows[1] - T.overflows[1])[0]) == null ? void 0 : z.placement;
|
|
412
|
+
if (!k)
|
|
413
|
+
switch (p) {
|
|
414
414
|
case "bestFit": {
|
|
415
|
-
var
|
|
416
|
-
const O = (
|
|
415
|
+
var F;
|
|
416
|
+
const O = (F = P.filter((T) => {
|
|
417
417
|
if (W) {
|
|
418
|
-
const
|
|
419
|
-
return
|
|
418
|
+
const H = le(T.placement);
|
|
419
|
+
return H === S || // Create a bias to the `y` side axis due to horizontal
|
|
420
420
|
// reading directions favoring greater width.
|
|
421
|
-
|
|
421
|
+
H === "y";
|
|
422
422
|
}
|
|
423
423
|
return !0;
|
|
424
|
-
}).map((
|
|
425
|
-
O && (
|
|
424
|
+
}).map((T) => [T.placement, T.overflows.filter((H) => H > 0).reduce((H, Ae) => H + Ae, 0)]).sort((T, H) => T[1] - H[1])[0]) == null ? void 0 : F[0];
|
|
425
|
+
O && (k = O);
|
|
426
426
|
break;
|
|
427
427
|
}
|
|
428
428
|
case "initialPlacement":
|
|
429
|
-
|
|
429
|
+
k = r;
|
|
430
430
|
break;
|
|
431
431
|
}
|
|
432
|
-
if (l !==
|
|
432
|
+
if (l !== k)
|
|
433
433
|
return {
|
|
434
434
|
reset: {
|
|
435
|
-
placement:
|
|
435
|
+
placement: k
|
|
436
436
|
}
|
|
437
437
|
};
|
|
438
438
|
}
|
|
439
439
|
return {};
|
|
440
440
|
}
|
|
441
441
|
};
|
|
442
|
-
},
|
|
443
|
-
async function
|
|
442
|
+
}, un = /* @__PURE__ */ new Set(["left", "top"]);
|
|
443
|
+
async function dn(e, t) {
|
|
444
444
|
const {
|
|
445
445
|
placement: n,
|
|
446
446
|
platform: o,
|
|
447
447
|
elements: l
|
|
448
|
-
} = e, i = await (o.isRTL == null ? void 0 : o.isRTL(l.floating)), s =
|
|
448
|
+
} = e, i = await (o.isRTL == null ? void 0 : o.isRTL(l.floating)), s = ie(n), r = ke(n), c = le(n) === "y", a = un.has(s) ? -1 : 1, u = i && c ? -1 : 1, f = Se(t, e);
|
|
449
449
|
let {
|
|
450
450
|
mainAxis: d,
|
|
451
|
-
crossAxis:
|
|
451
|
+
crossAxis: p,
|
|
452
452
|
alignmentAxis: v
|
|
453
|
-
} = typeof
|
|
454
|
-
mainAxis:
|
|
453
|
+
} = typeof f == "number" ? {
|
|
454
|
+
mainAxis: f,
|
|
455
455
|
crossAxis: 0,
|
|
456
456
|
alignmentAxis: null
|
|
457
457
|
} : {
|
|
458
|
-
mainAxis:
|
|
459
|
-
crossAxis:
|
|
460
|
-
alignmentAxis:
|
|
458
|
+
mainAxis: f.mainAxis || 0,
|
|
459
|
+
crossAxis: f.crossAxis || 0,
|
|
460
|
+
alignmentAxis: f.alignmentAxis
|
|
461
461
|
};
|
|
462
|
-
return
|
|
463
|
-
x:
|
|
464
|
-
y: d *
|
|
462
|
+
return r && typeof v == "number" && (p = r === "end" ? v * -1 : v), c ? {
|
|
463
|
+
x: p * u,
|
|
464
|
+
y: d * a
|
|
465
465
|
} : {
|
|
466
|
-
x: d *
|
|
467
|
-
y:
|
|
466
|
+
x: d * a,
|
|
467
|
+
y: p * u
|
|
468
468
|
};
|
|
469
469
|
}
|
|
470
|
-
const
|
|
470
|
+
const fn = function(e) {
|
|
471
471
|
return e === void 0 && (e = 0), {
|
|
472
472
|
name: "offset",
|
|
473
473
|
options: e,
|
|
@@ -477,9 +477,9 @@ const dn = function(e) {
|
|
|
477
477
|
x: l,
|
|
478
478
|
y: i,
|
|
479
479
|
placement: s,
|
|
480
|
-
middlewareData:
|
|
481
|
-
} = t, c = await
|
|
482
|
-
return s === ((n =
|
|
480
|
+
middlewareData: r
|
|
481
|
+
} = t, c = await dn(t, e);
|
|
482
|
+
return s === ((n = r.offset) == null ? void 0 : n.placement) && (o = r.arrow) != null && o.alignmentOffset ? {} : {
|
|
483
483
|
x: l + c.x,
|
|
484
484
|
y: i + c.y,
|
|
485
485
|
data: {
|
|
@@ -489,7 +489,7 @@ const dn = function(e) {
|
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
491
|
};
|
|
492
|
-
},
|
|
492
|
+
}, pn = function(e) {
|
|
493
493
|
return e === void 0 && (e = {}), {
|
|
494
494
|
name: "shift",
|
|
495
495
|
options: e,
|
|
@@ -501,45 +501,45 @@ const dn = function(e) {
|
|
|
501
501
|
} = t, {
|
|
502
502
|
mainAxis: i = !0,
|
|
503
503
|
crossAxis: s = !1,
|
|
504
|
-
limiter:
|
|
505
|
-
fn: (
|
|
504
|
+
limiter: r = {
|
|
505
|
+
fn: (x) => {
|
|
506
506
|
let {
|
|
507
507
|
x: g,
|
|
508
|
-
y:
|
|
509
|
-
} =
|
|
508
|
+
y: S
|
|
509
|
+
} = x;
|
|
510
510
|
return {
|
|
511
511
|
x: g,
|
|
512
|
-
y:
|
|
512
|
+
y: S
|
|
513
513
|
};
|
|
514
514
|
}
|
|
515
515
|
},
|
|
516
516
|
...c
|
|
517
|
-
} =
|
|
517
|
+
} = Se(e, t), a = {
|
|
518
518
|
x: n,
|
|
519
519
|
y: o
|
|
520
|
-
}, u = await Xe(t, c),
|
|
521
|
-
let
|
|
520
|
+
}, u = await Xe(t, c), f = le(ie(l)), d = wt(f);
|
|
521
|
+
let p = a[d], v = a[f];
|
|
522
522
|
if (i) {
|
|
523
|
-
const
|
|
524
|
-
|
|
523
|
+
const x = d === "y" ? "top" : "left", g = d === "y" ? "bottom" : "right", S = p + u[x], R = p - u[g];
|
|
524
|
+
p = rt(S, p, R);
|
|
525
525
|
}
|
|
526
526
|
if (s) {
|
|
527
|
-
const
|
|
528
|
-
v =
|
|
527
|
+
const x = f === "y" ? "top" : "left", g = f === "y" ? "bottom" : "right", S = v + u[x], R = v - u[g];
|
|
528
|
+
v = rt(S, v, R);
|
|
529
529
|
}
|
|
530
|
-
const
|
|
530
|
+
const w = r.fn({
|
|
531
531
|
...t,
|
|
532
|
-
[d]:
|
|
533
|
-
[
|
|
532
|
+
[d]: p,
|
|
533
|
+
[f]: v
|
|
534
534
|
});
|
|
535
535
|
return {
|
|
536
|
-
...
|
|
536
|
+
...w,
|
|
537
537
|
data: {
|
|
538
|
-
x:
|
|
539
|
-
y:
|
|
538
|
+
x: w.x - n,
|
|
539
|
+
y: w.y - o,
|
|
540
540
|
enabled: {
|
|
541
541
|
[d]: i,
|
|
542
|
-
[
|
|
542
|
+
[f]: s
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
};
|
|
@@ -555,30 +555,30 @@ const dn = function(e) {
|
|
|
555
555
|
placement: l,
|
|
556
556
|
rects: i,
|
|
557
557
|
platform: s,
|
|
558
|
-
elements:
|
|
558
|
+
elements: r
|
|
559
559
|
} = t, {
|
|
560
560
|
apply: c = () => {
|
|
561
561
|
},
|
|
562
|
-
...
|
|
563
|
-
} =
|
|
562
|
+
...a
|
|
563
|
+
} = Se(e, t), u = await Xe(t, a), f = ie(l), d = ke(l), p = le(l) === "y", {
|
|
564
564
|
width: v,
|
|
565
|
-
height:
|
|
565
|
+
height: w
|
|
566
566
|
} = i.floating;
|
|
567
|
-
let
|
|
568
|
-
|
|
569
|
-
const
|
|
570
|
-
let
|
|
571
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (
|
|
572
|
-
const
|
|
573
|
-
|
|
567
|
+
let x, g;
|
|
568
|
+
f === "top" || f === "bottom" ? (x = f, g = d === (await (s.isRTL == null ? void 0 : s.isRTL(r.floating)) ? "start" : "end") ? "left" : "right") : (g = f, x = d === "end" ? "top" : "bottom");
|
|
569
|
+
const S = w - u.top - u.bottom, R = v - u.left - u.right, V = ve(w - u[x], S), D = ve(v - u[g], R), W = !t.middlewareData.shift;
|
|
570
|
+
let U = V, Q = D;
|
|
571
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (Q = R), (o = t.middlewareData.shift) != null && o.enabled.y && (U = S), W && !d) {
|
|
572
|
+
const P = $(u.left, 0), te = $(u.right, 0), z = $(u.top, 0), F = $(u.bottom, 0);
|
|
573
|
+
p ? Q = v - 2 * (P !== 0 || te !== 0 ? P + te : $(u.left, u.right)) : U = w - 2 * (z !== 0 || F !== 0 ? z + F : $(u.top, u.bottom));
|
|
574
574
|
}
|
|
575
575
|
await c({
|
|
576
576
|
...t,
|
|
577
|
-
availableWidth:
|
|
578
|
-
availableHeight:
|
|
577
|
+
availableWidth: Q,
|
|
578
|
+
availableHeight: U
|
|
579
579
|
});
|
|
580
|
-
const K = await s.getDimensions(
|
|
581
|
-
return v !== K.width ||
|
|
580
|
+
const K = await s.getDimensions(r.floating);
|
|
581
|
+
return v !== K.width || w !== K.height ? {
|
|
582
582
|
reset: {
|
|
583
583
|
rects: !0
|
|
584
584
|
}
|
|
@@ -586,49 +586,49 @@ const dn = function(e) {
|
|
|
586
586
|
}
|
|
587
587
|
};
|
|
588
588
|
};
|
|
589
|
-
function
|
|
589
|
+
function Le() {
|
|
590
590
|
return typeof window < "u";
|
|
591
591
|
}
|
|
592
|
-
function
|
|
593
|
-
return
|
|
592
|
+
function ye(e) {
|
|
593
|
+
return Ct(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
594
594
|
}
|
|
595
595
|
function J(e) {
|
|
596
596
|
var t;
|
|
597
597
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function ee(e) {
|
|
600
600
|
var t;
|
|
601
|
-
return (t = (
|
|
601
|
+
return (t = (Ct(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
602
602
|
}
|
|
603
|
-
function
|
|
604
|
-
return
|
|
603
|
+
function Ct(e) {
|
|
604
|
+
return Le() ? e instanceof Node || e instanceof J(e).Node : !1;
|
|
605
605
|
}
|
|
606
|
-
function
|
|
607
|
-
return
|
|
606
|
+
function G(e) {
|
|
607
|
+
return Le() ? e instanceof Element || e instanceof J(e).Element : !1;
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
return
|
|
609
|
+
function Z(e) {
|
|
610
|
+
return Le() ? e instanceof HTMLElement || e instanceof J(e).HTMLElement : !1;
|
|
611
611
|
}
|
|
612
|
-
function
|
|
613
|
-
return !
|
|
612
|
+
function ft(e) {
|
|
613
|
+
return !Le() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof J(e).ShadowRoot;
|
|
614
614
|
}
|
|
615
|
-
const
|
|
616
|
-
function
|
|
615
|
+
const hn = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
616
|
+
function Re(e) {
|
|
617
617
|
const {
|
|
618
618
|
overflow: t,
|
|
619
619
|
overflowX: n,
|
|
620
620
|
overflowY: o,
|
|
621
621
|
display: l
|
|
622
622
|
} = Y(e);
|
|
623
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !
|
|
623
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !hn.has(l);
|
|
624
624
|
}
|
|
625
|
-
const
|
|
626
|
-
function
|
|
627
|
-
return
|
|
625
|
+
const vn = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
626
|
+
function gn(e) {
|
|
627
|
+
return vn.has(ye(e));
|
|
628
628
|
}
|
|
629
|
-
const
|
|
630
|
-
function
|
|
631
|
-
return
|
|
629
|
+
const yn = [":popover-open", ":modal"];
|
|
630
|
+
function Ne(e) {
|
|
631
|
+
return yn.some((t) => {
|
|
632
632
|
try {
|
|
633
633
|
return e.matches(t);
|
|
634
634
|
} catch {
|
|
@@ -636,34 +636,34 @@ function Be(e) {
|
|
|
636
636
|
}
|
|
637
637
|
});
|
|
638
638
|
}
|
|
639
|
-
const
|
|
640
|
-
function
|
|
641
|
-
const t =
|
|
642
|
-
return
|
|
639
|
+
const An = ["transform", "translate", "scale", "rotate", "perspective"], wn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], xn = ["paint", "layout", "strict", "content"];
|
|
640
|
+
function Ze(e) {
|
|
641
|
+
const t = et(), n = G(e) ? Y(e) : e;
|
|
642
|
+
return An.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || wn.some((o) => (n.willChange || "").includes(o)) || xn.some((o) => (n.contain || "").includes(o));
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
let t =
|
|
646
|
-
for (;
|
|
647
|
-
if (
|
|
644
|
+
function bn(e) {
|
|
645
|
+
let t = ae(e);
|
|
646
|
+
for (; Z(t) && !ge(t); ) {
|
|
647
|
+
if (Ze(t))
|
|
648
648
|
return t;
|
|
649
|
-
if (
|
|
649
|
+
if (Ne(t))
|
|
650
650
|
return null;
|
|
651
|
-
t =
|
|
651
|
+
t = ae(t);
|
|
652
652
|
}
|
|
653
653
|
return null;
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function et() {
|
|
656
656
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
657
657
|
}
|
|
658
|
-
const
|
|
659
|
-
function
|
|
660
|
-
return
|
|
658
|
+
const Cn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
659
|
+
function ge(e) {
|
|
660
|
+
return Cn.has(ye(e));
|
|
661
661
|
}
|
|
662
662
|
function Y(e) {
|
|
663
663
|
return J(e).getComputedStyle(e);
|
|
664
664
|
}
|
|
665
|
-
function
|
|
666
|
-
return
|
|
665
|
+
function Ie(e) {
|
|
666
|
+
return G(e) ? {
|
|
667
667
|
scrollLeft: e.scrollLeft,
|
|
668
668
|
scrollTop: e.scrollTop
|
|
669
669
|
} : {
|
|
@@ -671,189 +671,189 @@ function Le(e) {
|
|
|
671
671
|
scrollTop: e.scrollY
|
|
672
672
|
};
|
|
673
673
|
}
|
|
674
|
-
function
|
|
675
|
-
if (
|
|
674
|
+
function ae(e) {
|
|
675
|
+
if (ye(e) === "html")
|
|
676
676
|
return e;
|
|
677
677
|
const t = (
|
|
678
678
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
679
679
|
e.assignedSlot || // DOM Element detected.
|
|
680
680
|
e.parentNode || // ShadowRoot detected.
|
|
681
|
-
|
|
682
|
-
|
|
681
|
+
ft(e) && e.host || // Fallback.
|
|
682
|
+
ee(e)
|
|
683
683
|
);
|
|
684
|
-
return
|
|
684
|
+
return ft(t) ? t.host : t;
|
|
685
685
|
}
|
|
686
|
-
function
|
|
687
|
-
const t =
|
|
688
|
-
return
|
|
686
|
+
function St(e) {
|
|
687
|
+
const t = ae(e);
|
|
688
|
+
return ge(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Z(t) && Re(t) ? t : St(t);
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function Ce(e, t, n) {
|
|
691
691
|
var o;
|
|
692
692
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
693
|
-
const l =
|
|
693
|
+
const l = St(e), i = l === ((o = e.ownerDocument) == null ? void 0 : o.body), s = J(l);
|
|
694
694
|
if (i) {
|
|
695
|
-
const
|
|
696
|
-
return t.concat(s, s.visualViewport || [],
|
|
695
|
+
const r = Je(s);
|
|
696
|
+
return t.concat(s, s.visualViewport || [], Re(l) ? l : [], r && n ? Ce(r) : []);
|
|
697
697
|
}
|
|
698
|
-
return t.concat(l,
|
|
698
|
+
return t.concat(l, Ce(l, [], n));
|
|
699
699
|
}
|
|
700
|
-
function
|
|
700
|
+
function Je(e) {
|
|
701
701
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function kt(e) {
|
|
704
704
|
const t = Y(e);
|
|
705
705
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
706
|
-
const l =
|
|
707
|
-
return
|
|
706
|
+
const l = Z(e), i = l ? e.offsetWidth : n, s = l ? e.offsetHeight : o, r = Ve(n) !== i || Ve(o) !== s;
|
|
707
|
+
return r && (n = i, o = s), {
|
|
708
708
|
width: n,
|
|
709
709
|
height: o,
|
|
710
|
-
$:
|
|
710
|
+
$: r
|
|
711
711
|
};
|
|
712
712
|
}
|
|
713
|
-
function
|
|
714
|
-
return
|
|
713
|
+
function tt(e) {
|
|
714
|
+
return G(e) ? e : e.contextElement;
|
|
715
715
|
}
|
|
716
|
-
function
|
|
717
|
-
const t =
|
|
718
|
-
if (!
|
|
716
|
+
function he(e) {
|
|
717
|
+
const t = tt(e);
|
|
718
|
+
if (!Z(t))
|
|
719
719
|
return X(1);
|
|
720
720
|
const n = t.getBoundingClientRect(), {
|
|
721
721
|
width: o,
|
|
722
722
|
height: l,
|
|
723
723
|
$: i
|
|
724
|
-
} =
|
|
725
|
-
let s = (i ?
|
|
726
|
-
return (!s || !Number.isFinite(s)) && (s = 1), (!
|
|
724
|
+
} = kt(t);
|
|
725
|
+
let s = (i ? Ve(n.width) : n.width) / o, r = (i ? Ve(n.height) : n.height) / l;
|
|
726
|
+
return (!s || !Number.isFinite(s)) && (s = 1), (!r || !Number.isFinite(r)) && (r = 1), {
|
|
727
727
|
x: s,
|
|
728
|
-
y:
|
|
728
|
+
y: r
|
|
729
729
|
};
|
|
730
730
|
}
|
|
731
|
-
const
|
|
732
|
-
function
|
|
731
|
+
const Sn = /* @__PURE__ */ X(0);
|
|
732
|
+
function Rt(e) {
|
|
733
733
|
const t = J(e);
|
|
734
|
-
return !
|
|
734
|
+
return !et() || !t.visualViewport ? Sn : {
|
|
735
735
|
x: t.visualViewport.offsetLeft,
|
|
736
736
|
y: t.visualViewport.offsetTop
|
|
737
737
|
};
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function kn(e, t, n) {
|
|
740
740
|
return t === void 0 && (t = !1), !n || t && n !== J(e) ? !1 : t;
|
|
741
741
|
}
|
|
742
742
|
function de(e, t, n, o) {
|
|
743
743
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
744
|
-
const l = e.getBoundingClientRect(), i =
|
|
744
|
+
const l = e.getBoundingClientRect(), i = tt(e);
|
|
745
745
|
let s = X(1);
|
|
746
|
-
t && (o ?
|
|
747
|
-
const
|
|
748
|
-
let c = (l.left +
|
|
746
|
+
t && (o ? G(o) && (s = he(o)) : s = he(e));
|
|
747
|
+
const r = kn(i, n, o) ? Rt(i) : X(0);
|
|
748
|
+
let c = (l.left + r.x) / s.x, a = (l.top + r.y) / s.y, u = l.width / s.x, f = l.height / s.y;
|
|
749
749
|
if (i) {
|
|
750
|
-
const d = J(i),
|
|
751
|
-
let v = d,
|
|
752
|
-
for (;
|
|
753
|
-
const
|
|
754
|
-
c *=
|
|
750
|
+
const d = J(i), p = o && G(o) ? J(o) : o;
|
|
751
|
+
let v = d, w = Je(v);
|
|
752
|
+
for (; w && o && p !== v; ) {
|
|
753
|
+
const x = he(w), g = w.getBoundingClientRect(), S = Y(w), R = g.left + (w.clientLeft + parseFloat(S.paddingLeft)) * x.x, V = g.top + (w.clientTop + parseFloat(S.paddingTop)) * x.y;
|
|
754
|
+
c *= x.x, a *= x.y, u *= x.x, f *= x.y, c += R, a += V, v = J(w), w = Je(v);
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
return
|
|
757
|
+
return Be({
|
|
758
758
|
width: u,
|
|
759
|
-
height:
|
|
759
|
+
height: f,
|
|
760
760
|
x: c,
|
|
761
|
-
y:
|
|
761
|
+
y: a
|
|
762
762
|
});
|
|
763
763
|
}
|
|
764
|
-
function
|
|
765
|
-
const n =
|
|
766
|
-
return t ? t.left + n : de(
|
|
764
|
+
function Fe(e, t) {
|
|
765
|
+
const n = Ie(e).scrollLeft;
|
|
766
|
+
return t ? t.left + n : de(ee(e)).left + n;
|
|
767
767
|
}
|
|
768
|
-
function
|
|
769
|
-
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft -
|
|
768
|
+
function _t(e, t) {
|
|
769
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - Fe(e, n), l = n.top + t.scrollTop;
|
|
770
770
|
return {
|
|
771
771
|
x: o,
|
|
772
772
|
y: l
|
|
773
773
|
};
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function Rn(e) {
|
|
776
776
|
let {
|
|
777
777
|
elements: t,
|
|
778
778
|
rect: n,
|
|
779
779
|
offsetParent: o,
|
|
780
780
|
strategy: l
|
|
781
781
|
} = e;
|
|
782
|
-
const i = l === "fixed", s =
|
|
783
|
-
if (o === s ||
|
|
782
|
+
const i = l === "fixed", s = ee(o), r = t ? Ne(t.floating) : !1;
|
|
783
|
+
if (o === s || r && i)
|
|
784
784
|
return n;
|
|
785
785
|
let c = {
|
|
786
786
|
scrollLeft: 0,
|
|
787
787
|
scrollTop: 0
|
|
788
|
-
},
|
|
789
|
-
const u = X(0),
|
|
790
|
-
if ((
|
|
791
|
-
const
|
|
792
|
-
|
|
788
|
+
}, a = X(1);
|
|
789
|
+
const u = X(0), f = Z(o);
|
|
790
|
+
if ((f || !f && !i) && ((ye(o) !== "body" || Re(s)) && (c = Ie(o)), Z(o))) {
|
|
791
|
+
const p = de(o);
|
|
792
|
+
a = he(o), u.x = p.x + o.clientLeft, u.y = p.y + o.clientTop;
|
|
793
793
|
}
|
|
794
|
-
const d = s && !
|
|
794
|
+
const d = s && !f && !i ? _t(s, c) : X(0);
|
|
795
795
|
return {
|
|
796
|
-
width: n.width *
|
|
797
|
-
height: n.height *
|
|
798
|
-
x: n.x *
|
|
799
|
-
y: n.y *
|
|
796
|
+
width: n.width * a.x,
|
|
797
|
+
height: n.height * a.y,
|
|
798
|
+
x: n.x * a.x - c.scrollLeft * a.x + u.x + d.x,
|
|
799
|
+
y: n.y * a.y - c.scrollTop * a.y + u.y + d.y
|
|
800
800
|
};
|
|
801
801
|
}
|
|
802
|
-
function
|
|
802
|
+
function _n(e) {
|
|
803
803
|
return Array.from(e.getClientRects());
|
|
804
804
|
}
|
|
805
|
-
function
|
|
806
|
-
const t =
|
|
807
|
-
let s = -n.scrollLeft +
|
|
808
|
-
const
|
|
805
|
+
function On(e) {
|
|
806
|
+
const t = ee(e), n = Ie(e), o = e.ownerDocument.body, l = $(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), i = $(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
807
|
+
let s = -n.scrollLeft + Fe(e);
|
|
808
|
+
const r = -n.scrollTop;
|
|
809
809
|
return Y(o).direction === "rtl" && (s += $(t.clientWidth, o.clientWidth) - l), {
|
|
810
810
|
width: l,
|
|
811
811
|
height: i,
|
|
812
812
|
x: s,
|
|
813
|
-
y:
|
|
813
|
+
y: r
|
|
814
814
|
};
|
|
815
815
|
}
|
|
816
|
-
const
|
|
817
|
-
function
|
|
818
|
-
const n = J(e), o =
|
|
819
|
-
let i = o.clientWidth, s = o.clientHeight,
|
|
816
|
+
const pt = 25;
|
|
817
|
+
function Tn(e, t) {
|
|
818
|
+
const n = J(e), o = ee(e), l = n.visualViewport;
|
|
819
|
+
let i = o.clientWidth, s = o.clientHeight, r = 0, c = 0;
|
|
820
820
|
if (l) {
|
|
821
821
|
i = l.width, s = l.height;
|
|
822
|
-
const u =
|
|
823
|
-
(!u || u && t === "fixed") && (
|
|
822
|
+
const u = et();
|
|
823
|
+
(!u || u && t === "fixed") && (r = l.offsetLeft, c = l.offsetTop);
|
|
824
824
|
}
|
|
825
|
-
const
|
|
826
|
-
if (
|
|
827
|
-
const u = o.ownerDocument,
|
|
828
|
-
v <=
|
|
829
|
-
} else
|
|
825
|
+
const a = Fe(o);
|
|
826
|
+
if (a <= 0) {
|
|
827
|
+
const u = o.ownerDocument, f = u.body, d = getComputedStyle(f), p = u.compatMode === "CSS1Compat" && parseFloat(d.marginLeft) + parseFloat(d.marginRight) || 0, v = Math.abs(o.clientWidth - f.clientWidth - p);
|
|
828
|
+
v <= pt && (i -= v);
|
|
829
|
+
} else a <= pt && (i += a);
|
|
830
830
|
return {
|
|
831
831
|
width: i,
|
|
832
832
|
height: s,
|
|
833
|
-
x:
|
|
833
|
+
x: r,
|
|
834
834
|
y: c
|
|
835
835
|
};
|
|
836
836
|
}
|
|
837
|
-
const
|
|
838
|
-
function
|
|
839
|
-
const n = de(e, !0, t === "fixed"), o = n.top + e.clientTop, l = n.left + e.clientLeft, i =
|
|
837
|
+
const En = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
838
|
+
function Vn(e, t) {
|
|
839
|
+
const n = de(e, !0, t === "fixed"), o = n.top + e.clientTop, l = n.left + e.clientLeft, i = Z(e) ? he(e) : X(1), s = e.clientWidth * i.x, r = e.clientHeight * i.y, c = l * i.x, a = o * i.y;
|
|
840
840
|
return {
|
|
841
841
|
width: s,
|
|
842
|
-
height:
|
|
842
|
+
height: r,
|
|
843
843
|
x: c,
|
|
844
|
-
y:
|
|
844
|
+
y: a
|
|
845
845
|
};
|
|
846
846
|
}
|
|
847
847
|
function mt(e, t, n) {
|
|
848
848
|
let o;
|
|
849
849
|
if (t === "viewport")
|
|
850
|
-
o =
|
|
850
|
+
o = Tn(e, n);
|
|
851
851
|
else if (t === "document")
|
|
852
|
-
o =
|
|
853
|
-
else if (
|
|
854
|
-
o =
|
|
852
|
+
o = On(ee(e));
|
|
853
|
+
else if (G(t))
|
|
854
|
+
o = Vn(t, n);
|
|
855
855
|
else {
|
|
856
|
-
const l =
|
|
856
|
+
const l = Rt(e);
|
|
857
857
|
o = {
|
|
858
858
|
x: t.x - l.x,
|
|
859
859
|
y: t.y - l.y,
|
|
@@ -861,36 +861,36 @@ function mt(e, t, n) {
|
|
|
861
861
|
height: t.height
|
|
862
862
|
};
|
|
863
863
|
}
|
|
864
|
-
return
|
|
864
|
+
return Be(o);
|
|
865
865
|
}
|
|
866
|
-
function
|
|
867
|
-
const n =
|
|
868
|
-
return n === t || !
|
|
866
|
+
function Ot(e, t) {
|
|
867
|
+
const n = ae(e);
|
|
868
|
+
return n === t || !G(n) || ge(n) ? !1 : Y(n).position === "fixed" || Ot(n, t);
|
|
869
869
|
}
|
|
870
|
-
function
|
|
870
|
+
function Dn(e, t) {
|
|
871
871
|
const n = t.get(e);
|
|
872
872
|
if (n)
|
|
873
873
|
return n;
|
|
874
|
-
let o =
|
|
874
|
+
let o = Ce(e, [], !1).filter((r) => G(r) && ye(r) !== "body"), l = null;
|
|
875
875
|
const i = Y(e).position === "fixed";
|
|
876
|
-
let s = i ?
|
|
877
|
-
for (;
|
|
878
|
-
const
|
|
879
|
-
!c &&
|
|
876
|
+
let s = i ? ae(e) : e;
|
|
877
|
+
for (; G(s) && !ge(s); ) {
|
|
878
|
+
const r = Y(s), c = Ze(s);
|
|
879
|
+
!c && r.position === "fixed" && (l = null), (i ? !c && !l : !c && r.position === "static" && !!l && En.has(l.position) || Re(s) && !c && Ot(e, s)) ? o = o.filter((u) => u !== s) : l = r, s = ae(s);
|
|
880
880
|
}
|
|
881
881
|
return t.set(e, o), o;
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function Bn(e) {
|
|
884
884
|
let {
|
|
885
885
|
element: t,
|
|
886
886
|
boundary: n,
|
|
887
887
|
rootBoundary: o,
|
|
888
888
|
strategy: l
|
|
889
889
|
} = e;
|
|
890
|
-
const s = [...n === "clippingAncestors" ?
|
|
891
|
-
const
|
|
892
|
-
return
|
|
893
|
-
}, mt(t,
|
|
890
|
+
const s = [...n === "clippingAncestors" ? Ne(t) ? [] : Dn(t, this._c) : [].concat(n), o], r = s[0], c = s.reduce((a, u) => {
|
|
891
|
+
const f = mt(t, u, l);
|
|
892
|
+
return a.top = $(f.top, a.top), a.right = ve(f.right, a.right), a.bottom = ve(f.bottom, a.bottom), a.left = $(f.left, a.left), a;
|
|
893
|
+
}, mt(t, r, l));
|
|
894
894
|
return {
|
|
895
895
|
width: c.right - c.left,
|
|
896
896
|
height: c.bottom - c.top,
|
|
@@ -898,73 +898,73 @@ function Dn(e) {
|
|
|
898
898
|
y: c.top
|
|
899
899
|
};
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function Ln(e) {
|
|
902
902
|
const {
|
|
903
903
|
width: t,
|
|
904
904
|
height: n
|
|
905
|
-
} =
|
|
905
|
+
} = kt(e);
|
|
906
906
|
return {
|
|
907
907
|
width: t,
|
|
908
908
|
height: n
|
|
909
909
|
};
|
|
910
910
|
}
|
|
911
|
-
function
|
|
912
|
-
const o =
|
|
913
|
-
let
|
|
911
|
+
function Nn(e, t, n) {
|
|
912
|
+
const o = Z(t), l = ee(t), i = n === "fixed", s = de(e, !0, i, t);
|
|
913
|
+
let r = {
|
|
914
914
|
scrollLeft: 0,
|
|
915
915
|
scrollTop: 0
|
|
916
916
|
};
|
|
917
917
|
const c = X(0);
|
|
918
|
-
function
|
|
919
|
-
c.x =
|
|
918
|
+
function a() {
|
|
919
|
+
c.x = Fe(l);
|
|
920
920
|
}
|
|
921
921
|
if (o || !o && !i)
|
|
922
|
-
if ((
|
|
923
|
-
const
|
|
924
|
-
c.x =
|
|
925
|
-
} else l &&
|
|
926
|
-
i && !o && l &&
|
|
927
|
-
const u = l && !o && !i ?
|
|
922
|
+
if ((ye(t) !== "body" || Re(l)) && (r = Ie(t)), o) {
|
|
923
|
+
const p = de(t, !0, i, t);
|
|
924
|
+
c.x = p.x + t.clientLeft, c.y = p.y + t.clientTop;
|
|
925
|
+
} else l && a();
|
|
926
|
+
i && !o && l && a();
|
|
927
|
+
const u = l && !o && !i ? _t(l, r) : X(0), f = s.left + r.scrollLeft - c.x - u.x, d = s.top + r.scrollTop - c.y - u.y;
|
|
928
928
|
return {
|
|
929
|
-
x:
|
|
929
|
+
x: f,
|
|
930
930
|
y: d,
|
|
931
931
|
width: s.width,
|
|
932
932
|
height: s.height
|
|
933
933
|
};
|
|
934
934
|
}
|
|
935
|
-
function
|
|
935
|
+
function Pe(e) {
|
|
936
936
|
return Y(e).position === "static";
|
|
937
937
|
}
|
|
938
|
-
function
|
|
939
|
-
if (!
|
|
938
|
+
function ht(e, t) {
|
|
939
|
+
if (!Z(e) || Y(e).position === "fixed")
|
|
940
940
|
return null;
|
|
941
941
|
if (t)
|
|
942
942
|
return t(e);
|
|
943
943
|
let n = e.offsetParent;
|
|
944
|
-
return
|
|
944
|
+
return ee(e) === n && (n = n.ownerDocument.body), n;
|
|
945
945
|
}
|
|
946
|
-
function
|
|
946
|
+
function Tt(e, t) {
|
|
947
947
|
const n = J(e);
|
|
948
|
-
if (
|
|
948
|
+
if (Ne(e))
|
|
949
949
|
return n;
|
|
950
|
-
if (!
|
|
951
|
-
let l =
|
|
952
|
-
for (; l && !
|
|
953
|
-
if (
|
|
950
|
+
if (!Z(e)) {
|
|
951
|
+
let l = ae(e);
|
|
952
|
+
for (; l && !ge(l); ) {
|
|
953
|
+
if (G(l) && !Pe(l))
|
|
954
954
|
return l;
|
|
955
|
-
l =
|
|
955
|
+
l = ae(l);
|
|
956
956
|
}
|
|
957
957
|
return n;
|
|
958
958
|
}
|
|
959
|
-
let o =
|
|
960
|
-
for (; o &&
|
|
961
|
-
o =
|
|
962
|
-
return o &&
|
|
959
|
+
let o = ht(e, t);
|
|
960
|
+
for (; o && gn(o) && Pe(o); )
|
|
961
|
+
o = ht(o, t);
|
|
962
|
+
return o && ge(o) && Pe(o) && !Ze(o) ? n : o || bn(e) || n;
|
|
963
963
|
}
|
|
964
964
|
const In = async function(e) {
|
|
965
|
-
const t = this.getOffsetParent ||
|
|
965
|
+
const t = this.getOffsetParent || Tt, n = this.getDimensions, o = await n(e.floating);
|
|
966
966
|
return {
|
|
967
|
-
reference:
|
|
967
|
+
reference: Nn(e.reference, await t(e.floating), e.strategy),
|
|
968
968
|
floating: {
|
|
969
969
|
x: 0,
|
|
970
970
|
y: 0,
|
|
@@ -977,61 +977,61 @@ function Fn(e) {
|
|
|
977
977
|
return Y(e).direction === "rtl";
|
|
978
978
|
}
|
|
979
979
|
const Mn = {
|
|
980
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
981
|
-
getDocumentElement:
|
|
982
|
-
getClippingRect:
|
|
983
|
-
getOffsetParent:
|
|
980
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Rn,
|
|
981
|
+
getDocumentElement: ee,
|
|
982
|
+
getClippingRect: Bn,
|
|
983
|
+
getOffsetParent: Tt,
|
|
984
984
|
getElementRects: In,
|
|
985
|
-
getClientRects:
|
|
986
|
-
getDimensions:
|
|
987
|
-
getScale:
|
|
988
|
-
isElement:
|
|
985
|
+
getClientRects: _n,
|
|
986
|
+
getDimensions: Ln,
|
|
987
|
+
getScale: he,
|
|
988
|
+
isElement: G,
|
|
989
989
|
isRTL: Fn
|
|
990
990
|
};
|
|
991
|
-
function
|
|
991
|
+
function Et(e, t) {
|
|
992
992
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function Un(e, t) {
|
|
995
995
|
let n = null, o;
|
|
996
|
-
const l =
|
|
996
|
+
const l = ee(e);
|
|
997
997
|
function i() {
|
|
998
|
-
var
|
|
999
|
-
clearTimeout(o), (
|
|
998
|
+
var r;
|
|
999
|
+
clearTimeout(o), (r = n) == null || r.disconnect(), n = null;
|
|
1000
1000
|
}
|
|
1001
|
-
function s(
|
|
1002
|
-
|
|
1003
|
-
const
|
|
1001
|
+
function s(r, c) {
|
|
1002
|
+
r === void 0 && (r = !1), c === void 0 && (c = 1), i();
|
|
1003
|
+
const a = e.getBoundingClientRect(), {
|
|
1004
1004
|
left: u,
|
|
1005
|
-
top:
|
|
1005
|
+
top: f,
|
|
1006
1006
|
width: d,
|
|
1007
|
-
height:
|
|
1008
|
-
} =
|
|
1009
|
-
if (
|
|
1007
|
+
height: p
|
|
1008
|
+
} = a;
|
|
1009
|
+
if (r || t(), !d || !p)
|
|
1010
1010
|
return;
|
|
1011
|
-
const v =
|
|
1012
|
-
rootMargin: -v + "px " + -
|
|
1013
|
-
threshold: $(0,
|
|
1011
|
+
const v = Oe(f), w = Oe(l.clientWidth - (u + d)), x = Oe(l.clientHeight - (f + p)), g = Oe(u), R = {
|
|
1012
|
+
rootMargin: -v + "px " + -w + "px " + -x + "px " + -g + "px",
|
|
1013
|
+
threshold: $(0, ve(1, c)) || 1
|
|
1014
1014
|
};
|
|
1015
1015
|
let V = !0;
|
|
1016
1016
|
function D(W) {
|
|
1017
|
-
const
|
|
1018
|
-
if (
|
|
1017
|
+
const U = W[0].intersectionRatio;
|
|
1018
|
+
if (U !== c) {
|
|
1019
1019
|
if (!V)
|
|
1020
1020
|
return s();
|
|
1021
|
-
|
|
1021
|
+
U ? s(!1, U) : o = setTimeout(() => {
|
|
1022
1022
|
s(!1, 1e-7);
|
|
1023
1023
|
}, 1e3);
|
|
1024
1024
|
}
|
|
1025
|
-
|
|
1025
|
+
U === 1 && !Et(a, e.getBoundingClientRect()) && s(), V = !1;
|
|
1026
1026
|
}
|
|
1027
1027
|
try {
|
|
1028
1028
|
n = new IntersectionObserver(D, {
|
|
1029
|
-
...
|
|
1029
|
+
...R,
|
|
1030
1030
|
// Handle <iframe>s
|
|
1031
1031
|
root: l.ownerDocument
|
|
1032
1032
|
});
|
|
1033
1033
|
} catch {
|
|
1034
|
-
n = new IntersectionObserver(D,
|
|
1034
|
+
n = new IntersectionObserver(D, R);
|
|
1035
1035
|
}
|
|
1036
1036
|
n.observe(e);
|
|
1037
1037
|
}
|
|
@@ -1043,37 +1043,37 @@ function Pn(e, t, n, o) {
|
|
|
1043
1043
|
ancestorScroll: l = !0,
|
|
1044
1044
|
ancestorResize: i = !0,
|
|
1045
1045
|
elementResize: s = typeof ResizeObserver == "function",
|
|
1046
|
-
layoutShift:
|
|
1046
|
+
layoutShift: r = typeof IntersectionObserver == "function",
|
|
1047
1047
|
animationFrame: c = !1
|
|
1048
|
-
} = o,
|
|
1048
|
+
} = o, a = tt(e), u = l || i ? [...a ? Ce(a) : [], ...Ce(t)] : [];
|
|
1049
1049
|
u.forEach((g) => {
|
|
1050
1050
|
l && g.addEventListener("scroll", n, {
|
|
1051
1051
|
passive: !0
|
|
1052
1052
|
}), i && g.addEventListener("resize", n);
|
|
1053
1053
|
});
|
|
1054
|
-
const
|
|
1055
|
-
let d = -1,
|
|
1056
|
-
s && (
|
|
1057
|
-
let [
|
|
1058
|
-
|
|
1059
|
-
var
|
|
1060
|
-
(
|
|
1054
|
+
const f = a && r ? Un(a, n) : null;
|
|
1055
|
+
let d = -1, p = null;
|
|
1056
|
+
s && (p = new ResizeObserver((g) => {
|
|
1057
|
+
let [S] = g;
|
|
1058
|
+
S && S.target === a && p && (p.unobserve(t), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
1059
|
+
var R;
|
|
1060
|
+
(R = p) == null || R.observe(t);
|
|
1061
1061
|
})), n();
|
|
1062
|
-
}),
|
|
1063
|
-
let v,
|
|
1064
|
-
c &&
|
|
1065
|
-
function
|
|
1062
|
+
}), a && !c && p.observe(a), p.observe(t));
|
|
1063
|
+
let v, w = c ? de(e) : null;
|
|
1064
|
+
c && x();
|
|
1065
|
+
function x() {
|
|
1066
1066
|
const g = de(e);
|
|
1067
|
-
|
|
1067
|
+
w && !Et(w, g) && n(), w = g, v = requestAnimationFrame(x);
|
|
1068
1068
|
}
|
|
1069
1069
|
return n(), () => {
|
|
1070
1070
|
var g;
|
|
1071
|
-
u.forEach((
|
|
1072
|
-
l &&
|
|
1073
|
-
}),
|
|
1071
|
+
u.forEach((S) => {
|
|
1072
|
+
l && S.removeEventListener("scroll", n), i && S.removeEventListener("resize", n);
|
|
1073
|
+
}), f?.(), (g = p) == null || g.disconnect(), p = null, c && cancelAnimationFrame(v);
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
|
-
const Hn =
|
|
1076
|
+
const Hn = fn, Qn = pn, $n = cn, Jn = mn, Wn = (e, t, n) => {
|
|
1077
1077
|
const o = /* @__PURE__ */ new Map(), l = {
|
|
1078
1078
|
platform: Mn,
|
|
1079
1079
|
...n
|
|
@@ -1081,13 +1081,13 @@ const Hn = dn, Qn = fn, Un = rn, $n = mn, Jn = (e, t, n) => {
|
|
|
1081
1081
|
...l.platform,
|
|
1082
1082
|
_c: o
|
|
1083
1083
|
};
|
|
1084
|
-
return
|
|
1084
|
+
return rn(e, t, {
|
|
1085
1085
|
...l,
|
|
1086
1086
|
platform: i
|
|
1087
1087
|
});
|
|
1088
1088
|
};
|
|
1089
|
-
function
|
|
1090
|
-
const n =
|
|
1089
|
+
function Kn(e, t) {
|
|
1090
|
+
const n = E({
|
|
1091
1091
|
position: "fixed",
|
|
1092
1092
|
left: "0",
|
|
1093
1093
|
top: "0",
|
|
@@ -1096,31 +1096,31 @@ function Wn(e, t) {
|
|
|
1096
1096
|
});
|
|
1097
1097
|
let o = null;
|
|
1098
1098
|
const l = () => {
|
|
1099
|
-
!e.value || !t.value ||
|
|
1099
|
+
!e.value || !t.value || Wn(e.value, t.value, {
|
|
1100
1100
|
placement: "bottom-start",
|
|
1101
1101
|
strategy: "fixed",
|
|
1102
1102
|
middleware: [
|
|
1103
1103
|
Hn(6),
|
|
1104
1104
|
// 输入框与下拉列表的间距
|
|
1105
|
-
|
|
1105
|
+
$n(),
|
|
1106
1106
|
// 空间不足自动翻转到上方
|
|
1107
1107
|
Qn({ padding: 10 }),
|
|
1108
1108
|
// 靠近屏幕边缘时自动位移
|
|
1109
|
-
|
|
1110
|
-
apply({ rects:
|
|
1111
|
-
const
|
|
1109
|
+
Jn({
|
|
1110
|
+
apply({ rects: r, elements: c }) {
|
|
1111
|
+
const a = `${r.reference.width}px`;
|
|
1112
1112
|
Object.assign(c.floating.style, {
|
|
1113
|
-
width:
|
|
1113
|
+
width: a,
|
|
1114
1114
|
// 必须锁定,否则在 body 下它可能由于内容过多撑开到 100vw
|
|
1115
|
-
minWidth:
|
|
1116
|
-
maxWidth:
|
|
1115
|
+
minWidth: a,
|
|
1116
|
+
maxWidth: a
|
|
1117
1117
|
});
|
|
1118
1118
|
}
|
|
1119
1119
|
})
|
|
1120
1120
|
]
|
|
1121
|
-
}).then(({ x:
|
|
1121
|
+
}).then(({ x: r, y: c }) => {
|
|
1122
1122
|
Object.assign(n.value, {
|
|
1123
|
-
left: `${
|
|
1123
|
+
left: `${r}px`,
|
|
1124
1124
|
top: `${c}px`
|
|
1125
1125
|
});
|
|
1126
1126
|
});
|
|
@@ -1129,30 +1129,30 @@ function Wn(e, t) {
|
|
|
1129
1129
|
}, s = () => {
|
|
1130
1130
|
o && (o(), o = null);
|
|
1131
1131
|
};
|
|
1132
|
-
return
|
|
1132
|
+
return yt(s), { floatingStyles: n, startTrack: i, stopTrack: s };
|
|
1133
1133
|
}
|
|
1134
|
-
const
|
|
1134
|
+
const qn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACT0lEQVR4AaRSO2hTYRT+zn9v2g6CiktFJYoVHXQoOljM2EIEh0orbRKa5qUuDoIZAnXI4FBwcRDikMcNkoQMQjcVESo4OASsW2kLBi3oUKiD1OZx7/H811wJZFF6uOee85/H93/3nKtwQPkvgFKpdKRgVR+UrFrOsurX9N3/DJCvVPxMwx+lKcbgKzbstPhwAXSyWK7eLZZrc4VCNZDPPx/Tt+kCrTqvOrQqfuNrc2OcgW0CduQM9TfJyIB5mQy8UaaxKbftFq3qL9HP1KGGFDe+NDdC/jPnlwgcZEM9lRiU2VFjgngI4FGxa0IvZXecU07XPsc2pkCUIULaa2Z2MsJ7Orkw/8kFiMVCb4XWcQV14w8temL4aJNM47Fh0OHEYqieWAyXT/jPBhzmh7o5EY28Rk/cGWSz2a4GSsTCt3tgs5qmDc726sTQvsS6/c0SFDz97lO/329K4z2Amm1u3ZK11SyrOmNC/ZDYSElWiT5R2resymUZ1pIUv2Qa+iafcrrFretDNJwTf94GUnt7u9u6to3hUW09dQEcIC+BR0LxqgztPnFrotd8wWHclNykaR4dYeCngj0IQNyekOQshLas8hmzLyA3B2UTU6l4eEX8Ld8IZsTu+Mg4hj5xGcTj8f1kLPxChjgO0AdWlAOwnkotbImFrHGFGdOy6u82aJAB+kUZywQ6KaH3ou7TcbguziRApiLWOXjiMvAO2iaic3rH6wxe1Wetd+KRNQKEDV9kwisd83QAQCfkr7uUjEUq2vdUgdJQFExEw++8mLa/AQAA//9h0VsEAAAABklEQVQDAKhs6Pxd3K8TAAAAAElFTkSuQmCC", Gn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgUlEQVR4AXRST0hUYRD/zbfbrqahQpAHlQ3dSurYoaBAwWNQkIT7J/ve09DQsOigkNCha4ckl4Lct0/S3QI7REFEBB08FBHRIYLwIJEodOlUurnfNN+6mq9weMPM+818v2/mm1HYQXK5XH02mz9h1fo7pOE/gkwmU+v5+fuGot8phJdWmSLLnl+4I0RV/xIFCGxCdU3DUwaOkULX18Uve1ydrC4xdwLcwRR9bnO2kwQIoCIDEowpXjsZ4vBCSyx+w/Nnb1KElkkwG4OqGhG79QUImEkT0T2JrpZ4fV5sF0Ad6je9BrBKxLeZuVv8rS9IAG4qGf5oTPSolNxIXOyUNjqlpb0W4xI+Cd62dVqcAAGBVqSCVmPMIoPCttzm2MEBAoeLir4hRK2AWPyVIAHRHMH0Ly0tCBF3M5t+Aq6A0HPJSSyCeZAIz7BNAgQwqxNyc1NL7MCoeyH1xNWpuKsTcet7fv46QI0/zdoEtkmAwHGcHyFQj/Q57vuPzm7m+X5efB6HYj3kOCubuLVlApltfdbPX5uaetCmdeKVAqUN1mdy04XR3PTsqAHPWMztTb24myvEBBuRM+WlUnbzDEXeya2D4XC0zrJqnXwsO3pG3mCMGWMK6lQZk2A0hH2GMSxL9VlI6lVkd90RgGKkVFrrc+9REXubjLH9FxfbbVUVGG5v4i2p8LD8x9ax65C66KTfKGCSDc97fv6DJzuf9QtDtm+iqsM1ot70w9O+YDbmSQ6bkkyCJitnAUcnryqmuExgSsZYKypvgFvS+5xVsJk0MGlps97mFCVXpnNZqoBcbo2QyJz7dCLj6JTj6tRxVyf3izZUtNndwM73SU55JzaO4Q8AAAD//54At5MAAAAGSURBVAMAh2IbMAJQAZQAAAAASUVORK5CYII=", Yn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACC0lEQVR4AXxRv2tTURT+zk1iIjgoOMShkIJVNwf/gQYULOjQwaGvGl8TBMEMDg4ODgF17likvL4HIYm4OLg61K2CooWKDoKCDoJDHASb9N17POf5Enwk6eN+9/z+3nfvNZjxbYS9ymbYXlQ8CbvnZrRhKoEOFMl9zFHuuaJA/E4Jp5FMJTCwZWner/veCYX6ecQVsRNrKsFE1yGJDMFW1Hm4FXX7hnIvADquvkJ9zYn/U3vw35chYOA2Ebcc26uWbVWwnKKqOak9ktmmYLwyBATkY+d2b63d2FYgps9umNtTX6G18WTqmNRmTNB+djaIOqEpmC+FIn8Lom4vaD89n2lKgwkCebYNsvEnAlXI4CIMXSagTNa9l9p6Ojc2CUEYhiW5oE3IxQH4AYNFeb5qvea9SuB7Vc1J7ReDjomidZ2RWNKysyneFHNFovGgxIiizoWR9BGRqiKw76i0qj2JAo7jtwycJDvY1eQIDNM0lu+OYrUHf/BBbEmI9sTKP2VvNGpvAP4Kc1SVSGb2OlLiVQa+12srr7UrUZA6Lx27e0HUu6PnU/kOXGbwaT1Gq9XKa80xmgTa1hlFQiBP1hNWn4AdOd8DpmLfgnakYV/yv/UF5ipn+qLyvgGp2us6I/V/R+DYPiYenpKbv0Y8mGeLS0OmhYbvLQuWiGkeFkuGBwtrvrdyMKA5nVGCvwAAAP//q4xnOgAAAAZJREFUAwCH2O8KfEWHWQAAAABJRU5ErkJggg==", zn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACmklEQVR4AXRTT0jUQRT+3uyqGxgYeCiy1JAo6JBUp4Q81EEiKKiDa+H+/ENGHgPpZtChQ4EHL+Ku+9t0V7EkQSGPBYGHBIU6RAqt2cFDBw9C+3de3yy7hobDvHm/+d4337x58xuDQ9r4+FRDLJZqG49PtrvvQ2j4TyDmJ7sm/NRqoMpsIYD3RgIL7pvY54lEqvug0J5APB4PxfzUOwFGRWReVJp7I+GjW+nvxxQo0DagOjLhJxcctyK0J6BS/UaAc1nNtXrdnc88rzPtSMPDwwXiM7R2WNwDpMVKzTTKrSRQTq0tq9mOR55XWliOY2wsVQ+RRWZQiyACjiPQ9pg/0+U4JQEoBkXMi4OLmWpdsEZXofY5yYtSzH10HHJHBPYJMZhyhS8X84U5B+y36iaBNPxMr59nPTo9z8uU4jaToL8Yj88eN2xNTG+3r+/BBncMuSLRln1/+iZgdkhEY2NjvfMVo1DarbG20GIqoPMaqL5G38Zb+GBh36roMufpzc3N3xSvi0ZfX6APEYNAg86bjMluCFDr+7OX1JoWQNJed/ipaK6Z6oOi2dbTZ85eVan+YYLBL7yBdRb9IXkha23aPPa8bQBrFoUVqo4qMMU5mOZ2JBKeo98RiwHi8xQ7Qo6vCsdb6e+//4ubgJegLzlmDOQ6i/XKCVQskZg9aaFtRrBGsYytQpQiu+SPOI5xQ2+kK6mQJRJHo8lko8MqxswGhceCzY25mMnLEmOf3Br6f2/BaLaTqhuSl6/xxPRQNDrJehBRrSWxABMaMnmsKfCN9eEfSZS9lAG9O3OmJ9J1C9ABVb1rgoF1PqA/Cokw3k7stgKDvZHwHXcUYqW+J1CacejlcXoi4SvFvD2lRdxAER0s3glirS5Gyr7+FwAA//8Pj6q2AAAABklEQVQDAJPeLlNn5TR8AAAAAElFTkSuQmCC", jn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABFUlEQVR4AaRQO07DQBCdWe8B4B5IFFyAK9ARkIVNhIQEEiVtJLgABRVRvIBCJBquwBVyDgoaSnuHeZY3MlYcNsnIb8fze6M3hra0XoKJm95N3Nv3EnyhFvb2EgjRJbOMKqmO2tDcvQ5fK+qvl4CJbOn9/CJPP9tArp5sHtP4lc652VXxPL1Z1hRFIOytF1NuTJCfnT4Ms8HjSgJctn1xIt6hxqIkdK+u8U8zT1ESmP5enUkWmqMkhG2FmxXOvR+EGD5KAhoDqsQvtiMXJQGNQJ4N8mF6PMd/wL8SxuOXPSG21pj9p+L1EOjGyAHoQQ0zWGDqx9pbPWIpwqOEkw+gGyMHoAc1ozOkVhOcZyepYndNpDpPvwAAAP//BVQJHAAAAAZJREFUAwDZWL4hub5xHQAAAABJRU5ErkJggg==", We = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='2534'%20width='200'%20height='200'%3e%3cpath%20d='M448%2085.333333a362.666667%20362.666667%200%201%200%20224.512%20647.509334l155.818667%20155.818666a42.666667%2042.666667%200%200%200%2060.330666-60.330666l-155.818666-155.818667A362.666667%20362.666667%200%200%200%20448%2085.333333zM170.666667%20448a277.333333%20277.333333%200%201%201%20554.666666%200%20277.333333%20277.333333%200%200%201-554.666666%200z'%20p-id='2535'%3e%3c/path%3e%3c/svg%3e", Xn = { class: "search-container" }, Zn = { class: "selection-wrapper" }, eo = { class: "tag-text" }, to = ["onClick"], no = {
|
|
1135
1135
|
key: 0,
|
|
1136
1136
|
class: "search-tag collapse"
|
|
1137
|
-
},
|
|
1137
|
+
}, oo = ["placeholder"], lo = { class: "suffix-area" }, so = {
|
|
1138
1138
|
key: 1,
|
|
1139
1139
|
class: "loading-spinner"
|
|
1140
|
-
},
|
|
1140
|
+
}, io = { class: "search-icon" }, ao = ["src"], ro = {
|
|
1141
1141
|
key: 0,
|
|
1142
1142
|
class: "history-section"
|
|
1143
|
-
},
|
|
1143
|
+
}, co = { class: "history-header" }, uo = ["onMousedown"], fo = ["src"], po = { class: "type-text" }, mo = { class: "result-text" }, ho = {
|
|
1144
1144
|
key: 0,
|
|
1145
1145
|
class: "status-msg"
|
|
1146
|
-
},
|
|
1146
|
+
}, vo = ["onMousedown"], go = ["src"], yo = { class: "type-text" }, Ao = { class: "result-text" }, wo = {
|
|
1147
1147
|
key: 0,
|
|
1148
1148
|
class: "load-more-msg"
|
|
1149
|
-
},
|
|
1149
|
+
}, xo = {
|
|
1150
1150
|
key: 1,
|
|
1151
1151
|
class: "load-more-msg no-more"
|
|
1152
|
-
},
|
|
1152
|
+
}, bo = {
|
|
1153
1153
|
key: 2,
|
|
1154
1154
|
class: "status-msg"
|
|
1155
|
-
},
|
|
1155
|
+
}, Co = /* @__PURE__ */ qe({
|
|
1156
1156
|
__name: "index",
|
|
1157
1157
|
props: {
|
|
1158
1158
|
modelValue: { default: null },
|
|
@@ -1180,92 +1180,131 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1180
1180
|
"remove"
|
|
1181
1181
|
],
|
|
1182
1182
|
setup(e, { emit: t }) {
|
|
1183
|
-
const n = e, o = t, l =
|
|
1184
|
-
let
|
|
1185
|
-
const d =
|
|
1186
|
-
|
|
1183
|
+
const n = e, o = t, l = E(null), i = E(null), s = E(null), r = E(""), c = E(""), a = E(!1), u = E(!1);
|
|
1184
|
+
let f = null;
|
|
1185
|
+
const d = M(() => n.modelValue ? Array.isArray(n.modelValue) ? n.modelValue : [n.modelValue] : []), p = M(() => n.multiple ? n.collapseTags ? d.value.slice(0, 1) : d.value : []), v = M(() => r.value || d.value.length > 0), w = M(() => n.multiple ? r.value ? `${r.value.length * 10 + 20}px` : "10px" : "100%"), { searchHistory: x, saveToHistory: g, clearHistory: S } = qt(
|
|
1186
|
+
He(n, "historyKey")
|
|
1187
1187
|
), {
|
|
1188
|
-
searchResults:
|
|
1188
|
+
searchResults: R,
|
|
1189
1189
|
loading: V,
|
|
1190
1190
|
isFetchingMore: D,
|
|
1191
1191
|
isFinished: W,
|
|
1192
|
-
currentPage:
|
|
1193
|
-
fetchData:
|
|
1192
|
+
currentPage: U,
|
|
1193
|
+
fetchData: Q,
|
|
1194
1194
|
filterByTypes: K
|
|
1195
|
-
} =
|
|
1195
|
+
} = Yt(r, He(n, "searchTypeList")), { floatingStyles: P, startTrack: te, stopTrack: z } = Kn(
|
|
1196
1196
|
i,
|
|
1197
1197
|
s
|
|
1198
|
-
),
|
|
1199
|
-
if (n.lang
|
|
1198
|
+
), F = M(() => {
|
|
1199
|
+
if (n.lang)
|
|
1200
1200
|
return n.lang === "en" || n.lang === "en-US";
|
|
1201
|
-
let x = "";
|
|
1202
1201
|
try {
|
|
1203
1202
|
if (typeof useCookie == "function") {
|
|
1204
|
-
const
|
|
1205
|
-
if (
|
|
1203
|
+
const y = useCookie("jc-language")?.value;
|
|
1204
|
+
if (y)
|
|
1205
|
+
return /^en(-US)?$/.test(y);
|
|
1206
1206
|
}
|
|
1207
1207
|
} catch {
|
|
1208
1208
|
}
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1209
|
+
if (typeof document < "u") {
|
|
1210
|
+
const y = document.cookie || "";
|
|
1211
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(y);
|
|
1212
|
+
}
|
|
1213
|
+
try {
|
|
1214
|
+
if (typeof useNuxtApp == "function") {
|
|
1215
|
+
const B = useNuxtApp()?.ssrContext?.event?.node?.req?.headers?.cookie || "";
|
|
1216
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(B);
|
|
1215
1217
|
}
|
|
1216
|
-
|
|
1218
|
+
} catch {
|
|
1219
|
+
}
|
|
1220
|
+
return !1;
|
|
1221
|
+
}), q = M(() => n.multiple && d.value.length > 0 ? "" : a.value && !n.multiple ? c.value : n.placeholder || F.value ? "Please enter..." : "请输入..."), re = () => l.value?.focus(), k = (y) => {
|
|
1222
|
+
if (g(y), n.multiple) {
|
|
1223
|
+
if (!d.value.some((C) => C.id === y.id)) {
|
|
1224
|
+
const C = [...d.value, y];
|
|
1225
|
+
o("update:modelValue", C);
|
|
1226
|
+
}
|
|
1227
|
+
r.value = "";
|
|
1217
1228
|
} else
|
|
1218
|
-
c.value =
|
|
1219
|
-
o("select",
|
|
1220
|
-
}, O = (
|
|
1221
|
-
const
|
|
1222
|
-
o("update:modelValue",
|
|
1223
|
-
},
|
|
1224
|
-
n.multiple && !
|
|
1229
|
+
c.value = fe(y), a.value = !0, r.value = "", u.value = !1, o("update:modelValue", y);
|
|
1230
|
+
o("select", y);
|
|
1231
|
+
}, O = (y) => {
|
|
1232
|
+
const B = d.value.filter((C) => C.id !== y.id);
|
|
1233
|
+
o("update:modelValue", B), o("remove", y);
|
|
1234
|
+
}, T = () => {
|
|
1235
|
+
n.multiple && !r.value && d.value.length > 0 && O(
|
|
1225
1236
|
d.value[d.value.length - 1]
|
|
1226
1237
|
);
|
|
1227
|
-
},
|
|
1228
|
-
|
|
1229
|
-
},
|
|
1230
|
-
if (u.value = !0, !n.multiple &&
|
|
1231
|
-
const
|
|
1232
|
-
if (
|
|
1238
|
+
}, H = () => {
|
|
1239
|
+
r.value = "", a.value = !1, c.value = "", o("update:modelValue", n.multiple ? [] : null);
|
|
1240
|
+
}, Ae = async () => {
|
|
1241
|
+
if (u.value = !0, !n.multiple && a.value && R.value.length === 0) {
|
|
1242
|
+
const y = n.modelValue;
|
|
1243
|
+
if (y?.id) {
|
|
1233
1244
|
V.value = !0;
|
|
1234
1245
|
try {
|
|
1235
|
-
const
|
|
1236
|
-
|
|
1237
|
-
|
|
1246
|
+
const B = await at(
|
|
1247
|
+
y.id,
|
|
1248
|
+
y.type
|
|
1238
1249
|
);
|
|
1239
|
-
|
|
1250
|
+
R.value = K(B.records);
|
|
1240
1251
|
} finally {
|
|
1241
1252
|
V.value = !1;
|
|
1242
1253
|
}
|
|
1243
1254
|
}
|
|
1244
1255
|
}
|
|
1245
|
-
},
|
|
1246
|
-
|
|
1247
|
-
},
|
|
1248
|
-
n.multiple ? o("submit-search", d.value) :
|
|
1249
|
-
},
|
|
1250
|
-
const { scrollTop:
|
|
1251
|
-
|
|
1256
|
+
}, Dt = () => setTimeout(() => u.value = !1, 200), Bt = (y) => {
|
|
1257
|
+
y.target.value === "" && !n.multiple && H();
|
|
1258
|
+
}, Lt = () => {
|
|
1259
|
+
n.multiple ? o("submit-search", d.value) : a.value && o("submit-search", n.modelValue), u.value = !1;
|
|
1260
|
+
}, Nt = (y) => {
|
|
1261
|
+
const { scrollTop: B, scrollHeight: C, clientHeight: j } = y.target;
|
|
1262
|
+
B + j >= C - 20 && !V.value && !D.value && !W.value && r.value && Q(U.value + 1, !0);
|
|
1252
1263
|
};
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
}),
|
|
1256
|
-
if (!
|
|
1257
|
-
|
|
1264
|
+
Te(u, (y) => {
|
|
1265
|
+
y ? te() : z();
|
|
1266
|
+
}), Te(r, (y) => {
|
|
1267
|
+
if (!y.trim()) {
|
|
1268
|
+
R.value = [];
|
|
1258
1269
|
return;
|
|
1259
1270
|
}
|
|
1260
|
-
|
|
1261
|
-
})
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1271
|
+
f && clearTimeout(f), f = setTimeout(() => Q(1, !1), 300);
|
|
1272
|
+
}), Te(
|
|
1273
|
+
() => n.modelValue,
|
|
1274
|
+
async (y, B) => {
|
|
1275
|
+
if (n.multiple || JSON.stringify(y) === JSON.stringify(B) && a.value)
|
|
1276
|
+
return;
|
|
1277
|
+
const C = y;
|
|
1278
|
+
if (!C) {
|
|
1279
|
+
c.value = "", a.value = !1;
|
|
1280
|
+
return;
|
|
1281
|
+
}
|
|
1282
|
+
if (typeof C == "object")
|
|
1283
|
+
if (C.id && C.type && !C.display)
|
|
1284
|
+
try {
|
|
1285
|
+
const we = (await at(
|
|
1286
|
+
C.id,
|
|
1287
|
+
C.type
|
|
1288
|
+
)).records.find(
|
|
1289
|
+
(Ft) => Ft.id === C.id
|
|
1290
|
+
);
|
|
1291
|
+
we && (c.value = fe(we), a.value = !0);
|
|
1292
|
+
} catch (j) {
|
|
1293
|
+
console.error("Failed to fetch search item detail:", j);
|
|
1294
|
+
}
|
|
1295
|
+
else
|
|
1296
|
+
c.value = fe(C), a.value = !!c.value;
|
|
1297
|
+
else typeof C == "string" && (c.value = C, a.value = !!C);
|
|
1298
|
+
},
|
|
1299
|
+
{ immediate: !0, deep: !0 }
|
|
1300
|
+
);
|
|
1301
|
+
const ot = (y) => ({
|
|
1302
|
+
City: jn,
|
|
1303
|
+
Country: zn,
|
|
1304
|
+
Airport: qn,
|
|
1305
|
+
Seaport: Yn
|
|
1306
|
+
})[y] || Gn, fe = (y) => F.value ? y.displayEn || y.display || "" : y.displayCn || y.display || "", lt = (y) => {
|
|
1307
|
+
const B = {
|
|
1269
1308
|
City: {
|
|
1270
1309
|
en: "City",
|
|
1271
1310
|
cn: "城市"
|
|
@@ -1287,159 +1326,159 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1287
1326
|
cn: "港口"
|
|
1288
1327
|
}
|
|
1289
1328
|
};
|
|
1290
|
-
return
|
|
1291
|
-
}, It = (
|
|
1292
|
-
return
|
|
1293
|
-
|
|
1294
|
-
class:
|
|
1329
|
+
return F.value ? B[y].en : B[y].cn;
|
|
1330
|
+
}, It = (y) => d.value.some((B) => B.id === y.id);
|
|
1331
|
+
return yt(z), (y, B) => (A(), b("div", Xn, [
|
|
1332
|
+
m("div", {
|
|
1333
|
+
class: se(["search-input-wrapper", { "is-multiple": e.multiple }]),
|
|
1295
1334
|
ref_key: "referenceRef",
|
|
1296
1335
|
ref: i,
|
|
1297
|
-
onClick:
|
|
1336
|
+
onClick: re
|
|
1298
1337
|
}, [
|
|
1299
|
-
|
|
1300
|
-
e.multiple && d.value.length > 0 ? (
|
|
1301
|
-
(
|
|
1302
|
-
key:
|
|
1338
|
+
m("div", Zn, [
|
|
1339
|
+
e.multiple && d.value.length > 0 ? (A(), b(oe, { key: 0 }, [
|
|
1340
|
+
(A(!0), b(oe, null, me(p.value, (C, j) => (A(), b("div", {
|
|
1341
|
+
key: C.id || j,
|
|
1303
1342
|
class: "search-tag"
|
|
1304
1343
|
}, [
|
|
1305
|
-
|
|
1306
|
-
|
|
1344
|
+
m("span", eo, _(fe(C)), 1),
|
|
1345
|
+
m("span", {
|
|
1307
1346
|
class: "tag-close",
|
|
1308
|
-
onClick:
|
|
1309
|
-
}, "×", 8,
|
|
1347
|
+
onClick: ne((we) => O(C), ["stop"])
|
|
1348
|
+
}, "×", 8, to)
|
|
1310
1349
|
]))), 128)),
|
|
1311
|
-
e.collapseTags && d.value.length > 1 ? (
|
|
1312
|
-
], 64)) :
|
|
1313
|
-
|
|
1350
|
+
e.collapseTags && d.value.length > 1 ? (A(), b("div", no, " + " + _(d.value.length - 1), 1)) : I("", !0)
|
|
1351
|
+
], 64)) : I("", !0),
|
|
1352
|
+
Ee(m("input", {
|
|
1314
1353
|
ref_key: "inputRef",
|
|
1315
1354
|
ref: l,
|
|
1316
|
-
class:
|
|
1317
|
-
"onUpdate:modelValue":
|
|
1355
|
+
class: se({ "is-selected-state": a.value && !e.multiple }),
|
|
1356
|
+
"onUpdate:modelValue": B[0] || (B[0] = (C) => r.value = C),
|
|
1318
1357
|
type: "text",
|
|
1319
|
-
placeholder:
|
|
1320
|
-
style:
|
|
1321
|
-
onFocus:
|
|
1322
|
-
onBlur:
|
|
1323
|
-
onInput:
|
|
1324
|
-
onKeydown:
|
|
1325
|
-
}, null, 46,
|
|
1326
|
-
[
|
|
1358
|
+
placeholder: q.value,
|
|
1359
|
+
style: _e({ width: w.value }),
|
|
1360
|
+
onFocus: Ae,
|
|
1361
|
+
onBlur: Dt,
|
|
1362
|
+
onInput: Bt,
|
|
1363
|
+
onKeydown: Mt(T, ["delete"])
|
|
1364
|
+
}, null, 46, oo), [
|
|
1365
|
+
[Ye, r.value]
|
|
1327
1366
|
])
|
|
1328
1367
|
]),
|
|
1329
|
-
|
|
1330
|
-
v.value ? (
|
|
1368
|
+
m("div", lo, [
|
|
1369
|
+
v.value ? (A(), b("span", {
|
|
1331
1370
|
key: 0,
|
|
1332
1371
|
class: "clear-icon",
|
|
1333
|
-
onMousedown:
|
|
1372
|
+
onMousedown: B[1] || (B[1] = ne(() => {
|
|
1334
1373
|
}, ["prevent"])),
|
|
1335
|
-
onClick:
|
|
1336
|
-
}, "ⓧ", 32)) :
|
|
1337
|
-
h(V) && !h(D) ? (
|
|
1374
|
+
onClick: ne(H, ["stop"])
|
|
1375
|
+
}, "ⓧ", 32)) : I("", !0),
|
|
1376
|
+
h(V) && !h(D) ? (A(), b("div", so)) : !h(V) && e.showSearchIcon ? (A(), b("button", {
|
|
1338
1377
|
key: 2,
|
|
1339
1378
|
class: "search-btn",
|
|
1340
|
-
onClick:
|
|
1379
|
+
onClick: ne(Lt, ["stop"])
|
|
1341
1380
|
}, [
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
src: h(
|
|
1381
|
+
m("span", io, [
|
|
1382
|
+
m("img", {
|
|
1383
|
+
src: h(We),
|
|
1345
1384
|
alt: "search"
|
|
1346
|
-
}, null, 8,
|
|
1385
|
+
}, null, 8, ao)
|
|
1347
1386
|
])
|
|
1348
|
-
])) :
|
|
1387
|
+
])) : I("", !0)
|
|
1349
1388
|
])
|
|
1350
1389
|
], 2),
|
|
1351
|
-
(
|
|
1352
|
-
|
|
1390
|
+
(A(), Ge(At, { to: "body" }, [
|
|
1391
|
+
Ee(m("div", {
|
|
1353
1392
|
ref_key: "floatingRef",
|
|
1354
1393
|
ref: s,
|
|
1355
1394
|
class: "dropdown-list",
|
|
1356
|
-
style:
|
|
1357
|
-
onScroll:
|
|
1395
|
+
style: _e(h(P)),
|
|
1396
|
+
onScroll: Nt
|
|
1358
1397
|
}, [
|
|
1359
|
-
|
|
1360
|
-
h(
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1398
|
+
Me(y.$slots, "history", { searchHistory: h(x) }, () => [
|
|
1399
|
+
h(x).length > 0 && !r.value ? (A(), b("div", ro, [
|
|
1400
|
+
m("div", co, [
|
|
1401
|
+
m("span", null, _(F.value ? "Recent search" : "最近搜索"), 1),
|
|
1402
|
+
m("span", {
|
|
1364
1403
|
class: "clear-btn",
|
|
1365
|
-
onMousedown:
|
|
1404
|
+
onMousedown: B[2] || (B[2] = ne(() => {
|
|
1366
1405
|
}, ["prevent"])),
|
|
1367
|
-
onClick:
|
|
1406
|
+
onClick: B[3] || (B[3] = ne(
|
|
1368
1407
|
//@ts-ignore
|
|
1369
|
-
(...
|
|
1408
|
+
(...C) => h(S) && h(S)(...C),
|
|
1370
1409
|
["stop"]
|
|
1371
1410
|
))
|
|
1372
|
-
},
|
|
1411
|
+
}, _(F.value ? "Clear" : "清空"), 33)
|
|
1373
1412
|
]),
|
|
1374
|
-
(
|
|
1375
|
-
key: "hist-" +
|
|
1413
|
+
(A(!0), b(oe, null, me(h(x), (C, j) => (A(), b("div", {
|
|
1414
|
+
key: "hist-" + j,
|
|
1376
1415
|
class: "dropdown-item",
|
|
1377
|
-
onMousedown: (
|
|
1416
|
+
onMousedown: (we) => k(C)
|
|
1378
1417
|
}, [
|
|
1379
|
-
|
|
1418
|
+
m("div", {
|
|
1380
1419
|
class: "category-tag",
|
|
1381
|
-
style:
|
|
1420
|
+
style: _e(e.showItemTag ? {} : { display: "none" })
|
|
1382
1421
|
}, [
|
|
1383
|
-
|
|
1422
|
+
m("img", {
|
|
1384
1423
|
class: "type-icon",
|
|
1385
|
-
src:
|
|
1424
|
+
src: ot(C.type),
|
|
1386
1425
|
alt: ""
|
|
1387
|
-
}, null, 8,
|
|
1388
|
-
|
|
1426
|
+
}, null, 8, fo),
|
|
1427
|
+
m("span", po, _(lt(C.type)), 1)
|
|
1389
1428
|
], 4),
|
|
1390
|
-
|
|
1391
|
-
], 40,
|
|
1392
|
-
|
|
1393
|
-
])) :
|
|
1429
|
+
m("div", mo, _(fe(C)), 1)
|
|
1430
|
+
], 40, uo))), 128)),
|
|
1431
|
+
B[4] || (B[4] = m("hr", { class: "divider" }, null, -1))
|
|
1432
|
+
])) : I("", !0)
|
|
1394
1433
|
], !0),
|
|
1395
|
-
h(V) && !h(D) ? (
|
|
1396
|
-
|
|
1397
|
-
(
|
|
1398
|
-
key:
|
|
1399
|
-
class:
|
|
1400
|
-
onMousedown: (
|
|
1434
|
+
h(V) && !h(D) ? (A(), b("div", ho, _(F.value ? "Searching..." : "正在搜索中..."), 1)) : h(R).length > 0 ? (A(), b(oe, { key: 1 }, [
|
|
1435
|
+
Me(y.$slots, "results", { searchResults: h(R) }, () => [
|
|
1436
|
+
(A(!0), b(oe, null, me(h(R), (C, j) => (A(), b("div", {
|
|
1437
|
+
key: j,
|
|
1438
|
+
class: se(["dropdown-item", { "is-active": It(C) }]),
|
|
1439
|
+
onMousedown: (we) => k(C)
|
|
1401
1440
|
}, [
|
|
1402
|
-
|
|
1441
|
+
m("div", {
|
|
1403
1442
|
class: "category-tag",
|
|
1404
|
-
style:
|
|
1443
|
+
style: _e(e.showItemTag ? {} : { display: "none" })
|
|
1405
1444
|
}, [
|
|
1406
|
-
|
|
1445
|
+
m("img", {
|
|
1407
1446
|
class: "type-icon",
|
|
1408
|
-
src:
|
|
1447
|
+
src: ot(C.type),
|
|
1409
1448
|
alt: ""
|
|
1410
|
-
}, null, 8,
|
|
1411
|
-
|
|
1449
|
+
}, null, 8, go),
|
|
1450
|
+
m("span", yo, _(lt(C.type)), 1)
|
|
1412
1451
|
], 4),
|
|
1413
|
-
|
|
1414
|
-
], 42,
|
|
1452
|
+
m("div", Ao, _(fe(C)), 1)
|
|
1453
|
+
], 42, vo))), 128))
|
|
1415
1454
|
], !0),
|
|
1416
|
-
h(D) ? (
|
|
1417
|
-
], 64)) :
|
|
1418
|
-
|
|
1419
|
-
|
|
1455
|
+
h(D) ? (A(), b("div", wo, _(F.value ? "Loading more..." : "正在加载更多..."), 1)) : h(W) && r.value ? (A(), b("div", xo, _(F.value ? "All results have been loaded" : "已加载全部结果"), 1)) : I("", !0)
|
|
1456
|
+
], 64)) : r.value && !h(V) ? (A(), b("div", bo, [
|
|
1457
|
+
Me(y.$slots, "noData", {}, () => [
|
|
1458
|
+
ze(_(F.value ? `No results found related to "${r.value}".` : `未找到与 "${r.value}" 相关的结果`), 1)
|
|
1420
1459
|
], !0)
|
|
1421
|
-
])) :
|
|
1460
|
+
])) : I("", !0)
|
|
1422
1461
|
], 36), [
|
|
1423
1462
|
[
|
|
1424
|
-
|
|
1425
|
-
u.value && (h(
|
|
1463
|
+
Ut,
|
|
1464
|
+
u.value && (h(R).length > 0 || h(V) || r.value || h(x).length > 0)
|
|
1426
1465
|
]
|
|
1427
1466
|
])
|
|
1428
1467
|
]))
|
|
1429
1468
|
]));
|
|
1430
1469
|
}
|
|
1431
|
-
}),
|
|
1470
|
+
}), nt = (e, t) => {
|
|
1432
1471
|
const n = e.__vccOpts || e;
|
|
1433
1472
|
for (const [o, l] of t)
|
|
1434
1473
|
n[o] = l;
|
|
1435
1474
|
return n;
|
|
1436
|
-
},
|
|
1475
|
+
}, Vt = /* @__PURE__ */ nt(Co, [["__scopeId", "data-v-da175b2e"]]), So = { class: "modal-container" }, ko = { class: "modal-header" }, Ro = { class: "header-title" }, _o = { class: "modal-body" }, Oo = { class: "form-item" }, To = { class: "required" }, Eo = { class: "input-box" }, Vo = ["placeholder"], Do = {
|
|
1437
1476
|
key: 0,
|
|
1438
1477
|
class: "error-message"
|
|
1439
|
-
},
|
|
1478
|
+
}, Bo = { class: "form-item" }, Lo = { class: "required" }, No = { class: "type-group" }, Io = ["onClick"], Fo = {
|
|
1440
1479
|
key: 0,
|
|
1441
1480
|
class: "check-mark"
|
|
1442
|
-
}, Mo = { class: "form-item" },
|
|
1481
|
+
}, Mo = { class: "form-item" }, Uo = { class: "required" }, Po = {
|
|
1443
1482
|
key: 0,
|
|
1444
1483
|
class: "error-message"
|
|
1445
1484
|
}, Ho = { class: "modal-footer" }, Qo = {
|
|
@@ -1455,7 +1494,7 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1455
1494
|
type: String,
|
|
1456
1495
|
default: "en",
|
|
1457
1496
|
// 增加校验,确保只能传入 'en' 或 'cn'
|
|
1458
|
-
validator: (e) => ["en", "cn"].includes(e)
|
|
1497
|
+
validator: (e) => ["en", "en-US", "zh-CN", "cn"].includes(e)
|
|
1459
1498
|
},
|
|
1460
1499
|
placeholder: {
|
|
1461
1500
|
type: String,
|
|
@@ -1468,94 +1507,117 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1468
1507
|
{ typeCn: "城市", typeEn: "City", type: "City" },
|
|
1469
1508
|
{ typeCn: "海运港口", typeEn: "Port", type: "Seaport" },
|
|
1470
1509
|
{ typeCn: "机场", typeEn: "Airport", type: "Airport" }
|
|
1471
|
-
], i =
|
|
1510
|
+
], i = E(null), s = Qe({
|
|
1472
1511
|
name: "",
|
|
1473
1512
|
country: ""
|
|
1474
|
-
}),
|
|
1513
|
+
}), r = Qe({
|
|
1475
1514
|
name: "",
|
|
1476
1515
|
type: "City"
|
|
1477
|
-
}), c =
|
|
1516
|
+
}), c = M(() => {
|
|
1517
|
+
if (n.lang)
|
|
1518
|
+
return n.lang === "en" || n.lang === "en-US";
|
|
1519
|
+
try {
|
|
1520
|
+
if (typeof useCookie == "function") {
|
|
1521
|
+
const f = useCookie("jc-language")?.value;
|
|
1522
|
+
if (f)
|
|
1523
|
+
return /^en(-US)?$/.test(f);
|
|
1524
|
+
}
|
|
1525
|
+
} catch {
|
|
1526
|
+
}
|
|
1527
|
+
if (typeof document < "u") {
|
|
1528
|
+
const f = document.cookie || "";
|
|
1529
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(f);
|
|
1530
|
+
}
|
|
1531
|
+
try {
|
|
1532
|
+
if (typeof useNuxtApp == "function") {
|
|
1533
|
+
const d = useNuxtApp()?.ssrContext?.event?.node?.req?.headers?.cookie || "";
|
|
1534
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(d);
|
|
1535
|
+
}
|
|
1536
|
+
} catch {
|
|
1537
|
+
}
|
|
1538
|
+
return !1;
|
|
1539
|
+
}), a = () => {
|
|
1478
1540
|
s.name = "", s.country = "", o("update:value", !1);
|
|
1479
1541
|
}, u = () => {
|
|
1480
1542
|
s.name = "", s.country = "";
|
|
1481
|
-
let
|
|
1482
|
-
|
|
1543
|
+
let f = !0;
|
|
1544
|
+
r.name.trim() || (s.name = "Data name is required", f = !1), i.value || (s.country = "Please select a country", f = !1), f && o("confirm", { ...r, country: i.value });
|
|
1483
1545
|
};
|
|
1484
|
-
return (
|
|
1546
|
+
return (f, d) => e.value ? (A(), b("div", {
|
|
1485
1547
|
key: 0,
|
|
1486
1548
|
class: "modal-mask",
|
|
1487
|
-
onClick:
|
|
1549
|
+
onClick: ne(a, ["self"])
|
|
1488
1550
|
}, [
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1551
|
+
m("div", So, [
|
|
1552
|
+
m("div", ko, [
|
|
1553
|
+
m("span", Ro, _(c.value ? "Apply for data addition" : "申请补充数据"), 1),
|
|
1554
|
+
m("div", {
|
|
1493
1555
|
class: "close-btn",
|
|
1494
|
-
onClick:
|
|
1556
|
+
onClick: a
|
|
1495
1557
|
}, "×")
|
|
1496
1558
|
]),
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
1559
|
+
m("div", _o, [
|
|
1560
|
+
m("div", Oo, [
|
|
1561
|
+
m("label", To, _(c.value ? "Data To Add" : "需补充的数据"), 1),
|
|
1562
|
+
m("div", Eo, [
|
|
1563
|
+
Ee(m("input", {
|
|
1564
|
+
"onUpdate:modelValue": d[0] || (d[0] = (p) => r.name = p),
|
|
1503
1565
|
type: "text",
|
|
1504
1566
|
placeholder: e.placeholder ?? (c.value ? " Please enter" : "请输入"),
|
|
1505
|
-
class:
|
|
1506
|
-
onInput: d[1] || (d[1] = (
|
|
1507
|
-
}, null, 42,
|
|
1508
|
-
[
|
|
1567
|
+
class: se(["custom-input", { "input-error": s.name }]),
|
|
1568
|
+
onInput: d[1] || (d[1] = (p) => s.name = "")
|
|
1569
|
+
}, null, 42, Vo), [
|
|
1570
|
+
[Ye, r.name]
|
|
1509
1571
|
])
|
|
1510
1572
|
]),
|
|
1511
|
-
s.name ? (
|
|
1573
|
+
s.name ? (A(), b("div", Do, _(s.name), 1)) : I("", !0)
|
|
1512
1574
|
]),
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
(
|
|
1517
|
-
key:
|
|
1518
|
-
class:
|
|
1519
|
-
onClick: (v) =>
|
|
1575
|
+
m("div", Bo, [
|
|
1576
|
+
m("label", Lo, _(c.value ? "Type" : "所属类别"), 1),
|
|
1577
|
+
m("div", No, [
|
|
1578
|
+
(A(), b(oe, null, me(l, (p) => m("div", {
|
|
1579
|
+
key: p.type,
|
|
1580
|
+
class: se(["type-btn", { active: r.type === p.type }]),
|
|
1581
|
+
onClick: (v) => r.type = p.type
|
|
1520
1582
|
}, [
|
|
1521
|
-
|
|
1522
|
-
|
|
1583
|
+
ze(_(c.value ? p.typeEn : p.typeCn) + " ", 1),
|
|
1584
|
+
r.type === p.type ? (A(), b("div", Fo)) : I("", !0)
|
|
1523
1585
|
], 10, Io)), 64))
|
|
1524
1586
|
])
|
|
1525
1587
|
]),
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
class:
|
|
1588
|
+
m("div", Mo, [
|
|
1589
|
+
m("label", Uo, _(c.value ? "Country" : "国家"), 1),
|
|
1590
|
+
m("div", {
|
|
1591
|
+
class: se({ "search-error-wrap": s.country })
|
|
1530
1592
|
}, [
|
|
1531
|
-
L(
|
|
1593
|
+
L(Vt, {
|
|
1532
1594
|
"search-type-list": ["Country"],
|
|
1533
1595
|
"model-value": i.value,
|
|
1534
1596
|
"onUpdate:modelValue": [
|
|
1535
|
-
d[2] || (d[2] = (
|
|
1536
|
-
d[3] || (d[3] = (
|
|
1597
|
+
d[2] || (d[2] = (p) => i.value = p),
|
|
1598
|
+
d[3] || (d[3] = (p) => s.country = "")
|
|
1537
1599
|
],
|
|
1538
1600
|
style: { margin: "0 auto" },
|
|
1539
1601
|
lang: e.lang,
|
|
1540
1602
|
placeholder: e.placeholder ?? (c.value ? " Please enter" : "请输入")
|
|
1541
1603
|
}, null, 8, ["model-value", "lang", "placeholder"])
|
|
1542
1604
|
], 2),
|
|
1543
|
-
s.country ? (
|
|
1605
|
+
s.country ? (A(), b("div", Po, _(s.country), 1)) : I("", !0)
|
|
1544
1606
|
])
|
|
1545
1607
|
]),
|
|
1546
|
-
|
|
1547
|
-
|
|
1608
|
+
m("div", Ho, [
|
|
1609
|
+
m("button", {
|
|
1548
1610
|
class: "confirm-btn",
|
|
1549
1611
|
onClick: u
|
|
1550
|
-
},
|
|
1612
|
+
}, _(c.value ? "Submit" : "申请补充"), 1)
|
|
1551
1613
|
])
|
|
1552
1614
|
])
|
|
1553
|
-
])) :
|
|
1615
|
+
])) : I("", !0);
|
|
1554
1616
|
}
|
|
1555
|
-
},
|
|
1617
|
+
}, $o = /* @__PURE__ */ nt(Qo, [["__scopeId", "data-v-9c778fb9"]]), Jo = { class: "global-modal-header-custom" }, Wo = { class: "global-modal-body-custom" }, Ko = { class: "global-modal-footer-custom" }, qo = /* @__PURE__ */ qe({
|
|
1556
1618
|
__name: "GlobalModal",
|
|
1557
1619
|
setup(e) {
|
|
1558
|
-
const t =
|
|
1620
|
+
const t = E(), n = E(!1), o = E({
|
|
1559
1621
|
city: "",
|
|
1560
1622
|
company: "",
|
|
1561
1623
|
email: "",
|
|
@@ -1571,8 +1633,8 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1571
1633
|
],
|
|
1572
1634
|
agreement: [
|
|
1573
1635
|
{
|
|
1574
|
-
validator: (c,
|
|
1575
|
-
|
|
1636
|
+
validator: (c, a, u) => {
|
|
1637
|
+
a ? u() : u(new Error("请同意隐私政策"));
|
|
1576
1638
|
},
|
|
1577
1639
|
trigger: "change"
|
|
1578
1640
|
}
|
|
@@ -1590,76 +1652,76 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1590
1652
|
agreement: !1
|
|
1591
1653
|
});
|
|
1592
1654
|
});
|
|
1593
|
-
},
|
|
1655
|
+
}, r = (c) => {
|
|
1594
1656
|
n.value = !0;
|
|
1595
1657
|
};
|
|
1596
|
-
return
|
|
1597
|
-
ce.on(ue.Open,
|
|
1598
|
-
}),
|
|
1599
|
-
ce.off(ue.Open,
|
|
1600
|
-
}), (c,
|
|
1658
|
+
return Ke(() => {
|
|
1659
|
+
ce.on(ue.Open, r);
|
|
1660
|
+
}), Pt(() => {
|
|
1661
|
+
ce.off(ue.Open, r);
|
|
1662
|
+
}), (c, a) => (A(), Ge(h(Jt), {
|
|
1601
1663
|
modelValue: n.value,
|
|
1602
|
-
"onUpdate:modelValue":
|
|
1664
|
+
"onUpdate:modelValue": a[7] || (a[7] = (u) => n.value = u),
|
|
1603
1665
|
"before-close": i,
|
|
1604
1666
|
"show-close": !1,
|
|
1605
1667
|
"close-on-click-modal": !0,
|
|
1606
1668
|
width: 500,
|
|
1607
1669
|
class: "global-modal-custom"
|
|
1608
1670
|
}, {
|
|
1609
|
-
header:
|
|
1610
|
-
|
|
1611
|
-
|
|
1671
|
+
header: N(() => [
|
|
1672
|
+
m("div", Jo, [
|
|
1673
|
+
a[9] || (a[9] = m("h2", null, "即刻链接全球货代", -1)),
|
|
1612
1674
|
L(h(it), {
|
|
1613
1675
|
link: "",
|
|
1614
1676
|
onClick: i,
|
|
1615
1677
|
class: "close-button-custom",
|
|
1616
1678
|
"aria-label": "Close"
|
|
1617
1679
|
}, {
|
|
1618
|
-
default:
|
|
1619
|
-
|
|
1680
|
+
default: N(() => [...a[8] || (a[8] = [
|
|
1681
|
+
m("span", { style: { "font-size": "2rem" } }, "×", -1)
|
|
1620
1682
|
])]),
|
|
1621
1683
|
_: 1
|
|
1622
1684
|
})
|
|
1623
1685
|
])
|
|
1624
1686
|
]),
|
|
1625
|
-
footer:
|
|
1626
|
-
|
|
1687
|
+
footer: N(() => [
|
|
1688
|
+
m("div", Ko, [
|
|
1627
1689
|
L(h(it), {
|
|
1628
1690
|
type: "primary",
|
|
1629
1691
|
class: "submit-button-custom",
|
|
1630
1692
|
onClick: s
|
|
1631
1693
|
}, {
|
|
1632
|
-
default:
|
|
1633
|
-
|
|
1694
|
+
default: N(() => [...a[11] || (a[11] = [
|
|
1695
|
+
ze(" 加入会员 ", -1)
|
|
1634
1696
|
])]),
|
|
1635
1697
|
_: 1
|
|
1636
1698
|
})
|
|
1637
1699
|
])
|
|
1638
1700
|
]),
|
|
1639
|
-
default:
|
|
1640
|
-
|
|
1641
|
-
L(h(
|
|
1701
|
+
default: N(() => [
|
|
1702
|
+
m("div", Wo, [
|
|
1703
|
+
L(h(Wt), {
|
|
1642
1704
|
model: o.value,
|
|
1643
1705
|
rules: l,
|
|
1644
1706
|
ref_key: "formRef",
|
|
1645
1707
|
ref: t,
|
|
1646
1708
|
"label-position": "top",
|
|
1647
|
-
onSubmit:
|
|
1709
|
+
onSubmit: a[6] || (a[6] = ne(() => {
|
|
1648
1710
|
}, ["prevent"]))
|
|
1649
1711
|
}, {
|
|
1650
|
-
default:
|
|
1651
|
-
L(h(
|
|
1652
|
-
default:
|
|
1653
|
-
L(h(
|
|
1654
|
-
default:
|
|
1655
|
-
L(h(
|
|
1712
|
+
default: N(() => [
|
|
1713
|
+
L(h(Ue), { gutter: 20 }, {
|
|
1714
|
+
default: N(() => [
|
|
1715
|
+
L(h(xe), { span: 12 }, {
|
|
1716
|
+
default: N(() => [
|
|
1717
|
+
L(h(pe), {
|
|
1656
1718
|
label: "所在地(城市)",
|
|
1657
1719
|
prop: "city"
|
|
1658
1720
|
}, {
|
|
1659
|
-
default:
|
|
1660
|
-
L(h(
|
|
1721
|
+
default: N(() => [
|
|
1722
|
+
L(h(be), {
|
|
1661
1723
|
modelValue: o.value.city,
|
|
1662
|
-
"onUpdate:modelValue":
|
|
1724
|
+
"onUpdate:modelValue": a[0] || (a[0] = (u) => o.value.city = u),
|
|
1663
1725
|
placeholder: "请输入城市"
|
|
1664
1726
|
}, null, 8, ["modelValue"])
|
|
1665
1727
|
]),
|
|
@@ -1668,16 +1730,16 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1668
1730
|
]),
|
|
1669
1731
|
_: 1
|
|
1670
1732
|
}),
|
|
1671
|
-
L(h(
|
|
1672
|
-
default:
|
|
1673
|
-
L(h(
|
|
1733
|
+
L(h(xe), { span: 12 }, {
|
|
1734
|
+
default: N(() => [
|
|
1735
|
+
L(h(pe), {
|
|
1674
1736
|
label: "公司名称",
|
|
1675
1737
|
prop: "company"
|
|
1676
1738
|
}, {
|
|
1677
|
-
default:
|
|
1678
|
-
L(h(
|
|
1739
|
+
default: N(() => [
|
|
1740
|
+
L(h(be), {
|
|
1679
1741
|
modelValue: o.value.company,
|
|
1680
|
-
"onUpdate:modelValue":
|
|
1742
|
+
"onUpdate:modelValue": a[1] || (a[1] = (u) => o.value.company = u),
|
|
1681
1743
|
placeholder: "请输入公司名称"
|
|
1682
1744
|
}, null, 8, ["modelValue"])
|
|
1683
1745
|
]),
|
|
@@ -1689,18 +1751,18 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1689
1751
|
]),
|
|
1690
1752
|
_: 1
|
|
1691
1753
|
}),
|
|
1692
|
-
L(h(
|
|
1693
|
-
default:
|
|
1694
|
-
L(h(
|
|
1695
|
-
default:
|
|
1696
|
-
L(h(
|
|
1754
|
+
L(h(Ue), { gutter: 20 }, {
|
|
1755
|
+
default: N(() => [
|
|
1756
|
+
L(h(xe), { span: 12 }, {
|
|
1757
|
+
default: N(() => [
|
|
1758
|
+
L(h(pe), {
|
|
1697
1759
|
label: "邮箱",
|
|
1698
1760
|
prop: "email"
|
|
1699
1761
|
}, {
|
|
1700
|
-
default:
|
|
1701
|
-
L(h(
|
|
1762
|
+
default: N(() => [
|
|
1763
|
+
L(h(be), {
|
|
1702
1764
|
modelValue: o.value.email,
|
|
1703
|
-
"onUpdate:modelValue":
|
|
1765
|
+
"onUpdate:modelValue": a[2] || (a[2] = (u) => o.value.email = u),
|
|
1704
1766
|
placeholder: "请输入邮箱"
|
|
1705
1767
|
}, null, 8, ["modelValue"])
|
|
1706
1768
|
]),
|
|
@@ -1709,16 +1771,16 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1709
1771
|
]),
|
|
1710
1772
|
_: 1
|
|
1711
1773
|
}),
|
|
1712
|
-
L(h(
|
|
1713
|
-
default:
|
|
1714
|
-
L(h(
|
|
1774
|
+
L(h(xe), { span: 12 }, {
|
|
1775
|
+
default: N(() => [
|
|
1776
|
+
L(h(pe), {
|
|
1715
1777
|
label: "电话",
|
|
1716
1778
|
prop: "phone"
|
|
1717
1779
|
}, {
|
|
1718
|
-
default:
|
|
1719
|
-
L(h(
|
|
1780
|
+
default: N(() => [
|
|
1781
|
+
L(h(be), {
|
|
1720
1782
|
modelValue: o.value.phone,
|
|
1721
|
-
"onUpdate:modelValue":
|
|
1783
|
+
"onUpdate:modelValue": a[3] || (a[3] = (u) => o.value.phone = u),
|
|
1722
1784
|
placeholder: "请输入电话"
|
|
1723
1785
|
}, null, 8, ["modelValue"])
|
|
1724
1786
|
]),
|
|
@@ -1730,18 +1792,18 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1730
1792
|
]),
|
|
1731
1793
|
_: 1
|
|
1732
1794
|
}),
|
|
1733
|
-
L(h(
|
|
1734
|
-
default:
|
|
1735
|
-
L(h(
|
|
1736
|
-
default:
|
|
1737
|
-
L(h(
|
|
1795
|
+
L(h(Ue), null, {
|
|
1796
|
+
default: N(() => [
|
|
1797
|
+
L(h(xe), { span: 24 }, {
|
|
1798
|
+
default: N(() => [
|
|
1799
|
+
L(h(pe), {
|
|
1738
1800
|
label: "姓名",
|
|
1739
1801
|
prop: "name"
|
|
1740
1802
|
}, {
|
|
1741
|
-
default:
|
|
1742
|
-
L(h(
|
|
1803
|
+
default: N(() => [
|
|
1804
|
+
L(h(be), {
|
|
1743
1805
|
modelValue: o.value.name,
|
|
1744
|
-
"onUpdate:modelValue":
|
|
1806
|
+
"onUpdate:modelValue": a[4] || (a[4] = (u) => o.value.name = u),
|
|
1745
1807
|
placeholder: "请输入您的全名"
|
|
1746
1808
|
}, null, 8, ["modelValue"])
|
|
1747
1809
|
]),
|
|
@@ -1753,17 +1815,17 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1753
1815
|
]),
|
|
1754
1816
|
_: 1
|
|
1755
1817
|
}),
|
|
1756
|
-
L(h(
|
|
1818
|
+
L(h(pe), {
|
|
1757
1819
|
prop: "agreement",
|
|
1758
1820
|
class: "agreement-item"
|
|
1759
1821
|
}, {
|
|
1760
|
-
default:
|
|
1761
|
-
L(h(
|
|
1822
|
+
default: N(() => [
|
|
1823
|
+
L(h(Kt), {
|
|
1762
1824
|
modelValue: o.value.agreement,
|
|
1763
|
-
"onUpdate:modelValue":
|
|
1825
|
+
"onUpdate:modelValue": a[5] || (a[5] = (u) => o.value.agreement = u),
|
|
1764
1826
|
label: "我同意"
|
|
1765
1827
|
}, null, 8, ["modelValue"]),
|
|
1766
|
-
|
|
1828
|
+
a[10] || (a[10] = m("a", {
|
|
1767
1829
|
href: "#",
|
|
1768
1830
|
class: "privacy-link"
|
|
1769
1831
|
}, "隐私政策", -1))
|
|
@@ -1780,29 +1842,29 @@ const Kn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAA
|
|
|
1780
1842
|
}
|
|
1781
1843
|
});
|
|
1782
1844
|
function Go(e) {
|
|
1783
|
-
const t =
|
|
1845
|
+
const t = E([]), n = "_search_history_cache", o = typeof window < "u" && typeof localStorage < "u", l = M(
|
|
1784
1846
|
() => (e.value || "") + n
|
|
1785
|
-
), i =
|
|
1847
|
+
), i = M(
|
|
1786
1848
|
() => !!e.value && e.value !== ""
|
|
1787
1849
|
), s = (c) => {
|
|
1788
1850
|
if (!c || !o) return;
|
|
1789
|
-
const
|
|
1790
|
-
(
|
|
1851
|
+
const a = t.value.filter(
|
|
1852
|
+
(f) => f.id && f.id !== c.id || f.display !== c.display
|
|
1791
1853
|
);
|
|
1792
|
-
|
|
1793
|
-
const u =
|
|
1854
|
+
a.unshift(c);
|
|
1855
|
+
const u = a.slice(0, 4);
|
|
1794
1856
|
if (i.value) {
|
|
1795
1857
|
t.value = u;
|
|
1796
1858
|
try {
|
|
1797
1859
|
localStorage.setItem(l.value, JSON.stringify(u));
|
|
1798
|
-
} catch (
|
|
1799
|
-
console.warn("LocalStorage save failed:",
|
|
1860
|
+
} catch (f) {
|
|
1861
|
+
console.warn("LocalStorage save failed:", f);
|
|
1800
1862
|
}
|
|
1801
1863
|
}
|
|
1802
|
-
},
|
|
1864
|
+
}, r = () => {
|
|
1803
1865
|
t.value = [], o && localStorage.removeItem(l.value);
|
|
1804
1866
|
};
|
|
1805
|
-
return
|
|
1867
|
+
return Ke(() => {
|
|
1806
1868
|
if (o && i.value) {
|
|
1807
1869
|
const c = localStorage.getItem(l.value);
|
|
1808
1870
|
if (c)
|
|
@@ -1815,29 +1877,29 @@ function Go(e) {
|
|
|
1815
1877
|
}), {
|
|
1816
1878
|
searchHistory: t,
|
|
1817
1879
|
saveToHistory: s,
|
|
1818
|
-
clearHistory:
|
|
1880
|
+
clearHistory: r,
|
|
1819
1881
|
HasHistory: i
|
|
1820
1882
|
};
|
|
1821
1883
|
}
|
|
1822
|
-
async function
|
|
1884
|
+
async function Yo(e, t = [
|
|
1823
1885
|
"Continent",
|
|
1824
1886
|
"Country",
|
|
1825
1887
|
"City",
|
|
1826
1888
|
"Seaport",
|
|
1827
1889
|
"Airport"
|
|
1828
1890
|
], n = {}) {
|
|
1829
|
-
return
|
|
1891
|
+
return je.searchByName({
|
|
1830
1892
|
keyword: e,
|
|
1831
1893
|
displayInfo: t,
|
|
1832
1894
|
...n
|
|
1833
1895
|
});
|
|
1834
1896
|
}
|
|
1835
|
-
function
|
|
1836
|
-
const n =
|
|
1897
|
+
function zo(e, t) {
|
|
1898
|
+
const n = E([]), o = E(!1), l = E(!1), i = E(!1), s = E(1), r = 10, c = E(0), a = M(() => {
|
|
1837
1899
|
const d = [...t.value];
|
|
1838
1900
|
return d.includes("Country") && !d.includes("Region") && d.push("Region"), d;
|
|
1839
1901
|
}), u = (d) => Array.isArray(d) ? d.filter(
|
|
1840
|
-
(
|
|
1902
|
+
(p) => a.value.includes(p.type)
|
|
1841
1903
|
) : [];
|
|
1842
1904
|
return {
|
|
1843
1905
|
searchResults: n,
|
|
@@ -1845,8 +1907,8 @@ function Yo(e, t) {
|
|
|
1845
1907
|
isFetchingMore: l,
|
|
1846
1908
|
isFinished: i,
|
|
1847
1909
|
fetchData: async (d = !1) => {
|
|
1848
|
-
const
|
|
1849
|
-
if (!
|
|
1910
|
+
const p = e.value.trim();
|
|
1911
|
+
if (!p) {
|
|
1850
1912
|
n.value = [], c.value = 0, i.value = !1;
|
|
1851
1913
|
return;
|
|
1852
1914
|
}
|
|
@@ -1858,15 +1920,15 @@ function Yo(e, t) {
|
|
|
1858
1920
|
o.value = !0, s.value = 1, i.value = !1;
|
|
1859
1921
|
}
|
|
1860
1922
|
try {
|
|
1861
|
-
const v = await
|
|
1862
|
-
|
|
1923
|
+
const v = await Yo(
|
|
1924
|
+
p,
|
|
1863
1925
|
t.value,
|
|
1864
1926
|
{
|
|
1865
1927
|
current: s.value,
|
|
1866
|
-
size:
|
|
1928
|
+
size: r
|
|
1867
1929
|
}
|
|
1868
|
-
),
|
|
1869
|
-
d ? n.value.push(...
|
|
1930
|
+
), w = u(v.records || []);
|
|
1931
|
+
d ? n.value.push(...w) : n.value = w, c.value = v.total || 0, (n.value.length >= c.value || w.length < r) && (i.value = !0);
|
|
1870
1932
|
} catch (v) {
|
|
1871
1933
|
console.error("Search request failed:", v), d && (s.value -= 1);
|
|
1872
1934
|
} finally {
|
|
@@ -1875,37 +1937,37 @@ function Yo(e, t) {
|
|
|
1875
1937
|
}
|
|
1876
1938
|
};
|
|
1877
1939
|
}
|
|
1878
|
-
const
|
|
1940
|
+
const jo = { class: "h5-search-container" }, Xo = { class: "trigger-content" }, Zo = ["src"], el = { class: "placeholder-text" }, tl = {
|
|
1879
1941
|
key: 0,
|
|
1880
1942
|
class: "selected-count"
|
|
1881
|
-
},
|
|
1943
|
+
}, nl = {
|
|
1882
1944
|
key: 1,
|
|
1883
1945
|
class: "selected-val"
|
|
1884
|
-
},
|
|
1946
|
+
}, ol = {
|
|
1885
1947
|
key: 2,
|
|
1886
1948
|
class: "placeholder-gray"
|
|
1887
|
-
},
|
|
1949
|
+
}, ll = {
|
|
1888
1950
|
key: 0,
|
|
1889
1951
|
class: "h5-modal-root"
|
|
1890
|
-
},
|
|
1952
|
+
}, sl = { class: "h5-drawer-card" }, il = { class: "h5-header" }, al = { class: "h5-input-wrapper" }, rl = ["src"], cl = ["placeholder"], ul = {
|
|
1891
1953
|
key: 0,
|
|
1892
1954
|
class: "h5-spinner-box"
|
|
1893
|
-
},
|
|
1955
|
+
}, dl = {
|
|
1894
1956
|
key: 1,
|
|
1895
1957
|
class: "h5-section"
|
|
1896
|
-
},
|
|
1958
|
+
}, fl = { class: "h5-section-hd" }, pl = { class: "h5-history-grid" }, ml = ["onClick"], hl = {
|
|
1897
1959
|
key: 2,
|
|
1898
1960
|
class: "h5-result-list"
|
|
1899
|
-
},
|
|
1961
|
+
}, vl = ["onClick"], gl = { class: "item-info" }, yl = { class: "item-name" }, Al = {
|
|
1900
1962
|
key: 0,
|
|
1901
1963
|
class: "item-sub"
|
|
1902
|
-
},
|
|
1964
|
+
}, wl = { class: "h5-load-status" }, xl = {
|
|
1903
1965
|
key: 1,
|
|
1904
1966
|
class: "no-more"
|
|
1905
|
-
},
|
|
1967
|
+
}, bl = {
|
|
1906
1968
|
key: 3,
|
|
1907
1969
|
class: "h5-empty"
|
|
1908
|
-
},
|
|
1970
|
+
}, Cl = /* @__PURE__ */ qe({
|
|
1909
1971
|
__name: "index",
|
|
1910
1972
|
props: {
|
|
1911
1973
|
modelValue: {},
|
|
@@ -1916,163 +1978,186 @@ const zo = { class: "h5-search-container" }, Xo = { class: "trigger-content" },
|
|
|
1916
1978
|
},
|
|
1917
1979
|
emits: ["update:modelValue", "select"],
|
|
1918
1980
|
setup(e, { emit: t }) {
|
|
1919
|
-
const n = e, o = t, l =
|
|
1981
|
+
const n = e, o = t, l = E(!1), i = E(""), s = E(null), r = E(null);
|
|
1920
1982
|
let c = null;
|
|
1921
|
-
const { searchHistory:
|
|
1922
|
-
|
|
1923
|
-
), { searchResults: d, loading:
|
|
1983
|
+
const { searchHistory: a, saveToHistory: u, clearHistory: f } = Go(
|
|
1984
|
+
He(n, "historyKey")
|
|
1985
|
+
), { searchResults: d, loading: p, isFetchingMore: v, isFinished: w, fetchData: x } = zo(i, E(["City", "Seaport", "Airport"])), g = M(() => {
|
|
1986
|
+
if (n.lang)
|
|
1987
|
+
return n.lang === "en" || n.lang === "en-US";
|
|
1988
|
+
try {
|
|
1989
|
+
if (typeof useCookie == "function") {
|
|
1990
|
+
const k = useCookie("jc-language")?.value;
|
|
1991
|
+
if (k)
|
|
1992
|
+
return /^en(-US)?$/.test(k);
|
|
1993
|
+
}
|
|
1994
|
+
} catch {
|
|
1995
|
+
}
|
|
1996
|
+
if (typeof document < "u") {
|
|
1997
|
+
const k = document.cookie || "";
|
|
1998
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(k);
|
|
1999
|
+
}
|
|
2000
|
+
try {
|
|
2001
|
+
if (typeof useNuxtApp == "function") {
|
|
2002
|
+
const O = useNuxtApp()?.ssrContext?.event?.node?.req?.headers?.cookie || "";
|
|
2003
|
+
return /(^|;\s*)jc-language=en(-US)?(;|$)/.test(O);
|
|
2004
|
+
}
|
|
2005
|
+
} catch {
|
|
2006
|
+
}
|
|
2007
|
+
return !1;
|
|
2008
|
+
}), S = M(
|
|
1924
2009
|
() => Array.isArray(n.modelValue) ? n.modelValue : n.modelValue ? [n.modelValue] : []
|
|
1925
|
-
),
|
|
1926
|
-
() =>
|
|
1927
|
-
), D =
|
|
1928
|
-
l.value = !0,
|
|
2010
|
+
), R = M(() => !n.multiple && !!n.modelValue), V = M(
|
|
2011
|
+
() => R.value ? F(n.modelValue) : ""
|
|
2012
|
+
), D = M(() => S.value.length > 0), W = () => {
|
|
2013
|
+
l.value = !0, Ht(() => {
|
|
1929
2014
|
s.value?.focus();
|
|
1930
2015
|
});
|
|
1931
|
-
},
|
|
2016
|
+
}, U = () => {
|
|
1932
2017
|
l.value = !1, i.value = "";
|
|
1933
|
-
},
|
|
1934
|
-
u(
|
|
2018
|
+
}, Q = (k) => {
|
|
2019
|
+
u(k), n.multiple ? S.value.some((T) => T.id === k.id) || o("update:modelValue", [...S.value, k]) : (o("update:modelValue", k), U()), o("select", k);
|
|
1935
2020
|
}, K = () => {
|
|
1936
2021
|
o("update:modelValue", n.multiple ? [] : null);
|
|
1937
|
-
},
|
|
1938
|
-
const O =
|
|
2022
|
+
}, P = E(!1), te = (k) => {
|
|
2023
|
+
const O = k.target;
|
|
1939
2024
|
if (!O) return;
|
|
1940
|
-
O.scrollTop + O.clientHeight >= O.scrollHeight - 80 && i.value && !
|
|
2025
|
+
O.scrollTop + O.clientHeight >= O.scrollHeight - 80 && i.value && !p.value && !v.value && !w.value && !P.value && (P.value = !0, x(!0));
|
|
1941
2026
|
};
|
|
1942
|
-
|
|
1943
|
-
|
|
2027
|
+
Te(v, (k) => {
|
|
2028
|
+
k || (P.value = !1);
|
|
1944
2029
|
});
|
|
1945
2030
|
const z = () => {
|
|
1946
2031
|
c && clearTimeout(c), c = setTimeout(() => {
|
|
1947
|
-
|
|
2032
|
+
P.value = !1, r.value?.scrollTo({ top: 0 }), console.log("🍉 ~ index.vue:279 ~ onInput ~ fetchData:", x), x(!1);
|
|
1948
2033
|
}, 300);
|
|
1949
|
-
},
|
|
2034
|
+
}, F = (k) => g.value ? k.displayEn || k.display : k.displayCn || k.display, q = (k) => {
|
|
1950
2035
|
const O = { City: "城市", Seaport: "港口", Airport: "机场" };
|
|
1951
|
-
return g.value ?
|
|
1952
|
-
},
|
|
1953
|
-
return (
|
|
1954
|
-
|
|
2036
|
+
return g.value ? k : O[k] || k;
|
|
2037
|
+
}, re = (k) => S.value.some((O) => O.id === k.id);
|
|
2038
|
+
return (k, O) => (A(), b("div", jo, [
|
|
2039
|
+
m("div", {
|
|
1955
2040
|
class: "search-trigger",
|
|
1956
2041
|
onClick: W
|
|
1957
2042
|
}, [
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
src: h(
|
|
2043
|
+
m("div", Xo, [
|
|
2044
|
+
m("img", {
|
|
2045
|
+
src: h(We),
|
|
1961
2046
|
class: "search-icon-m"
|
|
1962
|
-
}, null, 8,
|
|
1963
|
-
|
|
1964
|
-
e.multiple &&
|
|
2047
|
+
}, null, 8, Zo),
|
|
2048
|
+
m("div", el, [
|
|
2049
|
+
e.multiple && S.value.length > 0 ? (A(), b("span", tl, _(g.value ? "Selected" : "已选") + " (" + _(S.value.length) + ")", 1)) : !e.multiple && R.value ? (A(), b("span", nl, _(V.value), 1)) : (A(), b("span", ol, _(e.placeholder || (g.value ? "Search" : "搜索")), 1))
|
|
1965
2050
|
])
|
|
1966
2051
|
]),
|
|
1967
|
-
D.value ? (
|
|
2052
|
+
D.value ? (A(), b("span", {
|
|
1968
2053
|
key: 0,
|
|
1969
2054
|
class: "clear-trigger",
|
|
1970
|
-
onClick:
|
|
1971
|
-
}, "ⓧ")) :
|
|
2055
|
+
onClick: ne(K, ["stop"])
|
|
2056
|
+
}, "ⓧ")) : I("", !0)
|
|
1972
2057
|
]),
|
|
1973
|
-
(
|
|
1974
|
-
l.value ? (
|
|
2058
|
+
(A(), Ge(At, { to: "body" }, [
|
|
2059
|
+
l.value ? (A(), b("div", ll, [
|
|
1975
2060
|
L(st, { name: "fade" }, {
|
|
1976
|
-
default:
|
|
1977
|
-
|
|
2061
|
+
default: N(() => [
|
|
2062
|
+
m("div", {
|
|
1978
2063
|
class: "h5-mask",
|
|
1979
|
-
onClick:
|
|
2064
|
+
onClick: U
|
|
1980
2065
|
})
|
|
1981
2066
|
]),
|
|
1982
2067
|
_: 1
|
|
1983
2068
|
}),
|
|
1984
2069
|
L(st, { name: "slide-up" }, {
|
|
1985
|
-
default:
|
|
1986
|
-
|
|
1987
|
-
|
|
2070
|
+
default: N(() => [
|
|
2071
|
+
m("div", sl, [
|
|
2072
|
+
m("div", {
|
|
1988
2073
|
class: "drawer-handle",
|
|
1989
|
-
onClick:
|
|
2074
|
+
onClick: U
|
|
1990
2075
|
}),
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
src: h(
|
|
2076
|
+
m("div", il, [
|
|
2077
|
+
m("div", al, [
|
|
2078
|
+
m("img", {
|
|
2079
|
+
src: h(We),
|
|
1995
2080
|
class: "inner-icon"
|
|
1996
|
-
}, null, 8,
|
|
1997
|
-
|
|
2081
|
+
}, null, 8, rl),
|
|
2082
|
+
Ee(m("input", {
|
|
1998
2083
|
ref_key: "inputRef",
|
|
1999
2084
|
ref: s,
|
|
2000
|
-
"onUpdate:modelValue": O[0] || (O[0] = (
|
|
2085
|
+
"onUpdate:modelValue": O[0] || (O[0] = (T) => i.value = T),
|
|
2001
2086
|
placeholder: g.value ? "City/Port/Airport" : "搜索城市/港口/机场",
|
|
2002
2087
|
onInput: z
|
|
2003
|
-
}, null, 40,
|
|
2004
|
-
[
|
|
2088
|
+
}, null, 40, cl), [
|
|
2089
|
+
[Ye, i.value]
|
|
2005
2090
|
]),
|
|
2006
|
-
i.value ? (
|
|
2091
|
+
i.value ? (A(), b("div", {
|
|
2007
2092
|
key: 0,
|
|
2008
2093
|
class: "h5-clear-btn",
|
|
2009
|
-
onClick: O[1] || (O[1] = (
|
|
2010
|
-
}, " ✕ ")) :
|
|
2094
|
+
onClick: O[1] || (O[1] = (T) => i.value = "")
|
|
2095
|
+
}, " ✕ ")) : I("", !0)
|
|
2011
2096
|
]),
|
|
2012
|
-
|
|
2097
|
+
m("div", {
|
|
2013
2098
|
class: "h5-cancel-btn",
|
|
2014
|
-
onClick:
|
|
2015
|
-
},
|
|
2099
|
+
onClick: U
|
|
2100
|
+
}, _(g.value ? "Cancel" : "取消"), 1)
|
|
2016
2101
|
]),
|
|
2017
|
-
|
|
2102
|
+
m("div", {
|
|
2018
2103
|
class: "h5-main-content",
|
|
2019
2104
|
ref_key: "scrollContainer",
|
|
2020
|
-
ref:
|
|
2021
|
-
onScroll:
|
|
2105
|
+
ref: r,
|
|
2106
|
+
onScroll: te
|
|
2022
2107
|
}, [
|
|
2023
|
-
h(
|
|
2024
|
-
|
|
2025
|
-
])])) :
|
|
2026
|
-
!i.value && h(
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2108
|
+
h(p) && !h(v) ? (A(), b("div", ul, [...O[3] || (O[3] = [
|
|
2109
|
+
m("div", { class: "h5-spinner" }, null, -1)
|
|
2110
|
+
])])) : I("", !0),
|
|
2111
|
+
!i.value && h(a).length > 0 ? (A(), b("div", dl, [
|
|
2112
|
+
m("div", fl, [
|
|
2113
|
+
m("span", null, _(g.value ? "Recent" : "最近搜索"), 1),
|
|
2114
|
+
m("span", {
|
|
2030
2115
|
class: "h5-clear-history",
|
|
2031
2116
|
onClick: O[2] || (O[2] = //@ts-ignore
|
|
2032
|
-
(...
|
|
2033
|
-
},
|
|
2117
|
+
(...T) => h(f) && h(f)(...T))
|
|
2118
|
+
}, _(g.value ? "Clear" : "清空"), 1)
|
|
2034
2119
|
]),
|
|
2035
|
-
|
|
2036
|
-
(
|
|
2037
|
-
key:
|
|
2120
|
+
m("div", pl, [
|
|
2121
|
+
(A(!0), b(oe, null, me(h(a), (T, H) => (A(), b("div", {
|
|
2122
|
+
key: H,
|
|
2038
2123
|
class: "h5-history-tag",
|
|
2039
|
-
onClick: (
|
|
2040
|
-
},
|
|
2124
|
+
onClick: (Ae) => Q(T)
|
|
2125
|
+
}, _(F(T)), 9, ml))), 128))
|
|
2041
2126
|
])
|
|
2042
|
-
])) :
|
|
2043
|
-
h(d).length > 0 ? (
|
|
2044
|
-
(
|
|
2045
|
-
key:
|
|
2046
|
-
class:
|
|
2047
|
-
onClick: (
|
|
2127
|
+
])) : I("", !0),
|
|
2128
|
+
h(d).length > 0 ? (A(), b("div", hl, [
|
|
2129
|
+
(A(!0), b(oe, null, me(h(d), (T, H) => (A(), b("div", {
|
|
2130
|
+
key: H,
|
|
2131
|
+
class: se(["h5-result-item", { "is-active": re(T) }]),
|
|
2132
|
+
onClick: (Ae) => Q(T)
|
|
2048
2133
|
}, [
|
|
2049
|
-
|
|
2050
|
-
class:
|
|
2051
|
-
},
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2134
|
+
m("div", {
|
|
2135
|
+
class: se(["item-type", T.type.toLowerCase()])
|
|
2136
|
+
}, _(q(T.type)), 3),
|
|
2137
|
+
m("div", gl, [
|
|
2138
|
+
m("div", yl, _(F(T)), 1),
|
|
2139
|
+
T.parentName ? (A(), b("div", Al, _(T.parentName), 1)) : I("", !0)
|
|
2055
2140
|
])
|
|
2056
|
-
], 10,
|
|
2057
|
-
|
|
2058
|
-
h(v) ? (
|
|
2059
|
-
O[4] || (O[4] =
|
|
2060
|
-
|
|
2061
|
-
], 64)) : h(
|
|
2141
|
+
], 10, vl))), 128)),
|
|
2142
|
+
m("div", wl, [
|
|
2143
|
+
h(v) ? (A(), b(oe, { key: 0 }, [
|
|
2144
|
+
O[4] || (O[4] = m("div", { class: "mini-spinner" }, null, -1)),
|
|
2145
|
+
m("span", null, _(g.value ? "Loading..." : "加载中..."), 1)
|
|
2146
|
+
], 64)) : h(w) && i.value ? (A(), b("span", xl, _(g.value ? "No more results" : "没有更多结果了"), 1)) : I("", !0)
|
|
2062
2147
|
])
|
|
2063
|
-
])) :
|
|
2064
|
-
i.value && !h(
|
|
2148
|
+
])) : I("", !0),
|
|
2149
|
+
i.value && !h(p) && h(d).length === 0 ? (A(), b("div", bl, _(g.value ? "No Results Found" : "未找到相关结果"), 1)) : I("", !0)
|
|
2065
2150
|
], 544)
|
|
2066
2151
|
])
|
|
2067
2152
|
]),
|
|
2068
2153
|
_: 1
|
|
2069
2154
|
})
|
|
2070
|
-
])) :
|
|
2155
|
+
])) : I("", !0)
|
|
2071
2156
|
]))
|
|
2072
2157
|
]));
|
|
2073
2158
|
}
|
|
2074
|
-
}),
|
|
2075
|
-
let
|
|
2159
|
+
}), Sl = /* @__PURE__ */ nt(Cl, [["__scopeId", "data-v-c1314e9c"]]);
|
|
2160
|
+
let kl = {
|
|
2076
2161
|
open() {
|
|
2077
2162
|
ce.emit(ue.Open);
|
|
2078
2163
|
},
|
|
@@ -2083,41 +2168,41 @@ let Sl = {
|
|
|
2083
2168
|
ce.on(ue.Submit, e);
|
|
2084
2169
|
}
|
|
2085
2170
|
};
|
|
2086
|
-
function
|
|
2171
|
+
function Tl() {
|
|
2087
2172
|
let e = !1;
|
|
2088
2173
|
return {
|
|
2089
2174
|
install(t) {
|
|
2090
2175
|
if (typeof window < "u" && !e) {
|
|
2091
2176
|
const n = document.createElement("div");
|
|
2092
|
-
n.setAttribute("id", "global-modal-root"), document.body.appendChild(n),
|
|
2177
|
+
n.setAttribute("id", "global-modal-root"), document.body.appendChild(n), Qt(qo).mount(n), e = !0;
|
|
2093
2178
|
}
|
|
2094
|
-
t.config.globalProperties.$globalModal =
|
|
2179
|
+
t.config.globalProperties.$globalModal = kl;
|
|
2095
2180
|
}
|
|
2096
2181
|
};
|
|
2097
2182
|
}
|
|
2098
|
-
const
|
|
2099
|
-
ApplyDataDialog:
|
|
2100
|
-
JcSearch:
|
|
2101
|
-
JCMSearch:
|
|
2183
|
+
const vt = {
|
|
2184
|
+
ApplyDataDialog: $o,
|
|
2185
|
+
JcSearch: Vt,
|
|
2186
|
+
JCMSearch: Sl
|
|
2102
2187
|
};
|
|
2103
|
-
let
|
|
2104
|
-
const
|
|
2188
|
+
let gt = !1;
|
|
2189
|
+
const El = {
|
|
2105
2190
|
install(e, t) {
|
|
2106
|
-
if (!
|
|
2107
|
-
|
|
2108
|
-
for (const n in
|
|
2109
|
-
e.component(n,
|
|
2191
|
+
if (!gt) {
|
|
2192
|
+
gt = !0, t?.sharedConfig && $t(t.sharedConfig);
|
|
2193
|
+
for (const n in vt)
|
|
2194
|
+
e.component(n, vt[n]);
|
|
2110
2195
|
}
|
|
2111
2196
|
}
|
|
2112
2197
|
};
|
|
2113
2198
|
export {
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2199
|
+
$o as ApplyDataDialog,
|
|
2200
|
+
qo as GlobalModal,
|
|
2201
|
+
Sl as JCMSearch,
|
|
2202
|
+
Vt as JcSearch,
|
|
2203
|
+
Bl as MODAL_ACTION,
|
|
2204
|
+
Tl as createGlobalModalPlugin,
|
|
2205
|
+
El as default,
|
|
2206
|
+
Ll as emitter,
|
|
2207
|
+
Nl as initSharedConfig
|
|
2123
2208
|
};
|