@xlui/xux-ui 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,41 +1,41 @@
1
- import { defineComponent as V, h as Ce, ref as $, computed as X, createElementBlock as v, openBlock as u, normalizeClass as B, createCommentVNode as A, createElementVNode as y, Fragment as z, renderList as D, normalizeStyle as G, createVNode as R, unref as W, renderSlot as Q, onMounted as se, toDisplayString as T, withModifiers as H, withCtx as Z, createBlock as re, nextTick as _, onUnmounted as Ve, readonly as Se, withKeys as O, createTextVNode as ze, Transition as pe, withDirectives as Qe, vModelText as Ze, watch as J, Teleport as Je } from "vue";
2
- const Fe = /^[a-z0-9]+(-[a-z0-9]+)*$/, ce = (e, o, a, n = "") => {
3
- const t = e.split(":");
1
+ import { defineComponent as V, h as xe, ref as B, computed as L, createElementBlock as v, openBlock as m, normalizeClass as $, createCommentVNode as A, createElementVNode as y, Fragment as z, renderList as D, normalizeStyle as G, createVNode as R, unref as W, renderSlot as K, onMounted as se, toDisplayString as I, withModifiers as q, withCtx as Z, createBlock as fe, nextTick as N, onUnmounted as Ve, readonly as Se, withKeys as O, createTextVNode as be, Transition as pe, withDirectives as Qe, vModelText as Ze, watch as J, Teleport as Je } from "vue";
2
+ const Fe = /^[a-z0-9]+(-[a-z0-9]+)*$/, ce = (e, o, a, t = "") => {
3
+ const n = e.split(":");
4
4
  if (e.slice(0, 1) === "@") {
5
- if (t.length < 2 || t.length > 3)
5
+ if (n.length < 2 || n.length > 3)
6
6
  return null;
7
- n = t.shift().slice(1);
7
+ t = n.shift().slice(1);
8
8
  }
9
- if (t.length > 3 || !t.length)
9
+ if (n.length > 3 || !n.length)
10
10
  return null;
11
- if (t.length > 1) {
12
- const g = t.pop(), h = t.pop(), c = {
11
+ if (n.length > 1) {
12
+ const i = n.pop(), r = n.pop(), c = {
13
13
  // Allow provider without '@': "provider:prefix:name"
14
- provider: t.length > 0 ? t[0] : n,
15
- prefix: h,
16
- name: g
14
+ provider: n.length > 0 ? n[0] : t,
15
+ prefix: r,
16
+ name: i
17
17
  };
18
- return o && !te(c) ? null : c;
18
+ return o && !ne(c) ? null : c;
19
19
  }
20
- const l = t[0], s = l.split("-");
20
+ const l = n[0], s = l.split("-");
21
21
  if (s.length > 1) {
22
- const g = {
23
- provider: n,
22
+ const i = {
23
+ provider: t,
24
24
  prefix: s.shift(),
25
25
  name: s.join("-")
26
26
  };
27
- return o && !te(g) ? null : g;
27
+ return o && !ne(i) ? null : i;
28
28
  }
29
- if (a && n === "") {
30
- const g = {
31
- provider: n,
29
+ if (a && t === "") {
30
+ const i = {
31
+ provider: t,
32
32
  prefix: "",
33
33
  name: l
34
34
  };
35
- return o && !te(g, a) ? null : g;
35
+ return o && !ne(i, a) ? null : i;
36
36
  }
37
37
  return null;
38
- }, te = (e, o) => e ? !!// Check prefix: cannot be empty, unless allowSimpleName is enabled
38
+ }, ne = (e, o) => e ? !!// Check prefix: cannot be empty, unless allowSimpleName is enabled
39
39
  // Check name: cannot be empty
40
40
  ((o && e.prefix === "" || e.prefix) && e.name) : !1, Oe = Object.freeze(
41
41
  {
@@ -56,58 +56,58 @@ const Fe = /^[a-z0-9]+(-[a-z0-9]+)*$/, ce = (e, o, a, n = "") => {
56
56
  body: "",
57
57
  hidden: !1
58
58
  });
59
- function en(e, o) {
59
+ function et(e, o) {
60
60
  const a = {};
61
61
  !e.hFlip != !o.hFlip && (a.hFlip = !0), !e.vFlip != !o.vFlip && (a.vFlip = !0);
62
- const n = ((e.rotate || 0) + (o.rotate || 0)) % 4;
63
- return n && (a.rotate = n), a;
62
+ const t = ((e.rotate || 0) + (o.rotate || 0)) % 4;
63
+ return t && (a.rotate = t), a;
64
64
  }
65
- function xe(e, o) {
66
- const a = en(e, o);
67
- for (const n in he)
68
- n in le ? n in e && !(n in a) && (a[n] = le[n]) : n in o ? a[n] = o[n] : n in e && (a[n] = e[n]);
65
+ function Ee(e, o) {
66
+ const a = et(e, o);
67
+ for (const t in he)
68
+ t in le ? t in e && !(t in a) && (a[t] = le[t]) : t in o ? a[t] = o[t] : t in e && (a[t] = e[t]);
69
69
  return a;
70
70
  }
71
- function nn(e, o) {
72
- const a = e.icons, n = e.aliases || /* @__PURE__ */ Object.create(null), t = /* @__PURE__ */ Object.create(null);
71
+ function tt(e, o) {
72
+ const a = e.icons, t = e.aliases || /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null);
73
73
  function l(s) {
74
74
  if (a[s])
75
- return t[s] = [];
76
- if (!(s in t)) {
77
- t[s] = null;
78
- const g = n[s] && n[s].parent, h = g && l(g);
79
- h && (t[s] = [g].concat(h));
75
+ return n[s] = [];
76
+ if (!(s in n)) {
77
+ n[s] = null;
78
+ const i = t[s] && t[s].parent, r = i && l(i);
79
+ r && (n[s] = [i].concat(r));
80
80
  }
81
- return t[s];
81
+ return n[s];
82
82
  }
83
- return Object.keys(a).concat(Object.keys(n)).forEach(l), t;
83
+ return Object.keys(a).concat(Object.keys(t)).forEach(l), n;
84
84
  }
85
- function tn(e, o, a) {
86
- const n = e.icons, t = e.aliases || /* @__PURE__ */ Object.create(null);
85
+ function nt(e, o, a) {
86
+ const t = e.icons, n = e.aliases || /* @__PURE__ */ Object.create(null);
87
87
  let l = {};
88
- function s(g) {
89
- l = xe(
90
- n[g] || t[g],
88
+ function s(i) {
89
+ l = Ee(
90
+ t[i] || n[i],
91
91
  l
92
92
  );
93
93
  }
94
- return s(o), a.forEach(s), xe(e, l);
94
+ return s(o), a.forEach(s), Ee(e, l);
95
95
  }
96
96
  function Re(e, o) {
97
97
  const a = [];
98
98
  if (typeof e != "object" || typeof e.icons != "object")
99
99
  return a;
100
- e.not_found instanceof Array && e.not_found.forEach((t) => {
101
- o(t, null), a.push(t);
100
+ e.not_found instanceof Array && e.not_found.forEach((n) => {
101
+ o(n, null), a.push(n);
102
102
  });
103
- const n = nn(e);
104
- for (const t in n) {
105
- const l = n[t];
106
- l && (o(t, tn(e, t, l)), a.push(t));
103
+ const t = tt(e);
104
+ for (const n in t) {
105
+ const l = t[n];
106
+ l && (o(n, nt(e, n, l)), a.push(n));
107
107
  }
108
108
  return a;
109
109
  }
110
- const on = {
110
+ const ot = {
111
111
  provider: "",
112
112
  aliases: {},
113
113
  not_found: {},
@@ -123,14 +123,14 @@ function De(e) {
123
123
  if (typeof e != "object" || e === null)
124
124
  return null;
125
125
  const o = e;
126
- if (typeof o.prefix != "string" || !e.icons || typeof e.icons != "object" || !de(e, on))
126
+ if (typeof o.prefix != "string" || !e.icons || typeof e.icons != "object" || !de(e, ot))
127
127
  return null;
128
128
  const a = o.icons;
129
- for (const t in a) {
130
- const l = a[t];
129
+ for (const n in a) {
130
+ const l = a[n];
131
131
  if (
132
132
  // Name cannot be empty
133
- !t || // Must have body
133
+ !n || // Must have body
134
134
  typeof l.body != "string" || // Check other props
135
135
  !de(
136
136
  l,
@@ -139,13 +139,13 @@ function De(e) {
139
139
  )
140
140
  return null;
141
141
  }
142
- const n = o.aliases || /* @__PURE__ */ Object.create(null);
143
- for (const t in n) {
144
- const l = n[t], s = l.parent;
142
+ const t = o.aliases || /* @__PURE__ */ Object.create(null);
143
+ for (const n in t) {
144
+ const l = t[n], s = l.parent;
145
145
  if (
146
146
  // Name cannot be empty
147
- !t || // Parent must be set and point to existing icon
148
- typeof s != "string" || !a[s] && !n[s] || // Check other props
147
+ !n || // Parent must be set and point to existing icon
148
+ typeof s != "string" || !a[s] && !t[s] || // Check other props
149
149
  !de(
150
150
  l,
151
151
  he
@@ -155,8 +155,8 @@ function De(e) {
155
155
  }
156
156
  return o;
157
157
  }
158
- const Ee = /* @__PURE__ */ Object.create(null);
159
- function an(e, o) {
158
+ const ke = /* @__PURE__ */ Object.create(null);
159
+ function at(e, o) {
160
160
  return {
161
161
  provider: e,
162
162
  prefix: o,
@@ -164,16 +164,16 @@ function an(e, o) {
164
164
  missing: /* @__PURE__ */ new Set()
165
165
  };
166
166
  }
167
- function q(e, o) {
168
- const a = Ee[e] || (Ee[e] = /* @__PURE__ */ Object.create(null));
169
- return a[o] || (a[o] = an(e, o));
167
+ function U(e, o) {
168
+ const a = ke[e] || (ke[e] = /* @__PURE__ */ Object.create(null));
169
+ return a[o] || (a[o] = at(e, o));
170
170
  }
171
- function _e(e, o) {
172
- return De(o) ? Re(o, (a, n) => {
173
- n ? e.icons[a] = n : e.missing.add(a);
171
+ function Ne(e, o) {
172
+ return De(o) ? Re(o, (a, t) => {
173
+ t ? e.icons[a] = t : e.missing.add(a);
174
174
  }) : [];
175
175
  }
176
- function ln(e, o, a) {
176
+ function lt(e, o, a) {
177
177
  try {
178
178
  if (typeof a.body == "string")
179
179
  return e.icons[o] = { ...a }, !0;
@@ -182,40 +182,40 @@ function ln(e, o, a) {
182
182
  return !1;
183
183
  }
184
184
  let ee = !1;
185
- function Ne(e) {
185
+ function _e(e) {
186
186
  return typeof e == "boolean" && (ee = e), ee;
187
187
  }
188
- function sn(e) {
188
+ function st(e) {
189
189
  const o = typeof e == "string" ? ce(e, !0, ee) : e;
190
190
  if (o) {
191
- const a = q(o.provider, o.prefix), n = o.name;
192
- return a.icons[n] || (a.missing.has(n) ? null : void 0);
191
+ const a = U(o.provider, o.prefix), t = o.name;
192
+ return a.icons[t] || (a.missing.has(t) ? null : void 0);
193
193
  }
194
194
  }
195
- function cn(e, o) {
195
+ function ct(e, o) {
196
196
  const a = ce(e, !0, ee);
197
197
  if (!a)
198
198
  return !1;
199
- const n = q(a.provider, a.prefix);
200
- return o ? ln(n, a.name, o) : (n.missing.add(a.name), !0);
199
+ const t = U(a.provider, a.prefix);
200
+ return o ? lt(t, a.name, o) : (t.missing.add(a.name), !0);
201
201
  }
202
- function gn(e, o) {
202
+ function gt(e, o) {
203
203
  if (typeof e != "object")
204
204
  return !1;
205
205
  if (typeof o != "string" && (o = e.provider || ""), ee && !o && !e.prefix) {
206
- let t = !1;
206
+ let n = !1;
207
207
  return De(e) && (e.prefix = "", Re(e, (l, s) => {
208
- cn(l, s) && (t = !0);
209
- })), t;
208
+ ct(l, s) && (n = !0);
209
+ })), n;
210
210
  }
211
211
  const a = e.prefix;
212
- if (!te({
212
+ if (!ne({
213
213
  prefix: a,
214
214
  name: "a"
215
215
  }))
216
216
  return !1;
217
- const n = q(o, a);
218
- return !!_e(n, e);
217
+ const t = U(o, a);
218
+ return !!Ne(t, e);
219
219
  }
220
220
  const Ge = Object.freeze({
221
221
  width: null,
@@ -225,7 +225,7 @@ const Ge = Object.freeze({
225
225
  ...Ge,
226
226
  // Transformations
227
227
  ...le
228
- }), dn = /(-?[0-9.]*[0-9]+[0-9.]*)/g, fn = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
228
+ }), it = /(-?[0-9.]*[0-9]+[0-9.]*)/g, dt = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
229
229
  function Pe(e, o, a) {
230
230
  if (o === 1)
231
231
  return e;
@@ -233,135 +233,135 @@ function Pe(e, o, a) {
233
233
  return Math.ceil(e * o * a) / a;
234
234
  if (typeof e != "string")
235
235
  return e;
236
- const n = e.split(dn);
237
- if (n === null || !n.length)
236
+ const t = e.split(it);
237
+ if (t === null || !t.length)
238
238
  return e;
239
- const t = [];
240
- let l = n.shift(), s = fn.test(l);
239
+ const n = [];
240
+ let l = t.shift(), s = dt.test(l);
241
241
  for (; ; ) {
242
242
  if (s) {
243
- const g = parseFloat(l);
244
- isNaN(g) ? t.push(l) : t.push(Math.ceil(g * o * a) / a);
243
+ const i = parseFloat(l);
244
+ isNaN(i) ? n.push(l) : n.push(Math.ceil(i * o * a) / a);
245
245
  } else
246
- t.push(l);
247
- if (l = n.shift(), l === void 0)
248
- return t.join("");
246
+ n.push(l);
247
+ if (l = t.shift(), l === void 0)
248
+ return n.join("");
249
249
  s = !s;
250
250
  }
251
251
  }
252
- function rn(e, o = "defs") {
252
+ function rt(e, o = "defs") {
253
253
  let a = "";
254
- const n = e.indexOf("<" + o);
255
- for (; n >= 0; ) {
256
- const t = e.indexOf(">", n), l = e.indexOf("</" + o);
257
- if (t === -1 || l === -1)
254
+ const t = e.indexOf("<" + o);
255
+ for (; t >= 0; ) {
256
+ const n = e.indexOf(">", t), l = e.indexOf("</" + o);
257
+ if (n === -1 || l === -1)
258
258
  break;
259
259
  const s = e.indexOf(">", l);
260
260
  if (s === -1)
261
261
  break;
262
- a += e.slice(t + 1, l).trim(), e = e.slice(0, n).trim() + e.slice(s + 1);
262
+ a += e.slice(n + 1, l).trim(), e = e.slice(0, t).trim() + e.slice(s + 1);
263
263
  }
264
264
  return {
265
265
  defs: a,
266
266
  content: e
267
267
  };
268
268
  }
269
- function pn(e, o) {
269
+ function ft(e, o) {
270
270
  return e ? "<defs>" + e + "</defs>" + o : o;
271
271
  }
272
- function hn(e, o, a) {
273
- const n = rn(e);
274
- return pn(n.defs, o + n.content + a);
272
+ function pt(e, o, a) {
273
+ const t = rt(e);
274
+ return ft(t.defs, o + t.content + a);
275
275
  }
276
- const mn = (e) => e === "unset" || e === "undefined" || e === "none";
277
- function un(e, o) {
276
+ const ht = (e) => e === "unset" || e === "undefined" || e === "none";
277
+ function mt(e, o) {
278
278
  const a = {
279
279
  ...ge,
280
280
  ...e
281
- }, n = {
281
+ }, t = {
282
282
  ...We,
283
283
  ...o
284
- }, t = {
284
+ }, n = {
285
285
  left: a.left,
286
286
  top: a.top,
287
287
  width: a.width,
288
288
  height: a.height
289
289
  };
290
290
  let l = a.body;
291
- [a, n].forEach((r) => {
292
- const f = [], S = r.hFlip, P = r.vFlip;
293
- let C = r.rotate;
294
- S ? P ? C += 2 : (f.push(
295
- "translate(" + (t.width + t.left).toString() + " " + (0 - t.top).toString() + ")"
296
- ), f.push("scale(-1 1)"), t.top = t.left = 0) : P && (f.push(
297
- "translate(" + (0 - t.left).toString() + " " + (t.height + t.top).toString() + ")"
298
- ), f.push("scale(1 -1)"), t.top = t.left = 0);
291
+ [a, t].forEach((p) => {
292
+ const g = [], x = p.hFlip, E = p.vFlip;
293
+ let C = p.rotate;
294
+ x ? E ? C += 2 : (g.push(
295
+ "translate(" + (n.width + n.left).toString() + " " + (0 - n.top).toString() + ")"
296
+ ), g.push("scale(-1 1)"), n.top = n.left = 0) : E && (g.push(
297
+ "translate(" + (0 - n.left).toString() + " " + (n.height + n.top).toString() + ")"
298
+ ), g.push("scale(1 -1)"), n.top = n.left = 0);
299
299
  let w;
300
300
  switch (C < 0 && (C -= Math.floor(C / 4) * 4), C = C % 4, C) {
301
301
  case 1:
302
- w = t.height / 2 + t.top, f.unshift(
302
+ w = n.height / 2 + n.top, g.unshift(
303
303
  "rotate(90 " + w.toString() + " " + w.toString() + ")"
304
304
  );
305
305
  break;
306
306
  case 2:
307
- f.unshift(
308
- "rotate(180 " + (t.width / 2 + t.left).toString() + " " + (t.height / 2 + t.top).toString() + ")"
307
+ g.unshift(
308
+ "rotate(180 " + (n.width / 2 + n.left).toString() + " " + (n.height / 2 + n.top).toString() + ")"
309
309
  );
310
310
  break;
311
311
  case 3:
312
- w = t.width / 2 + t.left, f.unshift(
312
+ w = n.width / 2 + n.left, g.unshift(
313
313
  "rotate(-90 " + w.toString() + " " + w.toString() + ")"
314
314
  );
315
315
  break;
316
316
  }
317
- C % 2 === 1 && (t.left !== t.top && (w = t.left, t.left = t.top, t.top = w), t.width !== t.height && (w = t.width, t.width = t.height, t.height = w)), f.length && (l = hn(
317
+ C % 2 === 1 && (n.left !== n.top && (w = n.left, n.left = n.top, n.top = w), n.width !== n.height && (w = n.width, n.width = n.height, n.height = w)), g.length && (l = pt(
318
318
  l,
319
- '<g transform="' + f.join(" ") + '">',
319
+ '<g transform="' + g.join(" ") + '">',
320
320
  "</g>"
321
321
  ));
322
322
  });
323
- const s = n.width, g = n.height, h = t.width, c = t.height;
324
- let i, p;
325
- s === null ? (p = g === null ? "1em" : g === "auto" ? c : g, i = Pe(p, h / c)) : (i = s === "auto" ? h : s, p = g === null ? Pe(i, c / h) : g === "auto" ? c : g);
326
- const b = {}, d = (r, f) => {
327
- mn(f) || (b[r] = f.toString());
323
+ const s = t.width, i = t.height, r = n.width, c = n.height;
324
+ let f, h;
325
+ s === null ? (h = i === null ? "1em" : i === "auto" ? c : i, f = Pe(h, r / c)) : (f = s === "auto" ? r : s, h = i === null ? Pe(f, c / r) : i === "auto" ? c : i);
326
+ const b = {}, d = (p, g) => {
327
+ ht(g) || (b[p] = g.toString());
328
328
  };
329
- d("width", i), d("height", p);
330
- const j = [t.left, t.top, h, c];
331
- return b.viewBox = j.join(" "), {
329
+ d("width", f), d("height", h);
330
+ const k = [n.left, n.top, r, c];
331
+ return b.viewBox = k.join(" "), {
332
332
  attributes: b,
333
- viewBox: j,
333
+ viewBox: k,
334
334
  body: l
335
335
  };
336
336
  }
337
- const vn = /\sid="(\S+)"/g, bn = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
338
- let wn = 0;
339
- function yn(e, o = bn) {
337
+ const ut = /\sid="(\S+)"/g, vt = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
338
+ let bt = 0;
339
+ function wt(e, o = vt) {
340
340
  const a = [];
341
- let n;
342
- for (; n = vn.exec(e); )
343
- a.push(n[1]);
341
+ let t;
342
+ for (; t = ut.exec(e); )
343
+ a.push(t[1]);
344
344
  if (!a.length)
345
345
  return e;
346
- const t = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
346
+ const n = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
347
347
  return a.forEach((l) => {
348
- const s = typeof o == "function" ? o(l) : o + (wn++).toString(), g = l.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
348
+ const s = typeof o == "function" ? o(l) : o + (bt++).toString(), i = l.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
349
349
  e = e.replace(
350
350
  // Allowed characters before id: [#;"]
351
351
  // Allowed characters after id: [)"], .[a-z]
352
- new RegExp('([#;"])(' + g + ')([")]|\\.[a-z])', "g"),
353
- "$1" + s + t + "$3"
352
+ new RegExp('([#;"])(' + i + ')([")]|\\.[a-z])', "g"),
353
+ "$1" + s + n + "$3"
354
354
  );
355
- }), e = e.replace(new RegExp(t, "g"), ""), e;
355
+ }), e = e.replace(new RegExp(n, "g"), ""), e;
356
356
  }
357
357
  const me = /* @__PURE__ */ Object.create(null);
358
- function Cn(e, o) {
358
+ function yt(e, o) {
359
359
  me[e] = o;
360
360
  }
361
361
  function ue(e) {
362
362
  return me[e] || me[""];
363
363
  }
364
- function be(e) {
364
+ function we(e) {
365
365
  let o;
366
366
  if (typeof e.resources == "string")
367
367
  o = [e.resources];
@@ -386,23 +386,23 @@ function be(e) {
386
386
  dataAfterTimeout: e.dataAfterTimeout !== !1
387
387
  };
388
388
  }
389
- const we = /* @__PURE__ */ Object.create(null), U = [
389
+ const ye = /* @__PURE__ */ Object.create(null), Y = [
390
390
  "https://api.simplesvg.com",
391
391
  "https://api.unisvg.com"
392
392
  ], oe = [];
393
- for (; U.length > 0; )
394
- U.length === 1 || Math.random() > 0.5 ? oe.push(U.shift()) : oe.push(U.pop());
395
- we[""] = be({
393
+ for (; Y.length > 0; )
394
+ Y.length === 1 || Math.random() > 0.5 ? oe.push(Y.shift()) : oe.push(Y.pop());
395
+ ye[""] = we({
396
396
  resources: ["https://api.iconify.design"].concat(oe)
397
397
  });
398
- function Sn(e, o) {
399
- const a = be(o);
400
- return a === null ? !1 : (we[e] = a, !0);
398
+ function Ct(e, o) {
399
+ const a = we(o);
400
+ return a === null ? !1 : (ye[e] = a, !0);
401
401
  }
402
- function ye(e) {
403
- return we[e];
402
+ function Ce(e) {
403
+ return ye[e];
404
404
  }
405
- const xn = () => {
405
+ const xt = () => {
406
406
  let e;
407
407
  try {
408
408
  if (e = fetch, typeof e == "function")
@@ -410,89 +410,89 @@ const xn = () => {
410
410
  } catch {
411
411
  }
412
412
  };
413
- let je = xn();
414
- function En(e, o) {
415
- const a = ye(e);
413
+ let je = xt();
414
+ function St(e, o) {
415
+ const a = Ce(e);
416
416
  if (!a)
417
417
  return 0;
418
- let n;
418
+ let t;
419
419
  if (!a.maxURL)
420
- n = 0;
420
+ t = 0;
421
421
  else {
422
- let t = 0;
422
+ let n = 0;
423
423
  a.resources.forEach((s) => {
424
- t = Math.max(t, s.length);
424
+ n = Math.max(n, s.length);
425
425
  });
426
426
  const l = o + ".json?icons=";
427
- n = a.maxURL - t - a.path.length - l.length;
427
+ t = a.maxURL - n - a.path.length - l.length;
428
428
  }
429
- return n;
429
+ return t;
430
430
  }
431
- function Pn(e) {
431
+ function Et(e) {
432
432
  return e === 404;
433
433
  }
434
- const jn = (e, o, a) => {
435
- const n = [], t = En(e, o), l = "icons";
434
+ const kt = (e, o, a) => {
435
+ const t = [], n = St(e, o), l = "icons";
436
436
  let s = {
437
437
  type: l,
438
438
  provider: e,
439
439
  prefix: o,
440
440
  icons: []
441
- }, g = 0;
442
- return a.forEach((h, c) => {
443
- g += h.length + 1, g >= t && c > 0 && (n.push(s), s = {
441
+ }, i = 0;
442
+ return a.forEach((r, c) => {
443
+ i += r.length + 1, i >= n && c > 0 && (t.push(s), s = {
444
444
  type: l,
445
445
  provider: e,
446
446
  prefix: o,
447
447
  icons: []
448
- }, g = h.length), s.icons.push(h);
449
- }), n.push(s), n;
448
+ }, i = r.length), s.icons.push(r);
449
+ }), t.push(s), t;
450
450
  };
451
- function kn(e) {
451
+ function Pt(e) {
452
452
  if (typeof e == "string") {
453
- const o = ye(e);
453
+ const o = Ce(e);
454
454
  if (o)
455
455
  return o.path;
456
456
  }
457
457
  return "/";
458
458
  }
459
- const Mn = (e, o, a) => {
459
+ const jt = (e, o, a) => {
460
460
  if (!je) {
461
461
  a("abort", 424);
462
462
  return;
463
463
  }
464
- let n = kn(o.provider);
464
+ let t = Pt(o.provider);
465
465
  switch (o.type) {
466
466
  case "icons": {
467
- const l = o.prefix, g = o.icons.join(","), h = new URLSearchParams({
468
- icons: g
467
+ const l = o.prefix, i = o.icons.join(","), r = new URLSearchParams({
468
+ icons: i
469
469
  });
470
- n += l + ".json?" + h.toString();
470
+ t += l + ".json?" + r.toString();
471
471
  break;
472
472
  }
473
473
  case "custom": {
474
474
  const l = o.uri;
475
- n += l.slice(0, 1) === "/" ? l.slice(1) : l;
475
+ t += l.slice(0, 1) === "/" ? l.slice(1) : l;
476
476
  break;
477
477
  }
478
478
  default:
479
479
  a("abort", 400);
480
480
  return;
481
481
  }
482
- let t = 503;
483
- je(e + n).then((l) => {
482
+ let n = 503;
483
+ je(e + t).then((l) => {
484
484
  const s = l.status;
485
485
  if (s !== 200) {
486
486
  setTimeout(() => {
487
- a(Pn(s) ? "abort" : "next", s);
487
+ a(Et(s) ? "abort" : "next", s);
488
488
  });
489
489
  return;
490
490
  }
491
- return t = 501, l.json();
491
+ return n = 501, l.json();
492
492
  }).then((l) => {
493
493
  if (typeof l != "object" || l === null) {
494
494
  setTimeout(() => {
495
- l === 404 ? a("abort", l) : a("next", t);
495
+ l === 404 ? a("abort", l) : a("next", n);
496
496
  });
497
497
  return;
498
498
  }
@@ -500,75 +500,75 @@ const Mn = (e, o, a) => {
500
500
  a("success", l);
501
501
  });
502
502
  }).catch(() => {
503
- a("next", t);
503
+ a("next", n);
504
504
  });
505
- }, An = {
506
- prepare: jn,
507
- send: Mn
505
+ }, Mt = {
506
+ prepare: kt,
507
+ send: jt
508
508
  };
509
- function In(e) {
509
+ function At(e) {
510
510
  const o = {
511
511
  loaded: [],
512
512
  missing: [],
513
513
  pending: []
514
514
  }, a = /* @__PURE__ */ Object.create(null);
515
- e.sort((t, l) => t.provider !== l.provider ? t.provider.localeCompare(l.provider) : t.prefix !== l.prefix ? t.prefix.localeCompare(l.prefix) : t.name.localeCompare(l.name));
516
- let n = {
515
+ e.sort((n, l) => n.provider !== l.provider ? n.provider.localeCompare(l.provider) : n.prefix !== l.prefix ? n.prefix.localeCompare(l.prefix) : n.name.localeCompare(l.name));
516
+ let t = {
517
517
  provider: "",
518
518
  prefix: "",
519
519
  name: ""
520
520
  };
521
- return e.forEach((t) => {
522
- if (n.name === t.name && n.prefix === t.prefix && n.provider === t.provider)
521
+ return e.forEach((n) => {
522
+ if (t.name === n.name && t.prefix === n.prefix && t.provider === n.provider)
523
523
  return;
524
- n = t;
525
- const l = t.provider, s = t.prefix, g = t.name, h = a[l] || (a[l] = /* @__PURE__ */ Object.create(null)), c = h[s] || (h[s] = q(l, s));
526
- let i;
527
- g in c.icons ? i = o.loaded : s === "" || c.missing.has(g) ? i = o.missing : i = o.pending;
528
- const p = {
524
+ t = n;
525
+ const l = n.provider, s = n.prefix, i = n.name, r = a[l] || (a[l] = /* @__PURE__ */ Object.create(null)), c = r[s] || (r[s] = U(l, s));
526
+ let f;
527
+ i in c.icons ? f = o.loaded : s === "" || c.missing.has(i) ? f = o.missing : f = o.pending;
528
+ const h = {
529
529
  provider: l,
530
530
  prefix: s,
531
- name: g
531
+ name: i
532
532
  };
533
- i.push(p);
533
+ f.push(h);
534
534
  }), o;
535
535
  }
536
536
  function Ke(e, o) {
537
537
  e.forEach((a) => {
538
- const n = a.loaderCallbacks;
539
- n && (a.loaderCallbacks = n.filter((t) => t.id !== o));
538
+ const t = a.loaderCallbacks;
539
+ t && (a.loaderCallbacks = t.filter((n) => n.id !== o));
540
540
  });
541
541
  }
542
- function $n(e) {
542
+ function It(e) {
543
543
  e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
544
544
  e.pendingCallbacksFlag = !1;
545
545
  const o = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
546
546
  if (!o.length)
547
547
  return;
548
548
  let a = !1;
549
- const n = e.provider, t = e.prefix;
549
+ const t = e.provider, n = e.prefix;
550
550
  o.forEach((l) => {
551
- const s = l.icons, g = s.pending.length;
552
- s.pending = s.pending.filter((h) => {
553
- if (h.prefix !== t)
551
+ const s = l.icons, i = s.pending.length;
552
+ s.pending = s.pending.filter((r) => {
553
+ if (r.prefix !== n)
554
554
  return !0;
555
- const c = h.name;
555
+ const c = r.name;
556
556
  if (e.icons[c])
557
557
  s.loaded.push({
558
- provider: n,
559
- prefix: t,
558
+ provider: t,
559
+ prefix: n,
560
560
  name: c
561
561
  });
562
562
  else if (e.missing.has(c))
563
563
  s.missing.push({
564
- provider: n,
565
- prefix: t,
564
+ provider: t,
565
+ prefix: n,
566
566
  name: c
567
567
  });
568
568
  else
569
569
  return a = !0, !0;
570
570
  return !1;
571
- }), s.pending.length !== g && (a || Ke([e], l.id), l.callback(
571
+ }), s.pending.length !== i && (a || Ke([e], l.id), l.callback(
572
572
  s.loaded.slice(0),
573
573
  s.missing.slice(0),
574
574
  s.pending.slice(0),
@@ -577,29 +577,29 @@ function $n(e) {
577
577
  });
578
578
  }));
579
579
  }
580
- let Tn = 0;
581
- function Bn(e, o, a) {
582
- const n = Tn++, t = Ke.bind(null, a, n);
580
+ let $t = 0;
581
+ function Tt(e, o, a) {
582
+ const t = $t++, n = Ke.bind(null, a, t);
583
583
  if (!o.pending.length)
584
- return t;
584
+ return n;
585
585
  const l = {
586
- id: n,
586
+ id: t,
587
587
  icons: o,
588
588
  callback: e,
589
- abort: t
589
+ abort: n
590
590
  };
591
591
  return a.forEach((s) => {
592
592
  (s.loaderCallbacks || (s.loaderCallbacks = [])).push(l);
593
- }), t;
594
- }
595
- function Xn(e, o = !0, a = !1) {
596
- const n = [];
597
- return e.forEach((t) => {
598
- const l = typeof t == "string" ? ce(t, o, a) : t;
599
- l && n.push(l);
600
593
  }), n;
601
594
  }
602
- var Ln = {
595
+ function Bt(e, o = !0, a = !1) {
596
+ const t = [];
597
+ return e.forEach((n) => {
598
+ const l = typeof n == "string" ? ce(n, o, a) : n;
599
+ l && t.push(l);
600
+ }), t;
601
+ }
602
+ var Lt = {
603
603
  resources: [],
604
604
  index: 0,
605
605
  timeout: 2e3,
@@ -607,307 +607,307 @@ var Ln = {
607
607
  random: !1,
608
608
  dataAfterTimeout: !1
609
609
  };
610
- function Vn(e, o, a, n) {
611
- const t = e.resources.length, l = e.random ? Math.floor(Math.random() * t) : e.index;
610
+ function Xt(e, o, a, t) {
611
+ const n = e.resources.length, l = e.random ? Math.floor(Math.random() * n) : e.index;
612
612
  let s;
613
613
  if (e.random) {
614
- let k = e.resources.slice(0);
615
- for (s = []; k.length > 1; ) {
616
- const L = Math.floor(Math.random() * k.length);
617
- s.push(k[L]), k = k.slice(0, L).concat(k.slice(L + 1));
614
+ let j = e.resources.slice(0);
615
+ for (s = []; j.length > 1; ) {
616
+ const X = Math.floor(Math.random() * j.length);
617
+ s.push(j[X]), j = j.slice(0, X).concat(j.slice(X + 1));
618
618
  }
619
- s = s.concat(k);
619
+ s = s.concat(j);
620
620
  } else
621
621
  s = e.resources.slice(l).concat(e.resources.slice(0, l));
622
- const g = Date.now();
623
- let h = "pending", c = 0, i, p = null, b = [], d = [];
624
- typeof n == "function" && d.push(n);
625
- function j() {
626
- p && (clearTimeout(p), p = null);
622
+ const i = Date.now();
623
+ let r = "pending", c = 0, f, h = null, b = [], d = [];
624
+ typeof t == "function" && d.push(t);
625
+ function k() {
626
+ h && (clearTimeout(h), h = null);
627
627
  }
628
- function r() {
629
- h === "pending" && (h = "aborted"), j(), b.forEach((k) => {
630
- k.status === "pending" && (k.status = "aborted");
628
+ function p() {
629
+ r === "pending" && (r = "aborted"), k(), b.forEach((j) => {
630
+ j.status === "pending" && (j.status = "aborted");
631
631
  }), b = [];
632
632
  }
633
- function f(k, L) {
634
- L && (d = []), typeof k == "function" && d.push(k);
633
+ function g(j, X) {
634
+ X && (d = []), typeof j == "function" && d.push(j);
635
635
  }
636
- function S() {
636
+ function x() {
637
637
  return {
638
- startTime: g,
638
+ startTime: i,
639
639
  payload: o,
640
- status: h,
640
+ status: r,
641
641
  queriesSent: c,
642
642
  queriesPending: b.length,
643
- subscribe: f,
644
- abort: r
643
+ subscribe: g,
644
+ abort: p
645
645
  };
646
646
  }
647
- function P() {
648
- h = "failed", d.forEach((k) => {
649
- k(void 0, i);
647
+ function E() {
648
+ r = "failed", d.forEach((j) => {
649
+ j(void 0, f);
650
650
  });
651
651
  }
652
652
  function C() {
653
- b.forEach((k) => {
654
- k.status === "pending" && (k.status = "aborted");
653
+ b.forEach((j) => {
654
+ j.status === "pending" && (j.status = "aborted");
655
655
  }), b = [];
656
656
  }
657
- function w(k, L, m) {
658
- const E = L !== "success";
659
- switch (b = b.filter((x) => x !== k), h) {
657
+ function w(j, X, u) {
658
+ const P = X !== "success";
659
+ switch (b = b.filter((S) => S !== j), r) {
660
660
  case "pending":
661
661
  break;
662
662
  case "failed":
663
- if (E || !e.dataAfterTimeout)
663
+ if (P || !e.dataAfterTimeout)
664
664
  return;
665
665
  break;
666
666
  default:
667
667
  return;
668
668
  }
669
- if (L === "abort") {
670
- i = m, P();
669
+ if (X === "abort") {
670
+ f = u, E();
671
671
  return;
672
672
  }
673
- if (E) {
674
- i = m, b.length || (s.length ? I() : P());
673
+ if (P) {
674
+ f = u, b.length || (s.length ? T() : E());
675
675
  return;
676
676
  }
677
- if (j(), C(), !e.random) {
678
- const x = e.resources.indexOf(k.resource);
679
- x !== -1 && x !== e.index && (e.index = x);
677
+ if (k(), C(), !e.random) {
678
+ const S = e.resources.indexOf(j.resource);
679
+ S !== -1 && S !== e.index && (e.index = S);
680
680
  }
681
- h = "completed", d.forEach((x) => {
682
- x(m);
681
+ r = "completed", d.forEach((S) => {
682
+ S(u);
683
683
  });
684
684
  }
685
- function I() {
686
- if (h !== "pending")
685
+ function T() {
686
+ if (r !== "pending")
687
687
  return;
688
- j();
689
- const k = s.shift();
690
- if (k === void 0) {
688
+ k();
689
+ const j = s.shift();
690
+ if (j === void 0) {
691
691
  if (b.length) {
692
- p = setTimeout(() => {
693
- j(), h === "pending" && (C(), P());
692
+ h = setTimeout(() => {
693
+ k(), r === "pending" && (C(), E());
694
694
  }, e.timeout);
695
695
  return;
696
696
  }
697
- P();
697
+ E();
698
698
  return;
699
699
  }
700
- const L = {
700
+ const X = {
701
701
  status: "pending",
702
- resource: k,
703
- callback: (m, E) => {
704
- w(L, m, E);
702
+ resource: j,
703
+ callback: (u, P) => {
704
+ w(X, u, P);
705
705
  }
706
706
  };
707
- b.push(L), c++, p = setTimeout(I, e.rotate), a(k, o, L.callback);
707
+ b.push(X), c++, h = setTimeout(T, e.rotate), a(j, o, X.callback);
708
708
  }
709
- return setTimeout(I), S;
709
+ return setTimeout(T), x;
710
710
  }
711
711
  function He(e) {
712
712
  const o = {
713
- ...Ln,
713
+ ...Lt,
714
714
  ...e
715
715
  };
716
716
  let a = [];
717
- function n() {
718
- a = a.filter((g) => g().status === "pending");
717
+ function t() {
718
+ a = a.filter((i) => i().status === "pending");
719
719
  }
720
- function t(g, h, c) {
721
- const i = Vn(
720
+ function n(i, r, c) {
721
+ const f = Xt(
722
722
  o,
723
- g,
724
- h,
725
- (p, b) => {
726
- n(), c && c(p, b);
723
+ i,
724
+ r,
725
+ (h, b) => {
726
+ t(), c && c(h, b);
727
727
  }
728
728
  );
729
- return a.push(i), i;
729
+ return a.push(f), f;
730
730
  }
731
- function l(g) {
732
- return a.find((h) => g(h)) || null;
731
+ function l(i) {
732
+ return a.find((r) => i(r)) || null;
733
733
  }
734
734
  return {
735
- query: t,
735
+ query: n,
736
736
  find: l,
737
- setIndex: (g) => {
738
- o.index = g;
737
+ setIndex: (i) => {
738
+ o.index = i;
739
739
  },
740
740
  getIndex: () => o.index,
741
- cleanup: n
741
+ cleanup: t
742
742
  };
743
743
  }
744
- function ke() {
744
+ function Me() {
745
745
  }
746
- const fe = /* @__PURE__ */ Object.create(null);
747
- function zn(e) {
748
- if (!fe[e]) {
749
- const o = ye(e);
746
+ const re = /* @__PURE__ */ Object.create(null);
747
+ function zt(e) {
748
+ if (!re[e]) {
749
+ const o = Ce(e);
750
750
  if (!o)
751
751
  return;
752
- const a = He(o), n = {
752
+ const a = He(o), t = {
753
753
  config: o,
754
754
  redundancy: a
755
755
  };
756
- fe[e] = n;
756
+ re[e] = t;
757
757
  }
758
- return fe[e];
758
+ return re[e];
759
759
  }
760
- function Fn(e, o, a) {
761
- let n, t;
760
+ function Vt(e, o, a) {
761
+ let t, n;
762
762
  if (typeof e == "string") {
763
763
  const l = ue(e);
764
764
  if (!l)
765
- return a(void 0, 424), ke;
766
- t = l.send;
767
- const s = zn(e);
768
- s && (n = s.redundancy);
765
+ return a(void 0, 424), Me;
766
+ n = l.send;
767
+ const s = zt(e);
768
+ s && (t = s.redundancy);
769
769
  } else {
770
- const l = be(e);
770
+ const l = we(e);
771
771
  if (l) {
772
- n = He(l);
773
- const s = e.resources ? e.resources[0] : "", g = ue(s);
774
- g && (t = g.send);
772
+ t = He(l);
773
+ const s = e.resources ? e.resources[0] : "", i = ue(s);
774
+ i && (n = i.send);
775
775
  }
776
776
  }
777
- return !n || !t ? (a(void 0, 424), ke) : n.query(o, t, a)().abort;
777
+ return !t || !n ? (a(void 0, 424), Me) : t.query(o, n, a)().abort;
778
778
  }
779
- function Me() {
779
+ function Ae() {
780
780
  }
781
- function On(e) {
781
+ function Ft(e) {
782
782
  e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
783
- e.iconsLoaderFlag = !1, $n(e);
783
+ e.iconsLoaderFlag = !1, It(e);
784
784
  }));
785
785
  }
786
- function Rn(e) {
786
+ function Ot(e) {
787
787
  const o = [], a = [];
788
- return e.forEach((n) => {
789
- (n.match(Fe) ? o : a).push(n);
788
+ return e.forEach((t) => {
789
+ (t.match(Fe) ? o : a).push(t);
790
790
  }), {
791
791
  valid: o,
792
792
  invalid: a
793
793
  };
794
794
  }
795
- function Y(e, o, a) {
796
- function n() {
797
- const t = e.pendingIcons;
795
+ function Q(e, o, a) {
796
+ function t() {
797
+ const n = e.pendingIcons;
798
798
  o.forEach((l) => {
799
- t && t.delete(l), e.icons[l] || e.missing.add(l);
799
+ n && n.delete(l), e.icons[l] || e.missing.add(l);
800
800
  });
801
801
  }
802
802
  if (a && typeof a == "object")
803
803
  try {
804
- if (!_e(e, a).length) {
805
- n();
804
+ if (!Ne(e, a).length) {
805
+ t();
806
806
  return;
807
807
  }
808
- } catch (t) {
809
- console.error(t);
808
+ } catch (n) {
809
+ console.error(n);
810
810
  }
811
- n(), On(e);
811
+ t(), Ft(e);
812
812
  }
813
- function Ae(e, o) {
813
+ function Ie(e, o) {
814
814
  e instanceof Promise ? e.then((a) => {
815
815
  o(a);
816
816
  }).catch(() => {
817
817
  o(null);
818
818
  }) : o(e);
819
819
  }
820
- function Dn(e, o) {
820
+ function Rt(e, o) {
821
821
  e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(o).sort() : e.iconsToLoad = o, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
822
822
  e.iconsQueueFlag = !1;
823
- const { provider: a, prefix: n } = e, t = e.iconsToLoad;
824
- if (delete e.iconsToLoad, !t || !t.length)
823
+ const { provider: a, prefix: t } = e, n = e.iconsToLoad;
824
+ if (delete e.iconsToLoad, !n || !n.length)
825
825
  return;
826
826
  const l = e.loadIcon;
827
- if (e.loadIcons && (t.length > 1 || !l)) {
828
- Ae(
829
- e.loadIcons(t, n, a),
830
- (i) => {
831
- Y(e, t, i);
827
+ if (e.loadIcons && (n.length > 1 || !l)) {
828
+ Ie(
829
+ e.loadIcons(n, t, a),
830
+ (f) => {
831
+ Q(e, n, f);
832
832
  }
833
833
  );
834
834
  return;
835
835
  }
836
836
  if (l) {
837
- t.forEach((i) => {
838
- const p = l(i, n, a);
839
- Ae(p, (b) => {
837
+ n.forEach((f) => {
838
+ const h = l(f, t, a);
839
+ Ie(h, (b) => {
840
840
  const d = b ? {
841
- prefix: n,
841
+ prefix: t,
842
842
  icons: {
843
- [i]: b
843
+ [f]: b
844
844
  }
845
845
  } : null;
846
- Y(e, [i], d);
846
+ Q(e, [f], d);
847
847
  });
848
848
  });
849
849
  return;
850
850
  }
851
- const { valid: s, invalid: g } = Rn(t);
852
- if (g.length && Y(e, g, null), !s.length)
851
+ const { valid: s, invalid: i } = Ot(n);
852
+ if (i.length && Q(e, i, null), !s.length)
853
853
  return;
854
- const h = n.match(Fe) ? ue(a) : null;
855
- if (!h) {
856
- Y(e, s, null);
854
+ const r = t.match(Fe) ? ue(a) : null;
855
+ if (!r) {
856
+ Q(e, s, null);
857
857
  return;
858
858
  }
859
- h.prepare(a, n, s).forEach((i) => {
860
- Fn(a, i, (p) => {
861
- Y(e, i.icons, p);
859
+ r.prepare(a, t, s).forEach((f) => {
860
+ Vt(a, f, (h) => {
861
+ Q(e, f.icons, h);
862
862
  });
863
863
  });
864
864
  }));
865
865
  }
866
- const _n = (e, o) => {
867
- const a = Xn(e, !0, Ne()), n = In(a);
868
- if (!n.pending.length) {
869
- let h = !0;
866
+ const Dt = (e, o) => {
867
+ const a = Bt(e, !0, _e()), t = At(a);
868
+ if (!t.pending.length) {
869
+ let r = !0;
870
870
  return o && setTimeout(() => {
871
- h && o(
872
- n.loaded,
873
- n.missing,
874
- n.pending,
875
- Me
871
+ r && o(
872
+ t.loaded,
873
+ t.missing,
874
+ t.pending,
875
+ Ae
876
876
  );
877
877
  }), () => {
878
- h = !1;
878
+ r = !1;
879
879
  };
880
880
  }
881
- const t = /* @__PURE__ */ Object.create(null), l = [];
882
- let s, g;
883
- return n.pending.forEach((h) => {
884
- const { provider: c, prefix: i } = h;
885
- if (i === g && c === s)
881
+ const n = /* @__PURE__ */ Object.create(null), l = [];
882
+ let s, i;
883
+ return t.pending.forEach((r) => {
884
+ const { provider: c, prefix: f } = r;
885
+ if (f === i && c === s)
886
886
  return;
887
- s = c, g = i, l.push(q(c, i));
888
- const p = t[c] || (t[c] = /* @__PURE__ */ Object.create(null));
889
- p[i] || (p[i] = []);
890
- }), n.pending.forEach((h) => {
891
- const { provider: c, prefix: i, name: p } = h, b = q(c, i), d = b.pendingIcons || (b.pendingIcons = /* @__PURE__ */ new Set());
892
- d.has(p) || (d.add(p), t[c][i].push(p));
893
- }), l.forEach((h) => {
894
- const c = t[h.provider][h.prefix];
895
- c.length && Dn(h, c);
896
- }), o ? Bn(o, n, l) : Me;
887
+ s = c, i = f, l.push(U(c, f));
888
+ const h = n[c] || (n[c] = /* @__PURE__ */ Object.create(null));
889
+ h[f] || (h[f] = []);
890
+ }), t.pending.forEach((r) => {
891
+ const { provider: c, prefix: f, name: h } = r, b = U(c, f), d = b.pendingIcons || (b.pendingIcons = /* @__PURE__ */ new Set());
892
+ d.has(h) || (d.add(h), n[c][f].push(h));
893
+ }), l.forEach((r) => {
894
+ const c = n[r.provider][r.prefix];
895
+ c.length && Rt(r, c);
896
+ }), o ? Tt(o, t, l) : Ae;
897
897
  };
898
- function Nn(e, o) {
898
+ function Nt(e, o) {
899
899
  const a = {
900
900
  ...e
901
901
  };
902
- for (const n in o) {
903
- const t = o[n], l = typeof t;
904
- n in Ge ? (t === null || t && (l === "string" || l === "number")) && (a[n] = t) : l === typeof a[n] && (a[n] = n === "rotate" ? t % 4 : t);
902
+ for (const t in o) {
903
+ const n = o[t], l = typeof n;
904
+ t in Ge ? (n === null || n && (l === "string" || l === "number")) && (a[t] = n) : l === typeof a[t] && (a[t] = t === "rotate" ? n % 4 : n);
905
905
  }
906
906
  return a;
907
907
  }
908
- const Gn = /[\s,]+/;
909
- function Wn(e, o) {
910
- o.split(Gn).forEach((a) => {
908
+ const _t = /[\s,]+/;
909
+ function Gt(e, o) {
910
+ o.split(_t).forEach((a) => {
911
911
  switch (a.trim()) {
912
912
  case "horizontal":
913
913
  e.hFlip = !0;
@@ -918,89 +918,89 @@ function Wn(e, o) {
918
918
  }
919
919
  });
920
920
  }
921
- function Kn(e, o = 0) {
921
+ function Wt(e, o = 0) {
922
922
  const a = e.replace(/^-?[0-9.]*/, "");
923
- function n(t) {
924
- for (; t < 0; )
925
- t += 4;
926
- return t % 4;
923
+ function t(n) {
924
+ for (; n < 0; )
925
+ n += 4;
926
+ return n % 4;
927
927
  }
928
928
  if (a === "") {
929
- const t = parseInt(e);
930
- return isNaN(t) ? 0 : n(t);
929
+ const n = parseInt(e);
930
+ return isNaN(n) ? 0 : t(n);
931
931
  } else if (a !== e) {
932
- let t = 0;
932
+ let n = 0;
933
933
  switch (a) {
934
934
  case "%":
935
- t = 25;
935
+ n = 25;
936
936
  break;
937
937
  case "deg":
938
- t = 90;
938
+ n = 90;
939
939
  }
940
- if (t) {
940
+ if (n) {
941
941
  let l = parseFloat(e.slice(0, e.length - a.length));
942
- return isNaN(l) ? 0 : (l = l / t, l % 1 === 0 ? n(l) : 0);
942
+ return isNaN(l) ? 0 : (l = l / n, l % 1 === 0 ? t(l) : 0);
943
943
  }
944
944
  }
945
945
  return o;
946
946
  }
947
- function Hn(e, o) {
947
+ function Kt(e, o) {
948
948
  let a = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
949
- for (const n in o)
950
- a += " " + n + '="' + o[n] + '"';
949
+ for (const t in o)
950
+ a += " " + t + '="' + o[t] + '"';
951
951
  return '<svg xmlns="http://www.w3.org/2000/svg"' + a + ">" + e + "</svg>";
952
952
  }
953
- function qn(e) {
953
+ function Ht(e) {
954
954
  return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
955
955
  }
956
- function Un(e) {
957
- return "data:image/svg+xml," + qn(e);
956
+ function qt(e) {
957
+ return "data:image/svg+xml," + Ht(e);
958
958
  }
959
- function Yn(e) {
960
- return 'url("' + Un(e) + '")';
959
+ function Ut(e) {
960
+ return 'url("' + qt(e) + '")';
961
961
  }
962
- const Ie = {
962
+ const $e = {
963
963
  ...We,
964
964
  inline: !1
965
- }, Qn = {
965
+ }, Yt = {
966
966
  xmlns: "http://www.w3.org/2000/svg",
967
967
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
968
968
  "aria-hidden": !0,
969
969
  role: "img"
970
- }, Zn = {
970
+ }, Qt = {
971
971
  display: "inline-block"
972
972
  }, ve = {
973
973
  backgroundColor: "currentColor"
974
974
  }, qe = {
975
975
  backgroundColor: "transparent"
976
- }, $e = {
976
+ }, Te = {
977
977
  Image: "var(--svg)",
978
978
  Repeat: "no-repeat",
979
979
  Size: "100% 100%"
980
- }, Te = {
980
+ }, Be = {
981
981
  webkitMask: ve,
982
982
  mask: ve,
983
983
  background: qe
984
984
  };
985
- for (const e in Te) {
986
- const o = Te[e];
987
- for (const a in $e)
988
- o[e + a] = $e[a];
985
+ for (const e in Be) {
986
+ const o = Be[e];
987
+ for (const a in Te)
988
+ o[e + a] = Te[a];
989
989
  }
990
990
  const ae = {};
991
991
  ["horizontal", "vertical"].forEach((e) => {
992
992
  const o = e.slice(0, 1) + "Flip";
993
993
  ae[e + "-flip"] = o, ae[e.slice(0, 1) + "-flip"] = o, ae[e + "Flip"] = o;
994
994
  });
995
- function Be(e) {
995
+ function Le(e) {
996
996
  return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
997
997
  }
998
998
  const Xe = (e, o) => {
999
- const a = Nn(Ie, o), n = { ...Qn }, t = o.mode || "svg", l = {}, s = o.style, g = typeof s == "object" && !(s instanceof Array) ? s : {};
1000
- for (let r in o) {
1001
- const f = o[r];
1002
- if (f !== void 0)
1003
- switch (r) {
999
+ const a = Nt($e, o), t = { ...Yt }, n = o.mode || "svg", l = {}, s = o.style, i = typeof s == "object" && !(s instanceof Array) ? s : {};
1000
+ for (let p in o) {
1001
+ const g = o[p];
1002
+ if (g !== void 0)
1003
+ switch (p) {
1004
1004
  case "icon":
1005
1005
  case "style":
1006
1006
  case "onLoad":
@@ -1010,63 +1010,63 @@ const Xe = (e, o) => {
1010
1010
  case "inline":
1011
1011
  case "hFlip":
1012
1012
  case "vFlip":
1013
- a[r] = f === !0 || f === "true" || f === 1;
1013
+ a[p] = g === !0 || g === "true" || g === 1;
1014
1014
  break;
1015
1015
  case "flip":
1016
- typeof f == "string" && Wn(a, f);
1016
+ typeof g == "string" && Gt(a, g);
1017
1017
  break;
1018
1018
  case "color":
1019
- l.color = f;
1019
+ l.color = g;
1020
1020
  break;
1021
1021
  case "rotate":
1022
- typeof f == "string" ? a[r] = Kn(f) : typeof f == "number" && (a[r] = f);
1022
+ typeof g == "string" ? a[p] = Wt(g) : typeof g == "number" && (a[p] = g);
1023
1023
  break;
1024
1024
  case "ariaHidden":
1025
1025
  case "aria-hidden":
1026
- f !== !0 && f !== "true" && delete n["aria-hidden"];
1026
+ g !== !0 && g !== "true" && delete t["aria-hidden"];
1027
1027
  break;
1028
1028
  default: {
1029
- const S = ae[r];
1030
- S ? (f === !0 || f === "true" || f === 1) && (a[S] = !0) : Ie[r] === void 0 && (n[r] = f);
1029
+ const x = ae[p];
1030
+ x ? (g === !0 || g === "true" || g === 1) && (a[x] = !0) : $e[p] === void 0 && (t[p] = g);
1031
1031
  }
1032
1032
  }
1033
1033
  }
1034
- const h = un(e, a), c = h.attributes;
1035
- if (a.inline && (l.verticalAlign = "-0.125em"), t === "svg") {
1036
- n.style = {
1034
+ const r = mt(e, a), c = r.attributes;
1035
+ if (a.inline && (l.verticalAlign = "-0.125em"), n === "svg") {
1036
+ t.style = {
1037
1037
  ...l,
1038
- ...g
1039
- }, Object.assign(n, c);
1040
- let r = 0, f = o.id;
1041
- return typeof f == "string" && (f = f.replace(/-/g, "_")), n.innerHTML = yn(h.body, f ? () => f + "ID" + r++ : "iconifyVue"), Ce("svg", n);
1038
+ ...i
1039
+ }, Object.assign(t, c);
1040
+ let p = 0, g = o.id;
1041
+ return typeof g == "string" && (g = g.replace(/-/g, "_")), t.innerHTML = wt(r.body, g ? () => g + "ID" + p++ : "iconifyVue"), xe("svg", t);
1042
1042
  }
1043
- const { body: i, width: p, height: b } = e, d = t === "mask" || (t === "bg" ? !1 : i.indexOf("currentColor") !== -1), j = Hn(i, {
1043
+ const { body: f, width: h, height: b } = e, d = n === "mask" || (n === "bg" ? !1 : f.indexOf("currentColor") !== -1), k = Kt(f, {
1044
1044
  ...c,
1045
- width: p + "",
1045
+ width: h + "",
1046
1046
  height: b + ""
1047
1047
  });
1048
- return n.style = {
1048
+ return t.style = {
1049
1049
  ...l,
1050
- "--svg": Yn(j),
1051
- width: Be(c.width),
1052
- height: Be(c.height),
1053
- ...Zn,
1050
+ "--svg": Ut(k),
1051
+ width: Le(c.width),
1052
+ height: Le(c.height),
1053
+ ...Qt,
1054
1054
  ...d ? ve : qe,
1055
- ...g
1056
- }, Ce("span", n);
1055
+ ...i
1056
+ }, xe("span", t);
1057
1057
  };
1058
- Ne(!0);
1059
- Cn("", An);
1058
+ _e(!0);
1059
+ yt("", Mt);
1060
1060
  if (typeof document < "u" && typeof window < "u") {
1061
1061
  const e = window;
1062
1062
  if (e.IconifyPreload !== void 0) {
1063
1063
  const o = e.IconifyPreload, a = "Invalid IconifyPreload syntax.";
1064
- typeof o == "object" && o !== null && (o instanceof Array ? o : [o]).forEach((n) => {
1064
+ typeof o == "object" && o !== null && (o instanceof Array ? o : [o]).forEach((t) => {
1065
1065
  try {
1066
1066
  // Check if item is an object and not null/array
1067
- (typeof n != "object" || n === null || n instanceof Array || // Check for 'icons' and 'prefix'
1068
- typeof n.icons != "object" || typeof n.prefix != "string" || // Add icon set
1069
- !gn(n)) && console.error(a);
1067
+ (typeof t != "object" || t === null || t instanceof Array || // Check for 'icons' and 'prefix'
1068
+ typeof t.icons != "object" || typeof t.prefix != "string" || // Add icon set
1069
+ !gt(t)) && console.error(a);
1070
1070
  } catch {
1071
1071
  console.error(a);
1072
1072
  }
@@ -1076,22 +1076,22 @@ if (typeof document < "u" && typeof window < "u") {
1076
1076
  const o = e.IconifyProviders;
1077
1077
  if (typeof o == "object" && o !== null)
1078
1078
  for (let a in o) {
1079
- const n = "IconifyProviders[" + a + "] is invalid.";
1079
+ const t = "IconifyProviders[" + a + "] is invalid.";
1080
1080
  try {
1081
- const t = o[a];
1082
- if (typeof t != "object" || !t || t.resources === void 0)
1081
+ const n = o[a];
1082
+ if (typeof n != "object" || !n || n.resources === void 0)
1083
1083
  continue;
1084
- Sn(a, t) || console.error(n);
1084
+ Ct(a, n) || console.error(t);
1085
1085
  } catch {
1086
- console.error(n);
1086
+ console.error(t);
1087
1087
  }
1088
1088
  }
1089
1089
  }
1090
1090
  }
1091
- const Jn = {
1091
+ const Zt = {
1092
1092
  ...ge,
1093
1093
  body: ""
1094
- }, K = V({
1094
+ }, H = V({
1095
1095
  // Do not inherit other attributes: it is handled by render()
1096
1096
  inheritAttrs: !1,
1097
1097
  // Set initial data
@@ -1123,24 +1123,24 @@ const Jn = {
1123
1123
  return this._name = "", this.abortLoading(), {
1124
1124
  data: e
1125
1125
  };
1126
- let n;
1127
- if (typeof e != "string" || (n = ce(e, !1, !0)) === null)
1126
+ let t;
1127
+ if (typeof e != "string" || (t = ce(e, !1, !0)) === null)
1128
1128
  return this.abortLoading(), null;
1129
- let t = sn(n);
1130
- if (!t)
1131
- return (!this._loadingIcon || this._loadingIcon.name !== e) && (this.abortLoading(), this._name = "", t !== null && (this._loadingIcon = {
1129
+ let n = st(t);
1130
+ if (!n)
1131
+ return (!this._loadingIcon || this._loadingIcon.name !== e) && (this.abortLoading(), this._name = "", n !== null && (this._loadingIcon = {
1132
1132
  name: e,
1133
- abort: _n([n], () => {
1133
+ abort: Dt([t], () => {
1134
1134
  this.counter++;
1135
1135
  })
1136
1136
  })), null;
1137
1137
  if (this.abortLoading(), this._name !== e && (this._name = e, o && o(e)), a) {
1138
- t = Object.assign({}, t);
1139
- const s = a(t.body, n.name, n.prefix, n.provider);
1140
- typeof s == "string" && (t.body = s);
1138
+ n = Object.assign({}, n);
1139
+ const s = a(n.body, t.name, t.prefix, t.provider);
1140
+ typeof s == "string" && (n.body = s);
1141
1141
  }
1142
1142
  const l = ["iconify"];
1143
- return n.prefix !== "" && l.push("iconify--" + n.prefix), n.provider !== "" && l.push("iconify--" + n.provider), { data: t, classes: l };
1143
+ return t.prefix !== "" && l.push("iconify--" + t.prefix), t.provider !== "" && l.push("iconify--" + t.provider), { data: n, classes: l };
1144
1144
  }
1145
1145
  },
1146
1146
  // Render icon
@@ -1148,7 +1148,7 @@ const Jn = {
1148
1148
  this.counter;
1149
1149
  const e = this.$attrs, o = this.iconMounted || e.ssr ? this.getIcon(e.icon, e.onLoad, e.customise) : null;
1150
1150
  if (!o)
1151
- return Xe(Jn, e);
1151
+ return Xe(Zt, e);
1152
1152
  let a = e;
1153
1153
  return o.classes && (a = {
1154
1154
  ...e,
@@ -1158,16 +1158,16 @@ const Jn = {
1158
1158
  ...o.data
1159
1159
  }, a);
1160
1160
  }
1161
- }), et = ["disabled"], nt = {
1161
+ }), Jt = ["disabled"], en = {
1162
1162
  key: 0,
1163
1163
  class: "x-btn-icon"
1164
- }, tt = {
1164
+ }, tn = {
1165
1165
  key: 1,
1166
1166
  class: "x-btn-loading"
1167
- }, ot = { class: "x-btn-content" }, at = {
1167
+ }, nn = { class: "x-btn-content" }, on = {
1168
1168
  key: 2,
1169
1169
  class: "x-btn-icon"
1170
- }, lt = /* @__PURE__ */ V({
1170
+ }, an = /* @__PURE__ */ V({
1171
1171
  __name: "index",
1172
1172
  props: {
1173
1173
  type: { default: "default" },
@@ -1178,13 +1178,13 @@ const Jn = {
1178
1178
  loading: { type: Boolean, default: !1 },
1179
1179
  block: { type: Boolean, default: !1 },
1180
1180
  round: { type: Boolean, default: !1 },
1181
- plain: { type: Boolean, default: !1 }
1181
+ ghost: { type: Boolean, default: !1 }
1182
1182
  },
1183
1183
  emits: ["click"],
1184
1184
  setup(e, { emit: o }) {
1185
- const a = e, n = o, t = $(), l = $([]);
1185
+ const a = e, t = o, n = B(), l = B([]);
1186
1186
  let s = 0;
1187
- const g = X(() => [
1187
+ const i = L(() => [
1188
1188
  "x-btn",
1189
1189
  `x-btn-${a.type}`,
1190
1190
  `x-btn-${a.size}`,
@@ -1193,73 +1193,73 @@ const Jn = {
1193
1193
  "x-btn-loading": a.loading,
1194
1194
  "x-btn-block": a.block,
1195
1195
  "x-btn-round": a.round,
1196
- "x-btn-plain": a.plain
1196
+ "x-btn-ghost": a.ghost
1197
1197
  }
1198
1198
  ]);
1199
- function h(i) {
1200
- !a.disabled && !a.loading && n("click", i);
1199
+ function r(f) {
1200
+ !a.disabled && !a.loading && t("click", f);
1201
1201
  }
1202
- function c(i) {
1202
+ function c(f) {
1203
1203
  if (a.disabled || a.loading) return;
1204
- const p = t.value;
1205
- if (!p) return;
1206
- const b = p.getBoundingClientRect(), d = {
1204
+ const h = n.value;
1205
+ if (!h) return;
1206
+ const b = h.getBoundingClientRect(), d = {
1207
1207
  id: s++,
1208
1208
  style: {
1209
- left: `${i.clientX - b.left}px`,
1210
- top: `${i.clientY - b.top}px`
1209
+ left: `${f.clientX - b.left}px`,
1210
+ top: `${f.clientY - b.top}px`
1211
1211
  }
1212
1212
  };
1213
1213
  l.value.push(d), setTimeout(() => {
1214
- const j = l.value.findIndex((r) => r.id === d.id);
1215
- j > -1 && l.value.splice(j, 1);
1214
+ const k = l.value.findIndex((p) => p.id === d.id);
1215
+ k > -1 && l.value.splice(k, 1);
1216
1216
  }, 600);
1217
1217
  }
1218
- return (i, p) => (u(), v("button", {
1219
- class: B(g.value),
1218
+ return (f, h) => (m(), v("button", {
1219
+ class: $(i.value),
1220
1220
  disabled: e.disabled || e.loading,
1221
- onClick: h,
1221
+ onClick: r,
1222
1222
  onMousedown: c,
1223
1223
  ref_key: "buttonRef",
1224
- ref: t
1224
+ ref: n
1225
1225
  }, [
1226
- (u(!0), v(z, null, D(l.value, (b) => (u(), v("span", {
1226
+ (m(!0), v(z, null, D(l.value, (b) => (m(), v("span", {
1227
1227
  key: b.id,
1228
1228
  class: "x-btn-ripple",
1229
1229
  style: G(b.style)
1230
1230
  }, null, 4))), 128)),
1231
- e.icon && !e.loading ? (u(), v("span", nt, [
1232
- R(W(K), { icon: e.icon }, null, 8, ["icon"])
1231
+ e.icon && !e.loading ? (m(), v("span", en, [
1232
+ R(W(H), { icon: e.icon }, null, 8, ["icon"])
1233
1233
  ])) : A("", !0),
1234
- e.loading ? (u(), v("span", tt, [
1235
- R(W(K), { icon: "eos-icons:loading" })
1234
+ e.loading ? (m(), v("span", tn, [
1235
+ R(W(H), { icon: "eos-icons:loading" })
1236
1236
  ])) : A("", !0),
1237
- y("span", ot, [
1238
- Q(i.$slots, "default", {}, void 0, !0)
1237
+ y("span", nn, [
1238
+ K(f.$slots, "default", {}, void 0, !0)
1239
1239
  ]),
1240
- e.iconRight && !e.loading ? (u(), v("span", at, [
1241
- R(W(K), { icon: e.iconRight }, null, 8, ["icon"])
1240
+ e.iconRight && !e.loading ? (m(), v("span", on, [
1241
+ R(W(H), { icon: e.iconRight }, null, 8, ["icon"])
1242
1242
  ])) : A("", !0)
1243
- ], 42, et));
1243
+ ], 42, Jt));
1244
1244
  }
1245
1245
  }), F = (e, o) => {
1246
1246
  const a = e.__vccOpts || e;
1247
- for (const [n, t] of o)
1248
- a[n] = t;
1247
+ for (const [t, n] of o)
1248
+ a[t] = n;
1249
1249
  return a;
1250
- }, Le = /* @__PURE__ */ F(lt, [["__scopeId", "data-v-e1b43d39"]]), st = { class: "x-card-container" }, ct = ["onClick"], gt = { class: "relative p-2" }, it = ["src", "alt"], dt = {
1250
+ }, ze = /* @__PURE__ */ F(an, [["__scopeId", "data-v-4ae56e67"]]), ln = { class: "x-card-container" }, sn = ["onClick"], cn = { class: "relative p-2" }, gn = ["src", "alt"], dn = {
1251
1251
  key: 0,
1252
1252
  class: "absolute top-3 left-3"
1253
- }, ft = { class: "label-badge" }, rt = { class: "product-info p-5 ml-5" }, pt = { class: "text-sm lg:text-base text-gray-700 leading-relaxed line-clamp-2 mb-3" }, ht = { class: "flex items-center justify-between gap-2" }, mt = { class: "text-base lg:text-lg font-bold text-[var(--x-color-primary)]" }, ut = {
1253
+ }, rn = { class: "label-badge" }, fn = { class: "product-info p-5 ml-5" }, pn = { class: "text-sm lg:text-base text-gray-700 leading-relaxed line-clamp-2 mb-3" }, hn = { class: "flex items-center justify-between gap-2" }, mn = { class: "text-base lg:text-lg font-bold text-[var(--x-color-primary)]" }, un = {
1254
1254
  key: 0,
1255
1255
  class: "bi bi-heart text-gray-500"
1256
- }, vt = {
1256
+ }, vn = {
1257
1257
  key: 1,
1258
1258
  class: "bi bi-heart-fill text-[#FE374F]"
1259
- }, bt = ["onClick"], wt = { class: "relative flex-shrink-0 p-2" }, yt = { class: "aspect-square bg-gray-100 rounded-lg overflow-hidden" }, Ct = ["src", "alt"], St = {
1259
+ }, bn = ["onClick"], wn = { class: "relative flex-shrink-0 p-2" }, yn = { class: "aspect-square bg-gray-100 rounded-lg overflow-hidden" }, Cn = ["src", "alt"], xn = {
1260
1260
  key: 0,
1261
1261
  class: "absolute top-3 left-3"
1262
- }, xt = { class: "label-badge" }, Et = { class: "flex-1 flex flex-col justify-between product-info p-5 ml-5" }, Pt = { class: "text-sm lg:text-base text-gray-700 font-medium line-clamp-2 leading-relaxed mb-3" }, jt = { class: "flex items-center justify-between gap-2 mt-auto" }, kt = { class: "text-base lg:text-lg font-bold text-[var(--x-color-primary)]" }, Mt = /* @__PURE__ */ V({
1262
+ }, Sn = { class: "label-badge" }, En = { class: "flex-1 flex flex-col justify-between product-info p-5 ml-5" }, kn = { class: "text-sm lg:text-base text-gray-700 font-medium line-clamp-2 leading-relaxed mb-3" }, Pn = { class: "flex items-center justify-between gap-2 mt-auto" }, jn = { class: "text-base lg:text-lg font-bold text-[var(--x-color-primary)]" }, Mn = /* @__PURE__ */ V({
1263
1263
  __name: "index",
1264
1264
  props: {
1265
1265
  layout: { default: "grid" },
@@ -1269,7 +1269,7 @@ const Jn = {
1269
1269
  },
1270
1270
  emits: ["productClick", "like"],
1271
1271
  setup(e, { emit: o }) {
1272
- const a = e, n = o, t = [
1272
+ const a = e, t = o, n = [
1273
1273
  {
1274
1274
  id: "1",
1275
1275
  name: "北欧风简约陶瓷花瓶",
@@ -1366,111 +1366,111 @@ const Jn = {
1366
1366
  label: "特价",
1367
1367
  isWish: !1
1368
1368
  }
1369
- ], l = $([]), s = X(() => a.products && a.products.length > 0 ? a.products : l.value), g = X(() => {
1370
- const p = Math.min(Math.max(a.columns || 4, 1), 4), b = {
1369
+ ], l = B([]), s = L(() => a.products && a.products.length > 0 ? a.products : l.value), i = L(() => {
1370
+ const h = Math.min(Math.max(a.columns || 4, 1), 4), b = {
1371
1371
  1: "grid-cols-1",
1372
1372
  2: "grid-cols-1 md:grid-cols-2",
1373
1373
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
1374
1374
  4: "grid-cols-2 md:grid-cols-3 lg:grid-cols-4"
1375
1375
  };
1376
- return b[p] || b[4];
1377
- }), h = X(() => {
1378
- const p = Math.min(Math.max(a.columns || 4, 1), 4), b = {
1376
+ return b[h] || b[4];
1377
+ }), r = L(() => {
1378
+ const h = Math.min(Math.max(a.columns || 4, 1), 4), b = {
1379
1379
  1: "columns-1",
1380
1380
  2: "columns-1 md:columns-2",
1381
1381
  3: "columns-2 md:columns-2 lg:columns-3",
1382
1382
  4: "columns-2 sm:columns-2 md:columns-3 lg:columns-4"
1383
1383
  };
1384
- return b[p] || b[4];
1384
+ return b[h] || b[4];
1385
1385
  });
1386
1386
  se(() => {
1387
- a.useMockData && (!a.products || a.products.length === 0) && (l.value = t);
1387
+ a.useMockData && (!a.products || a.products.length === 0) && (l.value = n);
1388
1388
  });
1389
- const c = (p) => {
1390
- n("productClick", p);
1391
- }, i = (p) => {
1392
- p.isWish = !p.isWish, n("like", p);
1389
+ const c = (h) => {
1390
+ t("productClick", h);
1391
+ }, f = (h) => {
1392
+ h.isWish = !h.isWish, t("like", h);
1393
1393
  };
1394
- return (p, b) => (u(), v("div", st, [
1395
- e.layout === "masonry" ? (u(), v("div", {
1394
+ return (h, b) => (m(), v("div", ln, [
1395
+ e.layout === "masonry" ? (m(), v("div", {
1396
1396
  key: 0,
1397
- class: B(["masonry-layout", h.value, "gap-4 sm:gap-6"])
1397
+ class: $(["masonry-layout", r.value, "gap-4 sm:gap-6"])
1398
1398
  }, [
1399
- (u(!0), v(z, null, D(s.value, (d) => (u(), v("div", {
1399
+ (m(!0), v(z, null, D(s.value, (d) => (m(), v("div", {
1400
1400
  key: d.id + "-masonry",
1401
1401
  class: "mb-4 sm:mb-6 break-inside-avoid group cursor-pointer product-card",
1402
- onClick: (j) => c(d.id)
1402
+ onClick: (k) => c(d.id)
1403
1403
  }, [
1404
- y("div", gt, [
1404
+ y("div", cn, [
1405
1405
  y("img", {
1406
1406
  src: d.image,
1407
1407
  alt: d.name,
1408
1408
  loading: "lazy",
1409
1409
  class: "w-full h-auto rounded-lg bg-gray-100 object-cover transition-transform duration-300 group-hover:scale-[1.01]"
1410
- }, null, 8, it),
1411
- d.label ? (u(), v("div", dt, [
1412
- y("span", ft, T(d.label), 1)
1410
+ }, null, 8, gn),
1411
+ d.label ? (m(), v("div", dn, [
1412
+ y("span", rn, I(d.label), 1)
1413
1413
  ])) : A("", !0)
1414
1414
  ]),
1415
- y("div", rt, [
1416
- y("h3", pt, T(d.name), 1),
1417
- y("div", ht, [
1418
- y("span", mt, T(d.price), 1),
1419
- R(Le, {
1420
- onClick: H((j) => i(d), ["stop"]),
1415
+ y("div", fn, [
1416
+ y("h3", pn, I(d.name), 1),
1417
+ y("div", hn, [
1418
+ y("span", mn, I(d.price), 1),
1419
+ R(ze, {
1420
+ onClick: q((k) => f(d), ["stop"]),
1421
1421
  type: "text",
1422
1422
  size: "small",
1423
1423
  class: "like-button !min-w-0 !p-1"
1424
1424
  }, {
1425
1425
  default: Z(() => [
1426
- d.isWish ? (u(), v("i", vt)) : (u(), v("i", ut))
1426
+ d.isWish ? (m(), v("i", vn)) : (m(), v("i", un))
1427
1427
  ]),
1428
1428
  _: 2
1429
1429
  }, 1032, ["onClick"])
1430
1430
  ])
1431
1431
  ])
1432
- ], 8, ct))), 128))
1433
- ], 2)) : (u(), v("div", {
1432
+ ], 8, sn))), 128))
1433
+ ], 2)) : (m(), v("div", {
1434
1434
  key: 1,
1435
- class: B(["grid", g.value, "gap-4 lg:gap-6"])
1435
+ class: $(["grid", i.value, "gap-4 lg:gap-6"])
1436
1436
  }, [
1437
- (u(!0), v(z, null, D(s.value, (d) => (u(), v("div", {
1437
+ (m(!0), v(z, null, D(s.value, (d) => (m(), v("div", {
1438
1438
  key: d.id + "-grid",
1439
1439
  class: "h-full"
1440
1440
  }, [
1441
1441
  y("div", {
1442
1442
  class: "group cursor-pointer product-card h-full flex flex-col",
1443
- onClick: (j) => c(d.id)
1443
+ onClick: (k) => c(d.id)
1444
1444
  }, [
1445
- y("div", wt, [
1446
- y("div", yt, [
1445
+ y("div", wn, [
1446
+ y("div", yn, [
1447
1447
  y("img", {
1448
1448
  src: d.image,
1449
1449
  alt: d.name,
1450
1450
  class: "w-full h-full object-cover group-hover:scale-105 transition-transform duration-300",
1451
1451
  loading: "lazy"
1452
- }, null, 8, Ct)
1452
+ }, null, 8, Cn)
1453
1453
  ]),
1454
- d.label ? (u(), v("div", St, [
1455
- y("span", xt, T(d.label), 1)
1454
+ d.label ? (m(), v("div", xn, [
1455
+ y("span", Sn, I(d.label), 1)
1456
1456
  ])) : A("", !0)
1457
1457
  ]),
1458
- y("div", Et, [
1459
- y("h3", Pt, T(d.name), 1),
1460
- y("div", jt, [
1461
- y("span", kt, T(d.price), 1),
1462
- R(Le, {
1463
- onClick: H((j) => i(d), ["stop"]),
1458
+ y("div", En, [
1459
+ y("h3", kn, I(d.name), 1),
1460
+ y("div", Pn, [
1461
+ y("span", jn, I(d.price), 1),
1462
+ R(ze, {
1463
+ onClick: q((k) => f(d), ["stop"]),
1464
1464
  type: "text",
1465
1465
  size: "small",
1466
1466
  class: "like-button !min-w-0 !p-1"
1467
1467
  }, {
1468
1468
  default: Z(() => [
1469
- d.isWish ? (u(), re(W(K), {
1469
+ d.isWish ? (m(), fe(W(H), {
1470
1470
  key: 1,
1471
1471
  icon: "bi:heart-fill",
1472
1472
  class: "bi bi-heart-fill text-[#FE374F]"
1473
- })) : (u(), re(W(K), {
1473
+ })) : (m(), fe(W(H), {
1474
1474
  key: 0,
1475
1475
  icon: "bi:heart",
1476
1476
  class: "bi bi-heart text-gray-500"
@@ -1480,12 +1480,12 @@ const Jn = {
1480
1480
  }, 1032, ["onClick"])
1481
1481
  ])
1482
1482
  ])
1483
- ], 8, bt)
1483
+ ], 8, bn)
1484
1484
  ]))), 128))
1485
1485
  ], 2))
1486
1486
  ]));
1487
1487
  }
1488
- }), Bo = /* @__PURE__ */ F(Mt, [["__scopeId", "data-v-aec5fd31"]]), At = [
1488
+ }), Fo = /* @__PURE__ */ F(Mn, [["__scopeId", "data-v-aec5fd31"]]), An = [
1489
1489
  {
1490
1490
  name: "Afghanistan",
1491
1491
  code: "AF",
@@ -3567,11 +3567,11 @@ const Jn = {
3567
3567
  flagPng: "https://flagcdn.com/w40/zw.png",
3568
3568
  phoneCode: "+263"
3569
3569
  }
3570
- ], It = ["tabindex"], $t = { class: "flex items-center gap-2" }, Tt = ["src", "alt"], Bt = {
3570
+ ], In = ["tabindex"], $n = { class: "flex items-center gap-2" }, Tn = ["src", "alt"], Bn = {
3571
3571
  key: 0,
3572
3572
  class: "absolute z-[9999] w-full mt-1 bg-white border border-gray-300 rounded-md shadow-lg max-h-60 overflow-y-auto",
3573
3573
  style: { position: "absolute" }
3574
- }, Xt = ["onClick"], Lt = ["src", "alt", "onError"], Vt = /* @__PURE__ */ V({
3574
+ }, Ln = ["onClick"], Xn = ["src", "alt", "onError"], zn = /* @__PURE__ */ V({
3575
3575
  __name: "index",
3576
3576
  props: {
3577
3577
  modelValue: { default: "" },
@@ -3589,84 +3589,84 @@ const Jn = {
3589
3589
  },
3590
3590
  emits: ["update:modelValue", "change", "ip-detect-start", "ip-detect-success", "ip-detect-error"],
3591
3591
  setup(e, { expose: o, emit: a }) {
3592
- const n = e, t = a, l = $(!1), s = $(At), g = X(() => n.modelValue ? s.value.find(
3593
- (r) => n.returnType === "code" ? r.code === n.modelValue : r.name === n.modelValue
3594
- ) : null), h = X(() => {
3595
- const r = s.value.filter(
3596
- (C) => n.priorityCountries.includes(C.code)
3597
- ), f = s.value.filter(
3598
- (C) => !n.priorityCountries.includes(C.code)
3599
- ), S = r.sort((C, w) => {
3600
- const I = n.priorityCountries.indexOf(C.code), k = n.priorityCountries.indexOf(w.code);
3601
- return I - k;
3602
- }), P = f.sort((C, w) => C.name.localeCompare(w.name));
3603
- return [...S, ...P];
3592
+ const t = e, n = a, l = B(!1), s = B(An), i = L(() => t.modelValue ? s.value.find(
3593
+ (p) => t.returnType === "code" ? p.code === t.modelValue : p.name === t.modelValue
3594
+ ) : null), r = L(() => {
3595
+ const p = s.value.filter(
3596
+ (C) => t.priorityCountries.includes(C.code)
3597
+ ), g = s.value.filter(
3598
+ (C) => !t.priorityCountries.includes(C.code)
3599
+ ), x = p.sort((C, w) => {
3600
+ const T = t.priorityCountries.indexOf(C.code), j = t.priorityCountries.indexOf(w.code);
3601
+ return T - j;
3602
+ }), E = g.sort((C, w) => C.name.localeCompare(w.name));
3603
+ return [...x, ...E];
3604
3604
  }), c = () => {
3605
- n.disabled || (l.value = !l.value);
3606
- }, i = () => {
3605
+ t.disabled || (l.value = !l.value);
3606
+ }, f = () => {
3607
3607
  l.value = !1;
3608
- }, p = (r) => {
3609
- if (r) {
3610
- const f = n.returnType === "code" ? r.code : r.name;
3611
- t("update:modelValue", f), t("change", f, r);
3608
+ }, h = (p) => {
3609
+ if (p) {
3610
+ const g = t.returnType === "code" ? p.code : p.name;
3611
+ n("update:modelValue", g), n("change", g, p);
3612
3612
  } else
3613
- t("update:modelValue", "");
3614
- i();
3615
- }, b = (r, f) => {
3616
- const S = r.target;
3617
- f && S.src === f.flagSvg ? S.src = f.flagPng : g.value && S.src === g.value.flagSvg && (S.src = g.value.flagPng);
3613
+ n("update:modelValue", "");
3614
+ f();
3615
+ }, b = (p, g) => {
3616
+ const x = p.target;
3617
+ g && x.src === g.flagSvg ? x.src = g.flagPng : i.value && x.src === i.value.flagSvg && (x.src = i.value.flagPng);
3618
3618
  }, d = async () => {
3619
- if (!(!n.autoDetectFromIp || n.modelValue)) {
3620
- t("ip-detect-start");
3619
+ if (!(!t.autoDetectFromIp || t.modelValue)) {
3620
+ n("ip-detect-start");
3621
3621
  try {
3622
- const r = {
3623
- method: n.ipDetectMethod,
3622
+ const p = {
3623
+ method: t.ipDetectMethod,
3624
3624
  headers: {
3625
3625
  "Content-Type": "application/json",
3626
- ...n.ipDetectHeaders
3626
+ ...t.ipDetectHeaders
3627
3627
  }
3628
- }, f = await fetch(n.ipDetectUrl, r);
3629
- if (!f.ok)
3630
- throw new Error(`HTTP error! status: ${f.status}`);
3631
- const S = await f.json();
3632
- let P;
3633
- if (n.ipDetectResponseParser ? P = n.ipDetectResponseParser(S) : P = S.country || S.countryCode || S.country_code || "", P = P.toUpperCase(), !P)
3628
+ }, g = await fetch(t.ipDetectUrl, p);
3629
+ if (!g.ok)
3630
+ throw new Error(`HTTP error! status: ${g.status}`);
3631
+ const x = await g.json();
3632
+ let E;
3633
+ if (t.ipDetectResponseParser ? E = t.ipDetectResponseParser(x) : E = x.country || x.countryCode || x.country_code || "", E = E.toUpperCase(), !E)
3634
3634
  throw new Error("Country code not found in response");
3635
- console.log("Auto-detected country from IP:", P), t("ip-detect-success", P);
3635
+ console.log("Auto-detected country from IP:", E), n("ip-detect-success", E);
3636
3636
  const C = s.value.find(
3637
- (w) => w.code === P
3637
+ (w) => w.code === E
3638
3638
  );
3639
3639
  if (C) {
3640
- const w = n.returnType === "code" ? C.code : C.name;
3641
- t("update:modelValue", w), t("change", w, C);
3640
+ const w = t.returnType === "code" ? C.code : C.name;
3641
+ n("update:modelValue", w), n("change", w, C);
3642
3642
  } else
3643
- console.warn("Detected country code not found in country list:", P);
3644
- } catch (r) {
3645
- const f = r instanceof Error ? r : new Error(String(r));
3646
- console.warn("Failed to detect country from IP:", f), t("ip-detect-error", f);
3643
+ console.warn("Detected country code not found in country list:", E);
3644
+ } catch (p) {
3645
+ const g = p instanceof Error ? p : new Error(String(p));
3646
+ console.warn("Failed to detect country from IP:", g), n("ip-detect-error", g);
3647
3647
  }
3648
3648
  }
3649
- }, j = $();
3649
+ }, k = B();
3650
3650
  return se(async () => {
3651
- await _(), n.autoDetectFromIp && !n.modelValue && await d();
3652
- const r = (f) => {
3653
- j.value && !j.value.contains(f.target) && i();
3651
+ await N(), t.autoDetectFromIp && !t.modelValue && await d();
3652
+ const p = (g) => {
3653
+ k.value && !k.value.contains(g.target) && f();
3654
3654
  };
3655
- document.addEventListener("click", r), Ve(() => {
3656
- document.removeEventListener("click", r);
3655
+ document.addEventListener("click", p), Ve(() => {
3656
+ document.removeEventListener("click", p);
3657
3657
  });
3658
3658
  }), o({
3659
3659
  detectCountryFromIp: d,
3660
3660
  allCountries: Se(s),
3661
- sortedCountries: Se(h)
3662
- }), (r, f) => (u(), v("div", {
3661
+ sortedCountries: Se(r)
3662
+ }), (p, g) => (m(), v("div", {
3663
3663
  ref_key: "containerRef",
3664
- ref: j,
3664
+ ref: k,
3665
3665
  class: "country-select-container relative"
3666
3666
  }, [
3667
3667
  y("div", {
3668
3668
  onClick: c,
3669
- class: B([
3669
+ class: $([
3670
3670
  "w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-[#1a1a1a] focus:border-[#1a1a1a] transition-colors duration-200 cursor-pointer bg-white flex items-center justify-between",
3671
3671
  e.customClass,
3672
3672
  { "opacity-60 cursor-not-allowed": e.disabled }
@@ -3675,27 +3675,27 @@ const Jn = {
3675
3675
  onKeydown: [
3676
3676
  O(c, ["enter"]),
3677
3677
  O(c, ["space"]),
3678
- O(i, ["escape"])
3678
+ O(f, ["escape"])
3679
3679
  ]
3680
3680
  }, [
3681
- y("div", $t, [
3682
- g.value ? (u(), v("img", {
3681
+ y("div", $n, [
3682
+ i.value ? (m(), v("img", {
3683
3683
  key: 0,
3684
- src: g.value.flagSvg,
3685
- alt: g.value.name,
3684
+ src: i.value.flagSvg,
3685
+ alt: i.value.name,
3686
3686
  class: "w-5 h-4 object-cover rounded-sm",
3687
3687
  onError: b
3688
- }, null, 40, Tt)) : A("", !0),
3688
+ }, null, 40, Tn)) : A("", !0),
3689
3689
  y("span", {
3690
- class: B({ "text-gray-500": !g.value && e.placeholder })
3691
- }, T(g.value ? g.value.name : e.placeholder || "选择国家"), 3)
3690
+ class: $({ "text-gray-500": !i.value && e.placeholder })
3691
+ }, I(i.value ? i.value.name : e.placeholder || "选择国家"), 3)
3692
3692
  ]),
3693
- (u(), v("svg", {
3694
- class: B(["w-5 h-5 text-gray-400 transition-transform duration-200", { "rotate-180": l.value }]),
3693
+ (m(), v("svg", {
3694
+ class: $(["w-5 h-5 text-gray-400 transition-transform duration-200", { "rotate-180": l.value }]),
3695
3695
  fill: "none",
3696
3696
  stroke: "currentColor",
3697
3697
  viewBox: "0 0 24 24"
3698
- }, [...f[0] || (f[0] = [
3698
+ }, [...g[0] || (g[0] = [
3699
3699
  y("path", {
3700
3700
  "stroke-linecap": "round",
3701
3701
  "stroke-linejoin": "round",
@@ -3703,64 +3703,64 @@ const Jn = {
3703
3703
  d: "M19 9l-7 7-7-7"
3704
3704
  }, null, -1)
3705
3705
  ])], 2))
3706
- ], 42, It),
3707
- l.value && !e.disabled ? (u(), v("div", Bt, [
3708
- (u(!0), v(z, null, D(h.value, (S) => {
3709
- var P;
3710
- return u(), v("div", {
3711
- key: S.code,
3712
- onClick: (C) => p(S),
3713
- class: B(["px-3 py-2 hover:bg-gray-50 cursor-pointer flex items-center gap-2 transition-colors", { "bg-gray-100": ((P = g.value) == null ? void 0 : P.code) === S.code }])
3706
+ ], 42, In),
3707
+ l.value && !e.disabled ? (m(), v("div", Bn, [
3708
+ (m(!0), v(z, null, D(r.value, (x) => {
3709
+ var E;
3710
+ return m(), v("div", {
3711
+ key: x.code,
3712
+ onClick: (C) => h(x),
3713
+ class: $(["px-3 py-2 hover:bg-gray-50 cursor-pointer flex items-center gap-2 transition-colors", { "bg-gray-100": ((E = i.value) == null ? void 0 : E.code) === x.code }])
3714
3714
  }, [
3715
3715
  y("img", {
3716
- src: S.flagSvg,
3717
- alt: S.name,
3716
+ src: x.flagSvg,
3717
+ alt: x.name,
3718
3718
  class: "w-5 h-4 object-cover rounded-sm flex-shrink-0",
3719
- onError: (C) => b(C, S)
3720
- }, null, 40, Lt),
3721
- y("span", null, T(S.name), 1)
3722
- ], 10, Xt);
3719
+ onError: (C) => b(C, x)
3720
+ }, null, 40, Xn),
3721
+ y("span", null, I(x.name), 1)
3722
+ ], 10, Ln);
3723
3723
  }), 128))
3724
3724
  ])) : A("", !0),
3725
- l.value && !e.disabled ? (u(), v("div", {
3725
+ l.value && !e.disabled ? (m(), v("div", {
3726
3726
  key: 1,
3727
3727
  class: "fixed inset-0 z-[9998]",
3728
- onClick: i
3728
+ onClick: f
3729
3729
  })) : A("", !0)
3730
3730
  ], 512));
3731
3731
  }
3732
- }), Xo = /* @__PURE__ */ F(Vt, [["__scopeId", "data-v-08b31f1b"]]), zt = ["tabindex", "aria-expanded", "aria-labelledby"], Ft = { class: "flex items-center gap-2 min-h-0 flex-1" }, Ot = {
3732
+ }), Oo = /* @__PURE__ */ F(zn, [["__scopeId", "data-v-08b31f1b"]]), Vn = ["tabindex", "aria-expanded", "aria-labelledby"], Fn = { class: "flex items-center gap-2 min-h-0 flex-1" }, On = {
3733
3733
  key: 0,
3734
3734
  class: "text-gray-500"
3735
- }, Rt = {
3735
+ }, Rn = {
3736
3736
  key: 1,
3737
3737
  class: "flex flex-wrap gap-1"
3738
- }, Dt = {
3738
+ }, Dn = {
3739
3739
  key: 0,
3740
3740
  class: "text-gray-900"
3741
- }, _t = ["onClick"], Nt = {
3741
+ }, Nn = ["onClick"], _n = {
3742
3742
  key: 0,
3743
3743
  class: "absolute z-[9999] w-full mt-2 bg-white rounded-xl shadow-xl border border-gray-100/50 max-h-60 overflow-auto backdrop-blur-sm",
3744
3744
  role: "listbox"
3745
- }, Gt = {
3745
+ }, Gn = {
3746
3746
  key: 0,
3747
3747
  class: "p-3 border-b border-gray-50/80"
3748
- }, Wt = { class: "py-1" }, Kt = {
3748
+ }, Wn = { class: "py-1" }, Kn = {
3749
3749
  key: 0,
3750
3750
  class: "px-4 py-3 text-sm text-gray-400 text-center"
3751
- }, Ht = ["onClick", "onKeydown", "aria-selected"], qt = { class: "flex items-center gap-3" }, Ut = {
3751
+ }, Hn = ["onClick", "onKeydown", "aria-selected"], qn = { class: "flex items-center gap-3" }, Un = {
3752
3752
  key: 0,
3753
3753
  class: "flex items-center"
3754
- }, Yt = {
3754
+ }, Yn = {
3755
3755
  key: 0,
3756
3756
  class: "bi bi-check text-[#1a1a1a] text-xs"
3757
- }, Qt = {
3757
+ }, Qn = {
3758
3758
  key: 1,
3759
3759
  class: "flex items-center"
3760
- }, Zt = {
3760
+ }, Zn = {
3761
3761
  key: 0,
3762
3762
  class: "w-1.5 h-1.5 bg-white rounded-full"
3763
- }, Jt = { class: "flex-1" }, eo = /* @__PURE__ */ V({
3763
+ }, Jn = { class: "flex-1" }, eo = /* @__PURE__ */ V({
3764
3764
  __name: "index",
3765
3765
  props: {
3766
3766
  modelValue: {},
@@ -3778,73 +3778,73 @@ const Jn = {
3778
3778
  },
3779
3779
  emits: ["update:modelValue", "change", "open", "close"],
3780
3780
  setup(e, { expose: o, emit: a }) {
3781
- const n = e, t = a, l = $(!1), s = $(""), g = $(), h = $(), c = X(() => !n.searchable || !s.value ? n.options : n.options.filter(
3782
- (m) => j(m).toLowerCase().includes(s.value.toLowerCase())
3783
- )), i = X(() => n.multiple ? null : n.options.find((m) => r(m) === n.modelValue) || null), p = X(() => n.multiple ? Array.isArray(n.modelValue) ? n.options.filter(
3784
- (m) => n.modelValue.includes(r(m))
3785
- ) : [] : []), b = X(() => n.multiple ? p.value.length > 0 : i.value !== null), d = X(() => `select-label-${Math.random().toString(36).substr(2, 9)}`), j = (m) => typeof m == "object" ? m[n.labelKey] : m, r = (m) => typeof m == "object" ? m[n.valueKey] : m, f = (m) => {
3786
- const E = r(m);
3787
- return n.multiple ? Array.isArray(n.modelValue) && n.modelValue.includes(E) : n.modelValue === E;
3788
- }, S = (m) => {
3789
- if (m.disabled) return;
3790
- const E = r(m);
3791
- if (n.multiple) {
3792
- const x = Array.isArray(n.modelValue) ? [...n.modelValue] : [], M = x.indexOf(E);
3793
- M > -1 ? x.splice(M, 1) : x.push(E), t("update:modelValue", x), t("change", x);
3781
+ const t = e, n = a, l = B(!1), s = B(""), i = B(), r = B(), c = L(() => !t.searchable || !s.value ? t.options : t.options.filter(
3782
+ (u) => k(u).toLowerCase().includes(s.value.toLowerCase())
3783
+ )), f = L(() => t.multiple ? null : t.options.find((u) => p(u) === t.modelValue) || null), h = L(() => t.multiple ? Array.isArray(t.modelValue) ? t.options.filter(
3784
+ (u) => t.modelValue.includes(p(u))
3785
+ ) : [] : []), b = L(() => t.multiple ? h.value.length > 0 : f.value !== null), d = L(() => `select-label-${Math.random().toString(36).substr(2, 9)}`), k = (u) => typeof u == "object" ? u[t.labelKey] : u, p = (u) => typeof u == "object" ? u[t.valueKey] : u, g = (u) => {
3786
+ const P = p(u);
3787
+ return t.multiple ? Array.isArray(t.modelValue) && t.modelValue.includes(P) : t.modelValue === P;
3788
+ }, x = (u) => {
3789
+ if (u.disabled) return;
3790
+ const P = p(u);
3791
+ if (t.multiple) {
3792
+ const S = Array.isArray(t.modelValue) ? [...t.modelValue] : [], M = S.indexOf(P);
3793
+ M > -1 ? S.splice(M, 1) : S.push(P), n("update:modelValue", S), n("change", S);
3794
3794
  } else
3795
- t("update:modelValue", E), t("change", E), I();
3796
- }, P = (m) => {
3797
- if (!n.multiple) return;
3798
- const E = r(m), x = Array.isArray(n.modelValue) ? [...n.modelValue] : [], M = x.indexOf(E);
3799
- M > -1 && (x.splice(M, 1), t("update:modelValue", x), t("change", x));
3795
+ n("update:modelValue", P), n("change", P), T();
3796
+ }, E = (u) => {
3797
+ if (!t.multiple) return;
3798
+ const P = p(u), S = Array.isArray(t.modelValue) ? [...t.modelValue] : [], M = S.indexOf(P);
3799
+ M > -1 && (S.splice(M, 1), n("update:modelValue", S), n("change", S));
3800
3800
  }, C = () => {
3801
- n.disabled || (l.value ? I() : w());
3801
+ t.disabled || (l.value ? T() : w());
3802
3802
  }, w = () => {
3803
- l.value = !0, t("open"), _(() => {
3804
- n.searchable && h.value && h.value.focus();
3803
+ l.value = !0, n("open"), N(() => {
3804
+ t.searchable && r.value && r.value.focus();
3805
3805
  });
3806
- }, I = () => {
3807
- l.value = !1, s.value = "", t("close");
3808
- }, k = (m) => {
3809
- g.value && !g.value.contains(m.target) && I();
3810
- }, L = (m) => {
3806
+ }, T = () => {
3807
+ l.value = !1, s.value = "", n("close");
3808
+ }, j = (u) => {
3809
+ i.value && !i.value.contains(u.target) && T();
3810
+ }, X = (u) => {
3811
3811
  if (!l.value) return;
3812
- const E = c.value, x = E.findIndex((M) => f(M));
3813
- switch (m.key) {
3812
+ const P = c.value, S = P.findIndex((M) => g(M));
3813
+ switch (u.key) {
3814
3814
  case "ArrowDown":
3815
- m.preventDefault();
3815
+ u.preventDefault();
3816
3816
  break;
3817
3817
  case "ArrowUp":
3818
- m.preventDefault();
3818
+ u.preventDefault();
3819
3819
  break;
3820
3820
  case "Enter":
3821
3821
  case " ":
3822
- m.preventDefault(), x >= 0 && E[x] && S(E[x]);
3822
+ u.preventDefault(), S >= 0 && P[S] && x(P[S]);
3823
3823
  break;
3824
3824
  }
3825
3825
  };
3826
3826
  return se(() => {
3827
- document.addEventListener("click", k), document.addEventListener("keydown", L);
3827
+ document.addEventListener("click", j), document.addEventListener("keydown", X);
3828
3828
  }), Ve(() => {
3829
- document.removeEventListener("click", k), document.removeEventListener("keydown", L);
3829
+ document.removeEventListener("click", j), document.removeEventListener("keydown", X);
3830
3830
  }), o({
3831
3831
  open: w,
3832
- close: I,
3832
+ close: T,
3833
3833
  toggle: C
3834
- }), (m, E) => (u(), v("div", {
3834
+ }), (u, P) => (m(), v("div", {
3835
3835
  class: "relative",
3836
3836
  style: G({ width: e.width }),
3837
3837
  ref_key: "selectContainer",
3838
- ref: g
3838
+ ref: i
3839
3839
  }, [
3840
3840
  y("div", {
3841
3841
  onClick: C,
3842
3842
  onKeydown: [
3843
3843
  O(C, ["enter"]),
3844
3844
  O(C, ["space"]),
3845
- O(I, ["escape"])
3845
+ O(T, ["escape"])
3846
3846
  ],
3847
- class: B([
3847
+ class: $([
3848
3848
  "flex items-center justify-between w-full px-4 py-1.5 text-sm bg-white rounded-md cursor-pointer transition-all duration-200 border ",
3849
3849
  "focus:outline-none focus:ring-2 focus:ring-[#1a1a1a]/50 focus:ring-offset-1",
3850
3850
  {
@@ -3861,27 +3861,27 @@ const Jn = {
3861
3861
  "aria-haspopup": !0,
3862
3862
  "aria-labelledby": d.value
3863
3863
  }, [
3864
- y("div", Ft, [
3865
- e.placeholder && !b.value ? (u(), v("span", Ot, T(e.placeholder), 1)) : (u(), v("div", Rt, [
3866
- e.multiple ? (u(!0), v(z, { key: 1 }, D(p.value, (x) => (u(), v("span", {
3867
- key: r(x),
3864
+ y("div", Fn, [
3865
+ e.placeholder && !b.value ? (m(), v("span", On, I(e.placeholder), 1)) : (m(), v("div", Rn, [
3866
+ e.multiple ? (m(!0), v(z, { key: 1 }, D(h.value, (S) => (m(), v("span", {
3867
+ key: p(S),
3868
3868
  class: "inline-flex items-center gap-1.5 px-2.5 py-1 text-xs bg-[#FFF] text-[#1a1a1a] rounded-full border border-[#1a1a1a]/50"
3869
3869
  }, [
3870
- ze(T(j(x)) + " ", 1),
3870
+ be(I(k(S)) + " ", 1),
3871
3871
  y("button", {
3872
- onClick: H((M) => P(x), ["stop"]),
3872
+ onClick: q((M) => E(S), ["stop"]),
3873
3873
  class: "rounded-full p-0.5 transition-colors duration-150",
3874
3874
  type: "button"
3875
- }, [...E[1] || (E[1] = [
3875
+ }, [...P[1] || (P[1] = [
3876
3876
  y("i", { class: "bi bi-x text-xs text-[#1a1a1a]" }, null, -1)
3877
- ])], 8, _t)
3878
- ]))), 128)) : (u(), v(z, { key: 0 }, [
3879
- i.value ? (u(), v("span", Dt, T(j(i.value)), 1)) : A("", !0)
3877
+ ])], 8, Nn)
3878
+ ]))), 128)) : (m(), v(z, { key: 0 }, [
3879
+ f.value ? (m(), v("span", Dn, I(k(f.value)), 1)) : A("", !0)
3880
3880
  ], 64))
3881
3881
  ]))
3882
3882
  ]),
3883
3883
  y("i", {
3884
- class: B([
3884
+ class: $([
3885
3885
  "bi text-gray-400 transition-transform duration-200 text-lg",
3886
3886
  {
3887
3887
  "bi-chevron-down": !l.value,
@@ -3889,7 +3889,7 @@ const Jn = {
3889
3889
  }
3890
3890
  ])
3891
3891
  }, null, 2)
3892
- ], 42, zt),
3892
+ ], 42, Vn),
3893
3893
  R(pe, {
3894
3894
  "enter-active-class": "transition ease-out duration-200",
3895
3895
  "enter-from-class": "opacity-0 scale-95",
@@ -3899,69 +3899,69 @@ const Jn = {
3899
3899
  "leave-to-class": "opacity-0 scale-95"
3900
3900
  }, {
3901
3901
  default: Z(() => [
3902
- l.value ? (u(), v("div", Nt, [
3903
- e.searchable ? (u(), v("div", Gt, [
3902
+ l.value ? (m(), v("div", _n, [
3903
+ e.searchable ? (m(), v("div", Gn, [
3904
3904
  Qe(y("input", {
3905
3905
  ref_key: "searchInput",
3906
- ref: h,
3907
- "onUpdate:modelValue": E[0] || (E[0] = (x) => s.value = x),
3906
+ ref: r,
3907
+ "onUpdate:modelValue": P[0] || (P[0] = (S) => s.value = S),
3908
3908
  type: "text",
3909
3909
  class: "w-full px-3 py-2 text-sm bg-gray-50/50 border border-gray-200/60 rounded-lg focus:outline-none focus:ring-1 focus:ring-[#1a1a1a]/50 focus:border-[#1a1a1a]/50 transition-all duration-200",
3910
3910
  placeholder: "搜索...",
3911
- onKeydown: O(I, ["escape"])
3911
+ onKeydown: O(T, ["escape"])
3912
3912
  }, null, 544), [
3913
3913
  [Ze, s.value]
3914
3914
  ])
3915
3915
  ])) : A("", !0),
3916
- y("div", Wt, [
3917
- c.value.length === 0 ? (u(), v("div", Kt, T(e.noOptionsText), 1)) : A("", !0),
3918
- (u(!0), v(z, null, D(c.value, (x) => (u(), v("div", {
3919
- key: r(x),
3920
- onClick: (M) => S(x),
3916
+ y("div", Wn, [
3917
+ c.value.length === 0 ? (m(), v("div", Kn, I(e.noOptionsText), 1)) : A("", !0),
3918
+ (m(!0), v(z, null, D(c.value, (S) => (m(), v("div", {
3919
+ key: p(S),
3920
+ onClick: (M) => x(S),
3921
3921
  onKeydown: [
3922
- O((M) => S(x), ["enter"]),
3923
- O((M) => S(x), ["space"])
3922
+ O((M) => x(S), ["enter"]),
3923
+ O((M) => x(S), ["space"])
3924
3924
  ],
3925
- class: B([
3925
+ class: $([
3926
3926
  "px-4 py-3 text-sm cursor-pointer transition-all duration-150",
3927
3927
  {
3928
- "bg-[#f2f2f2] text-[#1a1a1a] font-medium": f(x),
3929
- "hover:bg-[#f2f2f2] text-gray-700": !f(x)
3928
+ "bg-[#f2f2f2] text-[#1a1a1a] font-medium": g(S),
3929
+ "hover:bg-[#f2f2f2] text-gray-700": !g(S)
3930
3930
  }
3931
3931
  ]),
3932
3932
  role: "option",
3933
- "aria-selected": f(x),
3933
+ "aria-selected": g(S),
3934
3934
  tabindex: 0
3935
3935
  }, [
3936
- y("div", qt, [
3937
- e.multiple ? (u(), v("div", Ut, [
3936
+ y("div", qn, [
3937
+ e.multiple ? (m(), v("div", Un, [
3938
3938
  y("div", {
3939
- class: B([
3939
+ class: $([
3940
3940
  "w-4 h-4 rounded border flex items-center justify-center transition-all duration-150",
3941
3941
  {
3942
- "border-[#1a1a1a] text-white": f(x),
3943
- "border-gray-300 bg-white": !f(x)
3942
+ "border-[#1a1a1a] text-white": g(S),
3943
+ "border-gray-300 bg-white": !g(S)
3944
3944
  }
3945
3945
  ])
3946
3946
  }, [
3947
- f(x) ? (u(), v("i", Yt)) : A("", !0)
3947
+ g(S) ? (m(), v("i", Yn)) : A("", !0)
3948
3948
  ], 2)
3949
- ])) : (u(), v("div", Qt, [
3949
+ ])) : (m(), v("div", Qn, [
3950
3950
  y("div", {
3951
- class: B([
3951
+ class: $([
3952
3952
  "w-4 h-4 rounded-full border-2 flex items-center justify-center transition-all duration-150",
3953
3953
  {
3954
- "border-[#1a1a1a] bg-[#1a1a1a]": f(x),
3955
- "border-gray-300 bg-white": !f(x)
3954
+ "border-[#1a1a1a] bg-[#1a1a1a]": g(S),
3955
+ "border-gray-300 bg-white": !g(S)
3956
3956
  }
3957
3957
  ])
3958
3958
  }, [
3959
- f(x) ? (u(), v("div", Zt)) : A("", !0)
3959
+ g(S) ? (m(), v("div", Zn)) : A("", !0)
3960
3960
  ], 2)
3961
3961
  ])),
3962
- y("span", Jt, T(j(x)), 1)
3962
+ y("span", Jn, I(k(S)), 1)
3963
3963
  ])
3964
- ], 42, Ht))), 128))
3964
+ ], 42, Hn))), 128))
3965
3965
  ])
3966
3966
  ])) : A("", !0)
3967
3967
  ]),
@@ -3969,7 +3969,7 @@ const Jn = {
3969
3969
  })
3970
3970
  ], 4));
3971
3971
  }
3972
- }), Lo = /* @__PURE__ */ F(eo, [["__scopeId", "data-v-1f7381d8"]]), no = ["type", "value", "placeholder", "disabled", "readonly", "required", "maxlength", "minlength", "autocomplete"], to = {
3972
+ }), Ro = /* @__PURE__ */ F(eo, [["__scopeId", "data-v-1f7381d8"]]), to = ["type", "value", "placeholder", "disabled", "readonly", "required", "maxlength", "minlength", "autocomplete"], no = {
3973
3973
  key: 2,
3974
3974
  class: "x-input-count"
3975
3975
  }, oo = /* @__PURE__ */ V({
@@ -3992,26 +3992,26 @@ const Jn = {
3992
3992
  },
3993
3993
  emits: ["update:modelValue", "input", "change", "blur", "focus", "clear", "keydown", "keyup"],
3994
3994
  setup(e, { expose: o, emit: a }) {
3995
- const n = e, t = a, l = $(), s = $(!1), g = X(() => !!n.label), h = X(() => {
3996
- const w = n.modelValue;
3995
+ const t = e, n = a, l = B(), s = B(!1), i = L(() => !!t.label), r = L(() => {
3996
+ const w = t.modelValue;
3997
3997
  return w != null && w !== "";
3998
- }), c = X(() => String(n.modelValue || "").length), i = (w) => {
3999
- const k = w.target.value;
4000
- t("update:modelValue", k), t("input", k, w);
4001
- }, p = (w) => {
4002
- const k = w.target.value;
4003
- t("change", k, w);
3998
+ }), c = L(() => String(t.modelValue || "").length), f = (w) => {
3999
+ const j = w.target.value;
4000
+ n("update:modelValue", j), n("input", j, w);
4001
+ }, h = (w) => {
4002
+ const j = w.target.value;
4003
+ n("change", j, w);
4004
4004
  }, b = (w) => {
4005
- s.value = !1, t("blur", w);
4005
+ s.value = !1, n("blur", w);
4006
4006
  }, d = (w) => {
4007
- s.value = !0, t("focus", w);
4008
- }, j = (w) => {
4009
- t("keydown", w);
4010
- }, r = (w) => {
4011
- t("keyup", w);
4012
- }, f = () => {
4007
+ s.value = !0, n("focus", w);
4008
+ }, k = (w) => {
4009
+ n("keydown", w);
4010
+ }, p = (w) => {
4011
+ n("keyup", w);
4012
+ }, g = () => {
4013
4013
  var w;
4014
- t("update:modelValue", ""), t("clear"), (w = l.value) == null || w.focus();
4014
+ n("update:modelValue", ""), n("clear"), (w = l.value) == null || w.focus();
4015
4015
  };
4016
4016
  return o({
4017
4017
  focus: () => {
@@ -4027,7 +4027,7 @@ const Jn = {
4027
4027
  (w = l.value) == null || w.select();
4028
4028
  },
4029
4029
  ref: l
4030
- }), (w, I) => (u(), v("div", {
4030
+ }), (w, T) => (m(), v("div", {
4031
4031
  class: "x-input-group",
4032
4032
  style: G({ width: e.width })
4033
4033
  }, [
@@ -4036,57 +4036,57 @@ const Jn = {
4036
4036
  ref: l,
4037
4037
  type: e.type,
4038
4038
  value: e.modelValue,
4039
- placeholder: g.value ? "" : e.placeholder,
4039
+ placeholder: i.value ? "" : e.placeholder,
4040
4040
  disabled: e.disabled,
4041
4041
  readonly: e.readonly,
4042
4042
  required: e.required,
4043
4043
  maxlength: e.maxlength,
4044
4044
  minlength: e.minlength,
4045
4045
  autocomplete: e.autocomplete,
4046
- class: B([
4046
+ class: $([
4047
4047
  "x-input",
4048
4048
  {
4049
4049
  "x-input--disabled": e.disabled,
4050
4050
  "x-input--error": e.error,
4051
4051
  "x-input--clearable": e.clearable && e.modelValue,
4052
- "x-input--with-label": g.value
4052
+ "x-input--with-label": i.value
4053
4053
  }
4054
4054
  ]),
4055
- onInput: i,
4055
+ onInput: f,
4056
4056
  onBlur: b,
4057
4057
  onFocus: d,
4058
- onKeydown: j,
4059
- onKeyup: r,
4060
- onChange: p
4061
- }, null, 42, no),
4062
- e.label ? (u(), v("label", {
4058
+ onKeydown: k,
4059
+ onKeyup: p,
4060
+ onChange: h
4061
+ }, null, 42, to),
4062
+ e.label ? (m(), v("label", {
4063
4063
  key: 0,
4064
- class: B([
4064
+ class: $([
4065
4065
  "x-input-label",
4066
4066
  {
4067
- "x-input-label--active": s.value || h.value,
4067
+ "x-input-label--active": s.value || r.value,
4068
4068
  "x-input-label--error": e.error
4069
4069
  }
4070
4070
  ])
4071
- }, T(e.label), 3)) : A("", !0),
4072
- e.clearable && e.modelValue && !e.disabled ? (u(), v("button", {
4071
+ }, I(e.label), 3)) : A("", !0),
4072
+ e.clearable && e.modelValue && !e.disabled ? (m(), v("button", {
4073
4073
  key: 1,
4074
4074
  type: "button",
4075
4075
  class: "x-input-clear",
4076
- onClick: f,
4077
- onMousedown: I[0] || (I[0] = H(() => {
4076
+ onClick: g,
4077
+ onMousedown: T[0] || (T[0] = q(() => {
4078
4078
  }, ["prevent"]))
4079
4079
  }, [
4080
- R(W(K), { icon: "bi:x-circle" })
4080
+ R(W(H), { icon: "bi:x-circle" })
4081
4081
  ], 32)) : A("", !0),
4082
- e.showWordLimit && e.maxlength ? (u(), v("div", to, T(c.value) + " / " + T(e.maxlength), 1)) : A("", !0)
4082
+ e.showWordLimit && e.maxlength ? (m(), v("div", no, I(c.value) + " / " + I(e.maxlength), 1)) : A("", !0)
4083
4083
  ], 4));
4084
4084
  }
4085
- }), Vo = /* @__PURE__ */ F(oo, [["__scopeId", "data-v-d7d149e3"]]), ao = { class: "x-checkboxes" }, lo = ["onClick"], so = { class: "checkbox-wrapper" }, co = ["checked", "disabled", "onChange"], go = { class: "checkbox-custom" }, io = {
4085
+ }), Do = /* @__PURE__ */ F(oo, [["__scopeId", "data-v-d7d149e3"]]), ao = { class: "x-checkboxes" }, lo = ["onClick"], so = { class: "checkbox-wrapper" }, co = ["checked", "disabled", "onChange"], go = { class: "checkbox-custom" }, io = {
4086
4086
  key: 0,
4087
4087
  class: "check-icon",
4088
4088
  viewBox: "0 0 24 24"
4089
- }, fo = { class: "option-label" }, ro = /* @__PURE__ */ V({
4089
+ }, ro = { class: "option-label" }, fo = /* @__PURE__ */ V({
4090
4090
  __name: "index",
4091
4091
  props: {
4092
4092
  options: {},
@@ -4099,70 +4099,70 @@ const Jn = {
4099
4099
  },
4100
4100
  emits: ["update:modelValue", "change"],
4101
4101
  setup(e, { expose: o, emit: a }) {
4102
- const n = e, t = a, l = (p) => n.modelValue && n.modelValue.includes(p), s = (p) => {
4103
- if (n.disabled) return;
4104
- const b = n.options.find((r) => r.value === p);
4102
+ const t = e, n = a, l = (h) => t.modelValue && t.modelValue.includes(h), s = (h) => {
4103
+ if (t.disabled) return;
4104
+ const b = t.options.find((p) => p.value === h);
4105
4105
  if (b != null && b.disabled) return;
4106
- const d = [...n.modelValue], j = d.indexOf(p);
4107
- if (j > -1)
4108
- d.splice(j, 1);
4106
+ const d = [...t.modelValue], k = d.indexOf(h);
4107
+ if (k > -1)
4108
+ d.splice(k, 1);
4109
4109
  else {
4110
- if (n.maxSelections > 0 && d.length >= n.maxSelections)
4110
+ if (t.maxSelections > 0 && d.length >= t.maxSelections)
4111
4111
  return;
4112
- d.push(p);
4112
+ d.push(h);
4113
4113
  }
4114
- t("update:modelValue", d), t("change", d);
4115
- }, g = (p) => {
4116
- !n.disabled && !p.disabled && s(p.value);
4114
+ n("update:modelValue", d), n("change", d);
4115
+ }, i = (h) => {
4116
+ !t.disabled && !h.disabled && s(h.value);
4117
4117
  };
4118
4118
  return o({
4119
4119
  clearAll: () => {
4120
- n.disabled || (t("update:modelValue", []), t("change", []));
4120
+ t.disabled || (n("update:modelValue", []), n("change", []));
4121
4121
  },
4122
4122
  selectAll: () => {
4123
- if (n.disabled) return;
4124
- const b = n.options.filter((d) => !d.disabled).map((d) => d.value);
4125
- n.maxSelections > 0 ? (t("update:modelValue", b.slice(0, n.maxSelections)), t("change", b.slice(0, n.maxSelections))) : (t("update:modelValue", b), t("change", b));
4123
+ if (t.disabled) return;
4124
+ const b = t.options.filter((d) => !d.disabled).map((d) => d.value);
4125
+ t.maxSelections > 0 ? (n("update:modelValue", b.slice(0, t.maxSelections)), n("change", b.slice(0, t.maxSelections))) : (n("update:modelValue", b), n("change", b));
4126
4126
  },
4127
- removeOption: (p) => {
4128
- s(p);
4127
+ removeOption: (h) => {
4128
+ s(h);
4129
4129
  }
4130
- }), (p, b) => (u(), v("div", ao, [
4130
+ }), (h, b) => (m(), v("div", ao, [
4131
4131
  y("div", {
4132
- class: B(["options-container", [
4132
+ class: $(["options-container", [
4133
4133
  `options-container--${e.layout}`,
4134
4134
  { "options-container--disabled": e.disabled }
4135
4135
  ]]),
4136
4136
  style: G(e.layout === "grid" ? { gridTemplateColumns: `repeat(${e.columns}, 1fr)` } : {})
4137
4137
  }, [
4138
- (u(!0), v(z, null, D(e.options, (d) => (u(), v("div", {
4138
+ (m(!0), v(z, null, D(e.options, (d) => (m(), v("div", {
4139
4139
  key: d.value,
4140
- class: B(["option-item", {
4140
+ class: $(["option-item", {
4141
4141
  "option-selected": l(d.value),
4142
4142
  "option-disabled": e.disabled || d.disabled
4143
4143
  }]),
4144
- onClick: (j) => g(d)
4144
+ onClick: (k) => i(d)
4145
4145
  }, [
4146
4146
  y("div", so, [
4147
4147
  y("input", {
4148
4148
  type: "checkbox",
4149
4149
  checked: l(d.value),
4150
4150
  disabled: e.disabled || d.disabled,
4151
- onChange: H((j) => s(d.value), ["stop"]),
4151
+ onChange: q((k) => s(d.value), ["stop"]),
4152
4152
  class: "checkbox-input"
4153
4153
  }, null, 40, co),
4154
4154
  y("div", go, [
4155
- l(d.value) ? (u(), v("svg", io, [...b[0] || (b[0] = [
4155
+ l(d.value) ? (m(), v("svg", io, [...b[0] || (b[0] = [
4156
4156
  y("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" }, null, -1)
4157
4157
  ])])) : A("", !0)
4158
4158
  ])
4159
4159
  ]),
4160
- y("span", fo, T(d.label), 1)
4160
+ y("span", ro, I(d.label), 1)
4161
4161
  ], 10, lo))), 128))
4162
4162
  ], 6)
4163
4163
  ]));
4164
4164
  }
4165
- }), zo = /* @__PURE__ */ F(ro, [["__scopeId", "data-v-05984fcf"]]), po = ["onClick", "disabled", "aria-expanded", "aria-controls"], ho = { class: "accordion-title" }, mo = { class: "accordion-icon" }, uo = ["id"], vo = { class: "accordion-body" }, bo = /* @__PURE__ */ V({
4165
+ }), No = /* @__PURE__ */ F(fo, [["__scopeId", "data-v-05984fcf"]]), po = ["onClick", "disabled", "aria-expanded", "aria-controls"], ho = { class: "accordion-title" }, mo = { class: "accordion-icon" }, uo = ["id"], vo = { class: "accordion-body" }, bo = /* @__PURE__ */ V({
4166
4166
  __name: "index",
4167
4167
  props: {
4168
4168
  items: {},
@@ -4173,73 +4173,73 @@ const Jn = {
4173
4173
  },
4174
4174
  emits: ["change", "item-click"],
4175
4175
  setup(e, { expose: o, emit: a }) {
4176
- const n = e, t = a, l = $(new Set(n.defaultOpen)), s = $({}), g = $({}), h = (r, f) => {
4177
- r && (g.value[f] = r, _(() => {
4178
- const S = r.querySelector(".accordion-body");
4179
- S && (s.value[f] = S.scrollHeight);
4176
+ const t = e, n = a, l = B(new Set(t.defaultOpen)), s = B({}), i = B({}), r = (p, g) => {
4177
+ p && (i.value[g] = p, N(() => {
4178
+ const x = p.querySelector(".accordion-body");
4179
+ x && (s.value[g] = x.scrollHeight);
4180
4180
  }));
4181
- }, c = (r) => {
4182
- var S;
4183
- if (n.disabled || (S = n.items[r]) != null && S.disabled)
4181
+ }, c = (p) => {
4182
+ var x;
4183
+ if (t.disabled || (x = t.items[p]) != null && x.disabled)
4184
4184
  return;
4185
- const f = l.value.has(r);
4186
- n.allowMultiple ? f ? l.value.delete(r) : l.value.add(r) : f ? l.value.clear() : (l.value.clear(), l.value.add(r)), t("item-click", r, !f), t("change", Array.from(l.value));
4187
- }, i = (r) => l.value.has(r);
4188
- return J(() => n.defaultOpen, (r) => {
4189
- l.value = new Set(r);
4190
- }, { deep: !0 }), J(() => n.items, () => {
4191
- _(() => {
4192
- Object.keys(g.value).forEach((r) => {
4193
- const f = parseInt(r), S = g.value[f];
4194
- if (S) {
4195
- const P = S.querySelector(".accordion-body");
4196
- P && (s.value[f] = P.scrollHeight);
4185
+ const g = l.value.has(p);
4186
+ t.allowMultiple ? g ? l.value.delete(p) : l.value.add(p) : g ? l.value.clear() : (l.value.clear(), l.value.add(p)), n("item-click", p, !g), n("change", Array.from(l.value));
4187
+ }, f = (p) => l.value.has(p);
4188
+ return J(() => t.defaultOpen, (p) => {
4189
+ l.value = new Set(p);
4190
+ }, { deep: !0 }), J(() => t.items, () => {
4191
+ N(() => {
4192
+ Object.keys(i.value).forEach((p) => {
4193
+ const g = parseInt(p), x = i.value[g];
4194
+ if (x) {
4195
+ const E = x.querySelector(".accordion-body");
4196
+ E && (s.value[g] = E.scrollHeight);
4197
4197
  }
4198
4198
  });
4199
4199
  });
4200
4200
  }, { deep: !0 }), o({
4201
- openItem: (r) => {
4202
- var f;
4203
- !n.disabled && !((f = n.items[r]) != null && f.disabled) && (l.value.has(r) || (n.allowMultiple || l.value.clear(), l.value.add(r), t("change", Array.from(l.value))));
4201
+ openItem: (p) => {
4202
+ var g;
4203
+ !t.disabled && !((g = t.items[p]) != null && g.disabled) && (l.value.has(p) || (t.allowMultiple || l.value.clear(), l.value.add(p), n("change", Array.from(l.value))));
4204
4204
  },
4205
- closeItem: (r) => {
4206
- l.value.has(r) && (l.value.delete(r), t("change", Array.from(l.value)));
4205
+ closeItem: (p) => {
4206
+ l.value.has(p) && (l.value.delete(p), n("change", Array.from(l.value)));
4207
4207
  },
4208
4208
  openAll: () => {
4209
- n.allowMultiple && !n.disabled && (n.items.forEach((r, f) => {
4210
- r.disabled || l.value.add(f);
4211
- }), t("change", Array.from(l.value)));
4209
+ t.allowMultiple && !t.disabled && (t.items.forEach((p, g) => {
4210
+ p.disabled || l.value.add(g);
4211
+ }), n("change", Array.from(l.value)));
4212
4212
  },
4213
4213
  closeAll: () => {
4214
- l.value.clear(), t("change", []);
4214
+ l.value.clear(), n("change", []);
4215
4215
  },
4216
4216
  toggle: c
4217
- }), (r, f) => (u(), v("div", {
4218
- class: B(["accordion-container", { "accordion-container--bordered": e.bordered }])
4217
+ }), (p, g) => (m(), v("div", {
4218
+ class: $(["accordion-container", { "accordion-container--bordered": e.bordered }])
4219
4219
  }, [
4220
- (u(!0), v(z, null, D(e.items, (S, P) => (u(), v("div", {
4221
- key: S.id || P,
4222
- class: B(["accordion-item", {
4223
- "is-open": i(P),
4224
- "is-disabled": e.disabled || S.disabled
4220
+ (m(!0), v(z, null, D(e.items, (x, E) => (m(), v("div", {
4221
+ key: x.id || E,
4222
+ class: $(["accordion-item", {
4223
+ "is-open": f(E),
4224
+ "is-disabled": e.disabled || x.disabled
4225
4225
  }])
4226
4226
  }, [
4227
4227
  y("button", {
4228
- onClick: (C) => c(P),
4228
+ onClick: (C) => c(E),
4229
4229
  class: "accordion-header",
4230
- disabled: e.disabled || S.disabled,
4231
- "aria-expanded": i(P),
4232
- "aria-controls": `accordion-content-${P}`
4230
+ disabled: e.disabled || x.disabled,
4231
+ "aria-expanded": f(E),
4232
+ "aria-controls": `accordion-content-${E}`
4233
4233
  }, [
4234
- y("span", ho, T(S.title), 1),
4234
+ y("span", ho, I(x.title), 1),
4235
4235
  y("div", mo, [
4236
- (u(), v("svg", {
4237
- class: B(["accordion-arrow", { "accordion-arrow--rotate": i(P) }]),
4236
+ (m(), v("svg", {
4237
+ class: $(["accordion-arrow", { "accordion-arrow--rotate": f(E) }]),
4238
4238
  fill: "none",
4239
4239
  stroke: "currentColor",
4240
4240
  viewBox: "0 0 24 24",
4241
4241
  strokeWidth: "2"
4242
- }, [...f[0] || (f[0] = [
4242
+ }, [...g[0] || (g[0] = [
4243
4243
  y("path", {
4244
4244
  strokeLinecap: "round",
4245
4245
  strokeLinejoin: "round",
@@ -4249,18 +4249,18 @@ const Jn = {
4249
4249
  ])
4250
4250
  ], 8, po),
4251
4251
  y("div", {
4252
- id: `accordion-content-${P}`,
4252
+ id: `accordion-content-${E}`,
4253
4253
  class: "accordion-content",
4254
- style: G({ maxHeight: i(P) ? `${s.value[P]}px` : "0px" }),
4254
+ style: G({ maxHeight: f(E) ? `${s.value[E]}px` : "0px" }),
4255
4255
  ref_for: !0,
4256
- ref: (C) => h(C, P)
4256
+ ref: (C) => r(C, E)
4257
4257
  }, [
4258
- y("div", vo, T(S.content), 1)
4258
+ y("div", vo, I(x.content), 1)
4259
4259
  ], 12, uo)
4260
4260
  ], 2))), 128))
4261
4261
  ], 2));
4262
4262
  }
4263
- }), Fo = /* @__PURE__ */ F(bo, [["__scopeId", "data-v-ff064eef"]]), wo = { class: "thumbnail-container-wrapper relative" }, yo = ["onMouseenter", "onClick"], Co = ["src", "alt"], So = { class: "thumbnail-index" }, xo = /* @__PURE__ */ V({
4263
+ }), _o = /* @__PURE__ */ F(bo, [["__scopeId", "data-v-c5fef037"]]), wo = { class: "thumbnail-container-wrapper relative" }, yo = ["onMouseenter", "onClick"], Co = ["src", "alt"], xo = { class: "thumbnail-index" }, So = /* @__PURE__ */ V({
4264
4264
  __name: "index",
4265
4265
  props: {
4266
4266
  images: { default: () => [] },
@@ -4270,83 +4270,83 @@ const Jn = {
4270
4270
  },
4271
4271
  emits: ["update:modelValue", "change", "hover"],
4272
4272
  setup(e, { expose: o, emit: a }) {
4273
- const n = e, t = a, l = $(n.modelValue), s = $(null), g = $([]), h = $(!1), c = $(!1), i = $(0), p = $(!1), b = $(!1), d = () => {
4274
- I();
4275
- }, j = (m, E) => {
4276
- m && m instanceof HTMLElement && (g.value[E] = m);
4277
- }, r = (m) => {
4278
- t("hover", m);
4279
- }, f = () => {
4280
- }, S = (m) => {
4281
- l.value = m, t("update:modelValue", m), t("change", m), n.autoScroll && _(() => {
4282
- w(m), setTimeout(() => {
4283
- I();
4273
+ const t = e, n = a, l = B(t.modelValue), s = B(null), i = B([]), r = B(!1), c = B(!1), f = B(0), h = B(!1), b = B(!1), d = () => {
4274
+ T();
4275
+ }, k = (u, P) => {
4276
+ u && u instanceof HTMLElement && (i.value[P] = u);
4277
+ }, p = (u) => {
4278
+ n("hover", u);
4279
+ }, g = () => {
4280
+ }, x = (u) => {
4281
+ l.value = u, n("update:modelValue", u), n("change", u), t.autoScroll && N(() => {
4282
+ w(u), setTimeout(() => {
4283
+ T();
4284
4284
  }, 300);
4285
4285
  });
4286
- }, P = () => {
4286
+ }, E = () => {
4287
4287
  if (!s.value) return;
4288
- const m = s.value, E = m.clientWidth * 0.8;
4289
- m.scrollBy({
4290
- left: -E,
4288
+ const u = s.value, P = u.clientWidth * 0.8;
4289
+ u.scrollBy({
4290
+ left: -P,
4291
4291
  behavior: "smooth"
4292
4292
  });
4293
4293
  }, C = () => {
4294
4294
  if (!s.value) return;
4295
- const m = s.value, E = m.clientWidth * 0.8;
4296
- m.scrollBy({
4297
- left: E,
4295
+ const u = s.value, P = u.clientWidth * 0.8;
4296
+ u.scrollBy({
4297
+ left: P,
4298
4298
  behavior: "smooth"
4299
4299
  });
4300
- }, w = (m) => {
4301
- if (!s.value || g.value.length === 0) return;
4302
- const E = s.value, x = g.value[m];
4303
- if (!x) return;
4304
- const M = 2, Ue = x.offsetWidth + 8;
4305
- let ne = 0;
4306
- m >= M && (ne = (m - M) * Ue);
4307
- const Ye = E.scrollWidth - E.clientWidth;
4308
- ne = Math.max(0, Math.min(ne, Ye)), E.scrollTo({
4309
- left: ne,
4300
+ }, w = (u) => {
4301
+ if (!s.value || i.value.length === 0) return;
4302
+ const P = s.value, S = i.value[u];
4303
+ if (!S) return;
4304
+ const M = 2, Ue = S.offsetWidth + 8;
4305
+ let te = 0;
4306
+ u >= M && (te = (u - M) * Ue);
4307
+ const Ye = P.scrollWidth - P.clientWidth;
4308
+ te = Math.max(0, Math.min(te, Ye)), P.scrollTo({
4309
+ left: te,
4310
4310
  behavior: "smooth"
4311
4311
  });
4312
- }, I = () => {
4312
+ }, T = () => {
4313
4313
  if (!s.value) return;
4314
- const m = s.value, E = m.scrollLeft, x = m.scrollWidth - m.clientWidth;
4315
- h.value = E > 0, c.value = E < x, x > 0 ? i.value = E / x * 100 : i.value = 0;
4316
- const M = k();
4317
- p.value = n.images.length > M && h.value, b.value = n.images.length > M && c.value;
4318
- }, k = () => {
4314
+ const u = s.value, P = u.scrollLeft, S = u.scrollWidth - u.clientWidth;
4315
+ r.value = P > 0, c.value = P < S, S > 0 ? f.value = P / S * 100 : f.value = 0;
4316
+ const M = j();
4317
+ h.value = t.images.length > M && r.value, b.value = t.images.length > M && c.value;
4318
+ }, j = () => {
4319
4319
  var ie;
4320
- if (!s.value || g.value.length === 0) return 4;
4321
- const E = s.value.clientWidth - 32, N = (((ie = g.value[0]) == null ? void 0 : ie.offsetWidth) || 80) + 12;
4322
- return Math.floor(E / N);
4323
- }, L = (m) => {
4324
- m >= 0 && m < n.images.length && S(m);
4320
+ if (!s.value || i.value.length === 0) return 4;
4321
+ const P = s.value.clientWidth - 32, _ = (((ie = i.value[0]) == null ? void 0 : ie.offsetWidth) || 80) + 12;
4322
+ return Math.floor(P / _);
4323
+ }, X = (u) => {
4324
+ u >= 0 && u < t.images.length && x(u);
4325
4325
  };
4326
- return J(() => n.modelValue, (m) => {
4327
- m !== void 0 && m !== l.value && (l.value = m, n.autoScroll && _(() => {
4328
- w(m);
4326
+ return J(() => t.modelValue, (u) => {
4327
+ u !== void 0 && u !== l.value && (l.value = u, t.autoScroll && N(() => {
4328
+ w(u);
4329
4329
  }));
4330
- }), J(() => n.images, () => {
4331
- _(() => {
4332
- I();
4330
+ }), J(() => t.images, () => {
4331
+ N(() => {
4332
+ T();
4333
4333
  });
4334
4334
  }, { deep: !0 }), se(() => {
4335
- _(() => {
4336
- I();
4335
+ N(() => {
4336
+ T();
4337
4337
  });
4338
4338
  }), o({
4339
- setCurrentIndex: L,
4340
- scrollLeft: P,
4339
+ setCurrentIndex: X,
4340
+ scrollLeft: E,
4341
4341
  scrollRight: C,
4342
- updateScrollState: I
4343
- }), (m, E) => (u(), v("div", wo, [
4344
- p.value ? (u(), v("button", {
4342
+ updateScrollState: T
4343
+ }), (u, P) => (m(), v("div", wo, [
4344
+ h.value ? (m(), v("button", {
4345
4345
  key: 0,
4346
- onClick: P,
4346
+ onClick: E,
4347
4347
  class: "scroll-arrow scroll-arrow-left",
4348
4348
  "aria-label": "向左滚动"
4349
- }, [...E[1] || (E[1] = [
4349
+ }, [...P[1] || (P[1] = [
4350
4350
  y("svg", {
4351
4351
  width: "24",
4352
4352
  height: "24",
@@ -4364,35 +4364,35 @@ const Jn = {
4364
4364
  onScroll: d,
4365
4365
  class: "thumbnail-scroll-container"
4366
4366
  }, [
4367
- (u(!0), v(z, null, D(e.images, (x, M) => (u(), v("div", {
4367
+ (m(!0), v(z, null, D(e.images, (S, M) => (m(), v("div", {
4368
4368
  key: M,
4369
4369
  ref_for: !0,
4370
- ref: (N) => j(N, M),
4371
- onMouseenter: (N) => r(M),
4372
- onMouseleave: E[0] || (E[0] = (N) => f()),
4373
- onClick: (N) => S(M),
4374
- class: B(["thumbnail-item", {
4370
+ ref: (_) => k(_, M),
4371
+ onMouseenter: (_) => p(M),
4372
+ onMouseleave: P[0] || (P[0] = (_) => g()),
4373
+ onClick: (_) => x(M),
4374
+ class: $(["thumbnail-item", {
4375
4375
  "thumbnail-item--active": l.value === M,
4376
4376
  "thumbnail-item--inactive": l.value !== M
4377
4377
  }])
4378
4378
  }, [
4379
4379
  y("img", {
4380
- src: x,
4380
+ src: S,
4381
4381
  alt: `缩略图 ${M + 1}`,
4382
- class: B(["thumbnail-image", {
4382
+ class: $(["thumbnail-image", {
4383
4383
  "thumbnail-image--active": l.value === M,
4384
4384
  "thumbnail-image--inactive": l.value !== M
4385
4385
  }])
4386
4386
  }, null, 10, Co),
4387
- y("div", So, T(M + 1), 1)
4387
+ y("div", xo, I(M + 1), 1)
4388
4388
  ], 42, yo))), 128))
4389
4389
  ], 544),
4390
- b.value ? (u(), v("button", {
4390
+ b.value ? (m(), v("button", {
4391
4391
  key: 1,
4392
4392
  onClick: C,
4393
4393
  class: "scroll-arrow scroll-arrow-right",
4394
4394
  "aria-label": "向右滚动"
4395
- }, [...E[2] || (E[2] = [
4395
+ }, [...P[2] || (P[2] = [
4396
4396
  y("svg", {
4397
4397
  width: "24",
4398
4398
  height: "24",
@@ -4406,7 +4406,7 @@ const Jn = {
4406
4406
  ])])) : A("", !0)
4407
4407
  ]));
4408
4408
  }
4409
- }), Oo = /* @__PURE__ */ F(xo, [["__scopeId", "data-v-809b97a6"]]), Eo = /* @__PURE__ */ V({
4409
+ }), Go = /* @__PURE__ */ F(So, [["__scopeId", "data-v-809b97a6"]]), Eo = /* @__PURE__ */ V({
4410
4410
  __name: "index",
4411
4411
  props: {
4412
4412
  width: { default: "100%" },
@@ -4418,7 +4418,7 @@ const Jn = {
4418
4418
  style: { default: () => ({}) }
4419
4419
  },
4420
4420
  setup(e) {
4421
- const o = e, a = X(() => typeof o.width == "string" ? o.width.includes("%") || o.width.includes("px") || o.width.includes("rem") ? "" : `w-${o.width}` : ""), n = X(() => typeof o.height == "string" ? o.height.includes("%") || o.height.includes("px") || o.height.includes("rem") ? "" : `h-${o.height}` : ""), t = X(() => {
4421
+ const o = e, a = L(() => typeof o.width == "string" ? o.width.includes("%") || o.width.includes("px") || o.width.includes("rem") ? "" : `w-${o.width}` : ""), t = L(() => typeof o.height == "string" ? o.height.includes("%") || o.height.includes("px") || o.height.includes("rem") ? "" : `h-${o.height}` : ""), n = L(() => {
4422
4422
  switch (o.shape) {
4423
4423
  case "circle":
4424
4424
  return "rounded-full";
@@ -4427,26 +4427,26 @@ const Jn = {
4427
4427
  default:
4428
4428
  return "rounded";
4429
4429
  }
4430
- }), l = X(() => o.class), s = X(() => {
4431
- const g = { ...o.style };
4432
- return typeof o.width == "string" && (o.width.includes("%") || o.width.includes("px") || o.width.includes("rem")) ? g.width = o.width : typeof o.width == "number" && (g.width = `${o.width}px`), typeof o.height == "string" && (o.height.includes("%") || o.height.includes("px") || o.height.includes("rem")) ? g.height = o.height : typeof o.height == "number" && (g.height = `${o.height}px`), g;
4430
+ }), l = L(() => o.class), s = L(() => {
4431
+ const i = { ...o.style };
4432
+ return typeof o.width == "string" && (o.width.includes("%") || o.width.includes("px") || o.width.includes("rem")) ? i.width = o.width : typeof o.width == "number" && (i.width = `${o.width}px`), typeof o.height == "string" && (o.height.includes("%") || o.height.includes("px") || o.height.includes("rem")) ? i.height = o.height : typeof o.height == "number" && (i.height = `${o.height}px`), i;
4433
4433
  });
4434
- return (g, h) => e.loading ? (u(), v("div", {
4434
+ return (i, r) => e.loading ? (m(), v("div", {
4435
4435
  key: 0,
4436
- class: B(["bg-gray-200", [
4436
+ class: $(["bg-gray-200", [
4437
4437
  a.value,
4438
- n.value,
4439
4438
  t.value,
4439
+ n.value,
4440
4440
  l.value,
4441
4441
  { "animate-pulse": e.animated }
4442
4442
  ]]),
4443
4443
  style: G(s.value)
4444
- }, null, 6)) : Q(g.$slots, "default", { key: 1 }, void 0, !0);
4444
+ }, null, 6)) : K(i.$slots, "default", { key: 1 }, void 0, !0);
4445
4445
  }
4446
- }), Ro = /* @__PURE__ */ F(Eo, [["__scopeId", "data-v-db4a4465"]]), Po = {
4446
+ }), Wo = /* @__PURE__ */ F(Eo, [["__scopeId", "data-v-db4a4465"]]), ko = {
4447
4447
  key: 0,
4448
4448
  class: "modal-header"
4449
- }, jo = { class: "modal-title" }, ko = { class: "modal-body" }, Mo = {
4449
+ }, Po = { class: "modal-title" }, jo = { class: "modal-body" }, Mo = {
4450
4450
  key: 1,
4451
4451
  class: "modal-footer"
4452
4452
  }, Ao = ["disabled"], Io = {
@@ -4473,22 +4473,22 @@ const Jn = {
4473
4473
  },
4474
4474
  emits: ["update:visible", "close", "cancel", "confirm", "opened", "closed"],
4475
4475
  setup(e, { expose: o, emit: a }) {
4476
- const n = e, t = a, l = () => {
4477
- t("update:visible", !1), t("close");
4476
+ const t = e, n = a, l = () => {
4477
+ n("update:visible", !1), n("close");
4478
4478
  }, s = () => {
4479
- t("cancel"), t("update:visible", !1);
4480
- }, g = () => {
4481
- t("confirm");
4482
- }, h = () => {
4483
- n.maskClosable && l();
4484
- }, c = (i) => {
4485
- i.key === "Escape" && n.escClosable && n.visible && l();
4479
+ n("cancel"), n("update:visible", !1);
4480
+ }, i = () => {
4481
+ n("confirm");
4482
+ }, r = () => {
4483
+ t.maskClosable && l();
4484
+ }, c = (f) => {
4485
+ f.key === "Escape" && t.escClosable && t.visible && l();
4486
4486
  };
4487
- return J(() => n.visible, (i) => {
4488
- i ? (document.addEventListener("keydown", c), document.body.style.overflow = "hidden", t("opened")) : (document.removeEventListener("keydown", c), document.body.style.overflow = "", t("closed"));
4487
+ return J(() => t.visible, (f) => {
4488
+ f ? (document.addEventListener("keydown", c), document.body.style.overflow = "hidden", n("opened")) : (document.removeEventListener("keydown", c), document.body.style.overflow = "", n("closed"));
4489
4489
  }), o({
4490
4490
  close: l
4491
- }), (i, p) => (u(), re(Je, { to: "body" }, [
4491
+ }), (f, h) => (m(), fe(Je, { to: "body" }, [
4492
4492
  R(pe, {
4493
4493
  "enter-active-class": "transition-opacity duration-300",
4494
4494
  "enter-from-class": "opacity-0",
@@ -4498,10 +4498,10 @@ const Jn = {
4498
4498
  "leave-to-class": "opacity-0"
4499
4499
  }, {
4500
4500
  default: Z(() => [
4501
- e.visible ? (u(), v("div", {
4501
+ e.visible ? (m(), v("div", {
4502
4502
  key: 0,
4503
4503
  class: "modal-mask",
4504
- onClick: h
4504
+ onClick: r
4505
4505
  }, [
4506
4506
  R(pe, {
4507
4507
  "enter-active-class": "transition-all duration-300",
@@ -4512,26 +4512,26 @@ const Jn = {
4512
4512
  "leave-to-class": "opacity-0 scale-95"
4513
4513
  }, {
4514
4514
  default: Z(() => [
4515
- e.visible ? (u(), v("div", {
4515
+ e.visible ? (m(), v("div", {
4516
4516
  key: 0,
4517
- class: B(["modal-container", [
4517
+ class: $(["modal-container", [
4518
4518
  `modal-container--${e.size}`,
4519
4519
  { "modal-container--fullscreen": e.fullscreen }
4520
4520
  ]]),
4521
4521
  style: G({ width: e.width }),
4522
- onClick: p[0] || (p[0] = H(() => {
4522
+ onClick: h[0] || (h[0] = q(() => {
4523
4523
  }, ["stop"]))
4524
4524
  }, [
4525
- e.showHeader ? (u(), v("div", Po, [
4526
- Q(i.$slots, "header", {}, () => [
4527
- y("h3", jo, T(e.title), 1)
4525
+ e.showHeader ? (m(), v("div", ko, [
4526
+ K(f.$slots, "header", {}, () => [
4527
+ y("h3", Po, I(e.title), 1)
4528
4528
  ], !0),
4529
- e.showClose ? (u(), v("button", {
4529
+ e.showClose ? (m(), v("button", {
4530
4530
  key: 0,
4531
4531
  class: "modal-close",
4532
4532
  onClick: l,
4533
4533
  "aria-label": "关闭"
4534
- }, [...p[1] || (p[1] = [
4534
+ }, [...h[1] || (h[1] = [
4535
4535
  y("svg", {
4536
4536
  width: "24",
4537
4537
  height: "24",
@@ -4544,24 +4544,24 @@ const Jn = {
4544
4544
  ], -1)
4545
4545
  ])])) : A("", !0)
4546
4546
  ])) : A("", !0),
4547
- y("div", ko, [
4548
- Q(i.$slots, "default", {}, void 0, !0)
4547
+ y("div", jo, [
4548
+ K(f.$slots, "default", {}, void 0, !0)
4549
4549
  ]),
4550
- e.showFooter ? (u(), v("div", Mo, [
4551
- Q(i.$slots, "footer", {}, () => [
4552
- e.showCancel ? (u(), v("button", {
4550
+ e.showFooter ? (m(), v("div", Mo, [
4551
+ K(f.$slots, "footer", {}, () => [
4552
+ e.showCancel ? (m(), v("button", {
4553
4553
  key: 0,
4554
4554
  class: "modal-btn modal-btn--cancel",
4555
4555
  onClick: s
4556
- }, T(e.cancelText), 1)) : A("", !0),
4557
- e.showConfirm ? (u(), v("button", {
4556
+ }, I(e.cancelText), 1)) : A("", !0),
4557
+ e.showConfirm ? (m(), v("button", {
4558
4558
  key: 1,
4559
4559
  class: "modal-btn modal-btn--confirm",
4560
- onClick: g,
4560
+ onClick: i,
4561
4561
  disabled: e.confirmLoading
4562
4562
  }, [
4563
- e.confirmLoading ? (u(), v("span", Io)) : A("", !0),
4564
- ze(" " + T(e.confirmText), 1)
4563
+ e.confirmLoading ? (m(), v("span", Io)) : A("", !0),
4564
+ be(" " + I(e.confirmText), 1)
4565
4565
  ], 8, Ao)) : A("", !0)
4566
4566
  ], !0)
4567
4567
  ])) : A("", !0)
@@ -4575,7 +4575,42 @@ const Jn = {
4575
4575
  })
4576
4576
  ]));
4577
4577
  }
4578
- }), Do = /* @__PURE__ */ F($o, [["__scopeId", "data-v-e43c9a70"]]), _o = () => {
4578
+ }), Ko = /* @__PURE__ */ F($o, [["__scopeId", "data-v-e43c9a70"]]), To = { class: "x-tooltip-trigger" }, Bo = { class: "tooltip-label" }, Lo = { class: "tooltip-text" }, Xo = { class: "tooltip-hover-text" }, zo = /* @__PURE__ */ V({
4579
+ __name: "index",
4580
+ props: {
4581
+ content: {},
4582
+ placement: { default: "top" },
4583
+ variant: { default: "basic" },
4584
+ label: { default: "Hover" },
4585
+ hoverText: { default: "" }
4586
+ },
4587
+ setup(e) {
4588
+ return (o, a) => (m(), v("div", {
4589
+ class: $([
4590
+ e.variant === "basic" ? "x-tooltip-wrapper" : "x-tooltip-rich-wrapper",
4591
+ e.variant === "rich" && `rich-${e.placement}`
4592
+ ])
4593
+ }, [
4594
+ e.variant === "basic" ? (m(), v(z, { key: 0 }, [
4595
+ y("div", To, [
4596
+ K(o.$slots, "default", {}, void 0, !0)
4597
+ ]),
4598
+ y("div", {
4599
+ class: $(["x-tooltip", `tooltip-${e.placement}`])
4600
+ }, [
4601
+ be(I(e.content) + " ", 1),
4602
+ y("div", {
4603
+ class: $(["tooltip-arrow", `arrow-${e.placement}`])
4604
+ }, null, 2)
4605
+ ], 2)
4606
+ ], 64)) : (m(), v(z, { key: 1 }, [
4607
+ y("span", Bo, I(e.label), 1),
4608
+ y("span", Lo, I(e.content), 1),
4609
+ y("span", Xo, I(e.hoverText || e.label), 1)
4610
+ ], 64))
4611
+ ], 2));
4612
+ }
4613
+ }), Ho = /* @__PURE__ */ F(zo, [["__scopeId", "data-v-6d3b782b"]]), qo = () => {
4579
4614
  const e = () => {
4580
4615
  let c = document.getElementById("xl-message-container");
4581
4616
  return c || (c = document.createElement("div"), c.id = "xl-message-container", c.style.cssText = `
@@ -4588,7 +4623,7 @@ const Jn = {
4588
4623
  gap: 10px;
4589
4624
  `, document.body.appendChild(c)), c;
4590
4625
  }, o = (c) => {
4591
- const i = {
4626
+ const f = {
4592
4627
  success: {
4593
4628
  bgColor: "#f0fdf4",
4594
4629
  borderColor: "#86efac",
@@ -4618,10 +4653,10 @@ const Jn = {
4618
4653
  iconSvg: '<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/></svg>'
4619
4654
  }
4620
4655
  };
4621
- return i[c] || i.info;
4656
+ return f[c] || f.info;
4622
4657
  }, a = (c) => {
4623
- const i = e(), p = c.type || "info", b = c.duration !== void 0 ? c.duration : 3e3, d = o(p), j = `xl-msg-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, r = document.createElement("div");
4624
- r.id = j, r.style.cssText = `
4658
+ const f = e(), h = c.type || "info", b = c.duration !== void 0 ? c.duration : 3e3, d = o(h), k = `xl-msg-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, p = document.createElement("div");
4659
+ p.id = k, p.style.cssText = `
4625
4660
  background-color: ${d.bgColor};
4626
4661
  border: 1px solid ${d.borderColor};
4627
4662
  color: ${d.textColor};
@@ -4633,7 +4668,7 @@ const Jn = {
4633
4668
  opacity: 0;
4634
4669
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
4635
4670
  pointer-events: auto;
4636
- `, r.innerHTML = `
4671
+ `, p.innerHTML = `
4637
4672
  <div style="display: flex; align-items: flex-start; gap: 12px;">
4638
4673
  <div style="flex-shrink: 0; color: ${d.iconColor}; margin-top: 2px;">
4639
4674
  ${d.iconSvg}
@@ -4648,30 +4683,30 @@ const Jn = {
4648
4683
  style="flex-shrink: 0; background: none; border: none; padding: 4px; cursor: pointer; color: ${d.textColor}; opacity: 0.5; border-radius: 4px; transition: all 0.15s; display: flex; align-items: center; justify-content: center;"
4649
4684
  onmouseover="this.style.opacity='1'; this.style.backgroundColor='rgba(0,0,0,0.05)';"
4650
4685
  onmouseout="this.style.opacity='0.5'; this.style.backgroundColor='transparent';"
4651
- onclick="document.getElementById('${j}')?.remove()"
4686
+ onclick="document.getElementById('${k}')?.remove()"
4652
4687
  >
4653
4688
  <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
4654
4689
  <path d="M18 6L6 18M6 6l12 12"/>
4655
4690
  </svg>
4656
4691
  </button>
4657
4692
  </div>
4658
- `, i.appendChild(r), requestAnimationFrame(() => {
4693
+ `, f.appendChild(p), requestAnimationFrame(() => {
4659
4694
  requestAnimationFrame(() => {
4660
- r.style.transform = "translateX(0)", r.style.opacity = "1";
4695
+ p.style.transform = "translateX(0)", p.style.opacity = "1";
4661
4696
  });
4662
4697
  }), b > 0 && setTimeout(() => {
4663
- n(j);
4698
+ t(k);
4664
4699
  }, b);
4665
- }, n = (c) => {
4666
- const i = document.getElementById(c);
4667
- i && (i.style.transform = "translateX(100%)", i.style.opacity = "0", setTimeout(() => {
4668
- i.parentNode && i.parentNode.removeChild(i);
4700
+ }, t = (c) => {
4701
+ const f = document.getElementById(c);
4702
+ f && (f.style.transform = "translateX(100%)", f.style.opacity = "0", setTimeout(() => {
4703
+ f.parentNode && f.parentNode.removeChild(f);
4669
4704
  }, 300));
4670
4705
  };
4671
4706
  return {
4672
4707
  show: a,
4673
4708
  confirm: (c) => {
4674
- const i = c.type || "info", p = o(i), b = `xl-confirm-${Date.now()}`, d = document.createElement("div");
4709
+ const f = c.type || "info", h = o(f), b = `xl-confirm-${Date.now()}`, d = document.createElement("div");
4675
4710
  d.id = b, d.style.cssText = `
4676
4711
  position: fixed;
4677
4712
  inset: 0;
@@ -4684,7 +4719,7 @@ const Jn = {
4684
4719
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
4685
4720
  backdrop-filter: blur(4px);
4686
4721
  `;
4687
- const j = `
4722
+ const k = `
4688
4723
  <div class="xl-confirm-dialog" style="
4689
4724
  background-color: white;
4690
4725
  border-radius: 12px;
@@ -4698,8 +4733,8 @@ const Jn = {
4698
4733
  ">
4699
4734
  <div style="padding: 24px;">
4700
4735
  <div style="display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px;">
4701
- <div style="flex-shrink: 0; color: ${p.iconColor}; margin-top: 2px;">
4702
- ${p.iconSvg}
4736
+ <div style="flex-shrink: 0; color: ${h.iconColor}; margin-top: 2px;">
4737
+ ${h.iconSvg}
4703
4738
  </div>
4704
4739
  <div style="flex: 1;">
4705
4740
  <h3 style="font-size: 18px; font-weight: 600; color: #1a1a1a; line-height: 1.5; margin: 0;">
@@ -4759,61 +4794,204 @@ const Jn = {
4759
4794
  </div>
4760
4795
  </div>
4761
4796
  `;
4762
- d.innerHTML = j, document.body.appendChild(d), requestAnimationFrame(() => {
4797
+ d.innerHTML = k, document.body.appendChild(d), requestAnimationFrame(() => {
4763
4798
  d.style.opacity = "1";
4764
4799
  const C = d.querySelector(".xl-confirm-dialog");
4765
4800
  C && requestAnimationFrame(() => {
4766
4801
  C.style.transform = "scale(1)", C.style.opacity = "1";
4767
4802
  });
4768
4803
  });
4769
- const r = d.querySelector(".xl-confirm-ok"), f = d.querySelector(".xl-confirm-cancel"), S = () => {
4804
+ const p = d.querySelector(".xl-confirm-ok"), g = d.querySelector(".xl-confirm-cancel"), x = () => {
4770
4805
  const C = d.querySelector(".xl-confirm-dialog");
4771
4806
  C && (C.style.transform = "scale(0.95)", C.style.opacity = "0"), d.style.opacity = "0", setTimeout(() => {
4772
4807
  d.parentNode && d.parentNode.removeChild(d);
4773
4808
  }, 300);
4774
4809
  };
4775
- r == null || r.addEventListener("click", () => {
4810
+ p == null || p.addEventListener("click", () => {
4776
4811
  var C;
4777
- (C = c.onConfirm) == null || C.call(c), S();
4778
- }), f == null || f.addEventListener("click", () => {
4812
+ (C = c.onConfirm) == null || C.call(c), x();
4813
+ }), g == null || g.addEventListener("click", () => {
4779
4814
  var C;
4780
- (C = c.onCancel) == null || C.call(c), S();
4815
+ (C = c.onCancel) == null || C.call(c), x();
4781
4816
  }), d.addEventListener("click", (C) => {
4782
4817
  var w;
4783
- C.target === d && ((w = c.onCancel) == null || w.call(c), S());
4818
+ C.target === d && ((w = c.onCancel) == null || w.call(c), x());
4784
4819
  });
4785
- const P = (C) => {
4820
+ const E = (C) => {
4786
4821
  var w;
4787
- C.key === "Escape" && ((w = c.onCancel) == null || w.call(c), S(), document.removeEventListener("keydown", P));
4822
+ C.key === "Escape" && ((w = c.onCancel) == null || w.call(c), x(), document.removeEventListener("keydown", E));
4788
4823
  };
4789
- document.addEventListener("keydown", P);
4824
+ document.addEventListener("keydown", E);
4790
4825
  },
4791
- success: (c, i, p) => {
4792
- a({ title: c, content: i, type: "success", duration: p });
4826
+ success: (c, f, h) => {
4827
+ a({ title: c, content: f, type: "success", duration: h });
4793
4828
  },
4794
- error: (c, i, p) => {
4795
- a({ title: c, content: i, type: "error", duration: p });
4829
+ error: (c, f, h) => {
4830
+ a({ title: c, content: f, type: "error", duration: h });
4796
4831
  },
4797
- warning: (c, i, p) => {
4798
- a({ title: c, content: i, type: "warning", duration: p });
4832
+ warning: (c, f, h) => {
4833
+ a({ title: c, content: f, type: "warning", duration: h });
4799
4834
  },
4800
- info: (c, i, p) => {
4801
- a({ title: c, content: i, type: "info", duration: p });
4835
+ info: (c, f, h) => {
4836
+ a({ title: c, content: f, type: "info", duration: h });
4802
4837
  },
4803
- remove: n
4838
+ remove: t
4839
+ };
4840
+ }, Uo = () => {
4841
+ const e = () => {
4842
+ let r = document.getElementById("xl-alert-container");
4843
+ return r || (r = document.createElement("div"), r.id = "xl-alert-container", r.style.cssText = `
4844
+ position: fixed;
4845
+ top: 5%;
4846
+ left: 50%;
4847
+ transform: translate(-50%, -50%);
4848
+ z-index: 10000;
4849
+ display: flex;
4850
+ flex-direction: column;
4851
+ gap: 12px;
4852
+ max-width: 90%;
4853
+ width: 500px;
4854
+ `, document.body.appendChild(r)), r;
4855
+ }, o = (r) => {
4856
+ const c = {
4857
+ success: {
4858
+ bgColor: "rgb(240, 253, 244)",
4859
+ darkBgColor: "rgb(20, 83, 45)",
4860
+ borderColor: "rgb(134, 239, 172)",
4861
+ darkBorderColor: "rgb(22, 101, 52)",
4862
+ textColor: "rgb(22, 101, 52)",
4863
+ darkTextColor: "rgb(187, 247, 208)",
4864
+ iconColor: "rgb(34, 197, 94)",
4865
+ iconSvg: `<svg stroke="currentColor" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
4866
+ <path d="M13 16h-1v-4h1m0-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" stroke-width="2" stroke-linejoin="round" stroke-linecap="round"></path>
4867
+ </svg>`
4868
+ },
4869
+ error: {
4870
+ bgColor: "rgb(254, 242, 242)",
4871
+ darkBgColor: "rgb(127, 29, 29)",
4872
+ borderColor: "rgb(252, 165, 165)",
4873
+ darkBorderColor: "rgb(153, 27, 27)",
4874
+ textColor: "rgb(153, 27, 27)",
4875
+ darkTextColor: "rgb(254, 202, 202)",
4876
+ iconColor: "rgb(239, 68, 68)",
4877
+ iconSvg: `<svg stroke="currentColor" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
4878
+ <path d="M13 16h-1v-4h1m0-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" stroke-width="2" stroke-linejoin="round" stroke-linecap="round"></path>
4879
+ </svg>`
4880
+ },
4881
+ warning: {
4882
+ bgColor: "rgb(254, 252, 232)",
4883
+ darkBgColor: "rgb(133, 77, 14)",
4884
+ borderColor: "rgb(253, 224, 71)",
4885
+ darkBorderColor: "rgb(161, 98, 7)",
4886
+ textColor: "rgb(133, 77, 14)",
4887
+ darkTextColor: "rgb(254, 240, 138)",
4888
+ iconColor: "rgb(234, 179, 8)",
4889
+ iconSvg: `<svg stroke="currentColor" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
4890
+ <path d="M13 16h-1v-4h1m0-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" stroke-width="2" stroke-linejoin="round" stroke-linecap="round"></path>
4891
+ </svg>`
4892
+ },
4893
+ info: {
4894
+ bgColor: "rgb(239, 246, 255)",
4895
+ darkBgColor: "rgb(30, 58, 138)",
4896
+ borderColor: "rgb(147, 197, 253)",
4897
+ darkBorderColor: "rgb(29, 78, 216)",
4898
+ textColor: "rgb(30, 64, 175)",
4899
+ darkTextColor: "rgb(191, 219, 254)",
4900
+ iconColor: "rgb(59, 130, 246)",
4901
+ iconSvg: `<svg stroke="currentColor" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
4902
+ <path d="M13 16h-1v-4h1m0-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" stroke-width="2" stroke-linejoin="round" stroke-linecap="round"></path>
4903
+ </svg>`
4904
+ }
4905
+ };
4906
+ return c[r] || c.info;
4907
+ }, a = () => window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches, t = (r) => {
4908
+ const c = e(), f = r.type || "info", h = r.duration !== void 0 ? r.duration : 5e3, b = r.closable !== void 0 ? r.closable : !0, d = o(f), k = a(), p = `xl-alert-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, g = document.createElement("div");
4909
+ g.id = p, g.setAttribute("role", "alert"), g.style.cssText = `
4910
+ background-color: ${k ? d.darkBgColor : d.bgColor};
4911
+ border-left: 4px solid ${k ? d.darkBorderColor : d.borderColor};
4912
+ color: ${k ? d.darkTextColor : d.textColor};
4913
+ padding: 16px;
4914
+ border-radius: 12px;
4915
+ display: flex;
4916
+ align-items: center;
4917
+ transition: all 0.3s ease-in-out;
4918
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
4919
+ transform: scale(0.8);
4920
+ opacity: 0;
4921
+ position: relative;
4922
+ `;
4923
+ let x = `
4924
+ <div style="color: ${d.iconColor}; width: 20px; height: 20px; flex-shrink: 0; margin-right: 12px;">
4925
+ ${d.iconSvg}
4926
+ </div>
4927
+ <div style="flex: 1;">
4928
+ ${r.title ? `<p style="font-weight: 600; font-size: 14px; margin-bottom: 4px;">${r.title}</p>` : ""}
4929
+ <p style="font-size: ${r.title ? "13px" : "14px"}; font-weight: ${r.title ? "400" : "600"};">${r.content}</p>
4930
+ </div>
4931
+ `;
4932
+ b && (x += `
4933
+ <button
4934
+ class="xl-alert-close"
4935
+ style="
4936
+ background: transparent;
4937
+ border: none;
4938
+ color: ${k ? d.darkTextColor : d.textColor};
4939
+ cursor: pointer;
4940
+ padding: 4px;
4941
+ margin-left: 8px;
4942
+ display: flex;
4943
+ align-items: center;
4944
+ justify-content: center;
4945
+ opacity: 0.6;
4946
+ transition: opacity 0.2s;
4947
+ width: 20px;
4948
+ height: 20px;
4949
+ flex-shrink: 0;
4950
+ "
4951
+ onmouseover="this.style.opacity='1'"
4952
+ onmouseout="this.style.opacity='0.6'"
4953
+ >
4954
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
4955
+ <line x1="18" y1="6" x2="6" y2="18"></line>
4956
+ <line x1="6" y1="6" x2="18" y2="18"></line>
4957
+ </svg>
4958
+ </button>
4959
+ `), g.innerHTML = x;
4960
+ const E = () => {
4961
+ g.style.transform = "scale(0.8)", g.style.opacity = "0", setTimeout(() => {
4962
+ g.parentNode && c.removeChild(g), c.children.length === 0 && document.body.removeChild(c);
4963
+ }, 300);
4964
+ };
4965
+ if (b) {
4966
+ const C = g.querySelector(".xl-alert-close");
4967
+ C && C.addEventListener("click", E);
4968
+ }
4969
+ return c.appendChild(g), setTimeout(() => {
4970
+ g.style.transform = "scale(1)", g.style.opacity = "1";
4971
+ }, 10), h > 0 && setTimeout(E, h), { close: E };
4972
+ };
4973
+ return {
4974
+ show: t,
4975
+ success: (r, c) => t({ content: r, type: "success", ...c }),
4976
+ error: (r, c) => t({ content: r, type: "error", ...c }),
4977
+ warning: (r, c) => t({ content: r, type: "warning", ...c }),
4978
+ info: (r, c) => t({ content: r, type: "info", ...c })
4804
4979
  };
4805
4980
  };
4806
4981
  export {
4807
- Fo as XAccordion,
4808
- Le as XButton,
4809
- Bo as XCard,
4810
- zo as XCheckboxes,
4811
- Xo as XCountrySelect,
4812
- Vo as XInput,
4813
- Do as XModal,
4814
- Lo as XSelect,
4815
- Ro as XSkeleton,
4816
- Oo as XThumbnailContainer,
4817
- _o as useMsg,
4818
- _o as xlMsg
4982
+ _o as XAccordion,
4983
+ ze as XButton,
4984
+ Fo as XCard,
4985
+ No as XCheckboxes,
4986
+ Oo as XCountrySelect,
4987
+ Do as XInput,
4988
+ Ko as XModal,
4989
+ Ro as XSelect,
4990
+ Wo as XSkeleton,
4991
+ Go as XThumbnailContainer,
4992
+ Ho as XTooltips,
4993
+ Uo as useAlert,
4994
+ qo as useMsg,
4995
+ Uo as xlAlert,
4996
+ qo as xlMsg
4819
4997
  };