@jctrans-materials/comps-vue2 1.0.0 → 1.0.2

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.esm.js CHANGED
@@ -1,30 +1,32 @@
1
- import ee, { ref as C, computed as st, onMounted as ne, onBeforeUnmount as Nt, defineComponent as oe, toRef as xt, watch as bt, reactive as se } from "vue";
2
- import { locationSearchV2 as Ht, emitter as W, MODAL_ACTION as G } from "@jctrans-materials/shared";
3
- import { MODAL_ACTION as In, emitter as Bn } from "@jctrans-materials/shared";
4
- import { Col as Ct, Row as Rt, Checkbox as Dt, Button as St, Input as Ot, FormItem as Et, Form as kt, Dialog as _t } from "jctrans-ui";
5
- ee.util.warn;
6
- function ie(e) {
7
- const t = C([]), n = "_search_history_cache", o = typeof window < "u" && typeof localStorage < "u", s = st(
1
+ import oe, { ref as C, computed as Z, onMounted as se, onBeforeUnmount as qt, defineComponent as ie, toRef as xt, watch as bt, reactive as Ct } from "vue";
2
+ import { locationSearchV2 as Ut, emitter as W, MODAL_ACTION as G, initSharedConfig as re } from "@jctrans-materials/shared";
3
+ import { MODAL_ACTION as Mn, emitter as Pn } from "@jctrans-materials/shared";
4
+ import { Col as Rt, Row as St, Checkbox as Dt, Button as Et, Input as Ot, FormItem as _t, Form as Tt, Dialog as kt } from "jctrans-ui";
5
+ oe.util.warn;
6
+ function le(e) {
7
+ const t = C([]), n = "_search_history_cache", o = typeof window < "u" && typeof localStorage < "u", s = Z(
8
8
  () => (e.value || "") + n
9
- ), i = st(
10
- () => e.value && e.value !== ""
11
- ), l = (a) => {
9
+ ), i = Z(
10
+ () => !!e.value && e.value !== ""
11
+ ), r = (a) => {
12
12
  if (!a || !o) return;
13
13
  const c = t.value.filter(
14
14
  (d) => d.id && d.id !== a.id || d.display !== a.display
15
15
  );
16
16
  c.unshift(a);
17
17
  const u = c.slice(0, 4);
18
- if (t.value = u, i.value)
18
+ if (i.value) {
19
+ t.value = u;
19
20
  try {
20
21
  localStorage.setItem(s.value, JSON.stringify(u));
21
22
  } catch (d) {
22
23
  console.warn("LocalStorage save failed:", d);
23
24
  }
24
- }, r = () => {
25
+ }
26
+ }, l = () => {
25
27
  t.value = [], o && localStorage.removeItem(s.value);
26
28
  };
27
- return ne(() => {
29
+ return se(() => {
28
30
  if (o && i.value) {
29
31
  const a = localStorage.getItem(s.value);
30
32
  if (a)
@@ -36,27 +38,27 @@ function ie(e) {
36
38
  }
37
39
  }), {
38
40
  searchHistory: t,
39
- saveToHistory: l,
40
- clearHistory: r,
41
+ saveToHistory: r,
42
+ clearHistory: l,
41
43
  HasHistory: i
42
44
  };
43
45
  }
44
- async function le(e, t = [
46
+ async function ae(e, t = [
45
47
  "Continent",
46
48
  "Country",
47
49
  "City",
48
50
  "Seaport",
49
51
  "Airport"
50
52
  ], n = {}) {
51
- return Ht.searchByName({
53
+ return Ut.searchByName({
52
54
  keyword: e,
53
55
  displayInfo: t,
54
56
  ...n
55
57
  });
56
58
  }
57
- const re = (e, t) => Ht.searchByIdWithType(e, t);
58
- function ae(e, t) {
59
- const n = C([]), o = C(!1), s = C(!1), i = C(1), l = C(0), r = C(10), a = st(() => l.value === 0 ? !1 : n.value.length >= l.value), c = st(() => {
59
+ const ce = (e, t) => Ut.searchByIdWithType(e, t);
60
+ function ue(e, t) {
61
+ const n = C([]), o = C(!1), s = C(!1), i = C(1), r = C(0), l = C(10), a = Z(() => r.value === 0 ? !1 : n.value.length >= r.value), c = Z(() => {
60
62
  const m = [...t.value];
61
63
  return m.includes("Country") && !m.includes("Region") && m.push("Region"), m;
62
64
  }), u = (m) => !m || !Array.isArray(m) ? [] : m.filter(
@@ -68,25 +70,25 @@ function ae(e, t) {
68
70
  isFetchingMore: s,
69
71
  isFinished: a,
70
72
  currentPage: i,
71
- total: l,
73
+ total: r,
72
74
  fetchData: async (m = 1, f = !1) => {
73
75
  if (!e.value.trim() && !f) {
74
- n.value = [], l.value = 0;
76
+ n.value = [], r.value = 0;
75
77
  return;
76
78
  }
77
79
  if (!(f && (s.value || a.value)) && !(!f && o.value)) {
78
80
  f ? s.value = !0 : (o.value = !0, i.value = 1);
79
81
  try {
80
- const p = await le(
82
+ const p = await ae(
81
83
  e.value,
82
84
  t.value,
83
85
  {
84
86
  current: m,
85
87
  // 使用传入的 page 参数
86
- size: r.value
88
+ size: l.value
87
89
  }
88
- ), h = p.records || [], v = u(h);
89
- f ? n.value = [...n.value, ...v] : n.value = v, l.value = p.total || 0, i.value = m;
90
+ ), h = p.records || [], y = u(h);
91
+ f ? n.value = [...n.value, ...y] : n.value = y, r.value = p.total || 0, i.value = m;
90
92
  } catch (p) {
91
93
  console.error("Failed to fetch search results:", p);
92
94
  } finally {
@@ -97,78 +99,78 @@ function ae(e, t) {
97
99
  filterByTypes: u
98
100
  };
99
101
  }
100
- const Y = Math.min, R = Math.max, it = Math.round, ot = Math.floor, F = (e) => ({
102
+ const Y = Math.min, R = Math.max, it = Math.round, st = Math.floor, I = (e) => ({
101
103
  x: e,
102
104
  y: e
103
- }), ce = {
105
+ }), fe = {
104
106
  left: "right",
105
107
  right: "left",
106
108
  bottom: "top",
107
109
  top: "bottom"
108
- }, ue = {
110
+ }, de = {
109
111
  start: "end",
110
112
  end: "start"
111
113
  };
112
- function Tt(e, t, n) {
114
+ function It(e, t, n) {
113
115
  return R(e, Y(t, n));
114
116
  }
115
- function tt(e, t) {
117
+ function et(e, t) {
116
118
  return typeof e == "function" ? e(t) : e;
117
119
  }
118
120
  function N(e) {
119
121
  return e.split("-")[0];
120
122
  }
121
- function et(e) {
123
+ function nt(e) {
122
124
  return e.split("-")[1];
123
125
  }
124
- function qt(e) {
126
+ function Wt(e) {
125
127
  return e === "x" ? "y" : "x";
126
128
  }
127
- function Ut(e) {
129
+ function Gt(e) {
128
130
  return e === "y" ? "height" : "width";
129
131
  }
130
- const fe = /* @__PURE__ */ new Set(["top", "bottom"]);
132
+ const me = /* @__PURE__ */ new Set(["top", "bottom"]);
131
133
  function V(e) {
132
- return fe.has(N(e)) ? "y" : "x";
134
+ return me.has(N(e)) ? "y" : "x";
133
135
  }
134
- function Wt(e) {
135
- return qt(V(e));
136
+ function Jt(e) {
137
+ return Wt(V(e));
136
138
  }
137
- function de(e, t, n) {
139
+ function pe(e, t, n) {
138
140
  n === void 0 && (n = !1);
139
- const o = et(e), s = Wt(e), i = Ut(s);
140
- let l = s === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
141
- return t.reference[i] > t.floating[i] && (l = lt(l)), [l, lt(l)];
141
+ const o = nt(e), s = Jt(e), i = Gt(s);
142
+ let r = s === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
143
+ return t.reference[i] > t.floating[i] && (r = rt(r)), [r, rt(r)];
142
144
  }
143
- function me(e) {
144
- const t = lt(e);
145
+ function he(e) {
146
+ const t = rt(e);
145
147
  return [pt(e), t, pt(t)];
146
148
  }
147
149
  function pt(e) {
148
- return e.replace(/start|end/g, (t) => ue[t]);
150
+ return e.replace(/start|end/g, (t) => de[t]);
149
151
  }
150
- const Ft = ["left", "right"], Lt = ["right", "left"], pe = ["top", "bottom"], he = ["bottom", "top"];
151
- function ge(e, t, n) {
152
+ const Ft = ["left", "right"], Lt = ["right", "left"], ge = ["top", "bottom"], ye = ["bottom", "top"];
153
+ function ve(e, t, n) {
152
154
  switch (e) {
153
155
  case "top":
154
156
  case "bottom":
155
157
  return n ? t ? Lt : Ft : t ? Ft : Lt;
156
158
  case "left":
157
159
  case "right":
158
- return t ? pe : he;
160
+ return t ? ge : ye;
159
161
  default:
160
162
  return [];
161
163
  }
162
164
  }
163
- function ve(e, t, n, o) {
164
- const s = et(e);
165
- let i = ge(N(e), n === "start", o);
166
- return s && (i = i.map((l) => l + "-" + s), t && (i = i.concat(i.map(pt)))), i;
165
+ function Ae(e, t, n, o) {
166
+ const s = nt(e);
167
+ let i = ve(N(e), n === "start", o);
168
+ return s && (i = i.map((r) => r + "-" + s), t && (i = i.concat(i.map(pt)))), i;
167
169
  }
168
- function lt(e) {
169
- return e.replace(/left|right|bottom|top/g, (t) => ce[t]);
170
+ function rt(e) {
171
+ return e.replace(/left|right|bottom|top/g, (t) => fe[t]);
170
172
  }
171
- function ye(e) {
173
+ function we(e) {
172
174
  return {
173
175
  top: 0,
174
176
  right: 0,
@@ -177,15 +179,15 @@ function ye(e) {
177
179
  ...e
178
180
  };
179
181
  }
180
- function Ae(e) {
181
- return typeof e != "number" ? ye(e) : {
182
+ function xe(e) {
183
+ return typeof e != "number" ? we(e) : {
182
184
  top: e,
183
185
  right: e,
184
186
  bottom: e,
185
187
  left: e
186
188
  };
187
189
  }
188
- function rt(e) {
190
+ function lt(e) {
189
191
  const {
190
192
  x: t,
191
193
  y: n,
@@ -203,12 +205,12 @@ function rt(e) {
203
205
  y: n
204
206
  };
205
207
  }
206
- function It(e, t, n) {
208
+ function Bt(e, t, n) {
207
209
  let {
208
210
  reference: o,
209
211
  floating: s
210
212
  } = e;
211
- const i = V(t), l = Wt(t), r = Ut(l), a = N(t), c = i === "y", u = o.x + o.width / 2 - s.width / 2, d = o.y + o.height / 2 - s.height / 2, m = o[r] / 2 - s[r] / 2;
213
+ const i = V(t), r = Jt(t), l = Gt(r), a = N(t), c = i === "y", u = o.x + o.width / 2 - s.width / 2, d = o.y + o.height / 2 - s.height / 2, m = o[l] / 2 - s[l] / 2;
212
214
  let f;
213
215
  switch (a) {
214
216
  case "top":
@@ -241,37 +243,37 @@ function It(e, t, n) {
241
243
  y: o.y
242
244
  };
243
245
  }
244
- switch (et(t)) {
246
+ switch (nt(t)) {
245
247
  case "start":
246
- f[l] -= m * (n && c ? -1 : 1);
248
+ f[r] -= m * (n && c ? -1 : 1);
247
249
  break;
248
250
  case "end":
249
- f[l] += m * (n && c ? -1 : 1);
251
+ f[r] += m * (n && c ? -1 : 1);
250
252
  break;
251
253
  }
252
254
  return f;
253
255
  }
254
- const we = async (e, t, n) => {
256
+ const be = async (e, t, n) => {
255
257
  const {
256
258
  placement: o = "bottom",
257
259
  strategy: s = "absolute",
258
260
  middleware: i = [],
259
- platform: l
260
- } = n, r = i.filter(Boolean), a = await (l.isRTL == null ? void 0 : l.isRTL(t));
261
- let c = await l.getElementRects({
261
+ platform: r
262
+ } = n, l = i.filter(Boolean), a = await (r.isRTL == null ? void 0 : r.isRTL(t));
263
+ let c = await r.getElementRects({
262
264
  reference: e,
263
265
  floating: t,
264
266
  strategy: s
265
267
  }), {
266
268
  x: u,
267
269
  y: d
268
- } = It(c, o, a), m = o, f = {}, p = 0;
269
- for (let h = 0; h < r.length; h++) {
270
+ } = Bt(c, o, a), m = o, f = {}, p = 0;
271
+ for (let h = 0; h < l.length; h++) {
270
272
  const {
271
- name: v,
273
+ name: y,
272
274
  fn: g
273
- } = r[h], {
274
- x: y,
275
+ } = l[h], {
276
+ x: v,
275
277
  y: A,
276
278
  data: b,
277
279
  reset: w
@@ -283,26 +285,26 @@ const we = async (e, t, n) => {
283
285
  strategy: s,
284
286
  middlewareData: f,
285
287
  rects: c,
286
- platform: l,
288
+ platform: r,
287
289
  elements: {
288
290
  reference: e,
289
291
  floating: t
290
292
  }
291
293
  });
292
- u = y ?? u, d = A ?? d, f = {
294
+ u = v ?? u, d = A ?? d, f = {
293
295
  ...f,
294
- [v]: {
295
- ...f[v],
296
+ [y]: {
297
+ ...f[y],
296
298
  ...b
297
299
  }
298
- }, w && p <= 50 && (p++, typeof w == "object" && (w.placement && (m = w.placement), w.rects && (c = w.rects === !0 ? await l.getElementRects({
300
+ }, w && p <= 50 && (p++, typeof w == "object" && (w.placement && (m = w.placement), w.rects && (c = w.rects === !0 ? await r.getElementRects({
299
301
  reference: e,
300
302
  floating: t,
301
303
  strategy: s
302
304
  }) : w.rects), {
303
305
  x: u,
304
306
  y: d
305
- } = It(c, m, a)), h = -1);
307
+ } = Bt(c, m, a)), h = -1);
306
308
  }
307
309
  return {
308
310
  x: u,
@@ -319,8 +321,8 @@ async function gt(e, t) {
319
321
  x: o,
320
322
  y: s,
321
323
  platform: i,
322
- rects: l,
323
- elements: r,
324
+ rects: r,
325
+ elements: l,
324
326
  strategy: a
325
327
  } = e, {
326
328
  boundary: c = "clippingAncestors",
@@ -328,28 +330,28 @@ async function gt(e, t) {
328
330
  elementContext: d = "floating",
329
331
  altBoundary: m = !1,
330
332
  padding: f = 0
331
- } = tt(t, e), p = Ae(f), v = r[m ? d === "floating" ? "reference" : "floating" : d], g = rt(await i.getClippingRect({
332
- element: (n = await (i.isElement == null ? void 0 : i.isElement(v))) == null || n ? v : v.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(r.floating)),
333
+ } = et(t, e), p = xe(f), y = l[m ? d === "floating" ? "reference" : "floating" : d], g = lt(await i.getClippingRect({
334
+ element: (n = await (i.isElement == null ? void 0 : i.isElement(y))) == null || n ? y : y.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)),
333
335
  boundary: c,
334
336
  rootBoundary: u,
335
337
  strategy: a
336
- })), y = d === "floating" ? {
338
+ })), v = d === "floating" ? {
337
339
  x: o,
338
340
  y: s,
339
- width: l.floating.width,
340
- height: l.floating.height
341
- } : l.reference, A = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(r.floating)), b = await (i.isElement == null ? void 0 : i.isElement(A)) ? await (i.getScale == null ? void 0 : i.getScale(A)) || {
341
+ width: r.floating.width,
342
+ height: r.floating.height
343
+ } : r.reference, A = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l.floating)), b = await (i.isElement == null ? void 0 : i.isElement(A)) ? await (i.getScale == null ? void 0 : i.getScale(A)) || {
342
344
  x: 1,
343
345
  y: 1
344
346
  } : {
345
347
  x: 1,
346
348
  y: 1
347
- }, w = rt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
348
- elements: r,
349
- rect: y,
349
+ }, w = lt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
350
+ elements: l,
351
+ rect: v,
350
352
  offsetParent: A,
351
353
  strategy: a
352
- }) : y);
354
+ }) : v);
353
355
  return {
354
356
  top: (g.top - w.top + p.top) / b.y,
355
357
  bottom: (w.bottom - g.bottom + p.bottom) / b.y,
@@ -357,7 +359,7 @@ async function gt(e, t) {
357
359
  right: (w.right - g.right + p.right) / b.x
358
360
  };
359
361
  }
360
- const xe = function(e) {
362
+ const Ce = function(e) {
361
363
  return e === void 0 && (e = {}), {
362
364
  name: "flip",
363
365
  options: e,
@@ -366,8 +368,8 @@ const xe = function(e) {
366
368
  const {
367
369
  placement: s,
368
370
  middlewareData: i,
369
- rects: l,
370
- initialPlacement: r,
371
+ rects: r,
372
+ initialPlacement: l,
371
373
  platform: a,
372
374
  elements: c
373
375
  } = t, {
@@ -377,55 +379,55 @@ const xe = function(e) {
377
379
  fallbackStrategy: f = "bestFit",
378
380
  fallbackAxisSideDirection: p = "none",
379
381
  flipAlignment: h = !0,
380
- ...v
381
- } = tt(e, t);
382
+ ...y
383
+ } = et(e, t);
382
384
  if ((n = i.arrow) != null && n.alignmentOffset)
383
385
  return {};
384
- const g = N(s), y = V(r), A = N(r) === r, b = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), w = m || (A || !h ? [lt(r)] : me(r)), O = p !== "none";
385
- !m && O && w.push(...ve(r, h, p, b));
386
- const S = [r, ...w], B = await gt(t, v), M = [];
387
- let E = ((o = i.flip) == null ? void 0 : o.overflows) || [];
386
+ const g = N(s), v = V(l), A = N(l) === l, b = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), w = m || (A || !h ? [rt(l)] : he(l)), E = p !== "none";
387
+ !m && E && w.push(...Ae(l, h, p, b));
388
+ const D = [l, ...w], B = await gt(t, y), M = [];
389
+ let O = ((o = i.flip) == null ? void 0 : o.overflows) || [];
388
390
  if (u && M.push(B[g]), d) {
389
- const q = de(s, l, b);
391
+ const q = pe(s, r, b);
390
392
  M.push(B[q[0]], B[q[1]]);
391
393
  }
392
- if (E = [...E, {
394
+ if (O = [...O, {
393
395
  placement: s,
394
396
  overflows: M
395
397
  }], !M.every((q) => q <= 0)) {
396
398
  var x, P;
397
- const q = (((x = i.flip) == null ? void 0 : x.index) || 0) + 1, dt = S[q];
398
- if (dt && (!(d === "alignment" ? y !== V(dt) : !1) || // We leave the current main axis only if every placement on that axis
399
+ const q = (((x = i.flip) == null ? void 0 : x.index) || 0) + 1, dt = D[q];
400
+ if (dt && (!(d === "alignment" ? v !== V(dt) : !1) || // We leave the current main axis only if every placement on that axis
399
401
  // overflows the main axis.
400
- E.every((k) => V(k.placement) === y ? k.overflows[0] > 0 : !0)))
402
+ O.every((_) => V(_.placement) === v ? _.overflows[0] > 0 : !0)))
401
403
  return {
402
404
  data: {
403
405
  index: q,
404
- overflows: E
406
+ overflows: O
405
407
  },
406
408
  reset: {
407
409
  placement: dt
408
410
  }
409
411
  };
410
- let $ = (P = E.filter((U) => U.overflows[0] <= 0).sort((U, k) => U.overflows[1] - k.overflows[1])[0]) == null ? void 0 : P.placement;
412
+ let $ = (P = O.filter((U) => U.overflows[0] <= 0).sort((U, _) => U.overflows[1] - _.overflows[1])[0]) == null ? void 0 : P.placement;
411
413
  if (!$)
412
414
  switch (f) {
413
415
  case "bestFit": {
414
416
  var j;
415
- const U = (j = E.filter((k) => {
416
- if (O) {
417
- const Q = V(k.placement);
418
- return Q === y || // Create a bias to the `y` side axis due to horizontal
417
+ const U = (j = O.filter((_) => {
418
+ if (E) {
419
+ const Q = V(_.placement);
420
+ return Q === v || // Create a bias to the `y` side axis due to horizontal
419
421
  // reading directions favoring greater width.
420
422
  Q === "y";
421
423
  }
422
424
  return !0;
423
- }).map((k) => [k.placement, k.overflows.filter((Q) => Q > 0).reduce((Q, te) => Q + te, 0)]).sort((k, Q) => k[1] - Q[1])[0]) == null ? void 0 : j[0];
425
+ }).map((_) => [_.placement, _.overflows.filter((Q) => Q > 0).reduce((Q, ne) => Q + ne, 0)]).sort((_, Q) => _[1] - Q[1])[0]) == null ? void 0 : j[0];
424
426
  U && ($ = U);
425
427
  break;
426
428
  }
427
429
  case "initialPlacement":
428
- $ = r;
430
+ $ = l;
429
431
  break;
430
432
  }
431
433
  if (s !== $)
@@ -438,13 +440,13 @@ const xe = function(e) {
438
440
  return {};
439
441
  }
440
442
  };
441
- }, be = /* @__PURE__ */ new Set(["left", "top"]);
442
- async function Ce(e, t) {
443
+ }, Re = /* @__PURE__ */ new Set(["left", "top"]);
444
+ async function Se(e, t) {
443
445
  const {
444
446
  placement: n,
445
447
  platform: o,
446
448
  elements: s
447
- } = e, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), l = N(n), r = et(n), a = V(n) === "y", c = be.has(l) ? -1 : 1, u = i && a ? -1 : 1, d = tt(t, e);
449
+ } = e, i = await (o.isRTL == null ? void 0 : o.isRTL(s.floating)), r = N(n), l = nt(n), a = V(n) === "y", c = Re.has(r) ? -1 : 1, u = i && a ? -1 : 1, d = et(t, e);
448
450
  let {
449
451
  mainAxis: m,
450
452
  crossAxis: f,
@@ -458,7 +460,7 @@ async function Ce(e, t) {
458
460
  crossAxis: d.crossAxis || 0,
459
461
  alignmentAxis: d.alignmentAxis
460
462
  };
461
- return r && typeof p == "number" && (f = r === "end" ? p * -1 : p), a ? {
463
+ return l && typeof p == "number" && (f = l === "end" ? p * -1 : p), a ? {
462
464
  x: f * u,
463
465
  y: m * c
464
466
  } : {
@@ -466,7 +468,7 @@ async function Ce(e, t) {
466
468
  y: f * u
467
469
  };
468
470
  }
469
- const Re = function(e) {
471
+ const De = function(e) {
470
472
  return e === void 0 && (e = 0), {
471
473
  name: "offset",
472
474
  options: e,
@@ -475,20 +477,20 @@ const Re = function(e) {
475
477
  const {
476
478
  x: s,
477
479
  y: i,
478
- placement: l,
479
- middlewareData: r
480
- } = t, a = await Ce(t, e);
481
- return l === ((n = r.offset) == null ? void 0 : n.placement) && (o = r.arrow) != null && o.alignmentOffset ? {} : {
480
+ placement: r,
481
+ middlewareData: l
482
+ } = t, a = await Se(t, e);
483
+ return r === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
482
484
  x: s + a.x,
483
485
  y: i + a.y,
484
486
  data: {
485
487
  ...a,
486
- placement: l
488
+ placement: r
487
489
  }
488
490
  };
489
491
  }
490
492
  };
491
- }, De = function(e) {
493
+ }, Ee = function(e) {
492
494
  return e === void 0 && (e = {}), {
493
495
  name: "shift",
494
496
  options: e,
@@ -499,34 +501,34 @@ const Re = function(e) {
499
501
  placement: s
500
502
  } = t, {
501
503
  mainAxis: i = !0,
502
- crossAxis: l = !1,
503
- limiter: r = {
504
- fn: (v) => {
504
+ crossAxis: r = !1,
505
+ limiter: l = {
506
+ fn: (y) => {
505
507
  let {
506
508
  x: g,
507
- y
508
- } = v;
509
+ y: v
510
+ } = y;
509
511
  return {
510
512
  x: g,
511
- y
513
+ y: v
512
514
  };
513
515
  }
514
516
  },
515
517
  ...a
516
- } = tt(e, t), c = {
518
+ } = et(e, t), c = {
517
519
  x: n,
518
520
  y: o
519
- }, u = await gt(t, a), d = V(N(s)), m = qt(d);
521
+ }, u = await gt(t, a), d = V(N(s)), m = Wt(d);
520
522
  let f = c[m], p = c[d];
521
523
  if (i) {
522
- const v = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", y = f + u[v], A = f - u[g];
523
- f = Tt(y, f, A);
524
+ const y = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", v = f + u[y], A = f - u[g];
525
+ f = It(v, f, A);
524
526
  }
525
- if (l) {
526
- const v = d === "y" ? "top" : "left", g = d === "y" ? "bottom" : "right", y = p + u[v], A = p - u[g];
527
- p = Tt(y, p, A);
527
+ if (r) {
528
+ const y = d === "y" ? "top" : "left", g = d === "y" ? "bottom" : "right", v = p + u[y], A = p - u[g];
529
+ p = It(v, p, A);
528
530
  }
529
- const h = r.fn({
531
+ const h = l.fn({
530
532
  ...t,
531
533
  [m]: f,
532
534
  [d]: p
@@ -538,13 +540,13 @@ const Re = function(e) {
538
540
  y: h.y - o,
539
541
  enabled: {
540
542
  [m]: i,
541
- [d]: l
543
+ [d]: r
542
544
  }
543
545
  }
544
546
  };
545
547
  }
546
548
  };
547
- }, Se = function(e) {
549
+ }, Oe = function(e) {
548
550
  return e === void 0 && (e = {}), {
549
551
  name: "size",
550
552
  options: e,
@@ -553,30 +555,30 @@ const Re = function(e) {
553
555
  const {
554
556
  placement: s,
555
557
  rects: i,
556
- platform: l,
557
- elements: r
558
+ platform: r,
559
+ elements: l
558
560
  } = t, {
559
561
  apply: a = () => {
560
562
  },
561
563
  ...c
562
- } = tt(e, t), u = await gt(t, c), d = N(s), m = et(s), f = V(s) === "y", {
564
+ } = et(e, t), u = await gt(t, c), d = N(s), m = nt(s), f = V(s) === "y", {
563
565
  width: p,
564
566
  height: h
565
567
  } = i.floating;
566
- let v, g;
567
- d === "top" || d === "bottom" ? (v = d, g = m === (await (l.isRTL == null ? void 0 : l.isRTL(r.floating)) ? "start" : "end") ? "left" : "right") : (g = d, v = m === "end" ? "top" : "bottom");
568
- const y = h - u.top - u.bottom, A = p - u.left - u.right, b = Y(h - u[v], y), w = Y(p - u[g], A), O = !t.middlewareData.shift;
569
- let S = b, B = w;
570
- if ((n = t.middlewareData.shift) != null && n.enabled.x && (B = A), (o = t.middlewareData.shift) != null && o.enabled.y && (S = y), O && !m) {
571
- const E = R(u.left, 0), x = R(u.right, 0), P = R(u.top, 0), j = R(u.bottom, 0);
572
- f ? B = p - 2 * (E !== 0 || x !== 0 ? E + x : R(u.left, u.right)) : S = h - 2 * (P !== 0 || j !== 0 ? P + j : R(u.top, u.bottom));
568
+ let y, g;
569
+ d === "top" || d === "bottom" ? (y = d, g = m === (await (r.isRTL == null ? void 0 : r.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (g = d, y = m === "end" ? "top" : "bottom");
570
+ const v = h - u.top - u.bottom, A = p - u.left - u.right, b = Y(h - u[y], v), w = Y(p - u[g], A), E = !t.middlewareData.shift;
571
+ let D = b, B = w;
572
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (B = A), (o = t.middlewareData.shift) != null && o.enabled.y && (D = v), E && !m) {
573
+ const O = R(u.left, 0), x = R(u.right, 0), P = R(u.top, 0), j = R(u.bottom, 0);
574
+ f ? B = p - 2 * (O !== 0 || x !== 0 ? O + x : R(u.left, u.right)) : D = h - 2 * (P !== 0 || j !== 0 ? P + j : R(u.top, u.bottom));
573
575
  }
574
576
  await a({
575
577
  ...t,
576
578
  availableWidth: B,
577
- availableHeight: S
579
+ availableHeight: D
578
580
  });
579
- const M = await l.getDimensions(r.floating);
581
+ const M = await r.getDimensions(l.floating);
580
582
  return p !== M.width || h !== M.height ? {
581
583
  reset: {
582
584
  rects: !0
@@ -589,45 +591,45 @@ function at() {
589
591
  return typeof window < "u";
590
592
  }
591
593
  function z(e) {
592
- return Gt(e) ? (e.nodeName || "").toLowerCase() : "#document";
594
+ return Kt(e) ? (e.nodeName || "").toLowerCase() : "#document";
593
595
  }
594
- function D(e) {
596
+ function S(e) {
595
597
  var t;
596
598
  return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
597
599
  }
598
- function I(e) {
600
+ function L(e) {
599
601
  var t;
600
- return (t = (Gt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
602
+ return (t = (Kt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
601
603
  }
602
- function Gt(e) {
603
- return at() ? e instanceof Node || e instanceof D(e).Node : !1;
604
+ function Kt(e) {
605
+ return at() ? e instanceof Node || e instanceof S(e).Node : !1;
604
606
  }
605
- function _(e) {
606
- return at() ? e instanceof Element || e instanceof D(e).Element : !1;
607
+ function T(e) {
608
+ return at() ? e instanceof Element || e instanceof S(e).Element : !1;
607
609
  }
608
- function L(e) {
609
- return at() ? e instanceof HTMLElement || e instanceof D(e).HTMLElement : !1;
610
+ function F(e) {
611
+ return at() ? e instanceof HTMLElement || e instanceof S(e).HTMLElement : !1;
610
612
  }
611
- function Bt(e) {
612
- return !at() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof D(e).ShadowRoot;
613
+ function Mt(e) {
614
+ return !at() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof S(e).ShadowRoot;
613
615
  }
614
- const Oe = /* @__PURE__ */ new Set(["inline", "contents"]);
615
- function nt(e) {
616
+ const _e = /* @__PURE__ */ new Set(["inline", "contents"]);
617
+ function ot(e) {
616
618
  const {
617
619
  overflow: t,
618
620
  overflowX: n,
619
621
  overflowY: o,
620
622
  display: s
621
- } = T(e);
622
- return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !Oe.has(s);
623
+ } = k(e);
624
+ return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !_e.has(s);
623
625
  }
624
- const Ee = /* @__PURE__ */ new Set(["table", "td", "th"]);
626
+ const Te = /* @__PURE__ */ new Set(["table", "td", "th"]);
625
627
  function ke(e) {
626
- return Ee.has(z(e));
628
+ return Te.has(z(e));
627
629
  }
628
- const _e = [":popover-open", ":modal"];
630
+ const Ie = [":popover-open", ":modal"];
629
631
  function ct(e) {
630
- return _e.some((t) => {
632
+ return Ie.some((t) => {
631
633
  try {
632
634
  return e.matches(t);
633
635
  } catch {
@@ -635,15 +637,15 @@ function ct(e) {
635
637
  }
636
638
  });
637
639
  }
638
- const Te = ["transform", "translate", "scale", "rotate", "perspective"], Fe = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Le = ["paint", "layout", "strict", "content"];
639
- function vt(e) {
640
- const t = yt(), n = _(e) ? T(e) : e;
641
- return Te.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) || Fe.some((o) => (n.willChange || "").includes(o)) || Le.some((o) => (n.contain || "").includes(o));
640
+ const Fe = ["transform", "translate", "scale", "rotate", "perspective"], Le = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Be = ["paint", "layout", "strict", "content"];
641
+ function yt(e) {
642
+ const t = vt(), n = T(e) ? k(e) : e;
643
+ return Fe.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) || Le.some((o) => (n.willChange || "").includes(o)) || Be.some((o) => (n.contain || "").includes(o));
642
644
  }
643
- function Ie(e) {
645
+ function Me(e) {
644
646
  let t = H(e);
645
- for (; L(t) && !X(t); ) {
646
- if (vt(t))
647
+ for (; F(t) && !X(t); ) {
648
+ if (yt(t))
647
649
  return t;
648
650
  if (ct(t))
649
651
  return null;
@@ -651,18 +653,18 @@ function Ie(e) {
651
653
  }
652
654
  return null;
653
655
  }
654
- function yt() {
656
+ function vt() {
655
657
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
656
658
  }
657
- const Be = /* @__PURE__ */ new Set(["html", "body", "#document"]);
659
+ const Pe = /* @__PURE__ */ new Set(["html", "body", "#document"]);
658
660
  function X(e) {
659
- return Be.has(z(e));
661
+ return Pe.has(z(e));
660
662
  }
661
- function T(e) {
662
- return D(e).getComputedStyle(e);
663
+ function k(e) {
664
+ return S(e).getComputedStyle(e);
663
665
  }
664
666
  function ut(e) {
665
- return _(e) ? {
667
+ return T(e) ? {
666
668
  scrollLeft: e.scrollLeft,
667
669
  scrollTop: e.scrollTop
668
670
  } : {
@@ -677,83 +679,83 @@ function H(e) {
677
679
  // Step into the shadow DOM of the parent of a slotted node.
678
680
  e.assignedSlot || // DOM Element detected.
679
681
  e.parentNode || // ShadowRoot detected.
680
- Bt(e) && e.host || // Fallback.
681
- I(e)
682
+ Mt(e) && e.host || // Fallback.
683
+ L(e)
682
684
  );
683
- return Bt(t) ? t.host : t;
685
+ return Mt(t) ? t.host : t;
684
686
  }
685
- function Jt(e) {
687
+ function Yt(e) {
686
688
  const t = H(e);
687
- return X(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : L(t) && nt(t) ? t : Jt(t);
689
+ return X(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : F(t) && ot(t) ? t : Yt(t);
688
690
  }
689
- function Z(e, t, n) {
691
+ function tt(e, t, n) {
690
692
  var o;
691
693
  t === void 0 && (t = []), n === void 0 && (n = !0);
692
- const s = Jt(e), i = s === ((o = e.ownerDocument) == null ? void 0 : o.body), l = D(s);
694
+ const s = Yt(e), i = s === ((o = e.ownerDocument) == null ? void 0 : o.body), r = S(s);
693
695
  if (i) {
694
- const r = ht(l);
695
- return t.concat(l, l.visualViewport || [], nt(s) ? s : [], r && n ? Z(r) : []);
696
+ const l = ht(r);
697
+ return t.concat(r, r.visualViewport || [], ot(s) ? s : [], l && n ? tt(l) : []);
696
698
  }
697
- return t.concat(s, Z(s, [], n));
699
+ return t.concat(s, tt(s, [], n));
698
700
  }
699
701
  function ht(e) {
700
702
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
701
703
  }
702
- function Kt(e) {
703
- const t = T(e);
704
+ function Xt(e) {
705
+ const t = k(e);
704
706
  let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
705
- const s = L(e), i = s ? e.offsetWidth : n, l = s ? e.offsetHeight : o, r = it(n) !== i || it(o) !== l;
706
- return r && (n = i, o = l), {
707
+ const s = F(e), i = s ? e.offsetWidth : n, r = s ? e.offsetHeight : o, l = it(n) !== i || it(o) !== r;
708
+ return l && (n = i, o = r), {
707
709
  width: n,
708
710
  height: o,
709
- $: r
711
+ $: l
710
712
  };
711
713
  }
712
714
  function At(e) {
713
- return _(e) ? e : e.contextElement;
715
+ return T(e) ? e : e.contextElement;
714
716
  }
715
717
  function K(e) {
716
718
  const t = At(e);
717
- if (!L(t))
718
- return F(1);
719
+ if (!F(t))
720
+ return I(1);
719
721
  const n = t.getBoundingClientRect(), {
720
722
  width: o,
721
723
  height: s,
722
724
  $: i
723
- } = Kt(t);
724
- let l = (i ? it(n.width) : n.width) / o, r = (i ? it(n.height) : n.height) / s;
725
- return (!l || !Number.isFinite(l)) && (l = 1), (!r || !Number.isFinite(r)) && (r = 1), {
726
- x: l,
727
- y: r
725
+ } = Xt(t);
726
+ let r = (i ? it(n.width) : n.width) / o, l = (i ? it(n.height) : n.height) / s;
727
+ return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
728
+ x: r,
729
+ y: l
728
730
  };
729
731
  }
730
- const Me = /* @__PURE__ */ F(0);
731
- function Yt(e) {
732
- const t = D(e);
733
- return !yt() || !t.visualViewport ? Me : {
732
+ const Ve = /* @__PURE__ */ I(0);
733
+ function zt(e) {
734
+ const t = S(e);
735
+ return !vt() || !t.visualViewport ? Ve : {
734
736
  x: t.visualViewport.offsetLeft,
735
737
  y: t.visualViewport.offsetTop
736
738
  };
737
739
  }
738
- function Pe(e, t, n) {
739
- return t === void 0 && (t = !1), !n || t && n !== D(e) ? !1 : t;
740
+ function Qe(e, t, n) {
741
+ return t === void 0 && (t = !1), !n || t && n !== S(e) ? !1 : t;
740
742
  }
741
743
  function J(e, t, n, o) {
742
744
  t === void 0 && (t = !1), n === void 0 && (n = !1);
743
745
  const s = e.getBoundingClientRect(), i = At(e);
744
- let l = F(1);
745
- t && (o ? _(o) && (l = K(o)) : l = K(e));
746
- const r = Pe(i, n, o) ? Yt(i) : F(0);
747
- let a = (s.left + r.x) / l.x, c = (s.top + r.y) / l.y, u = s.width / l.x, d = s.height / l.y;
746
+ let r = I(1);
747
+ t && (o ? T(o) && (r = K(o)) : r = K(e));
748
+ const l = Qe(i, n, o) ? zt(i) : I(0);
749
+ let a = (s.left + l.x) / r.x, c = (s.top + l.y) / r.y, u = s.width / r.x, d = s.height / r.y;
748
750
  if (i) {
749
- const m = D(i), f = o && _(o) ? D(o) : o;
751
+ const m = S(i), f = o && T(o) ? S(o) : o;
750
752
  let p = m, h = ht(p);
751
753
  for (; h && o && f !== p; ) {
752
- const v = K(h), g = h.getBoundingClientRect(), y = T(h), A = g.left + (h.clientLeft + parseFloat(y.paddingLeft)) * v.x, b = g.top + (h.clientTop + parseFloat(y.paddingTop)) * v.y;
753
- a *= v.x, c *= v.y, u *= v.x, d *= v.y, a += A, c += b, p = D(h), h = ht(p);
754
+ const y = K(h), g = h.getBoundingClientRect(), v = k(h), A = g.left + (h.clientLeft + parseFloat(v.paddingLeft)) * y.x, b = g.top + (h.clientTop + parseFloat(v.paddingTop)) * y.y;
755
+ a *= y.x, c *= y.y, u *= y.x, d *= y.y, a += A, c += b, p = S(h), h = ht(p);
754
756
  }
755
757
  }
756
- return rt({
758
+ return lt({
757
759
  width: u,
758
760
  height: d,
759
761
  x: a,
@@ -762,35 +764,35 @@ function J(e, t, n, o) {
762
764
  }
763
765
  function ft(e, t) {
764
766
  const n = ut(e).scrollLeft;
765
- return t ? t.left + n : J(I(e)).left + n;
767
+ return t ? t.left + n : J(L(e)).left + n;
766
768
  }
767
- function Xt(e, t) {
769
+ function jt(e, t) {
768
770
  const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - ft(e, n), s = n.top + t.scrollTop;
769
771
  return {
770
772
  x: o,
771
773
  y: s
772
774
  };
773
775
  }
774
- function Ve(e) {
776
+ function Ne(e) {
775
777
  let {
776
778
  elements: t,
777
779
  rect: n,
778
780
  offsetParent: o,
779
781
  strategy: s
780
782
  } = e;
781
- const i = s === "fixed", l = I(o), r = t ? ct(t.floating) : !1;
782
- if (o === l || r && i)
783
+ const i = s === "fixed", r = L(o), l = t ? ct(t.floating) : !1;
784
+ if (o === r || l && i)
783
785
  return n;
784
786
  let a = {
785
787
  scrollLeft: 0,
786
788
  scrollTop: 0
787
- }, c = F(1);
788
- const u = F(0), d = L(o);
789
- if ((d || !d && !i) && ((z(o) !== "body" || nt(l)) && (a = ut(o)), L(o))) {
789
+ }, c = I(1);
790
+ const u = I(0), d = F(o);
791
+ if ((d || !d && !i) && ((z(o) !== "body" || ot(r)) && (a = ut(o)), F(o))) {
790
792
  const f = J(o);
791
793
  c = K(o), u.x = f.x + o.clientLeft, u.y = f.y + o.clientTop;
792
794
  }
793
- const m = l && !d && !i ? Xt(l, a) : F(0);
795
+ const m = r && !d && !i ? jt(r, a) : I(0);
794
796
  return {
795
797
  width: n.width * c.x,
796
798
  height: n.height * c.y,
@@ -798,61 +800,61 @@ function Ve(e) {
798
800
  y: n.y * c.y - a.scrollTop * c.y + u.y + m.y
799
801
  };
800
802
  }
801
- function Qe(e) {
803
+ function He(e) {
802
804
  return Array.from(e.getClientRects());
803
805
  }
804
- function Ne(e) {
805
- const t = I(e), n = ut(e), o = e.ownerDocument.body, s = R(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), i = R(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
806
- let l = -n.scrollLeft + ft(e);
807
- const r = -n.scrollTop;
808
- return T(o).direction === "rtl" && (l += R(t.clientWidth, o.clientWidth) - s), {
806
+ function qe(e) {
807
+ const t = L(e), n = ut(e), o = e.ownerDocument.body, s = R(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), i = R(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
808
+ let r = -n.scrollLeft + ft(e);
809
+ const l = -n.scrollTop;
810
+ return k(o).direction === "rtl" && (r += R(t.clientWidth, o.clientWidth) - s), {
809
811
  width: s,
810
812
  height: i,
811
- x: l,
812
- y: r
813
+ x: r,
814
+ y: l
813
815
  };
814
816
  }
815
- const Mt = 25;
816
- function He(e, t) {
817
- const n = D(e), o = I(e), s = n.visualViewport;
818
- let i = o.clientWidth, l = o.clientHeight, r = 0, a = 0;
817
+ const Pt = 25;
818
+ function Ue(e, t) {
819
+ const n = S(e), o = L(e), s = n.visualViewport;
820
+ let i = o.clientWidth, r = o.clientHeight, l = 0, a = 0;
819
821
  if (s) {
820
- i = s.width, l = s.height;
821
- const u = yt();
822
- (!u || u && t === "fixed") && (r = s.offsetLeft, a = s.offsetTop);
822
+ i = s.width, r = s.height;
823
+ const u = vt();
824
+ (!u || u && t === "fixed") && (l = s.offsetLeft, a = s.offsetTop);
823
825
  }
824
826
  const c = ft(o);
825
827
  if (c <= 0) {
826
828
  const u = o.ownerDocument, d = u.body, m = getComputedStyle(d), f = u.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, p = Math.abs(o.clientWidth - d.clientWidth - f);
827
- p <= Mt && (i -= p);
828
- } else c <= Mt && (i += c);
829
+ p <= Pt && (i -= p);
830
+ } else c <= Pt && (i += c);
829
831
  return {
830
832
  width: i,
831
- height: l,
832
- x: r,
833
+ height: r,
834
+ x: l,
833
835
  y: a
834
836
  };
835
837
  }
836
- const qe = /* @__PURE__ */ new Set(["absolute", "fixed"]);
837
- function Ue(e, t) {
838
- const n = J(e, !0, t === "fixed"), o = n.top + e.clientTop, s = n.left + e.clientLeft, i = L(e) ? K(e) : F(1), l = e.clientWidth * i.x, r = e.clientHeight * i.y, a = s * i.x, c = o * i.y;
838
+ const We = /* @__PURE__ */ new Set(["absolute", "fixed"]);
839
+ function Ge(e, t) {
840
+ const n = J(e, !0, t === "fixed"), o = n.top + e.clientTop, s = n.left + e.clientLeft, i = F(e) ? K(e) : I(1), r = e.clientWidth * i.x, l = e.clientHeight * i.y, a = s * i.x, c = o * i.y;
839
841
  return {
840
- width: l,
841
- height: r,
842
+ width: r,
843
+ height: l,
842
844
  x: a,
843
845
  y: c
844
846
  };
845
847
  }
846
- function Pt(e, t, n) {
848
+ function Vt(e, t, n) {
847
849
  let o;
848
850
  if (t === "viewport")
849
- o = He(e, n);
851
+ o = Ue(e, n);
850
852
  else if (t === "document")
851
- o = Ne(I(e));
852
- else if (_(t))
853
- o = Ue(t, n);
853
+ o = qe(L(e));
854
+ else if (T(t))
855
+ o = Ge(t, n);
854
856
  else {
855
- const s = Yt(e);
857
+ const s = zt(e);
856
858
  o = {
857
859
  x: t.x - s.x,
858
860
  y: t.y - s.y,
@@ -860,36 +862,36 @@ function Pt(e, t, n) {
860
862
  height: t.height
861
863
  };
862
864
  }
863
- return rt(o);
865
+ return lt(o);
864
866
  }
865
- function zt(e, t) {
867
+ function $t(e, t) {
866
868
  const n = H(e);
867
- return n === t || !_(n) || X(n) ? !1 : T(n).position === "fixed" || zt(n, t);
869
+ return n === t || !T(n) || X(n) ? !1 : k(n).position === "fixed" || $t(n, t);
868
870
  }
869
- function We(e, t) {
871
+ function Je(e, t) {
870
872
  const n = t.get(e);
871
873
  if (n)
872
874
  return n;
873
- let o = Z(e, [], !1).filter((r) => _(r) && z(r) !== "body"), s = null;
874
- const i = T(e).position === "fixed";
875
- let l = i ? H(e) : e;
876
- for (; _(l) && !X(l); ) {
877
- const r = T(l), a = vt(l);
878
- !a && r.position === "fixed" && (s = null), (i ? !a && !s : !a && r.position === "static" && !!s && qe.has(s.position) || nt(l) && !a && zt(e, l)) ? o = o.filter((u) => u !== l) : s = r, l = H(l);
875
+ let o = tt(e, [], !1).filter((l) => T(l) && z(l) !== "body"), s = null;
876
+ const i = k(e).position === "fixed";
877
+ let r = i ? H(e) : e;
878
+ for (; T(r) && !X(r); ) {
879
+ const l = k(r), a = yt(r);
880
+ !a && l.position === "fixed" && (s = null), (i ? !a && !s : !a && l.position === "static" && !!s && We.has(s.position) || ot(r) && !a && $t(e, r)) ? o = o.filter((u) => u !== r) : s = l, r = H(r);
879
881
  }
880
882
  return t.set(e, o), o;
881
883
  }
882
- function Ge(e) {
884
+ function Ke(e) {
883
885
  let {
884
886
  element: t,
885
887
  boundary: n,
886
888
  rootBoundary: o,
887
889
  strategy: s
888
890
  } = e;
889
- const l = [...n === "clippingAncestors" ? ct(t) ? [] : We(t, this._c) : [].concat(n), o], r = l[0], a = l.reduce((c, u) => {
890
- const d = Pt(t, u, s);
891
+ const r = [...n === "clippingAncestors" ? ct(t) ? [] : Je(t, this._c) : [].concat(n), o], l = r[0], a = r.reduce((c, u) => {
892
+ const d = Vt(t, u, s);
891
893
  return c.top = R(d.top, c.top), c.right = Y(d.right, c.right), c.bottom = Y(d.bottom, c.bottom), c.left = R(d.left, c.left), c;
892
- }, Pt(t, r, s));
894
+ }, Vt(t, l, s));
893
895
  return {
894
896
  width: a.right - a.left,
895
897
  height: a.bottom - a.top,
@@ -897,73 +899,73 @@ function Ge(e) {
897
899
  y: a.top
898
900
  };
899
901
  }
900
- function Je(e) {
902
+ function Ye(e) {
901
903
  const {
902
904
  width: t,
903
905
  height: n
904
- } = Kt(e);
906
+ } = Xt(e);
905
907
  return {
906
908
  width: t,
907
909
  height: n
908
910
  };
909
911
  }
910
- function Ke(e, t, n) {
911
- const o = L(t), s = I(t), i = n === "fixed", l = J(e, !0, i, t);
912
- let r = {
912
+ function Xe(e, t, n) {
913
+ const o = F(t), s = L(t), i = n === "fixed", r = J(e, !0, i, t);
914
+ let l = {
913
915
  scrollLeft: 0,
914
916
  scrollTop: 0
915
917
  };
916
- const a = F(0);
918
+ const a = I(0);
917
919
  function c() {
918
920
  a.x = ft(s);
919
921
  }
920
922
  if (o || !o && !i)
921
- if ((z(t) !== "body" || nt(s)) && (r = ut(t)), o) {
923
+ if ((z(t) !== "body" || ot(s)) && (l = ut(t)), o) {
922
924
  const f = J(t, !0, i, t);
923
925
  a.x = f.x + t.clientLeft, a.y = f.y + t.clientTop;
924
926
  } else s && c();
925
927
  i && !o && s && c();
926
- const u = s && !o && !i ? Xt(s, r) : F(0), d = l.left + r.scrollLeft - a.x - u.x, m = l.top + r.scrollTop - a.y - u.y;
928
+ const u = s && !o && !i ? jt(s, l) : I(0), d = r.left + l.scrollLeft - a.x - u.x, m = r.top + l.scrollTop - a.y - u.y;
927
929
  return {
928
930
  x: d,
929
931
  y: m,
930
- width: l.width,
931
- height: l.height
932
+ width: r.width,
933
+ height: r.height
932
934
  };
933
935
  }
934
936
  function mt(e) {
935
- return T(e).position === "static";
937
+ return k(e).position === "static";
936
938
  }
937
- function Vt(e, t) {
938
- if (!L(e) || T(e).position === "fixed")
939
+ function Qt(e, t) {
940
+ if (!F(e) || k(e).position === "fixed")
939
941
  return null;
940
942
  if (t)
941
943
  return t(e);
942
944
  let n = e.offsetParent;
943
- return I(e) === n && (n = n.ownerDocument.body), n;
945
+ return L(e) === n && (n = n.ownerDocument.body), n;
944
946
  }
945
- function jt(e, t) {
946
- const n = D(e);
947
+ function Zt(e, t) {
948
+ const n = S(e);
947
949
  if (ct(e))
948
950
  return n;
949
- if (!L(e)) {
951
+ if (!F(e)) {
950
952
  let s = H(e);
951
953
  for (; s && !X(s); ) {
952
- if (_(s) && !mt(s))
954
+ if (T(s) && !mt(s))
953
955
  return s;
954
956
  s = H(s);
955
957
  }
956
958
  return n;
957
959
  }
958
- let o = Vt(e, t);
960
+ let o = Qt(e, t);
959
961
  for (; o && ke(o) && mt(o); )
960
- o = Vt(o, t);
961
- return o && X(o) && mt(o) && !vt(o) ? n : o || Ie(e) || n;
962
+ o = Qt(o, t);
963
+ return o && X(o) && mt(o) && !yt(o) ? n : o || Me(e) || n;
962
964
  }
963
- const Ye = async function(e) {
964
- const t = this.getOffsetParent || jt, n = this.getDimensions, o = await n(e.floating);
965
+ const ze = async function(e) {
966
+ const t = this.getOffsetParent || Zt, n = this.getDimensions, o = await n(e.floating);
965
967
  return {
966
- reference: Ke(e.reference, await t(e.floating), e.strategy),
968
+ reference: Xe(e.reference, await t(e.floating), e.strategy),
967
969
  floating: {
968
970
  x: 0,
969
971
  y: 0,
@@ -972,56 +974,56 @@ const Ye = async function(e) {
972
974
  }
973
975
  };
974
976
  };
975
- function Xe(e) {
976
- return T(e).direction === "rtl";
977
- }
978
- const ze = {
979
- convertOffsetParentRelativeRectToViewportRelativeRect: Ve,
980
- getDocumentElement: I,
981
- getClippingRect: Ge,
982
- getOffsetParent: jt,
983
- getElementRects: Ye,
984
- getClientRects: Qe,
985
- getDimensions: Je,
977
+ function je(e) {
978
+ return k(e).direction === "rtl";
979
+ }
980
+ const $e = {
981
+ convertOffsetParentRelativeRectToViewportRelativeRect: Ne,
982
+ getDocumentElement: L,
983
+ getClippingRect: Ke,
984
+ getOffsetParent: Zt,
985
+ getElementRects: ze,
986
+ getClientRects: He,
987
+ getDimensions: Ye,
986
988
  getScale: K,
987
- isElement: _,
988
- isRTL: Xe
989
+ isElement: T,
990
+ isRTL: je
989
991
  };
990
- function $t(e, t) {
992
+ function te(e, t) {
991
993
  return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
992
994
  }
993
- function je(e, t) {
995
+ function Ze(e, t) {
994
996
  let n = null, o;
995
- const s = I(e);
997
+ const s = L(e);
996
998
  function i() {
997
- var r;
998
- clearTimeout(o), (r = n) == null || r.disconnect(), n = null;
999
+ var l;
1000
+ clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
999
1001
  }
1000
- function l(r, a) {
1001
- r === void 0 && (r = !1), a === void 0 && (a = 1), i();
1002
+ function r(l, a) {
1003
+ l === void 0 && (l = !1), a === void 0 && (a = 1), i();
1002
1004
  const c = e.getBoundingClientRect(), {
1003
1005
  left: u,
1004
1006
  top: d,
1005
1007
  width: m,
1006
1008
  height: f
1007
1009
  } = c;
1008
- if (r || t(), !m || !f)
1010
+ if (l || t(), !m || !f)
1009
1011
  return;
1010
- const p = ot(d), h = ot(s.clientWidth - (u + m)), v = ot(s.clientHeight - (d + f)), g = ot(u), A = {
1011
- rootMargin: -p + "px " + -h + "px " + -v + "px " + -g + "px",
1012
+ const p = st(d), h = st(s.clientWidth - (u + m)), y = st(s.clientHeight - (d + f)), g = st(u), A = {
1013
+ rootMargin: -p + "px " + -h + "px " + -y + "px " + -g + "px",
1012
1014
  threshold: R(0, Y(1, a)) || 1
1013
1015
  };
1014
1016
  let b = !0;
1015
- function w(O) {
1016
- const S = O[0].intersectionRatio;
1017
- if (S !== a) {
1017
+ function w(E) {
1018
+ const D = E[0].intersectionRatio;
1019
+ if (D !== a) {
1018
1020
  if (!b)
1019
- return l();
1020
- S ? l(!1, S) : o = setTimeout(() => {
1021
- l(!1, 1e-7);
1021
+ return r();
1022
+ D ? r(!1, D) : o = setTimeout(() => {
1023
+ r(!1, 1e-7);
1022
1024
  }, 1e3);
1023
1025
  }
1024
- S === 1 && !$t(c, e.getBoundingClientRect()) && l(), b = !1;
1026
+ D === 1 && !te(c, e.getBoundingClientRect()) && r(), b = !1;
1025
1027
  }
1026
1028
  try {
1027
1029
  n = new IntersectionObserver(w, {
@@ -1034,58 +1036,58 @@ function je(e, t) {
1034
1036
  }
1035
1037
  n.observe(e);
1036
1038
  }
1037
- return l(!0), i;
1039
+ return r(!0), i;
1038
1040
  }
1039
- function $e(e, t, n, o) {
1041
+ function tn(e, t, n, o) {
1040
1042
  o === void 0 && (o = {});
1041
1043
  const {
1042
1044
  ancestorScroll: s = !0,
1043
1045
  ancestorResize: i = !0,
1044
- elementResize: l = typeof ResizeObserver == "function",
1045
- layoutShift: r = typeof IntersectionObserver == "function",
1046
+ elementResize: r = typeof ResizeObserver == "function",
1047
+ layoutShift: l = typeof IntersectionObserver == "function",
1046
1048
  animationFrame: a = !1
1047
- } = o, c = At(e), u = s || i ? [...c ? Z(c) : [], ...Z(t)] : [];
1049
+ } = o, c = At(e), u = s || i ? [...c ? tt(c) : [], ...tt(t)] : [];
1048
1050
  u.forEach((g) => {
1049
1051
  s && g.addEventListener("scroll", n, {
1050
1052
  passive: !0
1051
1053
  }), i && g.addEventListener("resize", n);
1052
1054
  });
1053
- const d = c && r ? je(c, n) : null;
1055
+ const d = c && l ? Ze(c, n) : null;
1054
1056
  let m = -1, f = null;
1055
- l && (f = new ResizeObserver((g) => {
1056
- let [y] = g;
1057
- y && y.target === c && f && (f.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1057
+ r && (f = new ResizeObserver((g) => {
1058
+ let [v] = g;
1059
+ v && v.target === c && f && (f.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1058
1060
  var A;
1059
1061
  (A = f) == null || A.observe(t);
1060
1062
  })), n();
1061
1063
  }), c && !a && f.observe(c), f.observe(t));
1062
1064
  let p, h = a ? J(e) : null;
1063
- a && v();
1064
- function v() {
1065
+ a && y();
1066
+ function y() {
1065
1067
  const g = J(e);
1066
- h && !$t(h, g) && n(), h = g, p = requestAnimationFrame(v);
1068
+ h && !te(h, g) && n(), h = g, p = requestAnimationFrame(y);
1067
1069
  }
1068
1070
  return n(), () => {
1069
1071
  var g;
1070
- u.forEach((y) => {
1071
- s && y.removeEventListener("scroll", n), i && y.removeEventListener("resize", n);
1072
+ u.forEach((v) => {
1073
+ s && v.removeEventListener("scroll", n), i && v.removeEventListener("resize", n);
1072
1074
  }), d?.(), (g = f) == null || g.disconnect(), f = null, a && cancelAnimationFrame(p);
1073
1075
  };
1074
1076
  }
1075
- const Ze = Re, tn = De, en = xe, nn = Se, on = (e, t, n) => {
1077
+ const en = De, nn = Ee, on = Ce, sn = Oe, rn = (e, t, n) => {
1076
1078
  const o = /* @__PURE__ */ new Map(), s = {
1077
- platform: ze,
1079
+ platform: $e,
1078
1080
  ...n
1079
1081
  }, i = {
1080
1082
  ...s.platform,
1081
1083
  _c: o
1082
1084
  };
1083
- return we(e, t, {
1085
+ return be(e, t, {
1084
1086
  ...s,
1085
1087
  platform: i
1086
1088
  });
1087
1089
  };
1088
- function sn(e, t) {
1090
+ function ln(e, t) {
1089
1091
  const n = C({
1090
1092
  position: "fixed",
1091
1093
  left: "0",
@@ -1095,19 +1097,19 @@ function sn(e, t) {
1095
1097
  });
1096
1098
  let o = null;
1097
1099
  const s = () => {
1098
- !e.value || !t.value || on(e.value, t.value, {
1100
+ !e.value || !t.value || rn(e.value, t.value, {
1099
1101
  placement: "bottom-start",
1100
1102
  strategy: "fixed",
1101
1103
  middleware: [
1102
- Ze(6),
1104
+ en(6),
1103
1105
  // 输入框与下拉列表的间距
1104
- en(),
1106
+ on(),
1105
1107
  // 空间不足自动翻转到上方
1106
- tn({ padding: 10 }),
1108
+ nn({ padding: 10 }),
1107
1109
  // 靠近屏幕边缘时自动位移
1108
- nn({
1109
- apply({ rects: r, elements: a }) {
1110
- const c = `${r.reference.width}px`;
1110
+ sn({
1111
+ apply({ rects: l, elements: a }) {
1112
+ const c = `${l.reference.width}px`;
1111
1113
  Object.assign(a.floating.style, {
1112
1114
  width: c,
1113
1115
  // 必须锁定,否则在 body 下它可能由于内容过多撑开到 100vw
@@ -1117,20 +1119,20 @@ function sn(e, t) {
1117
1119
  }
1118
1120
  })
1119
1121
  ]
1120
- }).then(({ x: r, y: a }) => {
1122
+ }).then(({ x: l, y: a }) => {
1121
1123
  Object.assign(n.value, {
1122
- left: `${r}px`,
1124
+ left: `${l}px`,
1123
1125
  top: `${a}px`
1124
1126
  });
1125
1127
  });
1126
1128
  }, i = () => {
1127
- e.value && t.value && (o = $e(e.value, t.value, s));
1128
- }, l = () => {
1129
+ e.value && t.value && (o = tn(e.value, t.value, s));
1130
+ }, r = () => {
1129
1131
  o && (o(), o = null);
1130
1132
  };
1131
- return Nt(l), { floatingStyles: n, startTrack: i, stopTrack: l };
1133
+ return qt(r), { floatingStyles: n, startTrack: i, stopTrack: r };
1132
1134
  }
1133
- const ln = "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", rn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABFUlEQVR4AaRQO07DQBCdWe8B4B5IFFyAK9ARkIVNhIQEEiVtJLgABRVRvIBCJBquwBVyDgoaSnuHeZY3MlYcNsnIb8fze6M3hra0Xo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mz9h1fo7pOE/gkwmU+v5+fuGot8phJdWmSLLnl+4I0RV/xIFCGxCdU3DUwaOkULX18Uve1ydrC4xdwLcwRR9bnO2kwQIoCIDEowpXjsZ4vBCSyx+w/Nnb1KElkkwG4OqGhG79QUImEkT0T2JrpZ4fV5sF0Ad6je9BrBKxLeZuVv8rS9IAG4qGf5oTPSolNxIXOyUNjqlpb0W4xI+Cd62dVqcAAGBVqSCVmPMIoPCttzm2MEBAoeLir4hRK2AWPyVIAHRHMH0Ly0tCBF3M5t+Aq6A0HPJSSyCeZAIz7BNAgQwqxNyc1NL7MCoeyH1xNWpuKsTcet7fv46QI0/zdoEtkmAwHGcHyFQj/Q57vuPzm7m+X5efB6HYj3kOCubuLVlApltfdbPX5uaetCmdeKVAqUN1mdy04XR3PTsqAHPWMztTb24myvEBBuRM+WlUnbzDEXeya2D4XC0zrJqnXwsO3pG3mCMGWMK6lQZk2A0hH2GMSxL9VlI6lVkd90RgGKkVFrrc+9REXubjLH9FxfbbVUVGG5v4i2p8LD8x9ax65C66KTfKGCSDc97fv6DJzuf9QtDtm+iqsM1ot70w9O+YDbmSQ6bkkyCJitnAUcnryqmuExgSsZYKypvgFvS+5xVsJk0MGlps97mFCVXpnNZqoBcbo2QyJz7dCLj6JTj6tRxVyf3izZUtNndwM73SU55JzaO4Q8AAAD//54At5MAAAAGSURBVAMAh2IbMAJQAZQAAAAASUVORK5CYII=", dn = oe({
1135
+ const an = "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", cn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABFUlEQVR4AaRQO07DQBCdWe8B4B5IFFyAK9ARkIVNhIQEEiVtJLgABRVRvIBCJBquwBVyDgoaSnuHeZY3MlYcNsnIb8fze6M3hra0XoKJm95N3Nv3EnyhFvb2EgjRJbOMKqmO2tDcvQ5fK+qvl4CJbOn9/CJPP9tArp5sHtP4lc652VXxPL1Z1hRFIOytF1NuTJCfnT4Ms8HjSgJctn1xIt6hxqIkdK+u8U8zT1ESmP5enUkWmqMkhG2FmxXOvR+EGD5KAhoDqsQvtiMXJQGNQJ4N8mF6PMd/wL8SxuOXPSG21pj9p+L1EOjGyAHoQQ0zWGDqx9pbPWIpwqOEkw+gGyMHoAc1ozOkVhOcZyepYndNpDpPvwAAAP//BVQJHAAAAAZJREFUAwDZWL4hub5xHQAAAABJRU5ErkJggg==", un = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACC0lEQVR4AXxRv2tTURT+zk1iIjgoOMShkIJVNwf/gQYULOjQwaGvGl8TBMEMDg4ODgF17likvL4HIYm4OLg61K2CooWKDoKCDoJDHASb9N17POf5Enwk6eN+9/z+3nfvNZjxbYS9ymbYXlQ8CbvnZrRhKoEOFMl9zFHuuaJA/E4Jp5FMJTCwZWner/veCYX6ecQVsRNrKsFE1yGJDMFW1Hm4FXX7hnIvADquvkJ9zYn/U3vw35chYOA2Ebcc26uWbVWwnKKqOak9ktmmYLwyBATkY+d2b63d2FYgps9umNtTX6G18WTqmNRmTNB+djaIOqEpmC+FIn8Lom4vaD89n2lKgwkCebYNsvEnAlXI4CIMXSagTNa9l9p6Ojc2CUEYhiW5oE3IxQH4AYNFeb5qvea9SuB7Vc1J7ReDjomidZ2RWNKysyneFHNFovGgxIiizoWR9BGRqiKw76i0qj2JAo7jtwycJDvY1eQIDNM0l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TkSuQmCC", mn = "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=", pn = ie({
1134
1136
  name: "GlobalSearch",
1135
1137
  model: { prop: "value", event: "input" },
1136
1138
  props: {
@@ -1141,23 +1143,27 @@ const ln = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
1141
1143
  type: Array,
1142
1144
  default: () => ["City", "Seaport", "Airport", "Country"]
1143
1145
  },
1144
- historyKey: { type: String, default: "" }
1146
+ historyKey: { type: String, default: "" },
1147
+ lang: { type: String, default: "" },
1148
+ placeholder: { type: String, default: "" },
1149
+ showSearchIcon: { type: Boolean, default: !0 },
1150
+ showItemTag: { type: Boolean, default: !0 }
1145
1151
  },
1146
1152
  setup(e, { emit: t }) {
1147
- const n = C(""), o = C(!1), s = C(!1), i = C(""), l = C(null), r = C(null), a = C(null), c = C(null), { searchHistory: u, saveToHistory: d, clearHistory: m } = ie(
1153
+ const n = C(""), o = C(!1), s = C(!1), i = C(""), r = C(null), l = C(null), a = C(null), c = C(null), { searchHistory: u, saveToHistory: d, clearHistory: m } = le(
1148
1154
  xt(e, "historyKey")
1149
1155
  ), {
1150
1156
  searchResults: f,
1151
1157
  loading: p,
1152
1158
  isFetchingMore: h,
1153
- isFinished: v,
1159
+ isFinished: y,
1154
1160
  currentPage: g,
1155
- fetchData: y,
1161
+ fetchData: v,
1156
1162
  filterByTypes: A
1157
- } = ae(n, xt(e, "searchTypeList")), { floatingStyles: b, startTrack: w, stopTrack: O } = sn(
1163
+ } = ue(n, xt(e, "searchTypeList")), { floatingStyles: b, startTrack: w, stopTrack: E } = ln(
1158
1164
  a,
1159
1165
  c
1160
- ), S = async () => {
1166
+ ), D = async () => {
1161
1167
  if (s.value = !0, console.log(
1162
1168
  "🍉 ~ index.vue:210 ~ onFocus ~ searchResults.value:",
1163
1169
  f.value,
@@ -1167,7 +1173,7 @@ const ln = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
1167
1173
  if (console.log("🍉 ~ index.vue:221 ~ onFocus ~ val:", x), x?.id) {
1168
1174
  p.value = !0;
1169
1175
  try {
1170
- const P = await re(x.id, x.type);
1176
+ const P = await ce(x.id, x.type);
1171
1177
  f.value = A(P.records);
1172
1178
  } finally {
1173
1179
  p.value = !1;
@@ -1180,25 +1186,25 @@ const ln = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
1180
1186
  }, 200);
1181
1187
  }, M = (x) => {
1182
1188
  x.target.value === "" && !e.multiple && (o.value = !1, t("input", null), t("update:value", null));
1183
- }, E = () => {
1189
+ }, O = () => {
1184
1190
  if (e.multiple && !n.value && e.value?.length > 0) {
1185
1191
  const x = [...e.value], P = x.pop();
1186
1192
  t("input", x), t("update:value", x), t("remove", P);
1187
1193
  }
1188
1194
  };
1189
- return bt(s, (x) => x ? w() : O()), bt(n, (x) => {
1195
+ return bt(s, (x) => x ? w() : E()), bt(n, (x) => {
1190
1196
  if (!x.trim()) {
1191
1197
  f.value = [];
1192
1198
  return;
1193
1199
  }
1194
- l.value && clearTimeout(l.value), l.value = setTimeout(() => y(1, !1), 300);
1195
- }), Nt(O), {
1200
+ r.value && clearTimeout(r.value), r.value = setTimeout(() => v(1, !1), 300);
1201
+ }), qt(E), {
1196
1202
  // 状态
1197
1203
  query: n,
1198
1204
  isSelected: o,
1199
1205
  isDropdownVisible: s,
1200
1206
  selectedLabel: i,
1201
- inputRef: r,
1207
+ inputRef: l,
1202
1208
  referenceRef: a,
1203
1209
  floatingRef: c,
1204
1210
  // Hook 状态
@@ -1206,27 +1212,29 @@ const ln = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
1206
1212
  searchResults: f,
1207
1213
  loading: p,
1208
1214
  isFetchingMore: h,
1209
- isFinished: v,
1215
+ isFinished: y,
1210
1216
  currentPage: g,
1211
1217
  floatingStyles: b,
1212
1218
  // Hook 方法
1213
1219
  saveToHistory: d,
1214
1220
  clearHistory: m,
1215
- fetchData: y,
1221
+ fetchData: v,
1216
1222
  filterByTypes: A,
1217
1223
  startTrack: w,
1218
- stopTrack: O,
1224
+ stopTrack: E,
1219
1225
  // 组件方法
1220
- onFocus: S,
1226
+ onFocus: D,
1221
1227
  handleBlur: B,
1222
1228
  onInput: M,
1223
- handleDelete: E,
1229
+ handleDelete: O,
1224
1230
  // 资源
1225
- SearchIcon: ln
1231
+ SearchIcon: an
1226
1232
  };
1227
1233
  },
1228
1234
  computed: {
1229
1235
  isEn() {
1236
+ if (this.lang !== "")
1237
+ return this.lang === "en" || this.lang === "en-US";
1230
1238
  let e = "";
1231
1239
  try {
1232
1240
  if (typeof useCookie == "function") {
@@ -1235,7 +1243,7 @@ const ln = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
1235
1243
  }
1236
1244
  } catch {
1237
1245
  }
1238
- return process.client ? e = document.cookie || "" : process.server && (e = useNuxtApp?.()?.ssrContext?.event.node.req.headers.cookie || ""), /jc-language=en-US/.test(e) || /jc-language=en/.test(e);
1246
+ return typeof process < "u" && process.client ? e = document.cookie || "" : typeof process < "u" && process.server && (e = useNuxtApp?.()?.ssrContext?.event.node.req.headers.cookie || ""), /jc-language=en-US/.test(e) || /jc-language=en/.test(e);
1239
1247
  },
1240
1248
  selectedItems() {
1241
1249
  return this.value ? Array.isArray(this.value) ? this.value : [this.value] : [];
@@ -1250,7 +1258,7 @@ const ln = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
1250
1258
  return this.multiple ? this.query ? `${this.query.length * 10 + 20}px` : "10px" : "100%";
1251
1259
  },
1252
1260
  currentPlaceholder() {
1253
- return this.multiple && this.selectedItems.length > 0 ? "" : this.isSelected && !this.multiple ? this.selectedLabel : this.isEn ? "Please enter..." : "请输入...";
1261
+ return this.multiple && this.selectedItems.length > 0 ? "" : this.isSelected && !this.multiple ? this.selectedLabel : this.placeholder || this.isEn ? "Please enter..." : "请输入...";
1254
1262
  }
1255
1263
  },
1256
1264
  methods: {
@@ -1258,7 +1266,32 @@ const ln = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
1258
1266
  this.$refs.inputRef?.focus();
1259
1267
  },
1260
1268
  getItemLabel(e) {
1261
- return e.display || e.nameEn || e.nameCn || "";
1269
+ return this.isEn ? e.displayEn || e.display || "" : e.displayCn || e.display || "";
1270
+ },
1271
+ getItemType(e) {
1272
+ const t = {
1273
+ City: {
1274
+ en: "City",
1275
+ cn: "城市"
1276
+ },
1277
+ Country: {
1278
+ en: "Country",
1279
+ cn: "国家"
1280
+ },
1281
+ Region: {
1282
+ en: "Region",
1283
+ cn: "区域"
1284
+ },
1285
+ Airport: {
1286
+ en: "Airport",
1287
+ cn: "机场"
1288
+ },
1289
+ Seaport: {
1290
+ en: "Seaport",
1291
+ cn: "港口"
1292
+ }
1293
+ };
1294
+ return this.isEn ? t[e].en : t[e].cn;
1262
1295
  },
1263
1296
  isItemActive(e) {
1264
1297
  return this.selectedItems.some((t) => t.id === e.id);
@@ -1274,16 +1307,16 @@ const ln = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
1274
1307
  this.query = "", this.isSelected = !1, this.selectedLabel = "", this.$emit("input", this.multiple ? [] : null), this.$emit("update:value", this.multiple ? [] : null);
1275
1308
  },
1276
1309
  handleSearch() {
1277
- const e = this.multiple ? this.selectedItems : this.isSelected ? this.value : { nameCn: this.query, type: "Manual" };
1310
+ const e = this.multiple ? this.selectedItems : this.isSelected ? this.value : null;
1278
1311
  this.$emit("submit-search", e), this.isDropdownVisible = !1;
1279
1312
  },
1280
1313
  getIconUrl(e) {
1281
1314
  return {
1282
- City: rn,
1283
- Seaport: an,
1284
- Airport: cn,
1285
- Country: un
1286
- }[e] || fn;
1315
+ City: cn,
1316
+ Seaport: un,
1317
+ Airport: fn,
1318
+ Country: dn
1319
+ }[e] || mn;
1287
1320
  },
1288
1321
  handleScroll(e) {
1289
1322
  const { scrollTop: t, scrollHeight: n, clientHeight: o } = e.target;
@@ -1291,14 +1324,14 @@ const ln = "data:image/svg+xml,%3csvg%20t='1695277594902'%20fill='%23fff'%20clas
1291
1324
  }
1292
1325
  }
1293
1326
  });
1294
- function wt(e, t, n, o, s, i, l, r) {
1327
+ function wt(e, t, n, o, s, i, r, l) {
1295
1328
  var a = typeof e == "function" ? e.options : e;
1296
1329
  return t && (a.render = t, a.staticRenderFns = n, a._compiled = !0), i && (a._scopeId = "data-v-" + i), {
1297
1330
  exports: e,
1298
1331
  options: a
1299
1332
  };
1300
1333
  }
1301
- var mn = function() {
1334
+ var hn = function() {
1302
1335
  var t = this, n = t._self._c;
1303
1336
  return t._self._setupProxy, n("div", { staticClass: "search-container" }, [n("div", { ref: "referenceRef", staticClass: "search-input-wrapper", class: { "is-multiple": t.multiple }, on: { click: t.focusInput } }, [n("div", { staticClass: "selection-wrapper" }, [t.multiple && t.selectedItems.length > 0 ? [t._l(t.displayedTags, function(o, s) {
1304
1337
  return n("div", { key: o.id || s, staticClass: "search-tag" }, [n("span", { staticClass: "tag-text" }, [t._v(t._s(t.getItemLabel(o)))]), n("span", { staticClass: "tag-close", on: { click: function(i) {
@@ -1312,7 +1345,9 @@ var mn = function() {
1312
1345
  o.preventDefault();
1313
1346
  }, click: function(o) {
1314
1347
  return o.stopPropagation(), t.clearAll.apply(null, arguments);
1315
- } } }, [t._v("ⓧ")]) : t._e(), t.loading && !t.isFetchingMore ? n("div", { staticClass: "loading-spinner" }) : n("button", { staticClass: "search-btn", on: { click: t.handleSearch } }, [n("span", { staticClass: "search-icon" }, [n("img", { attrs: { src: t.SearchIcon, alt: "search" } })])])])]), n("div", { directives: [{ name: "show", rawName: "v-show", value: t.isDropdownVisible && (t.searchResults.length > 0 || t.loading || t.query || t.searchHistory.length > 0), expression: `
1348
+ } } }, [t._v("ⓧ")]) : t._e(), t.loading && !t.isFetchingMore ? n("div", { staticClass: "loading-spinner" }) : !t.loading && t.showSearchIcon ? n("button", { staticClass: "search-btn", on: { click: function(o) {
1349
+ return o.stopPropagation(), t.handleSearch.apply(null, arguments);
1350
+ } } }, [n("span", { staticClass: "search-icon" }, [n("img", { attrs: { src: t.SearchIcon, alt: "search" } })])]) : t._e()])]), n("div", { directives: [{ name: "show", rawName: "v-show", value: t.isDropdownVisible && (t.searchResults.length > 0 || t.loading || t.query || t.searchHistory.length > 0), expression: `
1316
1351
  isDropdownVisible &&
1317
1352
  (searchResults.length > 0 ||
1318
1353
  loading ||
@@ -1326,83 +1361,106 @@ var mn = function() {
1326
1361
  } } }, [t._v(" " + t._s(t.isEn ? "Clear" : "清空") + " ")])]), t._l(t.searchHistory, function(o, s) {
1327
1362
  return n("div", { key: "hist-" + s, staticClass: "dropdown-item", on: { mousedown: function(i) {
1328
1363
  return t.selectItem(o);
1329
- } } }, [n("div", { staticClass: "category-tag" }, [n("img", { staticClass: "type-icon", attrs: { src: t.getIconUrl(o.type), alt: "" } }), n("span", { staticClass: "type-text" }, [t._v(t._s(o.type))])]), n("div", { staticClass: "result-text" }, [t._v(t._s(t.getItemLabel(o)))])]);
1364
+ } } }, [n("div", { staticClass: "category-tag", style: t.showItemTag ? {} : { display: "none" } }, [n("img", { staticClass: "type-icon", attrs: { src: t.getIconUrl(o.type), alt: "" } }), n("span", { staticClass: "type-text" }, [t._v(t._s(t.getItemType(o.type)))])]), n("div", { staticClass: "result-text" }, [t._v(t._s(t.getItemLabel(o)))])]);
1330
1365
  }), n("hr", { staticClass: "divider" })], 2) : t._e()];
1331
1366
  }, { searchHistory: t.searchHistory }), t.loading && !t.isFetchingMore ? n("div", { staticClass: "status-msg" }, [t._v(" " + t._s(t.isEn ? "Searching..." : "正在搜索中...") + " ")]) : t.searchResults.length > 0 ? [t._t("results", function() {
1332
1367
  return t._l(t.searchResults, function(o, s) {
1333
1368
  return n("div", { key: s, staticClass: "dropdown-item", class: { "is-active": t.isItemActive(o) }, on: { mousedown: function(i) {
1334
1369
  return t.selectItem(o);
1335
- } } }, [n("div", { staticClass: "category-tag" }, [n("img", { staticClass: "type-icon", attrs: { src: t.getIconUrl(o.type), alt: "" } }), n("span", { staticClass: "type-text" }, [t._v(t._s(o.type))])]), n("div", { staticClass: "result-text" }, [t._v(t._s(t.getItemLabel(o)))])]);
1370
+ } } }, [n("div", { staticClass: "category-tag", style: t.showItemTag ? {} : { display: "none" } }, [n("img", { staticClass: "type-icon", attrs: { src: t.getIconUrl(o.type), alt: "" } }), n("span", { staticClass: "type-text" }, [t._v(t._s(t.getItemType(o.type)))])]), n("div", { staticClass: "result-text" }, [t._v(t._s(t.getItemLabel(o)))])]);
1336
1371
  });
1337
1372
  }, { searchResults: t.searchResults }), t.isFetchingMore ? n("div", { staticClass: "load-more-msg" }, [t._v(" " + t._s(t.isEn ? "Loading more..." : "正在加载更多...") + " ")]) : t.isFinished && t.query ? n("div", { staticClass: "load-more-msg no-more" }, [t._v(" " + t._s(t.isEn ? "All results have been loaded" : "已加载全部结果") + " ")]) : t._e()] : t.query && !t.loading ? n("div", { staticClass: "status-msg" }, [t._t("noData", function() {
1338
1373
  return [t._v(" " + t._s(t.isEn ? `No results found related to "${t.query}".` : `未找到与 "${t.query}" 相关的结果`) + " ")];
1339
1374
  })], 2) : t._e()], 2)]);
1340
- }, pn = [], hn = /* @__PURE__ */ wt(
1341
- dn,
1342
- mn,
1375
+ }, gn = [], yn = /* @__PURE__ */ wt(
1343
1376
  pn,
1377
+ hn,
1378
+ gn,
1344
1379
  !1,
1345
1380
  null,
1346
- "0a22c96d"
1381
+ "fbdd60f5"
1347
1382
  );
1348
- const Zt = hn.exports, gn = {
1383
+ const ee = yn.exports, vn = {
1349
1384
  __name: "ApplyDataDialog",
1350
1385
  props: {
1351
- value: Boolean
1352
- // Vue 2.7 v-model 绑定
1386
+ // v-model 绑定,默认 false
1387
+ value: {
1388
+ type: Boolean,
1389
+ default: !1
1390
+ },
1391
+ // 语言设置,默认 'en'
1392
+ lang: {
1393
+ type: String,
1394
+ default: "en",
1395
+ // 增加校验,确保只能传入 'en' 或 'cn'
1396
+ validator: (e) => ["en", "cn"].includes(e)
1397
+ },
1398
+ placeholder: {
1399
+ type: String,
1400
+ default: ""
1401
+ }
1353
1402
  },
1354
1403
  emits: ["update:value", "confirm"],
1355
1404
  setup(e, { emit: t }) {
1356
- const n = e, o = ["City", "Port", "Airport"], s = C(null), i = se({
1405
+ const n = e, o = [
1406
+ { typeCn: "城市", typeEn: "City", type: "City" },
1407
+ { typeCn: "海运港口", typeEn: "Port", type: "Seaport" },
1408
+ { typeCn: "机场", typeEn: "Airport", type: "Airport" }
1409
+ ], s = C(null), i = Ct({
1357
1410
  name: "",
1358
- type: "City",
1359
- selectedCountry: null
1360
- });
1361
- return { __sfc: !0, props: n, emit: t, typeOptions: o, displayQuery: s, formData: i, handleClose: () => {
1362
- t("update:value", !1);
1411
+ country: ""
1412
+ }), r = Ct({
1413
+ name: "",
1414
+ type: "City"
1415
+ }), l = Z(() => n.lang === "en" || n.lang === "en-US");
1416
+ return { __sfc: !0, props: n, emit: t, typeOptions: o, displayQuery: s, errors: i, formData: r, isEn: l, handleClose: () => {
1417
+ i.name = "", i.country = "", t("update:value", !1);
1363
1418
  }, handleConfirm: () => {
1364
- if (!i.name || !s.value) {
1365
- alert("Please fill in all fields");
1366
- return;
1367
- }
1368
- t("confirm", { ...i, selectedCountry: s.value });
1369
- }, Search: Zt };
1419
+ i.name = "", i.country = "";
1420
+ let u = !0;
1421
+ r.name.trim() || (i.name = "Data name is required", u = !1), s.value || (i.country = "Please select a country", u = !1), u && (console.log("🍉 ~ ApplyDataDialog.vue:115 ~ handleConfirm ~ data:", {
1422
+ ...r,
1423
+ country: s.value
1424
+ }), t("confirm", { ...r, country: s.value }));
1425
+ }, Search: ee };
1370
1426
  }
1371
1427
  };
1372
- var vn = function() {
1428
+ var An = function() {
1373
1429
  var t = this, n = t._self._c, o = t._self._setupProxy;
1374
1430
  return t.value ? n("div", { staticClass: "modal-mask", on: { click: function(s) {
1375
1431
  return s.target !== s.currentTarget ? null : o.handleClose.apply(null, arguments);
1376
- } } }, [n("div", { staticClass: "modal-container" }, [n("div", { staticClass: "modal-header" }, [n("span", { staticClass: "header-title" }, [t._v("Apply for data addition")]), n("div", { staticClass: "close-btn", on: { click: o.handleClose } }, [t._v("×")])]), n("div", { staticClass: "modal-body" }, [n("div", { staticClass: "form-item" }, [n("label", { staticClass: "required" }, [t._v("Data To Add")]), n("div", { staticClass: "input-box" }, [n("input", { directives: [{ name: "model", rawName: "v-model", value: o.formData.name, expression: "formData.name" }], staticClass: "custom-input", attrs: { type: "text", placeholder: "Please enter your data" }, domProps: { value: o.formData.name }, on: { input: function(s) {
1432
+ } } }, [n("div", { staticClass: "modal-container" }, [n("div", { staticClass: "modal-header" }, [n("span", { staticClass: "header-title" }, [t._v(t._s(o.isEn ? "Apply for data addition" : "申请补充数据"))]), n("div", { staticClass: "close-btn", on: { click: o.handleClose } }, [t._v("×")])]), n("div", { staticClass: "modal-body" }, [n("div", { staticClass: "form-item" }, [n("label", { staticClass: "required" }, [t._v(t._s(o.isEn ? "Data To Add" : "需补充的数据"))]), n("div", { staticClass: "input-box" }, [n("input", { directives: [{ name: "model", rawName: "v-model", value: o.formData.name, expression: "formData.name" }], class: ["custom-input", { "input-error": o.errors.name }], attrs: { type: "text", placeholder: t.placeholder ?? (o.isEn ? " Please enter" : "请输入") }, domProps: { value: o.formData.name }, on: { input: [function(s) {
1377
1433
  s.target.composing || t.$set(o.formData, "name", s.target.value);
1378
- } } })])]), n("div", { staticClass: "form-item" }, [n("label", { staticClass: "required" }, [t._v("Type")]), n("div", { staticClass: "type-group" }, t._l(o.typeOptions, function(s) {
1379
- return n("div", { key: s, class: ["type-btn", { active: o.formData.type === s }], on: { click: function(i) {
1380
- o.formData.type = s;
1381
- } } }, [t._v(" " + t._s(s) + " "), o.formData.type === s ? n("div", { staticClass: "check-mark" }) : t._e()]);
1382
- }), 0)]), n("div", { staticClass: "form-item" }, [n("label", { staticClass: "required" }, [t._v("Country")]), n(o.Search, { style: {
1383
- margin: "0 auto"
1384
- }, attrs: { "search-type-list": ["Country"] }, model: { value: o.displayQuery, callback: function(s) {
1434
+ }, function(s) {
1435
+ o.errors.name = "";
1436
+ }] } })]), o.errors.name ? n("div", { staticClass: "error-message" }, [t._v(t._s(o.errors.name))]) : t._e()]), n("div", { staticClass: "form-item" }, [n("label", { staticClass: "required" }, [t._v(t._s(o.isEn ? "Type" : "所属类别"))]), n("div", { staticClass: "type-group" }, t._l(o.typeOptions, function(s) {
1437
+ return n("div", { key: s.type, class: ["type-btn", { active: o.formData.type === s.type }], on: { click: function(i) {
1438
+ o.formData.type = s.type;
1439
+ } } }, [t._v(" " + t._s(o.isEn ? s.typeEn : s.typeCn) + " "), o.formData.type === s.type ? n("div", { staticClass: "check-mark" }) : t._e()]);
1440
+ }), 0)]), n("div", { staticClass: "form-item" }, [n("label", { staticClass: "required" }, [t._v(t._s(o.isEn ? "Country" : "国家"))]), n("div", { class: { "search-error-wrap": o.errors.country } }, [n(o.Search, { style: { margin: "0 auto" }, attrs: { "search-type-list": ["Country"], lang: t.lang, placeholder: t.placeholder ?? (o.isEn ? " Please enter" : "请输入") }, on: { "update:model-value": function(s) {
1441
+ o.errors.country = "";
1442
+ } }, model: { value: o.displayQuery, callback: function(s) {
1385
1443
  o.displayQuery = s;
1386
- }, expression: "displayQuery" } })], 1)]), n("div", { staticClass: "modal-footer" }, [n("button", { staticClass: "confirm-btn", on: { click: o.handleConfirm } }, [t._v("Confirm")])])])]) : t._e();
1387
- }, yn = [], An = /* @__PURE__ */ wt(
1388
- gn,
1444
+ }, expression: "displayQuery" } })], 1), o.errors.country ? n("div", { staticClass: "error-message" }, [t._v(" " + t._s(o.errors.country) + " ")]) : t._e()])]), n("div", { staticClass: "modal-footer" }, [n("button", { staticClass: "confirm-btn", on: { click: o.handleConfirm } }, [t._v(" " + t._s(o.isEn ? "Submit" : "申请补充") + " ")])])])]) : t._e();
1445
+ }, wn = [], xn = /* @__PURE__ */ wt(
1389
1446
  vn,
1390
- yn,
1447
+ An,
1448
+ wn,
1391
1449
  !1,
1392
1450
  null,
1393
- "55057429"
1451
+ "3ca839c7"
1394
1452
  );
1395
- const wn = An.exports, xn = {
1453
+ const bn = xn.exports, Cn = {
1396
1454
  // 2. 局部注册组件
1397
1455
  components: {
1398
- [_t.name]: _t,
1399
1456
  [kt.name]: kt,
1400
- [Et.name]: Et,
1457
+ [Tt.name]: Tt,
1458
+ [_t.name]: _t,
1401
1459
  [Ot.name]: Ot,
1402
- [St.name]: St,
1460
+ [Et.name]: Et,
1403
1461
  [Dt.name]: Dt,
1404
- [Rt.name]: Rt,
1405
- [Ct.name]: Ct
1462
+ [St.name]: St,
1463
+ [Rt.name]: Rt
1406
1464
  },
1407
1465
  data() {
1408
1466
  return {
@@ -1460,7 +1518,7 @@ const wn = An.exports, xn = {
1460
1518
  }
1461
1519
  }
1462
1520
  };
1463
- var bn = function() {
1521
+ var Rn = function() {
1464
1522
  var t = this, n = t._self._c;
1465
1523
  return n("el-dialog", { attrs: { visible: t.isVisible, "before-close": t.closeModal, "show-close": !1, "close-on-click-modal": !0, width: "500px", "custom-class": "global-modal-custom" }, on: { "update:visible": function(o) {
1466
1524
  t.isVisible = o;
@@ -1479,16 +1537,16 @@ var bn = function() {
1479
1537
  }, expression: "formData.name" } })], 1)], 1)], 1), n("el-form-item", { staticClass: "agreement-item", attrs: { prop: "agreement" } }, [n("el-checkbox", { model: { value: t.formData.agreement, callback: function(o) {
1480
1538
  t.$set(t.formData, "agreement", o);
1481
1539
  }, expression: "formData.agreement" } }, [t._v("我同意")]), n("a", { staticClass: "privacy-link", attrs: { href: "#" } }, [t._v("隐私政策")])], 1)], 1)], 1), n("div", { staticClass: "global-modal-footer-custom", attrs: { slot: "footer" }, slot: "footer" }, [n("el-button", { staticClass: "submit-button-custom", attrs: { type: "primary" }, on: { click: t.handleSubmit } }, [t._v(" 加入会员 ")])], 1)]);
1482
- }, Cn = [], Rn = /* @__PURE__ */ wt(
1483
- xn,
1484
- bn,
1540
+ }, Sn = [], Dn = /* @__PURE__ */ wt(
1485
1541
  Cn,
1542
+ Rn,
1543
+ Sn,
1486
1544
  !1,
1487
1545
  null,
1488
1546
  null
1489
1547
  );
1490
- const Dn = Rn.exports;
1491
- let Sn = {
1548
+ const En = Dn.exports;
1549
+ let On = {
1492
1550
  open() {
1493
1551
  W.emit(G.Open);
1494
1552
  },
@@ -1499,40 +1557,42 @@ let Sn = {
1499
1557
  W.on(G.Submit, e);
1500
1558
  }
1501
1559
  };
1502
- function _n() {
1560
+ function In() {
1503
1561
  let e = !1;
1504
1562
  return {
1505
1563
  install(t) {
1506
1564
  if (typeof window < "u" && !e) {
1507
1565
  const n = document.createElement("div");
1508
1566
  n.setAttribute("id", "global-modal-root"), document.body.appendChild(n);
1509
- const o = t.extend(Dn);
1567
+ const o = t.extend(En);
1510
1568
  new o().$mount(n), e = !0;
1511
1569
  }
1512
- t.prototype.$globalModal = Sn;
1570
+ t.prototype.$globalModal = On;
1513
1571
  }
1514
1572
  };
1515
1573
  }
1516
- const Qt = {
1517
- ApplyDataDialog: wn,
1518
- JcSearch: Zt
1519
- }, Tn = {
1574
+ const Nt = {
1575
+ ApplyDataDialog: bn,
1576
+ JcSearch: ee
1577
+ };
1578
+ let Ht = !1;
1579
+ const Fn = {
1520
1580
  /**
1521
1581
  * Vue 2 插件安装方法
1522
1582
  * @param Vue Vue 的构造函数
1523
1583
  */
1524
- install(e) {
1525
- Object.keys(Qt).forEach((t) => {
1526
- e.component(t, Qt[t]);
1527
- });
1584
+ install(e, t) {
1585
+ Ht || (Ht = !0, t?.sharedConfig && re(t.sharedConfig), Object.keys(Nt).forEach((n) => {
1586
+ e.component(n, Nt[n]);
1587
+ }));
1528
1588
  }
1529
1589
  };
1530
1590
  export {
1531
- wn as ApplyDataDialog,
1532
- Dn as GlobalModal,
1533
- Zt as JcSearch,
1534
- In as MODAL_ACTION,
1535
- _n as createGlobalModalPlugin,
1536
- Tn as default,
1537
- Bn as emitter
1591
+ bn as ApplyDataDialog,
1592
+ En as GlobalModal,
1593
+ ee as JcSearch,
1594
+ Mn as MODAL_ACTION,
1595
+ In as createGlobalModalPlugin,
1596
+ Fn as default,
1597
+ Pn as emitter
1538
1598
  };