@vezham/react 0.4.3 → 26.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2123 +0,0 @@
1
- function ie(o) {
2
- return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
3
- }
4
- var kr = (o) => o ? "" : void 0, _r = process.env.NODE_ENV !== "production";
5
- process.env.NODE_ENV;
6
- function N(o) {
7
- return Array.isArray(o);
8
- }
9
- function ge(o) {
10
- return N(o) && o.length === 0;
11
- }
12
- function R(o) {
13
- const c = typeof o;
14
- return o != null && (c === "object" || c === "function") && !N(o);
15
- }
16
- function pe(o) {
17
- return R(o) && Object.keys(o).length === 0;
18
- }
19
- function zr(o) {
20
- return N(o) ? ge(o) : R(o) ? pe(o) : o == null || o === "";
21
- }
22
- function Fr(o) {
23
- return typeof o == "function";
24
- }
25
- var Ar = (o) => o ? "true" : void 0;
26
- function le(o) {
27
- var c, l, p = "";
28
- if (typeof o == "string" || typeof o == "number")
29
- p += o;
30
- else if (typeof o == "object")
31
- if (Array.isArray(o))
32
- for (c = 0; c < o.length; c++)
33
- o[c] && (l = le(o[c])) && (p && (p += " "), p += l);
34
- else
35
- for (c in o)
36
- o[c] && (p && (p += " "), p += c);
37
- return p;
38
- }
39
- function be(...o) {
40
- for (var c = 0, l, p, e = ""; c < o.length; )
41
- (l = o[c++]) && (p = le(l)) && (e && (e += " "), e += p);
42
- return e;
43
- }
44
- var Er = (o, c) => R(o) ? o instanceof Array ? [...o] : o[c] : o;
45
- function Mr(o) {
46
- const c = Object.assign({}, o);
47
- for (let l in c)
48
- c[l] === void 0 && delete c[l];
49
- return c;
50
- }
51
- var me = (o) => o?.length <= 4 ? o : o?.slice(0, 3), Or = (o) => {
52
- const c = o?.trim().split(/[\s\-_.]+/).filter(Boolean).map((l) => l.charAt(0).toUpperCase()).join("") || "";
53
- return me(c);
54
- }, jr = (...o) => {
55
- let c = " ";
56
- for (const l of o)
57
- if (typeof l == "string" && l.length > 0) {
58
- c = l;
59
- break;
60
- }
61
- return c;
62
- }, $r = (o) => o ? o.charAt(0).toUpperCase() + o.slice(1).toLowerCase() : "";
63
- function Cr(...o) {
64
- return function(l) {
65
- o.some((p) => (p?.(l), l?.defaultPrevented));
66
- };
67
- }
68
- function Dr(o) {
69
- return `${o}-${Math.floor(Math.random() * 1e6)}`;
70
- }
71
- function Tr(o) {
72
- for (const c in o)
73
- c.startsWith("on") && delete o[c];
74
- return o;
75
- }
76
- function Lr(o) {
77
- if (!o || typeof o != "object")
78
- return "";
79
- try {
80
- return JSON.stringify(o);
81
- } catch {
82
- return "";
83
- }
84
- }
85
- function qr(o, c = 0) {
86
- let l;
87
- return function(...p) {
88
- const e = () => {
89
- l = void 0, o.apply(this, p);
90
- };
91
- l !== void 0 && clearTimeout(l), l = setTimeout(e, c);
92
- };
93
- }
94
- var ye = (o, c) => {
95
- const l = Object.assign({}, o);
96
- return c.forEach((p) => {
97
- delete l[p];
98
- }), l;
99
- }, ve = (o) => o.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), we = (o, c) => Object.fromEntries(
100
- Object.entries(o).map(([l, p]) => [c(p, l), p])
101
- );
102
- function Sr(o, c) {
103
- const l = c - o + 1;
104
- return Array.from({ length: l }, (p, e) => e + o);
105
- }
106
- function Ur(o, c, l) {
107
- return Math.min(Math.max(o, c), l);
108
- }
109
- function Ir(o, c = 100) {
110
- return Math.min(Math.max(o, 0), c);
111
- }
112
- var K = {};
113
- function Nr(o, c, ...l) {
114
- const e = `[Hero UI]${c ? ` [${c}]` : " "}: ${o}`;
115
- if (!(typeof console > "u") && !K[e] && (K[e] = !0, process.env.NODE_ENV !== "production"))
116
- return console.warn(e, l);
117
- }
118
- function Rr(o) {
119
- switch (o) {
120
- case "buddhist":
121
- return 543;
122
- case "ethiopic":
123
- case "ethioaa":
124
- return -8;
125
- case "coptic":
126
- return -284;
127
- case "hebrew":
128
- return 3760;
129
- case "indian":
130
- return -78;
131
- case "islamic-civil":
132
- case "islamic-tbla":
133
- case "islamic-umalqura":
134
- return -579;
135
- case "persian":
136
- return -600;
137
- case "roc":
138
- case "japanese":
139
- case "gregory":
140
- default:
141
- return 0;
142
- }
143
- }
144
- var Pr = (o) => /(^|\W)[0-9](\W|$)/.test(o) && !/[^\d\^$\[\]\(\)\*\+\-\.\|]/.test(o);
145
- function xe(...o) {
146
- return (...c) => {
147
- for (let l of o)
148
- typeof l == "function" && l(...c);
149
- };
150
- }
151
- var B = /* @__PURE__ */ new Map();
152
- function ke(o, c) {
153
- if (o === c)
154
- return o;
155
- let l = B.get(o);
156
- if (l)
157
- return l.forEach((e) => e.current = c), c;
158
- let p = B.get(c);
159
- return p ? (p.forEach((e) => e.current = o), o) : c;
160
- }
161
- function Vr(...o) {
162
- let c = { ...o[0] };
163
- for (let l = 1; l < o.length; l++) {
164
- let p = o[l];
165
- for (let e in p) {
166
- let t = c[e], n = p[e];
167
- typeof t == "function" && typeof n == "function" && // This is a lot faster than a regex.
168
- e[0] === "o" && e[1] === "n" && e.charCodeAt(2) >= /* 'A' */
169
- 65 && e.charCodeAt(2) <= /* 'Z' */
170
- 90 ? c[e] = xe(t, n) : (e === "className" || e === "UNSAFE_className") && typeof t == "string" && typeof n == "string" ? c[e] = be(t, n) : e === "id" && t && n ? c.id = ke(t, n) : c[e] = n !== void 0 ? n : t;
171
- }
172
- }
173
- return c;
174
- }
175
- function Kr(...o) {
176
- return o.length === 1 && o[0] ? o[0] : (c) => {
177
- let l = !1;
178
- const p = o.map((e) => {
179
- const t = H(e, c);
180
- return l || (l = typeof t == "function"), t;
181
- });
182
- if (l)
183
- return () => {
184
- p.forEach((e, t) => {
185
- typeof e == "function" ? e?.() : H(o[t], null);
186
- });
187
- };
188
- };
189
- }
190
- function H(o, c) {
191
- if (typeof o == "function")
192
- return () => o(c);
193
- o != null && "current" in o && (o.current = c);
194
- }
195
- var _e = {
196
- /** Animation Utilities */
197
- ".spinner-bar-animation": {
198
- animation: "fade-out 1.2s linear infinite",
199
- "animation-delay": "calc(-1.2s + (0.1s * var(--bar-index)))",
200
- transform: "rotate(calc(30deg * var(--bar-index))) translate(140%)"
201
- },
202
- ".spinner-dot-animation": {
203
- "animation-delay": "calc(250ms * var(--dot-index))"
204
- },
205
- ".spinner-dot-blink-animation": {
206
- "animation-delay": "calc(200ms * var(--dot-index))"
207
- }
208
- }, ze = {
209
- /**
210
- * Custom utilities
211
- */
212
- ".leading-inherit": {
213
- "line-height": "inherit"
214
- },
215
- ".bg-img-inherit": {
216
- "background-image": "inherit"
217
- },
218
- ".bg-clip-inherit": {
219
- "background-clip": "inherit"
220
- },
221
- ".text-fill-inherit": {
222
- "-webkit-text-fill-color": "inherit"
223
- },
224
- ".tap-highlight-transparent": {
225
- "-webkit-tap-highlight-color": "transparent"
226
- },
227
- ".input-search-cancel-button-none": {
228
- "&::-webkit-search-cancel-button": {
229
- "-webkit-appearance": "none"
230
- }
231
- }
232
- }, Fe = {
233
- /**
234
- * Scroll Hide
235
- */
236
- ".scrollbar-hide": {
237
- /* IE and Edge */
238
- "-ms-overflow-style": "none",
239
- /* Firefox */
240
- "scrollbar-width": "none",
241
- /* Safari and Chrome */
242
- "&::-webkit-scrollbar": {
243
- display: "none"
244
- }
245
- },
246
- ".scrollbar-default": {
247
- /* IE and Edge */
248
- "-ms-overflow-style": "auto",
249
- /* Firefox */
250
- "scrollbar-width": "auto",
251
- /* Safari and Chrome */
252
- "&::-webkit-scrollbar": {
253
- display: "block"
254
- }
255
- }
256
- }, Ae = {
257
- /**
258
- * Text utilities
259
- */
260
- ".text-tiny": {
261
- "font-size": "var(--heroui-font-size-tiny)",
262
- "line-height": "var(--heroui-line-height-tiny)"
263
- },
264
- ".text-small": {
265
- "font-size": "var(--heroui-font-size-small)",
266
- "line-height": "var(--heroui-line-height-small)"
267
- },
268
- ".text-medium": {
269
- "font-size": "var(--heroui-font-size-medium)",
270
- "line-height": "var(--heroui-line-height-medium)"
271
- },
272
- ".text-large": {
273
- "font-size": "var(--heroui-font-size-large)",
274
- "line-height": "var(--heroui-line-height-large)"
275
- }
276
- }, _ = "250ms", Ee = {
277
- /**
278
- * Transition utilities
279
- */
280
- ".transition-background": {
281
- "transition-property": "background",
282
- "transition-timing-function": "ease",
283
- "transition-duration": _
284
- },
285
- ".transition-colors-opacity": {
286
- "transition-property": "color, background-color, border-color, text-decoration-color, fill, stroke, opacity",
287
- "transition-timing-function": "ease",
288
- "transition-duration": _
289
- },
290
- ".transition-width": {
291
- "transition-property": "width",
292
- "transition-timing-function": "ease",
293
- "transition-duration": _
294
- },
295
- ".transition-height": {
296
- "transition-property": "height",
297
- "transition-timing-function": "ease",
298
- "transition-duration": _
299
- },
300
- ".transition-size": {
301
- "transition-property": "width, height",
302
- "transition-timing-function": "ease",
303
- "transition-duration": _
304
- },
305
- ".transition-left": {
306
- "transition-property": "left",
307
- "transition-timing-function": "ease",
308
- "transition-duration": _
309
- },
310
- ".transition-transform-opacity": {
311
- "transition-property": "transform, scale, opacity rotate",
312
- "transition-timing-function": "ease",
313
- "transition-duration": _
314
- },
315
- ".transition-transform-background": {
316
- "transition-property": "transform, scale, background",
317
- "transition-timing-function": "ease",
318
- "transition-duration": _
319
- },
320
- ".transition-transform-colors": {
321
- "transition-property": "transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke",
322
- "transition-timing-function": "ease",
323
- "transition-duration": _
324
- },
325
- ".transition-transform-colors-opacity": {
326
- "transition-property": "transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke, opacity",
327
- "transition-timing-function": "ease",
328
- "transition-duration": _
329
- }
330
- }, Me = {
331
- ...ze,
332
- ...Ee,
333
- ...Fe,
334
- ...Ae,
335
- ..._e
336
- }, Oe = (o) => ({
337
- color: `hsl(var(--${o}-foreground))`,
338
- backgroundColor: `hsl(var(--${o}-background))`
339
- }), Br = [
340
- "focus-visible:z-10",
341
- "focus-visible:outline-2",
342
- "focus-visible:outline-focus",
343
- "focus-visible:outline-offset-2"
344
- ], Hr = [
345
- "outline-solid outline-transparent",
346
- "data-[focus-visible=true]:z-10",
347
- "data-[focus-visible=true]:outline-2",
348
- "data-[focus-visible=true]:outline-focus",
349
- "data-[focus-visible=true]:outline-offset-2"
350
- ], Wr = [
351
- "outline-solid outline-transparent",
352
- "group-data-[focus-visible=true]:z-10",
353
- "group-data-[focus-visible=true]:ring-2",
354
- "group-data-[focus-visible=true]:ring-focus",
355
- "group-data-[focus-visible=true]:ring-offset-2",
356
- "group-data-[focus-visible=true]:ring-offset-background"
357
- ], Xr = [
358
- "outline-solid outline-transparent",
359
- "ring-2",
360
- "ring-focus",
361
- "ring-offset-2",
362
- "ring-offset-background"
363
- ], Gr = [
364
- "absolute",
365
- "top-1/2",
366
- "left-1/2",
367
- "-translate-x-1/2",
368
- "-translate-y-1/2"
369
- ], Jr = ["absolute", "inset-0"], Zr = {
370
- default: ["[&+.border-medium.border-default]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],
371
- primary: ["[&+.border-medium.border-primary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],
372
- secondary: [
373
- "[&+.border-medium.border-secondary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"
374
- ],
375
- success: ["[&+.border-medium.border-success]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],
376
- warning: ["[&+.border-medium.border-warning]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],
377
- danger: ["[&+.border-medium.border-danger]:ms-[calc(var(--heroui-border-width-medium)*-1)]"]
378
- }, Yr = [
379
- // Font styles
380
- "font-inherit",
381
- "text-[100%]",
382
- "leading-[1.15]",
383
- // Reset margins and padding
384
- "m-0",
385
- "p-0",
386
- // Overflow and box-sizing
387
- "overflow-visible",
388
- "box-border",
389
- // Positioning & Hit area
390
- "absolute",
391
- "top-0",
392
- "w-full",
393
- "h-full",
394
- // Opacity and z-index
395
- "opacity-[0.0001]",
396
- "z-[1]",
397
- // Cursor
398
- "cursor-pointer",
399
- // Disabled state
400
- "disabled:cursor-default"
401
- ], je = (o) => o === "light" || o === "dark";
402
- function A(o) {
403
- const c = {}, l = Object.keys(o), p = l.length;
404
- for (let e = 0; e < p / 2; e++) {
405
- const t = l[e], n = l[p - 1 - e];
406
- c[t] = o[n], c[n] = o[t];
407
- }
408
- if (p % 2 !== 0) {
409
- const e = l[Math.floor(p / 2)];
410
- c[e] = o[e];
411
- }
412
- return c;
413
- }
414
- function $e(o) {
415
- const c = {};
416
- for (const l in o) {
417
- if (l.endsWith("-DEFAULT")) {
418
- c[l.replace("-DEFAULT", "")] = o[l];
419
- continue;
420
- }
421
- c[l] = o[l];
422
- }
423
- return c;
424
- }
425
- function Ce(o) {
426
- return o && o.constructor && typeof o.constructor.isBuffer == "function" && o.constructor.isBuffer(o);
427
- }
428
- function De(o) {
429
- return o;
430
- }
431
- function Te(o, c) {
432
- c = c || {};
433
- const l = c.delimiter || ".", p = c.maxDepth, e = c.transformKey || De, t = {};
434
- function n(a, r, i) {
435
- i = i || 1, Object.keys(a).forEach(function(u) {
436
- const g = a[u], s = c.safe && Array.isArray(g), f = Object.prototype.toString.call(g), h = Ce(g), d = f === "[object Object]" || f === "[object Array]", b = r ? r + l + e(u) : e(u);
437
- if (!s && !h && d && Object.keys(g).length && (!c.maxDepth || i < p))
438
- return n(g, b, i + 1);
439
- t[b] = g;
440
- });
441
- }
442
- return n(o, null, null), t;
443
- }
444
- var Le = (o) => $e(
445
- Te(o, {
446
- safe: !0,
447
- delimiter: "-"
448
- })
449
- ), qe = {
450
- 50: "#fefce8",
451
- 100: "#fdedd3",
452
- 200: "#fbdba7",
453
- 300: "#f9c97c",
454
- 400: "#f7b750",
455
- 500: "#f5a524",
456
- 600: "#c4841d",
457
- 700: "#936316",
458
- 800: "#62420e",
459
- 900: "#312107"
460
- }, Se = {
461
- 50: "#fafafa",
462
- 100: "#f4f4f5",
463
- 200: "#e4e4e7",
464
- 300: "#d4d4d8",
465
- 400: "#a1a1aa",
466
- 500: "#71717a",
467
- 600: "#52525b",
468
- 700: "#3f3f46",
469
- 800: "#27272a",
470
- 900: "#18181b"
471
- }, Ue = {
472
- 50: "#F0FCFF",
473
- 100: "#E6FAFE",
474
- 200: "#D7F8FE",
475
- 300: "#C3F4FD",
476
- 400: "#A5EEFD",
477
- 500: "#7EE7FC",
478
- 600: "#06B7DB",
479
- 700: "#09AACD",
480
- 800: "#0E8AAA",
481
- 900: "#053B48"
482
- }, Ie = {
483
- 50: "#e8faf0",
484
- 100: "#d1f4e0",
485
- 200: "#a2e9c1",
486
- 300: "#74dfa2",
487
- 400: "#45d483",
488
- 500: "#17c964",
489
- 600: "#12a150",
490
- 700: "#0e793c",
491
- 800: "#095028",
492
- 900: "#052814"
493
- }, Ne = {
494
- 50: "#ffedfa",
495
- 100: "#ffdcf5",
496
- 200: "#ffb8eb",
497
- 300: "#ff95e1",
498
- 400: "#ff71d7",
499
- 500: "#ff4ecd",
500
- 600: "#cc3ea4",
501
- 700: "#992f7b",
502
- 800: "#661f52",
503
- 900: "#331029"
504
- }, Re = {
505
- 50: "#f2eafa",
506
- 100: "#e4d4f4",
507
- 200: "#c9a9e9",
508
- 300: "#ae7ede",
509
- 400: "#9353d3",
510
- 500: "#7828c8",
511
- 600: "#6020a0",
512
- 700: "#481878",
513
- 800: "#301050",
514
- 900: "#180828"
515
- }, Pe = {
516
- 50: "#fee7ef",
517
- 100: "#fdd0df",
518
- 200: "#faa0bf",
519
- 300: "#f871a0",
520
- 400: "#f54180",
521
- 500: "#f31260",
522
- 600: "#c20e4d",
523
- 700: "#920b3a",
524
- 800: "#610726",
525
- 900: "#310413"
526
- }, Ve = {
527
- 50: "#e6f1fe",
528
- 100: "#cce3fd",
529
- 200: "#99c7fb",
530
- 300: "#66aaf9",
531
- 400: "#338ef7",
532
- 500: "#006FEE",
533
- 600: "#005bc4",
534
- 700: "#004493",
535
- 800: "#002e62",
536
- 900: "#001731"
537
- }, y = {
538
- white: "#ffffff",
539
- black: "#000000",
540
- blue: Ve,
541
- green: Ie,
542
- pink: Ne,
543
- purple: Re,
544
- red: Pe,
545
- yellow: qe,
546
- cyan: Ue,
547
- zinc: Se
548
- };
549
- function W(o, c, l) {
550
- return Math.min(Math.max(o, l), c);
551
- }
552
- class Ke extends Error {
553
- constructor(c) {
554
- super(`Failed to parse color: "${c}"`);
555
- }
556
- }
557
- var M = Ke;
558
- function Be(o) {
559
- if (typeof o != "string") throw new M(o);
560
- if (o.trim().toLowerCase() === "transparent") return [0, 0, 0, 0];
561
- let c = o.trim();
562
- c = Qe.test(o) ? Xe(o) : o;
563
- const l = Ge.exec(c);
564
- if (l) {
565
- const n = Array.from(l).slice(1);
566
- return [...n.slice(0, 3).map((a) => parseInt(O(a, 2), 16)), parseInt(O(n[3] || "f", 2), 16) / 255];
567
- }
568
- const p = Je.exec(c);
569
- if (p) {
570
- const n = Array.from(p).slice(1);
571
- return [...n.slice(0, 3).map((a) => parseInt(a, 16)), parseInt(n[3] || "ff", 16) / 255];
572
- }
573
- const e = Ze.exec(c);
574
- if (e) {
575
- const n = Array.from(e).slice(1);
576
- return [...n.slice(0, 3).map((a) => parseInt(a, 10)), parseFloat(n[3] || "1")];
577
- }
578
- const t = Ye.exec(c);
579
- if (t) {
580
- const [n, a, r, i] = Array.from(t).slice(1).map(parseFloat);
581
- if (W(0, 100, a) !== a) throw new M(o);
582
- if (W(0, 100, r) !== r) throw new M(o);
583
- return [...er(n, a, r), Number.isNaN(i) ? 1 : i];
584
- }
585
- throw new M(o);
586
- }
587
- function He(o) {
588
- let c = 5381, l = o.length;
589
- for (; l; )
590
- c = c * 33 ^ o.charCodeAt(--l);
591
- return (c >>> 0) % 2341;
592
- }
593
- const X = (o) => parseInt(o.replace(/_/g, ""), 36), We = "1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((o, c) => {
594
- const l = X(c.substring(0, 3)), p = X(c.substring(3)).toString(16);
595
- let e = "";
596
- for (let t = 0; t < 6 - p.length; t++)
597
- e += "0";
598
- return o[l] = `${e}${p}`, o;
599
- }, {});
600
- function Xe(o) {
601
- const c = o.toLowerCase().trim(), l = We[He(c)];
602
- if (!l) throw new M(o);
603
- return `#${l}`;
604
- }
605
- const O = (o, c) => Array.from(Array(c)).map(() => o).join(""), Ge = new RegExp(`^#${O("([a-f0-9])", 3)}([a-f0-9])?$`, "i"), Je = new RegExp(`^#${O("([a-f0-9]{2})", 3)}([a-f0-9]{2})?$`, "i"), Ze = new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${O(",\\s*(\\d+)\\s*", 2)}(?:,\\s*([\\d.]+))?\\s*\\)$`, "i"), Ye = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i, Qe = /^[a-z]+$/i, G = (o) => Math.round(o * 255), er = (o, c, l) => {
606
- let p = l / 100;
607
- if (c === 0)
608
- return [p, p, p].map(G);
609
- const e = (o % 360 + 360) % 360 / 60, t = (1 - Math.abs(2 * p - 1)) * (c / 100), n = t * (1 - Math.abs(e % 2 - 1));
610
- let a = 0, r = 0, i = 0;
611
- e >= 0 && e < 1 ? (a = t, r = n) : e >= 1 && e < 2 ? (a = n, r = t) : e >= 2 && e < 3 ? (r = t, i = n) : e >= 3 && e < 4 ? (r = n, i = t) : e >= 4 && e < 5 ? (a = n, i = t) : e >= 5 && e < 6 && (a = t, i = n);
612
- const u = p - t / 2, g = a + u, s = r + u, f = i + u;
613
- return [g, s, f].map(G);
614
- };
615
- function rr(o) {
616
- if (o === "transparent") return 0;
617
- function c(t) {
618
- const n = t / 255;
619
- return n <= 0.04045 ? n / 12.92 : Math.pow((n + 0.055) / 1.055, 2.4);
620
- }
621
- const [l, p, e] = Be(o);
622
- return 0.2126 * c(l) + 0.7152 * c(p) + 0.0722 * c(e);
623
- }
624
- function tr(o) {
625
- return rr(o) > 0.179;
626
- }
627
- function z(o) {
628
- return tr(o) ? "#000" : "#fff";
629
- }
630
- var ce = {
631
- light: {
632
- background: {
633
- DEFAULT: "#FFFFFF"
634
- },
635
- foreground: {
636
- ...y.zinc,
637
- DEFAULT: "#11181C"
638
- },
639
- divider: {
640
- DEFAULT: "rgba(17, 17, 17, 0.15)"
641
- },
642
- focus: {
643
- DEFAULT: y.blue[500]
644
- },
645
- overlay: {
646
- DEFAULT: "#000000"
647
- },
648
- content1: {
649
- DEFAULT: "#FFFFFF",
650
- foreground: "#11181C"
651
- },
652
- content2: {
653
- DEFAULT: y.zinc[100],
654
- foreground: y.zinc[800]
655
- },
656
- content3: {
657
- DEFAULT: y.zinc[200],
658
- foreground: y.zinc[700]
659
- },
660
- content4: {
661
- DEFAULT: y.zinc[300],
662
- foreground: y.zinc[600]
663
- }
664
- },
665
- dark: {
666
- background: {
667
- DEFAULT: "#000000"
668
- },
669
- foreground: {
670
- ...A(y.zinc),
671
- DEFAULT: "#ECEDEE"
672
- },
673
- focus: {
674
- DEFAULT: y.blue[500]
675
- },
676
- overlay: {
677
- DEFAULT: "#000000"
678
- },
679
- divider: {
680
- DEFAULT: "rgba(255, 255, 255, 0.15)"
681
- },
682
- content1: {
683
- DEFAULT: y.zinc[900],
684
- foreground: y.zinc[50]
685
- },
686
- content2: {
687
- DEFAULT: y.zinc[800],
688
- foreground: y.zinc[100]
689
- },
690
- content3: {
691
- DEFAULT: y.zinc[700],
692
- foreground: y.zinc[200]
693
- },
694
- content4: {
695
- DEFAULT: y.zinc[600],
696
- foreground: y.zinc[300]
697
- }
698
- }
699
- }, nr = {
700
- ...ce.light,
701
- default: {
702
- ...y.zinc,
703
- foreground: z(y.zinc[300]),
704
- DEFAULT: y.zinc[300]
705
- },
706
- primary: {
707
- ...y.blue,
708
- foreground: z(y.blue[500]),
709
- DEFAULT: y.blue[500]
710
- },
711
- secondary: {
712
- ...y.purple,
713
- foreground: z(y.purple[500]),
714
- DEFAULT: y.purple[500]
715
- },
716
- success: {
717
- ...y.green,
718
- foreground: z(y.green[500]),
719
- DEFAULT: y.green[500]
720
- },
721
- warning: {
722
- ...y.yellow,
723
- foreground: z(y.yellow[500]),
724
- DEFAULT: y.yellow[500]
725
- },
726
- danger: {
727
- ...y.red,
728
- foreground: y.white,
729
- DEFAULT: y.red[500]
730
- }
731
- }, or = {
732
- ...ce.dark,
733
- default: {
734
- ...A(y.zinc),
735
- foreground: z(y.zinc[700]),
736
- DEFAULT: y.zinc[700]
737
- },
738
- primary: {
739
- ...A(y.blue),
740
- foreground: z(y.blue[500]),
741
- DEFAULT: y.blue[500]
742
- },
743
- secondary: {
744
- ...A(y.purple),
745
- foreground: z(y.purple[400]),
746
- DEFAULT: y.purple[400]
747
- },
748
- success: {
749
- ...A(y.green),
750
- foreground: z(y.green[500]),
751
- DEFAULT: y.green[500]
752
- },
753
- warning: {
754
- ...A(y.yellow),
755
- foreground: z(y.yellow[500]),
756
- DEFAULT: y.yellow[500]
757
- },
758
- danger: {
759
- ...A(y.red),
760
- foreground: y.white,
761
- DEFAULT: y.red[500]
762
- }
763
- }, j = {
764
- light: nr,
765
- dark: or
766
- }, J = {
767
- dividerWeight: "1px",
768
- disabledOpacity: ".5",
769
- fontSize: {
770
- tiny: "0.75rem",
771
- small: "0.875rem",
772
- medium: "1rem",
773
- large: "1.125rem"
774
- },
775
- lineHeight: {
776
- tiny: "1rem",
777
- small: "1.25rem",
778
- medium: "1.5rem",
779
- large: "1.75rem"
780
- },
781
- radius: {
782
- small: "8px",
783
- medium: "12px",
784
- large: "14px"
785
- },
786
- borderWidth: {
787
- small: "1px",
788
- medium: "2px",
789
- large: "3px"
790
- },
791
- boxShadow: {
792
- small: "0px 0px 5px 0px rgb(0 0 0 / 0.02), 0px 2px 10px 0px rgb(0 0 0 / 0.06), 0px 0px 1px 0px rgb(0 0 0 / 0.3)",
793
- medium: "0px 0px 15px 0px rgb(0 0 0 / 0.03), 0px 2px 30px 0px rgb(0 0 0 / 0.08), 0px 0px 1px 0px rgb(0 0 0 / 0.3)",
794
- large: "0px 0px 30px 0px rgb(0 0 0 / 0.04), 0px 30px 60px 0px rgb(0 0 0 / 0.12), 0px 0px 1px 0px rgb(0 0 0 / 0.3)"
795
- }
796
- }, ar = {
797
- hoverOpacity: ".8"
798
- }, sr = {
799
- hoverOpacity: ".9",
800
- boxShadow: {
801
- small: "0px 0px 5px 0px rgb(0 0 0 / 0.05), 0px 2px 10px 0px rgb(0 0 0 / 0.2), inset 0px 0px 1px 0px rgb(255 255 255 / 0.15)",
802
- medium: "0px 0px 15px 0px rgb(0 0 0 / 0.06), 0px 2px 30px 0px rgb(0 0 0 / 0.22), inset 0px 0px 1px 0px rgb(255 255 255 / 0.15)",
803
- large: "0px 0px 30px 0px rgb(0 0 0 / 0.07), 0px 30px 60px 0px rgb(0 0 0 / 0.26), inset 0px 0px 1px 0px rgb(255 255 255 / 0.15)"
804
- }
805
- }, ir = {
806
- animation: {
807
- shimmer: "shimmer 2s infinite",
808
- "drip-expand": "drip-expand 420ms linear",
809
- "spinner-ease-spin": "spinner-spin 0.8s ease infinite",
810
- "spinner-linear-spin": "spinner-spin 0.8s linear infinite",
811
- sway: "sway 750ms ease infinite",
812
- blink: "blink 1.4s infinite both",
813
- "fade-out": "fade-out 1.2s linear 0s infinite normal none running",
814
- "appearance-in": "appearance-in 250ms ease-out normal both",
815
- "appearance-out": "appearance-out 60ms ease-in normal both",
816
- "indeterminate-bar": "indeterminate-bar 1.5s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite normal none running"
817
- },
818
- keyframes: {
819
- shimmer: {
820
- "100%": {
821
- transform: "translateX(200%)"
822
- }
823
- },
824
- "spinner-spin": {
825
- "0%": {
826
- transform: "rotate(0deg)"
827
- },
828
- "100%": {
829
- transform: "rotate(360deg)"
830
- }
831
- },
832
- "drip-expand": {
833
- "0%": {
834
- opacity: "0.2",
835
- transform: "scale(0)"
836
- },
837
- "100%": {
838
- opacity: "0",
839
- transform: "scale(2)"
840
- }
841
- },
842
- "appearance-in": {
843
- "0%": {
844
- opacity: "0",
845
- transform: "translateZ(0) scale(0.95)"
846
- },
847
- "60%": {
848
- opacity: "0.75",
849
- /* Avoid blurriness */
850
- backfaceVisibility: "hidden",
851
- webkitFontSmoothing: "antialiased",
852
- transform: "translateZ(0) scale(1.05)"
853
- },
854
- "100%": {
855
- opacity: "1",
856
- transform: "translateZ(0) scale(1)"
857
- }
858
- },
859
- "appearance-out": {
860
- "0%": {
861
- opacity: "1",
862
- transform: "scale(1)"
863
- },
864
- "100%": {
865
- opacity: "0",
866
- transform: "scale(0.85)"
867
- }
868
- },
869
- "indeterminate-bar": {
870
- "0%": {
871
- transform: "translateX(-50%) scaleX(0.2)"
872
- },
873
- "100%": {
874
- transform: "translateX(100%) scaleX(1)"
875
- }
876
- },
877
- sway: {
878
- "0%": {
879
- transform: "translate(0px, 0px)"
880
- },
881
- "50%": {
882
- transform: "translate(0px, -150%)"
883
- },
884
- "100%": {
885
- transform: "translate(0px, 0px)"
886
- }
887
- },
888
- blink: {
889
- "0%": {
890
- opacity: "0.2"
891
- },
892
- "20%": {
893
- opacity: "1"
894
- },
895
- "100%": {
896
- opacity: "0.2"
897
- }
898
- },
899
- "fade-out": {
900
- "0%": {
901
- opacity: "1"
902
- },
903
- "100%": {
904
- opacity: "0.15"
905
- }
906
- }
907
- }
908
- }, $ = { exports: {} }, C, Z;
909
- function ue() {
910
- return Z || (Z = 1, C = {
911
- aliceblue: [240, 248, 255],
912
- antiquewhite: [250, 235, 215],
913
- aqua: [0, 255, 255],
914
- aquamarine: [127, 255, 212],
915
- azure: [240, 255, 255],
916
- beige: [245, 245, 220],
917
- bisque: [255, 228, 196],
918
- black: [0, 0, 0],
919
- blanchedalmond: [255, 235, 205],
920
- blue: [0, 0, 255],
921
- blueviolet: [138, 43, 226],
922
- brown: [165, 42, 42],
923
- burlywood: [222, 184, 135],
924
- cadetblue: [95, 158, 160],
925
- chartreuse: [127, 255, 0],
926
- chocolate: [210, 105, 30],
927
- coral: [255, 127, 80],
928
- cornflowerblue: [100, 149, 237],
929
- cornsilk: [255, 248, 220],
930
- crimson: [220, 20, 60],
931
- cyan: [0, 255, 255],
932
- darkblue: [0, 0, 139],
933
- darkcyan: [0, 139, 139],
934
- darkgoldenrod: [184, 134, 11],
935
- darkgray: [169, 169, 169],
936
- darkgreen: [0, 100, 0],
937
- darkgrey: [169, 169, 169],
938
- darkkhaki: [189, 183, 107],
939
- darkmagenta: [139, 0, 139],
940
- darkolivegreen: [85, 107, 47],
941
- darkorange: [255, 140, 0],
942
- darkorchid: [153, 50, 204],
943
- darkred: [139, 0, 0],
944
- darksalmon: [233, 150, 122],
945
- darkseagreen: [143, 188, 143],
946
- darkslateblue: [72, 61, 139],
947
- darkslategray: [47, 79, 79],
948
- darkslategrey: [47, 79, 79],
949
- darkturquoise: [0, 206, 209],
950
- darkviolet: [148, 0, 211],
951
- deeppink: [255, 20, 147],
952
- deepskyblue: [0, 191, 255],
953
- dimgray: [105, 105, 105],
954
- dimgrey: [105, 105, 105],
955
- dodgerblue: [30, 144, 255],
956
- firebrick: [178, 34, 34],
957
- floralwhite: [255, 250, 240],
958
- forestgreen: [34, 139, 34],
959
- fuchsia: [255, 0, 255],
960
- gainsboro: [220, 220, 220],
961
- ghostwhite: [248, 248, 255],
962
- gold: [255, 215, 0],
963
- goldenrod: [218, 165, 32],
964
- gray: [128, 128, 128],
965
- green: [0, 128, 0],
966
- greenyellow: [173, 255, 47],
967
- grey: [128, 128, 128],
968
- honeydew: [240, 255, 240],
969
- hotpink: [255, 105, 180],
970
- indianred: [205, 92, 92],
971
- indigo: [75, 0, 130],
972
- ivory: [255, 255, 240],
973
- khaki: [240, 230, 140],
974
- lavender: [230, 230, 250],
975
- lavenderblush: [255, 240, 245],
976
- lawngreen: [124, 252, 0],
977
- lemonchiffon: [255, 250, 205],
978
- lightblue: [173, 216, 230],
979
- lightcoral: [240, 128, 128],
980
- lightcyan: [224, 255, 255],
981
- lightgoldenrodyellow: [250, 250, 210],
982
- lightgray: [211, 211, 211],
983
- lightgreen: [144, 238, 144],
984
- lightgrey: [211, 211, 211],
985
- lightpink: [255, 182, 193],
986
- lightsalmon: [255, 160, 122],
987
- lightseagreen: [32, 178, 170],
988
- lightskyblue: [135, 206, 250],
989
- lightslategray: [119, 136, 153],
990
- lightslategrey: [119, 136, 153],
991
- lightsteelblue: [176, 196, 222],
992
- lightyellow: [255, 255, 224],
993
- lime: [0, 255, 0],
994
- limegreen: [50, 205, 50],
995
- linen: [250, 240, 230],
996
- magenta: [255, 0, 255],
997
- maroon: [128, 0, 0],
998
- mediumaquamarine: [102, 205, 170],
999
- mediumblue: [0, 0, 205],
1000
- mediumorchid: [186, 85, 211],
1001
- mediumpurple: [147, 112, 219],
1002
- mediumseagreen: [60, 179, 113],
1003
- mediumslateblue: [123, 104, 238],
1004
- mediumspringgreen: [0, 250, 154],
1005
- mediumturquoise: [72, 209, 204],
1006
- mediumvioletred: [199, 21, 133],
1007
- midnightblue: [25, 25, 112],
1008
- mintcream: [245, 255, 250],
1009
- mistyrose: [255, 228, 225],
1010
- moccasin: [255, 228, 181],
1011
- navajowhite: [255, 222, 173],
1012
- navy: [0, 0, 128],
1013
- oldlace: [253, 245, 230],
1014
- olive: [128, 128, 0],
1015
- olivedrab: [107, 142, 35],
1016
- orange: [255, 165, 0],
1017
- orangered: [255, 69, 0],
1018
- orchid: [218, 112, 214],
1019
- palegoldenrod: [238, 232, 170],
1020
- palegreen: [152, 251, 152],
1021
- paleturquoise: [175, 238, 238],
1022
- palevioletred: [219, 112, 147],
1023
- papayawhip: [255, 239, 213],
1024
- peachpuff: [255, 218, 185],
1025
- peru: [205, 133, 63],
1026
- pink: [255, 192, 203],
1027
- plum: [221, 160, 221],
1028
- powderblue: [176, 224, 230],
1029
- purple: [128, 0, 128],
1030
- rebeccapurple: [102, 51, 153],
1031
- red: [255, 0, 0],
1032
- rosybrown: [188, 143, 143],
1033
- royalblue: [65, 105, 225],
1034
- saddlebrown: [139, 69, 19],
1035
- salmon: [250, 128, 114],
1036
- sandybrown: [244, 164, 96],
1037
- seagreen: [46, 139, 87],
1038
- seashell: [255, 245, 238],
1039
- sienna: [160, 82, 45],
1040
- silver: [192, 192, 192],
1041
- skyblue: [135, 206, 235],
1042
- slateblue: [106, 90, 205],
1043
- slategray: [112, 128, 144],
1044
- slategrey: [112, 128, 144],
1045
- snow: [255, 250, 250],
1046
- springgreen: [0, 255, 127],
1047
- steelblue: [70, 130, 180],
1048
- tan: [210, 180, 140],
1049
- teal: [0, 128, 128],
1050
- thistle: [216, 191, 216],
1051
- tomato: [255, 99, 71],
1052
- turquoise: [64, 224, 208],
1053
- violet: [238, 130, 238],
1054
- wheat: [245, 222, 179],
1055
- white: [255, 255, 255],
1056
- whitesmoke: [245, 245, 245],
1057
- yellow: [255, 255, 0],
1058
- yellowgreen: [154, 205, 50]
1059
- }), C;
1060
- }
1061
- var D = { exports: {} }, T, Y;
1062
- function lr() {
1063
- return Y || (Y = 1, T = function(c) {
1064
- return !c || typeof c == "string" ? !1 : c instanceof Array || Array.isArray(c) || c.length >= 0 && (c.splice instanceof Function || Object.getOwnPropertyDescriptor(c, c.length - 1) && c.constructor.name !== "String");
1065
- }), T;
1066
- }
1067
- var Q;
1068
- function cr() {
1069
- if (Q) return D.exports;
1070
- Q = 1;
1071
- var o = lr(), c = Array.prototype.concat, l = Array.prototype.slice, p = D.exports = function(t) {
1072
- for (var n = [], a = 0, r = t.length; a < r; a++) {
1073
- var i = t[a];
1074
- o(i) ? n = c.call(n, l.call(i)) : n.push(i);
1075
- }
1076
- return n;
1077
- };
1078
- return p.wrap = function(e) {
1079
- return function() {
1080
- return e(p(arguments));
1081
- };
1082
- }, D.exports;
1083
- }
1084
- var ee;
1085
- function ur() {
1086
- if (ee) return $.exports;
1087
- ee = 1;
1088
- var o = ue(), c = cr(), l = Object.hasOwnProperty, p = /* @__PURE__ */ Object.create(null);
1089
- for (var e in o)
1090
- l.call(o, e) && (p[o[e]] = e);
1091
- var t = $.exports = {
1092
- to: {},
1093
- get: {}
1094
- };
1095
- t.get = function(r) {
1096
- var i = r.substring(0, 3).toLowerCase(), u, g;
1097
- switch (i) {
1098
- case "hsl":
1099
- u = t.get.hsl(r), g = "hsl";
1100
- break;
1101
- case "hwb":
1102
- u = t.get.hwb(r), g = "hwb";
1103
- break;
1104
- default:
1105
- u = t.get.rgb(r), g = "rgb";
1106
- break;
1107
- }
1108
- return u ? { model: g, value: u } : null;
1109
- }, t.get.rgb = function(r) {
1110
- if (!r)
1111
- return null;
1112
- var i = /^#([a-f0-9]{3,4})$/i, u = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i, g = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/, s = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/, f = /^(\w+)$/, h = [0, 0, 0, 1], d, b, m;
1113
- if (d = r.match(u)) {
1114
- for (m = d[2], d = d[1], b = 0; b < 3; b++) {
1115
- var v = b * 2;
1116
- h[b] = parseInt(d.slice(v, v + 2), 16);
1117
- }
1118
- m && (h[3] = parseInt(m, 16) / 255);
1119
- } else if (d = r.match(i)) {
1120
- for (d = d[1], m = d[3], b = 0; b < 3; b++)
1121
- h[b] = parseInt(d[b] + d[b], 16);
1122
- m && (h[3] = parseInt(m + m, 16) / 255);
1123
- } else if (d = r.match(g)) {
1124
- for (b = 0; b < 3; b++)
1125
- h[b] = parseInt(d[b + 1], 0);
1126
- d[4] && (d[5] ? h[3] = parseFloat(d[4]) * 0.01 : h[3] = parseFloat(d[4]));
1127
- } else if (d = r.match(s)) {
1128
- for (b = 0; b < 3; b++)
1129
- h[b] = Math.round(parseFloat(d[b + 1]) * 2.55);
1130
- d[4] && (d[5] ? h[3] = parseFloat(d[4]) * 0.01 : h[3] = parseFloat(d[4]));
1131
- } else return (d = r.match(f)) ? d[1] === "transparent" ? [0, 0, 0, 0] : l.call(o, d[1]) ? (h = o[d[1]], h[3] = 1, h) : null : null;
1132
- for (b = 0; b < 3; b++)
1133
- h[b] = n(h[b], 0, 255);
1134
- return h[3] = n(h[3], 0, 1), h;
1135
- }, t.get.hsl = function(r) {
1136
- if (!r)
1137
- return null;
1138
- var i = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/, u = r.match(i);
1139
- if (u) {
1140
- var g = parseFloat(u[4]), s = (parseFloat(u[1]) % 360 + 360) % 360, f = n(parseFloat(u[2]), 0, 100), h = n(parseFloat(u[3]), 0, 100), d = n(isNaN(g) ? 1 : g, 0, 1);
1141
- return [s, f, h, d];
1142
- }
1143
- return null;
1144
- }, t.get.hwb = function(r) {
1145
- if (!r)
1146
- return null;
1147
- var i = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/, u = r.match(i);
1148
- if (u) {
1149
- var g = parseFloat(u[4]), s = (parseFloat(u[1]) % 360 + 360) % 360, f = n(parseFloat(u[2]), 0, 100), h = n(parseFloat(u[3]), 0, 100), d = n(isNaN(g) ? 1 : g, 0, 1);
1150
- return [s, f, h, d];
1151
- }
1152
- return null;
1153
- }, t.to.hex = function() {
1154
- var r = c(arguments);
1155
- return "#" + a(r[0]) + a(r[1]) + a(r[2]) + (r[3] < 1 ? a(Math.round(r[3] * 255)) : "");
1156
- }, t.to.rgb = function() {
1157
- var r = c(arguments);
1158
- return r.length < 4 || r[3] === 1 ? "rgb(" + Math.round(r[0]) + ", " + Math.round(r[1]) + ", " + Math.round(r[2]) + ")" : "rgba(" + Math.round(r[0]) + ", " + Math.round(r[1]) + ", " + Math.round(r[2]) + ", " + r[3] + ")";
1159
- }, t.to.rgb.percent = function() {
1160
- var r = c(arguments), i = Math.round(r[0] / 255 * 100), u = Math.round(r[1] / 255 * 100), g = Math.round(r[2] / 255 * 100);
1161
- return r.length < 4 || r[3] === 1 ? "rgb(" + i + "%, " + u + "%, " + g + "%)" : "rgba(" + i + "%, " + u + "%, " + g + "%, " + r[3] + ")";
1162
- }, t.to.hsl = function() {
1163
- var r = c(arguments);
1164
- return r.length < 4 || r[3] === 1 ? "hsl(" + r[0] + ", " + r[1] + "%, " + r[2] + "%)" : "hsla(" + r[0] + ", " + r[1] + "%, " + r[2] + "%, " + r[3] + ")";
1165
- }, t.to.hwb = function() {
1166
- var r = c(arguments), i = "";
1167
- return r.length >= 4 && r[3] !== 1 && (i = ", " + r[3]), "hwb(" + r[0] + ", " + r[1] + "%, " + r[2] + "%" + i + ")";
1168
- }, t.to.keyword = function(r) {
1169
- return p[r.slice(0, 3)];
1170
- };
1171
- function n(r, i, u) {
1172
- return Math.min(Math.max(i, r), u);
1173
- }
1174
- function a(r) {
1175
- var i = Math.round(r).toString(16).toUpperCase();
1176
- return i.length < 2 ? "0" + i : i;
1177
- }
1178
- return $.exports;
1179
- }
1180
- var L, re;
1181
- function fe() {
1182
- if (re) return L;
1183
- re = 1;
1184
- const o = ue(), c = {};
1185
- for (const e of Object.keys(o))
1186
- c[o[e]] = e;
1187
- const l = {
1188
- rgb: { channels: 3, labels: "rgb" },
1189
- hsl: { channels: 3, labels: "hsl" },
1190
- hsv: { channels: 3, labels: "hsv" },
1191
- hwb: { channels: 3, labels: "hwb" },
1192
- cmyk: { channels: 4, labels: "cmyk" },
1193
- xyz: { channels: 3, labels: "xyz" },
1194
- lab: { channels: 3, labels: "lab" },
1195
- lch: { channels: 3, labels: "lch" },
1196
- hex: { channels: 1, labels: ["hex"] },
1197
- keyword: { channels: 1, labels: ["keyword"] },
1198
- ansi16: { channels: 1, labels: ["ansi16"] },
1199
- ansi256: { channels: 1, labels: ["ansi256"] },
1200
- hcg: { channels: 3, labels: ["h", "c", "g"] },
1201
- apple: { channels: 3, labels: ["r16", "g16", "b16"] },
1202
- gray: { channels: 1, labels: ["gray"] }
1203
- };
1204
- L = l;
1205
- for (const e of Object.keys(l)) {
1206
- if (!("channels" in l[e]))
1207
- throw new Error("missing channels property: " + e);
1208
- if (!("labels" in l[e]))
1209
- throw new Error("missing channel labels property: " + e);
1210
- if (l[e].labels.length !== l[e].channels)
1211
- throw new Error("channel and label counts mismatch: " + e);
1212
- const { channels: t, labels: n } = l[e];
1213
- delete l[e].channels, delete l[e].labels, Object.defineProperty(l[e], "channels", { value: t }), Object.defineProperty(l[e], "labels", { value: n });
1214
- }
1215
- l.rgb.hsl = function(e) {
1216
- const t = e[0] / 255, n = e[1] / 255, a = e[2] / 255, r = Math.min(t, n, a), i = Math.max(t, n, a), u = i - r;
1217
- let g, s;
1218
- i === r ? g = 0 : t === i ? g = (n - a) / u : n === i ? g = 2 + (a - t) / u : a === i && (g = 4 + (t - n) / u), g = Math.min(g * 60, 360), g < 0 && (g += 360);
1219
- const f = (r + i) / 2;
1220
- return i === r ? s = 0 : f <= 0.5 ? s = u / (i + r) : s = u / (2 - i - r), [g, s * 100, f * 100];
1221
- }, l.rgb.hsv = function(e) {
1222
- let t, n, a, r, i;
1223
- const u = e[0] / 255, g = e[1] / 255, s = e[2] / 255, f = Math.max(u, g, s), h = f - Math.min(u, g, s), d = function(b) {
1224
- return (f - b) / 6 / h + 1 / 2;
1225
- };
1226
- return h === 0 ? (r = 0, i = 0) : (i = h / f, t = d(u), n = d(g), a = d(s), u === f ? r = a - n : g === f ? r = 1 / 3 + t - a : s === f && (r = 2 / 3 + n - t), r < 0 ? r += 1 : r > 1 && (r -= 1)), [
1227
- r * 360,
1228
- i * 100,
1229
- f * 100
1230
- ];
1231
- }, l.rgb.hwb = function(e) {
1232
- const t = e[0], n = e[1];
1233
- let a = e[2];
1234
- const r = l.rgb.hsl(e)[0], i = 1 / 255 * Math.min(t, Math.min(n, a));
1235
- return a = 1 - 1 / 255 * Math.max(t, Math.max(n, a)), [r, i * 100, a * 100];
1236
- }, l.rgb.cmyk = function(e) {
1237
- const t = e[0] / 255, n = e[1] / 255, a = e[2] / 255, r = Math.min(1 - t, 1 - n, 1 - a), i = (1 - t - r) / (1 - r) || 0, u = (1 - n - r) / (1 - r) || 0, g = (1 - a - r) / (1 - r) || 0;
1238
- return [i * 100, u * 100, g * 100, r * 100];
1239
- };
1240
- function p(e, t) {
1241
- return (e[0] - t[0]) ** 2 + (e[1] - t[1]) ** 2 + (e[2] - t[2]) ** 2;
1242
- }
1243
- return l.rgb.keyword = function(e) {
1244
- const t = c[e];
1245
- if (t)
1246
- return t;
1247
- let n = 1 / 0, a;
1248
- for (const r of Object.keys(o)) {
1249
- const i = o[r], u = p(e, i);
1250
- u < n && (n = u, a = r);
1251
- }
1252
- return a;
1253
- }, l.keyword.rgb = function(e) {
1254
- return o[e];
1255
- }, l.rgb.xyz = function(e) {
1256
- let t = e[0] / 255, n = e[1] / 255, a = e[2] / 255;
1257
- t = t > 0.04045 ? ((t + 0.055) / 1.055) ** 2.4 : t / 12.92, n = n > 0.04045 ? ((n + 0.055) / 1.055) ** 2.4 : n / 12.92, a = a > 0.04045 ? ((a + 0.055) / 1.055) ** 2.4 : a / 12.92;
1258
- const r = t * 0.4124 + n * 0.3576 + a * 0.1805, i = t * 0.2126 + n * 0.7152 + a * 0.0722, u = t * 0.0193 + n * 0.1192 + a * 0.9505;
1259
- return [r * 100, i * 100, u * 100];
1260
- }, l.rgb.lab = function(e) {
1261
- const t = l.rgb.xyz(e);
1262
- let n = t[0], a = t[1], r = t[2];
1263
- n /= 95.047, a /= 100, r /= 108.883, n = n > 8856e-6 ? n ** (1 / 3) : 7.787 * n + 16 / 116, a = a > 8856e-6 ? a ** (1 / 3) : 7.787 * a + 16 / 116, r = r > 8856e-6 ? r ** (1 / 3) : 7.787 * r + 16 / 116;
1264
- const i = 116 * a - 16, u = 500 * (n - a), g = 200 * (a - r);
1265
- return [i, u, g];
1266
- }, l.hsl.rgb = function(e) {
1267
- const t = e[0] / 360, n = e[1] / 100, a = e[2] / 100;
1268
- let r, i, u;
1269
- if (n === 0)
1270
- return u = a * 255, [u, u, u];
1271
- a < 0.5 ? r = a * (1 + n) : r = a + n - a * n;
1272
- const g = 2 * a - r, s = [0, 0, 0];
1273
- for (let f = 0; f < 3; f++)
1274
- i = t + 1 / 3 * -(f - 1), i < 0 && i++, i > 1 && i--, 6 * i < 1 ? u = g + (r - g) * 6 * i : 2 * i < 1 ? u = r : 3 * i < 2 ? u = g + (r - g) * (2 / 3 - i) * 6 : u = g, s[f] = u * 255;
1275
- return s;
1276
- }, l.hsl.hsv = function(e) {
1277
- const t = e[0];
1278
- let n = e[1] / 100, a = e[2] / 100, r = n;
1279
- const i = Math.max(a, 0.01);
1280
- a *= 2, n *= a <= 1 ? a : 2 - a, r *= i <= 1 ? i : 2 - i;
1281
- const u = (a + n) / 2, g = a === 0 ? 2 * r / (i + r) : 2 * n / (a + n);
1282
- return [t, g * 100, u * 100];
1283
- }, l.hsv.rgb = function(e) {
1284
- const t = e[0] / 60, n = e[1] / 100;
1285
- let a = e[2] / 100;
1286
- const r = Math.floor(t) % 6, i = t - Math.floor(t), u = 255 * a * (1 - n), g = 255 * a * (1 - n * i), s = 255 * a * (1 - n * (1 - i));
1287
- switch (a *= 255, r) {
1288
- case 0:
1289
- return [a, s, u];
1290
- case 1:
1291
- return [g, a, u];
1292
- case 2:
1293
- return [u, a, s];
1294
- case 3:
1295
- return [u, g, a];
1296
- case 4:
1297
- return [s, u, a];
1298
- case 5:
1299
- return [a, u, g];
1300
- }
1301
- }, l.hsv.hsl = function(e) {
1302
- const t = e[0], n = e[1] / 100, a = e[2] / 100, r = Math.max(a, 0.01);
1303
- let i, u;
1304
- u = (2 - n) * a;
1305
- const g = (2 - n) * r;
1306
- return i = n * r, i /= g <= 1 ? g : 2 - g, i = i || 0, u /= 2, [t, i * 100, u * 100];
1307
- }, l.hwb.rgb = function(e) {
1308
- const t = e[0] / 360;
1309
- let n = e[1] / 100, a = e[2] / 100;
1310
- const r = n + a;
1311
- let i;
1312
- r > 1 && (n /= r, a /= r);
1313
- const u = Math.floor(6 * t), g = 1 - a;
1314
- i = 6 * t - u, (u & 1) !== 0 && (i = 1 - i);
1315
- const s = n + i * (g - n);
1316
- let f, h, d;
1317
- switch (u) {
1318
- default:
1319
- case 6:
1320
- case 0:
1321
- f = g, h = s, d = n;
1322
- break;
1323
- case 1:
1324
- f = s, h = g, d = n;
1325
- break;
1326
- case 2:
1327
- f = n, h = g, d = s;
1328
- break;
1329
- case 3:
1330
- f = n, h = s, d = g;
1331
- break;
1332
- case 4:
1333
- f = s, h = n, d = g;
1334
- break;
1335
- case 5:
1336
- f = g, h = n, d = s;
1337
- break;
1338
- }
1339
- return [f * 255, h * 255, d * 255];
1340
- }, l.cmyk.rgb = function(e) {
1341
- const t = e[0] / 100, n = e[1] / 100, a = e[2] / 100, r = e[3] / 100, i = 1 - Math.min(1, t * (1 - r) + r), u = 1 - Math.min(1, n * (1 - r) + r), g = 1 - Math.min(1, a * (1 - r) + r);
1342
- return [i * 255, u * 255, g * 255];
1343
- }, l.xyz.rgb = function(e) {
1344
- const t = e[0] / 100, n = e[1] / 100, a = e[2] / 100;
1345
- let r, i, u;
1346
- return r = t * 3.2406 + n * -1.5372 + a * -0.4986, i = t * -0.9689 + n * 1.8758 + a * 0.0415, u = t * 0.0557 + n * -0.204 + a * 1.057, r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92, i = i > 31308e-7 ? 1.055 * i ** (1 / 2.4) - 0.055 : i * 12.92, u = u > 31308e-7 ? 1.055 * u ** (1 / 2.4) - 0.055 : u * 12.92, r = Math.min(Math.max(0, r), 1), i = Math.min(Math.max(0, i), 1), u = Math.min(Math.max(0, u), 1), [r * 255, i * 255, u * 255];
1347
- }, l.xyz.lab = function(e) {
1348
- let t = e[0], n = e[1], a = e[2];
1349
- t /= 95.047, n /= 100, a /= 108.883, t = t > 8856e-6 ? t ** (1 / 3) : 7.787 * t + 16 / 116, n = n > 8856e-6 ? n ** (1 / 3) : 7.787 * n + 16 / 116, a = a > 8856e-6 ? a ** (1 / 3) : 7.787 * a + 16 / 116;
1350
- const r = 116 * n - 16, i = 500 * (t - n), u = 200 * (n - a);
1351
- return [r, i, u];
1352
- }, l.lab.xyz = function(e) {
1353
- const t = e[0], n = e[1], a = e[2];
1354
- let r, i, u;
1355
- i = (t + 16) / 116, r = n / 500 + i, u = i - a / 200;
1356
- const g = i ** 3, s = r ** 3, f = u ** 3;
1357
- return i = g > 8856e-6 ? g : (i - 16 / 116) / 7.787, r = s > 8856e-6 ? s : (r - 16 / 116) / 7.787, u = f > 8856e-6 ? f : (u - 16 / 116) / 7.787, r *= 95.047, i *= 100, u *= 108.883, [r, i, u];
1358
- }, l.lab.lch = function(e) {
1359
- const t = e[0], n = e[1], a = e[2];
1360
- let r;
1361
- r = Math.atan2(a, n) * 360 / 2 / Math.PI, r < 0 && (r += 360);
1362
- const u = Math.sqrt(n * n + a * a);
1363
- return [t, u, r];
1364
- }, l.lch.lab = function(e) {
1365
- const t = e[0], n = e[1], r = e[2] / 360 * 2 * Math.PI, i = n * Math.cos(r), u = n * Math.sin(r);
1366
- return [t, i, u];
1367
- }, l.rgb.ansi16 = function(e, t = null) {
1368
- const [n, a, r] = e;
1369
- let i = t === null ? l.rgb.hsv(e)[2] : t;
1370
- if (i = Math.round(i / 50), i === 0)
1371
- return 30;
1372
- let u = 30 + (Math.round(r / 255) << 2 | Math.round(a / 255) << 1 | Math.round(n / 255));
1373
- return i === 2 && (u += 60), u;
1374
- }, l.hsv.ansi16 = function(e) {
1375
- return l.rgb.ansi16(l.hsv.rgb(e), e[2]);
1376
- }, l.rgb.ansi256 = function(e) {
1377
- const t = e[0], n = e[1], a = e[2];
1378
- return t === n && n === a ? t < 8 ? 16 : t > 248 ? 231 : Math.round((t - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(t / 255 * 5) + 6 * Math.round(n / 255 * 5) + Math.round(a / 255 * 5);
1379
- }, l.ansi16.rgb = function(e) {
1380
- let t = e % 10;
1381
- if (t === 0 || t === 7)
1382
- return e > 50 && (t += 3.5), t = t / 10.5 * 255, [t, t, t];
1383
- const n = (~~(e > 50) + 1) * 0.5, a = (t & 1) * n * 255, r = (t >> 1 & 1) * n * 255, i = (t >> 2 & 1) * n * 255;
1384
- return [a, r, i];
1385
- }, l.ansi256.rgb = function(e) {
1386
- if (e >= 232) {
1387
- const i = (e - 232) * 10 + 8;
1388
- return [i, i, i];
1389
- }
1390
- e -= 16;
1391
- let t;
1392
- const n = Math.floor(e / 36) / 5 * 255, a = Math.floor((t = e % 36) / 6) / 5 * 255, r = t % 6 / 5 * 255;
1393
- return [n, a, r];
1394
- }, l.rgb.hex = function(e) {
1395
- const n = (((Math.round(e[0]) & 255) << 16) + ((Math.round(e[1]) & 255) << 8) + (Math.round(e[2]) & 255)).toString(16).toUpperCase();
1396
- return "000000".substring(n.length) + n;
1397
- }, l.hex.rgb = function(e) {
1398
- const t = e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
1399
- if (!t)
1400
- return [0, 0, 0];
1401
- let n = t[0];
1402
- t[0].length === 3 && (n = n.split("").map((g) => g + g).join(""));
1403
- const a = parseInt(n, 16), r = a >> 16 & 255, i = a >> 8 & 255, u = a & 255;
1404
- return [r, i, u];
1405
- }, l.rgb.hcg = function(e) {
1406
- const t = e[0] / 255, n = e[1] / 255, a = e[2] / 255, r = Math.max(Math.max(t, n), a), i = Math.min(Math.min(t, n), a), u = r - i;
1407
- let g, s;
1408
- return u < 1 ? g = i / (1 - u) : g = 0, u <= 0 ? s = 0 : r === t ? s = (n - a) / u % 6 : r === n ? s = 2 + (a - t) / u : s = 4 + (t - n) / u, s /= 6, s %= 1, [s * 360, u * 100, g * 100];
1409
- }, l.hsl.hcg = function(e) {
1410
- const t = e[1] / 100, n = e[2] / 100, a = n < 0.5 ? 2 * t * n : 2 * t * (1 - n);
1411
- let r = 0;
1412
- return a < 1 && (r = (n - 0.5 * a) / (1 - a)), [e[0], a * 100, r * 100];
1413
- }, l.hsv.hcg = function(e) {
1414
- const t = e[1] / 100, n = e[2] / 100, a = t * n;
1415
- let r = 0;
1416
- return a < 1 && (r = (n - a) / (1 - a)), [e[0], a * 100, r * 100];
1417
- }, l.hcg.rgb = function(e) {
1418
- const t = e[0] / 360, n = e[1] / 100, a = e[2] / 100;
1419
- if (n === 0)
1420
- return [a * 255, a * 255, a * 255];
1421
- const r = [0, 0, 0], i = t % 1 * 6, u = i % 1, g = 1 - u;
1422
- let s = 0;
1423
- switch (Math.floor(i)) {
1424
- case 0:
1425
- r[0] = 1, r[1] = u, r[2] = 0;
1426
- break;
1427
- case 1:
1428
- r[0] = g, r[1] = 1, r[2] = 0;
1429
- break;
1430
- case 2:
1431
- r[0] = 0, r[1] = 1, r[2] = u;
1432
- break;
1433
- case 3:
1434
- r[0] = 0, r[1] = g, r[2] = 1;
1435
- break;
1436
- case 4:
1437
- r[0] = u, r[1] = 0, r[2] = 1;
1438
- break;
1439
- default:
1440
- r[0] = 1, r[1] = 0, r[2] = g;
1441
- }
1442
- return s = (1 - n) * a, [
1443
- (n * r[0] + s) * 255,
1444
- (n * r[1] + s) * 255,
1445
- (n * r[2] + s) * 255
1446
- ];
1447
- }, l.hcg.hsv = function(e) {
1448
- const t = e[1] / 100, n = e[2] / 100, a = t + n * (1 - t);
1449
- let r = 0;
1450
- return a > 0 && (r = t / a), [e[0], r * 100, a * 100];
1451
- }, l.hcg.hsl = function(e) {
1452
- const t = e[1] / 100, a = e[2] / 100 * (1 - t) + 0.5 * t;
1453
- let r = 0;
1454
- return a > 0 && a < 0.5 ? r = t / (2 * a) : a >= 0.5 && a < 1 && (r = t / (2 * (1 - a))), [e[0], r * 100, a * 100];
1455
- }, l.hcg.hwb = function(e) {
1456
- const t = e[1] / 100, n = e[2] / 100, a = t + n * (1 - t);
1457
- return [e[0], (a - t) * 100, (1 - a) * 100];
1458
- }, l.hwb.hcg = function(e) {
1459
- const t = e[1] / 100, a = 1 - e[2] / 100, r = a - t;
1460
- let i = 0;
1461
- return r < 1 && (i = (a - r) / (1 - r)), [e[0], r * 100, i * 100];
1462
- }, l.apple.rgb = function(e) {
1463
- return [e[0] / 65535 * 255, e[1] / 65535 * 255, e[2] / 65535 * 255];
1464
- }, l.rgb.apple = function(e) {
1465
- return [e[0] / 255 * 65535, e[1] / 255 * 65535, e[2] / 255 * 65535];
1466
- }, l.gray.rgb = function(e) {
1467
- return [e[0] / 100 * 255, e[0] / 100 * 255, e[0] / 100 * 255];
1468
- }, l.gray.hsl = function(e) {
1469
- return [0, 0, e[0]];
1470
- }, l.gray.hsv = l.gray.hsl, l.gray.hwb = function(e) {
1471
- return [0, 100, e[0]];
1472
- }, l.gray.cmyk = function(e) {
1473
- return [0, 0, 0, e[0]];
1474
- }, l.gray.lab = function(e) {
1475
- return [e[0], 0, 0];
1476
- }, l.gray.hex = function(e) {
1477
- const t = Math.round(e[0] / 100 * 255) & 255, a = ((t << 16) + (t << 8) + t).toString(16).toUpperCase();
1478
- return "000000".substring(a.length) + a;
1479
- }, l.rgb.gray = function(e) {
1480
- return [(e[0] + e[1] + e[2]) / 3 / 255 * 100];
1481
- }, L;
1482
- }
1483
- var q, te;
1484
- function fr() {
1485
- if (te) return q;
1486
- te = 1;
1487
- const o = fe();
1488
- function c() {
1489
- const t = {}, n = Object.keys(o);
1490
- for (let a = n.length, r = 0; r < a; r++)
1491
- t[n[r]] = {
1492
- // http://jsperf.com/1-vs-infinity
1493
- // micro-opt, but this is simple.
1494
- distance: -1,
1495
- parent: null
1496
- };
1497
- return t;
1498
- }
1499
- function l(t) {
1500
- const n = c(), a = [t];
1501
- for (n[t].distance = 0; a.length; ) {
1502
- const r = a.pop(), i = Object.keys(o[r]);
1503
- for (let u = i.length, g = 0; g < u; g++) {
1504
- const s = i[g], f = n[s];
1505
- f.distance === -1 && (f.distance = n[r].distance + 1, f.parent = r, a.unshift(s));
1506
- }
1507
- }
1508
- return n;
1509
- }
1510
- function p(t, n) {
1511
- return function(a) {
1512
- return n(t(a));
1513
- };
1514
- }
1515
- function e(t, n) {
1516
- const a = [n[t].parent, t];
1517
- let r = o[n[t].parent][t], i = n[t].parent;
1518
- for (; n[i].parent; )
1519
- a.unshift(n[i].parent), r = p(o[n[i].parent][i], r), i = n[i].parent;
1520
- return r.conversion = a, r;
1521
- }
1522
- return q = function(t) {
1523
- const n = l(t), a = {}, r = Object.keys(n);
1524
- for (let i = r.length, u = 0; u < i; u++) {
1525
- const g = r[u];
1526
- n[g].parent !== null && (a[g] = e(g, n));
1527
- }
1528
- return a;
1529
- }, q;
1530
- }
1531
- var S, ne;
1532
- function hr() {
1533
- if (ne) return S;
1534
- ne = 1;
1535
- const o = fe(), c = fr(), l = {}, p = Object.keys(o);
1536
- function e(n) {
1537
- const a = function(...r) {
1538
- const i = r[0];
1539
- return i == null ? i : (i.length > 1 && (r = i), n(r));
1540
- };
1541
- return "conversion" in n && (a.conversion = n.conversion), a;
1542
- }
1543
- function t(n) {
1544
- const a = function(...r) {
1545
- const i = r[0];
1546
- if (i == null)
1547
- return i;
1548
- i.length > 1 && (r = i);
1549
- const u = n(r);
1550
- if (typeof u == "object")
1551
- for (let g = u.length, s = 0; s < g; s++)
1552
- u[s] = Math.round(u[s]);
1553
- return u;
1554
- };
1555
- return "conversion" in n && (a.conversion = n.conversion), a;
1556
- }
1557
- return p.forEach((n) => {
1558
- l[n] = {}, Object.defineProperty(l[n], "channels", { value: o[n].channels }), Object.defineProperty(l[n], "labels", { value: o[n].labels });
1559
- const a = c(n);
1560
- Object.keys(a).forEach((i) => {
1561
- const u = a[i];
1562
- l[n][i] = t(u), l[n][i].raw = e(u);
1563
- });
1564
- }), S = l, S;
1565
- }
1566
- var U, oe;
1567
- function dr() {
1568
- if (oe) return U;
1569
- oe = 1;
1570
- const o = ur(), c = hr(), l = [
1571
- // To be honest, I don't really feel like keyword belongs in color convert, but eh.
1572
- "keyword",
1573
- // Gray conflicts with some method names, and has its own method defined.
1574
- "gray",
1575
- // Shouldn't really be in color-convert either...
1576
- "hex"
1577
- ], p = {};
1578
- for (const s of Object.keys(c))
1579
- p[[...c[s].labels].sort().join("")] = s;
1580
- const e = {};
1581
- function t(s, f) {
1582
- if (!(this instanceof t))
1583
- return new t(s, f);
1584
- if (f && f in l && (f = null), f && !(f in c))
1585
- throw new Error("Unknown model: " + f);
1586
- let h, d;
1587
- if (s == null)
1588
- this.model = "rgb", this.color = [0, 0, 0], this.valpha = 1;
1589
- else if (s instanceof t)
1590
- this.model = s.model, this.color = [...s.color], this.valpha = s.valpha;
1591
- else if (typeof s == "string") {
1592
- const b = o.get(s);
1593
- if (b === null)
1594
- throw new Error("Unable to parse color from string: " + s);
1595
- this.model = b.model, d = c[this.model].channels, this.color = b.value.slice(0, d), this.valpha = typeof b.value[d] == "number" ? b.value[d] : 1;
1596
- } else if (s.length > 0) {
1597
- this.model = f || "rgb", d = c[this.model].channels;
1598
- const b = Array.prototype.slice.call(s, 0, d);
1599
- this.color = g(b, d), this.valpha = typeof s[d] == "number" ? s[d] : 1;
1600
- } else if (typeof s == "number")
1601
- this.model = "rgb", this.color = [
1602
- s >> 16 & 255,
1603
- s >> 8 & 255,
1604
- s & 255
1605
- ], this.valpha = 1;
1606
- else {
1607
- this.valpha = 1;
1608
- const b = Object.keys(s);
1609
- "alpha" in s && (b.splice(b.indexOf("alpha"), 1), this.valpha = typeof s.alpha == "number" ? s.alpha : 0);
1610
- const m = b.sort().join("");
1611
- if (!(m in p))
1612
- throw new Error("Unable to parse color from object: " + JSON.stringify(s));
1613
- this.model = p[m];
1614
- const { labels: v } = c[this.model], w = [];
1615
- for (h = 0; h < v.length; h++)
1616
- w.push(s[v[h]]);
1617
- this.color = g(w);
1618
- }
1619
- if (e[this.model])
1620
- for (d = c[this.model].channels, h = 0; h < d; h++) {
1621
- const b = e[this.model][h];
1622
- b && (this.color[h] = b(this.color[h]));
1623
- }
1624
- this.valpha = Math.max(0, Math.min(1, this.valpha)), Object.freeze && Object.freeze(this);
1625
- }
1626
- t.prototype = {
1627
- toString() {
1628
- return this.string();
1629
- },
1630
- toJSON() {
1631
- return this[this.model]();
1632
- },
1633
- string(s) {
1634
- let f = this.model in o.to ? this : this.rgb();
1635
- f = f.round(typeof s == "number" ? s : 1);
1636
- const h = f.valpha === 1 ? f.color : [...f.color, this.valpha];
1637
- return o.to[f.model](h);
1638
- },
1639
- percentString(s) {
1640
- const f = this.rgb().round(typeof s == "number" ? s : 1), h = f.valpha === 1 ? f.color : [...f.color, this.valpha];
1641
- return o.to.rgb.percent(h);
1642
- },
1643
- array() {
1644
- return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];
1645
- },
1646
- object() {
1647
- const s = {}, { channels: f } = c[this.model], { labels: h } = c[this.model];
1648
- for (let d = 0; d < f; d++)
1649
- s[h[d]] = this.color[d];
1650
- return this.valpha !== 1 && (s.alpha = this.valpha), s;
1651
- },
1652
- unitArray() {
1653
- const s = this.rgb().color;
1654
- return s[0] /= 255, s[1] /= 255, s[2] /= 255, this.valpha !== 1 && s.push(this.valpha), s;
1655
- },
1656
- unitObject() {
1657
- const s = this.rgb().object();
1658
- return s.r /= 255, s.g /= 255, s.b /= 255, this.valpha !== 1 && (s.alpha = this.valpha), s;
1659
- },
1660
- round(s) {
1661
- return s = Math.max(s || 0, 0), new t([...this.color.map(a(s)), this.valpha], this.model);
1662
- },
1663
- alpha(s) {
1664
- return s !== void 0 ? new t([...this.color, Math.max(0, Math.min(1, s))], this.model) : this.valpha;
1665
- },
1666
- // Rgb
1667
- red: r("rgb", 0, i(255)),
1668
- green: r("rgb", 1, i(255)),
1669
- blue: r("rgb", 2, i(255)),
1670
- hue: r(["hsl", "hsv", "hsl", "hwb", "hcg"], 0, (s) => (s % 360 + 360) % 360),
1671
- saturationl: r("hsl", 1, i(100)),
1672
- lightness: r("hsl", 2, i(100)),
1673
- saturationv: r("hsv", 1, i(100)),
1674
- value: r("hsv", 2, i(100)),
1675
- chroma: r("hcg", 1, i(100)),
1676
- gray: r("hcg", 2, i(100)),
1677
- white: r("hwb", 1, i(100)),
1678
- wblack: r("hwb", 2, i(100)),
1679
- cyan: r("cmyk", 0, i(100)),
1680
- magenta: r("cmyk", 1, i(100)),
1681
- yellow: r("cmyk", 2, i(100)),
1682
- black: r("cmyk", 3, i(100)),
1683
- x: r("xyz", 0, i(95.047)),
1684
- y: r("xyz", 1, i(100)),
1685
- z: r("xyz", 2, i(108.833)),
1686
- l: r("lab", 0, i(100)),
1687
- a: r("lab", 1),
1688
- b: r("lab", 2),
1689
- keyword(s) {
1690
- return s !== void 0 ? new t(s) : c[this.model].keyword(this.color);
1691
- },
1692
- hex(s) {
1693
- return s !== void 0 ? new t(s) : o.to.hex(this.rgb().round().color);
1694
- },
1695
- hexa(s) {
1696
- if (s !== void 0)
1697
- return new t(s);
1698
- const f = this.rgb().round().color;
1699
- let h = Math.round(this.valpha * 255).toString(16).toUpperCase();
1700
- return h.length === 1 && (h = "0" + h), o.to.hex(f) + h;
1701
- },
1702
- rgbNumber() {
1703
- const s = this.rgb().color;
1704
- return (s[0] & 255) << 16 | (s[1] & 255) << 8 | s[2] & 255;
1705
- },
1706
- luminosity() {
1707
- const s = this.rgb().color, f = [];
1708
- for (const [h, d] of s.entries()) {
1709
- const b = d / 255;
1710
- f[h] = b <= 0.04045 ? b / 12.92 : ((b + 0.055) / 1.055) ** 2.4;
1711
- }
1712
- return 0.2126 * f[0] + 0.7152 * f[1] + 0.0722 * f[2];
1713
- },
1714
- contrast(s) {
1715
- const f = this.luminosity(), h = s.luminosity();
1716
- return f > h ? (f + 0.05) / (h + 0.05) : (h + 0.05) / (f + 0.05);
1717
- },
1718
- level(s) {
1719
- const f = this.contrast(s);
1720
- return f >= 7 ? "AAA" : f >= 4.5 ? "AA" : "";
1721
- },
1722
- isDark() {
1723
- const s = this.rgb().color;
1724
- return (s[0] * 2126 + s[1] * 7152 + s[2] * 722) / 1e4 < 128;
1725
- },
1726
- isLight() {
1727
- return !this.isDark();
1728
- },
1729
- negate() {
1730
- const s = this.rgb();
1731
- for (let f = 0; f < 3; f++)
1732
- s.color[f] = 255 - s.color[f];
1733
- return s;
1734
- },
1735
- lighten(s) {
1736
- const f = this.hsl();
1737
- return f.color[2] += f.color[2] * s, f;
1738
- },
1739
- darken(s) {
1740
- const f = this.hsl();
1741
- return f.color[2] -= f.color[2] * s, f;
1742
- },
1743
- saturate(s) {
1744
- const f = this.hsl();
1745
- return f.color[1] += f.color[1] * s, f;
1746
- },
1747
- desaturate(s) {
1748
- const f = this.hsl();
1749
- return f.color[1] -= f.color[1] * s, f;
1750
- },
1751
- whiten(s) {
1752
- const f = this.hwb();
1753
- return f.color[1] += f.color[1] * s, f;
1754
- },
1755
- blacken(s) {
1756
- const f = this.hwb();
1757
- return f.color[2] += f.color[2] * s, f;
1758
- },
1759
- grayscale() {
1760
- const s = this.rgb().color, f = s[0] * 0.3 + s[1] * 0.59 + s[2] * 0.11;
1761
- return t.rgb(f, f, f);
1762
- },
1763
- fade(s) {
1764
- return this.alpha(this.valpha - this.valpha * s);
1765
- },
1766
- opaquer(s) {
1767
- return this.alpha(this.valpha + this.valpha * s);
1768
- },
1769
- rotate(s) {
1770
- const f = this.hsl();
1771
- let h = f.color[0];
1772
- return h = (h + s) % 360, h = h < 0 ? 360 + h : h, f.color[0] = h, f;
1773
- },
1774
- mix(s, f) {
1775
- if (!s || !s.rgb)
1776
- throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof s);
1777
- const h = s.rgb(), d = this.rgb(), b = f === void 0 ? 0.5 : f, m = 2 * b - 1, v = h.alpha() - d.alpha(), w = ((m * v === -1 ? m : (m + v) / (1 + m * v)) + 1) / 2, x = 1 - w;
1778
- return t.rgb(
1779
- w * h.red() + x * d.red(),
1780
- w * h.green() + x * d.green(),
1781
- w * h.blue() + x * d.blue(),
1782
- h.alpha() * b + d.alpha() * (1 - b)
1783
- );
1784
- }
1785
- };
1786
- for (const s of Object.keys(c)) {
1787
- if (l.includes(s))
1788
- continue;
1789
- const { channels: f } = c[s];
1790
- t.prototype[s] = function(...h) {
1791
- return this.model === s ? new t(this) : h.length > 0 ? new t(h, s) : new t([...u(c[this.model][s].raw(this.color)), this.valpha], s);
1792
- }, t[s] = function(...h) {
1793
- let d = h[0];
1794
- return typeof d == "number" && (d = g(h, f)), new t(d, s);
1795
- };
1796
- }
1797
- function n(s, f) {
1798
- return Number(s.toFixed(f));
1799
- }
1800
- function a(s) {
1801
- return function(f) {
1802
- return n(f, s);
1803
- };
1804
- }
1805
- function r(s, f, h) {
1806
- s = Array.isArray(s) ? s : [s];
1807
- for (const d of s)
1808
- (e[d] || (e[d] = []))[f] = h;
1809
- return s = s[0], function(d) {
1810
- let b;
1811
- return d !== void 0 ? (h && (d = h(d)), b = this[s](), b.color[f] = d, b) : (b = this[s]().color[f], h && (b = h(b)), b);
1812
- };
1813
- }
1814
- function i(s) {
1815
- return function(f) {
1816
- return Math.max(0, Math.min(s, f));
1817
- };
1818
- }
1819
- function u(s) {
1820
- return Array.isArray(s) ? s : [s];
1821
- }
1822
- function g(s, f) {
1823
- for (let h = 0; h < f; h++)
1824
- typeof s[h] != "number" && (s[h] = 0);
1825
- return s;
1826
- }
1827
- return U = t, U;
1828
- }
1829
- var gr = /* @__PURE__ */ dr();
1830
- const pr = /* @__PURE__ */ ie(gr);
1831
- function he(o, c) {
1832
- return { handler: o, config: c };
1833
- }
1834
- he.withOptions = function(o, c = () => ({})) {
1835
- function l(p) {
1836
- return { handler: o(p), config: c(p) };
1837
- }
1838
- return l.__isOptionsFunction = !0, l;
1839
- };
1840
- var br = he, I, ae;
1841
- function mr() {
1842
- if (ae) return I;
1843
- ae = 1;
1844
- var o = function(v) {
1845
- return c(v) && !l(v);
1846
- };
1847
- function c(m) {
1848
- return !!m && typeof m == "object";
1849
- }
1850
- function l(m) {
1851
- var v = Object.prototype.toString.call(m);
1852
- return v === "[object RegExp]" || v === "[object Date]" || t(m);
1853
- }
1854
- var p = typeof Symbol == "function" && Symbol.for, e = p ? Symbol.for("react.element") : 60103;
1855
- function t(m) {
1856
- return m.$$typeof === e;
1857
- }
1858
- function n(m) {
1859
- return Array.isArray(m) ? [] : {};
1860
- }
1861
- function a(m, v) {
1862
- return v.clone !== !1 && v.isMergeableObject(m) ? d(n(m), m, v) : m;
1863
- }
1864
- function r(m, v, w) {
1865
- return m.concat(v).map(function(x) {
1866
- return a(x, w);
1867
- });
1868
- }
1869
- function i(m, v) {
1870
- if (!v.customMerge)
1871
- return d;
1872
- var w = v.customMerge(m);
1873
- return typeof w == "function" ? w : d;
1874
- }
1875
- function u(m) {
1876
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(m).filter(function(v) {
1877
- return Object.propertyIsEnumerable.call(m, v);
1878
- }) : [];
1879
- }
1880
- function g(m) {
1881
- return Object.keys(m).concat(u(m));
1882
- }
1883
- function s(m, v) {
1884
- try {
1885
- return v in m;
1886
- } catch {
1887
- return !1;
1888
- }
1889
- }
1890
- function f(m, v) {
1891
- return s(m, v) && !(Object.hasOwnProperty.call(m, v) && Object.propertyIsEnumerable.call(m, v));
1892
- }
1893
- function h(m, v, w) {
1894
- var x = {};
1895
- return w.isMergeableObject(m) && g(m).forEach(function(k) {
1896
- x[k] = a(m[k], w);
1897
- }), g(v).forEach(function(k) {
1898
- f(m, k) || (s(m, k) && w.isMergeableObject(v[k]) ? x[k] = i(k, w)(m[k], v[k], w) : x[k] = a(v[k], w));
1899
- }), x;
1900
- }
1901
- function d(m, v, w) {
1902
- w = w || {}, w.arrayMerge = w.arrayMerge || r, w.isMergeableObject = w.isMergeableObject || o, w.cloneUnlessOtherwiseSpecified = a;
1903
- var x = Array.isArray(v), k = Array.isArray(m), E = x === k;
1904
- return E ? x ? w.arrayMerge(m, v, w) : h(m, v, w) : a(v, w);
1905
- }
1906
- d.all = function(v, w) {
1907
- if (!Array.isArray(v))
1908
- throw new Error("first argument should be an array");
1909
- return v.reduce(function(x, k) {
1910
- return d(x, k, w);
1911
- }, {});
1912
- };
1913
- var b = d;
1914
- return I = b, I;
1915
- }
1916
- var yr = mr();
1917
- const F = /* @__PURE__ */ ie(yr);
1918
- var vr = "heroui", se = {}, wr = (o = {}, c, l) => {
1919
- const p = {
1920
- variants: [],
1921
- utilities: {},
1922
- colors: {},
1923
- baseStyles: {}
1924
- };
1925
- for (const [e, { extend: t, layout: n, colors: a }] of Object.entries(o)) {
1926
- let r = `.${e}`;
1927
- const i = e === "light" || e === "dark" ? e : t;
1928
- let u = "";
1929
- e === c && (u = `:root, [data-theme=${e}]`), u && (p.baseStyles[u] = i ? {
1930
- "color-scheme": i
1931
- } : {}), p.utilities[r] = i ? {
1932
- "color-scheme": i
1933
- } : {};
1934
- const g = Le(a), s = n ? we(n, (f, h) => ve(h)) : {};
1935
- p.variants.push({
1936
- name: e,
1937
- definition: [`&.${e}`, `&[data-theme='${e}']`]
1938
- });
1939
- for (const [f, h] of Object.entries(g)) {
1940
- if (!h) return;
1941
- try {
1942
- const d = se[h] || pr(h).hsl().round(2).array();
1943
- se[h] = d;
1944
- const [b, m, v, w] = d, x = `--${l}-${f}`;
1945
- p.utilities[r][x] = `${b} ${m}% ${v}%`, u && (p.baseStyles[u][x] = `${b} ${m}% ${v}%`), p.colors[f] = `hsl(var(${x}) / ${w ?? "<alpha-value>"})`;
1946
- } catch (d) {
1947
- console.log("error", d?.message);
1948
- }
1949
- }
1950
- for (const [f, h] of Object.entries(s)) {
1951
- if (!h) return;
1952
- const d = `--${l}-${f}`;
1953
- if (typeof h == "object")
1954
- for (const [b, m] of Object.entries(h)) {
1955
- const v = `${d}-${b}`;
1956
- p.utilities[r][v] = m, u && (p.baseStyles[u][v] = m);
1957
- }
1958
- else {
1959
- const b = d.includes("opacity") && typeof h == "number" ? h.toString().replace(/^0\./, ".") : h;
1960
- p.utilities[r][d] = b, u && (p.baseStyles[u][d] = b);
1961
- }
1962
- }
1963
- }
1964
- return p;
1965
- }, xr = (o = {}, c, l, p) => {
1966
- const e = wr(o, c, l), t = (n, a) => `linear-gradient(45deg, hsl(var(--${l}-${n})) 25%, hsl(var(--${l}-${a})) 25%, hsl(var(--${l}-${a})) 50%, hsl(var(--${l}-${n})) 50%, hsl(var(--${l}-${n})) 75%, hsl(var(--${l}-${a})) 75%, hsl(var(--${l}-${a})))`;
1967
- return br(
1968
- ({ addBase: n, addUtilities: a, addVariant: r }) => {
1969
- n({
1970
- ":root, [data-theme]": {
1971
- ...Oe(l)
1972
- }
1973
- }), n({ ...e?.baseStyles }), a({ ...e?.utilities, ...Me }), e?.variants.forEach((i) => {
1974
- r(i.name, i.definition);
1975
- });
1976
- },
1977
- // extend the colors config
1978
- {
1979
- theme: {
1980
- extend: {
1981
- // @ts-ignore
1982
- colors: {
1983
- ...p ? y : {},
1984
- ...e?.colors
1985
- },
1986
- scale: {
1987
- 80: "0.8",
1988
- 85: "0.85"
1989
- },
1990
- height: {
1991
- divider: `var(--${l}-divider-weight)`
1992
- },
1993
- width: {
1994
- divider: `var(--${l}-divider-weight)`
1995
- },
1996
- borderRadius: {
1997
- small: `var(--${l}-radius-small)`,
1998
- medium: `var(--${l}-radius-medium)`,
1999
- large: `var(--${l}-radius-large)`
2000
- },
2001
- opacity: {
2002
- hover: `var(--${l}-hover-opacity)`,
2003
- disabled: `var(--${l}-disabled-opacity)`
2004
- },
2005
- borderWidth: {
2006
- small: `var(--${l}-border-width-small)`,
2007
- medium: `var(--${l}-border-width-medium)`,
2008
- large: `var(--${l}-border-width-large)`,
2009
- 1: "1px",
2010
- 1.5: "1.5px",
2011
- 3: "3px",
2012
- 5: "5px"
2013
- },
2014
- boxShadow: {
2015
- small: `var(--${l}-box-shadow-small)`,
2016
- medium: `var(--${l}-box-shadow-medium)`,
2017
- large: `var(--${l}-box-shadow-large)`
2018
- },
2019
- backgroundSize: {
2020
- "stripe-size": "1.25rem 1.25rem"
2021
- },
2022
- backgroundImage: {
2023
- "stripe-gradient-default": t("default-200", "default-400"),
2024
- "stripe-gradient-primary": t("primary-200", "primary"),
2025
- "stripe-gradient-secondary": t("secondary-200", "secondary"),
2026
- "stripe-gradient-success": t("success-200", "success"),
2027
- "stripe-gradient-warning": t("warning-200", "warning"),
2028
- "stripe-gradient-danger": t("danger-200", "danger")
2029
- },
2030
- transitionDuration: {
2031
- 0: "0ms",
2032
- 250: "250ms",
2033
- 400: "400ms"
2034
- },
2035
- transitionTimingFunction: {
2036
- "soft-spring": "cubic-bezier(0.155, 1.105, 0.295, 1.12)"
2037
- },
2038
- ...ir
2039
- }
2040
- }
2041
- }
2042
- );
2043
- }, Qr = (o = {}) => {
2044
- var c, l, p, e;
2045
- const {
2046
- themes: t = {},
2047
- defaultTheme: n = "light",
2048
- layout: a,
2049
- defaultExtendTheme: r = "light",
2050
- prefix: i = vr,
2051
- addCommonColors: u = !1
2052
- } = o, g = ((c = t?.light) == null ? void 0 : c.colors) || {}, s = ((l = t?.dark) == null ? void 0 : l.colors) || {}, f = a && typeof a == "object" ? F(J, a) : J, h = {
2053
- light: {
2054
- ...f,
2055
- ...ar
2056
- },
2057
- dark: {
2058
- ...f,
2059
- ...sr
2060
- }
2061
- };
2062
- let d = ye(t, ["light", "dark"]) || {};
2063
- Object.entries(d).forEach(([w, { extend: x, colors: k, layout: E }]) => {
2064
- const de = x && je(x) ? x : r, P = j[de];
2065
- d[w].colors = k && typeof k == "object" ? F(P, k) : P;
2066
- const V = x ? h[x] : f;
2067
- d[w].layout = E && typeof E == "object" ? F(V, E) : V;
2068
- });
2069
- const b = {
2070
- layout: F(h.light, ((p = t?.light) == null ? void 0 : p.layout) || {}),
2071
- colors: F(j.light, g)
2072
- }, m = {
2073
- layout: F(h.dark, ((e = t?.dark) == null ? void 0 : e.layout) || {}),
2074
- colors: F(j.dark, s)
2075
- }, v = {
2076
- light: b,
2077
- dark: m,
2078
- ...d
2079
- };
2080
- return xr(v, n, i, u);
2081
- };
2082
- export {
2083
- kr as A,
2084
- $r as B,
2085
- Rr as C,
2086
- qr as D,
2087
- Pr as E,
2088
- Jr as F,
2089
- Oe as G,
2090
- sr as H,
2091
- J as I,
2092
- Br as J,
2093
- Qr as K,
2094
- ar as L,
2095
- Er as M,
2096
- _r as _,
2097
- y as a,
2098
- Ar as b,
2099
- Zr as c,
2100
- Hr as d,
2101
- Cr as e,
2102
- xe as f,
2103
- Wr as g,
2104
- Yr as h,
2105
- Fr as i,
2106
- Or as j,
2107
- Mr as k,
2108
- Ur as l,
2109
- Vr as m,
2110
- Dr as n,
2111
- Lr as o,
2112
- Kr as p,
2113
- jr as q,
2114
- Xr as r,
2115
- j as s,
2116
- Gr as t,
2117
- Me as u,
2118
- Sr as v,
2119
- Nr as w,
2120
- Ir as x,
2121
- zr as y,
2122
- Tr as z
2123
- };