pd-ui-package 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1191 @@
1
+ import { defineComponent as ye, ref as R, shallowRef as be, onMounted as xe, watch as ve, onUnmounted as we, h as B, nextTick as Ie } from "vue";
2
+ const re = /^[a-z0-9]+(-[a-z0-9]+)*$/, M = (e, o, n, i = "") => {
3
+ const t = e.split(":");
4
+ if (e.slice(0, 1) === "@") {
5
+ if (t.length < 2 || t.length > 3)
6
+ return null;
7
+ i = t.shift().slice(1);
8
+ }
9
+ if (t.length > 3 || !t.length)
10
+ return null;
11
+ if (t.length > 1) {
12
+ const l = t.pop(), u = t.pop(), c = {
13
+ // Allow provider without '@': "provider:prefix:name"
14
+ provider: t.length > 0 ? t[0] : i,
15
+ prefix: u,
16
+ name: l
17
+ };
18
+ return o && !E(c) ? null : c;
19
+ }
20
+ const s = t[0], r = s.split("-");
21
+ if (r.length > 1) {
22
+ const l = {
23
+ provider: i,
24
+ prefix: r.shift(),
25
+ name: r.join("-")
26
+ };
27
+ return o && !E(l) ? null : l;
28
+ }
29
+ if (n && i === "") {
30
+ const l = {
31
+ provider: i,
32
+ prefix: "",
33
+ name: s
34
+ };
35
+ return o && !E(l, n) ? null : l;
36
+ }
37
+ return null;
38
+ }, E = (e, o) => e ? !!// Check prefix: cannot be empty, unless allowSimpleName is enabled
39
+ // Check name: cannot be empty
40
+ ((o && e.prefix === "" || e.prefix) && e.name) : !1, ce = Object.freeze(
41
+ {
42
+ left: 0,
43
+ top: 0,
44
+ width: 16,
45
+ height: 16
46
+ }
47
+ ), L = Object.freeze({
48
+ rotate: 0,
49
+ vFlip: !1,
50
+ hFlip: !1
51
+ }), D = Object.freeze({
52
+ ...ce,
53
+ ...L
54
+ }), U = Object.freeze({
55
+ ...D,
56
+ body: "",
57
+ hidden: !1
58
+ });
59
+ function Se(e, o) {
60
+ const n = {};
61
+ !e.hFlip != !o.hFlip && (n.hFlip = !0), !e.vFlip != !o.vFlip && (n.vFlip = !0);
62
+ const i = ((e.rotate || 0) + (o.rotate || 0)) % 4;
63
+ return i && (n.rotate = i), n;
64
+ }
65
+ function K(e, o) {
66
+ const n = Se(e, o);
67
+ for (const i in U)
68
+ i in L ? i in e && !(i in n) && (n[i] = L[i]) : i in o ? n[i] = o[i] : i in e && (n[i] = e[i]);
69
+ return n;
70
+ }
71
+ function ke(e, o) {
72
+ const n = e.icons, i = e.aliases || /* @__PURE__ */ Object.create(null), t = /* @__PURE__ */ Object.create(null);
73
+ function s(r) {
74
+ if (n[r])
75
+ return t[r] = [];
76
+ if (!(r in t)) {
77
+ t[r] = null;
78
+ const l = i[r] && i[r].parent, u = l && s(l);
79
+ u && (t[r] = [l].concat(u));
80
+ }
81
+ return t[r];
82
+ }
83
+ return Object.keys(n).concat(Object.keys(i)).forEach(s), t;
84
+ }
85
+ function Te(e, o, n) {
86
+ const i = e.icons, t = e.aliases || /* @__PURE__ */ Object.create(null);
87
+ let s = {};
88
+ function r(l) {
89
+ s = K(
90
+ i[l] || t[l],
91
+ s
92
+ );
93
+ }
94
+ return r(o), n.forEach(r), K(e, s);
95
+ }
96
+ function le(e, o) {
97
+ const n = [];
98
+ if (typeof e != "object" || typeof e.icons != "object")
99
+ return n;
100
+ e.not_found instanceof Array && e.not_found.forEach((t) => {
101
+ o(t, null), n.push(t);
102
+ });
103
+ const i = ke(e);
104
+ for (const t in i) {
105
+ const s = i[t];
106
+ s && (o(t, Te(e, t, s)), n.push(t));
107
+ }
108
+ return n;
109
+ }
110
+ const je = {
111
+ provider: "",
112
+ aliases: {},
113
+ not_found: {},
114
+ ...ce
115
+ };
116
+ function z(e, o) {
117
+ for (const n in o)
118
+ if (n in e && typeof e[n] != typeof o[n])
119
+ return !1;
120
+ return !0;
121
+ }
122
+ function ue(e) {
123
+ if (typeof e != "object" || e === null)
124
+ return null;
125
+ const o = e;
126
+ if (typeof o.prefix != "string" || !e.icons || typeof e.icons != "object" || !z(e, je))
127
+ return null;
128
+ const n = o.icons;
129
+ for (const t in n) {
130
+ const s = n[t];
131
+ if (
132
+ // Name cannot be empty
133
+ !t || // Must have body
134
+ typeof s.body != "string" || // Check other props
135
+ !z(
136
+ s,
137
+ U
138
+ )
139
+ )
140
+ return null;
141
+ }
142
+ const i = o.aliases || /* @__PURE__ */ Object.create(null);
143
+ for (const t in i) {
144
+ const s = i[t], r = s.parent;
145
+ if (
146
+ // Name cannot be empty
147
+ !t || // Parent must be set and point to existing icon
148
+ typeof r != "string" || !n[r] && !i[r] || // Check other props
149
+ !z(
150
+ s,
151
+ U
152
+ )
153
+ )
154
+ return null;
155
+ }
156
+ return o;
157
+ }
158
+ const W = /* @__PURE__ */ Object.create(null);
159
+ function Ce(e, o) {
160
+ return {
161
+ provider: e,
162
+ prefix: o,
163
+ icons: /* @__PURE__ */ Object.create(null),
164
+ missing: /* @__PURE__ */ new Set()
165
+ };
166
+ }
167
+ function k(e, o) {
168
+ const n = W[e] || (W[e] = /* @__PURE__ */ Object.create(null));
169
+ return n[o] || (n[o] = Ce(e, o));
170
+ }
171
+ function fe(e, o) {
172
+ return ue(o) ? le(o, (n, i) => {
173
+ i ? e.icons[n] = i : e.missing.add(n);
174
+ }) : [];
175
+ }
176
+ function Pe(e, o, n) {
177
+ try {
178
+ if (typeof n.body == "string")
179
+ return e.icons[o] = { ...n }, !0;
180
+ } catch {
181
+ }
182
+ return !1;
183
+ }
184
+ let P = !1;
185
+ function ae(e) {
186
+ return typeof e == "boolean" && (P = e), P;
187
+ }
188
+ function Fe(e) {
189
+ const o = typeof e == "string" ? M(e, !0, P) : e;
190
+ if (o) {
191
+ const n = k(o.provider, o.prefix), i = o.name;
192
+ return n.icons[i] || (n.missing.has(i) ? null : void 0);
193
+ }
194
+ }
195
+ function Ee(e, o) {
196
+ const n = M(e, !0, P);
197
+ if (!n)
198
+ return !1;
199
+ const i = k(n.provider, n.prefix);
200
+ return o ? Pe(i, n.name, o) : (i.missing.add(n.name), !0);
201
+ }
202
+ function Oe(e, o) {
203
+ if (typeof e != "object")
204
+ return !1;
205
+ if (typeof o != "string" && (o = e.provider || ""), P && !o && !e.prefix) {
206
+ let t = !1;
207
+ return ue(e) && (e.prefix = "", le(e, (s, r) => {
208
+ Ee(s, r) && (t = !0);
209
+ })), t;
210
+ }
211
+ const n = e.prefix;
212
+ if (!E({
213
+ prefix: n,
214
+ name: "a"
215
+ }))
216
+ return !1;
217
+ const i = k(o, n);
218
+ return !!fe(i, e);
219
+ }
220
+ const de = Object.freeze({
221
+ width: null,
222
+ height: null
223
+ }), pe = Object.freeze({
224
+ // Dimensions
225
+ ...de,
226
+ // Transformations
227
+ ...L
228
+ }), Ae = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Le = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
229
+ function J(e, o, n) {
230
+ if (o === 1)
231
+ return e;
232
+ if (n = n || 100, typeof e == "number")
233
+ return Math.ceil(e * o * n) / n;
234
+ if (typeof e != "string")
235
+ return e;
236
+ const i = e.split(Ae);
237
+ if (i === null || !i.length)
238
+ return e;
239
+ const t = [];
240
+ let s = i.shift(), r = Le.test(s);
241
+ for (; ; ) {
242
+ if (r) {
243
+ const l = parseFloat(s);
244
+ isNaN(l) ? t.push(s) : t.push(Math.ceil(l * o * n) / n);
245
+ } else
246
+ t.push(s);
247
+ if (s = i.shift(), s === void 0)
248
+ return t.join("");
249
+ r = !r;
250
+ }
251
+ }
252
+ function Me(e, o = "defs") {
253
+ let n = "";
254
+ const i = e.indexOf("<" + o);
255
+ for (; i >= 0; ) {
256
+ const t = e.indexOf(">", i), s = e.indexOf("</" + o);
257
+ if (t === -1 || s === -1)
258
+ break;
259
+ const r = e.indexOf(">", s);
260
+ if (r === -1)
261
+ break;
262
+ n += e.slice(t + 1, s).trim(), e = e.slice(0, i).trim() + e.slice(r + 1);
263
+ }
264
+ return {
265
+ defs: n,
266
+ content: e
267
+ };
268
+ }
269
+ function De(e, o) {
270
+ return e ? "<defs>" + e + "</defs>" + o : o;
271
+ }
272
+ function Ne(e, o, n) {
273
+ const i = Me(e);
274
+ return De(i.defs, o + i.content + n);
275
+ }
276
+ const Re = (e) => e === "unset" || e === "undefined" || e === "none";
277
+ function ze(e, o) {
278
+ const n = {
279
+ ...D,
280
+ ...e
281
+ }, i = {
282
+ ...pe,
283
+ ...o
284
+ }, t = {
285
+ left: n.left,
286
+ top: n.top,
287
+ width: n.width,
288
+ height: n.height
289
+ };
290
+ let s = n.body;
291
+ [n, i].forEach((m) => {
292
+ const a = [], S = m.hFlip, w = m.vFlip;
293
+ let v = m.rotate;
294
+ S ? w ? v += 2 : (a.push(
295
+ "translate(" + (t.width + t.left).toString() + " " + (0 - t.top).toString() + ")"
296
+ ), a.push("scale(-1 1)"), t.top = t.left = 0) : w && (a.push(
297
+ "translate(" + (0 - t.left).toString() + " " + (t.height + t.top).toString() + ")"
298
+ ), a.push("scale(1 -1)"), t.top = t.left = 0);
299
+ let b;
300
+ switch (v < 0 && (v -= Math.floor(v / 4) * 4), v = v % 4, v) {
301
+ case 1:
302
+ b = t.height / 2 + t.top, a.unshift(
303
+ "rotate(90 " + b.toString() + " " + b.toString() + ")"
304
+ );
305
+ break;
306
+ case 2:
307
+ a.unshift(
308
+ "rotate(180 " + (t.width / 2 + t.left).toString() + " " + (t.height / 2 + t.top).toString() + ")"
309
+ );
310
+ break;
311
+ case 3:
312
+ b = t.width / 2 + t.left, a.unshift(
313
+ "rotate(-90 " + b.toString() + " " + b.toString() + ")"
314
+ );
315
+ break;
316
+ }
317
+ v % 2 === 1 && (t.left !== t.top && (b = t.left, t.left = t.top, t.top = b), t.width !== t.height && (b = t.width, t.width = t.height, t.height = b)), a.length && (s = Ne(
318
+ s,
319
+ '<g transform="' + a.join(" ") + '">',
320
+ "</g>"
321
+ ));
322
+ });
323
+ const r = i.width, l = i.height, u = t.width, c = t.height;
324
+ let f, d;
325
+ r === null ? (d = l === null ? "1em" : l === "auto" ? c : l, f = J(d, u / c)) : (f = r === "auto" ? u : r, d = l === null ? J(f, c / u) : l === "auto" ? c : l);
326
+ const p = {}, g = (m, a) => {
327
+ Re(a) || (p[m] = a.toString());
328
+ };
329
+ g("width", f), g("height", d);
330
+ const y = [t.left, t.top, u, c];
331
+ return p.viewBox = y.join(" "), {
332
+ attributes: p,
333
+ viewBox: y,
334
+ body: s
335
+ };
336
+ }
337
+ const Qe = /\sid="(\S+)"/g, Ue = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
338
+ let qe = 0;
339
+ function He(e, o = Ue) {
340
+ const n = [];
341
+ let i;
342
+ for (; i = Qe.exec(e); )
343
+ n.push(i[1]);
344
+ if (!n.length)
345
+ return e;
346
+ const t = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
347
+ return n.forEach((s) => {
348
+ const r = typeof o == "function" ? o(s) : o + (qe++).toString(), l = s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
349
+ e = e.replace(
350
+ // Allowed characters before id: [#;"]
351
+ // Allowed characters after id: [)"], .[a-z]
352
+ new RegExp('([#;"])(' + l + ')([")]|\\.[a-z])', "g"),
353
+ "$1" + r + t + "$3"
354
+ );
355
+ }), e = e.replace(new RegExp(t, "g"), ""), e;
356
+ }
357
+ const q = /* @__PURE__ */ Object.create(null);
358
+ function $e(e, o) {
359
+ q[e] = o;
360
+ }
361
+ function H(e) {
362
+ return q[e] || q[""];
363
+ }
364
+ function V(e) {
365
+ let o;
366
+ if (typeof e.resources == "string")
367
+ o = [e.resources];
368
+ else if (o = e.resources, !(o instanceof Array) || !o.length)
369
+ return null;
370
+ return {
371
+ // API hosts
372
+ resources: o,
373
+ // Root path
374
+ path: e.path || "/",
375
+ // URL length limit
376
+ maxURL: e.maxURL || 500,
377
+ // Timeout before next host is used.
378
+ rotate: e.rotate || 750,
379
+ // Timeout before failing query.
380
+ timeout: e.timeout || 5e3,
381
+ // Randomise default API end point.
382
+ random: e.random === !0,
383
+ // Start index
384
+ index: e.index || 0,
385
+ // Receive data after time out (used if time out kicks in first, then API module sends data anyway).
386
+ dataAfterTimeout: e.dataAfterTimeout !== !1
387
+ };
388
+ }
389
+ const _ = /* @__PURE__ */ Object.create(null), j = [
390
+ "https://api.simplesvg.com",
391
+ "https://api.unisvg.com"
392
+ ], O = [];
393
+ for (; j.length > 0; )
394
+ j.length === 1 || Math.random() > 0.5 ? O.push(j.shift()) : O.push(j.pop());
395
+ _[""] = V({
396
+ resources: ["https://api.iconify.design"].concat(O)
397
+ });
398
+ function Ve(e, o) {
399
+ const n = V(o);
400
+ return n === null ? !1 : (_[e] = n, !0);
401
+ }
402
+ function G(e) {
403
+ return _[e];
404
+ }
405
+ const _e = () => {
406
+ let e;
407
+ try {
408
+ if (e = fetch, typeof e == "function")
409
+ return e;
410
+ } catch {
411
+ }
412
+ };
413
+ let X = _e();
414
+ function Ge(e, o) {
415
+ const n = G(e);
416
+ if (!n)
417
+ return 0;
418
+ let i;
419
+ if (!n.maxURL)
420
+ i = 0;
421
+ else {
422
+ let t = 0;
423
+ n.resources.forEach((r) => {
424
+ t = Math.max(t, r.length);
425
+ });
426
+ const s = o + ".json?icons=";
427
+ i = n.maxURL - t - n.path.length - s.length;
428
+ }
429
+ return i;
430
+ }
431
+ function Be(e) {
432
+ return e === 404;
433
+ }
434
+ const Ke = (e, o, n) => {
435
+ const i = [], t = Ge(e, o), s = "icons";
436
+ let r = {
437
+ type: s,
438
+ provider: e,
439
+ prefix: o,
440
+ icons: []
441
+ }, l = 0;
442
+ return n.forEach((u, c) => {
443
+ l += u.length + 1, l >= t && c > 0 && (i.push(r), r = {
444
+ type: s,
445
+ provider: e,
446
+ prefix: o,
447
+ icons: []
448
+ }, l = u.length), r.icons.push(u);
449
+ }), i.push(r), i;
450
+ };
451
+ function We(e) {
452
+ if (typeof e == "string") {
453
+ const o = G(e);
454
+ if (o)
455
+ return o.path;
456
+ }
457
+ return "/";
458
+ }
459
+ const Je = (e, o, n) => {
460
+ if (!X) {
461
+ n("abort", 424);
462
+ return;
463
+ }
464
+ let i = We(o.provider);
465
+ switch (o.type) {
466
+ case "icons": {
467
+ const s = o.prefix, l = o.icons.join(","), u = new URLSearchParams({
468
+ icons: l
469
+ });
470
+ i += s + ".json?" + u.toString();
471
+ break;
472
+ }
473
+ case "custom": {
474
+ const s = o.uri;
475
+ i += s.slice(0, 1) === "/" ? s.slice(1) : s;
476
+ break;
477
+ }
478
+ default:
479
+ n("abort", 400);
480
+ return;
481
+ }
482
+ let t = 503;
483
+ X(e + i).then((s) => {
484
+ const r = s.status;
485
+ if (r !== 200) {
486
+ setTimeout(() => {
487
+ n(Be(r) ? "abort" : "next", r);
488
+ });
489
+ return;
490
+ }
491
+ return t = 501, s.json();
492
+ }).then((s) => {
493
+ if (typeof s != "object" || s === null) {
494
+ setTimeout(() => {
495
+ s === 404 ? n("abort", s) : n("next", t);
496
+ });
497
+ return;
498
+ }
499
+ setTimeout(() => {
500
+ n("success", s);
501
+ });
502
+ }).catch(() => {
503
+ n("next", t);
504
+ });
505
+ }, Xe = {
506
+ prepare: Ke,
507
+ send: Je
508
+ };
509
+ function Ye(e) {
510
+ const o = {
511
+ loaded: [],
512
+ missing: [],
513
+ pending: []
514
+ }, n = /* @__PURE__ */ Object.create(null);
515
+ e.sort((t, s) => t.provider !== s.provider ? t.provider.localeCompare(s.provider) : t.prefix !== s.prefix ? t.prefix.localeCompare(s.prefix) : t.name.localeCompare(s.name));
516
+ let i = {
517
+ provider: "",
518
+ prefix: "",
519
+ name: ""
520
+ };
521
+ return e.forEach((t) => {
522
+ if (i.name === t.name && i.prefix === t.prefix && i.provider === t.provider)
523
+ return;
524
+ i = t;
525
+ const s = t.provider, r = t.prefix, l = t.name, u = n[s] || (n[s] = /* @__PURE__ */ Object.create(null)), c = u[r] || (u[r] = k(s, r));
526
+ let f;
527
+ l in c.icons ? f = o.loaded : r === "" || c.missing.has(l) ? f = o.missing : f = o.pending;
528
+ const d = {
529
+ provider: s,
530
+ prefix: r,
531
+ name: l
532
+ };
533
+ f.push(d);
534
+ }), o;
535
+ }
536
+ function he(e, o) {
537
+ e.forEach((n) => {
538
+ const i = n.loaderCallbacks;
539
+ i && (n.loaderCallbacks = i.filter((t) => t.id !== o));
540
+ });
541
+ }
542
+ function Ze(e) {
543
+ e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
544
+ e.pendingCallbacksFlag = !1;
545
+ const o = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
546
+ if (!o.length)
547
+ return;
548
+ let n = !1;
549
+ const i = e.provider, t = e.prefix;
550
+ o.forEach((s) => {
551
+ const r = s.icons, l = r.pending.length;
552
+ r.pending = r.pending.filter((u) => {
553
+ if (u.prefix !== t)
554
+ return !0;
555
+ const c = u.name;
556
+ if (e.icons[c])
557
+ r.loaded.push({
558
+ provider: i,
559
+ prefix: t,
560
+ name: c
561
+ });
562
+ else if (e.missing.has(c))
563
+ r.missing.push({
564
+ provider: i,
565
+ prefix: t,
566
+ name: c
567
+ });
568
+ else
569
+ return n = !0, !0;
570
+ return !1;
571
+ }), r.pending.length !== l && (n || he([e], s.id), s.callback(
572
+ r.loaded.slice(0),
573
+ r.missing.slice(0),
574
+ r.pending.slice(0),
575
+ s.abort
576
+ ));
577
+ });
578
+ }));
579
+ }
580
+ let et = 0;
581
+ function tt(e, o, n) {
582
+ const i = et++, t = he.bind(null, n, i);
583
+ if (!o.pending.length)
584
+ return t;
585
+ const s = {
586
+ id: i,
587
+ icons: o,
588
+ callback: e,
589
+ abort: t
590
+ };
591
+ return n.forEach((r) => {
592
+ (r.loaderCallbacks || (r.loaderCallbacks = [])).push(s);
593
+ }), t;
594
+ }
595
+ function nt(e, o = !0, n = !1) {
596
+ const i = [];
597
+ return e.forEach((t) => {
598
+ const s = typeof t == "string" ? M(t, o, n) : t;
599
+ s && i.push(s);
600
+ }), i;
601
+ }
602
+ var ot = {
603
+ resources: [],
604
+ index: 0,
605
+ timeout: 2e3,
606
+ rotate: 750,
607
+ random: !1,
608
+ dataAfterTimeout: !1
609
+ };
610
+ function it(e, o, n, i) {
611
+ const t = e.resources.length, s = e.random ? Math.floor(Math.random() * t) : e.index;
612
+ let r;
613
+ if (e.random) {
614
+ let h = e.resources.slice(0);
615
+ for (r = []; h.length > 1; ) {
616
+ const x = Math.floor(Math.random() * h.length);
617
+ r.push(h[x]), h = h.slice(0, x).concat(h.slice(x + 1));
618
+ }
619
+ r = r.concat(h);
620
+ } else
621
+ r = e.resources.slice(s).concat(e.resources.slice(0, s));
622
+ const l = Date.now();
623
+ let u = "pending", c = 0, f, d = null, p = [], g = [];
624
+ typeof i == "function" && g.push(i);
625
+ function y() {
626
+ d && (clearTimeout(d), d = null);
627
+ }
628
+ function m() {
629
+ u === "pending" && (u = "aborted"), y(), p.forEach((h) => {
630
+ h.status === "pending" && (h.status = "aborted");
631
+ }), p = [];
632
+ }
633
+ function a(h, x) {
634
+ x && (g = []), typeof h == "function" && g.push(h);
635
+ }
636
+ function S() {
637
+ return {
638
+ startTime: l,
639
+ payload: o,
640
+ status: u,
641
+ queriesSent: c,
642
+ queriesPending: p.length,
643
+ subscribe: a,
644
+ abort: m
645
+ };
646
+ }
647
+ function w() {
648
+ u = "failed", g.forEach((h) => {
649
+ h(void 0, f);
650
+ });
651
+ }
652
+ function v() {
653
+ p.forEach((h) => {
654
+ h.status === "pending" && (h.status = "aborted");
655
+ }), p = [];
656
+ }
657
+ function b(h, x, T) {
658
+ const F = x !== "success";
659
+ switch (p = p.filter((I) => I !== h), u) {
660
+ case "pending":
661
+ break;
662
+ case "failed":
663
+ if (F || !e.dataAfterTimeout)
664
+ return;
665
+ break;
666
+ default:
667
+ return;
668
+ }
669
+ if (x === "abort") {
670
+ f = T, w();
671
+ return;
672
+ }
673
+ if (F) {
674
+ f = T, p.length || (r.length ? N() : w());
675
+ return;
676
+ }
677
+ if (y(), v(), !e.random) {
678
+ const I = e.resources.indexOf(h.resource);
679
+ I !== -1 && I !== e.index && (e.index = I);
680
+ }
681
+ u = "completed", g.forEach((I) => {
682
+ I(T);
683
+ });
684
+ }
685
+ function N() {
686
+ if (u !== "pending")
687
+ return;
688
+ y();
689
+ const h = r.shift();
690
+ if (h === void 0) {
691
+ if (p.length) {
692
+ d = setTimeout(() => {
693
+ y(), u === "pending" && (v(), w());
694
+ }, e.timeout);
695
+ return;
696
+ }
697
+ w();
698
+ return;
699
+ }
700
+ const x = {
701
+ status: "pending",
702
+ resource: h,
703
+ callback: (T, F) => {
704
+ b(x, T, F);
705
+ }
706
+ };
707
+ p.push(x), c++, d = setTimeout(N, e.rotate), n(h, o, x.callback);
708
+ }
709
+ return setTimeout(N), S;
710
+ }
711
+ function ge(e) {
712
+ const o = {
713
+ ...ot,
714
+ ...e
715
+ };
716
+ let n = [];
717
+ function i() {
718
+ n = n.filter((l) => l().status === "pending");
719
+ }
720
+ function t(l, u, c) {
721
+ const f = it(
722
+ o,
723
+ l,
724
+ u,
725
+ (d, p) => {
726
+ i(), c && c(d, p);
727
+ }
728
+ );
729
+ return n.push(f), f;
730
+ }
731
+ function s(l) {
732
+ return n.find((u) => l(u)) || null;
733
+ }
734
+ return {
735
+ query: t,
736
+ find: s,
737
+ setIndex: (l) => {
738
+ o.index = l;
739
+ },
740
+ getIndex: () => o.index,
741
+ cleanup: i
742
+ };
743
+ }
744
+ function Y() {
745
+ }
746
+ const Q = /* @__PURE__ */ Object.create(null);
747
+ function st(e) {
748
+ if (!Q[e]) {
749
+ const o = G(e);
750
+ if (!o)
751
+ return;
752
+ const n = ge(o), i = {
753
+ config: o,
754
+ redundancy: n
755
+ };
756
+ Q[e] = i;
757
+ }
758
+ return Q[e];
759
+ }
760
+ function rt(e, o, n) {
761
+ let i, t;
762
+ if (typeof e == "string") {
763
+ const s = H(e);
764
+ if (!s)
765
+ return n(void 0, 424), Y;
766
+ t = s.send;
767
+ const r = st(e);
768
+ r && (i = r.redundancy);
769
+ } else {
770
+ const s = V(e);
771
+ if (s) {
772
+ i = ge(s);
773
+ const r = e.resources ? e.resources[0] : "", l = H(r);
774
+ l && (t = l.send);
775
+ }
776
+ }
777
+ return !i || !t ? (n(void 0, 424), Y) : i.query(o, t, n)().abort;
778
+ }
779
+ function Z() {
780
+ }
781
+ function ct(e) {
782
+ e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
783
+ e.iconsLoaderFlag = !1, Ze(e);
784
+ }));
785
+ }
786
+ function lt(e) {
787
+ const o = [], n = [];
788
+ return e.forEach((i) => {
789
+ (i.match(re) ? o : n).push(i);
790
+ }), {
791
+ valid: o,
792
+ invalid: n
793
+ };
794
+ }
795
+ function C(e, o, n) {
796
+ function i() {
797
+ const t = e.pendingIcons;
798
+ o.forEach((s) => {
799
+ t && t.delete(s), e.icons[s] || e.missing.add(s);
800
+ });
801
+ }
802
+ if (n && typeof n == "object")
803
+ try {
804
+ if (!fe(e, n).length) {
805
+ i();
806
+ return;
807
+ }
808
+ } catch (t) {
809
+ console.error(t);
810
+ }
811
+ i(), ct(e);
812
+ }
813
+ function ee(e, o) {
814
+ e instanceof Promise ? e.then((n) => {
815
+ o(n);
816
+ }).catch(() => {
817
+ o(null);
818
+ }) : o(e);
819
+ }
820
+ function ut(e, o) {
821
+ e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(o).sort() : e.iconsToLoad = o, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
822
+ e.iconsQueueFlag = !1;
823
+ const { provider: n, prefix: i } = e, t = e.iconsToLoad;
824
+ if (delete e.iconsToLoad, !t || !t.length)
825
+ return;
826
+ const s = e.loadIcon;
827
+ if (e.loadIcons && (t.length > 1 || !s)) {
828
+ ee(
829
+ e.loadIcons(t, i, n),
830
+ (f) => {
831
+ C(e, t, f);
832
+ }
833
+ );
834
+ return;
835
+ }
836
+ if (s) {
837
+ t.forEach((f) => {
838
+ const d = s(f, i, n);
839
+ ee(d, (p) => {
840
+ const g = p ? {
841
+ prefix: i,
842
+ icons: {
843
+ [f]: p
844
+ }
845
+ } : null;
846
+ C(e, [f], g);
847
+ });
848
+ });
849
+ return;
850
+ }
851
+ const { valid: r, invalid: l } = lt(t);
852
+ if (l.length && C(e, l, null), !r.length)
853
+ return;
854
+ const u = i.match(re) ? H(n) : null;
855
+ if (!u) {
856
+ C(e, r, null);
857
+ return;
858
+ }
859
+ u.prepare(n, i, r).forEach((f) => {
860
+ rt(n, f, (d) => {
861
+ C(e, f.icons, d);
862
+ });
863
+ });
864
+ }));
865
+ }
866
+ const ft = (e, o) => {
867
+ const n = nt(e, !0, ae()), i = Ye(n);
868
+ if (!i.pending.length) {
869
+ let u = !0;
870
+ return o && setTimeout(() => {
871
+ u && o(
872
+ i.loaded,
873
+ i.missing,
874
+ i.pending,
875
+ Z
876
+ );
877
+ }), () => {
878
+ u = !1;
879
+ };
880
+ }
881
+ const t = /* @__PURE__ */ Object.create(null), s = [];
882
+ let r, l;
883
+ return i.pending.forEach((u) => {
884
+ const { provider: c, prefix: f } = u;
885
+ if (f === l && c === r)
886
+ return;
887
+ r = c, l = f, s.push(k(c, f));
888
+ const d = t[c] || (t[c] = /* @__PURE__ */ Object.create(null));
889
+ d[f] || (d[f] = []);
890
+ }), i.pending.forEach((u) => {
891
+ const { provider: c, prefix: f, name: d } = u, p = k(c, f), g = p.pendingIcons || (p.pendingIcons = /* @__PURE__ */ new Set());
892
+ g.has(d) || (g.add(d), t[c][f].push(d));
893
+ }), s.forEach((u) => {
894
+ const c = t[u.provider][u.prefix];
895
+ c.length && ut(u, c);
896
+ }), o ? tt(o, i, s) : Z;
897
+ };
898
+ function at(e, o) {
899
+ const n = {
900
+ ...e
901
+ };
902
+ for (const i in o) {
903
+ const t = o[i], s = typeof t;
904
+ i in de ? (t === null || t && (s === "string" || s === "number")) && (n[i] = t) : s === typeof n[i] && (n[i] = i === "rotate" ? t % 4 : t);
905
+ }
906
+ return n;
907
+ }
908
+ const dt = /[\s,]+/;
909
+ function pt(e, o) {
910
+ o.split(dt).forEach((n) => {
911
+ switch (n.trim()) {
912
+ case "horizontal":
913
+ e.hFlip = !0;
914
+ break;
915
+ case "vertical":
916
+ e.vFlip = !0;
917
+ break;
918
+ }
919
+ });
920
+ }
921
+ function ht(e, o = 0) {
922
+ const n = e.replace(/^-?[0-9.]*/, "");
923
+ function i(t) {
924
+ for (; t < 0; )
925
+ t += 4;
926
+ return t % 4;
927
+ }
928
+ if (n === "") {
929
+ const t = parseInt(e);
930
+ return isNaN(t) ? 0 : i(t);
931
+ } else if (n !== e) {
932
+ let t = 0;
933
+ switch (n) {
934
+ case "%":
935
+ t = 25;
936
+ break;
937
+ case "deg":
938
+ t = 90;
939
+ }
940
+ if (t) {
941
+ let s = parseFloat(e.slice(0, e.length - n.length));
942
+ return isNaN(s) ? 0 : (s = s / t, s % 1 === 0 ? i(s) : 0);
943
+ }
944
+ }
945
+ return o;
946
+ }
947
+ function gt(e, o) {
948
+ let n = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
949
+ for (const i in o)
950
+ n += " " + i + '="' + o[i] + '"';
951
+ return '<svg xmlns="http://www.w3.org/2000/svg"' + n + ">" + e + "</svg>";
952
+ }
953
+ function mt(e) {
954
+ return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
955
+ }
956
+ function yt(e) {
957
+ return "data:image/svg+xml," + mt(e);
958
+ }
959
+ function bt(e) {
960
+ return 'url("' + yt(e) + '")';
961
+ }
962
+ const te = {
963
+ ...pe,
964
+ inline: !1
965
+ }, xt = {
966
+ xmlns: "http://www.w3.org/2000/svg",
967
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
968
+ "aria-hidden": !0,
969
+ role: "img"
970
+ }, vt = {
971
+ display: "inline-block"
972
+ }, $ = {
973
+ backgroundColor: "currentColor"
974
+ }, me = {
975
+ backgroundColor: "transparent"
976
+ }, ne = {
977
+ Image: "var(--svg)",
978
+ Repeat: "no-repeat",
979
+ Size: "100% 100%"
980
+ }, oe = {
981
+ webkitMask: $,
982
+ mask: $,
983
+ background: me
984
+ };
985
+ for (const e in oe) {
986
+ const o = oe[e];
987
+ for (const n in ne)
988
+ o[e + n] = ne[n];
989
+ }
990
+ const A = {};
991
+ ["horizontal", "vertical"].forEach((e) => {
992
+ const o = e.slice(0, 1) + "Flip";
993
+ A[e + "-flip"] = o, A[e.slice(0, 1) + "-flip"] = o, A[e + "Flip"] = o;
994
+ });
995
+ function ie(e) {
996
+ return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
997
+ }
998
+ const se = (e, o) => {
999
+ const n = at(te, o), i = { ...xt }, t = o.mode || "svg", s = {}, r = o.style, l = typeof r == "object" && !(r instanceof Array) ? r : {};
1000
+ for (let m in o) {
1001
+ const a = o[m];
1002
+ if (a !== void 0)
1003
+ switch (m) {
1004
+ // Properties to ignore
1005
+ case "icon":
1006
+ case "style":
1007
+ case "onLoad":
1008
+ case "mode":
1009
+ case "ssr":
1010
+ break;
1011
+ // Boolean attributes
1012
+ case "inline":
1013
+ case "hFlip":
1014
+ case "vFlip":
1015
+ n[m] = a === !0 || a === "true" || a === 1;
1016
+ break;
1017
+ // Flip as string: 'horizontal,vertical'
1018
+ case "flip":
1019
+ typeof a == "string" && pt(n, a);
1020
+ break;
1021
+ // Color: override style
1022
+ case "color":
1023
+ s.color = a;
1024
+ break;
1025
+ // Rotation as string
1026
+ case "rotate":
1027
+ typeof a == "string" ? n[m] = ht(a) : typeof a == "number" && (n[m] = a);
1028
+ break;
1029
+ // Remove aria-hidden
1030
+ case "ariaHidden":
1031
+ case "aria-hidden":
1032
+ a !== !0 && a !== "true" && delete i["aria-hidden"];
1033
+ break;
1034
+ default: {
1035
+ const S = A[m];
1036
+ S ? (a === !0 || a === "true" || a === 1) && (n[S] = !0) : te[m] === void 0 && (i[m] = a);
1037
+ }
1038
+ }
1039
+ }
1040
+ const u = ze(e, n), c = u.attributes;
1041
+ if (n.inline && (s.verticalAlign = "-0.125em"), t === "svg") {
1042
+ i.style = {
1043
+ ...s,
1044
+ ...l
1045
+ }, Object.assign(i, c);
1046
+ let m = 0, a = o.id;
1047
+ return typeof a == "string" && (a = a.replace(/-/g, "_")), i.innerHTML = He(u.body, a ? () => a + "ID" + m++ : "iconifyVue"), B("svg", i);
1048
+ }
1049
+ const { body: f, width: d, height: p } = e, g = t === "mask" || (t === "bg" ? !1 : f.indexOf("currentColor") !== -1), y = gt(f, {
1050
+ ...c,
1051
+ width: d + "",
1052
+ height: p + ""
1053
+ });
1054
+ return i.style = {
1055
+ ...s,
1056
+ "--svg": bt(y),
1057
+ width: ie(c.width),
1058
+ height: ie(c.height),
1059
+ ...vt,
1060
+ ...g ? $ : me,
1061
+ ...l
1062
+ }, B("span", i);
1063
+ };
1064
+ ae(!0);
1065
+ $e("", Xe);
1066
+ if (typeof document < "u" && typeof window < "u") {
1067
+ const e = window;
1068
+ if (e.IconifyPreload !== void 0) {
1069
+ const o = e.IconifyPreload, n = "Invalid IconifyPreload syntax.";
1070
+ typeof o == "object" && o !== null && (o instanceof Array ? o : [o]).forEach((i) => {
1071
+ try {
1072
+ // Check if item is an object and not null/array
1073
+ (typeof i != "object" || i === null || i instanceof Array || // Check for 'icons' and 'prefix'
1074
+ typeof i.icons != "object" || typeof i.prefix != "string" || // Add icon set
1075
+ !Oe(i)) && console.error(n);
1076
+ } catch {
1077
+ console.error(n);
1078
+ }
1079
+ });
1080
+ }
1081
+ if (e.IconifyProviders !== void 0) {
1082
+ const o = e.IconifyProviders;
1083
+ if (typeof o == "object" && o !== null)
1084
+ for (let n in o) {
1085
+ const i = "IconifyProviders[" + n + "] is invalid.";
1086
+ try {
1087
+ const t = o[n];
1088
+ if (typeof t != "object" || !t || t.resources === void 0)
1089
+ continue;
1090
+ Ve(n, t) || console.error(i);
1091
+ } catch {
1092
+ console.error(i);
1093
+ }
1094
+ }
1095
+ }
1096
+ }
1097
+ const wt = {
1098
+ ...D,
1099
+ body: ""
1100
+ }, St = ye((e, { emit: o }) => {
1101
+ const n = R(null);
1102
+ function i() {
1103
+ n.value && (n.value.abort?.(), n.value = null);
1104
+ }
1105
+ const t = R(!!e.ssr), s = R(""), r = be(null);
1106
+ function l() {
1107
+ const c = e.icon;
1108
+ if (typeof c == "object" && c !== null && typeof c.body == "string")
1109
+ return s.value = "", {
1110
+ data: c
1111
+ };
1112
+ let f;
1113
+ if (typeof c != "string" || (f = M(c, !1, !0)) === null)
1114
+ return null;
1115
+ let d = Fe(f);
1116
+ if (!d) {
1117
+ const y = n.value;
1118
+ return (!y || y.name !== c) && (d === null ? n.value = {
1119
+ name: c
1120
+ } : n.value = {
1121
+ name: c,
1122
+ abort: ft([f], u)
1123
+ }), null;
1124
+ }
1125
+ i(), s.value !== c && (s.value = c, Ie(() => {
1126
+ o("load", c);
1127
+ }));
1128
+ const p = e.customise;
1129
+ if (p) {
1130
+ d = Object.assign({}, d);
1131
+ const y = p(d.body, f.name, f.prefix, f.provider);
1132
+ typeof y == "string" && (d.body = y);
1133
+ }
1134
+ const g = ["iconify"];
1135
+ return f.prefix !== "" && g.push("iconify--" + f.prefix), f.provider !== "" && g.push("iconify--" + f.provider), { data: d, classes: g };
1136
+ }
1137
+ function u() {
1138
+ const c = l();
1139
+ c ? c.data !== r.value?.data && (r.value = c) : r.value = null;
1140
+ }
1141
+ return t.value ? u() : xe(() => {
1142
+ t.value = !0, u();
1143
+ }), ve(() => e.icon, u), we(i), () => {
1144
+ const c = r.value;
1145
+ if (!c)
1146
+ return se(wt, e);
1147
+ let f = e;
1148
+ return c.classes && (f = {
1149
+ ...e,
1150
+ class: c.classes.join(" ")
1151
+ }), se({
1152
+ ...D,
1153
+ ...c.data
1154
+ }, f);
1155
+ };
1156
+ }, {
1157
+ props: [
1158
+ // Icon and render mode
1159
+ "icon",
1160
+ "mode",
1161
+ "ssr",
1162
+ // Layout and style
1163
+ "width",
1164
+ "height",
1165
+ "style",
1166
+ "color",
1167
+ "inline",
1168
+ // Transformations
1169
+ "rotate",
1170
+ "hFlip",
1171
+ "horizontalFlip",
1172
+ "vFlip",
1173
+ "verticalFlip",
1174
+ "flip",
1175
+ // Misc
1176
+ "id",
1177
+ "ariaHidden",
1178
+ "customise",
1179
+ "title"
1180
+ ],
1181
+ emits: ["load"]
1182
+ });
1183
+ var kt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
1184
+ function Tt(e) {
1185
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1186
+ }
1187
+ export {
1188
+ St as I,
1189
+ kt as c,
1190
+ Tt as g
1191
+ };