@oiij/chrome-tabs 0.0.1 → 0.0.3

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.js CHANGED
@@ -1,551 +1,1170 @@
1
- import { onMounted, nextTick, getCurrentScope, onScopeDispose, getCurrentInstance, toValue, computed, ref, watch, onBeforeUnmount, defineComponent, h as h$1, inject, createElementBlock, openBlock, normalizeClass, createElementVNode, createBlock, createCommentVNode, resolveDynamicComponent, renderSlot, withModifiers, createStaticVNode, mergeModels, useModel, provide, normalizeStyle, createVNode, TransitionGroup, withCtx } from "vue";
2
- function tryOnScopeDispose(fn) {
3
- if (getCurrentScope()) {
4
- onScopeDispose(fn);
5
- return true;
1
+ import { inject as Be, onBeforeMount as Le, createElementBlock as _, openBlock as E, createStaticVNode as je, createElementVNode as k, defineComponent as $e, computed as M, h as re, normalizeClass as C, unref as b, createCommentVNode as Q, createBlock as X, resolveDynamicComponent as ie, withModifiers as Te, createVNode as q, onMounted as ke, nextTick as we, watch as O, getCurrentScope as Pe, onScopeDispose as ze, getCurrentInstance as Ce, toValue as B, shallowRef as ee, ref as Oe, mergeModels as se, useModel as De, normalizeStyle as Ve, renderSlot as ue, TransitionGroup as We, withCtx as He, Fragment as Fe, renderList as qe, mergeProps as Ge } from "vue";
2
+ function Ze(e) {
3
+ let t = ".", n = "__", o = "--", r;
4
+ if (e) {
5
+ let l = e.blockPrefix;
6
+ l && (t = l), l = e.elementPrefix, l && (n = l), l = e.modifierPrefix, l && (o = l);
6
7
  }
7
- return false;
8
+ const i = {
9
+ install(l) {
10
+ r = l.c;
11
+ const p = l.context;
12
+ p.bem = {}, p.bem.b = null, p.bem.els = null;
13
+ }
14
+ };
15
+ function s(l) {
16
+ let p, h;
17
+ return {
18
+ before(m) {
19
+ p = m.bem.b, h = m.bem.els, m.bem.els = null;
20
+ },
21
+ after(m) {
22
+ m.bem.b = p, m.bem.els = h;
23
+ },
24
+ $({ context: m, props: $ }) {
25
+ return l = typeof l == "string" ? l : l({ context: m, props: $ }), m.bem.b = l, `${$?.bPrefix || t}${m.bem.b}`;
26
+ }
27
+ };
28
+ }
29
+ function u(l) {
30
+ let p;
31
+ return {
32
+ before(h) {
33
+ p = h.bem.els;
34
+ },
35
+ after(h) {
36
+ h.bem.els = p;
37
+ },
38
+ $({ context: h, props: m }) {
39
+ return l = typeof l == "string" ? l : l({ context: h, props: m }), h.bem.els = l.split(",").map(($) => $.trim()), h.bem.els.map(($) => `${m?.bPrefix || t}${h.bem.b}${n}${$}`).join(", ");
40
+ }
41
+ };
42
+ }
43
+ function f(l) {
44
+ return {
45
+ $({ context: p, props: h }) {
46
+ l = typeof l == "string" ? l : l({ context: p, props: h });
47
+ const m = l.split(",").map((L) => L.trim());
48
+ function $(L) {
49
+ return m.map((D) => `&${h?.bPrefix || t}${p.bem.b}${L !== void 0 ? `${n}${L}` : ""}${o}${D}`).join(", ");
50
+ }
51
+ const T = p.bem.els;
52
+ if (T !== null) {
53
+ if (process.env.NODE_ENV !== "production" && T.length >= 2)
54
+ throw Error(`[css-render/plugin-bem]: m(${l}) is invalid, using modifier inside multiple elements is not allowed`);
55
+ return $(T[0]);
56
+ } else
57
+ return $();
58
+ }
59
+ };
60
+ }
61
+ function c(l) {
62
+ return {
63
+ $({ context: p, props: h }) {
64
+ l = typeof l == "string" ? l : l({ context: p, props: h });
65
+ const m = p.bem.els;
66
+ if (process.env.NODE_ENV !== "production" && m !== null && m.length >= 2)
67
+ throw Error(`[css-render/plugin-bem]: notM(${l}) is invalid, using modifier inside multiple elements is not allowed`);
68
+ return `&:not(${h?.bPrefix || t}${p.bem.b}${m !== null && m.length > 0 ? `${n}${m[0]}` : ""}${o}${l})`;
69
+ }
70
+ };
71
+ }
72
+ return Object.assign(i, {
73
+ cB: (...l) => r(s(l[0]), l[1], l[2]),
74
+ cE: (...l) => r(u(l[0]), l[1], l[2]),
75
+ cM: (...l) => r(f(l[0]), l[1], l[2]),
76
+ cNotM: (...l) => r(c(l[0]), l[1], l[2])
77
+ }), i;
8
78
  }
9
- const isClient = typeof window !== "undefined" && typeof document !== "undefined";
10
- typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
11
- const noop = () => {
12
- };
13
- function createFilterWrapper(filter, fn) {
14
- function wrapper(...args) {
15
- return new Promise((resolve, reject) => {
16
- Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);
79
+ function Ue(e) {
80
+ let t = 0;
81
+ for (let n = 0; n < e.length; ++n)
82
+ e[n] === "&" && ++t;
83
+ return t;
84
+ }
85
+ const Ee = /\s*,(?![^(]*\))\s*/g, Ke = /\s+/g;
86
+ function Ye(e, t) {
87
+ const n = [];
88
+ return t.split(Ee).forEach((o) => {
89
+ let r = Ue(o);
90
+ if (r) {
91
+ if (r === 1) {
92
+ e.forEach((s) => {
93
+ n.push(o.replace("&", s));
94
+ });
95
+ return;
96
+ }
97
+ } else {
98
+ e.forEach((s) => {
99
+ n.push(
100
+ // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
101
+ (s && s + " ") + o
102
+ );
103
+ });
104
+ return;
105
+ }
106
+ let i = [
107
+ o
108
+ ];
109
+ for (; r--; ) {
110
+ const s = [];
111
+ i.forEach((u) => {
112
+ e.forEach((f) => {
113
+ s.push(u.replace("&", f));
114
+ });
115
+ }), i = s;
116
+ }
117
+ i.forEach((s) => n.push(s));
118
+ }), n;
119
+ }
120
+ function Je(e, t) {
121
+ const n = [];
122
+ return t.split(Ee).forEach((o) => {
123
+ e.forEach((r) => {
124
+ n.push((r && r + " ") + o);
125
+ });
126
+ }), n;
127
+ }
128
+ function Qe(e) {
129
+ let t = [""];
130
+ return e.forEach((n) => {
131
+ n = n && n.trim(), // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
132
+ n && (n.includes("&") ? t = Ye(t, n) : t = Je(t, n));
133
+ }), t.join(", ").replace(Ke, " ");
134
+ }
135
+ function le(e) {
136
+ if (!e)
137
+ return;
138
+ const t = e.parentElement;
139
+ t && t.removeChild(e);
140
+ }
141
+ function ne(e, t) {
142
+ return (t ?? document.head).querySelector(`style[cssr-id="${e}"]`);
143
+ }
144
+ function Xe(e) {
145
+ const t = document.createElement("style");
146
+ return t.setAttribute("cssr-id", e), t;
147
+ }
148
+ function V(e) {
149
+ return e ? /^\s*@(s|m)/.test(e) : !1;
150
+ }
151
+ const et = /[A-Z]/g;
152
+ function Ie(e) {
153
+ return e.replace(et, (t) => "-" + t.toLowerCase());
154
+ }
155
+ function tt(e, t = " ") {
156
+ return typeof e == "object" && e !== null ? ` {
157
+ ` + Object.entries(e).map((n) => t + ` ${Ie(n[0])}: ${n[1]};`).join(`
158
+ `) + `
159
+ ` + t + "}" : `: ${e};`;
160
+ }
161
+ function nt(e, t, n) {
162
+ return typeof e == "function" ? e({
163
+ context: t.context,
164
+ props: n
165
+ }) : e;
166
+ }
167
+ function ae(e, t, n, o) {
168
+ if (!t)
169
+ return "";
170
+ const r = nt(t, n, o);
171
+ if (!r)
172
+ return "";
173
+ if (typeof r == "string")
174
+ return `${e} {
175
+ ${r}
176
+ }`;
177
+ const i = Object.keys(r);
178
+ if (i.length === 0)
179
+ return n.config.keepEmptyBlock ? e + ` {
180
+ }` : "";
181
+ const s = e ? [
182
+ e + " {"
183
+ ] : [];
184
+ return i.forEach((u) => {
185
+ const f = r[u];
186
+ if (u === "raw") {
187
+ s.push(`
188
+ ` + f + `
189
+ `);
190
+ return;
191
+ }
192
+ u = Ie(u), f != null && s.push(` ${u}${tt(f)}`);
193
+ }), e && s.push("}"), s.join(`
194
+ `);
195
+ }
196
+ function te(e, t, n) {
197
+ e && e.forEach((o) => {
198
+ if (Array.isArray(o))
199
+ te(o, t, n);
200
+ else if (typeof o == "function") {
201
+ const r = o(t);
202
+ Array.isArray(r) ? te(r, t, n) : r && n(r);
203
+ } else o && n(o);
204
+ });
205
+ }
206
+ function Me(e, t, n, o, r) {
207
+ const i = e.$;
208
+ let s = "";
209
+ if (!i || typeof i == "string")
210
+ V(i) ? s = i : t.push(i);
211
+ else if (typeof i == "function") {
212
+ const c = i({
213
+ context: o.context,
214
+ props: r
17
215
  });
216
+ V(c) ? s = c : t.push(c);
217
+ } else if (i.before && i.before(o.context), !i.$ || typeof i.$ == "string")
218
+ V(i.$) ? s = i.$ : t.push(i.$);
219
+ else if (i.$) {
220
+ const c = i.$({
221
+ context: o.context,
222
+ props: r
223
+ });
224
+ V(c) ? s = c : t.push(c);
18
225
  }
19
- return wrapper;
20
- }
21
- function debounceFilter(ms, options = {}) {
22
- let timer;
23
- let maxTimer;
24
- let lastRejector = noop;
25
- const _clearTimeout = (timer2) => {
26
- clearTimeout(timer2);
27
- lastRejector();
28
- lastRejector = noop;
226
+ const u = Qe(t), f = ae(u, e.props, o, r);
227
+ s ? n.push(`${s} {`) : f.length && n.push(f), e.children && te(e.children, {
228
+ context: o.context,
229
+ props: r
230
+ }, (c) => {
231
+ if (typeof c == "string") {
232
+ const d = ae(u, { raw: c }, o, r);
233
+ n.push(d);
234
+ } else
235
+ Me(c, t, n, o, r);
236
+ }), t.pop(), s && n.push("}"), i && i.after && i.after(o.context);
237
+ }
238
+ function ot(e, t, n) {
239
+ const o = [];
240
+ return Me(e, [], o, t, n), o.join(`
241
+
242
+ `);
243
+ }
244
+ function rt(e) {
245
+ for (var t = 0, n, o = 0, r = e.length; r >= 4; ++o, r -= 4)
246
+ n = e.charCodeAt(o) & 255 | (e.charCodeAt(++o) & 255) << 8 | (e.charCodeAt(++o) & 255) << 16 | (e.charCodeAt(++o) & 255) << 24, n = /* Math.imul(k, m): */
247
+ (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
248
+ n >>> 24, t = /* Math.imul(k, m): */
249
+ (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
250
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
251
+ switch (r) {
252
+ case 3:
253
+ t ^= (e.charCodeAt(o + 2) & 255) << 16;
254
+ case 2:
255
+ t ^= (e.charCodeAt(o + 1) & 255) << 8;
256
+ case 1:
257
+ t ^= e.charCodeAt(o) & 255, t = /* Math.imul(h, m): */
258
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
259
+ }
260
+ return t ^= t >>> 13, t = /* Math.imul(h, m): */
261
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
262
+ }
263
+ typeof window < "u" && (window.__cssrContext = {});
264
+ function it(e, t, n, o) {
265
+ const { els: r } = t;
266
+ if (n === void 0)
267
+ r.forEach(le), t.els = [];
268
+ else {
269
+ const i = ne(n, o);
270
+ i && r.includes(i) && (le(i), t.els = r.filter((s) => s !== i));
271
+ }
272
+ }
273
+ function ce(e, t) {
274
+ e.push(t);
275
+ }
276
+ function st(e, t, n, o, r, i, s, u, f) {
277
+ let c;
278
+ if (n === void 0 && (c = t.render(o), n = rt(c)), f) {
279
+ f.adapter(n, c ?? t.render(o));
280
+ return;
281
+ }
282
+ u === void 0 && (u = document.head);
283
+ const d = ne(n, u);
284
+ if (d !== null && !i)
285
+ return d;
286
+ const a = d ?? Xe(n);
287
+ if (c === void 0 && (c = t.render(o)), a.textContent = c, d !== null)
288
+ return d;
289
+ if (s) {
290
+ const v = u.querySelector(`meta[name="${s}"]`);
291
+ if (v)
292
+ return u.insertBefore(a, v), ce(t.els, a), a;
293
+ }
294
+ return r ? u.insertBefore(a, u.querySelector("style, link")) : u.appendChild(a), ce(t.els, a), a;
295
+ }
296
+ function ut(e) {
297
+ return ot(this, this.instance, e);
298
+ }
299
+ function lt(e = {}) {
300
+ const { id: t, ssr: n, props: o, head: r = !1, force: i = !1, anchorMetaName: s, parent: u } = e;
301
+ return st(this.instance, this, t, o, r, i, s, u, n);
302
+ }
303
+ function at(e = {}) {
304
+ const { id: t, parent: n } = e;
305
+ it(this.instance, this, t, n);
306
+ }
307
+ const W = function(e, t, n, o) {
308
+ return {
309
+ instance: e,
310
+ $: t,
311
+ props: n,
312
+ children: o,
313
+ els: [],
314
+ render: ut,
315
+ mount: lt,
316
+ unmount: at
29
317
  };
30
- let lastInvoker;
31
- const filter = (invoke) => {
32
- const duration = toValue(ms);
33
- const maxDuration = toValue(options.maxWait);
34
- if (timer)
35
- _clearTimeout(timer);
36
- if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
37
- if (maxTimer) {
38
- _clearTimeout(maxTimer);
39
- maxTimer = null;
40
- }
41
- return Promise.resolve(invoke());
318
+ }, ct = function(e, t, n, o) {
319
+ return Array.isArray(t) ? W(e, { $: null }, null, t) : Array.isArray(n) ? W(e, t, null, n) : Array.isArray(o) ? W(e, t, n, o) : W(e, t, n, null);
320
+ };
321
+ function ft(e = {}) {
322
+ const t = {
323
+ c: (...n) => ct(t, ...n),
324
+ use: (n, ...o) => n.install(t, ...o),
325
+ find: ne,
326
+ context: {},
327
+ config: e
328
+ };
329
+ return t;
330
+ }
331
+ function dt(e) {
332
+ const { namespace: t = "n", blockPrefix: n = `.${t}-`, elementPrefix: o = "__", modifierPrefix: r = "--" } = e ?? {}, i = ft(), s = Ze({
333
+ blockPrefix: n,
334
+ elementPrefix: o,
335
+ modifierPrefix: r
336
+ });
337
+ return i.use(s), {
338
+ namespace: t,
339
+ blockPrefix: n,
340
+ elementPrefix: o,
341
+ modifierPrefix: r,
342
+ cssr: i,
343
+ plugin: s
344
+ };
345
+ }
346
+ const ht = "@css-render/vue3-ssr";
347
+ function mt(e, t) {
348
+ return `<style cssr-id="${e}">
349
+ ${t}
350
+ </style>`;
351
+ }
352
+ function pt(e, t, n) {
353
+ const { styles: o, ids: r } = n;
354
+ r.has(e) || o !== null && (r.add(e), o.push(mt(e, t)));
355
+ }
356
+ const vt = typeof document < "u";
357
+ function bt() {
358
+ if (vt)
359
+ return;
360
+ const e = Be(ht, null);
361
+ if (e !== null)
362
+ return {
363
+ adapter: (t, n) => pt(t, n, e),
364
+ context: e
365
+ };
366
+ }
367
+ function gt(e, t) {
368
+ const n = bt();
369
+ function o() {
370
+ t.mount({
371
+ id: e,
372
+ head: !0,
373
+ ssr: n
374
+ });
375
+ }
376
+ n ? o() : Le(() => {
377
+ o();
378
+ });
379
+ }
380
+ const { cssr: xt, plugin: yt, namespace: Ne } = dt(), { c: x, cB: H, cE: g, cM: U, cNotM: fe } = { ...xt, ...yt }, P = `${Ne}-chrome-tabs`, w = `${Ne}-chrome-tabs-item`, j = "all .2s cubic-bezier(.4, 0, .2, 1)";
381
+ function $t() {
382
+ return x([
383
+ H("chrome-tabs", {
384
+ display: "flex",
385
+ width: "100%",
386
+ height: "40px",
387
+ padding: "0 10px",
388
+ alignItems: "center",
389
+ backgroundColor: "var(--background-color)",
390
+ color: "var(--background-color-dark)"
391
+ }, [
392
+ x(".group-move, .group-enter-active, .group-leave-active", {
393
+ transition: j
394
+ }),
395
+ x(".group-enter-from, .group-leave-to", {
396
+ opacity: 0
397
+ }),
398
+ x(".group-leave-active", {}),
399
+ g("prefix", {}),
400
+ g("icon", {
401
+ width: "28px",
402
+ height: "28px",
403
+ display: "flex",
404
+ alignItems: "center",
405
+ justifyContent: "center",
406
+ padding: "5px",
407
+ borderRadius: "10px",
408
+ backgroundColor: "var(--active-background-color)",
409
+ transition: j
410
+ }, [
411
+ x("svg", {
412
+ width: "100%",
413
+ height: "100%",
414
+ fill: "currentColor"
415
+ }),
416
+ x("&:hover", {
417
+ backgroundColor: "var(--primary-color)"
418
+ })
419
+ ]),
420
+ g("content", {
421
+ flex: "1",
422
+ height: "100%",
423
+ minWidth: 0,
424
+ overflow: "hidden",
425
+ marginLeft: "-6px",
426
+ padding: "0 10px"
427
+ }),
428
+ g("scroll", {
429
+ position: "relative",
430
+ display: "flex",
431
+ alignItems: "center",
432
+ height: "100%"
433
+ }, [
434
+ g("icon", {
435
+ marginLeft: "5px",
436
+ borderRadius: "50%",
437
+ backgroundColor: "transparent",
438
+ flexShrink: 0
439
+ }, [
440
+ x("&:hover", {
441
+ backgroundColor: "var(--primary-color)"
442
+ })
443
+ ])
444
+ ]),
445
+ g("suffix", {})
446
+ ]),
447
+ H("chrome-tabs-item", {
448
+ position: "relative",
449
+ margin: "0 -5px",
450
+ height: "100%",
451
+ flexShrink: 0,
452
+ cursor: "default",
453
+ userSelect: "none",
454
+ padding: "6px 10px 0px 10px"
455
+ }, [
456
+ U("disabled", {
457
+ cursor: "not-allowed",
458
+ pointerEvents: "none",
459
+ opacity: 0.5,
460
+ filter: "grayscale(0.5)"
461
+ }),
462
+ U("active", [
463
+ g("background", {
464
+ opacity: 1
465
+ })
466
+ ]),
467
+ fe("active", [
468
+ x("&:hover", {}, [
469
+ g("content", {
470
+ backgroundColor: "var(--primary-color)"
471
+ })
472
+ ])
473
+ ]),
474
+ x("&::first-child", {
475
+ marginLeft: "0 !important"
476
+ }),
477
+ x("&::last-child", {
478
+ marginRight: "0 !important"
479
+ }),
480
+ g("content", {
481
+ position: "relative",
482
+ zIndex: 1,
483
+ height: "28px",
484
+ display: "flex",
485
+ alignItems: "center",
486
+ gap: "5px",
487
+ borderRadius: "10px",
488
+ padding: "0 10px",
489
+ transition: j
490
+ }),
491
+ g("slot", {}),
492
+ g("icon", {}, [
493
+ x("svg", {
494
+ width: "1.2em",
495
+ height: "1.2em",
496
+ fill: "currentColor"
497
+ })
498
+ ]),
499
+ g("close", {
500
+ width: "16px",
501
+ height: "16px",
502
+ padding: "2px",
503
+ display: "flex",
504
+ alignItems: "center",
505
+ justifyContent: "center",
506
+ borderRadius: "50%",
507
+ transition: j
508
+ }, [
509
+ x("&:hover", {
510
+ backgroundColor: "rgba(0,0,0,0.1)"
511
+ }),
512
+ x("svg", {
513
+ width: "100%",
514
+ height: "100%",
515
+ fill: "currentColor"
516
+ })
517
+ ]),
518
+ g("background", {
519
+ position: "absolute",
520
+ opacity: 0,
521
+ left: 0,
522
+ bottom: 0,
523
+ zIndex: 0,
524
+ height: "34px",
525
+ width: "100%",
526
+ display: "flex",
527
+ alignItems: "flex-end",
528
+ transition: j
529
+ }, [
530
+ g("block", {
531
+ height: "100%",
532
+ flex: 1,
533
+ minWidth: 0,
534
+ borderRadius: "10px 10px 0 0",
535
+ backgroundColor: "var(--active-background-color)"
536
+ }),
537
+ x("svg", {
538
+ fill: "var(--active-background-color)"
539
+ })
540
+ ]),
541
+ g("line", {
542
+ position: "absolute",
543
+ bottom: "12px",
544
+ right: "4px",
545
+ height: "16px",
546
+ width: "2px",
547
+ borderRadius: "1px",
548
+ transition: j,
549
+ backgroundColor: "var(--primary-color)",
550
+ opacity: 0
551
+ }, [
552
+ U("show", {
553
+ opacity: 1
554
+ })
555
+ ])
556
+ ]),
557
+ x(".dark", [
558
+ H("chrome-tabs", {
559
+ backgroundColor: "var(--background-color-dark)",
560
+ color: "var(--background-color)"
561
+ }, [
562
+ g("icon", {
563
+ backgroundColor: "var(--active-background-color-dark)"
564
+ }, [
565
+ x("&:hover", {
566
+ backgroundColor: "var(--primary-color-dark)"
567
+ })
568
+ ])
569
+ ]),
570
+ H("chrome-tabs-item", {}, [
571
+ fe("active", [
572
+ x("&:hover", {}, [
573
+ g("content", {
574
+ backgroundColor: "var(--primary-color-dark)"
575
+ })
576
+ ])
577
+ ]),
578
+ g("background", {}, [
579
+ g("block", {
580
+ backgroundColor: "var(--active-background-color-dark)"
581
+ }),
582
+ x("svg", {
583
+ fill: "var(--active-background-color-dark)"
584
+ })
585
+ ])
586
+ ])
587
+ ])
588
+ ]);
589
+ }
590
+ const Z = (e, t) => {
591
+ const n = e.__vccOpts || e;
592
+ for (const [o, r] of t)
593
+ n[o] = r;
594
+ return n;
595
+ }, kt = {
596
+ name: "LineMdLoadingTwotoneLoop"
597
+ }, wt = {
598
+ xmlns: "http://www.w3.org/2000/svg",
599
+ width: "1em",
600
+ height: "1em",
601
+ viewBox: "0 0 24 24"
602
+ };
603
+ function Ct(e, t, n, o, r, i) {
604
+ return E(), _("svg", wt, t[0] || (t[0] = [
605
+ je('<g fill="none" stroke="#757575" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke-dasharray="16" stroke-dashoffset="16" d="M12 3c4.97 0 9 4.03 9 9"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="16;0"></animate><animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"></animateTransform></path><path stroke-dasharray="64" stroke-dashoffset="64" stroke-opacity=".3" d="M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="1.2s" values="64;0"></animate></path></g>', 1)
606
+ ]));
607
+ }
608
+ const Et = /* @__PURE__ */ Z(kt, [["render", Ct]]), It = {
609
+ name: "RiCloseLine"
610
+ }, Mt = {
611
+ xmlns: "http://www.w3.org/2000/svg",
612
+ width: "1em",
613
+ height: "1em",
614
+ viewBox: "0 0 24 24"
615
+ };
616
+ function Nt(e, t, n, o, r, i) {
617
+ return E(), _("svg", Mt, t[0] || (t[0] = [
618
+ k("path", {
619
+ fill: "#757575",
620
+ d: "m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z"
621
+ }, null, -1)
622
+ ]));
623
+ }
624
+ const St = /* @__PURE__ */ Z(It, [["render", Nt]]), _t = /* @__PURE__ */ $e({
625
+ __name: "TabItem",
626
+ props: {
627
+ label: { type: [String, Function] },
628
+ icon: { type: Function },
629
+ closable: { type: Boolean },
630
+ disabled: { type: Boolean },
631
+ loading: { type: Boolean },
632
+ loadingIcon: { type: Function },
633
+ onClick: { type: Function },
634
+ onContextMenu: { type: Function },
635
+ onClose: { type: Function },
636
+ activeIndex: { default: 0 },
637
+ index: {}
638
+ },
639
+ emits: ["itemClick", "itemContextmenu", "itemClose"],
640
+ setup(e, { emit: t }) {
641
+ const n = t, o = M(() => e.activeIndex !== e.index && e.activeIndex !== e.index - 1), r = M(() => e.activeIndex === e.index), i = M(() => typeof e.label == "string" ? re("span", { class: `${w}__label` }, e.label) : e.label), s = M(() => e.loadingIcon ?? re(Et));
642
+ function u(d) {
643
+ d.stopPropagation(), n("itemClick", d), e.onClick?.(d);
42
644
  }
43
- return new Promise((resolve, reject) => {
44
- lastRejector = options.rejectOnCancel ? reject : resolve;
45
- lastInvoker = invoke;
46
- if (maxDuration && !maxTimer) {
47
- maxTimer = setTimeout(() => {
48
- if (timer)
49
- _clearTimeout(timer);
50
- maxTimer = null;
51
- resolve(lastInvoker());
52
- }, maxDuration);
53
- }
54
- timer = setTimeout(() => {
55
- if (maxTimer)
56
- _clearTimeout(maxTimer);
57
- maxTimer = null;
58
- resolve(invoke());
59
- }, duration);
645
+ function f(d) {
646
+ n("itemContextmenu", d), e.onContextMenu?.(d);
647
+ }
648
+ function c() {
649
+ n("itemClose"), e.onClose?.();
650
+ }
651
+ return (d, a) => (E(), _("div", {
652
+ class: C([
653
+ b(w),
654
+ {
655
+ [`${b(w)}--active`]: r.value,
656
+ [`${b(w)}--disabled`]: d.disabled
657
+ }
658
+ ]),
659
+ onClick: u,
660
+ onContextmenu: f
661
+ }, [
662
+ k("div", {
663
+ class: C([`${b(w)}__content`])
664
+ }, [
665
+ k("div", {
666
+ class: C([`${b(w)}__icon`])
667
+ }, [
668
+ (E(), X(ie(d.loading ? s.value : d.icon)))
669
+ ], 2),
670
+ k("div", {
671
+ class: C([`${b(w)}__slot`])
672
+ }, [
673
+ (E(), X(ie(i.value)))
674
+ ], 2),
675
+ d.closable ? (E(), _("div", {
676
+ key: 0,
677
+ class: C([`${b(w)}__close`]),
678
+ onClick: Te(c, ["stop"])
679
+ }, [
680
+ q(St)
681
+ ], 2)) : Q("", !0)
682
+ ], 2),
683
+ k("div", {
684
+ class: C([`${b(w)}__background`])
685
+ }, [
686
+ a[0] || (a[0] = k("svg", {
687
+ width: "10",
688
+ height: "10"
689
+ }, [
690
+ k("path", { d: "M 0 10 A 10 10 0 0 0 10 0 L 10 10 Z" })
691
+ ], -1)),
692
+ k("div", {
693
+ class: C([`${b(w)}__block`])
694
+ }, null, 2),
695
+ a[1] || (a[1] = k("svg", {
696
+ width: "10",
697
+ height: "10"
698
+ }, [
699
+ k("path", { d: "M 0 0 A 10 10 0 0 0 10 10 L 0 10 Z" })
700
+ ], -1))
701
+ ], 2),
702
+ k("div", {
703
+ class: C([`${b(w)}__line`, o.value ? `${b(w)}__line--show` : ""])
704
+ }, null, 2)
705
+ ], 34));
706
+ }
707
+ });
708
+ function Se(e) {
709
+ return Pe() ? (ze(e), !0) : !1;
710
+ }
711
+ const At = typeof window < "u" && typeof document < "u";
712
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
713
+ const Rt = Object.prototype.toString, Bt = (e) => Rt.call(e) === "[object Object]", de = () => {
714
+ };
715
+ function Lt(e, t) {
716
+ function n(...o) {
717
+ return new Promise((r, i) => {
718
+ Promise.resolve(e(() => t.apply(this, o), { fn: t, thisArg: this, args: o })).then(r).catch(i);
719
+ });
720
+ }
721
+ return n;
722
+ }
723
+ function jt(e, t = {}) {
724
+ let n, o, r = de;
725
+ const i = (f) => {
726
+ clearTimeout(f), r(), r = de;
727
+ };
728
+ let s;
729
+ return (f) => {
730
+ const c = B(e), d = B(t.maxWait);
731
+ return n && i(n), c <= 0 || d !== void 0 && d <= 0 ? (o && (i(o), o = void 0), Promise.resolve(f())) : new Promise((a, v) => {
732
+ r = t.rejectOnCancel ? v : a, s = f, d && !o && (o = setTimeout(() => {
733
+ n && i(n), o = void 0, a(s());
734
+ }, d)), n = setTimeout(() => {
735
+ o && i(o), o = void 0, a(f());
736
+ }, c);
60
737
  });
61
738
  };
62
- return filter;
63
739
  }
64
- function getLifeCycleTarget(target) {
65
- return getCurrentInstance();
740
+ function G(e) {
741
+ return Array.isArray(e) ? e : [e];
66
742
  }
67
- function toArray(value) {
68
- return Array.isArray(value) ? value : [value];
743
+ function Tt(e) {
744
+ return Ce();
69
745
  }
70
- function useDebounceFn(fn, ms = 200, options = {}) {
71
- return createFilterWrapper(
72
- debounceFilter(ms, options),
73
- fn
746
+ function Pt(e, t = 200, n = {}) {
747
+ return Lt(
748
+ jt(t, n),
749
+ e
74
750
  );
75
751
  }
76
- function tryOnMounted(fn, sync = true, target) {
77
- const instance = getLifeCycleTarget();
78
- if (instance)
79
- onMounted(fn, target);
80
- else if (sync)
81
- fn();
82
- else
83
- nextTick(fn);
84
- }
85
- const defaultWindow = isClient ? window : void 0;
86
- function unrefElement(elRef) {
87
- var _a;
88
- const plain = toValue(elRef);
89
- return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
90
- }
91
- function useMounted() {
92
- const isMounted = ref(false);
93
- const instance = getCurrentInstance();
94
- if (instance) {
95
- onMounted(() => {
96
- isMounted.value = true;
97
- }, instance);
98
- }
99
- return isMounted;
100
- }
101
- function useSupported(callback) {
102
- const isMounted = useMounted();
103
- return computed(() => {
104
- isMounted.value;
105
- return Boolean(callback());
106
- });
752
+ function zt(e, t = !0, n) {
753
+ Tt() ? ke(e, n) : t ? e() : we(e);
107
754
  }
108
- function useResizeObserver(target, callback, options = {}) {
109
- const { window: window2 = defaultWindow, ...observerOptions } = options;
110
- let observer;
111
- const isSupported = useSupported(() => window2 && "ResizeObserver" in window2);
112
- const cleanup = () => {
113
- if (observer) {
114
- observer.disconnect();
115
- observer = void 0;
755
+ function Ot(e, t, n) {
756
+ return O(
757
+ e,
758
+ t,
759
+ {
760
+ ...n,
761
+ immediate: !0
116
762
  }
763
+ );
764
+ }
765
+ const oe = At ? window : void 0;
766
+ function R(e) {
767
+ var t;
768
+ const n = B(e);
769
+ return (t = n?.$el) != null ? t : n;
770
+ }
771
+ function Dt(...e) {
772
+ const t = [], n = () => {
773
+ t.forEach((u) => u()), t.length = 0;
774
+ }, o = (u, f, c, d) => (u.addEventListener(f, c, d), () => u.removeEventListener(f, c, d)), r = M(() => {
775
+ const u = G(B(e[0])).filter((f) => f != null);
776
+ return u.every((f) => typeof f != "string") ? u : void 0;
777
+ }), i = Ot(
778
+ () => {
779
+ var u, f;
780
+ return [
781
+ (f = (u = r.value) == null ? void 0 : u.map((c) => R(c))) != null ? f : [oe].filter((c) => c != null),
782
+ G(B(r.value ? e[1] : e[0])),
783
+ G(b(r.value ? e[2] : e[1])),
784
+ // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
785
+ B(r.value ? e[3] : e[2])
786
+ ];
787
+ },
788
+ ([u, f, c, d]) => {
789
+ if (n(), !u?.length || !f?.length || !c?.length)
790
+ return;
791
+ const a = Bt(d) ? { ...d } : d;
792
+ t.push(
793
+ ...u.flatMap(
794
+ (v) => f.flatMap(
795
+ (S) => c.map((l) => o(v, S, l, a))
796
+ )
797
+ )
798
+ );
799
+ },
800
+ { flush: "post" }
801
+ ), s = () => {
802
+ i(), n();
117
803
  };
118
- const targets = computed(() => {
119
- const _targets = toValue(target);
120
- return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];
121
- });
122
- const stopWatch = watch(
123
- targets,
124
- (els) => {
125
- cleanup();
126
- if (isSupported.value && window2) {
127
- observer = new ResizeObserver(callback);
128
- for (const _el of els) {
129
- if (_el)
130
- observer.observe(_el, observerOptions);
131
- }
804
+ return Se(n), s;
805
+ }
806
+ function Vt() {
807
+ const e = ee(!1), t = Ce();
808
+ return t && ke(() => {
809
+ e.value = !0;
810
+ }, t), e;
811
+ }
812
+ function Wt(e) {
813
+ const t = Vt();
814
+ return M(() => (t.value, !!e()));
815
+ }
816
+ function Ht(e, t, n = {}) {
817
+ const { window: o = oe, ...r } = n;
818
+ let i;
819
+ const s = Wt(() => o && "ResizeObserver" in o), u = () => {
820
+ i && (i.disconnect(), i = void 0);
821
+ }, f = M(() => {
822
+ const a = B(e);
823
+ return Array.isArray(a) ? a.map((v) => R(v)) : [R(a)];
824
+ }), c = O(
825
+ f,
826
+ (a) => {
827
+ if (u(), s.value && o) {
828
+ i = new ResizeObserver(t);
829
+ for (const v of a)
830
+ v && i.observe(v, r);
132
831
  }
133
832
  },
134
- { immediate: true, flush: "post" }
135
- );
136
- const stop = () => {
137
- cleanup();
138
- stopWatch();
833
+ { immediate: !0, flush: "post" }
834
+ ), d = () => {
835
+ u(), c();
139
836
  };
140
- tryOnScopeDispose(stop);
141
- return {
142
- isSupported,
143
- stop
837
+ return Se(d), {
838
+ isSupported: s,
839
+ stop: d
144
840
  };
145
841
  }
146
- function useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {
147
- const { window: window2 = defaultWindow, box = "content-box" } = options;
148
- const isSVG = computed(() => {
149
- var _a, _b;
150
- return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes("svg");
151
- });
152
- const width = ref(initialSize.width);
153
- const height = ref(initialSize.height);
154
- const { stop: stop1 } = useResizeObserver(
155
- target,
156
- ([entry]) => {
157
- const boxSize = box === "border-box" ? entry.borderBoxSize : box === "content-box" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;
158
- if (window2 && isSVG.value) {
159
- const $elem = unrefElement(target);
160
- if ($elem) {
161
- const rect = $elem.getBoundingClientRect();
162
- width.value = rect.width;
163
- height.value = rect.height;
164
- }
165
- } else {
166
- if (boxSize) {
167
- const formatBoxSize = toArray(boxSize);
168
- width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);
169
- height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);
170
- } else {
171
- width.value = entry.contentRect.width;
172
- height.value = entry.contentRect.height;
842
+ function Ft(e, t = { width: 0, height: 0 }, n = {}) {
843
+ const { window: o = oe, box: r = "content-box" } = n, i = M(() => {
844
+ var a, v;
845
+ return (v = (a = R(e)) == null ? void 0 : a.namespaceURI) == null ? void 0 : v.includes("svg");
846
+ }), s = ee(t.width), u = ee(t.height), { stop: f } = Ht(
847
+ e,
848
+ ([a]) => {
849
+ const v = r === "border-box" ? a.borderBoxSize : r === "content-box" ? a.contentBoxSize : a.devicePixelContentBoxSize;
850
+ if (o && i.value) {
851
+ const S = R(e);
852
+ if (S) {
853
+ const l = S.getBoundingClientRect();
854
+ s.value = l.width, u.value = l.height;
173
855
  }
174
- }
856
+ } else if (v) {
857
+ const S = G(v);
858
+ s.value = S.reduce((l, { inlineSize: p }) => l + p, 0), u.value = S.reduce((l, { blockSize: p }) => l + p, 0);
859
+ } else
860
+ s.value = a.contentRect.width, u.value = a.contentRect.height;
175
861
  },
176
- options
862
+ n
177
863
  );
178
- tryOnMounted(() => {
179
- const ele = unrefElement(target);
180
- if (ele) {
181
- width.value = "offsetWidth" in ele ? ele.offsetWidth : initialSize.width;
182
- height.value = "offsetHeight" in ele ? ele.offsetHeight : initialSize.height;
183
- }
864
+ zt(() => {
865
+ const a = R(e);
866
+ a && (s.value = "offsetWidth" in a ? a.offsetWidth : t.width, u.value = "offsetHeight" in a ? a.offsetHeight : t.height);
184
867
  });
185
- const stop2 = watch(
186
- () => unrefElement(target),
187
- (ele) => {
188
- width.value = ele ? initialSize.width : 0;
189
- height.value = ele ? initialSize.height : 0;
868
+ const c = O(
869
+ () => R(e),
870
+ (a) => {
871
+ s.value = a ? t.width : 0, u.value = a ? t.height : 0;
190
872
  }
191
873
  );
192
- function stop() {
193
- stop1();
194
- stop2();
874
+ function d() {
875
+ f(), c();
195
876
  }
196
877
  return {
197
- width,
198
- height,
199
- stop
878
+ width: s,
879
+ height: u,
880
+ stop: d
200
881
  };
201
882
  }
202
- function useInjectionKey(key) {
203
- return Symbol(key);
204
- }
205
- function useScrollView(options) {
206
- const { activeClassName = ".active", enableWheel = true } = options || {};
207
- const scrollRef = ref();
208
- const { width } = useElementSize(scrollRef);
209
- async function scrollToView() {
210
- var _a;
211
- if (!scrollRef.value)
212
- return;
213
- await nextTick();
214
- const activeEl = (_a = scrollRef.value) == null ? void 0 : _a.children[0].querySelector(activeClassName);
215
- if (!activeEl)
216
- return;
217
- activeEl.scrollIntoView({
883
+ function qt(e) {
884
+ const { activeClassName: t = ".active", enableWheel: n = !0, direction: o = "vertical" } = e ?? {}, r = Oe(), { width: i, height: s } = Ft(r);
885
+ async function u(d) {
886
+ await we();
887
+ const a = r.value?.querySelector(t);
888
+ a && a.scrollIntoView({
218
889
  behavior: "smooth",
219
890
  block: "nearest",
220
- inline: "nearest"
891
+ inline: "nearest",
892
+ ...d
221
893
  });
222
894
  }
223
- function wheelEvent(e2) {
224
- var _a, _b;
225
- const { deltaY } = e2;
226
- if (deltaY > 0) {
227
- (_a = scrollRef.value) == null ? void 0 : _a.scrollBy({
228
- top: 0,
229
- left: width.value,
230
- behavior: "smooth"
231
- });
232
- } else {
233
- (_b = scrollRef.value) == null ? void 0 : _b.scrollBy({
234
- top: 0,
235
- left: -width.value,
236
- behavior: "smooth"
237
- });
895
+ function f(d) {
896
+ if (!n) return;
897
+ d.preventDefault();
898
+ const { deltaY: a } = d;
899
+ switch (o) {
900
+ case "vertical":
901
+ r.value?.scrollBy({
902
+ top: a > 0 ? s.value : -s.value,
903
+ behavior: "smooth"
904
+ });
905
+ break;
906
+ case "horizontal":
907
+ r.value?.scrollBy({
908
+ left: a > 0 ? i.value : -i.value,
909
+ behavior: "smooth"
910
+ });
911
+ break;
238
912
  }
239
913
  }
240
- function init() {
241
- if (!scrollRef.value || !enableWheel)
242
- return;
243
- scrollRef.value.addEventListener("wheel", wheelEvent);
244
- }
245
- function destroy() {
246
- var _a;
247
- (_a = scrollRef.value) == null ? void 0 : _a.removeEventListener("wheel", wheelEvent);
248
- }
249
- const debouncedScrollToView = useDebounceFn(scrollToView, 500);
250
- watch(width, () => {
251
- debouncedScrollToView();
252
- });
253
- onBeforeUnmount(() => {
254
- destroy();
255
- });
256
- onMounted(() => {
257
- scrollToView();
258
- init();
259
- });
260
- return {
261
- scrollRef,
262
- scrollToView
914
+ Dt(r, "wheel", f);
915
+ const c = Pt(u, 500);
916
+ return O([i, s], () => {
917
+ c();
918
+ }), {
919
+ scrollRef: r,
920
+ scrollToView: u
263
921
  };
264
922
  }
265
- const _hoisted_1$1 = { class: "uno-iyw1ix" };
266
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
267
- __name: "TabItem",
268
- props: {
269
- name: {},
270
- disabled: { type: Boolean },
271
- closeable: { type: Boolean },
272
- showLine: { type: Boolean },
273
- icon: { type: [Function, String] },
274
- loading: { type: Boolean },
275
- loadingRender: { type: Function, default: () => h$1("i", { class: "i-line-md-loading-twotone-loop", style: { width: `16px`, height: `16px` } }) }
276
- },
277
- emits: ["close", "click", "contextmenu"],
278
- setup(__props, { emit: __emit }) {
279
- const emit = __emit;
280
- const { activeName, list, pushItem, removeItem, itemClick } = inject(tabsBarInjectionKey) || {};
281
- const active = computed(() => (activeName == null ? void 0 : activeName.value) === __props.name);
282
- const activeIndex = computed(() => list == null ? void 0 : list.value.findIndex((f2) => f2 === (activeName == null ? void 0 : activeName.value)));
283
- const currentIndex = computed(() => list == null ? void 0 : list.value.findIndex((f2) => f2 === __props.name));
284
- const showLine = computed(() => (activeIndex == null ? void 0 : activeIndex.value) !== (currentIndex == null ? void 0 : currentIndex.value) && ((activeIndex == null ? void 0 : activeIndex.value) ?? 0) - 1 !== (currentIndex == null ? void 0 : currentIndex.value));
285
- function onClose() {
286
- removeItem == null ? void 0 : removeItem(__props.name);
287
- emit("close");
288
- }
289
- function onClick(ev) {
290
- itemClick == null ? void 0 : itemClick(__props.name);
291
- emit("click", ev);
292
- }
293
- function onContextMenu(ev) {
294
- emit("contextmenu", ev);
295
- }
296
- onMounted(() => {
297
- pushItem == null ? void 0 : pushItem(__props.name);
298
- });
299
- return (_ctx, _cache) => {
300
- return openBlock(), createElementBlock("div", {
301
- class: normalizeClass(["uno-ubq14l group", [active.value ? "tab-active" : "", _ctx.disabled ? "uno-4y9yog" : ""]]),
302
- onClick,
303
- onContextmenu: onContextMenu
304
- }, [
305
- createElementVNode("div", {
306
- class: normalizeClass(["uno-qjxywp", active.value ? "" : "uno-epu25o"])
307
- }, [
308
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.loading ? _ctx.loadingRender : _ctx.icon))),
309
- createElementVNode("div", _hoisted_1$1, [
310
- renderSlot(_ctx.$slots, "default")
311
- ]),
312
- _ctx.closeable ? (openBlock(), createElementBlock("div", {
313
- key: 0,
314
- class: "uno-r1pbch",
315
- onClick: withModifiers(onClose, ["stop"])
316
- }, _cache[0] || (_cache[0] = [
317
- createElementVNode("i", { class: "uno-sjjwmq" }, null, -1)
318
- ]))) : createCommentVNode("", true)
319
- ], 2),
320
- createElementVNode("div", {
321
- class: normalizeClass(["uno-mzsdgg", active.value ? "uno-h6cmdc" : "uno-m6t4oj"])
322
- }, _cache[1] || (_cache[1] = [
323
- createStaticVNode('<svg width="10" height="10" class="uno-3sky1m"><path d="M 0 10 A 10 10 0 0 0 10 0 L 10 10 Z"></path></svg><div class="uno-nylnxp"></div><svg width="10" height="10" class="uno-3sky1m"><path d="M 0 0 A 10 10 0 0 0 10 10 L 0 10 Z"></path></svg>', 3)
324
- ]), 2),
325
- createElementVNode("div", {
326
- class: normalizeClass([showLine.value ? "uno-h6cmdc" : "uno-m6t4oj", "uno-wqscdb"])
327
- }, null, 2)
328
- ], 34);
329
- };
330
- }
331
- });
332
- var r = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, t = function(r2) {
333
- return "string" == typeof r2 ? r2.length > 0 : "number" == typeof r2;
334
- }, n = function(r2, t2, n2) {
335
- return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = Math.pow(10, t2)), Math.round(n2 * r2) / n2 + 0;
336
- }, e = function(r2, t2, n2) {
337
- return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = 1), r2 > n2 ? n2 : r2 > t2 ? r2 : t2;
338
- }, u = function(r2) {
339
- return (r2 = isFinite(r2) ? r2 % 360 : 0) > 0 ? r2 : r2 + 360;
340
- }, a = function(r2) {
341
- return { r: e(r2.r, 0, 255), g: e(r2.g, 0, 255), b: e(r2.b, 0, 255), a: e(r2.a) };
342
- }, o = function(r2) {
343
- return { r: n(r2.r), g: n(r2.g), b: n(r2.b), a: n(r2.a, 3) };
344
- }, i = /^#([0-9a-f]{3,8})$/i, s = function(r2) {
345
- var t2 = r2.toString(16);
346
- return t2.length < 2 ? "0" + t2 : t2;
347
- }, h = function(r2) {
348
- var t2 = r2.r, n2 = r2.g, e2 = r2.b, u2 = r2.a, a2 = Math.max(t2, n2, e2), o2 = a2 - Math.min(t2, n2, e2), i2 = o2 ? a2 === t2 ? (n2 - e2) / o2 : a2 === n2 ? 2 + (e2 - t2) / o2 : 4 + (t2 - n2) / o2 : 0;
349
- return { h: 60 * (i2 < 0 ? i2 + 6 : i2), s: a2 ? o2 / a2 * 100 : 0, v: a2 / 255 * 100, a: u2 };
350
- }, b = function(r2) {
351
- var t2 = r2.h, n2 = r2.s, e2 = r2.v, u2 = r2.a;
352
- t2 = t2 / 360 * 6, n2 /= 100, e2 /= 100;
353
- var a2 = Math.floor(t2), o2 = e2 * (1 - n2), i2 = e2 * (1 - (t2 - a2) * n2), s2 = e2 * (1 - (1 - t2 + a2) * n2), h2 = a2 % 6;
354
- return { r: 255 * [e2, i2, o2, o2, s2, e2][h2], g: 255 * [s2, e2, e2, i2, o2, o2][h2], b: 255 * [o2, o2, s2, e2, e2, i2][h2], a: u2 };
355
- }, g = function(r2) {
356
- return { h: u(r2.h), s: e(r2.s, 0, 100), l: e(r2.l, 0, 100), a: e(r2.a) };
357
- }, d = function(r2) {
358
- return { h: n(r2.h), s: n(r2.s), l: n(r2.l), a: n(r2.a, 3) };
359
- }, f = function(r2) {
360
- return b((n2 = (t2 = r2).s, { h: t2.h, s: (n2 *= ((e2 = t2.l) < 50 ? e2 : 100 - e2) / 100) > 0 ? 2 * n2 / (e2 + n2) * 100 : 0, v: e2 + n2, a: t2.a }));
361
- var t2, n2, e2;
362
- }, c = function(r2) {
363
- return { h: (t2 = h(r2)).h, s: (u2 = (200 - (n2 = t2.s)) * (e2 = t2.v) / 100) > 0 && u2 < 200 ? n2 * e2 / 100 / (u2 <= 100 ? u2 : 200 - u2) * 100 : 0, l: u2 / 2, a: t2.a };
364
- var t2, n2, e2, u2;
365
- }, l = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, p = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, v = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, m = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, y = { string: [[function(r2) {
366
- var t2 = i.exec(r2);
367
- return t2 ? (r2 = t2[1]).length <= 4 ? { r: parseInt(r2[0] + r2[0], 16), g: parseInt(r2[1] + r2[1], 16), b: parseInt(r2[2] + r2[2], 16), a: 4 === r2.length ? n(parseInt(r2[3] + r2[3], 16) / 255, 2) : 1 } : 6 === r2.length || 8 === r2.length ? { r: parseInt(r2.substr(0, 2), 16), g: parseInt(r2.substr(2, 2), 16), b: parseInt(r2.substr(4, 2), 16), a: 8 === r2.length ? n(parseInt(r2.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
368
- }, "hex"], [function(r2) {
369
- var t2 = v.exec(r2) || m.exec(r2);
370
- return t2 ? t2[2] !== t2[4] || t2[4] !== t2[6] ? null : a({ r: Number(t2[1]) / (t2[2] ? 100 / 255 : 1), g: Number(t2[3]) / (t2[4] ? 100 / 255 : 1), b: Number(t2[5]) / (t2[6] ? 100 / 255 : 1), a: void 0 === t2[7] ? 1 : Number(t2[7]) / (t2[8] ? 100 : 1) }) : null;
371
- }, "rgb"], [function(t2) {
372
- var n2 = l.exec(t2) || p.exec(t2);
373
- if (!n2) return null;
374
- var e2, u2, a2 = g({ h: (e2 = n2[1], u2 = n2[2], void 0 === u2 && (u2 = "deg"), Number(e2) * (r[u2] || 1)), s: Number(n2[3]), l: Number(n2[4]), a: void 0 === n2[5] ? 1 : Number(n2[5]) / (n2[6] ? 100 : 1) });
375
- return f(a2);
376
- }, "hsl"]], object: [[function(r2) {
377
- var n2 = r2.r, e2 = r2.g, u2 = r2.b, o2 = r2.a, i2 = void 0 === o2 ? 1 : o2;
378
- return t(n2) && t(e2) && t(u2) ? a({ r: Number(n2), g: Number(e2), b: Number(u2), a: Number(i2) }) : null;
379
- }, "rgb"], [function(r2) {
380
- var n2 = r2.h, e2 = r2.s, u2 = r2.l, a2 = r2.a, o2 = void 0 === a2 ? 1 : a2;
381
- if (!t(n2) || !t(e2) || !t(u2)) return null;
382
- var i2 = g({ h: Number(n2), s: Number(e2), l: Number(u2), a: Number(o2) });
383
- return f(i2);
384
- }, "hsl"], [function(r2) {
385
- var n2 = r2.h, a2 = r2.s, o2 = r2.v, i2 = r2.a, s2 = void 0 === i2 ? 1 : i2;
386
- if (!t(n2) || !t(a2) || !t(o2)) return null;
387
- var h2 = function(r3) {
388
- return { h: u(r3.h), s: e(r3.s, 0, 100), v: e(r3.v, 0, 100), a: e(r3.a) };
389
- }({ h: Number(n2), s: Number(a2), v: Number(o2), a: Number(s2) });
390
- return b(h2);
391
- }, "hsv"]] }, N = function(r2, t2) {
392
- for (var n2 = 0; n2 < t2.length; n2++) {
393
- var e2 = t2[n2][0](r2);
394
- if (e2) return [e2, t2[n2][1]];
923
+ var Gt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, A = function(e) {
924
+ return typeof e == "string" ? e.length > 0 : typeof e == "number";
925
+ }, y = function(e, t, n) {
926
+ return t === void 0 && (t = 0), n === void 0 && (n = Math.pow(10, t)), Math.round(n * e) / n + 0;
927
+ }, N = function(e, t, n) {
928
+ return t === void 0 && (t = 0), n === void 0 && (n = 1), e > n ? n : e > t ? e : t;
929
+ }, _e = function(e) {
930
+ return (e = isFinite(e) ? e % 360 : 0) > 0 ? e : e + 360;
931
+ }, he = function(e) {
932
+ return { r: N(e.r, 0, 255), g: N(e.g, 0, 255), b: N(e.b, 0, 255), a: N(e.a) };
933
+ }, K = function(e) {
934
+ return { r: y(e.r), g: y(e.g), b: y(e.b), a: y(e.a, 3) };
935
+ }, Zt = /^#([0-9a-f]{3,8})$/i, F = function(e) {
936
+ var t = e.toString(16);
937
+ return t.length < 2 ? "0" + t : t;
938
+ }, Ae = function(e) {
939
+ var t = e.r, n = e.g, o = e.b, r = e.a, i = Math.max(t, n, o), s = i - Math.min(t, n, o), u = s ? i === t ? (n - o) / s : i === n ? 2 + (o - t) / s : 4 + (t - n) / s : 0;
940
+ return { h: 60 * (u < 0 ? u + 6 : u), s: i ? s / i * 100 : 0, v: i / 255 * 100, a: r };
941
+ }, Re = function(e) {
942
+ var t = e.h, n = e.s, o = e.v, r = e.a;
943
+ t = t / 360 * 6, n /= 100, o /= 100;
944
+ var i = Math.floor(t), s = o * (1 - n), u = o * (1 - (t - i) * n), f = o * (1 - (1 - t + i) * n), c = i % 6;
945
+ return { r: 255 * [o, u, s, s, f, o][c], g: 255 * [f, o, o, u, s, s][c], b: 255 * [s, s, f, o, o, u][c], a: r };
946
+ }, me = function(e) {
947
+ return { h: _e(e.h), s: N(e.s, 0, 100), l: N(e.l, 0, 100), a: N(e.a) };
948
+ }, pe = function(e) {
949
+ return { h: y(e.h), s: y(e.s), l: y(e.l), a: y(e.a, 3) };
950
+ }, ve = function(e) {
951
+ return Re((n = (t = e).s, { h: t.h, s: (n *= ((o = t.l) < 50 ? o : 100 - o) / 100) > 0 ? 2 * n / (o + n) * 100 : 0, v: o + n, a: t.a }));
952
+ var t, n, o;
953
+ }, z = function(e) {
954
+ return { h: (t = Ae(e)).h, s: (r = (200 - (n = t.s)) * (o = t.v) / 100) > 0 && r < 200 ? n * o / 100 / (r <= 100 ? r : 200 - r) * 100 : 0, l: r / 2, a: t.a };
955
+ var t, n, o, r;
956
+ }, Ut = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Kt = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Yt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Jt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, be = { string: [[function(e) {
957
+ var t = Zt.exec(e);
958
+ return t ? (e = t[1]).length <= 4 ? { r: parseInt(e[0] + e[0], 16), g: parseInt(e[1] + e[1], 16), b: parseInt(e[2] + e[2], 16), a: e.length === 4 ? y(parseInt(e[3] + e[3], 16) / 255, 2) : 1 } : e.length === 6 || e.length === 8 ? { r: parseInt(e.substr(0, 2), 16), g: parseInt(e.substr(2, 2), 16), b: parseInt(e.substr(4, 2), 16), a: e.length === 8 ? y(parseInt(e.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
959
+ }, "hex"], [function(e) {
960
+ var t = Yt.exec(e) || Jt.exec(e);
961
+ return t ? t[2] !== t[4] || t[4] !== t[6] ? null : he({ r: Number(t[1]) / (t[2] ? 100 / 255 : 1), g: Number(t[3]) / (t[4] ? 100 / 255 : 1), b: Number(t[5]) / (t[6] ? 100 / 255 : 1), a: t[7] === void 0 ? 1 : Number(t[7]) / (t[8] ? 100 : 1) }) : null;
962
+ }, "rgb"], [function(e) {
963
+ var t = Ut.exec(e) || Kt.exec(e);
964
+ if (!t) return null;
965
+ var n, o, r = me({ h: (n = t[1], o = t[2], o === void 0 && (o = "deg"), Number(n) * (Gt[o] || 1)), s: Number(t[3]), l: Number(t[4]), a: t[5] === void 0 ? 1 : Number(t[5]) / (t[6] ? 100 : 1) });
966
+ return ve(r);
967
+ }, "hsl"]], object: [[function(e) {
968
+ var t = e.r, n = e.g, o = e.b, r = e.a, i = r === void 0 ? 1 : r;
969
+ return A(t) && A(n) && A(o) ? he({ r: Number(t), g: Number(n), b: Number(o), a: Number(i) }) : null;
970
+ }, "rgb"], [function(e) {
971
+ var t = e.h, n = e.s, o = e.l, r = e.a, i = r === void 0 ? 1 : r;
972
+ if (!A(t) || !A(n) || !A(o)) return null;
973
+ var s = me({ h: Number(t), s: Number(n), l: Number(o), a: Number(i) });
974
+ return ve(s);
975
+ }, "hsl"], [function(e) {
976
+ var t = e.h, n = e.s, o = e.v, r = e.a, i = r === void 0 ? 1 : r;
977
+ if (!A(t) || !A(n) || !A(o)) return null;
978
+ var s = function(u) {
979
+ return { h: _e(u.h), s: N(u.s, 0, 100), v: N(u.v, 0, 100), a: N(u.a) };
980
+ }({ h: Number(t), s: Number(n), v: Number(o), a: Number(i) });
981
+ return Re(s);
982
+ }, "hsv"]] }, ge = function(e, t) {
983
+ for (var n = 0; n < t.length; n++) {
984
+ var o = t[n][0](e);
985
+ if (o) return [o, t[n][1]];
395
986
  }
396
987
  return [null, void 0];
397
- }, x = function(r2) {
398
- return "string" == typeof r2 ? N(r2.trim(), y.string) : "object" == typeof r2 && null !== r2 ? N(r2, y.object) : [null, void 0];
399
- }, M = function(r2, t2) {
400
- var n2 = c(r2);
401
- return { h: n2.h, s: e(n2.s + 100 * t2, 0, 100), l: n2.l, a: n2.a };
402
- }, H = function(r2) {
403
- return (299 * r2.r + 587 * r2.g + 114 * r2.b) / 1e3 / 255;
404
- }, $ = function(r2, t2) {
405
- var n2 = c(r2);
406
- return { h: n2.h, s: n2.s, l: e(n2.l + 100 * t2, 0, 100), a: n2.a };
407
- }, j = function() {
408
- function r2(r3) {
409
- this.parsed = x(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
988
+ }, Qt = function(e) {
989
+ return typeof e == "string" ? ge(e.trim(), be.string) : typeof e == "object" && e !== null ? ge(e, be.object) : [null, void 0];
990
+ }, Y = function(e, t) {
991
+ var n = z(e);
992
+ return { h: n.h, s: N(n.s + 100 * t, 0, 100), l: n.l, a: n.a };
993
+ }, J = function(e) {
994
+ return (299 * e.r + 587 * e.g + 114 * e.b) / 1e3 / 255;
995
+ }, xe = function(e, t) {
996
+ var n = z(e);
997
+ return { h: n.h, s: n.s, l: N(n.l + 100 * t, 0, 100), a: n.a };
998
+ }, ye = function() {
999
+ function e(t) {
1000
+ this.parsed = Qt(t)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
410
1001
  }
411
- return r2.prototype.isValid = function() {
412
- return null !== this.parsed;
413
- }, r2.prototype.brightness = function() {
414
- return n(H(this.rgba), 2);
415
- }, r2.prototype.isDark = function() {
416
- return H(this.rgba) < 0.5;
417
- }, r2.prototype.isLight = function() {
418
- return H(this.rgba) >= 0.5;
419
- }, r2.prototype.toHex = function() {
420
- return r3 = o(this.rgba), t2 = r3.r, e2 = r3.g, u2 = r3.b, i2 = (a2 = r3.a) < 1 ? s(n(255 * a2)) : "", "#" + s(t2) + s(e2) + s(u2) + i2;
421
- var r3, t2, e2, u2, a2, i2;
422
- }, r2.prototype.toRgb = function() {
423
- return o(this.rgba);
424
- }, r2.prototype.toRgbString = function() {
425
- return r3 = o(this.rgba), t2 = r3.r, n2 = r3.g, e2 = r3.b, (u2 = r3.a) < 1 ? "rgba(" + t2 + ", " + n2 + ", " + e2 + ", " + u2 + ")" : "rgb(" + t2 + ", " + n2 + ", " + e2 + ")";
426
- var r3, t2, n2, e2, u2;
427
- }, r2.prototype.toHsl = function() {
428
- return d(c(this.rgba));
429
- }, r2.prototype.toHslString = function() {
430
- return r3 = d(c(this.rgba)), t2 = r3.h, n2 = r3.s, e2 = r3.l, (u2 = r3.a) < 1 ? "hsla(" + t2 + ", " + n2 + "%, " + e2 + "%, " + u2 + ")" : "hsl(" + t2 + ", " + n2 + "%, " + e2 + "%)";
431
- var r3, t2, n2, e2, u2;
432
- }, r2.prototype.toHsv = function() {
433
- return r3 = h(this.rgba), { h: n(r3.h), s: n(r3.s), v: n(r3.v), a: n(r3.a, 3) };
434
- var r3;
435
- }, r2.prototype.invert = function() {
436
- return w({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a });
437
- var r3;
438
- }, r2.prototype.saturate = function(r3) {
439
- return void 0 === r3 && (r3 = 0.1), w(M(this.rgba, r3));
440
- }, r2.prototype.desaturate = function(r3) {
441
- return void 0 === r3 && (r3 = 0.1), w(M(this.rgba, -r3));
442
- }, r2.prototype.grayscale = function() {
443
- return w(M(this.rgba, -1));
444
- }, r2.prototype.lighten = function(r3) {
445
- return void 0 === r3 && (r3 = 0.1), w($(this.rgba, r3));
446
- }, r2.prototype.darken = function(r3) {
447
- return void 0 === r3 && (r3 = 0.1), w($(this.rgba, -r3));
448
- }, r2.prototype.rotate = function(r3) {
449
- return void 0 === r3 && (r3 = 15), this.hue(this.hue() + r3);
450
- }, r2.prototype.alpha = function(r3) {
451
- return "number" == typeof r3 ? w({ r: (t2 = this.rgba).r, g: t2.g, b: t2.b, a: r3 }) : n(this.rgba.a, 3);
452
- var t2;
453
- }, r2.prototype.hue = function(r3) {
454
- var t2 = c(this.rgba);
455
- return "number" == typeof r3 ? w({ h: r3, s: t2.s, l: t2.l, a: t2.a }) : n(t2.h);
456
- }, r2.prototype.isEqual = function(r3) {
457
- return this.toHex() === w(r3).toHex();
458
- }, r2;
459
- }(), w = function(r2) {
460
- return r2 instanceof j ? r2 : new j(r2);
1002
+ return e.prototype.isValid = function() {
1003
+ return this.parsed !== null;
1004
+ }, e.prototype.brightness = function() {
1005
+ return y(J(this.rgba), 2);
1006
+ }, e.prototype.isDark = function() {
1007
+ return J(this.rgba) < 0.5;
1008
+ }, e.prototype.isLight = function() {
1009
+ return J(this.rgba) >= 0.5;
1010
+ }, e.prototype.toHex = function() {
1011
+ return t = K(this.rgba), n = t.r, o = t.g, r = t.b, s = (i = t.a) < 1 ? F(y(255 * i)) : "", "#" + F(n) + F(o) + F(r) + s;
1012
+ var t, n, o, r, i, s;
1013
+ }, e.prototype.toRgb = function() {
1014
+ return K(this.rgba);
1015
+ }, e.prototype.toRgbString = function() {
1016
+ return t = K(this.rgba), n = t.r, o = t.g, r = t.b, (i = t.a) < 1 ? "rgba(" + n + ", " + o + ", " + r + ", " + i + ")" : "rgb(" + n + ", " + o + ", " + r + ")";
1017
+ var t, n, o, r, i;
1018
+ }, e.prototype.toHsl = function() {
1019
+ return pe(z(this.rgba));
1020
+ }, e.prototype.toHslString = function() {
1021
+ return t = pe(z(this.rgba)), n = t.h, o = t.s, r = t.l, (i = t.a) < 1 ? "hsla(" + n + ", " + o + "%, " + r + "%, " + i + ")" : "hsl(" + n + ", " + o + "%, " + r + "%)";
1022
+ var t, n, o, r, i;
1023
+ }, e.prototype.toHsv = function() {
1024
+ return t = Ae(this.rgba), { h: y(t.h), s: y(t.s), v: y(t.v), a: y(t.a, 3) };
1025
+ var t;
1026
+ }, e.prototype.invert = function() {
1027
+ return I({ r: 255 - (t = this.rgba).r, g: 255 - t.g, b: 255 - t.b, a: t.a });
1028
+ var t;
1029
+ }, e.prototype.saturate = function(t) {
1030
+ return t === void 0 && (t = 0.1), I(Y(this.rgba, t));
1031
+ }, e.prototype.desaturate = function(t) {
1032
+ return t === void 0 && (t = 0.1), I(Y(this.rgba, -t));
1033
+ }, e.prototype.grayscale = function() {
1034
+ return I(Y(this.rgba, -1));
1035
+ }, e.prototype.lighten = function(t) {
1036
+ return t === void 0 && (t = 0.1), I(xe(this.rgba, t));
1037
+ }, e.prototype.darken = function(t) {
1038
+ return t === void 0 && (t = 0.1), I(xe(this.rgba, -t));
1039
+ }, e.prototype.rotate = function(t) {
1040
+ return t === void 0 && (t = 15), this.hue(this.hue() + t);
1041
+ }, e.prototype.alpha = function(t) {
1042
+ return typeof t == "number" ? I({ r: (n = this.rgba).r, g: n.g, b: n.b, a: t }) : y(this.rgba.a, 3);
1043
+ var n;
1044
+ }, e.prototype.hue = function(t) {
1045
+ var n = z(this.rgba);
1046
+ return typeof t == "number" ? I({ h: t, s: n.s, l: n.l, a: n.a }) : y(n.h);
1047
+ }, e.prototype.isEqual = function(t) {
1048
+ return this.toHex() === I(t).toHex();
1049
+ }, e;
1050
+ }(), I = function(e) {
1051
+ return e instanceof ye ? e : new ye(e);
1052
+ };
1053
+ const Xt = {
1054
+ name: "RiAddLine"
1055
+ }, en = {
1056
+ xmlns: "http://www.w3.org/2000/svg",
1057
+ width: "1em",
1058
+ height: "1em",
1059
+ viewBox: "0 0 24 24"
461
1060
  };
462
- const _hoisted_1 = { class: "uno-5zyl8j" };
463
- const _hoisted_2 = { class: "uno-ov60i3" };
464
- const _sfc_main = /* @__PURE__ */ defineComponent({
1061
+ function tn(e, t, n, o, r, i) {
1062
+ return E(), _("svg", en, t[0] || (t[0] = [
1063
+ k("path", {
1064
+ fill: "#757575",
1065
+ d: "M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"
1066
+ }, null, -1)
1067
+ ]));
1068
+ }
1069
+ const nn = /* @__PURE__ */ Z(Xt, [["render", tn]]), on = {
1070
+ name: "RiArrowDropDownLine"
1071
+ }, rn = {
1072
+ xmlns: "http://www.w3.org/2000/svg",
1073
+ width: "1em",
1074
+ height: "1em",
1075
+ viewBox: "0 0 24 24"
1076
+ };
1077
+ function sn(e, t, n, o, r, i) {
1078
+ return E(), _("svg", rn, t[0] || (t[0] = [
1079
+ k("path", {
1080
+ fill: "#757575",
1081
+ d: "m12 15l-4.243-4.242l1.415-1.414L12 12.172l2.828-2.828l1.415 1.414z"
1082
+ }, null, -1)
1083
+ ]));
1084
+ }
1085
+ const un = /* @__PURE__ */ Z(on, [["render", sn]]), an = /* @__PURE__ */ $e({
465
1086
  __name: "Tabs",
466
- props: /* @__PURE__ */ mergeModels({
467
- backgroundColor: { default: "#E5E7EB" },
468
- activeBackgroundColor: { default: "#fff" },
469
- primaryColor: { default: "rgba(251,191,36,1)" }
1087
+ props: /* @__PURE__ */ se({
1088
+ colors: {},
1089
+ dropdown: { type: Boolean },
1090
+ addable: { type: Boolean },
1091
+ options: {}
470
1092
  }, {
471
- "value": {},
472
- "valueModifiers": {}
1093
+ value: {},
1094
+ valueModifiers: {}
473
1095
  }),
474
- emits: /* @__PURE__ */ mergeModels(["close"], ["update:value"]),
475
- setup(__props, { emit: __emit }) {
476
- const emit = __emit;
477
- const value = useModel(__props, "value");
478
- const { scrollRef, scrollToView } = useScrollView({ activeClassName: ".tab-active" });
479
- watch(value, () => {
480
- scrollToView();
1096
+ emits: /* @__PURE__ */ se(["click", "contextmenu", "close", "add"], ["update:value"]),
1097
+ setup(e, { emit: t }) {
1098
+ const n = t;
1099
+ gt("n-chrome-tabs", $t());
1100
+ const { background: o = "#E5E7EB", active: r = "#fff", primary: i = "rgba(251,191,36,1)" } = e.colors ?? {}, s = De(e, "value"), u = M(() => e.options?.findIndex((h) => h.key === s.value)), { scrollRef: f, scrollToView: c } = qt({ activeClassName: `.${w}--active`, direction: "horizontal" });
1101
+ O(s, () => {
1102
+ c();
1103
+ }, {
1104
+ immediate: !0
481
1105
  });
482
- const list = ref([]);
483
- const activeName = computed(() => list.value.find((f2) => f2 === value.value));
484
- provide(tabsBarInjectionKey, {
485
- list,
486
- activeName,
487
- pushItem(name) {
488
- list.value.push(name);
489
- },
490
- removeItem(name) {
491
- emit("close", name);
492
- nextTick(() => {
493
- scrollToView();
494
- });
495
- },
496
- itemClick(name) {
497
- value.value = name;
498
- }
499
- });
500
- const backgroundColorDark = computed(() => w(__props.backgroundColor).darken(0.8).toHex());
501
- const activeBackgroundColorDark = computed(() => w(__props.activeBackgroundColor).darken(0.8).toHex());
502
- const primaryColorDark = computed(() => w(__props.primaryColor).darken(0.3).toHex());
503
- return (_ctx, _cache) => {
504
- return openBlock(), createElementBlock("div", {
505
- class: "uno-f9asjx",
506
- style: normalizeStyle({
507
- "--tabs-bar-background-color": `${_ctx.backgroundColor}`,
508
- "--tabs-bar-background-color-dark": `${backgroundColorDark.value}`,
509
- "--tabs-bar-active-background-color": `${_ctx.activeBackgroundColor}`,
510
- "--tabs-bar-active-background-color-dark": `${activeBackgroundColorDark.value}`,
511
- "--tabs-bar-primary-color": `${_ctx.primaryColor}`,
512
- "--tabs-bar-primary-color-dark": `${primaryColorDark.value}`
513
- })
1106
+ const d = M(() => I(o).darken(0.9).toHex()), a = M(() => I(r).darken(0.8).toHex()), v = M(() => I(i).darken(0.3).toHex());
1107
+ function S(h) {
1108
+ n("click", h);
1109
+ }
1110
+ function l(h) {
1111
+ n("contextmenu", h);
1112
+ }
1113
+ function p(h) {
1114
+ n("close", h);
1115
+ }
1116
+ return (h, m) => (E(), _("div", {
1117
+ class: C([b(P)]),
1118
+ style: Ve({
1119
+ "--background-color": `${b(o)}`,
1120
+ "--background-color-dark": `${d.value}`,
1121
+ "--active-background-color": `${b(r)}`,
1122
+ "--active-background-color-dark": `${a.value}`,
1123
+ "--primary-color": `${b(i)}`,
1124
+ "--primary-color-dark": `${v.value}`
1125
+ })
1126
+ }, [
1127
+ h.dropdown ? (E(), _("div", {
1128
+ key: 0,
1129
+ class: C([`${b(P)}__icon`])
514
1130
  }, [
515
- createElementVNode("div", _hoisted_1, [
516
- createElementVNode("div", _hoisted_2, [
517
- renderSlot(_ctx.$slots, "prefix", {}, () => [
518
- _cache[0] || (_cache[0] = createElementVNode("div", { class: "uno-kq7run" }, [
519
- createElementVNode("i", { class: "i-ri-arrow-down-s-line" })
520
- ], -1))
521
- ])
1131
+ q(un)
1132
+ ], 2)) : Q("", !0),
1133
+ ue(h.$slots, "prefix"),
1134
+ k("div", {
1135
+ ref_key: "scrollRef",
1136
+ ref: f,
1137
+ class: C([`${b(P)}__content`])
1138
+ }, [
1139
+ q(We, {
1140
+ name: "group",
1141
+ tag: "div",
1142
+ class: C([`${b(P)}__scroll`])
1143
+ }, {
1144
+ default: He(() => [
1145
+ (E(!0), _(Fe, null, qe(h.options, ({ key: $, ...T }, L) => (E(), X(_t, Ge({ key: $ }, { ref_for: !0 }, T, {
1146
+ index: L,
1147
+ "active-index": u.value,
1148
+ onItemClick: (D) => S($),
1149
+ onItemContextmenu: (D) => l($),
1150
+ onItemClose: (D) => p($)
1151
+ }), null, 16, ["index", "active-index", "onItemClick", "onItemContextmenu", "onItemClose"]))), 128))
522
1152
  ]),
523
- createElementVNode("div", {
524
- ref_key: "scrollRef",
525
- ref: scrollRef,
526
- class: "uno-23n4xq"
527
- }, [
528
- createVNode(TransitionGroup, {
529
- name: "group",
530
- tag: "div",
531
- class: "uno-r0jwks"
532
- }, {
533
- default: withCtx(() => [
534
- renderSlot(_ctx.$slots, "default")
535
- ]),
536
- _: 3
537
- })
538
- ], 512),
539
- renderSlot(_ctx.$slots, "suffix")
540
- ]),
541
- _cache[1] || (_cache[1] = createElementVNode("div", { class: "uno-kfa0e9" }, null, -1))
542
- ], 4);
543
- };
1153
+ _: 1
1154
+ }, 8, ["class"])
1155
+ ], 2),
1156
+ ue(h.$slots, "suffix"),
1157
+ h.addable ? (E(), _("div", {
1158
+ key: 1,
1159
+ class: C([`${b(P)}__icon`]),
1160
+ onClick: m[0] || (m[0] = ($) => n("add"))
1161
+ }, [
1162
+ q(nn)
1163
+ ], 2)) : Q("", !0)
1164
+ ], 6));
544
1165
  }
545
1166
  });
546
- const tabsBarInjectionKey = useInjectionKey("tabs-bar-injection-key");
547
1167
  export {
548
- _sfc_main$1 as CTabItem,
549
- _sfc_main as CTabs,
550
- tabsBarInjectionKey
1168
+ _t as CTabItem,
1169
+ an as CTabs
551
1170
  };