@choosemycompany/ui 0.2.0 → 0.3.1
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/README.md +7 -0
- package/dist/assets/index.css +1 -1
- package/dist/index.d.ts +61 -9
- package/dist/index.js +642 -546
- package/dist/index.umd.js +2 -2
- package/package.json +19 -19
package/dist/index.js
CHANGED
|
@@ -1,141 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import './assets/index.css';const
|
|
1
|
+
import { defineComponent as O, ref as K, shallowRef as je, onMounted as Fe, watch as $e, onUnmounted as Ae, h as ie, nextTick as Le, computed as _, createBlock as ve, openBlock as b, unref as T, normalizeClass as x, createElementBlock as v, createCommentVNode as j, renderSlot as P, Fragment as G, createVNode as Me, createElementVNode as N, withCtx as Ne, renderList as ze, toDisplayString as Re } from "vue";
|
|
2
|
+
import './assets/index.css';const De = {
|
|
3
3
|
primary: "primary",
|
|
4
4
|
secondary: "secondary"
|
|
5
|
-
},
|
|
5
|
+
}, Be = {
|
|
6
6
|
default: "default",
|
|
7
7
|
danger: "danger"
|
|
8
|
-
},
|
|
8
|
+
}, Ve = {
|
|
9
9
|
small: "small",
|
|
10
10
|
medium: "medium"
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"button--disabled": t.disabled
|
|
29
|
-
})), i = () => {
|
|
30
|
-
t.disabled || s("click", 1);
|
|
31
|
-
};
|
|
32
|
-
return (r, c) => (w(), I("button", {
|
|
33
|
-
type: "button",
|
|
34
|
-
class: C(o.value),
|
|
35
|
-
onClick: i,
|
|
36
|
-
disabled: t.disabled
|
|
37
|
-
}, [
|
|
38
|
-
k(r.$slots, "default")
|
|
39
|
-
], 10, Be));
|
|
40
|
-
}
|
|
41
|
-
}), j = {
|
|
42
|
-
h1: "h1",
|
|
43
|
-
h2: "h2",
|
|
44
|
-
h3: "h3",
|
|
45
|
-
h4: "h4",
|
|
46
|
-
h5: "h5",
|
|
47
|
-
h6: "h6"
|
|
48
|
-
}, He = /* @__PURE__ */ _({
|
|
49
|
-
name: "CmcHeading",
|
|
50
|
-
__name: "CmcHeading",
|
|
51
|
-
props: {
|
|
52
|
-
level: {}
|
|
53
|
-
},
|
|
54
|
-
setup(e) {
|
|
55
|
-
const n = e, t = M(() => ({
|
|
56
|
-
heading: !0,
|
|
57
|
-
[`heading-${n.level}`]: !0
|
|
58
|
-
}));
|
|
59
|
-
return (s, o) => (w(), I(ye, null, [
|
|
60
|
-
S(j).h1 === n.level ? (w(), I("h1", {
|
|
61
|
-
key: 0,
|
|
62
|
-
class: C(t.value)
|
|
63
|
-
}, [
|
|
64
|
-
k(s.$slots, "default")
|
|
65
|
-
], 2)) : O("", !0),
|
|
66
|
-
S(j).h2 === n.level ? (w(), I("h2", {
|
|
67
|
-
key: 1,
|
|
68
|
-
class: C(t.value)
|
|
69
|
-
}, [
|
|
70
|
-
k(s.$slots, "default")
|
|
71
|
-
], 2)) : O("", !0),
|
|
72
|
-
S(j).h3 === n.level ? (w(), I("h3", {
|
|
73
|
-
key: 2,
|
|
74
|
-
class: C(t.value)
|
|
75
|
-
}, [
|
|
76
|
-
k(s.$slots, "default")
|
|
77
|
-
], 2)) : O("", !0),
|
|
78
|
-
S(j).h4 === n.level ? (w(), I("h4", {
|
|
79
|
-
key: 3,
|
|
80
|
-
class: C(t.value)
|
|
81
|
-
}, [
|
|
82
|
-
k(s.$slots, "default")
|
|
83
|
-
], 2)) : O("", !0),
|
|
84
|
-
S(j).h5 === n.level ? (w(), I("h5", {
|
|
85
|
-
key: 4,
|
|
86
|
-
class: C(t.value)
|
|
87
|
-
}, [
|
|
88
|
-
k(s.$slots, "default")
|
|
89
|
-
], 2)) : O("", !0),
|
|
90
|
-
S(j).h6 === n.level ? (w(), I("h6", {
|
|
91
|
-
key: 5,
|
|
92
|
-
class: C(t.value)
|
|
93
|
-
}, [
|
|
94
|
-
k(s.$slots, "default")
|
|
95
|
-
], 2)) : O("", !0)
|
|
96
|
-
], 64));
|
|
97
|
-
}
|
|
98
|
-
}), Kt = /* @__PURE__ */ _({
|
|
99
|
-
name: "CmcTitle",
|
|
100
|
-
__name: "CmcTitle",
|
|
101
|
-
setup(e) {
|
|
102
|
-
return (n, t) => (w(), I(ye, null, [
|
|
103
|
-
Fe(He, {
|
|
104
|
-
level: S(j).h1
|
|
105
|
-
}, {
|
|
106
|
-
default: Oe(() => [
|
|
107
|
-
k(n.$slots, "default")
|
|
108
|
-
]),
|
|
109
|
-
_: 3
|
|
110
|
-
}, 8, ["level"]),
|
|
111
|
-
t[0] || (t[0] = W("hr", null, null, -1))
|
|
112
|
-
], 64));
|
|
113
|
-
}
|
|
114
|
-
}), Ve = {
|
|
115
|
-
success: "success",
|
|
116
|
-
danger: "danger",
|
|
117
|
-
warning: "warning"
|
|
118
|
-
}, qe = { class: "status__label" }, Wt = /* @__PURE__ */ _({
|
|
119
|
-
name: "CmcStatus",
|
|
120
|
-
__name: "CmcStatus",
|
|
121
|
-
props: {
|
|
122
|
-
status: { default: Ve.success }
|
|
123
|
-
},
|
|
124
|
-
setup(e) {
|
|
125
|
-
const n = e, t = M(() => ({
|
|
126
|
-
status: !0,
|
|
127
|
-
[`status--${n.status}`]: !0
|
|
128
|
-
}));
|
|
129
|
-
return (s, o) => (w(), I("div", {
|
|
130
|
-
class: C(t.value)
|
|
131
|
-
}, [
|
|
132
|
-
o[0] || (o[0] = W("span", { class: "status__dot" }, null, -1)),
|
|
133
|
-
W("span", qe, [
|
|
134
|
-
k(s.$slots, "default")
|
|
135
|
-
])
|
|
136
|
-
], 2));
|
|
137
|
-
}
|
|
138
|
-
}), be = /^[a-z0-9]+(-[a-z0-9]+)*$/, V = (e, n, t, s = "") => {
|
|
11
|
+
}, re = {
|
|
12
|
+
profile: "iconamoon:profile-light",
|
|
13
|
+
edit: "iconamoon:edit-light",
|
|
14
|
+
delete: "qlementine-icons:trash-16",
|
|
15
|
+
filter: "mdi:filter-outline",
|
|
16
|
+
search: "material-symbols:search",
|
|
17
|
+
people: "ic:outline-people",
|
|
18
|
+
plus: "ic:baseline-plus",
|
|
19
|
+
mail: "ci:mail-open",
|
|
20
|
+
"chevron-down": "mi:chevron-down"
|
|
21
|
+
}, J = {
|
|
22
|
+
medium: "medium",
|
|
23
|
+
large: "large"
|
|
24
|
+
}, Ge = {
|
|
25
|
+
primary: "primary",
|
|
26
|
+
secondary: "secondary"
|
|
27
|
+
}, xe = /^[a-z0-9]+(-[a-z0-9]+)*$/, q = (e, n, t, s = "") => {
|
|
139
28
|
const o = e.split(":");
|
|
140
29
|
if (e.slice(0, 1) === "@") {
|
|
141
30
|
if (o.length < 2 || o.length > 3)
|
|
@@ -145,35 +34,35 @@ import './assets/index.css';const ze = {
|
|
|
145
34
|
if (o.length > 3 || !o.length)
|
|
146
35
|
return null;
|
|
147
36
|
if (o.length > 1) {
|
|
148
|
-
const
|
|
37
|
+
const l = o.pop(), a = o.pop(), c = {
|
|
149
38
|
// Allow provider without '@': "provider:prefix:name"
|
|
150
39
|
provider: o.length > 0 ? o[0] : s,
|
|
151
|
-
prefix:
|
|
152
|
-
name:
|
|
40
|
+
prefix: a,
|
|
41
|
+
name: l
|
|
153
42
|
};
|
|
154
|
-
return n && !D(
|
|
43
|
+
return n && !D(c) ? null : c;
|
|
155
44
|
}
|
|
156
45
|
const i = o[0], r = i.split("-");
|
|
157
46
|
if (r.length > 1) {
|
|
158
|
-
const
|
|
47
|
+
const l = {
|
|
159
48
|
provider: s,
|
|
160
49
|
prefix: r.shift(),
|
|
161
50
|
name: r.join("-")
|
|
162
51
|
};
|
|
163
|
-
return n && !D(
|
|
52
|
+
return n && !D(l) ? null : l;
|
|
164
53
|
}
|
|
165
54
|
if (t && s === "") {
|
|
166
|
-
const
|
|
55
|
+
const l = {
|
|
167
56
|
provider: s,
|
|
168
57
|
prefix: "",
|
|
169
58
|
name: i
|
|
170
59
|
};
|
|
171
|
-
return n && !D(
|
|
60
|
+
return n && !D(l, t) ? null : l;
|
|
172
61
|
}
|
|
173
62
|
return null;
|
|
174
63
|
}, D = (e, n) => e ? !!// Check prefix: cannot be empty, unless allowSimpleName is enabled
|
|
175
64
|
// Check name: cannot be empty
|
|
176
|
-
((n && e.prefix === "" || e.prefix) && e.name) : !1,
|
|
65
|
+
((n && e.prefix === "" || e.prefix) && e.name) : !1, we = Object.freeze(
|
|
177
66
|
{
|
|
178
67
|
left: 0,
|
|
179
68
|
top: 0,
|
|
@@ -184,82 +73,82 @@ import './assets/index.css';const ze = {
|
|
|
184
73
|
rotate: 0,
|
|
185
74
|
vFlip: !1,
|
|
186
75
|
hFlip: !1
|
|
187
|
-
}),
|
|
188
|
-
...
|
|
76
|
+
}), Q = Object.freeze({
|
|
77
|
+
...we,
|
|
189
78
|
...H
|
|
190
|
-
}),
|
|
191
|
-
...
|
|
79
|
+
}), X = Object.freeze({
|
|
80
|
+
...Q,
|
|
192
81
|
body: "",
|
|
193
82
|
hidden: !1
|
|
194
83
|
});
|
|
195
|
-
function
|
|
84
|
+
function He(e, n) {
|
|
196
85
|
const t = {};
|
|
197
86
|
!e.hFlip != !n.hFlip && (t.hFlip = !0), !e.vFlip != !n.vFlip && (t.vFlip = !0);
|
|
198
87
|
const s = ((e.rotate || 0) + (n.rotate || 0)) % 4;
|
|
199
88
|
return s && (t.rotate = s), t;
|
|
200
89
|
}
|
|
201
|
-
function
|
|
202
|
-
const t =
|
|
203
|
-
for (const s in
|
|
90
|
+
function ce(e, n) {
|
|
91
|
+
const t = He(e, n);
|
|
92
|
+
for (const s in X)
|
|
204
93
|
s in H ? s in e && !(s in t) && (t[s] = H[s]) : s in n ? t[s] = n[s] : s in e && (t[s] = e[s]);
|
|
205
94
|
return t;
|
|
206
95
|
}
|
|
207
|
-
function
|
|
96
|
+
function qe(e, n) {
|
|
208
97
|
const t = e.icons, s = e.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
|
|
209
98
|
function i(r) {
|
|
210
99
|
if (t[r])
|
|
211
100
|
return o[r] = [];
|
|
212
101
|
if (!(r in o)) {
|
|
213
102
|
o[r] = null;
|
|
214
|
-
const
|
|
215
|
-
|
|
103
|
+
const l = s[r] && s[r].parent, a = l && i(l);
|
|
104
|
+
a && (o[r] = [l].concat(a));
|
|
216
105
|
}
|
|
217
106
|
return o[r];
|
|
218
107
|
}
|
|
219
108
|
return Object.keys(t).concat(Object.keys(s)).forEach(i), o;
|
|
220
109
|
}
|
|
221
|
-
function
|
|
110
|
+
function Qe(e, n, t) {
|
|
222
111
|
const s = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null);
|
|
223
112
|
let i = {};
|
|
224
|
-
function r(
|
|
225
|
-
i =
|
|
226
|
-
s[
|
|
113
|
+
function r(l) {
|
|
114
|
+
i = ce(
|
|
115
|
+
s[l] || o[l],
|
|
227
116
|
i
|
|
228
117
|
);
|
|
229
118
|
}
|
|
230
|
-
return r(n), t.forEach(r),
|
|
119
|
+
return r(n), t.forEach(r), ce(e, i);
|
|
231
120
|
}
|
|
232
|
-
function
|
|
121
|
+
function Ie(e, n) {
|
|
233
122
|
const t = [];
|
|
234
123
|
if (typeof e != "object" || typeof e.icons != "object")
|
|
235
124
|
return t;
|
|
236
125
|
e.not_found instanceof Array && e.not_found.forEach((o) => {
|
|
237
126
|
n(o, null), t.push(o);
|
|
238
127
|
});
|
|
239
|
-
const s =
|
|
128
|
+
const s = qe(e);
|
|
240
129
|
for (const o in s) {
|
|
241
130
|
const i = s[o];
|
|
242
|
-
i && (n(o,
|
|
131
|
+
i && (n(o, Qe(e, o, i)), t.push(o));
|
|
243
132
|
}
|
|
244
133
|
return t;
|
|
245
134
|
}
|
|
246
|
-
const
|
|
135
|
+
const Ue = {
|
|
247
136
|
provider: "",
|
|
248
137
|
aliases: {},
|
|
249
138
|
not_found: {},
|
|
250
|
-
...
|
|
139
|
+
...we
|
|
251
140
|
};
|
|
252
|
-
function
|
|
141
|
+
function W(e, n) {
|
|
253
142
|
for (const t in n)
|
|
254
143
|
if (t in e && typeof e[t] != typeof n[t])
|
|
255
144
|
return !1;
|
|
256
145
|
return !0;
|
|
257
146
|
}
|
|
258
|
-
function
|
|
147
|
+
function Ce(e) {
|
|
259
148
|
if (typeof e != "object" || e === null)
|
|
260
149
|
return null;
|
|
261
150
|
const n = e;
|
|
262
|
-
if (typeof n.prefix != "string" || !e.icons || typeof e.icons != "object" || !
|
|
151
|
+
if (typeof n.prefix != "string" || !e.icons || typeof e.icons != "object" || !W(e, Ue))
|
|
263
152
|
return null;
|
|
264
153
|
const t = n.icons;
|
|
265
154
|
for (const o in t) {
|
|
@@ -268,9 +157,9 @@ function we(e) {
|
|
|
268
157
|
// Name cannot be empty
|
|
269
158
|
!o || // Must have body
|
|
270
159
|
typeof i.body != "string" || // Check other props
|
|
271
|
-
!
|
|
160
|
+
!W(
|
|
272
161
|
i,
|
|
273
|
-
|
|
162
|
+
X
|
|
274
163
|
)
|
|
275
164
|
)
|
|
276
165
|
return null;
|
|
@@ -282,17 +171,17 @@ function we(e) {
|
|
|
282
171
|
// Name cannot be empty
|
|
283
172
|
!o || // Parent must be set and point to existing icon
|
|
284
173
|
typeof r != "string" || !t[r] && !s[r] || // Check other props
|
|
285
|
-
!
|
|
174
|
+
!W(
|
|
286
175
|
i,
|
|
287
|
-
|
|
176
|
+
X
|
|
288
177
|
)
|
|
289
178
|
)
|
|
290
179
|
return null;
|
|
291
180
|
}
|
|
292
181
|
return n;
|
|
293
182
|
}
|
|
294
|
-
const
|
|
295
|
-
function
|
|
183
|
+
const le = /* @__PURE__ */ Object.create(null);
|
|
184
|
+
function Ke(e, n) {
|
|
296
185
|
return {
|
|
297
186
|
provider: e,
|
|
298
187
|
prefix: n,
|
|
@@ -300,16 +189,16 @@ function We(e, n) {
|
|
|
300
189
|
missing: /* @__PURE__ */ new Set()
|
|
301
190
|
};
|
|
302
191
|
}
|
|
303
|
-
function
|
|
304
|
-
const t =
|
|
305
|
-
return t[n] || (t[n] =
|
|
192
|
+
function $(e, n) {
|
|
193
|
+
const t = le[e] || (le[e] = /* @__PURE__ */ Object.create(null));
|
|
194
|
+
return t[n] || (t[n] = Ke(e, n));
|
|
306
195
|
}
|
|
307
|
-
function
|
|
308
|
-
return
|
|
196
|
+
function ke(e, n) {
|
|
197
|
+
return Ce(n) ? Ie(n, (t, s) => {
|
|
309
198
|
s ? e.icons[t] = s : e.missing.add(t);
|
|
310
199
|
}) : [];
|
|
311
200
|
}
|
|
312
|
-
function
|
|
201
|
+
function We(e, n, t) {
|
|
313
202
|
try {
|
|
314
203
|
if (typeof t.body == "string")
|
|
315
204
|
return e.icons[n] = { ...t }, !0;
|
|
@@ -317,31 +206,31 @@ function Je(e, n, t) {
|
|
|
317
206
|
}
|
|
318
207
|
return !1;
|
|
319
208
|
}
|
|
320
|
-
let
|
|
321
|
-
function
|
|
322
|
-
return typeof e == "boolean" && (
|
|
209
|
+
let z = !1;
|
|
210
|
+
function Pe(e) {
|
|
211
|
+
return typeof e == "boolean" && (z = e), z;
|
|
323
212
|
}
|
|
324
|
-
function
|
|
325
|
-
const n = typeof e == "string" ?
|
|
213
|
+
function Ze(e) {
|
|
214
|
+
const n = typeof e == "string" ? q(e, !0, z) : e;
|
|
326
215
|
if (n) {
|
|
327
|
-
const t =
|
|
216
|
+
const t = $(n.provider, n.prefix), s = n.name;
|
|
328
217
|
return t.icons[s] || (t.missing.has(s) ? null : void 0);
|
|
329
218
|
}
|
|
330
219
|
}
|
|
331
|
-
function
|
|
332
|
-
const t =
|
|
220
|
+
function Je(e, n) {
|
|
221
|
+
const t = q(e, !0, z);
|
|
333
222
|
if (!t)
|
|
334
223
|
return !1;
|
|
335
|
-
const s =
|
|
336
|
-
return n ?
|
|
224
|
+
const s = $(t.provider, t.prefix);
|
|
225
|
+
return n ? We(s, t.name, n) : (s.missing.add(t.name), !0);
|
|
337
226
|
}
|
|
338
|
-
function
|
|
227
|
+
function Xe(e, n) {
|
|
339
228
|
if (typeof e != "object")
|
|
340
229
|
return !1;
|
|
341
|
-
if (typeof n != "string" && (n = e.provider || ""),
|
|
230
|
+
if (typeof n != "string" && (n = e.provider || ""), z && !n && !e.prefix) {
|
|
342
231
|
let o = !1;
|
|
343
|
-
return
|
|
344
|
-
|
|
232
|
+
return Ce(e) && (e.prefix = "", Ie(e, (i, r) => {
|
|
233
|
+
Je(i, r) && (o = !0);
|
|
345
234
|
})), o;
|
|
346
235
|
}
|
|
347
236
|
const t = e.prefix;
|
|
@@ -350,34 +239,34 @@ function Ze(e, n) {
|
|
|
350
239
|
name: "a"
|
|
351
240
|
}))
|
|
352
241
|
return !1;
|
|
353
|
-
const s =
|
|
354
|
-
return !!
|
|
242
|
+
const s = $(n, t);
|
|
243
|
+
return !!ke(s, e);
|
|
355
244
|
}
|
|
356
|
-
const
|
|
245
|
+
const _e = Object.freeze({
|
|
357
246
|
width: null,
|
|
358
247
|
height: null
|
|
359
248
|
}), Se = Object.freeze({
|
|
360
249
|
// Dimensions
|
|
361
|
-
...
|
|
250
|
+
..._e,
|
|
362
251
|
// Transformations
|
|
363
252
|
...H
|
|
364
|
-
}),
|
|
365
|
-
function
|
|
253
|
+
}), Ye = /(-?[0-9.]*[0-9]+[0-9.]*)/g, et = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
254
|
+
function ae(e, n, t) {
|
|
366
255
|
if (n === 1)
|
|
367
256
|
return e;
|
|
368
257
|
if (t = t || 100, typeof e == "number")
|
|
369
258
|
return Math.ceil(e * n * t) / t;
|
|
370
259
|
if (typeof e != "string")
|
|
371
260
|
return e;
|
|
372
|
-
const s = e.split(
|
|
261
|
+
const s = e.split(Ye);
|
|
373
262
|
if (s === null || !s.length)
|
|
374
263
|
return e;
|
|
375
264
|
const o = [];
|
|
376
|
-
let i = s.shift(), r =
|
|
265
|
+
let i = s.shift(), r = et.test(i);
|
|
377
266
|
for (; ; ) {
|
|
378
267
|
if (r) {
|
|
379
|
-
const
|
|
380
|
-
isNaN(
|
|
268
|
+
const l = parseFloat(i);
|
|
269
|
+
isNaN(l) ? o.push(i) : o.push(Math.ceil(l * n * t) / t);
|
|
381
270
|
} else
|
|
382
271
|
o.push(i);
|
|
383
272
|
if (i = s.shift(), i === void 0)
|
|
@@ -385,7 +274,7 @@ function re(e, n, t) {
|
|
|
385
274
|
r = !r;
|
|
386
275
|
}
|
|
387
276
|
}
|
|
388
|
-
function
|
|
277
|
+
function tt(e, n = "defs") {
|
|
389
278
|
let t = "";
|
|
390
279
|
const s = e.indexOf("<" + n);
|
|
391
280
|
for (; s >= 0; ) {
|
|
@@ -402,17 +291,17 @@ function nt(e, n = "defs") {
|
|
|
402
291
|
content: e
|
|
403
292
|
};
|
|
404
293
|
}
|
|
405
|
-
function
|
|
294
|
+
function nt(e, n) {
|
|
406
295
|
return e ? "<defs>" + e + "</defs>" + n : n;
|
|
407
296
|
}
|
|
408
|
-
function
|
|
409
|
-
const s =
|
|
410
|
-
return
|
|
297
|
+
function ot(e, n, t) {
|
|
298
|
+
const s = tt(e);
|
|
299
|
+
return nt(s.defs, n + s.content + t);
|
|
411
300
|
}
|
|
412
|
-
const
|
|
413
|
-
function
|
|
301
|
+
const st = (e) => e === "unset" || e === "undefined" || e === "none";
|
|
302
|
+
function it(e, n) {
|
|
414
303
|
const t = {
|
|
415
|
-
...
|
|
304
|
+
...Q,
|
|
416
305
|
...e
|
|
417
306
|
}, s = {
|
|
418
307
|
...Se,
|
|
@@ -424,19 +313,19 @@ function rt(e, n) {
|
|
|
424
313
|
height: t.height
|
|
425
314
|
};
|
|
426
315
|
let i = t.body;
|
|
427
|
-
[t, s].forEach((
|
|
428
|
-
const f = [],
|
|
429
|
-
let
|
|
430
|
-
|
|
316
|
+
[t, s].forEach((h) => {
|
|
317
|
+
const f = [], S = h.hFlip, C = h.vFlip;
|
|
318
|
+
let k = h.rotate;
|
|
319
|
+
S ? C ? k += 2 : (f.push(
|
|
431
320
|
"translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"
|
|
432
|
-
), f.push("scale(-1 1)"), o.top = o.left = 0) :
|
|
321
|
+
), f.push("scale(-1 1)"), o.top = o.left = 0) : C && (f.push(
|
|
433
322
|
"translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"
|
|
434
323
|
), f.push("scale(1 -1)"), o.top = o.left = 0);
|
|
435
|
-
let
|
|
436
|
-
switch (
|
|
324
|
+
let w;
|
|
325
|
+
switch (k < 0 && (k -= Math.floor(k / 4) * 4), k = k % 4, k) {
|
|
437
326
|
case 1:
|
|
438
|
-
|
|
439
|
-
"rotate(90 " +
|
|
327
|
+
w = o.height / 2 + o.top, f.unshift(
|
|
328
|
+
"rotate(90 " + w.toString() + " " + w.toString() + ")"
|
|
440
329
|
);
|
|
441
330
|
break;
|
|
442
331
|
case 2:
|
|
@@ -445,59 +334,59 @@ function rt(e, n) {
|
|
|
445
334
|
);
|
|
446
335
|
break;
|
|
447
336
|
case 3:
|
|
448
|
-
|
|
449
|
-
"rotate(-90 " +
|
|
337
|
+
w = o.width / 2 + o.left, f.unshift(
|
|
338
|
+
"rotate(-90 " + w.toString() + " " + w.toString() + ")"
|
|
450
339
|
);
|
|
451
340
|
break;
|
|
452
341
|
}
|
|
453
|
-
|
|
342
|
+
k % 2 === 1 && (o.left !== o.top && (w = o.left, o.left = o.top, o.top = w), o.width !== o.height && (w = o.width, o.width = o.height, o.height = w)), f.length && (i = ot(
|
|
454
343
|
i,
|
|
455
344
|
'<g transform="' + f.join(" ") + '">',
|
|
456
345
|
"</g>"
|
|
457
346
|
));
|
|
458
347
|
});
|
|
459
|
-
const r = s.width,
|
|
460
|
-
let
|
|
461
|
-
r === null ? (d =
|
|
462
|
-
const p = {},
|
|
463
|
-
|
|
348
|
+
const r = s.width, l = s.height, a = o.width, c = o.height;
|
|
349
|
+
let u, d;
|
|
350
|
+
r === null ? (d = l === null ? "1em" : l === "auto" ? c : l, u = ae(d, a / c)) : (u = r === "auto" ? a : r, d = l === null ? ae(u, c / a) : l === "auto" ? c : l);
|
|
351
|
+
const p = {}, g = (h, f) => {
|
|
352
|
+
st(f) || (p[h] = f.toString());
|
|
464
353
|
};
|
|
465
|
-
|
|
466
|
-
const y = [o.left, o.top,
|
|
354
|
+
g("width", u), g("height", d);
|
|
355
|
+
const y = [o.left, o.top, a, c];
|
|
467
356
|
return p.viewBox = y.join(" "), {
|
|
468
357
|
attributes: p,
|
|
469
358
|
viewBox: y,
|
|
470
359
|
body: i
|
|
471
360
|
};
|
|
472
361
|
}
|
|
473
|
-
const
|
|
474
|
-
let
|
|
475
|
-
function at(e, n =
|
|
362
|
+
const rt = /\sid="(\S+)"/g, ct = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
|
|
363
|
+
let lt = 0;
|
|
364
|
+
function at(e, n = ct) {
|
|
476
365
|
const t = [];
|
|
477
366
|
let s;
|
|
478
|
-
for (; s =
|
|
367
|
+
for (; s = rt.exec(e); )
|
|
479
368
|
t.push(s[1]);
|
|
480
369
|
if (!t.length)
|
|
481
370
|
return e;
|
|
482
371
|
const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
483
372
|
return t.forEach((i) => {
|
|
484
|
-
const r = typeof n == "function" ? n(i) : n + (
|
|
373
|
+
const r = typeof n == "function" ? n(i) : n + (lt++).toString(), l = i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
485
374
|
e = e.replace(
|
|
486
375
|
// Allowed characters before id: [#;"]
|
|
487
376
|
// Allowed characters after id: [)"], .[a-z]
|
|
488
|
-
new RegExp('([#;"])(' +
|
|
377
|
+
new RegExp('([#;"])(' + l + ')([")]|\\.[a-z])', "g"),
|
|
489
378
|
"$1" + r + o + "$3"
|
|
490
379
|
);
|
|
491
380
|
}), e = e.replace(new RegExp(o, "g"), ""), e;
|
|
492
381
|
}
|
|
493
|
-
const
|
|
494
|
-
function
|
|
495
|
-
|
|
496
|
-
}
|
|
497
|
-
function Y(e) {
|
|
498
|
-
return X[e] || X[""];
|
|
382
|
+
const Y = /* @__PURE__ */ Object.create(null);
|
|
383
|
+
function ut(e, n) {
|
|
384
|
+
Y[e] = n;
|
|
499
385
|
}
|
|
500
386
|
function ee(e) {
|
|
387
|
+
return Y[e] || Y[""];
|
|
388
|
+
}
|
|
389
|
+
function ne(e) {
|
|
501
390
|
let n;
|
|
502
391
|
if (typeof e.resources == "string")
|
|
503
392
|
n = [e.resources];
|
|
@@ -522,23 +411,23 @@ function ee(e) {
|
|
|
522
411
|
dataAfterTimeout: e.dataAfterTimeout !== !1
|
|
523
412
|
};
|
|
524
413
|
}
|
|
525
|
-
const
|
|
414
|
+
const oe = /* @__PURE__ */ Object.create(null), L = [
|
|
526
415
|
"https://api.simplesvg.com",
|
|
527
416
|
"https://api.unisvg.com"
|
|
528
|
-
],
|
|
417
|
+
], B = [];
|
|
529
418
|
for (; L.length > 0; )
|
|
530
|
-
L.length === 1 || Math.random() > 0.5 ?
|
|
531
|
-
|
|
532
|
-
resources: ["https://api.iconify.design"].concat(
|
|
419
|
+
L.length === 1 || Math.random() > 0.5 ? B.push(L.shift()) : B.push(L.pop());
|
|
420
|
+
oe[""] = ne({
|
|
421
|
+
resources: ["https://api.iconify.design"].concat(B)
|
|
533
422
|
});
|
|
534
|
-
function
|
|
535
|
-
const t =
|
|
536
|
-
return t === null ? !1 : (
|
|
423
|
+
function ft(e, n) {
|
|
424
|
+
const t = ne(n);
|
|
425
|
+
return t === null ? !1 : (oe[e] = t, !0);
|
|
537
426
|
}
|
|
538
|
-
function
|
|
539
|
-
return
|
|
427
|
+
function se(e) {
|
|
428
|
+
return oe[e];
|
|
540
429
|
}
|
|
541
|
-
const
|
|
430
|
+
const dt = () => {
|
|
542
431
|
let e;
|
|
543
432
|
try {
|
|
544
433
|
if (e = fetch, typeof e == "function")
|
|
@@ -546,9 +435,9 @@ const pt = () => {
|
|
|
546
435
|
} catch {
|
|
547
436
|
}
|
|
548
437
|
};
|
|
549
|
-
let
|
|
550
|
-
function
|
|
551
|
-
const t =
|
|
438
|
+
let ue = dt();
|
|
439
|
+
function pt(e, n) {
|
|
440
|
+
const t = se(e);
|
|
552
441
|
if (!t)
|
|
553
442
|
return 0;
|
|
554
443
|
let s;
|
|
@@ -564,46 +453,46 @@ function ht(e, n) {
|
|
|
564
453
|
}
|
|
565
454
|
return s;
|
|
566
455
|
}
|
|
567
|
-
function
|
|
456
|
+
function ht(e) {
|
|
568
457
|
return e === 404;
|
|
569
458
|
}
|
|
570
|
-
const
|
|
571
|
-
const s = [], o =
|
|
459
|
+
const mt = (e, n, t) => {
|
|
460
|
+
const s = [], o = pt(e, n), i = "icons";
|
|
572
461
|
let r = {
|
|
573
462
|
type: i,
|
|
574
463
|
provider: e,
|
|
575
464
|
prefix: n,
|
|
576
465
|
icons: []
|
|
577
|
-
},
|
|
578
|
-
return t.forEach((
|
|
579
|
-
|
|
466
|
+
}, l = 0;
|
|
467
|
+
return t.forEach((a, c) => {
|
|
468
|
+
l += a.length + 1, l >= o && c > 0 && (s.push(r), r = {
|
|
580
469
|
type: i,
|
|
581
470
|
provider: e,
|
|
582
471
|
prefix: n,
|
|
583
472
|
icons: []
|
|
584
|
-
},
|
|
473
|
+
}, l = a.length), r.icons.push(a);
|
|
585
474
|
}), s.push(r), s;
|
|
586
475
|
};
|
|
587
|
-
function
|
|
476
|
+
function gt(e) {
|
|
588
477
|
if (typeof e == "string") {
|
|
589
|
-
const n =
|
|
478
|
+
const n = se(e);
|
|
590
479
|
if (n)
|
|
591
480
|
return n.path;
|
|
592
481
|
}
|
|
593
482
|
return "/";
|
|
594
483
|
}
|
|
595
|
-
const
|
|
596
|
-
if (!
|
|
484
|
+
const yt = (e, n, t) => {
|
|
485
|
+
if (!ue) {
|
|
597
486
|
t("abort", 424);
|
|
598
487
|
return;
|
|
599
488
|
}
|
|
600
|
-
let s =
|
|
489
|
+
let s = gt(n.provider);
|
|
601
490
|
switch (n.type) {
|
|
602
491
|
case "icons": {
|
|
603
|
-
const i = n.prefix,
|
|
604
|
-
icons:
|
|
492
|
+
const i = n.prefix, l = n.icons.join(","), a = new URLSearchParams({
|
|
493
|
+
icons: l
|
|
605
494
|
});
|
|
606
|
-
s += i + ".json?" +
|
|
495
|
+
s += i + ".json?" + a.toString();
|
|
607
496
|
break;
|
|
608
497
|
}
|
|
609
498
|
case "custom": {
|
|
@@ -616,11 +505,11 @@ const bt = (e, n, t) => {
|
|
|
616
505
|
return;
|
|
617
506
|
}
|
|
618
507
|
let o = 503;
|
|
619
|
-
|
|
508
|
+
ue(e + s).then((i) => {
|
|
620
509
|
const r = i.status;
|
|
621
510
|
if (r !== 200) {
|
|
622
511
|
setTimeout(() => {
|
|
623
|
-
t(
|
|
512
|
+
t(ht(r) ? "abort" : "next", r);
|
|
624
513
|
});
|
|
625
514
|
return;
|
|
626
515
|
}
|
|
@@ -638,11 +527,11 @@ const bt = (e, n, t) => {
|
|
|
638
527
|
}).catch(() => {
|
|
639
528
|
t("next", o);
|
|
640
529
|
});
|
|
641
|
-
},
|
|
642
|
-
prepare:
|
|
643
|
-
send:
|
|
530
|
+
}, bt = {
|
|
531
|
+
prepare: mt,
|
|
532
|
+
send: yt
|
|
644
533
|
};
|
|
645
|
-
function
|
|
534
|
+
function vt(e) {
|
|
646
535
|
const n = {
|
|
647
536
|
loaded: [],
|
|
648
537
|
missing: [],
|
|
@@ -658,15 +547,15 @@ function xt(e) {
|
|
|
658
547
|
if (s.name === o.name && s.prefix === o.prefix && s.provider === o.provider)
|
|
659
548
|
return;
|
|
660
549
|
s = o;
|
|
661
|
-
const i = o.provider, r = o.prefix,
|
|
662
|
-
let
|
|
663
|
-
|
|
550
|
+
const i = o.provider, r = o.prefix, l = o.name, a = t[i] || (t[i] = /* @__PURE__ */ Object.create(null)), c = a[r] || (a[r] = $(i, r));
|
|
551
|
+
let u;
|
|
552
|
+
l in c.icons ? u = n.loaded : r === "" || c.missing.has(l) ? u = n.missing : u = n.pending;
|
|
664
553
|
const d = {
|
|
665
554
|
provider: i,
|
|
666
555
|
prefix: r,
|
|
667
|
-
name:
|
|
556
|
+
name: l
|
|
668
557
|
};
|
|
669
|
-
|
|
558
|
+
u.push(d);
|
|
670
559
|
}), n;
|
|
671
560
|
}
|
|
672
561
|
function Te(e, n) {
|
|
@@ -675,7 +564,7 @@ function Te(e, n) {
|
|
|
675
564
|
s && (t.loaderCallbacks = s.filter((o) => o.id !== n));
|
|
676
565
|
});
|
|
677
566
|
}
|
|
678
|
-
function
|
|
567
|
+
function xt(e) {
|
|
679
568
|
e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
|
|
680
569
|
e.pendingCallbacksFlag = !1;
|
|
681
570
|
const n = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
|
|
@@ -684,27 +573,27 @@ function wt(e) {
|
|
|
684
573
|
let t = !1;
|
|
685
574
|
const s = e.provider, o = e.prefix;
|
|
686
575
|
n.forEach((i) => {
|
|
687
|
-
const r = i.icons,
|
|
688
|
-
r.pending = r.pending.filter((
|
|
689
|
-
if (
|
|
576
|
+
const r = i.icons, l = r.pending.length;
|
|
577
|
+
r.pending = r.pending.filter((a) => {
|
|
578
|
+
if (a.prefix !== o)
|
|
690
579
|
return !0;
|
|
691
|
-
const
|
|
692
|
-
if (e.icons[
|
|
580
|
+
const c = a.name;
|
|
581
|
+
if (e.icons[c])
|
|
693
582
|
r.loaded.push({
|
|
694
583
|
provider: s,
|
|
695
584
|
prefix: o,
|
|
696
|
-
name:
|
|
585
|
+
name: c
|
|
697
586
|
});
|
|
698
|
-
else if (e.missing.has(
|
|
587
|
+
else if (e.missing.has(c))
|
|
699
588
|
r.missing.push({
|
|
700
589
|
provider: s,
|
|
701
590
|
prefix: o,
|
|
702
|
-
name:
|
|
591
|
+
name: c
|
|
703
592
|
});
|
|
704
593
|
else
|
|
705
594
|
return t = !0, !0;
|
|
706
595
|
return !1;
|
|
707
|
-
}), r.pending.length !==
|
|
596
|
+
}), r.pending.length !== l && (t || Te([e], i.id), i.callback(
|
|
708
597
|
r.loaded.slice(0),
|
|
709
598
|
r.missing.slice(0),
|
|
710
599
|
r.pending.slice(0),
|
|
@@ -713,9 +602,9 @@ function wt(e) {
|
|
|
713
602
|
});
|
|
714
603
|
}));
|
|
715
604
|
}
|
|
716
|
-
let
|
|
717
|
-
function
|
|
718
|
-
const s =
|
|
605
|
+
let wt = 0;
|
|
606
|
+
function It(e, n, t) {
|
|
607
|
+
const s = wt++, o = Te.bind(null, t, s);
|
|
719
608
|
if (!n.pending.length)
|
|
720
609
|
return o;
|
|
721
610
|
const i = {
|
|
@@ -731,11 +620,11 @@ function kt(e, n, t) {
|
|
|
731
620
|
function Ct(e, n = !0, t = !1) {
|
|
732
621
|
const s = [];
|
|
733
622
|
return e.forEach((o) => {
|
|
734
|
-
const i = typeof o == "string" ?
|
|
623
|
+
const i = typeof o == "string" ? q(o, n, t) : o;
|
|
735
624
|
i && s.push(i);
|
|
736
625
|
}), s;
|
|
737
626
|
}
|
|
738
|
-
var
|
|
627
|
+
var kt = {
|
|
739
628
|
resources: [],
|
|
740
629
|
index: 0,
|
|
741
630
|
timeout: 2e3,
|
|
@@ -743,192 +632,192 @@ var St = {
|
|
|
743
632
|
random: !1,
|
|
744
633
|
dataAfterTimeout: !1
|
|
745
634
|
};
|
|
746
|
-
function
|
|
635
|
+
function Pt(e, n, t, s) {
|
|
747
636
|
const o = e.resources.length, i = e.random ? Math.floor(Math.random() * o) : e.index;
|
|
748
637
|
let r;
|
|
749
638
|
if (e.random) {
|
|
750
|
-
let
|
|
751
|
-
for (r = [];
|
|
752
|
-
const
|
|
753
|
-
r.push(
|
|
639
|
+
let m = e.resources.slice(0);
|
|
640
|
+
for (r = []; m.length > 1; ) {
|
|
641
|
+
const I = Math.floor(Math.random() * m.length);
|
|
642
|
+
r.push(m[I]), m = m.slice(0, I).concat(m.slice(I + 1));
|
|
754
643
|
}
|
|
755
|
-
r = r.concat(
|
|
644
|
+
r = r.concat(m);
|
|
756
645
|
} else
|
|
757
646
|
r = e.resources.slice(i).concat(e.resources.slice(0, i));
|
|
758
|
-
const
|
|
759
|
-
let
|
|
760
|
-
typeof s == "function" &&
|
|
647
|
+
const l = Date.now();
|
|
648
|
+
let a = "pending", c = 0, u, d = null, p = [], g = [];
|
|
649
|
+
typeof s == "function" && g.push(s);
|
|
761
650
|
function y() {
|
|
762
651
|
d && (clearTimeout(d), d = null);
|
|
763
652
|
}
|
|
764
|
-
function
|
|
765
|
-
|
|
766
|
-
|
|
653
|
+
function h() {
|
|
654
|
+
a === "pending" && (a = "aborted"), y(), p.forEach((m) => {
|
|
655
|
+
m.status === "pending" && (m.status = "aborted");
|
|
767
656
|
}), p = [];
|
|
768
657
|
}
|
|
769
|
-
function f(
|
|
770
|
-
|
|
658
|
+
function f(m, I) {
|
|
659
|
+
I && (g = []), typeof m == "function" && g.push(m);
|
|
771
660
|
}
|
|
772
|
-
function
|
|
661
|
+
function S() {
|
|
773
662
|
return {
|
|
774
|
-
startTime:
|
|
663
|
+
startTime: l,
|
|
775
664
|
payload: n,
|
|
776
|
-
status:
|
|
777
|
-
queriesSent:
|
|
665
|
+
status: a,
|
|
666
|
+
queriesSent: c,
|
|
778
667
|
queriesPending: p.length,
|
|
779
668
|
subscribe: f,
|
|
780
|
-
abort:
|
|
669
|
+
abort: h
|
|
781
670
|
};
|
|
782
671
|
}
|
|
783
|
-
function
|
|
784
|
-
|
|
785
|
-
|
|
672
|
+
function C() {
|
|
673
|
+
a = "failed", g.forEach((m) => {
|
|
674
|
+
m(void 0, u);
|
|
786
675
|
});
|
|
787
676
|
}
|
|
788
|
-
function
|
|
789
|
-
p.forEach((
|
|
790
|
-
|
|
677
|
+
function k() {
|
|
678
|
+
p.forEach((m) => {
|
|
679
|
+
m.status === "pending" && (m.status = "aborted");
|
|
791
680
|
}), p = [];
|
|
792
681
|
}
|
|
793
|
-
function
|
|
794
|
-
const
|
|
795
|
-
switch (p = p.filter((
|
|
682
|
+
function w(m, I, A) {
|
|
683
|
+
const R = I !== "success";
|
|
684
|
+
switch (p = p.filter((E) => E !== m), a) {
|
|
796
685
|
case "pending":
|
|
797
686
|
break;
|
|
798
687
|
case "failed":
|
|
799
|
-
if (
|
|
688
|
+
if (R || !e.dataAfterTimeout)
|
|
800
689
|
return;
|
|
801
690
|
break;
|
|
802
691
|
default:
|
|
803
692
|
return;
|
|
804
693
|
}
|
|
805
|
-
if (
|
|
806
|
-
|
|
694
|
+
if (I === "abort") {
|
|
695
|
+
u = A, C();
|
|
807
696
|
return;
|
|
808
697
|
}
|
|
809
|
-
if (
|
|
810
|
-
|
|
698
|
+
if (R) {
|
|
699
|
+
u = A, p.length || (r.length ? U() : C());
|
|
811
700
|
return;
|
|
812
701
|
}
|
|
813
|
-
if (y(),
|
|
814
|
-
const
|
|
815
|
-
|
|
702
|
+
if (y(), k(), !e.random) {
|
|
703
|
+
const E = e.resources.indexOf(m.resource);
|
|
704
|
+
E !== -1 && E !== e.index && (e.index = E);
|
|
816
705
|
}
|
|
817
|
-
|
|
818
|
-
|
|
706
|
+
a = "completed", g.forEach((E) => {
|
|
707
|
+
E(A);
|
|
819
708
|
});
|
|
820
709
|
}
|
|
821
|
-
function
|
|
822
|
-
if (
|
|
710
|
+
function U() {
|
|
711
|
+
if (a !== "pending")
|
|
823
712
|
return;
|
|
824
713
|
y();
|
|
825
|
-
const
|
|
826
|
-
if (
|
|
714
|
+
const m = r.shift();
|
|
715
|
+
if (m === void 0) {
|
|
827
716
|
if (p.length) {
|
|
828
717
|
d = setTimeout(() => {
|
|
829
|
-
y(),
|
|
718
|
+
y(), a === "pending" && (k(), C());
|
|
830
719
|
}, e.timeout);
|
|
831
720
|
return;
|
|
832
721
|
}
|
|
833
|
-
|
|
722
|
+
C();
|
|
834
723
|
return;
|
|
835
724
|
}
|
|
836
|
-
const
|
|
725
|
+
const I = {
|
|
837
726
|
status: "pending",
|
|
838
|
-
resource:
|
|
839
|
-
callback: (A,
|
|
840
|
-
|
|
727
|
+
resource: m,
|
|
728
|
+
callback: (A, R) => {
|
|
729
|
+
w(I, A, R);
|
|
841
730
|
}
|
|
842
731
|
};
|
|
843
|
-
p.push(
|
|
732
|
+
p.push(I), c++, d = setTimeout(U, e.rotate), t(m, n, I.callback);
|
|
844
733
|
}
|
|
845
|
-
return setTimeout(
|
|
734
|
+
return setTimeout(U), S;
|
|
846
735
|
}
|
|
847
|
-
function
|
|
736
|
+
function Oe(e) {
|
|
848
737
|
const n = {
|
|
849
|
-
...
|
|
738
|
+
...kt,
|
|
850
739
|
...e
|
|
851
740
|
};
|
|
852
741
|
let t = [];
|
|
853
742
|
function s() {
|
|
854
|
-
t = t.filter((
|
|
743
|
+
t = t.filter((l) => l().status === "pending");
|
|
855
744
|
}
|
|
856
|
-
function o(
|
|
857
|
-
const
|
|
745
|
+
function o(l, a, c) {
|
|
746
|
+
const u = Pt(
|
|
858
747
|
n,
|
|
859
|
-
|
|
860
|
-
|
|
748
|
+
l,
|
|
749
|
+
a,
|
|
861
750
|
(d, p) => {
|
|
862
|
-
s(),
|
|
751
|
+
s(), c && c(d, p);
|
|
863
752
|
}
|
|
864
753
|
);
|
|
865
|
-
return t.push(
|
|
754
|
+
return t.push(u), u;
|
|
866
755
|
}
|
|
867
|
-
function i(
|
|
868
|
-
return t.find((
|
|
756
|
+
function i(l) {
|
|
757
|
+
return t.find((a) => l(a)) || null;
|
|
869
758
|
}
|
|
870
759
|
return {
|
|
871
760
|
query: o,
|
|
872
761
|
find: i,
|
|
873
|
-
setIndex: (
|
|
874
|
-
n.index =
|
|
762
|
+
setIndex: (l) => {
|
|
763
|
+
n.index = l;
|
|
875
764
|
},
|
|
876
765
|
getIndex: () => n.index,
|
|
877
766
|
cleanup: s
|
|
878
767
|
};
|
|
879
768
|
}
|
|
880
|
-
function
|
|
769
|
+
function fe() {
|
|
881
770
|
}
|
|
882
|
-
const
|
|
883
|
-
function
|
|
884
|
-
if (!
|
|
885
|
-
const n =
|
|
771
|
+
const Z = /* @__PURE__ */ Object.create(null);
|
|
772
|
+
function _t(e) {
|
|
773
|
+
if (!Z[e]) {
|
|
774
|
+
const n = se(e);
|
|
886
775
|
if (!n)
|
|
887
776
|
return;
|
|
888
|
-
const t =
|
|
777
|
+
const t = Oe(n), s = {
|
|
889
778
|
config: n,
|
|
890
779
|
redundancy: t
|
|
891
780
|
};
|
|
892
|
-
|
|
781
|
+
Z[e] = s;
|
|
893
782
|
}
|
|
894
|
-
return
|
|
783
|
+
return Z[e];
|
|
895
784
|
}
|
|
896
|
-
function
|
|
785
|
+
function St(e, n, t) {
|
|
897
786
|
let s, o;
|
|
898
787
|
if (typeof e == "string") {
|
|
899
|
-
const i =
|
|
788
|
+
const i = ee(e);
|
|
900
789
|
if (!i)
|
|
901
|
-
return t(void 0, 424),
|
|
790
|
+
return t(void 0, 424), fe;
|
|
902
791
|
o = i.send;
|
|
903
|
-
const r =
|
|
792
|
+
const r = _t(e);
|
|
904
793
|
r && (s = r.redundancy);
|
|
905
794
|
} else {
|
|
906
|
-
const i =
|
|
795
|
+
const i = ne(e);
|
|
907
796
|
if (i) {
|
|
908
|
-
s =
|
|
909
|
-
const r = e.resources ? e.resources[0] : "",
|
|
910
|
-
|
|
797
|
+
s = Oe(i);
|
|
798
|
+
const r = e.resources ? e.resources[0] : "", l = ee(r);
|
|
799
|
+
l && (o = l.send);
|
|
911
800
|
}
|
|
912
801
|
}
|
|
913
|
-
return !s || !o ? (t(void 0, 424),
|
|
802
|
+
return !s || !o ? (t(void 0, 424), fe) : s.query(n, o, t)().abort;
|
|
914
803
|
}
|
|
915
|
-
function
|
|
804
|
+
function de() {
|
|
916
805
|
}
|
|
917
|
-
function
|
|
806
|
+
function Tt(e) {
|
|
918
807
|
e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
|
|
919
|
-
e.iconsLoaderFlag = !1,
|
|
808
|
+
e.iconsLoaderFlag = !1, xt(e);
|
|
920
809
|
}));
|
|
921
810
|
}
|
|
922
811
|
function Ot(e) {
|
|
923
812
|
const n = [], t = [];
|
|
924
813
|
return e.forEach((s) => {
|
|
925
|
-
(s.match(
|
|
814
|
+
(s.match(xe) ? n : t).push(s);
|
|
926
815
|
}), {
|
|
927
816
|
valid: n,
|
|
928
817
|
invalid: t
|
|
929
818
|
};
|
|
930
819
|
}
|
|
931
|
-
function
|
|
820
|
+
function M(e, n, t) {
|
|
932
821
|
function s() {
|
|
933
822
|
const o = e.pendingIcons;
|
|
934
823
|
n.forEach((i) => {
|
|
@@ -937,16 +826,16 @@ function $(e, n, t) {
|
|
|
937
826
|
}
|
|
938
827
|
if (t && typeof t == "object")
|
|
939
828
|
try {
|
|
940
|
-
if (!
|
|
829
|
+
if (!ke(e, t).length) {
|
|
941
830
|
s();
|
|
942
831
|
return;
|
|
943
832
|
}
|
|
944
833
|
} catch (o) {
|
|
945
834
|
console.error(o);
|
|
946
835
|
}
|
|
947
|
-
s(),
|
|
836
|
+
s(), Tt(e);
|
|
948
837
|
}
|
|
949
|
-
function
|
|
838
|
+
function pe(e, n) {
|
|
950
839
|
e instanceof Promise ? e.then((t) => {
|
|
951
840
|
n(t);
|
|
952
841
|
}).catch(() => {
|
|
@@ -961,89 +850,89 @@ function Et(e, n) {
|
|
|
961
850
|
return;
|
|
962
851
|
const i = e.loadIcon;
|
|
963
852
|
if (e.loadIcons && (o.length > 1 || !i)) {
|
|
964
|
-
|
|
853
|
+
pe(
|
|
965
854
|
e.loadIcons(o, s, t),
|
|
966
|
-
(
|
|
967
|
-
|
|
855
|
+
(u) => {
|
|
856
|
+
M(e, o, u);
|
|
968
857
|
}
|
|
969
858
|
);
|
|
970
859
|
return;
|
|
971
860
|
}
|
|
972
861
|
if (i) {
|
|
973
|
-
o.forEach((
|
|
974
|
-
const d = i(
|
|
975
|
-
|
|
976
|
-
const
|
|
862
|
+
o.forEach((u) => {
|
|
863
|
+
const d = i(u, s, t);
|
|
864
|
+
pe(d, (p) => {
|
|
865
|
+
const g = p ? {
|
|
977
866
|
prefix: s,
|
|
978
867
|
icons: {
|
|
979
|
-
[
|
|
868
|
+
[u]: p
|
|
980
869
|
}
|
|
981
870
|
} : null;
|
|
982
|
-
|
|
871
|
+
M(e, [u], g);
|
|
983
872
|
});
|
|
984
873
|
});
|
|
985
874
|
return;
|
|
986
875
|
}
|
|
987
|
-
const { valid: r, invalid:
|
|
988
|
-
if (
|
|
876
|
+
const { valid: r, invalid: l } = Ot(o);
|
|
877
|
+
if (l.length && M(e, l, null), !r.length)
|
|
989
878
|
return;
|
|
990
|
-
const
|
|
991
|
-
if (!
|
|
992
|
-
|
|
879
|
+
const a = s.match(xe) ? ee(t) : null;
|
|
880
|
+
if (!a) {
|
|
881
|
+
M(e, r, null);
|
|
993
882
|
return;
|
|
994
883
|
}
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
884
|
+
a.prepare(t, s, r).forEach((u) => {
|
|
885
|
+
St(t, u, (d) => {
|
|
886
|
+
M(e, u.icons, d);
|
|
998
887
|
});
|
|
999
888
|
});
|
|
1000
889
|
}));
|
|
1001
890
|
}
|
|
1002
|
-
const
|
|
1003
|
-
const t = Ct(e, !0,
|
|
891
|
+
const jt = (e, n) => {
|
|
892
|
+
const t = Ct(e, !0, Pe()), s = vt(t);
|
|
1004
893
|
if (!s.pending.length) {
|
|
1005
|
-
let
|
|
894
|
+
let a = !0;
|
|
1006
895
|
return n && setTimeout(() => {
|
|
1007
|
-
|
|
896
|
+
a && n(
|
|
1008
897
|
s.loaded,
|
|
1009
898
|
s.missing,
|
|
1010
899
|
s.pending,
|
|
1011
|
-
|
|
900
|
+
de
|
|
1012
901
|
);
|
|
1013
902
|
}), () => {
|
|
1014
|
-
|
|
903
|
+
a = !1;
|
|
1015
904
|
};
|
|
1016
905
|
}
|
|
1017
906
|
const o = /* @__PURE__ */ Object.create(null), i = [];
|
|
1018
|
-
let r,
|
|
1019
|
-
return s.pending.forEach((
|
|
1020
|
-
const { provider:
|
|
1021
|
-
if (
|
|
907
|
+
let r, l;
|
|
908
|
+
return s.pending.forEach((a) => {
|
|
909
|
+
const { provider: c, prefix: u } = a;
|
|
910
|
+
if (u === l && c === r)
|
|
1022
911
|
return;
|
|
1023
|
-
r =
|
|
1024
|
-
const d = o[
|
|
1025
|
-
d[
|
|
1026
|
-
}), s.pending.forEach((
|
|
1027
|
-
const { provider:
|
|
1028
|
-
|
|
1029
|
-
}), i.forEach((
|
|
1030
|
-
const
|
|
1031
|
-
|
|
1032
|
-
}), n ?
|
|
912
|
+
r = c, l = u, i.push($(c, u));
|
|
913
|
+
const d = o[c] || (o[c] = /* @__PURE__ */ Object.create(null));
|
|
914
|
+
d[u] || (d[u] = []);
|
|
915
|
+
}), s.pending.forEach((a) => {
|
|
916
|
+
const { provider: c, prefix: u, name: d } = a, p = $(c, u), g = p.pendingIcons || (p.pendingIcons = /* @__PURE__ */ new Set());
|
|
917
|
+
g.has(d) || (g.add(d), o[c][u].push(d));
|
|
918
|
+
}), i.forEach((a) => {
|
|
919
|
+
const c = o[a.provider][a.prefix];
|
|
920
|
+
c.length && Et(a, c);
|
|
921
|
+
}), n ? It(n, s, i) : de;
|
|
1033
922
|
};
|
|
1034
|
-
function
|
|
923
|
+
function Ft(e, n) {
|
|
1035
924
|
const t = {
|
|
1036
925
|
...e
|
|
1037
926
|
};
|
|
1038
927
|
for (const s in n) {
|
|
1039
928
|
const o = n[s], i = typeof o;
|
|
1040
|
-
s in
|
|
929
|
+
s in _e ? (o === null || o && (i === "string" || i === "number")) && (t[s] = o) : i === typeof t[s] && (t[s] = s === "rotate" ? o % 4 : o);
|
|
1041
930
|
}
|
|
1042
931
|
return t;
|
|
1043
932
|
}
|
|
1044
|
-
const
|
|
1045
|
-
function
|
|
1046
|
-
n.split(
|
|
933
|
+
const $t = /[\s,]+/;
|
|
934
|
+
function At(e, n) {
|
|
935
|
+
n.split($t).forEach((t) => {
|
|
1047
936
|
switch (t.trim()) {
|
|
1048
937
|
case "horizontal":
|
|
1049
938
|
e.hFlip = !0;
|
|
@@ -1054,7 +943,7 @@ function $t(e, n) {
|
|
|
1054
943
|
}
|
|
1055
944
|
});
|
|
1056
945
|
}
|
|
1057
|
-
function
|
|
946
|
+
function Lt(e, n = 0) {
|
|
1058
947
|
const t = e.replace(/^-?[0-9.]*/, "");
|
|
1059
948
|
function s(o) {
|
|
1060
949
|
for (; o < 0; )
|
|
@@ -1080,63 +969,63 @@ function Mt(e, n = 0) {
|
|
|
1080
969
|
}
|
|
1081
970
|
return n;
|
|
1082
971
|
}
|
|
1083
|
-
function
|
|
972
|
+
function Mt(e, n) {
|
|
1084
973
|
let t = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
|
|
1085
974
|
for (const s in n)
|
|
1086
975
|
t += " " + s + '="' + n[s] + '"';
|
|
1087
976
|
return '<svg xmlns="http://www.w3.org/2000/svg"' + t + ">" + e + "</svg>";
|
|
1088
977
|
}
|
|
1089
|
-
function
|
|
978
|
+
function Nt(e) {
|
|
1090
979
|
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
1091
980
|
}
|
|
1092
|
-
function
|
|
1093
|
-
return "data:image/svg+xml," +
|
|
981
|
+
function zt(e) {
|
|
982
|
+
return "data:image/svg+xml," + Nt(e);
|
|
1094
983
|
}
|
|
1095
984
|
function Rt(e) {
|
|
1096
|
-
return 'url("' +
|
|
985
|
+
return 'url("' + zt(e) + '")';
|
|
1097
986
|
}
|
|
1098
|
-
const
|
|
987
|
+
const he = {
|
|
1099
988
|
...Se,
|
|
1100
989
|
inline: !1
|
|
1101
|
-
},
|
|
990
|
+
}, Dt = {
|
|
1102
991
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1103
992
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
1104
993
|
"aria-hidden": !0,
|
|
1105
994
|
role: "img"
|
|
1106
|
-
},
|
|
995
|
+
}, Bt = {
|
|
1107
996
|
display: "inline-block"
|
|
1108
|
-
},
|
|
997
|
+
}, te = {
|
|
1109
998
|
backgroundColor: "currentColor"
|
|
1110
|
-
},
|
|
999
|
+
}, Ee = {
|
|
1111
1000
|
backgroundColor: "transparent"
|
|
1112
|
-
},
|
|
1001
|
+
}, me = {
|
|
1113
1002
|
Image: "var(--svg)",
|
|
1114
1003
|
Repeat: "no-repeat",
|
|
1115
1004
|
Size: "100% 100%"
|
|
1116
|
-
},
|
|
1117
|
-
webkitMask:
|
|
1118
|
-
mask:
|
|
1119
|
-
background:
|
|
1005
|
+
}, ge = {
|
|
1006
|
+
webkitMask: te,
|
|
1007
|
+
mask: te,
|
|
1008
|
+
background: Ee
|
|
1120
1009
|
};
|
|
1121
|
-
for (const e in
|
|
1122
|
-
const n =
|
|
1123
|
-
for (const t in
|
|
1124
|
-
n[e + t] =
|
|
1010
|
+
for (const e in ge) {
|
|
1011
|
+
const n = ge[e];
|
|
1012
|
+
for (const t in me)
|
|
1013
|
+
n[e + t] = me[t];
|
|
1125
1014
|
}
|
|
1126
|
-
const
|
|
1015
|
+
const V = {};
|
|
1127
1016
|
["horizontal", "vertical"].forEach((e) => {
|
|
1128
1017
|
const n = e.slice(0, 1) + "Flip";
|
|
1129
|
-
|
|
1018
|
+
V[e + "-flip"] = n, V[e.slice(0, 1) + "-flip"] = n, V[e + "Flip"] = n;
|
|
1130
1019
|
});
|
|
1131
|
-
function
|
|
1020
|
+
function ye(e) {
|
|
1132
1021
|
return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
|
|
1133
1022
|
}
|
|
1134
|
-
const
|
|
1135
|
-
const t =
|
|
1136
|
-
for (let
|
|
1137
|
-
const f = n[
|
|
1023
|
+
const be = (e, n) => {
|
|
1024
|
+
const t = Ft(he, n), s = { ...Dt }, o = n.mode || "svg", i = {}, r = n.style, l = typeof r == "object" && !(r instanceof Array) ? r : {};
|
|
1025
|
+
for (let h in n) {
|
|
1026
|
+
const f = n[h];
|
|
1138
1027
|
if (f !== void 0)
|
|
1139
|
-
switch (
|
|
1028
|
+
switch (h) {
|
|
1140
1029
|
// Properties to ignore
|
|
1141
1030
|
case "icon":
|
|
1142
1031
|
case "style":
|
|
@@ -1148,11 +1037,11 @@ const me = (e, n) => {
|
|
|
1148
1037
|
case "inline":
|
|
1149
1038
|
case "hFlip":
|
|
1150
1039
|
case "vFlip":
|
|
1151
|
-
t[
|
|
1040
|
+
t[h] = f === !0 || f === "true" || f === 1;
|
|
1152
1041
|
break;
|
|
1153
1042
|
// Flip as string: 'horizontal,vertical'
|
|
1154
1043
|
case "flip":
|
|
1155
|
-
typeof f == "string" &&
|
|
1044
|
+
typeof f == "string" && At(t, f);
|
|
1156
1045
|
break;
|
|
1157
1046
|
// Color: override style
|
|
1158
1047
|
case "color":
|
|
@@ -1160,7 +1049,7 @@ const me = (e, n) => {
|
|
|
1160
1049
|
break;
|
|
1161
1050
|
// Rotation as string
|
|
1162
1051
|
case "rotate":
|
|
1163
|
-
typeof f == "string" ? t[
|
|
1052
|
+
typeof f == "string" ? t[h] = Lt(f) : typeof f == "number" && (t[h] = f);
|
|
1164
1053
|
break;
|
|
1165
1054
|
// Remove aria-hidden
|
|
1166
1055
|
case "ariaHidden":
|
|
@@ -1168,37 +1057,37 @@ const me = (e, n) => {
|
|
|
1168
1057
|
f !== !0 && f !== "true" && delete s["aria-hidden"];
|
|
1169
1058
|
break;
|
|
1170
1059
|
default: {
|
|
1171
|
-
const
|
|
1172
|
-
|
|
1060
|
+
const S = V[h];
|
|
1061
|
+
S ? (f === !0 || f === "true" || f === 1) && (t[S] = !0) : he[h] === void 0 && (s[h] = f);
|
|
1173
1062
|
}
|
|
1174
1063
|
}
|
|
1175
1064
|
}
|
|
1176
|
-
const
|
|
1065
|
+
const a = it(e, t), c = a.attributes;
|
|
1177
1066
|
if (t.inline && (i.verticalAlign = "-0.125em"), o === "svg") {
|
|
1178
1067
|
s.style = {
|
|
1179
1068
|
...i,
|
|
1180
|
-
...
|
|
1181
|
-
}, Object.assign(s,
|
|
1182
|
-
let
|
|
1183
|
-
return typeof f == "string" && (f = f.replace(/-/g, "_")), s.innerHTML = at(
|
|
1069
|
+
...l
|
|
1070
|
+
}, Object.assign(s, c);
|
|
1071
|
+
let h = 0, f = n.id;
|
|
1072
|
+
return typeof f == "string" && (f = f.replace(/-/g, "_")), s.innerHTML = at(a.body, f ? () => f + "ID" + h++ : "iconifyVue"), ie("svg", s);
|
|
1184
1073
|
}
|
|
1185
|
-
const { body:
|
|
1186
|
-
...
|
|
1074
|
+
const { body: u, width: d, height: p } = e, g = o === "mask" || (o === "bg" ? !1 : u.indexOf("currentColor") !== -1), y = Mt(u, {
|
|
1075
|
+
...c,
|
|
1187
1076
|
width: d + "",
|
|
1188
1077
|
height: p + ""
|
|
1189
1078
|
});
|
|
1190
1079
|
return s.style = {
|
|
1191
1080
|
...i,
|
|
1192
1081
|
"--svg": Rt(y),
|
|
1193
|
-
width:
|
|
1194
|
-
height:
|
|
1195
|
-
...
|
|
1196
|
-
...
|
|
1197
|
-
...
|
|
1198
|
-
},
|
|
1082
|
+
width: ye(c.width),
|
|
1083
|
+
height: ye(c.height),
|
|
1084
|
+
...Bt,
|
|
1085
|
+
...g ? te : Ee,
|
|
1086
|
+
...l
|
|
1087
|
+
}, ie("span", s);
|
|
1199
1088
|
};
|
|
1200
|
-
|
|
1201
|
-
|
|
1089
|
+
Pe(!0);
|
|
1090
|
+
ut("", bt);
|
|
1202
1091
|
if (typeof document < "u" && typeof window < "u") {
|
|
1203
1092
|
const e = window;
|
|
1204
1093
|
if (e.IconifyPreload !== void 0) {
|
|
@@ -1208,7 +1097,7 @@ if (typeof document < "u" && typeof window < "u") {
|
|
|
1208
1097
|
// Check if item is an object and not null/array
|
|
1209
1098
|
(typeof s != "object" || s === null || s instanceof Array || // Check for 'icons' and 'prefix'
|
|
1210
1099
|
typeof s.icons != "object" || typeof s.prefix != "string" || // Add icon set
|
|
1211
|
-
!
|
|
1100
|
+
!Xe(s)) && console.error(t);
|
|
1212
1101
|
} catch {
|
|
1213
1102
|
console.error(t);
|
|
1214
1103
|
}
|
|
@@ -1223,7 +1112,7 @@ if (typeof document < "u" && typeof window < "u") {
|
|
|
1223
1112
|
const o = n[t];
|
|
1224
1113
|
if (typeof o != "object" || !o || o.resources === void 0)
|
|
1225
1114
|
continue;
|
|
1226
|
-
|
|
1115
|
+
ft(t, o) || console.error(s);
|
|
1227
1116
|
} catch {
|
|
1228
1117
|
console.error(s);
|
|
1229
1118
|
}
|
|
@@ -1231,63 +1120,63 @@ if (typeof document < "u" && typeof window < "u") {
|
|
|
1231
1120
|
}
|
|
1232
1121
|
}
|
|
1233
1122
|
const Vt = {
|
|
1234
|
-
...
|
|
1123
|
+
...Q,
|
|
1235
1124
|
body: ""
|
|
1236
|
-
},
|
|
1237
|
-
const t =
|
|
1125
|
+
}, Gt = O((e, { emit: n }) => {
|
|
1126
|
+
const t = K(null);
|
|
1238
1127
|
function s() {
|
|
1239
1128
|
t.value && (t.value.abort?.(), t.value = null);
|
|
1240
1129
|
}
|
|
1241
|
-
const o =
|
|
1242
|
-
function
|
|
1243
|
-
const
|
|
1244
|
-
if (typeof
|
|
1130
|
+
const o = K(!!e.ssr), i = K(""), r = je(null);
|
|
1131
|
+
function l() {
|
|
1132
|
+
const c = e.icon;
|
|
1133
|
+
if (typeof c == "object" && c !== null && typeof c.body == "string")
|
|
1245
1134
|
return i.value = "", {
|
|
1246
|
-
data:
|
|
1135
|
+
data: c
|
|
1247
1136
|
};
|
|
1248
|
-
let
|
|
1249
|
-
if (typeof
|
|
1137
|
+
let u;
|
|
1138
|
+
if (typeof c != "string" || (u = q(c, !1, !0)) === null)
|
|
1250
1139
|
return null;
|
|
1251
|
-
let d =
|
|
1140
|
+
let d = Ze(u);
|
|
1252
1141
|
if (!d) {
|
|
1253
1142
|
const y = t.value;
|
|
1254
|
-
return (!y || y.name !==
|
|
1255
|
-
name:
|
|
1143
|
+
return (!y || y.name !== c) && (d === null ? t.value = {
|
|
1144
|
+
name: c
|
|
1256
1145
|
} : t.value = {
|
|
1257
|
-
name:
|
|
1258
|
-
abort:
|
|
1146
|
+
name: c,
|
|
1147
|
+
abort: jt([u], a)
|
|
1259
1148
|
}), null;
|
|
1260
1149
|
}
|
|
1261
|
-
s(), i.value !==
|
|
1262
|
-
n("load",
|
|
1150
|
+
s(), i.value !== c && (i.value = c, Le(() => {
|
|
1151
|
+
n("load", c);
|
|
1263
1152
|
}));
|
|
1264
1153
|
const p = e.customise;
|
|
1265
1154
|
if (p) {
|
|
1266
1155
|
d = Object.assign({}, d);
|
|
1267
|
-
const y = p(d.body,
|
|
1156
|
+
const y = p(d.body, u.name, u.prefix, u.provider);
|
|
1268
1157
|
typeof y == "string" && (d.body = y);
|
|
1269
1158
|
}
|
|
1270
|
-
const
|
|
1271
|
-
return
|
|
1159
|
+
const g = ["iconify"];
|
|
1160
|
+
return u.prefix !== "" && g.push("iconify--" + u.prefix), u.provider !== "" && g.push("iconify--" + u.provider), { data: d, classes: g };
|
|
1272
1161
|
}
|
|
1273
|
-
function
|
|
1274
|
-
const
|
|
1275
|
-
|
|
1162
|
+
function a() {
|
|
1163
|
+
const c = l();
|
|
1164
|
+
c ? c.data !== r.value?.data && (r.value = c) : r.value = null;
|
|
1276
1165
|
}
|
|
1277
|
-
return o.value ?
|
|
1278
|
-
o.value = !0,
|
|
1279
|
-
}),
|
|
1280
|
-
const
|
|
1281
|
-
if (!
|
|
1282
|
-
return
|
|
1283
|
-
let
|
|
1284
|
-
return
|
|
1166
|
+
return o.value ? a() : Fe(() => {
|
|
1167
|
+
o.value = !0, a();
|
|
1168
|
+
}), $e(() => e.icon, a), Ae(s), () => {
|
|
1169
|
+
const c = r.value;
|
|
1170
|
+
if (!c)
|
|
1171
|
+
return be(Vt, e);
|
|
1172
|
+
let u = e;
|
|
1173
|
+
return c.classes && (u = {
|
|
1285
1174
|
...e,
|
|
1286
|
-
class:
|
|
1287
|
-
}),
|
|
1288
|
-
...
|
|
1289
|
-
...
|
|
1290
|
-
},
|
|
1175
|
+
class: c.classes.join(" ")
|
|
1176
|
+
}), be({
|
|
1177
|
+
...Q,
|
|
1178
|
+
...c.data
|
|
1179
|
+
}, u);
|
|
1291
1180
|
};
|
|
1292
1181
|
}, {
|
|
1293
1182
|
props: [
|
|
@@ -1315,47 +1204,254 @@ const Vt = {
|
|
|
1315
1204
|
"title"
|
|
1316
1205
|
],
|
|
1317
1206
|
emits: ["load"]
|
|
1318
|
-
}),
|
|
1319
|
-
profile: "iconamoon:profile-light",
|
|
1320
|
-
edit: "iconamoon:edit-light",
|
|
1321
|
-
delete: "qlementine-icons:trash-16",
|
|
1322
|
-
filter: "mdi:filter-outline",
|
|
1323
|
-
search: "material-symbols:search",
|
|
1324
|
-
people: "ic:outline-people",
|
|
1325
|
-
plus: "ic:baseline-plus",
|
|
1326
|
-
mail: "ci:mail-open",
|
|
1327
|
-
"chevron-down": "mi:chevron-down"
|
|
1328
|
-
}, Qt = {
|
|
1329
|
-
m: 20,
|
|
1330
|
-
l: 24
|
|
1331
|
-
}, Jt = /* @__PURE__ */ _({
|
|
1207
|
+
}), Ht = /* @__PURE__ */ O({
|
|
1332
1208
|
name: "CmcIcon",
|
|
1333
1209
|
__name: "CmcIcon",
|
|
1334
1210
|
props: {
|
|
1335
|
-
name: { default:
|
|
1336
|
-
size: { default:
|
|
1211
|
+
name: { default: re.profile },
|
|
1212
|
+
size: { default: J.medium },
|
|
1213
|
+
color: { default: Ge.primary }
|
|
1214
|
+
},
|
|
1215
|
+
setup(e) {
|
|
1216
|
+
const n = e, t = _(() => ({
|
|
1217
|
+
"cmc-icon": !0,
|
|
1218
|
+
[`cmc-icon--${n.size}`]: !0,
|
|
1219
|
+
[`cmc-icon--${n.color}`]: !0
|
|
1220
|
+
})), s = _(() => re[n.name]), o = _(() => J[n.size]);
|
|
1221
|
+
return (i, r) => (b(), ve(T(Gt), {
|
|
1222
|
+
class: x(t.value),
|
|
1223
|
+
icon: s.value,
|
|
1224
|
+
width: o.value,
|
|
1225
|
+
height: o.value
|
|
1226
|
+
}, null, 8, ["class", "icon", "width", "height"]));
|
|
1227
|
+
}
|
|
1228
|
+
}), qt = ["disabled"], on = /* @__PURE__ */ O({
|
|
1229
|
+
name: "CmcButton",
|
|
1230
|
+
__name: "CmcButton",
|
|
1231
|
+
props: {
|
|
1232
|
+
kind: { default: De.primary },
|
|
1233
|
+
variant: { default: Be.default },
|
|
1234
|
+
size: { default: Ve.medium },
|
|
1235
|
+
icon: {},
|
|
1236
|
+
disabled: { type: Boolean, default: !1 },
|
|
1237
|
+
loading: { type: Boolean, default: !1 }
|
|
1238
|
+
},
|
|
1239
|
+
emits: ["click"],
|
|
1240
|
+
setup(e, { emit: n }) {
|
|
1241
|
+
const t = e, s = n, o = _(() => ({
|
|
1242
|
+
button: !0,
|
|
1243
|
+
[`button--${t.variant}`]: !0,
|
|
1244
|
+
[`button--${t.kind}`]: !0,
|
|
1245
|
+
[`button--${t.size}`]: !0,
|
|
1246
|
+
"button--disabled": t.disabled
|
|
1247
|
+
})), i = () => {
|
|
1248
|
+
t.disabled || s("click");
|
|
1249
|
+
};
|
|
1250
|
+
return (r, l) => (b(), v("button", {
|
|
1251
|
+
type: "button",
|
|
1252
|
+
class: x(o.value),
|
|
1253
|
+
onClick: i,
|
|
1254
|
+
disabled: t.disabled
|
|
1255
|
+
}, [
|
|
1256
|
+
t.icon ? (b(), ve(Ht, {
|
|
1257
|
+
key: 0,
|
|
1258
|
+
name: t.icon,
|
|
1259
|
+
size: T(J).small
|
|
1260
|
+
}, null, 8, ["name", "size"])) : j("", !0),
|
|
1261
|
+
P(r.$slots, "default")
|
|
1262
|
+
], 10, qt));
|
|
1263
|
+
}
|
|
1264
|
+
}), F = {
|
|
1265
|
+
h1: "h1",
|
|
1266
|
+
h2: "h2",
|
|
1267
|
+
h3: "h3",
|
|
1268
|
+
h4: "h4",
|
|
1269
|
+
h5: "h5",
|
|
1270
|
+
h6: "h6"
|
|
1271
|
+
}, Qt = /* @__PURE__ */ O({
|
|
1272
|
+
name: "CmcHeading",
|
|
1273
|
+
__name: "CmcHeading",
|
|
1274
|
+
props: {
|
|
1275
|
+
level: {}
|
|
1337
1276
|
},
|
|
1338
1277
|
setup(e) {
|
|
1339
|
-
const n = e, t =
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1278
|
+
const n = e, t = _(() => ({
|
|
1279
|
+
heading: !0,
|
|
1280
|
+
[`heading-${n.level}`]: !0
|
|
1281
|
+
}));
|
|
1282
|
+
return (s, o) => (b(), v(G, null, [
|
|
1283
|
+
T(F).h1 === n.level ? (b(), v("h1", {
|
|
1284
|
+
key: 0,
|
|
1285
|
+
class: x(t.value)
|
|
1286
|
+
}, [
|
|
1287
|
+
P(s.$slots, "default")
|
|
1288
|
+
], 2)) : j("", !0),
|
|
1289
|
+
T(F).h2 === n.level ? (b(), v("h2", {
|
|
1290
|
+
key: 1,
|
|
1291
|
+
class: x(t.value)
|
|
1292
|
+
}, [
|
|
1293
|
+
P(s.$slots, "default")
|
|
1294
|
+
], 2)) : j("", !0),
|
|
1295
|
+
T(F).h3 === n.level ? (b(), v("h3", {
|
|
1296
|
+
key: 2,
|
|
1297
|
+
class: x(t.value)
|
|
1298
|
+
}, [
|
|
1299
|
+
P(s.$slots, "default")
|
|
1300
|
+
], 2)) : j("", !0),
|
|
1301
|
+
T(F).h4 === n.level ? (b(), v("h4", {
|
|
1302
|
+
key: 3,
|
|
1303
|
+
class: x(t.value)
|
|
1304
|
+
}, [
|
|
1305
|
+
P(s.$slots, "default")
|
|
1306
|
+
], 2)) : j("", !0),
|
|
1307
|
+
T(F).h5 === n.level ? (b(), v("h5", {
|
|
1308
|
+
key: 4,
|
|
1309
|
+
class: x(t.value)
|
|
1310
|
+
}, [
|
|
1311
|
+
P(s.$slots, "default")
|
|
1312
|
+
], 2)) : j("", !0),
|
|
1313
|
+
T(F).h6 === n.level ? (b(), v("h6", {
|
|
1314
|
+
key: 5,
|
|
1315
|
+
class: x(t.value)
|
|
1316
|
+
}, [
|
|
1317
|
+
P(s.$slots, "default")
|
|
1318
|
+
], 2)) : j("", !0)
|
|
1319
|
+
], 64));
|
|
1320
|
+
}
|
|
1321
|
+
}), sn = /* @__PURE__ */ O({
|
|
1322
|
+
name: "CmcTitle",
|
|
1323
|
+
__name: "CmcTitle",
|
|
1324
|
+
setup(e) {
|
|
1325
|
+
return (n, t) => (b(), v(G, null, [
|
|
1326
|
+
Me(Qt, {
|
|
1327
|
+
level: T(F).h1
|
|
1328
|
+
}, {
|
|
1329
|
+
default: Ne(() => [
|
|
1330
|
+
P(n.$slots, "default")
|
|
1331
|
+
]),
|
|
1332
|
+
_: 3
|
|
1333
|
+
}, 8, ["level"]),
|
|
1334
|
+
t[0] || (t[0] = N("hr", null, null, -1))
|
|
1335
|
+
], 64));
|
|
1336
|
+
}
|
|
1337
|
+
}), Ut = {
|
|
1338
|
+
success: "success",
|
|
1339
|
+
danger: "danger",
|
|
1340
|
+
warning: "warning"
|
|
1341
|
+
}, Kt = { class: "status__label" }, rn = /* @__PURE__ */ O({
|
|
1342
|
+
name: "CmcStatus",
|
|
1343
|
+
__name: "CmcStatus",
|
|
1344
|
+
props: {
|
|
1345
|
+
status: { default: Ut.success }
|
|
1346
|
+
},
|
|
1347
|
+
setup(e) {
|
|
1348
|
+
const n = e, t = _(() => ({
|
|
1349
|
+
status: !0,
|
|
1350
|
+
[`status--${n.status}`]: !0
|
|
1351
|
+
}));
|
|
1352
|
+
return (s, o) => (b(), v("div", {
|
|
1353
|
+
class: x(t.value)
|
|
1354
|
+
}, [
|
|
1355
|
+
o[0] || (o[0] = N("span", { class: "status__dot" }, null, -1)),
|
|
1356
|
+
N("span", Kt, [
|
|
1357
|
+
P(s.$slots, "default")
|
|
1358
|
+
])
|
|
1359
|
+
], 2));
|
|
1360
|
+
}
|
|
1361
|
+
}), Wt = { class: "pagination" }, Zt = ["disabled"], Jt = ["onClick"], Xt = {
|
|
1362
|
+
key: 1,
|
|
1363
|
+
class: "pagination__ellipsis"
|
|
1364
|
+
}, Yt = ["disabled"], en = 2, cn = /* @__PURE__ */ O({
|
|
1365
|
+
name: "CmcPagination",
|
|
1366
|
+
__name: "CmcPagination",
|
|
1367
|
+
props: {
|
|
1368
|
+
currentPage: {},
|
|
1369
|
+
totalItems: {},
|
|
1370
|
+
itemsPerPage: {}
|
|
1371
|
+
},
|
|
1372
|
+
emits: ["update:currentPage"],
|
|
1373
|
+
setup(e, { emit: n }) {
|
|
1374
|
+
const t = e;
|
|
1375
|
+
function s() {
|
|
1376
|
+
return Math.ceil(t.totalItems / t.itemsPerPage);
|
|
1377
|
+
}
|
|
1378
|
+
function o() {
|
|
1379
|
+
return Math.max(1, Math.min(t.currentPage, s()));
|
|
1380
|
+
}
|
|
1381
|
+
function i() {
|
|
1382
|
+
return en;
|
|
1383
|
+
}
|
|
1384
|
+
const r = n, l = _(() => {
|
|
1385
|
+
const p = s(), g = o(), y = i();
|
|
1386
|
+
if (p <= 1) return [1];
|
|
1387
|
+
const h = [];
|
|
1388
|
+
h.push(1);
|
|
1389
|
+
let f = Math.max(2, g - y), S = Math.min(p - 1, g + y);
|
|
1390
|
+
f > 2 && h.push("...");
|
|
1391
|
+
for (let C = f; C <= S; C++)
|
|
1392
|
+
h.push(C);
|
|
1393
|
+
return S < p - 1 && h.push("..."), h.push(p), h;
|
|
1394
|
+
}), a = _(() => t.currentPage > 1), c = _(() => t.currentPage < t.totalItems), u = () => {
|
|
1395
|
+
a.value && r("update:currentPage", t.currentPage - 1);
|
|
1396
|
+
}, d = () => {
|
|
1397
|
+
c.value && r("update:currentPage", t.currentPage + 1);
|
|
1398
|
+
};
|
|
1399
|
+
return (p, g) => (b(), v("nav", Wt, [
|
|
1400
|
+
N("button", {
|
|
1401
|
+
class: x(["pagination__page-button", { "is-invisible": !a.value }]),
|
|
1402
|
+
disabled: !a.value,
|
|
1403
|
+
"aria-label": "Page précédente",
|
|
1404
|
+
onClick: u
|
|
1405
|
+
}, " ‹ ", 10, Zt),
|
|
1406
|
+
(b(!0), v(G, null, ze(l.value, (y, h) => (b(), v(G, { key: h }, [
|
|
1407
|
+
typeof y == "number" ? (b(), v("button", {
|
|
1408
|
+
key: 0,
|
|
1409
|
+
class: x(["pagination__page-button", { "is-active": y === p.currentPage }]),
|
|
1410
|
+
onClick: () => r("update:currentPage", y)
|
|
1411
|
+
}, Re(y), 11, Jt)) : (b(), v("span", Xt, "…"))
|
|
1412
|
+
], 64))), 128)),
|
|
1413
|
+
N("button", {
|
|
1414
|
+
class: x(["pagination__page-button", { "is-invisible": !c.value }]),
|
|
1415
|
+
disabled: !c.value,
|
|
1416
|
+
"aria-label": "Page suivante",
|
|
1417
|
+
onClick: d
|
|
1418
|
+
}, " › ", 10, Yt)
|
|
1419
|
+
]));
|
|
1420
|
+
}
|
|
1421
|
+
}), tn = {
|
|
1422
|
+
medium: "medium"
|
|
1423
|
+
}, ln = /* @__PURE__ */ O({
|
|
1424
|
+
name: "CmcButtonGroup",
|
|
1425
|
+
__name: "CmcButtonGroup",
|
|
1426
|
+
props: {
|
|
1427
|
+
gap: { default: tn.medium }
|
|
1428
|
+
},
|
|
1429
|
+
setup(e) {
|
|
1430
|
+
const n = e, t = _(() => ({
|
|
1431
|
+
"button-group": !0,
|
|
1432
|
+
[`button-group-gap--${n.gap}`]: !0
|
|
1433
|
+
}));
|
|
1434
|
+
return (s, o) => (b(), v("div", {
|
|
1435
|
+
class: x(t.value)
|
|
1436
|
+
}, [
|
|
1437
|
+
P(s.$slots, "default")
|
|
1438
|
+
], 2));
|
|
1346
1439
|
}
|
|
1347
1440
|
});
|
|
1348
1441
|
export {
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
De as
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1442
|
+
on as CmcButton,
|
|
1443
|
+
ln as CmcButtonGroup,
|
|
1444
|
+
Qt as CmcHeading,
|
|
1445
|
+
Ht as CmcIcon,
|
|
1446
|
+
cn as CmcPagination,
|
|
1447
|
+
rn as CmcStatus,
|
|
1448
|
+
sn as CmcTitle,
|
|
1449
|
+
De as buttonKindOptions,
|
|
1450
|
+
Ve as buttonSizeOptions,
|
|
1451
|
+
Be as buttonVariantOptions,
|
|
1452
|
+
F as headingLevelOptions,
|
|
1453
|
+
Ge as iconColorOptions,
|
|
1454
|
+
re as iconNameOptions,
|
|
1455
|
+
J as iconSizeOptions,
|
|
1456
|
+
Ut as statusOptions
|
|
1361
1457
|
};
|