cos-design 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +21 -15
- package/dist/components/doublePendulum/index.d.ts +10 -0
- package/dist/components/index.d.ts +12 -0
- package/dist/components/lorenzAttractor/index.d.ts +10 -0
- package/dist/components/metaballPool/index.d.ts +9 -0
- package/dist/components/newtonCradle/index.d.ts +2 -0
- package/dist/components/plasmaBall/index.d.ts +9 -0
- package/dist/components/ropeChain/index.d.ts +10 -0
- package/dist/components/solarSystem/index.d.ts +9 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +903 -308
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -289,7 +289,7 @@ import './index.css';var d = {
|
|
|
289
289
|
circle: "cos-circle-m4vwX",
|
|
290
290
|
circleRotate: "cos-circleRotate-bgFw5",
|
|
291
291
|
button: "cos-button-myCst"
|
|
292
|
-
},
|
|
292
|
+
}, T = 15, ee = 258, te = (e) => {
|
|
293
293
|
let { initQuantity: t = 0, value: r, onChange: i, autoCharge: a = !0, interval: c = 500, step: d = .01 } = e, f = o(null), p = r !== void 0, [m, h] = s(() => y(t, 0, 100)), g = y(p ? r : m, 0, 100), _ = o(g), v = o(i);
|
|
294
294
|
n(() => {
|
|
295
295
|
v.current = i;
|
|
@@ -299,7 +299,7 @@ import './index.css';var d = {
|
|
|
299
299
|
let e = f.current;
|
|
300
300
|
if (!e) return;
|
|
301
301
|
let t = () => {
|
|
302
|
-
let t = Math.max(0, e.clientHeight -
|
|
302
|
+
let t = Math.max(0, e.clientHeight - ee);
|
|
303
303
|
e.style.setProperty("--charge-rise-max", `${t}px`);
|
|
304
304
|
};
|
|
305
305
|
t();
|
|
@@ -328,7 +328,7 @@ import './index.css';var d = {
|
|
|
328
328
|
children: [/* @__PURE__ */ u("div", {
|
|
329
329
|
className: w.contrast,
|
|
330
330
|
children: [
|
|
331
|
-
Array.from({ length:
|
|
331
|
+
Array.from({ length: T }, (e, t) => /* @__PURE__ */ l("span", {
|
|
332
332
|
className: w.bubble,
|
|
333
333
|
"data-index": t + 1
|
|
334
334
|
}, t)),
|
|
@@ -340,12 +340,12 @@ import './index.css';var d = {
|
|
|
340
340
|
children: [b, "%"]
|
|
341
341
|
})]
|
|
342
342
|
});
|
|
343
|
-
},
|
|
343
|
+
}, E = {
|
|
344
344
|
clickSpark: "cos-clickSpark-db9Om",
|
|
345
345
|
canvas: "cos-canvas-p9fnQ",
|
|
346
346
|
content: "cos-content-7uE4T",
|
|
347
347
|
hint: "cos-hint-UqpWX"
|
|
348
|
-
},
|
|
348
|
+
}, D = ({ children: e, color: r = "#fbbf24", count: i = 16 }) => {
|
|
349
349
|
let a = o(null), s = o(null), c = o([]), d = o(0), f = t((e, t) => {
|
|
350
350
|
for (let n = 0; n < i; n++) {
|
|
351
351
|
let r = Math.PI * 2 * n / i + Math.random() * .3, a = Math.random() * 4 + 2;
|
|
@@ -383,7 +383,7 @@ import './index.css';var d = {
|
|
|
383
383
|
};
|
|
384
384
|
}, [r]), /* @__PURE__ */ u("div", {
|
|
385
385
|
ref: a,
|
|
386
|
-
className:
|
|
386
|
+
className: E.clickSpark,
|
|
387
387
|
onClick: (e) => {
|
|
388
388
|
let t = a.current?.getBoundingClientRect();
|
|
389
389
|
t && f(e.clientX - t.left, e.clientY - t.top);
|
|
@@ -391,23 +391,23 @@ import './index.css';var d = {
|
|
|
391
391
|
children: [
|
|
392
392
|
/* @__PURE__ */ l("canvas", {
|
|
393
393
|
ref: s,
|
|
394
|
-
className:
|
|
394
|
+
className: E.canvas
|
|
395
395
|
}),
|
|
396
396
|
e && /* @__PURE__ */ l("div", {
|
|
397
|
-
className:
|
|
397
|
+
className: E.content,
|
|
398
398
|
children: e
|
|
399
399
|
}),
|
|
400
400
|
!e && /* @__PURE__ */ l("p", {
|
|
401
|
-
className:
|
|
401
|
+
className: E.hint,
|
|
402
402
|
children: "点击任意位置产生火花"
|
|
403
403
|
})
|
|
404
404
|
]
|
|
405
405
|
});
|
|
406
|
-
},
|
|
406
|
+
}, O = {
|
|
407
407
|
confetti: "cos-confetti-MeNtU",
|
|
408
408
|
canvas: "cos-canvas-0T3Vs",
|
|
409
409
|
hint: "cos-hint-sGHEi"
|
|
410
|
-
},
|
|
410
|
+
}, k = [
|
|
411
411
|
"#ff6b6b",
|
|
412
412
|
"#ffd93d",
|
|
413
413
|
"#6bcb77",
|
|
@@ -415,7 +415,7 @@ import './index.css';var d = {
|
|
|
415
415
|
"#a66cff",
|
|
416
416
|
"#ff85c0",
|
|
417
417
|
"#38bdf8"
|
|
418
|
-
],
|
|
418
|
+
], A = () => k[Math.floor(Math.random() * k.length)], j = (e, t, n) => {
|
|
419
419
|
let r = e / 2, i = t * .6;
|
|
420
420
|
return Array.from({ length: n }, () => {
|
|
421
421
|
let e = (Math.random() - .5) * Math.PI, t = Math.random() * 12 + 6;
|
|
@@ -426,14 +426,14 @@ import './index.css';var d = {
|
|
|
426
426
|
vy: Math.sin(e) * t - Math.random() * 8,
|
|
427
427
|
rotation: Math.random() * 360,
|
|
428
428
|
rotationSpeed: (Math.random() - .5) * 12,
|
|
429
|
-
color:
|
|
429
|
+
color: A(),
|
|
430
430
|
width: Math.random() * 8 + 4,
|
|
431
431
|
height: Math.random() * 6 + 3,
|
|
432
432
|
alpha: 1,
|
|
433
433
|
gravity: Math.random() * .15 + .12
|
|
434
434
|
};
|
|
435
435
|
});
|
|
436
|
-
},
|
|
436
|
+
}, ne = e(({ width: e = 800, height: r = 400, auto: a = !0, particleCount: s = 120 }, c) => {
|
|
437
437
|
let d = o(null), f = o([]), p = o(0), m = o({
|
|
438
438
|
width: e,
|
|
439
439
|
height: r,
|
|
@@ -446,7 +446,7 @@ import './index.css';var d = {
|
|
|
446
446
|
};
|
|
447
447
|
let h = t(() => {
|
|
448
448
|
let { width: e, height: t, particleCount: n } = m.current;
|
|
449
|
-
f.current.push(...
|
|
449
|
+
f.current.push(...j(e, t, n));
|
|
450
450
|
}, []);
|
|
451
451
|
return i(c, () => ({ burst: h }), [h]), n(() => {
|
|
452
452
|
a && h();
|
|
@@ -467,30 +467,30 @@ import './index.css';var d = {
|
|
|
467
467
|
cancelAnimationFrame(p.current), o();
|
|
468
468
|
};
|
|
469
469
|
}, [r, e]), /* @__PURE__ */ u("div", {
|
|
470
|
-
className:
|
|
470
|
+
className: O.confetti,
|
|
471
471
|
style: {
|
|
472
472
|
width: e,
|
|
473
473
|
height: r
|
|
474
474
|
},
|
|
475
475
|
children: [/* @__PURE__ */ l("canvas", {
|
|
476
476
|
ref: d,
|
|
477
|
-
className:
|
|
477
|
+
className: O.canvas,
|
|
478
478
|
style: {
|
|
479
479
|
width: e,
|
|
480
480
|
height: r
|
|
481
481
|
},
|
|
482
482
|
onClick: h
|
|
483
483
|
}), /* @__PURE__ */ l("p", {
|
|
484
|
-
className:
|
|
484
|
+
className: O.hint,
|
|
485
485
|
children: "点击画布再次喷射"
|
|
486
486
|
})]
|
|
487
487
|
});
|
|
488
488
|
});
|
|
489
|
-
|
|
490
|
-
var
|
|
489
|
+
ne.displayName = "Confetti";
|
|
490
|
+
var re = {
|
|
491
491
|
cyberGrid: "cos-cyberGrid-VgJwl",
|
|
492
492
|
canvas: "cos-canvas--Mq-O"
|
|
493
|
-
},
|
|
493
|
+
}, ie = ({ width: e = 800, height: t = 500, color: r = "#00f0ff", speed: i = 1 }) => {
|
|
494
494
|
let a = o(null), s = o(0), c = o(0);
|
|
495
495
|
return n(() => {
|
|
496
496
|
let n = a.current;
|
|
@@ -532,21 +532,21 @@ var ce = {
|
|
|
532
532
|
i,
|
|
533
533
|
e
|
|
534
534
|
]), /* @__PURE__ */ l("div", {
|
|
535
|
-
className:
|
|
535
|
+
className: re.cyberGrid,
|
|
536
536
|
style: {
|
|
537
537
|
width: e,
|
|
538
538
|
height: t
|
|
539
539
|
},
|
|
540
540
|
children: /* @__PURE__ */ l("canvas", {
|
|
541
541
|
ref: a,
|
|
542
|
-
className:
|
|
542
|
+
className: re.canvas,
|
|
543
543
|
style: {
|
|
544
544
|
width: e,
|
|
545
545
|
height: t
|
|
546
546
|
}
|
|
547
547
|
})
|
|
548
548
|
});
|
|
549
|
-
},
|
|
549
|
+
}, M = {
|
|
550
550
|
countdown: "cos-countdown-5ZKKP",
|
|
551
551
|
unit: "cos-unit-dth8N",
|
|
552
552
|
value: "cos-value-yVzcP",
|
|
@@ -554,7 +554,7 @@ var ce = {
|
|
|
554
554
|
ended: "cos-ended-c0dsD",
|
|
555
555
|
pulse: "cos-pulse-krQd-",
|
|
556
556
|
invalid: "cos-invalid-d6t-L"
|
|
557
|
-
},
|
|
557
|
+
}, ae = (e) => e instanceof Date ? e.getTime() : typeof e == "number" ? e : new Date(e).getTime(), oe = (e) => {
|
|
558
558
|
let t = Math.max(0, e - Date.now()), n = Math.floor(t / 1e3);
|
|
559
559
|
return {
|
|
560
560
|
total: t,
|
|
@@ -563,7 +563,7 @@ var ce = {
|
|
|
563
563
|
minutes: Math.floor(n % 3600 / 60),
|
|
564
564
|
seconds: n % 60
|
|
565
565
|
};
|
|
566
|
-
},
|
|
566
|
+
}, se = [
|
|
567
567
|
{
|
|
568
568
|
key: "days",
|
|
569
569
|
label: "天"
|
|
@@ -580,8 +580,8 @@ var ce = {
|
|
|
580
580
|
key: "seconds",
|
|
581
581
|
label: "秒"
|
|
582
582
|
}
|
|
583
|
-
],
|
|
584
|
-
let c = a(() =>
|
|
583
|
+
], ce = ({ targetDate: e, onEnd: t, showLabels: r = !0, color: i = "#f472b6" }) => {
|
|
584
|
+
let c = a(() => ae(e), [e]), d = !Number.isNaN(c), [, f] = s(0), p = o(!1), m = o(t), h = d ? oe(c) : {
|
|
585
585
|
days: 0,
|
|
586
586
|
hours: 0,
|
|
587
587
|
minutes: 0,
|
|
@@ -601,32 +601,32 @@ var ce = {
|
|
|
601
601
|
}, 1e3);
|
|
602
602
|
return () => clearInterval(e);
|
|
603
603
|
}, [d, c]), d ? /* @__PURE__ */ u("div", {
|
|
604
|
-
className:
|
|
604
|
+
className: M.countdown,
|
|
605
605
|
style: { "--countdown-color": i },
|
|
606
|
-
children: [
|
|
607
|
-
className:
|
|
606
|
+
children: [se.map(({ key: e, label: t }) => /* @__PURE__ */ u("div", {
|
|
607
|
+
className: M.unit,
|
|
608
608
|
children: [/* @__PURE__ */ l("div", {
|
|
609
|
-
className:
|
|
609
|
+
className: M.value,
|
|
610
610
|
children: String(h[e]).padStart(2, "0")
|
|
611
611
|
}), r && /* @__PURE__ */ l("span", {
|
|
612
|
-
className:
|
|
612
|
+
className: M.label,
|
|
613
613
|
children: t
|
|
614
614
|
})]
|
|
615
615
|
}, e)), h.total <= 0 && /* @__PURE__ */ l("p", {
|
|
616
|
-
className:
|
|
616
|
+
className: M.ended,
|
|
617
617
|
children: "时间到!"
|
|
618
618
|
})]
|
|
619
619
|
}) : /* @__PURE__ */ l("div", {
|
|
620
|
-
className:
|
|
620
|
+
className: M.countdown,
|
|
621
621
|
children: /* @__PURE__ */ l("p", {
|
|
622
|
-
className:
|
|
622
|
+
className: M.invalid,
|
|
623
623
|
children: "无效的目标时间"
|
|
624
624
|
})
|
|
625
625
|
});
|
|
626
|
-
},
|
|
626
|
+
}, le = {
|
|
627
627
|
dnaHelix: "cos-dnaHelix-nEQLW",
|
|
628
628
|
canvas: "cos-canvas-uEV8B"
|
|
629
|
-
},
|
|
629
|
+
}, ue = ({ width: e = 200, height: t = 360, speed: r = 1, color: i = "#38bdf8" }) => {
|
|
630
630
|
let a = o(null);
|
|
631
631
|
return n(() => {
|
|
632
632
|
let n = a.current;
|
|
@@ -656,28 +656,28 @@ var ce = {
|
|
|
656
656
|
r,
|
|
657
657
|
e
|
|
658
658
|
]), /* @__PURE__ */ l("div", {
|
|
659
|
-
className:
|
|
659
|
+
className: le.dnaHelix,
|
|
660
660
|
style: {
|
|
661
661
|
width: e,
|
|
662
662
|
height: t
|
|
663
663
|
},
|
|
664
664
|
children: /* @__PURE__ */ l("canvas", {
|
|
665
665
|
ref: a,
|
|
666
|
-
className:
|
|
666
|
+
className: le.canvas,
|
|
667
667
|
style: {
|
|
668
668
|
width: e,
|
|
669
669
|
height: t
|
|
670
670
|
}
|
|
671
671
|
})
|
|
672
672
|
});
|
|
673
|
-
},
|
|
673
|
+
}, de = {
|
|
674
674
|
electricArc: "cos-electricArc-BFlY3",
|
|
675
675
|
canvas: "cos-canvas-iowDx"
|
|
676
|
-
},
|
|
676
|
+
}, fe = (e, t, n, r, i, a) => {
|
|
677
677
|
if (a <= 0) return [[e, t], [n, r]];
|
|
678
|
-
let o = (e + n) / 2, s = (t + r) / 2, c = n - e, l = r - t, u = Math.hypot(c, l) || 1, d = (Math.random() - .5) * i, f = -l / u * d, p = c / u * d, m =
|
|
678
|
+
let o = (e + n) / 2, s = (t + r) / 2, c = n - e, l = r - t, u = Math.hypot(c, l) || 1, d = (Math.random() - .5) * i, f = -l / u * d, p = c / u * d, m = fe(e, t, o + f, s + p, i * .6, a - 1), h = fe(o + f, s + p, n, r, i * .6, a - 1);
|
|
679
679
|
return [...m.slice(0, -1), ...h];
|
|
680
|
-
},
|
|
680
|
+
}, pe = ({ width: e = 320, height: t = 160, color: r = "#67e8f9" }) => {
|
|
681
681
|
let i = o(null);
|
|
682
682
|
return n(() => {
|
|
683
683
|
let n = i.current;
|
|
@@ -692,7 +692,7 @@ var ce = {
|
|
|
692
692
|
}), p = () => {
|
|
693
693
|
if (u = requestAnimationFrame(p), d) return;
|
|
694
694
|
o.fillStyle = "#0f172a", o.fillRect(0, 0, e, t);
|
|
695
|
-
let n =
|
|
695
|
+
let n = fe(40, s, c, l, 40, 5);
|
|
696
696
|
o.beginPath(), n.forEach(([e, t], n) => n === 0 ? o.moveTo(e, t) : o.lineTo(e, t)), o.strokeStyle = r, o.lineWidth = 2, o.shadowColor = r, o.shadowBlur = 12, o.stroke(), o.shadowBlur = 0, o.beginPath(), n.forEach(([e, t], n) => n === 0 ? o.moveTo(e, t) : o.lineTo(e, t)), o.strokeStyle = "#fff", o.lineWidth = .8, o.globalAlpha = .6, o.stroke(), o.globalAlpha = 1, [[40, s], [c, l]].forEach(([e, t]) => {
|
|
697
697
|
o.beginPath(), o.arc(e, t, 6, 0, Math.PI * 2), o.fillStyle = r, o.fill();
|
|
698
698
|
});
|
|
@@ -705,25 +705,25 @@ var ce = {
|
|
|
705
705
|
t,
|
|
706
706
|
e
|
|
707
707
|
]), /* @__PURE__ */ l("div", {
|
|
708
|
-
className:
|
|
708
|
+
className: de.electricArc,
|
|
709
709
|
style: {
|
|
710
710
|
width: e,
|
|
711
711
|
height: t
|
|
712
712
|
},
|
|
713
713
|
children: /* @__PURE__ */ l("canvas", {
|
|
714
714
|
ref: i,
|
|
715
|
-
className:
|
|
715
|
+
className: de.canvas,
|
|
716
716
|
style: {
|
|
717
717
|
width: e,
|
|
718
718
|
height: t
|
|
719
719
|
}
|
|
720
720
|
})
|
|
721
721
|
});
|
|
722
|
-
},
|
|
722
|
+
}, me = {
|
|
723
723
|
cursorTrail: "cos-cursorTrail-fpz5p",
|
|
724
724
|
canvas: "cos-canvas-Iuyp3",
|
|
725
725
|
hint: "cos-hint-9GLHx"
|
|
726
|
-
},
|
|
726
|
+
}, he = ({ color: e = "#38bdf8", length: t = 20, width: r = 800, height: i = 400 }) => {
|
|
727
727
|
let a = o(null), s = o([]), c = o({
|
|
728
728
|
x: r / 2,
|
|
729
729
|
y: i / 2
|
|
@@ -762,14 +762,14 @@ var ce = {
|
|
|
762
762
|
t,
|
|
763
763
|
r
|
|
764
764
|
]), /* @__PURE__ */ u("div", {
|
|
765
|
-
className:
|
|
765
|
+
className: me.cursorTrail,
|
|
766
766
|
style: {
|
|
767
767
|
width: r,
|
|
768
768
|
height: i
|
|
769
769
|
},
|
|
770
770
|
children: [/* @__PURE__ */ l("canvas", {
|
|
771
771
|
ref: a,
|
|
772
|
-
className:
|
|
772
|
+
className: me.canvas,
|
|
773
773
|
style: {
|
|
774
774
|
width: r,
|
|
775
775
|
height: i
|
|
@@ -782,11 +782,11 @@ var ce = {
|
|
|
782
782
|
};
|
|
783
783
|
}
|
|
784
784
|
}), /* @__PURE__ */ l("p", {
|
|
785
|
-
className:
|
|
785
|
+
className: me.hint,
|
|
786
786
|
children: "移动鼠标查看粒子轨迹"
|
|
787
787
|
})]
|
|
788
788
|
});
|
|
789
|
-
},
|
|
789
|
+
}, N = {
|
|
790
790
|
diceRoll: "cos-diceRoll-GDwjV",
|
|
791
791
|
scene: "cos-scene-tmnKM",
|
|
792
792
|
cube: "cos-cube-RklEa",
|
|
@@ -801,7 +801,7 @@ var ce = {
|
|
|
801
801
|
face6: "cos-face6-Yp-MX",
|
|
802
802
|
rollBtn: "cos-rollBtn-nXMWJ",
|
|
803
803
|
result: "cos-result-kXzu9"
|
|
804
|
-
},
|
|
804
|
+
}, ge = {
|
|
805
805
|
1: {
|
|
806
806
|
x: 0,
|
|
807
807
|
y: 0
|
|
@@ -826,7 +826,7 @@ var ce = {
|
|
|
826
826
|
x: 90,
|
|
827
827
|
y: 0
|
|
828
828
|
}
|
|
829
|
-
},
|
|
829
|
+
}, _e = ({ onRoll: e, sides: t = 6 }) => {
|
|
830
830
|
let [r, i] = s(!1), [a, c] = s(1), [d, f] = s({
|
|
831
831
|
x: 0,
|
|
832
832
|
y: 0,
|
|
@@ -838,7 +838,7 @@ var ce = {
|
|
|
838
838
|
let h = () => {
|
|
839
839
|
if (r) return;
|
|
840
840
|
i(!0);
|
|
841
|
-
let e = Math.floor(Math.random() * t) + 1, n =
|
|
841
|
+
let e = Math.floor(Math.random() * t) + 1, n = ge[e] ?? ge[1], a = 360 * (3 + Math.floor(Math.random() * 3)), o = 360 * (3 + Math.floor(Math.random() * 3));
|
|
842
842
|
f({
|
|
843
843
|
x: n.x + a,
|
|
844
844
|
y: n.y + o,
|
|
@@ -876,19 +876,19 @@ var ce = {
|
|
|
876
876
|
[75, 75]
|
|
877
877
|
]
|
|
878
878
|
}[e] ?? []).map(([e, t], n) => /* @__PURE__ */ l("span", {
|
|
879
|
-
className:
|
|
879
|
+
className: N.dot,
|
|
880
880
|
style: {
|
|
881
881
|
left: `${e}%`,
|
|
882
882
|
top: `${t}%`
|
|
883
883
|
}
|
|
884
884
|
}, n));
|
|
885
885
|
return /* @__PURE__ */ u("div", {
|
|
886
|
-
className:
|
|
886
|
+
className: N.diceRoll,
|
|
887
887
|
children: [
|
|
888
888
|
/* @__PURE__ */ l("div", {
|
|
889
|
-
className:
|
|
889
|
+
className: N.scene,
|
|
890
890
|
children: /* @__PURE__ */ l("div", {
|
|
891
|
-
className: `${
|
|
891
|
+
className: `${N.cube} ${r ? N.rolling : ""}`,
|
|
892
892
|
style: { transform: `rotateX(${d.x}deg) rotateY(${d.y}deg) rotateZ(${d.z}deg)` },
|
|
893
893
|
children: [
|
|
894
894
|
1,
|
|
@@ -898,36 +898,90 @@ var ce = {
|
|
|
898
898
|
5,
|
|
899
899
|
6
|
|
900
900
|
].map((e) => /* @__PURE__ */ l("div", {
|
|
901
|
-
className: `${
|
|
901
|
+
className: `${N.face} ${N[`face${e}`]}`,
|
|
902
902
|
children: g(e)
|
|
903
903
|
}, e))
|
|
904
904
|
})
|
|
905
905
|
}),
|
|
906
906
|
/* @__PURE__ */ l("button", {
|
|
907
907
|
type: "button",
|
|
908
|
-
className:
|
|
908
|
+
className: N.rollBtn,
|
|
909
909
|
onClick: h,
|
|
910
910
|
disabled: r,
|
|
911
911
|
children: r ? "掷骰中..." : "掷骰子"
|
|
912
912
|
}),
|
|
913
913
|
!r && /* @__PURE__ */ u("p", {
|
|
914
|
-
className:
|
|
914
|
+
className: N.result,
|
|
915
915
|
children: ["点数: ", a]
|
|
916
916
|
})
|
|
917
917
|
]
|
|
918
918
|
});
|
|
919
|
-
},
|
|
919
|
+
}, ve = {
|
|
920
|
+
doublePendulum: "cos-doublePendulum-FUEeK",
|
|
921
|
+
canvas: "cos-canvas-OVkhW"
|
|
922
|
+
}, ye = ({ width: e = 400, height: t = 400, trailLength: r = 120, color: i = "#38bdf8", color2: a = "#a78bfa" }) => {
|
|
923
|
+
let s = o(null), c = o({
|
|
924
|
+
theta1: Math.PI / 2 + .1,
|
|
925
|
+
theta2: Math.PI / 2 - .2,
|
|
926
|
+
omega1: 0,
|
|
927
|
+
omega2: 0
|
|
928
|
+
}), u = o([]);
|
|
929
|
+
return n(() => {
|
|
930
|
+
let n = s.current;
|
|
931
|
+
if (!n) return;
|
|
932
|
+
let o = window.devicePixelRatio || 1;
|
|
933
|
+
n.width = e * o, n.height = t * o;
|
|
934
|
+
let l = n.getContext("2d");
|
|
935
|
+
if (!l) return;
|
|
936
|
+
l.setTransform(o, 0, 0, o, 0, 0);
|
|
937
|
+
let d = e / 2, f = t * .28, p = t * .28, m = t * .26, h = 9.8, g = .016, _ = 0, y = document.hidden, b = v((e) => {
|
|
938
|
+
y = e;
|
|
939
|
+
}), x = () => {
|
|
940
|
+
if (_ = requestAnimationFrame(x), y) return;
|
|
941
|
+
let n = c.current, { theta1: o, theta2: s, omega1: v, omega2: b } = n, S = Math.sin(o), C = Math.sin(o - s), w = Math.cos(o - s), T = Math.cos(o), ee = p * (3 - 1 * Math.cos(2 * o - 2 * s)), te = (-9.8 * 3 * S - 1 * h * Math.sin(o - 2 * s) - 2 * C * 1 * (b * b * m + v * v * p * w)) / ee, E = 2 * C * (v * v * p * 2 + h * 2 * T + b * b * m * 1 * w) / (m * (3 - 1 * Math.cos(2 * o - 2 * s)));
|
|
942
|
+
n.omega1 += te * g, n.omega2 += E * g, n.theta1 += n.omega1 * g, n.theta2 += n.omega2 * g;
|
|
943
|
+
let D = d + p * Math.sin(n.theta1), O = f + p * Math.cos(n.theta1), k = D + m * Math.sin(n.theta2), A = O + m * Math.cos(n.theta2), j = u.current;
|
|
944
|
+
j.push({
|
|
945
|
+
x: k,
|
|
946
|
+
y: A
|
|
947
|
+
}), j.length > r && j.shift(), l.fillStyle = "rgba(15, 23, 42, 0.22)", l.fillRect(0, 0, e, t), j.length > 1 && (l.beginPath(), j.forEach((e, t) => t === 0 ? l.moveTo(e.x, e.y) : l.lineTo(e.x, e.y)), l.strokeStyle = a, l.lineWidth = 1.5, l.globalAlpha = .7, l.stroke(), l.globalAlpha = 1), l.beginPath(), l.moveTo(d, f), l.lineTo(D, O), l.lineTo(k, A), l.strokeStyle = "#64748b", l.lineWidth = 2, l.stroke(), l.beginPath(), l.arc(d, f, 5, 0, Math.PI * 2), l.fillStyle = "#94a3b8", l.fill(), l.beginPath(), l.arc(D, O, 10, 0, Math.PI * 2), l.fillStyle = i, l.shadowColor = i, l.shadowBlur = 10, l.fill(), l.shadowBlur = 0, l.beginPath(), l.arc(k, A, 10, 0, Math.PI * 2), l.fillStyle = a, l.shadowColor = a, l.shadowBlur = 10, l.fill(), l.shadowBlur = 0;
|
|
948
|
+
};
|
|
949
|
+
return l.fillStyle = "#0f172a", l.fillRect(0, 0, e, t), x(), () => {
|
|
950
|
+
cancelAnimationFrame(_), b();
|
|
951
|
+
};
|
|
952
|
+
}, [
|
|
953
|
+
i,
|
|
954
|
+
a,
|
|
955
|
+
t,
|
|
956
|
+
r,
|
|
957
|
+
e
|
|
958
|
+
]), /* @__PURE__ */ l("div", {
|
|
959
|
+
className: ve.doublePendulum,
|
|
960
|
+
style: {
|
|
961
|
+
width: e,
|
|
962
|
+
height: t
|
|
963
|
+
},
|
|
964
|
+
children: /* @__PURE__ */ l("canvas", {
|
|
965
|
+
ref: s,
|
|
966
|
+
className: ve.canvas,
|
|
967
|
+
style: {
|
|
968
|
+
width: e,
|
|
969
|
+
height: t
|
|
970
|
+
}
|
|
971
|
+
})
|
|
972
|
+
});
|
|
973
|
+
}, be = {
|
|
920
974
|
fireworks: "cos-fireworks-fsSqL",
|
|
921
975
|
canvas: "cos-canvas-spL8G",
|
|
922
976
|
hint: "cos-hint-5XDRH"
|
|
923
|
-
},
|
|
977
|
+
}, xe = [
|
|
924
978
|
"#ff6b6b",
|
|
925
979
|
"#ffd93d",
|
|
926
980
|
"#6bcb77",
|
|
927
981
|
"#4d96ff",
|
|
928
982
|
"#a66cff",
|
|
929
983
|
"#ff85c0"
|
|
930
|
-
],
|
|
984
|
+
], Se = .12, Ce = 240, we = () => xe[Math.floor(Math.random() * xe.length)], Te = (e, t, n) => {
|
|
931
985
|
let r = 60 + Math.floor(Math.random() * 30);
|
|
932
986
|
return Array.from({ length: r }, () => {
|
|
933
987
|
let r = Math.random() * Math.PI * 2, i = Math.random() * 4 + 2;
|
|
@@ -937,11 +991,11 @@ var ce = {
|
|
|
937
991
|
vx: Math.cos(r) * i,
|
|
938
992
|
vy: Math.sin(r) * i,
|
|
939
993
|
alpha: 1,
|
|
940
|
-
color: Math.random() > .3 ? n :
|
|
994
|
+
color: Math.random() > .3 ? n : we(),
|
|
941
995
|
decay: Math.random() * .015 + .01
|
|
942
996
|
};
|
|
943
997
|
});
|
|
944
|
-
},
|
|
998
|
+
}, Ee = e(({ width: e = 800, height: r = 500, auto: a = !0 }, s) => {
|
|
945
999
|
let c = o(null), d = o([]), f = o(0), p = t((t) => {
|
|
946
1000
|
let n = t ?? Math.random() * e * .6 + e * .2;
|
|
947
1001
|
d.current.push({
|
|
@@ -949,7 +1003,7 @@ var ce = {
|
|
|
949
1003
|
y: r,
|
|
950
1004
|
vy: -(Math.random() * 4 + 6),
|
|
951
1005
|
targetY: Math.random() * r * .35 + r * .15,
|
|
952
|
-
color:
|
|
1006
|
+
color: we(),
|
|
953
1007
|
exploded: !1,
|
|
954
1008
|
particles: [],
|
|
955
1009
|
age: 0
|
|
@@ -968,9 +1022,9 @@ var ce = {
|
|
|
968
1022
|
}), u = () => {
|
|
969
1023
|
f.current = requestAnimationFrame(u), !s && (i.fillStyle = "rgb(15 23 42 / 25%)", i.fillRect(0, 0, e, r), d.current = d.current.filter((e) => {
|
|
970
1024
|
if (!e.exploded) {
|
|
971
|
-
e.age += 1, e.y += e.vy, e.vy +=
|
|
972
|
-
let t = e.vy >= 0, n = e.y <= e.targetY, r = e.y < 0, a = e.age >=
|
|
973
|
-
return (t || n || r || a) && (e.exploded = !0, e.particles =
|
|
1025
|
+
e.age += 1, e.y += e.vy, e.vy += Se, i.beginPath(), i.arc(e.x, e.y, 2.5, 0, Math.PI * 2), i.fillStyle = e.color, i.fill();
|
|
1026
|
+
let t = e.vy >= 0, n = e.y <= e.targetY, r = e.y < 0, a = e.age >= Ce;
|
|
1027
|
+
return (t || n || r || a) && (e.exploded = !0, e.particles = Te(e.x, e.y, e.color)), !0;
|
|
974
1028
|
}
|
|
975
1029
|
return e.particles = e.particles.filter((e) => (e.x += e.vx, e.y += e.vy, e.vy += .06, e.alpha -= e.decay, e.alpha <= 0 ? !1 : (i.beginPath(), i.arc(e.x, e.y, 2, 0, Math.PI * 2), i.fillStyle = e.color, i.globalAlpha = e.alpha, i.fill(), i.globalAlpha = 1, !0))), e.particles.length > 0;
|
|
976
1030
|
}));
|
|
@@ -984,14 +1038,14 @@ var ce = {
|
|
|
984
1038
|
p,
|
|
985
1039
|
e
|
|
986
1040
|
]), /* @__PURE__ */ u("div", {
|
|
987
|
-
className:
|
|
1041
|
+
className: be.fireworks,
|
|
988
1042
|
style: {
|
|
989
1043
|
width: e,
|
|
990
1044
|
height: r
|
|
991
1045
|
},
|
|
992
1046
|
children: [/* @__PURE__ */ l("canvas", {
|
|
993
1047
|
ref: c,
|
|
994
|
-
className:
|
|
1048
|
+
className: be.canvas,
|
|
995
1049
|
style: {
|
|
996
1050
|
width: e,
|
|
997
1051
|
height: r
|
|
@@ -1001,13 +1055,13 @@ var ce = {
|
|
|
1001
1055
|
p(e.clientX - t.left);
|
|
1002
1056
|
}
|
|
1003
1057
|
}), /* @__PURE__ */ l("p", {
|
|
1004
|
-
className:
|
|
1058
|
+
className: be.hint,
|
|
1005
1059
|
children: "点击画布燃放烟花"
|
|
1006
1060
|
})]
|
|
1007
1061
|
});
|
|
1008
1062
|
});
|
|
1009
|
-
|
|
1010
|
-
var
|
|
1063
|
+
Ee.displayName = "Fireworks";
|
|
1064
|
+
var P = {
|
|
1011
1065
|
flipCounter: "cos-flipCounter-3LuI0",
|
|
1012
1066
|
digit: "cos-digit-yJRPy",
|
|
1013
1067
|
digitCard: "cos-digitCard-zZUzt",
|
|
@@ -1019,7 +1073,7 @@ var j = {
|
|
|
1019
1073
|
isFlipping: "cos-isFlipping-EVEdI",
|
|
1020
1074
|
"fold-top": "cos-fold-top-v-6XJ",
|
|
1021
1075
|
"unfold-bottom": "cos-unfold-bottom-e2gzU"
|
|
1022
|
-
},
|
|
1076
|
+
}, De = (e, t) => Math.max(0, Math.floor(e)).toString().padStart(t, "0").slice(-t), Oe = ({ digit: e, color: t, duration: r }) => {
|
|
1023
1077
|
let i = o(e), [a, d] = s(!1), [f, p] = s(e);
|
|
1024
1078
|
n(() => {
|
|
1025
1079
|
if (e === i.current) return;
|
|
@@ -1029,58 +1083,58 @@ var j = {
|
|
|
1029
1083
|
}, [e, r]);
|
|
1030
1084
|
let m = a ? f : e;
|
|
1031
1085
|
return /* @__PURE__ */ l("div", {
|
|
1032
|
-
className:
|
|
1086
|
+
className: P.digit,
|
|
1033
1087
|
style: {
|
|
1034
1088
|
"--flip-color": t,
|
|
1035
1089
|
"--flip-duration": `${r}ms`
|
|
1036
1090
|
},
|
|
1037
1091
|
children: /* @__PURE__ */ u("div", {
|
|
1038
|
-
className: `${
|
|
1092
|
+
className: `${P.digitCard} ${a ? P.isFlipping : ""}`,
|
|
1039
1093
|
children: [
|
|
1040
1094
|
/* @__PURE__ */ l("div", {
|
|
1041
|
-
className:
|
|
1095
|
+
className: P.staticTop,
|
|
1042
1096
|
children: /* @__PURE__ */ l("span", { children: m })
|
|
1043
1097
|
}),
|
|
1044
1098
|
/* @__PURE__ */ l("div", {
|
|
1045
|
-
className:
|
|
1099
|
+
className: P.staticBottom,
|
|
1046
1100
|
children: /* @__PURE__ */ l("span", { children: m })
|
|
1047
1101
|
}),
|
|
1048
1102
|
a && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("div", {
|
|
1049
|
-
className: `${
|
|
1103
|
+
className: `${P.flap} ${P.flapTop}`,
|
|
1050
1104
|
children: /* @__PURE__ */ l("span", { children: f })
|
|
1051
1105
|
}), /* @__PURE__ */ l("div", {
|
|
1052
|
-
className: `${
|
|
1106
|
+
className: `${P.flap} ${P.flapBottom}`,
|
|
1053
1107
|
children: /* @__PURE__ */ l("span", { children: e })
|
|
1054
1108
|
})] })
|
|
1055
1109
|
]
|
|
1056
1110
|
})
|
|
1057
1111
|
});
|
|
1058
|
-
},
|
|
1059
|
-
let i =
|
|
1112
|
+
}, ke = ({ value: e, digits: t = 4, color: n = "#38bdf8", duration: r = 600 }) => {
|
|
1113
|
+
let i = De(e, t).split("");
|
|
1060
1114
|
return /* @__PURE__ */ l("div", {
|
|
1061
|
-
className:
|
|
1062
|
-
children: i.map((e, t) => /* @__PURE__ */ l(
|
|
1115
|
+
className: P.flipCounter,
|
|
1116
|
+
children: i.map((e, t) => /* @__PURE__ */ l(Oe, {
|
|
1063
1117
|
digit: e,
|
|
1064
1118
|
color: n,
|
|
1065
1119
|
duration: r
|
|
1066
1120
|
}, t))
|
|
1067
1121
|
});
|
|
1068
|
-
},
|
|
1122
|
+
}, Ae = {
|
|
1069
1123
|
gradientFlow: "cos-gradientFlow-XhN16",
|
|
1070
1124
|
text: "cos-text-ORuqk",
|
|
1071
1125
|
flow: "cos-flow-9FzMA"
|
|
1072
|
-
},
|
|
1126
|
+
}, je = [
|
|
1073
1127
|
"#ff00de",
|
|
1074
1128
|
"#7c3aed",
|
|
1075
1129
|
"#00f0ff",
|
|
1076
1130
|
"#38bdf8",
|
|
1077
1131
|
"#ff00de"
|
|
1078
|
-
],
|
|
1079
|
-
let r = t.length >= 2 ? t.join(", ") :
|
|
1132
|
+
], Me = ({ text: e = "GRADIENT", colors: t = je, fontSize: n = 64 }) => {
|
|
1133
|
+
let r = t.length >= 2 ? t.join(", ") : je.join(", ");
|
|
1080
1134
|
return /* @__PURE__ */ l("div", {
|
|
1081
|
-
className:
|
|
1135
|
+
className: Ae.gradientFlow,
|
|
1082
1136
|
children: /* @__PURE__ */ l("h1", {
|
|
1083
|
-
className:
|
|
1137
|
+
className: Ae.text,
|
|
1084
1138
|
style: {
|
|
1085
1139
|
fontSize: n,
|
|
1086
1140
|
backgroundImage: `linear-gradient(90deg, ${r})`
|
|
@@ -1088,15 +1142,15 @@ var j = {
|
|
|
1088
1142
|
children: e
|
|
1089
1143
|
})
|
|
1090
1144
|
});
|
|
1091
|
-
},
|
|
1145
|
+
}, Ne = {
|
|
1092
1146
|
glitchText: "cos-glitchText-dZ-sR",
|
|
1093
1147
|
text: "cos-text-JsPHN",
|
|
1094
1148
|
"glitch-1": "cos-glitch-1-s9pqH",
|
|
1095
1149
|
"glitch-2": "cos-glitch-2-GhFB-"
|
|
1096
|
-
},
|
|
1097
|
-
className:
|
|
1150
|
+
}, Pe = ({ text: e = "GLITCH", color: t = "#f8fafc", glitchColor1: n = "#ff00de", glitchColor2: r = "#00f0ff", fontSize: i = 64 }) => /* @__PURE__ */ l("div", {
|
|
1151
|
+
className: Ne.glitchText,
|
|
1098
1152
|
children: /* @__PURE__ */ l("h1", {
|
|
1099
|
-
className:
|
|
1153
|
+
className: Ne.text,
|
|
1100
1154
|
"data-text": e,
|
|
1101
1155
|
style: {
|
|
1102
1156
|
fontSize: i,
|
|
@@ -1106,16 +1160,16 @@ var j = {
|
|
|
1106
1160
|
},
|
|
1107
1161
|
children: e
|
|
1108
1162
|
})
|
|
1109
|
-
}),
|
|
1163
|
+
}), Fe = {
|
|
1110
1164
|
gravityBalls: "cos-gravityBalls-LdwFo",
|
|
1111
1165
|
canvas: "cos-canvas-n7esd"
|
|
1112
|
-
},
|
|
1166
|
+
}, Ie = [
|
|
1113
1167
|
"#38bdf8",
|
|
1114
1168
|
"#a78bfa",
|
|
1115
1169
|
"#f472b6",
|
|
1116
1170
|
"#4ade80",
|
|
1117
1171
|
"#fbbf24"
|
|
1118
|
-
],
|
|
1172
|
+
], Le = ({ width: e = 400, height: t = 300, ballCount: r = 12 }) => {
|
|
1119
1173
|
let i = o(null), a = o([]);
|
|
1120
1174
|
return n(() => {
|
|
1121
1175
|
a.current = Array.from({ length: r }, () => ({
|
|
@@ -1124,7 +1178,7 @@ var j = {
|
|
|
1124
1178
|
vx: (Math.random() - .5) * 4,
|
|
1125
1179
|
vy: Math.random() * 2,
|
|
1126
1180
|
r: Math.random() * 10 + 8,
|
|
1127
|
-
color:
|
|
1181
|
+
color: Ie[Math.floor(Math.random() * Ie.length)]
|
|
1128
1182
|
}));
|
|
1129
1183
|
}, [
|
|
1130
1184
|
r,
|
|
@@ -1164,34 +1218,34 @@ var j = {
|
|
|
1164
1218
|
cancelAnimationFrame(s), l();
|
|
1165
1219
|
};
|
|
1166
1220
|
}, [t, e]), /* @__PURE__ */ l("div", {
|
|
1167
|
-
className:
|
|
1221
|
+
className: Fe.gravityBalls,
|
|
1168
1222
|
style: {
|
|
1169
1223
|
width: e,
|
|
1170
1224
|
height: t
|
|
1171
1225
|
},
|
|
1172
1226
|
children: /* @__PURE__ */ l("canvas", {
|
|
1173
1227
|
ref: i,
|
|
1174
|
-
className:
|
|
1228
|
+
className: Fe.canvas,
|
|
1175
1229
|
style: {
|
|
1176
1230
|
width: e,
|
|
1177
1231
|
height: t
|
|
1178
1232
|
}
|
|
1179
1233
|
})
|
|
1180
1234
|
});
|
|
1181
|
-
},
|
|
1235
|
+
}, F = {
|
|
1182
1236
|
wrap: "cos-wrap-r1gGL",
|
|
1183
1237
|
card: "cos-card-3W10s",
|
|
1184
1238
|
shine: "cos-shine-0xjID",
|
|
1185
1239
|
image: "cos-image-AV2XG",
|
|
1186
1240
|
placeholder: "cos-placeholder-wuuL3",
|
|
1187
1241
|
info: "cos-info-CNR0r"
|
|
1188
|
-
},
|
|
1242
|
+
}, Re = ({ title: e = "全息卡片", subtitle: t = "移动鼠标体验 3D 效果", image: n }) => {
|
|
1189
1243
|
let r = o(null);
|
|
1190
1244
|
return /* @__PURE__ */ l("div", {
|
|
1191
|
-
className:
|
|
1245
|
+
className: F.wrap,
|
|
1192
1246
|
children: /* @__PURE__ */ u("div", {
|
|
1193
1247
|
ref: r,
|
|
1194
|
-
className:
|
|
1248
|
+
className: F.card,
|
|
1195
1249
|
onMouseMove: (e) => {
|
|
1196
1250
|
let t = r.current;
|
|
1197
1251
|
if (!t) return;
|
|
@@ -1203,23 +1257,23 @@ var j = {
|
|
|
1203
1257
|
e && (e.style.setProperty("--rx", "0deg"), e.style.setProperty("--ry", "0deg"), e.style.setProperty("--gx", "50%"), e.style.setProperty("--gy", "50%"));
|
|
1204
1258
|
},
|
|
1205
1259
|
children: [
|
|
1206
|
-
/* @__PURE__ */ l("div", { className:
|
|
1260
|
+
/* @__PURE__ */ l("div", { className: F.shine }),
|
|
1207
1261
|
n ? /* @__PURE__ */ l("img", {
|
|
1208
1262
|
src: n,
|
|
1209
1263
|
alt: e,
|
|
1210
|
-
className:
|
|
1264
|
+
className: F.image
|
|
1211
1265
|
}) : /* @__PURE__ */ l("div", {
|
|
1212
|
-
className:
|
|
1266
|
+
className: F.placeholder,
|
|
1213
1267
|
children: /* @__PURE__ */ l("span", { children: "✦" })
|
|
1214
1268
|
}),
|
|
1215
1269
|
/* @__PURE__ */ u("div", {
|
|
1216
|
-
className:
|
|
1270
|
+
className: F.info,
|
|
1217
1271
|
children: [/* @__PURE__ */ l("h3", { children: e }), /* @__PURE__ */ l("p", { children: t })]
|
|
1218
1272
|
})
|
|
1219
1273
|
]
|
|
1220
1274
|
})
|
|
1221
1275
|
});
|
|
1222
|
-
},
|
|
1276
|
+
}, I = {
|
|
1223
1277
|
liquidProgress: "cos-liquidProgress-ABZZA",
|
|
1224
1278
|
svg: "cos-svg-YdTvy",
|
|
1225
1279
|
track: "cos-track-IhMjO",
|
|
@@ -1227,7 +1281,7 @@ var j = {
|
|
|
1227
1281
|
fillBg: "cos-fillBg-pwLI1",
|
|
1228
1282
|
wave: "cos-wave-CBwgG",
|
|
1229
1283
|
label: "cos-label-WYDqS"
|
|
1230
|
-
},
|
|
1284
|
+
}, ze = ({ value: e = 0, max: t = 100, size: i = 160, color: a = "#38bdf8" }) => {
|
|
1231
1285
|
let s = o(null), c = r().replace(/:/g, ""), d = y(t > 0 ? e / t * 100 : 0, 0, 100), f = 100 - d;
|
|
1232
1286
|
return n(() => {
|
|
1233
1287
|
let e = 0, t = 0, n = document.hidden, r = v((e) => {
|
|
@@ -1247,7 +1301,7 @@ var j = {
|
|
|
1247
1301
|
cancelAnimationFrame(e), r();
|
|
1248
1302
|
};
|
|
1249
1303
|
}, [f]), /* @__PURE__ */ u("div", {
|
|
1250
|
-
className:
|
|
1304
|
+
className: I.liquidProgress,
|
|
1251
1305
|
style: {
|
|
1252
1306
|
width: i,
|
|
1253
1307
|
height: i,
|
|
@@ -1255,7 +1309,7 @@ var j = {
|
|
|
1255
1309
|
},
|
|
1256
1310
|
children: [/* @__PURE__ */ u("svg", {
|
|
1257
1311
|
viewBox: "0 0 100 100",
|
|
1258
|
-
className:
|
|
1312
|
+
className: I.svg,
|
|
1259
1313
|
children: [
|
|
1260
1314
|
/* @__PURE__ */ l("defs", { children: /* @__PURE__ */ l("clipPath", {
|
|
1261
1315
|
id: `clip-${c}`,
|
|
@@ -1269,7 +1323,7 @@ var j = {
|
|
|
1269
1323
|
cx: "50",
|
|
1270
1324
|
cy: "50",
|
|
1271
1325
|
r: 45,
|
|
1272
|
-
className:
|
|
1326
|
+
className: I.track,
|
|
1273
1327
|
strokeWidth: 10,
|
|
1274
1328
|
fill: "none"
|
|
1275
1329
|
}),
|
|
@@ -1280,10 +1334,10 @@ var j = {
|
|
|
1280
1334
|
y: "0",
|
|
1281
1335
|
width: "100",
|
|
1282
1336
|
height: "100",
|
|
1283
|
-
className:
|
|
1337
|
+
className: I.fillBg
|
|
1284
1338
|
}), /* @__PURE__ */ l("path", {
|
|
1285
1339
|
ref: s,
|
|
1286
|
-
className:
|
|
1340
|
+
className: I.wave,
|
|
1287
1341
|
d: `M0,${f} Q25,${f - 4} 50,${f} T100,${f} V100 H0 Z`
|
|
1288
1342
|
})]
|
|
1289
1343
|
}),
|
|
@@ -1291,41 +1345,108 @@ var j = {
|
|
|
1291
1345
|
cx: "50",
|
|
1292
1346
|
cy: "50",
|
|
1293
1347
|
r: 45,
|
|
1294
|
-
className:
|
|
1348
|
+
className: I.ring,
|
|
1295
1349
|
strokeWidth: 10,
|
|
1296
1350
|
fill: "none"
|
|
1297
1351
|
})
|
|
1298
1352
|
]
|
|
1299
1353
|
}), /* @__PURE__ */ u("span", {
|
|
1300
|
-
className:
|
|
1354
|
+
className: I.label,
|
|
1301
1355
|
children: [Math.round(d), "%"]
|
|
1302
1356
|
})]
|
|
1303
1357
|
});
|
|
1304
|
-
},
|
|
1358
|
+
}, Be = {
|
|
1359
|
+
lorenzAttractor: "cos-lorenzAttractor--UAI7",
|
|
1360
|
+
canvas: "cos-canvas-oeXce"
|
|
1361
|
+
}, Ve = ({ width: e = 400, height: t = 360, speed: r = 1, color: i = "#f472b6", pointCount: a = 2e3 }) => {
|
|
1362
|
+
let s = o(null), c = o(0);
|
|
1363
|
+
return n(() => {
|
|
1364
|
+
let n = s.current;
|
|
1365
|
+
if (!n) return;
|
|
1366
|
+
let o = window.devicePixelRatio || 1;
|
|
1367
|
+
n.width = e * o, n.height = t * o;
|
|
1368
|
+
let l = n.getContext("2d");
|
|
1369
|
+
if (!l) return;
|
|
1370
|
+
l.setTransform(o, 0, 0, o, 0, 0);
|
|
1371
|
+
let u = .005, d = [], f = .1, p = 0, m = 0;
|
|
1372
|
+
for (let e = 0; e < a; e++) {
|
|
1373
|
+
let e = 10 * (p - f), t = f * (28 - m) - p, n = f * p - 2.6666666666666665 * m;
|
|
1374
|
+
f += e * u, p += t * u, m += n * u, d.push({
|
|
1375
|
+
x: f,
|
|
1376
|
+
y: p,
|
|
1377
|
+
z: m
|
|
1378
|
+
});
|
|
1379
|
+
}
|
|
1380
|
+
let h = 0, g = document.hidden, _ = v((e) => {
|
|
1381
|
+
g = e;
|
|
1382
|
+
}), y = (n, r, i, a) => {
|
|
1383
|
+
let o = Math.cos(a), s = Math.sin(a), c = n * o - i * s, l = n * s + i * o, u = r;
|
|
1384
|
+
return {
|
|
1385
|
+
x: e / 2 + c * 6,
|
|
1386
|
+
y: t / 2 - u * 6,
|
|
1387
|
+
depth: l
|
|
1388
|
+
};
|
|
1389
|
+
}, b = () => {
|
|
1390
|
+
if (h = requestAnimationFrame(b), g) return;
|
|
1391
|
+
c.current += .004 * r;
|
|
1392
|
+
let n = c.current;
|
|
1393
|
+
l.fillStyle = "rgba(15, 23, 42, 0.15)", l.fillRect(0, 0, e, t);
|
|
1394
|
+
let a = d.map((e) => y(e.x, e.y, e.z, n));
|
|
1395
|
+
l.beginPath(), a.forEach((e, t) => t === 0 ? l.moveTo(e.x, e.y) : l.lineTo(e.x, e.y)), l.strokeStyle = i, l.globalAlpha = .75, l.lineWidth = .9, l.stroke(), l.globalAlpha = 1, a.forEach((e, t) => {
|
|
1396
|
+
if (t % 50 != 0) return;
|
|
1397
|
+
let n = .2 + (e.depth + 30) / 60 * .6;
|
|
1398
|
+
l.beginPath(), l.arc(e.x, e.y, 1.5, 0, Math.PI * 2), l.fillStyle = "#fff", l.globalAlpha = Math.max(.1, Math.min(n, .9)), l.fill();
|
|
1399
|
+
}), l.globalAlpha = 1;
|
|
1400
|
+
};
|
|
1401
|
+
return l.fillStyle = "#0f172a", l.fillRect(0, 0, e, t), b(), () => {
|
|
1402
|
+
cancelAnimationFrame(h), _();
|
|
1403
|
+
};
|
|
1404
|
+
}, [
|
|
1405
|
+
i,
|
|
1406
|
+
t,
|
|
1407
|
+
a,
|
|
1408
|
+
r,
|
|
1409
|
+
e
|
|
1410
|
+
]), /* @__PURE__ */ l("div", {
|
|
1411
|
+
className: Be.lorenzAttractor,
|
|
1412
|
+
style: {
|
|
1413
|
+
width: e,
|
|
1414
|
+
height: t
|
|
1415
|
+
},
|
|
1416
|
+
children: /* @__PURE__ */ l("canvas", {
|
|
1417
|
+
ref: s,
|
|
1418
|
+
className: Be.canvas,
|
|
1419
|
+
style: {
|
|
1420
|
+
width: e,
|
|
1421
|
+
height: t
|
|
1422
|
+
}
|
|
1423
|
+
})
|
|
1424
|
+
});
|
|
1425
|
+
}, L = {
|
|
1305
1426
|
liquidGlass: "cos-liquidGlass-Z3bQg",
|
|
1306
1427
|
panel: "cos-panel-XYboD",
|
|
1307
1428
|
content: "cos-content-MHfkS"
|
|
1308
|
-
},
|
|
1309
|
-
className:
|
|
1429
|
+
}, He = ({ children: e = "液态玻璃面板", blur: t = 16, borderRadius: n = 20 }) => /* @__PURE__ */ l("div", {
|
|
1430
|
+
className: L.liquidGlass,
|
|
1310
1431
|
children: /* @__PURE__ */ l("div", {
|
|
1311
|
-
className:
|
|
1432
|
+
className: L.panel,
|
|
1312
1433
|
style: {
|
|
1313
1434
|
"--glass-blur": `${t}px`,
|
|
1314
1435
|
"--glass-radius": `${n}px`
|
|
1315
1436
|
},
|
|
1316
1437
|
children: /* @__PURE__ */ l("div", {
|
|
1317
|
-
className:
|
|
1438
|
+
className: L.content,
|
|
1318
1439
|
children: e
|
|
1319
1440
|
})
|
|
1320
1441
|
})
|
|
1321
|
-
}),
|
|
1442
|
+
}), Ue = {
|
|
1322
1443
|
magneticButton: "cos-magneticButton-GbRkE",
|
|
1323
1444
|
btn: "cos-btn--b2BJ"
|
|
1324
|
-
},
|
|
1445
|
+
}, We = ({ children: e = "磁吸按钮", strength: t = .4, color: n = "#6366f1" }) => {
|
|
1325
1446
|
let r = o(null), i = o(null);
|
|
1326
1447
|
return /* @__PURE__ */ l("div", {
|
|
1327
1448
|
ref: r,
|
|
1328
|
-
className:
|
|
1449
|
+
className: Ue.magneticButton,
|
|
1329
1450
|
onMouseMove: (e) => {
|
|
1330
1451
|
let n = r.current, a = i.current;
|
|
1331
1452
|
if (!n || !a) return;
|
|
@@ -1339,19 +1460,19 @@ var j = {
|
|
|
1339
1460
|
children: /* @__PURE__ */ l("button", {
|
|
1340
1461
|
ref: i,
|
|
1341
1462
|
type: "button",
|
|
1342
|
-
className:
|
|
1463
|
+
className: Ue.btn,
|
|
1343
1464
|
style: { "--btn-color": n },
|
|
1344
1465
|
children: e
|
|
1345
1466
|
})
|
|
1346
1467
|
});
|
|
1347
|
-
},
|
|
1468
|
+
}, R = {
|
|
1348
1469
|
matrixRain: "cos-matrixRain-qg9HC",
|
|
1349
1470
|
canvas: "cos-canvas--AvpG",
|
|
1350
1471
|
overlay: "cos-overlay-knj3b",
|
|
1351
1472
|
title: "cos-title-sDfhs",
|
|
1352
1473
|
flicker: "cos-flicker-smHxl",
|
|
1353
1474
|
subtitle: "cos-subtitle-CWheW"
|
|
1354
|
-
},
|
|
1475
|
+
}, Ge = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*アイウエオカキクケコ", Ke = ({ width: e = 800, height: t = 500, density: r = .6, color: i = "#00ff41", showOverlay: a = !0, title: s = "MATRIX", subtitle: c = "数字雨效果" }) => {
|
|
1355
1476
|
let d = o(null);
|
|
1356
1477
|
return n(() => {
|
|
1357
1478
|
let n = d.current;
|
|
@@ -1365,7 +1486,7 @@ var j = {
|
|
|
1365
1486
|
u = e;
|
|
1366
1487
|
}), p = () => {
|
|
1367
1488
|
l = requestAnimationFrame(p), !u && (o.fillStyle = "rgb(0 0 0 / 8%)", o.fillRect(0, 0, e, t), o.font = "16px monospace", c.forEach((e, n) => {
|
|
1368
|
-
let a =
|
|
1489
|
+
let a = Ge[Math.floor(Math.random() * 53)], s = n / r * 16;
|
|
1369
1490
|
o.fillStyle = i, o.fillText(a, s, e * 16), e * 16 > t && Math.random() > .975 && (c[n] = 0), c[n] += 1;
|
|
1370
1491
|
}));
|
|
1371
1492
|
};
|
|
@@ -1378,33 +1499,141 @@ var j = {
|
|
|
1378
1499
|
t,
|
|
1379
1500
|
e
|
|
1380
1501
|
]), /* @__PURE__ */ u("div", {
|
|
1381
|
-
className:
|
|
1502
|
+
className: R.matrixRain,
|
|
1382
1503
|
style: {
|
|
1383
1504
|
width: e,
|
|
1384
1505
|
height: t
|
|
1385
1506
|
},
|
|
1386
1507
|
children: [/* @__PURE__ */ l("canvas", {
|
|
1387
1508
|
ref: d,
|
|
1388
|
-
className:
|
|
1509
|
+
className: R.canvas,
|
|
1389
1510
|
style: {
|
|
1390
1511
|
width: e,
|
|
1391
1512
|
height: t
|
|
1392
1513
|
}
|
|
1393
1514
|
}), a && /* @__PURE__ */ u("div", {
|
|
1394
|
-
className:
|
|
1515
|
+
className: R.overlay,
|
|
1395
1516
|
children: [/* @__PURE__ */ l("h2", {
|
|
1396
|
-
className:
|
|
1517
|
+
className: R.title,
|
|
1397
1518
|
children: s
|
|
1398
1519
|
}), /* @__PURE__ */ l("p", {
|
|
1399
|
-
className:
|
|
1520
|
+
className: R.subtitle,
|
|
1400
1521
|
children: c
|
|
1401
1522
|
})]
|
|
1402
1523
|
})]
|
|
1403
1524
|
});
|
|
1404
|
-
},
|
|
1525
|
+
}, qe = {
|
|
1526
|
+
metaballPool: "cos-metaballPool-JJaI9",
|
|
1527
|
+
canvas: "cos-canvas-S7fDD"
|
|
1528
|
+
}, Je = ({ width: e = 400, height: t = 300, ballCount: r = 5, color: i = "#38bdf8" }) => {
|
|
1529
|
+
let a = o(null), s = o([]), c = o({
|
|
1530
|
+
x: -999,
|
|
1531
|
+
y: -999,
|
|
1532
|
+
active: !1
|
|
1533
|
+
});
|
|
1534
|
+
return n(() => {
|
|
1535
|
+
let n = Math.max(2, Math.min(r, 10));
|
|
1536
|
+
s.current = Array.from({ length: n }, () => ({
|
|
1537
|
+
x: Math.random() * (e - 80) + 40,
|
|
1538
|
+
y: Math.random() * (t - 80) + 40,
|
|
1539
|
+
vx: (Math.random() - .5) * 2,
|
|
1540
|
+
vy: (Math.random() - .5) * 2,
|
|
1541
|
+
r: 28 + Math.random() * 18
|
|
1542
|
+
}));
|
|
1543
|
+
}, [
|
|
1544
|
+
r,
|
|
1545
|
+
t,
|
|
1546
|
+
e
|
|
1547
|
+
]), n(() => {
|
|
1548
|
+
let n = a.current;
|
|
1549
|
+
if (!n) return;
|
|
1550
|
+
let r = window.devicePixelRatio || 1, i = .5, o = Math.floor(e * i), l = Math.floor(t * i);
|
|
1551
|
+
n.width = e * r, n.height = t * r;
|
|
1552
|
+
let u = n.getContext("2d");
|
|
1553
|
+
if (!u) return;
|
|
1554
|
+
u.setTransform(r, 0, 0, r, 0, 0);
|
|
1555
|
+
let d = document.createElement("canvas");
|
|
1556
|
+
d.width = o, d.height = l;
|
|
1557
|
+
let f = d.getContext("2d");
|
|
1558
|
+
if (!f) return;
|
|
1559
|
+
let p = (e, t) => {
|
|
1560
|
+
let r = n.getBoundingClientRect();
|
|
1561
|
+
c.current = {
|
|
1562
|
+
x: e - r.left,
|
|
1563
|
+
y: t - r.top,
|
|
1564
|
+
active: !0
|
|
1565
|
+
};
|
|
1566
|
+
}, m = () => {
|
|
1567
|
+
c.current.active = !1;
|
|
1568
|
+
}, h = (e) => p(e.clientX, e.clientY), g = (e) => {
|
|
1569
|
+
e.touches[0] && p(e.touches[0].clientX, e.touches[0].clientY);
|
|
1570
|
+
};
|
|
1571
|
+
n.addEventListener("mousemove", h), n.addEventListener("mouseleave", m), n.addEventListener("touchmove", g, { passive: !0 }), n.addEventListener("touchend", m);
|
|
1572
|
+
let _ = 0, b = document.hidden, x = v((e) => {
|
|
1573
|
+
b = e;
|
|
1574
|
+
}), S = () => {
|
|
1575
|
+
if (_ = requestAnimationFrame(S), b) return;
|
|
1576
|
+
let n = s.current, r = c.current;
|
|
1577
|
+
for (let i of n) {
|
|
1578
|
+
if (r.active) {
|
|
1579
|
+
let e = i.x - r.x, t = i.y - r.y, n = Math.hypot(e, t) || 1;
|
|
1580
|
+
if (n < 120) {
|
|
1581
|
+
let r = (120 - n) * .04;
|
|
1582
|
+
i.vx += e / n * r, i.vy += t / n * r;
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
i.vx *= .98, i.vy *= .98, i.x += i.vx, i.y += i.vy, i.x - i.r < 0 ? (i.x = i.r, i.vx *= -.8) : i.x + i.r > e && (i.x = e - i.r, i.vx *= -.8), i.y - i.r < 0 ? (i.y = i.r, i.vy *= -.8) : i.y + i.r > t && (i.y = t - i.r, i.vy *= -.8);
|
|
1586
|
+
}
|
|
1587
|
+
for (let e = 0; e < n.length; e++) for (let t = e + 1; t < n.length; t++) {
|
|
1588
|
+
let r = n[e], i = n[t], a = i.x - r.x, o = i.y - r.y, s = Math.hypot(a, o) || .001, c = (r.r + i.r) * .55;
|
|
1589
|
+
if (s < c) {
|
|
1590
|
+
let e = a / s, t = o / s, n = c - s;
|
|
1591
|
+
r.x -= e * n * .5, r.y -= t * n * .5, i.x += e * n * .5, i.y += t * n * .5;
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
let a = f.createImageData(o, l), p = a.data;
|
|
1595
|
+
for (let e = 0; e < l; e++) for (let t = 0; t < o; t++) {
|
|
1596
|
+
let r = t / i, a = e / i, s = 0;
|
|
1597
|
+
for (let e of n) {
|
|
1598
|
+
let t = r - e.x, n = a - e.y, i = t * t + n * n;
|
|
1599
|
+
s += e.r * e.r / (i + 1);
|
|
1600
|
+
}
|
|
1601
|
+
let c = (e * o + t) * 4;
|
|
1602
|
+
s > 1 ? (p[c] = 56 + y((s - 1) * .8, 0, 1) * 40, p[c + 1] = 189, p[c + 2] = 248, p[c + 3] = 255) : p[c + 3] = 0;
|
|
1603
|
+
}
|
|
1604
|
+
f.putImageData(a, 0, 0), u.fillStyle = "#0f172a", u.fillRect(0, 0, e, t), u.save(), u.filter = "blur(8px)", u.drawImage(d, 0, 0, e, t), u.restore(), u.globalCompositeOperation = "lighter", u.drawImage(d, 0, 0, e, t), u.globalCompositeOperation = "source-over";
|
|
1605
|
+
for (let e of n) {
|
|
1606
|
+
let t = u.createRadialGradient(e.x - e.r * .3, e.y - e.r * .3, 0, e.x, e.y, e.r * .6);
|
|
1607
|
+
t.addColorStop(0, "rgba(255,255,255,0.5)"), t.addColorStop(1, "rgba(56,189,248,0)"), u.beginPath(), u.arc(e.x, e.y, e.r * .5, 0, Math.PI * 2), u.fillStyle = t, u.fill();
|
|
1608
|
+
}
|
|
1609
|
+
};
|
|
1610
|
+
return S(), () => {
|
|
1611
|
+
cancelAnimationFrame(_), x(), n.removeEventListener("mousemove", h), n.removeEventListener("mouseleave", m), n.removeEventListener("touchmove", g), n.removeEventListener("touchend", m);
|
|
1612
|
+
};
|
|
1613
|
+
}, [
|
|
1614
|
+
i,
|
|
1615
|
+
t,
|
|
1616
|
+
e
|
|
1617
|
+
]), /* @__PURE__ */ l("div", {
|
|
1618
|
+
className: qe.metaballPool,
|
|
1619
|
+
style: {
|
|
1620
|
+
width: e,
|
|
1621
|
+
height: t,
|
|
1622
|
+
"--pool-color": i
|
|
1623
|
+
},
|
|
1624
|
+
children: /* @__PURE__ */ l("canvas", {
|
|
1625
|
+
ref: a,
|
|
1626
|
+
className: qe.canvas,
|
|
1627
|
+
style: {
|
|
1628
|
+
width: e,
|
|
1629
|
+
height: t
|
|
1630
|
+
}
|
|
1631
|
+
})
|
|
1632
|
+
});
|
|
1633
|
+
}, Ye = {
|
|
1405
1634
|
mazeGenerator: "cos-mazeGenerator-QEa0s",
|
|
1406
1635
|
canvas: "cos-canvas-emhxb"
|
|
1407
|
-
},
|
|
1636
|
+
}, Xe = ({ width: e = 400, height: t = 300, cellSize: r = 20, onGenerated: i }) => {
|
|
1408
1637
|
let a = o(null), s = o(i);
|
|
1409
1638
|
return n(() => {
|
|
1410
1639
|
s.current = i;
|
|
@@ -1491,24 +1720,24 @@ var j = {
|
|
|
1491
1720
|
t,
|
|
1492
1721
|
e
|
|
1493
1722
|
]), /* @__PURE__ */ l("div", {
|
|
1494
|
-
className:
|
|
1723
|
+
className: Ye.mazeGenerator,
|
|
1495
1724
|
style: {
|
|
1496
1725
|
width: e,
|
|
1497
1726
|
height: t
|
|
1498
1727
|
},
|
|
1499
1728
|
children: /* @__PURE__ */ l("canvas", {
|
|
1500
1729
|
ref: a,
|
|
1501
|
-
className:
|
|
1730
|
+
className: Ye.canvas,
|
|
1502
1731
|
style: {
|
|
1503
1732
|
width: e,
|
|
1504
1733
|
height: t
|
|
1505
1734
|
}
|
|
1506
1735
|
})
|
|
1507
1736
|
});
|
|
1508
|
-
},
|
|
1737
|
+
}, Ze = {
|
|
1509
1738
|
meteorRain: "cos-meteorRain-v8RNI",
|
|
1510
1739
|
canvas: "cos-canvas-hyFMr"
|
|
1511
|
-
},
|
|
1740
|
+
}, Qe = ({ width: e = 800, height: t = 500, meteorCount: r = 8 }) => {
|
|
1512
1741
|
let i = o(null), a = o([]), s = o(0);
|
|
1513
1742
|
return n(() => {
|
|
1514
1743
|
a.current = Array.from({ length: r }, () => ({
|
|
@@ -1543,71 +1772,130 @@ var j = {
|
|
|
1543
1772
|
cancelAnimationFrame(s.current), l();
|
|
1544
1773
|
};
|
|
1545
1774
|
}, [t, e]), /* @__PURE__ */ l("div", {
|
|
1546
|
-
className:
|
|
1775
|
+
className: Ze.meteorRain,
|
|
1547
1776
|
style: {
|
|
1548
1777
|
width: e,
|
|
1549
1778
|
height: t
|
|
1550
1779
|
},
|
|
1551
1780
|
children: /* @__PURE__ */ l("canvas", {
|
|
1552
1781
|
ref: i,
|
|
1553
|
-
className:
|
|
1782
|
+
className: Ze.canvas,
|
|
1554
1783
|
style: {
|
|
1555
1784
|
width: e,
|
|
1556
1785
|
height: t
|
|
1557
1786
|
}
|
|
1558
1787
|
})
|
|
1559
1788
|
});
|
|
1560
|
-
},
|
|
1789
|
+
}, z = {
|
|
1561
1790
|
neonText: "cos-neonText-JMP7i",
|
|
1562
1791
|
text: "cos-text-GTO-0",
|
|
1563
1792
|
flicker: "cos-flicker-nXceV",
|
|
1564
1793
|
"neon-flicker": "cos-neon-flicker-uDkmM",
|
|
1565
1794
|
reflection: "cos-reflection-aEYj6"
|
|
1566
|
-
},
|
|
1567
|
-
className:
|
|
1795
|
+
}, $e = ({ text: e = "NEON", color: t = "#ff00de", fontSize: n = 72, flicker: r = !0 }) => /* @__PURE__ */ u("div", {
|
|
1796
|
+
className: z.neonText,
|
|
1568
1797
|
children: [/* @__PURE__ */ l("h1", {
|
|
1569
|
-
className: `${
|
|
1798
|
+
className: `${z.text} ${r ? z.flicker : ""}`,
|
|
1570
1799
|
style: {
|
|
1571
1800
|
fontSize: n,
|
|
1572
1801
|
"--neon-color": t
|
|
1573
1802
|
},
|
|
1574
1803
|
children: e
|
|
1575
1804
|
}), /* @__PURE__ */ l("p", {
|
|
1576
|
-
className:
|
|
1805
|
+
className: z.reflection,
|
|
1577
1806
|
style: {
|
|
1578
1807
|
fontSize: n * .35,
|
|
1579
1808
|
color: t
|
|
1580
1809
|
},
|
|
1581
1810
|
children: e
|
|
1582
1811
|
})]
|
|
1583
|
-
}),
|
|
1812
|
+
}), et = {
|
|
1584
1813
|
newtonCradle: "cos-newtonCradle-mFl-b",
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1814
|
+
canvas: "cos-canvas-TWKl5"
|
|
1815
|
+
}, tt = ({ ballCount: e = 5, color: t = "#38bdf8", width: r = 280, height: i = 200 }) => {
|
|
1816
|
+
let a = o(null), s = Math.max(2, Math.min(e, 7));
|
|
1817
|
+
return n(() => {
|
|
1818
|
+
let e = a.current;
|
|
1819
|
+
if (!e) return;
|
|
1820
|
+
let n = window.devicePixelRatio || 1;
|
|
1821
|
+
e.width = r * n, e.height = i * n;
|
|
1822
|
+
let o = e.getContext("2d");
|
|
1823
|
+
if (!o) return;
|
|
1824
|
+
o.setTransform(n, 0, 0, n, 0, 0);
|
|
1825
|
+
let c = i - 28 - 28, l = (s - 1) * 28, u = (r - l) / 2, d = 1 / 60, f = Array.from({ length: s }, () => ({
|
|
1826
|
+
theta: 0,
|
|
1827
|
+
omega: 0
|
|
1828
|
+
}));
|
|
1829
|
+
f[0].theta = -.52;
|
|
1830
|
+
let p = "left", m = (e) => u + e * 28, h = (e) => {
|
|
1831
|
+
let t = f[e];
|
|
1832
|
+
return {
|
|
1833
|
+
x: m(e) + c * Math.sin(t.theta),
|
|
1834
|
+
y: 16 + c * Math.cos(t.theta)
|
|
1835
|
+
};
|
|
1836
|
+
}, g = (e) => {
|
|
1837
|
+
p === "left" && (p = "right", f[0].omega = 0, f[0].theta = 0, f[s - 1].omega = Math.abs(e));
|
|
1838
|
+
}, _ = (e) => {
|
|
1839
|
+
p === "right" && (p = "left", f[s - 1].omega = 0, f[s - 1].theta = 0, f[0].omega = -Math.abs(e));
|
|
1840
|
+
}, y = () => {
|
|
1841
|
+
let e = h(0), t = h(1);
|
|
1842
|
+
if (e.x + 14 >= t.x - 14 - .5 && f[0].omega > .02) {
|
|
1843
|
+
g(f[0].omega);
|
|
1844
|
+
return;
|
|
1845
|
+
}
|
|
1846
|
+
let n = h(s - 1), r = h(s - 2);
|
|
1847
|
+
n.x - 14 <= r.x + 14 + .5 && f[s - 1].omega < -.02 && _(f[s - 1].omega);
|
|
1848
|
+
}, b = 0, x = document.hidden, S = v((e) => {
|
|
1849
|
+
x = e;
|
|
1850
|
+
}), C = () => {
|
|
1851
|
+
if (b = requestAnimationFrame(C), !x) {
|
|
1852
|
+
for (let e = 0; e < s; e++) {
|
|
1853
|
+
let t = f[e];
|
|
1854
|
+
if (Math.abs(t.omega) < 1e-5 && Math.abs(t.theta) < 1e-5) continue;
|
|
1855
|
+
let n = -(980 / c) * Math.sin(t.theta);
|
|
1856
|
+
t.omega += n * d, t.omega *= .9998, t.theta += t.omega * d;
|
|
1857
|
+
}
|
|
1858
|
+
y();
|
|
1859
|
+
for (let e = 1; e < s - 1; e++) f[e].theta = 0, f[e].omega = 0;
|
|
1860
|
+
o.fillStyle = "#0f172a", o.fillRect(0, 0, r, i), o.strokeStyle = "#475569", o.lineWidth = 3, o.beginPath(), o.moveTo(u - 14, 16), o.lineTo(u + l + 14, 16), o.stroke();
|
|
1861
|
+
for (let e = 0; e < s; e++) {
|
|
1862
|
+
let n = m(e), { x: r, y: i } = h(e);
|
|
1863
|
+
o.beginPath(), o.moveTo(n, 16), o.lineTo(r, i), o.strokeStyle = "#64748b", o.lineWidth = 2, o.stroke(), o.beginPath(), o.arc(r, i, 14, 0, Math.PI * 2);
|
|
1864
|
+
let a = o.createRadialGradient(r - 14 * .3, i - 14 * .3, 0, r, i, 14);
|
|
1865
|
+
a.addColorStop(0, "#fff"), a.addColorStop(.35, t), a.addColorStop(1, t), o.fillStyle = a, o.shadowColor = t, o.shadowBlur = 6, o.fill(), o.shadowBlur = 0;
|
|
1866
|
+
}
|
|
1867
|
+
}
|
|
1868
|
+
};
|
|
1869
|
+
return C(), () => {
|
|
1870
|
+
cancelAnimationFrame(b), S();
|
|
1871
|
+
};
|
|
1872
|
+
}, [
|
|
1873
|
+
t,
|
|
1874
|
+
s,
|
|
1875
|
+
i,
|
|
1876
|
+
r
|
|
1877
|
+
]), /* @__PURE__ */ l("div", {
|
|
1878
|
+
className: et.newtonCradle,
|
|
1879
|
+
style: {
|
|
1880
|
+
width: r,
|
|
1881
|
+
height: i,
|
|
1882
|
+
"--ball-color": t
|
|
1883
|
+
},
|
|
1884
|
+
children: /* @__PURE__ */ l("canvas", {
|
|
1885
|
+
ref: a,
|
|
1886
|
+
className: et.canvas,
|
|
1887
|
+
style: {
|
|
1888
|
+
width: r,
|
|
1889
|
+
height: i
|
|
1890
|
+
}
|
|
1603
1891
|
})
|
|
1604
1892
|
});
|
|
1605
|
-
},
|
|
1893
|
+
}, B = {
|
|
1606
1894
|
orbitalChart: "cos-orbitalChart-XLORB",
|
|
1607
1895
|
canvas: "cos-canvas-hGVud",
|
|
1608
1896
|
legend: "cos-legend-Np9Mm",
|
|
1609
1897
|
swatch: "cos-swatch-xEKvA"
|
|
1610
|
-
},
|
|
1898
|
+
}, nt = [
|
|
1611
1899
|
{
|
|
1612
1900
|
label: "A",
|
|
1613
1901
|
value: 30,
|
|
@@ -1628,7 +1916,7 @@ var j = {
|
|
|
1628
1916
|
value: 25,
|
|
1629
1917
|
color: "#4ade80"
|
|
1630
1918
|
}
|
|
1631
|
-
],
|
|
1919
|
+
], rt = ({ data: e = nt, size: t = 240 }) => {
|
|
1632
1920
|
let r = o(null);
|
|
1633
1921
|
return n(() => {
|
|
1634
1922
|
let n = r.current;
|
|
@@ -1657,23 +1945,23 @@ var j = {
|
|
|
1657
1945
|
cancelAnimationFrame(u), p();
|
|
1658
1946
|
};
|
|
1659
1947
|
}, [e, t]), /* @__PURE__ */ u("div", {
|
|
1660
|
-
className:
|
|
1948
|
+
className: B.orbitalChart,
|
|
1661
1949
|
style: {
|
|
1662
1950
|
width: t,
|
|
1663
1951
|
height: t
|
|
1664
1952
|
},
|
|
1665
1953
|
children: [/* @__PURE__ */ l("canvas", {
|
|
1666
1954
|
ref: r,
|
|
1667
|
-
className:
|
|
1955
|
+
className: B.canvas,
|
|
1668
1956
|
style: {
|
|
1669
1957
|
width: t,
|
|
1670
1958
|
height: t
|
|
1671
1959
|
}
|
|
1672
1960
|
}), /* @__PURE__ */ l("ul", {
|
|
1673
|
-
className:
|
|
1961
|
+
className: B.legend,
|
|
1674
1962
|
children: e.map((e) => /* @__PURE__ */ u("li", { children: [
|
|
1675
1963
|
/* @__PURE__ */ l("span", {
|
|
1676
|
-
className:
|
|
1964
|
+
className: B.swatch,
|
|
1677
1965
|
style: { background: e.color }
|
|
1678
1966
|
}),
|
|
1679
1967
|
e.label,
|
|
@@ -1683,11 +1971,11 @@ var j = {
|
|
|
1683
1971
|
] }, e.label))
|
|
1684
1972
|
})]
|
|
1685
1973
|
});
|
|
1686
|
-
},
|
|
1974
|
+
}, V = {
|
|
1687
1975
|
particleNetwork: "cos-particleNetwork-GSZq-",
|
|
1688
1976
|
canvas: "cos-canvas-E-BGP",
|
|
1689
1977
|
hint: "cos-hint-LEO5o"
|
|
1690
|
-
},
|
|
1978
|
+
}, it = ({ width: e = 800, height: r = 500, particleCount: i = 60, linkDistance: a = 120, repelRadius: s = 150, color: c = "#38bdf8" }) => {
|
|
1691
1979
|
let d = o(null), f = o([]), p = o({
|
|
1692
1980
|
x: -1e3,
|
|
1693
1981
|
y: -1e3
|
|
@@ -1770,14 +2058,14 @@ var j = {
|
|
|
1770
2058
|
};
|
|
1771
2059
|
};
|
|
1772
2060
|
return /* @__PURE__ */ u("div", {
|
|
1773
|
-
className:
|
|
2061
|
+
className: V.particleNetwork,
|
|
1774
2062
|
style: {
|
|
1775
2063
|
width: e,
|
|
1776
2064
|
height: r
|
|
1777
2065
|
},
|
|
1778
2066
|
children: [/* @__PURE__ */ l("canvas", {
|
|
1779
2067
|
ref: d,
|
|
1780
|
-
className:
|
|
2068
|
+
className: V.canvas,
|
|
1781
2069
|
style: {
|
|
1782
2070
|
width: e,
|
|
1783
2071
|
height: r
|
|
@@ -1787,14 +2075,92 @@ var j = {
|
|
|
1787
2075
|
onTouchMove: _,
|
|
1788
2076
|
onTouchEnd: y
|
|
1789
2077
|
}), /* @__PURE__ */ l("p", {
|
|
1790
|
-
className:
|
|
2078
|
+
className: V.hint,
|
|
1791
2079
|
children: "移动鼠标或手指与粒子互动"
|
|
1792
2080
|
})]
|
|
1793
2081
|
});
|
|
1794
|
-
},
|
|
2082
|
+
}, at = {
|
|
2083
|
+
plasmaBall: "cos-plasmaBall-xGHSj",
|
|
2084
|
+
canvas: "cos-canvas-V1CgL"
|
|
2085
|
+
}, ot = ({ width: e = 320, height: t = 320, color: r = "#a78bfa", arcCount: i = 8 }) => {
|
|
2086
|
+
let a = o(null), s = o({
|
|
2087
|
+
x: e / 2,
|
|
2088
|
+
y: t / 2,
|
|
2089
|
+
active: !1
|
|
2090
|
+
}), c = o([]);
|
|
2091
|
+
return n(() => {
|
|
2092
|
+
c.current = Array.from({ length: i }, (e, t) => ({
|
|
2093
|
+
angle: t / i * Math.PI * 2,
|
|
2094
|
+
length: .6 + Math.random() * .35,
|
|
2095
|
+
speed: .02 + Math.random() * .03
|
|
2096
|
+
}));
|
|
2097
|
+
}, [i]), n(() => {
|
|
2098
|
+
let n = a.current;
|
|
2099
|
+
if (!n) return;
|
|
2100
|
+
let i = window.devicePixelRatio || 1;
|
|
2101
|
+
n.width = e * i, n.height = t * i;
|
|
2102
|
+
let o = n.getContext("2d");
|
|
2103
|
+
if (!o) return;
|
|
2104
|
+
o.setTransform(i, 0, 0, i, 0, 0);
|
|
2105
|
+
let l = e / 2, u = t / 2, d = Math.min(e, t) * .38, f = (e, t) => {
|
|
2106
|
+
let r = n.getBoundingClientRect();
|
|
2107
|
+
s.current = {
|
|
2108
|
+
x: e - r.left,
|
|
2109
|
+
y: t - r.top,
|
|
2110
|
+
active: !0
|
|
2111
|
+
};
|
|
2112
|
+
}, p = () => {
|
|
2113
|
+
s.current.active = !1;
|
|
2114
|
+
}, m = (e) => f(e.clientX, e.clientY), h = (e) => {
|
|
2115
|
+
e.touches[0] && f(e.touches[0].clientX, e.touches[0].clientY);
|
|
2116
|
+
};
|
|
2117
|
+
n.addEventListener("mousemove", m), n.addEventListener("mouseleave", p), n.addEventListener("touchmove", h, { passive: !0 }), n.addEventListener("touchend", p);
|
|
2118
|
+
let g = 0, _ = document.hidden, y = v((e) => {
|
|
2119
|
+
_ = e;
|
|
2120
|
+
}), b = (e, t, n, r, i, a) => {
|
|
2121
|
+
if (a <= 0) return [[e, t], [n, r]];
|
|
2122
|
+
let o = (e + n) / 2, s = (t + r) / 2, c = n - e, l = r - t, u = Math.hypot(c, l) || 1, d = (Math.random() - .5) * i, f = -l / u * d, p = c / u * d, m = b(e, t, o + f, s + p, i * .55, a - 1), h = b(o + f, s + p, n, r, i * .55, a - 1);
|
|
2123
|
+
return [...m.slice(0, -1), ...h];
|
|
2124
|
+
}, x = () => {
|
|
2125
|
+
if (g = requestAnimationFrame(x), _) return;
|
|
2126
|
+
let n = s.current, i = c.current;
|
|
2127
|
+
o.fillStyle = "#0f172a", o.fillRect(0, 0, e, t);
|
|
2128
|
+
let a = o.createRadialGradient(l, u, d * .1, l, u, d * 1.1);
|
|
2129
|
+
a.addColorStop(0, "rgba(30, 41, 59, 0.9)"), a.addColorStop(.7, "rgba(15, 23, 42, 0.6)"), a.addColorStop(1, "rgba(15, 23, 42, 0)"), o.beginPath(), o.arc(l, u, d * 1.05, 0, Math.PI * 2), o.fillStyle = a, o.fill(), o.beginPath(), o.arc(l, u, d, 0, Math.PI * 2), o.strokeStyle = "rgba(148, 163, 184, 0.35)", o.lineWidth = 2, o.stroke(), i.forEach((e) => {
|
|
2130
|
+
e.angle += e.speed * (Math.random() > .5 ? 1 : -1);
|
|
2131
|
+
let t = n.active ? Math.atan2(n.y - u, n.x - l) + (e.angle - Math.PI) * .15 : e.angle, i = d * e.length, a = b(l, u, l + Math.cos(t) * i, u + Math.sin(t) * i, 18, 4);
|
|
2132
|
+
o.beginPath(), a.forEach(([e, t], n) => n === 0 ? o.moveTo(e, t) : o.lineTo(e, t)), o.strokeStyle = r, o.lineWidth = 1.5, o.shadowColor = r, o.shadowBlur = 14, o.globalAlpha = .85, o.stroke(), o.shadowBlur = 0, o.globalAlpha = 1;
|
|
2133
|
+
}), o.beginPath(), o.arc(l, u, 10, 0, Math.PI * 2);
|
|
2134
|
+
let f = o.createRadialGradient(l, u, 0, l, u, 10);
|
|
2135
|
+
f.addColorStop(0, "#fff"), f.addColorStop(.5, r), f.addColorStop(1, r), o.fillStyle = f, o.shadowColor = r, o.shadowBlur = 20, o.fill(), o.shadowBlur = 0;
|
|
2136
|
+
};
|
|
2137
|
+
return x(), () => {
|
|
2138
|
+
cancelAnimationFrame(g), y(), n.removeEventListener("mousemove", m), n.removeEventListener("mouseleave", p), n.removeEventListener("touchmove", h), n.removeEventListener("touchend", p);
|
|
2139
|
+
};
|
|
2140
|
+
}, [
|
|
2141
|
+
i,
|
|
2142
|
+
r,
|
|
2143
|
+
t,
|
|
2144
|
+
e
|
|
2145
|
+
]), /* @__PURE__ */ l("div", {
|
|
2146
|
+
className: at.plasmaBall,
|
|
2147
|
+
style: {
|
|
2148
|
+
width: e,
|
|
2149
|
+
height: t
|
|
2150
|
+
},
|
|
2151
|
+
children: /* @__PURE__ */ l("canvas", {
|
|
2152
|
+
ref: a,
|
|
2153
|
+
className: at.canvas,
|
|
2154
|
+
style: {
|
|
2155
|
+
width: e,
|
|
2156
|
+
height: t
|
|
2157
|
+
}
|
|
2158
|
+
})
|
|
2159
|
+
});
|
|
2160
|
+
}, st = {
|
|
1795
2161
|
smokeFog: "cos-smokeFog-SYlts",
|
|
1796
2162
|
canvas: "cos-canvas-iOJV7"
|
|
1797
|
-
},
|
|
2163
|
+
}, ct = ({ width: e = 800, height: t = 500, density: r = .5 }) => {
|
|
1798
2164
|
let i = o(null), a = o([]), s = o(0);
|
|
1799
2165
|
return n(() => {
|
|
1800
2166
|
let n = Math.floor(20 + r * 40);
|
|
@@ -1834,24 +2200,151 @@ var j = {
|
|
|
1834
2200
|
cancelAnimationFrame(s.current), u();
|
|
1835
2201
|
};
|
|
1836
2202
|
}, [t, e]), /* @__PURE__ */ l("div", {
|
|
1837
|
-
className:
|
|
2203
|
+
className: st.smokeFog,
|
|
1838
2204
|
style: {
|
|
1839
2205
|
width: e,
|
|
1840
2206
|
height: t
|
|
1841
2207
|
},
|
|
1842
2208
|
children: /* @__PURE__ */ l("canvas", {
|
|
1843
2209
|
ref: i,
|
|
1844
|
-
className:
|
|
2210
|
+
className: st.canvas,
|
|
1845
2211
|
style: {
|
|
1846
2212
|
width: e,
|
|
1847
2213
|
height: t
|
|
1848
2214
|
}
|
|
1849
2215
|
})
|
|
1850
2216
|
});
|
|
1851
|
-
},
|
|
2217
|
+
}, lt = {
|
|
2218
|
+
solarSystem: "cos-solarSystem-27h8F",
|
|
2219
|
+
canvas: "cos-canvas-C0nRa"
|
|
2220
|
+
}, ut = [
|
|
2221
|
+
{
|
|
2222
|
+
name: "Mercury",
|
|
2223
|
+
radius: 0,
|
|
2224
|
+
orbit: 42,
|
|
2225
|
+
speed: 4.8,
|
|
2226
|
+
color: "#94a3b8",
|
|
2227
|
+
size: 3
|
|
2228
|
+
},
|
|
2229
|
+
{
|
|
2230
|
+
name: "Venus",
|
|
2231
|
+
radius: 0,
|
|
2232
|
+
orbit: 58,
|
|
2233
|
+
speed: 3.5,
|
|
2234
|
+
color: "#fbbf24",
|
|
2235
|
+
size: 5
|
|
2236
|
+
},
|
|
2237
|
+
{
|
|
2238
|
+
name: "Earth",
|
|
2239
|
+
radius: 0,
|
|
2240
|
+
orbit: 78,
|
|
2241
|
+
speed: 3,
|
|
2242
|
+
color: "#38bdf8",
|
|
2243
|
+
size: 5
|
|
2244
|
+
},
|
|
2245
|
+
{
|
|
2246
|
+
name: "Mars",
|
|
2247
|
+
radius: 0,
|
|
2248
|
+
orbit: 98,
|
|
2249
|
+
speed: 2.4,
|
|
2250
|
+
color: "#f87171",
|
|
2251
|
+
size: 4
|
|
2252
|
+
},
|
|
2253
|
+
{
|
|
2254
|
+
name: "Jupiter",
|
|
2255
|
+
radius: 0,
|
|
2256
|
+
orbit: 130,
|
|
2257
|
+
speed: 1.6,
|
|
2258
|
+
color: "#fb923c",
|
|
2259
|
+
size: 12
|
|
2260
|
+
},
|
|
2261
|
+
{
|
|
2262
|
+
name: "Saturn",
|
|
2263
|
+
radius: 0,
|
|
2264
|
+
orbit: 160,
|
|
2265
|
+
speed: 1.2,
|
|
2266
|
+
color: "#fcd34d",
|
|
2267
|
+
size: 10
|
|
2268
|
+
},
|
|
2269
|
+
{
|
|
2270
|
+
name: "Moon",
|
|
2271
|
+
radius: 0,
|
|
2272
|
+
orbit: 14,
|
|
2273
|
+
speed: 8,
|
|
2274
|
+
color: "#cbd5e1",
|
|
2275
|
+
size: 2,
|
|
2276
|
+
parent: 2
|
|
2277
|
+
}
|
|
2278
|
+
], dt = ({ width: e = 400, height: t = 400, speed: r = 1, showOrbits: i = !0 }) => {
|
|
2279
|
+
let a = o(null), s = o([]), c = o([]);
|
|
2280
|
+
return n(() => {
|
|
2281
|
+
s.current = ut.map((e) => ({
|
|
2282
|
+
...e,
|
|
2283
|
+
angle: Math.random() * Math.PI * 2
|
|
2284
|
+
})), c.current = Array.from({ length: 80 }, () => ({
|
|
2285
|
+
x: Math.random(),
|
|
2286
|
+
y: Math.random(),
|
|
2287
|
+
alpha: Math.random() * .6
|
|
2288
|
+
}));
|
|
2289
|
+
}, []), n(() => {
|
|
2290
|
+
let n = a.current;
|
|
2291
|
+
if (!n) return;
|
|
2292
|
+
let o = window.devicePixelRatio || 1;
|
|
2293
|
+
n.width = e * o, n.height = t * o;
|
|
2294
|
+
let l = n.getContext("2d");
|
|
2295
|
+
if (!l) return;
|
|
2296
|
+
l.setTransform(o, 0, 0, o, 0, 0);
|
|
2297
|
+
let u = e / 2, d = t / 2, f = Math.min(e, t) / 380, p = 0, m = document.hidden, h = v((e) => {
|
|
2298
|
+
m = e;
|
|
2299
|
+
}), g = () => {
|
|
2300
|
+
if (p = requestAnimationFrame(g), m) return;
|
|
2301
|
+
let n = s.current, a = [];
|
|
2302
|
+
l.fillStyle = "#0f172a", l.fillRect(0, 0, e, t), c.current.forEach((n) => {
|
|
2303
|
+
l.fillStyle = `rgba(255,255,255,${n.alpha})`, l.fillRect(n.x * e, n.y * t, 1, 1);
|
|
2304
|
+
}), l.beginPath(), l.arc(u, d, 18 * f, 0, Math.PI * 2);
|
|
2305
|
+
let o = l.createRadialGradient(u, d, 0, u, d, 18 * f);
|
|
2306
|
+
o.addColorStop(0, "#fef08a"), o.addColorStop(.5, "#fbbf24"), o.addColorStop(1, "#f97316"), l.fillStyle = o, l.shadowColor = "#fbbf24", l.shadowBlur = 24, l.fill(), l.shadowBlur = 0, n.forEach((e, t) => {
|
|
2307
|
+
e.angle += e.speed * .008 * r / Math.sqrt(e.orbit);
|
|
2308
|
+
let n = u, o = d;
|
|
2309
|
+
e.parent !== void 0 && a[e.parent] && (n = a[e.parent].x, o = a[e.parent].y);
|
|
2310
|
+
let s = e.orbit * f, c = n + Math.cos(e.angle) * s, p = o + Math.sin(e.angle) * s;
|
|
2311
|
+
if (a[t] = {
|
|
2312
|
+
x: c,
|
|
2313
|
+
y: p
|
|
2314
|
+
}, i && e.parent === void 0 && (l.beginPath(), l.arc(n, o, s, 0, Math.PI * 2), l.strokeStyle = "rgba(148, 163, 184, 0.15)", l.lineWidth = 1, l.stroke()), e.name === "Saturn" && (l.beginPath(), l.ellipse(c, p, e.size * f * 1.8, e.size * f * .5, e.angle * .3, 0, Math.PI * 2), l.strokeStyle = "rgba(252, 211, 77, 0.5)", l.lineWidth = 1.5, l.stroke()), l.beginPath(), l.arc(c, p, e.size * f, 0, Math.PI * 2), l.fillStyle = e.color, e.name === "Earth") {
|
|
2315
|
+
let t = l.createRadialGradient(c - 2, p - 2, 0, c, p, e.size * f);
|
|
2316
|
+
t.addColorStop(0, "#4ade80"), t.addColorStop(.6, e.color), t.addColorStop(1, "#1d4ed8"), l.fillStyle = t;
|
|
2317
|
+
}
|
|
2318
|
+
l.fill();
|
|
2319
|
+
});
|
|
2320
|
+
};
|
|
2321
|
+
return g(), () => {
|
|
2322
|
+
cancelAnimationFrame(p), h();
|
|
2323
|
+
};
|
|
2324
|
+
}, [
|
|
2325
|
+
t,
|
|
2326
|
+
i,
|
|
2327
|
+
r,
|
|
2328
|
+
e
|
|
2329
|
+
]), /* @__PURE__ */ l("div", {
|
|
2330
|
+
className: lt.solarSystem,
|
|
2331
|
+
style: {
|
|
2332
|
+
width: e,
|
|
2333
|
+
height: t
|
|
2334
|
+
},
|
|
2335
|
+
children: /* @__PURE__ */ l("canvas", {
|
|
2336
|
+
ref: a,
|
|
2337
|
+
className: lt.canvas,
|
|
2338
|
+
style: {
|
|
2339
|
+
width: e,
|
|
2340
|
+
height: t
|
|
2341
|
+
}
|
|
2342
|
+
})
|
|
2343
|
+
});
|
|
2344
|
+
}, ft = {
|
|
1852
2345
|
snowfall: "cos-snowfall-Q-Dhg",
|
|
1853
2346
|
canvas: "cos-canvas-bJVF8"
|
|
1854
|
-
},
|
|
2347
|
+
}, pt = ({ width: e = 800, height: r = 500, mode: i = "snow", count: a = 120 }) => {
|
|
1855
2348
|
let s = o(null), c = o([]), u = o(0), d = t((t) => ({
|
|
1856
2349
|
x: Math.random() * e,
|
|
1857
2350
|
y: t ?? Math.random() * r,
|
|
@@ -1898,24 +2391,24 @@ var j = {
|
|
|
1898
2391
|
i,
|
|
1899
2392
|
e
|
|
1900
2393
|
]), /* @__PURE__ */ l("div", {
|
|
1901
|
-
className:
|
|
2394
|
+
className: ft.snowfall,
|
|
1902
2395
|
style: {
|
|
1903
2396
|
width: e,
|
|
1904
2397
|
height: r
|
|
1905
2398
|
},
|
|
1906
2399
|
children: /* @__PURE__ */ l("canvas", {
|
|
1907
2400
|
ref: s,
|
|
1908
|
-
className:
|
|
2401
|
+
className: ft.canvas,
|
|
1909
2402
|
style: {
|
|
1910
2403
|
width: e,
|
|
1911
2404
|
height: r
|
|
1912
2405
|
}
|
|
1913
2406
|
})
|
|
1914
2407
|
});
|
|
1915
|
-
},
|
|
2408
|
+
}, mt = {
|
|
1916
2409
|
starfield: "cos-starfield-QTwia",
|
|
1917
2410
|
canvas: "cos-canvas-C2t3g"
|
|
1918
|
-
},
|
|
2411
|
+
}, ht = ({ width: e = 800, height: t = 500, starCount: r = 400, speed: i = 1 }) => {
|
|
1919
2412
|
let a = o(null), s = o([]), c = o(0);
|
|
1920
2413
|
return n(() => {
|
|
1921
2414
|
s.current = Array.from({ length: r }, () => ({
|
|
@@ -1958,21 +2451,21 @@ var j = {
|
|
|
1958
2451
|
r,
|
|
1959
2452
|
e
|
|
1960
2453
|
]), /* @__PURE__ */ l("div", {
|
|
1961
|
-
className:
|
|
2454
|
+
className: mt.starfield,
|
|
1962
2455
|
style: {
|
|
1963
2456
|
width: e,
|
|
1964
2457
|
height: t
|
|
1965
2458
|
},
|
|
1966
2459
|
children: /* @__PURE__ */ l("canvas", {
|
|
1967
2460
|
ref: a,
|
|
1968
|
-
className:
|
|
2461
|
+
className: mt.canvas,
|
|
1969
2462
|
style: {
|
|
1970
2463
|
width: e,
|
|
1971
2464
|
height: t
|
|
1972
2465
|
}
|
|
1973
2466
|
})
|
|
1974
2467
|
});
|
|
1975
|
-
},
|
|
2468
|
+
}, H = {
|
|
1976
2469
|
progressChest: "cos-progressChest-Bqcv1",
|
|
1977
2470
|
barWrap: "cos-barWrap-E2pnl",
|
|
1978
2471
|
barTrack: "cos-barTrack-dKLhs",
|
|
@@ -1987,37 +2480,37 @@ var j = {
|
|
|
1987
2480
|
treasure: "cos-treasure-nx-6S",
|
|
1988
2481
|
pop: "cos-pop-uRZvT",
|
|
1989
2482
|
label: "cos-label-61hRe"
|
|
1990
|
-
},
|
|
2483
|
+
}, gt = ({ progress: e = 0, onOpen: t, label: r = "开启宝箱" }) => {
|
|
1991
2484
|
let i = o(!1), a = o(t), s = y(e, 0, 100), c = s >= 100;
|
|
1992
2485
|
return n(() => {
|
|
1993
2486
|
a.current = t;
|
|
1994
2487
|
}, [t]), n(() => {
|
|
1995
2488
|
c && !i.current && (i.current = !0, a.current?.()), c || (i.current = !1);
|
|
1996
2489
|
}, [c]), /* @__PURE__ */ u("div", {
|
|
1997
|
-
className:
|
|
2490
|
+
className: H.progressChest,
|
|
1998
2491
|
children: [
|
|
1999
2492
|
/* @__PURE__ */ u("div", {
|
|
2000
|
-
className:
|
|
2493
|
+
className: H.barWrap,
|
|
2001
2494
|
children: [/* @__PURE__ */ l("div", {
|
|
2002
|
-
className:
|
|
2495
|
+
className: H.barTrack,
|
|
2003
2496
|
children: /* @__PURE__ */ l("div", {
|
|
2004
|
-
className:
|
|
2497
|
+
className: H.barFill,
|
|
2005
2498
|
style: { width: `${s}%` }
|
|
2006
2499
|
})
|
|
2007
2500
|
}), /* @__PURE__ */ u("span", {
|
|
2008
|
-
className:
|
|
2501
|
+
className: H.pct,
|
|
2009
2502
|
children: [s.toFixed(0), "%"]
|
|
2010
2503
|
})]
|
|
2011
2504
|
}),
|
|
2012
2505
|
/* @__PURE__ */ u("div", {
|
|
2013
|
-
className: `${
|
|
2506
|
+
className: `${H.chest} ${c ? H.open : ""}`,
|
|
2014
2507
|
children: [/* @__PURE__ */ u("div", {
|
|
2015
|
-
className:
|
|
2016
|
-
children: [/* @__PURE__ */ l("div", { className:
|
|
2508
|
+
className: H.lid,
|
|
2509
|
+
children: [/* @__PURE__ */ l("div", { className: H.lidTop }), /* @__PURE__ */ l("div", { className: H.lock })]
|
|
2017
2510
|
}), /* @__PURE__ */ l("div", {
|
|
2018
|
-
className:
|
|
2511
|
+
className: H.body,
|
|
2019
2512
|
children: c && /* @__PURE__ */ u("div", {
|
|
2020
|
-
className:
|
|
2513
|
+
className: H.treasure,
|
|
2021
2514
|
children: [
|
|
2022
2515
|
/* @__PURE__ */ l("span", { children: "💎" }),
|
|
2023
2516
|
/* @__PURE__ */ l("span", { children: "✨" }),
|
|
@@ -2027,15 +2520,15 @@ var j = {
|
|
|
2027
2520
|
})]
|
|
2028
2521
|
}),
|
|
2029
2522
|
/* @__PURE__ */ l("p", {
|
|
2030
|
-
className:
|
|
2523
|
+
className: H.label,
|
|
2031
2524
|
children: c ? "宝箱已开启!" : r
|
|
2032
2525
|
})
|
|
2033
2526
|
]
|
|
2034
2527
|
});
|
|
2035
|
-
},
|
|
2528
|
+
}, _t = {
|
|
2036
2529
|
radarScan: "cos-radarScan-PZaG8",
|
|
2037
2530
|
canvas: "cos-canvas-fUw5N"
|
|
2038
|
-
},
|
|
2531
|
+
}, vt = ({ size: e = 300, color: t = "#22d3ee", blipCount: r = 5 }) => {
|
|
2039
2532
|
let i = o(null), a = o(0), s = o([]), c = o(0);
|
|
2040
2533
|
return n(() => {
|
|
2041
2534
|
s.current = Array.from({ length: r }, () => ({
|
|
@@ -2072,27 +2565,27 @@ var j = {
|
|
|
2072
2565
|
t,
|
|
2073
2566
|
e
|
|
2074
2567
|
]), /* @__PURE__ */ l("div", {
|
|
2075
|
-
className:
|
|
2568
|
+
className: _t.radarScan,
|
|
2076
2569
|
style: {
|
|
2077
2570
|
width: e,
|
|
2078
2571
|
height: e
|
|
2079
2572
|
},
|
|
2080
2573
|
children: /* @__PURE__ */ l("canvas", {
|
|
2081
2574
|
ref: i,
|
|
2082
|
-
className:
|
|
2575
|
+
className: _t.canvas,
|
|
2083
2576
|
style: {
|
|
2084
2577
|
width: e,
|
|
2085
2578
|
height: e
|
|
2086
2579
|
}
|
|
2087
2580
|
})
|
|
2088
2581
|
});
|
|
2089
|
-
},
|
|
2582
|
+
}, U = {
|
|
2090
2583
|
redPacketRain: "cos-redPacketRain-eJ7FW",
|
|
2091
2584
|
canvas: "cos-canvas-direH",
|
|
2092
2585
|
hud: "cos-hud-InqMq",
|
|
2093
2586
|
end: "cos-end-u0J7o",
|
|
2094
2587
|
hint: "cos-hint-sO6ld"
|
|
2095
|
-
},
|
|
2588
|
+
}, yt = ({ duration: e = 1e4, onGrab: r }) => {
|
|
2096
2589
|
let i = o(null), a = o([]), c = o(0), d = o(0), f = o(0), [p, m] = s(0), [h, g] = s(!0), _ = o(!0), y = o(r);
|
|
2097
2590
|
n(() => {
|
|
2098
2591
|
y.current = r;
|
|
@@ -2138,11 +2631,11 @@ var j = {
|
|
|
2138
2631
|
cancelAnimationFrame(c.current), clearTimeout(l), s();
|
|
2139
2632
|
};
|
|
2140
2633
|
}, [e, b]), /* @__PURE__ */ u("div", {
|
|
2141
|
-
className:
|
|
2634
|
+
className: U.redPacketRain,
|
|
2142
2635
|
children: [
|
|
2143
2636
|
/* @__PURE__ */ l("canvas", {
|
|
2144
2637
|
ref: i,
|
|
2145
|
-
className:
|
|
2638
|
+
className: U.canvas,
|
|
2146
2639
|
style: {
|
|
2147
2640
|
width: 400,
|
|
2148
2641
|
height: 500
|
|
@@ -2156,25 +2649,25 @@ var j = {
|
|
|
2156
2649
|
}
|
|
2157
2650
|
}),
|
|
2158
2651
|
/* @__PURE__ */ u("div", {
|
|
2159
|
-
className:
|
|
2652
|
+
className: U.hud,
|
|
2160
2653
|
children: [/* @__PURE__ */ u("span", { children: ["已抢: ¥", p] }), !h && /* @__PURE__ */ l("span", {
|
|
2161
|
-
className:
|
|
2654
|
+
className: U.end,
|
|
2162
2655
|
children: "红包雨结束"
|
|
2163
2656
|
})]
|
|
2164
2657
|
}),
|
|
2165
2658
|
/* @__PURE__ */ l("p", {
|
|
2166
|
-
className:
|
|
2659
|
+
className: U.hint,
|
|
2167
2660
|
children: "点击红包抢夺"
|
|
2168
2661
|
})
|
|
2169
2662
|
]
|
|
2170
2663
|
});
|
|
2171
|
-
},
|
|
2664
|
+
}, W = {
|
|
2172
2665
|
returnCityContainer: "cos-returnCityContainer-6XTxj",
|
|
2173
2666
|
star: "cos-star-a59Dx",
|
|
2174
2667
|
glassWrap: "cos-glassWrap-golMO",
|
|
2175
2668
|
rotate: "cos-rotate-7X9Jj",
|
|
2176
2669
|
glassItem: "cos-glassItem-OwlFI"
|
|
2177
|
-
},
|
|
2670
|
+
}, bt = ({ starCount: e, glassCount: t = 8, glassRadius: r = 150 }) => {
|
|
2178
2671
|
let i = o(null), a = o(null);
|
|
2179
2672
|
return n(() => {
|
|
2180
2673
|
let n = i.current, o = a.current;
|
|
@@ -2183,13 +2676,13 @@ var j = {
|
|
|
2183
2676
|
for (let e = 0; e < f; e++) {
|
|
2184
2677
|
let e = window.setTimeout(() => {
|
|
2185
2678
|
let e = document.createElement("div");
|
|
2186
|
-
e.className =
|
|
2679
|
+
e.className = W.star, e.style.top = `${Math.random() * d}px`, e.style.left = `${Math.random() * u}px`, n.append(e), c.push(e);
|
|
2187
2680
|
}, Math.random() * 2e3);
|
|
2188
2681
|
s.push(e);
|
|
2189
2682
|
}
|
|
2190
2683
|
for (let e = 0; e < t; e++) {
|
|
2191
2684
|
let n = document.createElement("div");
|
|
2192
|
-
n.className =
|
|
2685
|
+
n.className = W.glassItem, n.style.transform = `rotateY(${360 / t * e}deg) translateZ(${r}px)`, o.appendChild(n), l.push(n);
|
|
2193
2686
|
let i = window.setTimeout(() => {
|
|
2194
2687
|
n.style.top = "0px", n.style.opacity = "1";
|
|
2195
2688
|
}, e * 300);
|
|
@@ -2204,13 +2697,115 @@ var j = {
|
|
|
2204
2697
|
r
|
|
2205
2698
|
]), /* @__PURE__ */ l("div", {
|
|
2206
2699
|
ref: i,
|
|
2207
|
-
className:
|
|
2700
|
+
className: W.returnCityContainer,
|
|
2208
2701
|
children: /* @__PURE__ */ l("div", {
|
|
2209
2702
|
ref: a,
|
|
2210
|
-
className:
|
|
2703
|
+
className: W.glassWrap
|
|
2211
2704
|
})
|
|
2212
2705
|
});
|
|
2213
|
-
},
|
|
2706
|
+
}, xt = {
|
|
2707
|
+
ropeChain: "cos-ropeChain-gYaSK",
|
|
2708
|
+
canvas: "cos-canvas-5i95N"
|
|
2709
|
+
}, St = ({ width: e = 400, height: t = 400, segments: r = 16, color: i = "#38bdf8", gravity: a = .4 }) => {
|
|
2710
|
+
let s = o(null), c = o([]), u = o({
|
|
2711
|
+
active: !1,
|
|
2712
|
+
index: -1
|
|
2713
|
+
});
|
|
2714
|
+
return n(() => {
|
|
2715
|
+
let n = Math.max(4, Math.min(r, 30)), i = t * .7 / n, a = e / 2, o = t * .08;
|
|
2716
|
+
c.current = Array.from({ length: n + 1 }, (e, t) => ({
|
|
2717
|
+
x: a,
|
|
2718
|
+
y: o + t * i,
|
|
2719
|
+
prevX: a,
|
|
2720
|
+
prevY: o + t * i,
|
|
2721
|
+
pinned: t === 0
|
|
2722
|
+
}));
|
|
2723
|
+
}, [
|
|
2724
|
+
t,
|
|
2725
|
+
r,
|
|
2726
|
+
e
|
|
2727
|
+
]), n(() => {
|
|
2728
|
+
let n = s.current;
|
|
2729
|
+
if (!n) return;
|
|
2730
|
+
let o = window.devicePixelRatio || 1;
|
|
2731
|
+
n.width = e * o, n.height = t * o;
|
|
2732
|
+
let l = n.getContext("2d");
|
|
2733
|
+
if (!l) return;
|
|
2734
|
+
l.setTransform(o, 0, 0, o, 0, 0);
|
|
2735
|
+
let d = Math.max(4, Math.min(r, 30)), f = t * .7 / d, p = (e, t) => {
|
|
2736
|
+
let n = c.current, r = -1, i = 30;
|
|
2737
|
+
return n.forEach((n, a) => {
|
|
2738
|
+
let o = Math.hypot(n.x - e, n.y - t);
|
|
2739
|
+
o < i && (i = o, r = a);
|
|
2740
|
+
}), r;
|
|
2741
|
+
}, m = (e, t) => {
|
|
2742
|
+
let r = n.getBoundingClientRect(), i = e - r.left, a = t - r.top, o = p(i, a);
|
|
2743
|
+
if (o >= 0) {
|
|
2744
|
+
u.current = {
|
|
2745
|
+
active: !0,
|
|
2746
|
+
index: o
|
|
2747
|
+
};
|
|
2748
|
+
let e = c.current[o];
|
|
2749
|
+
e.x = i, e.y = a, e.prevX = i, e.prevY = a;
|
|
2750
|
+
}
|
|
2751
|
+
}, h = (e, t) => {
|
|
2752
|
+
if (!u.current.active) return;
|
|
2753
|
+
let r = n.getBoundingClientRect(), i = c.current[u.current.index];
|
|
2754
|
+
i.x = e - r.left, i.y = t - r.top;
|
|
2755
|
+
}, g = () => {
|
|
2756
|
+
u.current = {
|
|
2757
|
+
active: !1,
|
|
2758
|
+
index: -1
|
|
2759
|
+
};
|
|
2760
|
+
}, _ = (e) => m(e.clientX, e.clientY), y = (e) => h(e.clientX, e.clientY), b = (e) => {
|
|
2761
|
+
e.touches[0] && m(e.touches[0].clientX, e.touches[0].clientY);
|
|
2762
|
+
}, x = (e) => {
|
|
2763
|
+
e.touches[0] && h(e.touches[0].clientX, e.touches[0].clientY);
|
|
2764
|
+
};
|
|
2765
|
+
n.addEventListener("mousedown", _), n.addEventListener("mousemove", y), window.addEventListener("mouseup", g), n.addEventListener("touchstart", b, { passive: !0 }), n.addEventListener("touchmove", x, { passive: !0 }), window.addEventListener("touchend", g);
|
|
2766
|
+
let S = 0, C = document.hidden, w = v((e) => {
|
|
2767
|
+
C = e;
|
|
2768
|
+
}), T = () => {
|
|
2769
|
+
if (S = requestAnimationFrame(T), C) return;
|
|
2770
|
+
let n = c.current, r = u.current;
|
|
2771
|
+
for (let e of n) {
|
|
2772
|
+
if (e.pinned || r.active && n.indexOf(e) === r.index) continue;
|
|
2773
|
+
let t = (e.x - e.prevX) * .99, i = (e.y - e.prevY) * .99;
|
|
2774
|
+
e.prevX = e.x, e.prevY = e.y, e.x += t, e.y += i, e.y += a;
|
|
2775
|
+
}
|
|
2776
|
+
for (let e = 0; e < 6; e++) for (let e = 0; e < n.length - 1; e++) {
|
|
2777
|
+
let t = n[e], i = n[e + 1], a = i.x - t.x, o = i.y - t.y, s = Math.hypot(a, o) || .001, c = (s - f) / s, l = a * c * .5, u = o * c * .5;
|
|
2778
|
+
!t.pinned && !(r.active && e === r.index) && (t.x += l, t.y += u), !i.pinned && !(r.active && e + 1 === r.index) && (i.x -= l, i.y -= u);
|
|
2779
|
+
}
|
|
2780
|
+
l.fillStyle = "#0f172a", l.fillRect(0, 0, e, t), l.beginPath(), n.forEach((e, t) => t === 0 ? l.moveTo(e.x, e.y) : l.lineTo(e.x, e.y)), l.strokeStyle = i, l.lineWidth = 3, l.lineCap = "round", l.lineJoin = "round", l.shadowColor = i, l.shadowBlur = 8, l.stroke(), l.shadowBlur = 0, n.forEach((e, t) => {
|
|
2781
|
+
(t === 0 || t === n.length - 1 || t % 4 == 0) && (l.beginPath(), l.arc(e.x, e.y, t === 0 ? 6 : 4, 0, Math.PI * 2), l.fillStyle = t === 0 ? "#94a3b8" : i, l.fill());
|
|
2782
|
+
});
|
|
2783
|
+
};
|
|
2784
|
+
return T(), () => {
|
|
2785
|
+
cancelAnimationFrame(S), w(), n.removeEventListener("mousedown", _), n.removeEventListener("mousemove", y), window.removeEventListener("mouseup", g), n.removeEventListener("touchstart", b), n.removeEventListener("touchmove", x), window.removeEventListener("touchend", g);
|
|
2786
|
+
};
|
|
2787
|
+
}, [
|
|
2788
|
+
i,
|
|
2789
|
+
a,
|
|
2790
|
+
t,
|
|
2791
|
+
r,
|
|
2792
|
+
e
|
|
2793
|
+
]), /* @__PURE__ */ l("div", {
|
|
2794
|
+
className: xt.ropeChain,
|
|
2795
|
+
style: {
|
|
2796
|
+
width: e,
|
|
2797
|
+
height: t
|
|
2798
|
+
},
|
|
2799
|
+
children: /* @__PURE__ */ l("canvas", {
|
|
2800
|
+
ref: s,
|
|
2801
|
+
className: xt.canvas,
|
|
2802
|
+
style: {
|
|
2803
|
+
width: e,
|
|
2804
|
+
height: t
|
|
2805
|
+
}
|
|
2806
|
+
})
|
|
2807
|
+
});
|
|
2808
|
+
}, G = {
|
|
2214
2809
|
speedometer: "cos-speedometer-INc7F",
|
|
2215
2810
|
svg: "cos-svg-HG-lE",
|
|
2216
2811
|
track: "cos-track-5-922",
|
|
@@ -2220,37 +2815,37 @@ var j = {
|
|
|
2220
2815
|
hub: "cos-hub-4WaHw",
|
|
2221
2816
|
valueText: "cos-valueText--q4Xi",
|
|
2222
2817
|
label: "cos-label-hOPy1"
|
|
2223
|
-
},
|
|
2818
|
+
}, K = (e, t, n, r) => {
|
|
2224
2819
|
let i = (r - 90) * Math.PI / 180;
|
|
2225
2820
|
return {
|
|
2226
2821
|
x: e + n * Math.cos(i),
|
|
2227
2822
|
y: t + n * Math.sin(i)
|
|
2228
2823
|
};
|
|
2229
|
-
},
|
|
2824
|
+
}, Ct = ({ value: e = 0, max: t = 100, label: n = "SPEED", color: r = "#f97316" }) => {
|
|
2230
2825
|
let i = -120 + y(t > 0 ? e / t : 0, 0, 1) * 240, o = a(() => {
|
|
2231
|
-
let e =
|
|
2826
|
+
let e = K(100, 100, 72, -120), t = K(100, 100, 72, 120);
|
|
2232
2827
|
return `M ${e.x} ${e.y} A 72 72 0 1 1 ${t.x} ${t.y}`;
|
|
2233
2828
|
}, []), s = a(() => {
|
|
2234
|
-
let e =
|
|
2829
|
+
let e = K(100, 100, 72, -120), t = K(100, 100, 72, i), n = +(i - -120 > 180);
|
|
2235
2830
|
return `M ${e.x} ${e.y} A 72 72 0 ${n} 1 ${t.x} ${t.y}`;
|
|
2236
|
-
}, [i]), c =
|
|
2831
|
+
}, [i]), c = K(100, 100, 58, i);
|
|
2237
2832
|
return /* @__PURE__ */ u("div", {
|
|
2238
|
-
className:
|
|
2833
|
+
className: G.speedometer,
|
|
2239
2834
|
style: { "--gauge-color": r },
|
|
2240
2835
|
children: [/* @__PURE__ */ u("svg", {
|
|
2241
2836
|
viewBox: "0 0 200 130",
|
|
2242
|
-
className:
|
|
2837
|
+
className: G.svg,
|
|
2243
2838
|
children: [
|
|
2244
2839
|
/* @__PURE__ */ l("path", {
|
|
2245
2840
|
d: o,
|
|
2246
|
-
className:
|
|
2841
|
+
className: G.track,
|
|
2247
2842
|
fill: "none",
|
|
2248
2843
|
strokeWidth: "12",
|
|
2249
2844
|
strokeLinecap: "round"
|
|
2250
2845
|
}),
|
|
2251
2846
|
/* @__PURE__ */ l("path", {
|
|
2252
2847
|
d: s,
|
|
2253
|
-
className:
|
|
2848
|
+
className: G.valueArc,
|
|
2254
2849
|
fill: "none",
|
|
2255
2850
|
strokeWidth: "12",
|
|
2256
2851
|
strokeLinecap: "round"
|
|
@@ -2262,13 +2857,13 @@ var j = {
|
|
|
2262
2857
|
60,
|
|
2263
2858
|
120
|
|
2264
2859
|
].map((e) => {
|
|
2265
|
-
let t =
|
|
2860
|
+
let t = K(100, 100, 58, e), n = K(100, 100, 66, e);
|
|
2266
2861
|
return /* @__PURE__ */ l("line", {
|
|
2267
2862
|
x1: t.x,
|
|
2268
2863
|
y1: t.y,
|
|
2269
2864
|
x2: n.x,
|
|
2270
2865
|
y2: n.y,
|
|
2271
|
-
className:
|
|
2866
|
+
className: G.tick
|
|
2272
2867
|
}, e);
|
|
2273
2868
|
}),
|
|
2274
2869
|
/* @__PURE__ */ l("line", {
|
|
@@ -2276,27 +2871,27 @@ var j = {
|
|
|
2276
2871
|
y1: "100",
|
|
2277
2872
|
x2: c.x,
|
|
2278
2873
|
y2: c.y,
|
|
2279
|
-
className:
|
|
2874
|
+
className: G.needle
|
|
2280
2875
|
}),
|
|
2281
2876
|
/* @__PURE__ */ l("circle", {
|
|
2282
2877
|
cx: "100",
|
|
2283
2878
|
cy: "100",
|
|
2284
2879
|
r: "6",
|
|
2285
|
-
className:
|
|
2880
|
+
className: G.hub
|
|
2286
2881
|
}),
|
|
2287
2882
|
/* @__PURE__ */ l("text", {
|
|
2288
2883
|
x: "100",
|
|
2289
2884
|
y: "118",
|
|
2290
|
-
className:
|
|
2885
|
+
className: G.valueText,
|
|
2291
2886
|
children: Math.round(e)
|
|
2292
2887
|
})
|
|
2293
2888
|
]
|
|
2294
2889
|
}), /* @__PURE__ */ l("span", {
|
|
2295
|
-
className:
|
|
2890
|
+
className: G.label,
|
|
2296
2891
|
children: n
|
|
2297
2892
|
})]
|
|
2298
2893
|
});
|
|
2299
|
-
},
|
|
2894
|
+
}, q = {
|
|
2300
2895
|
timelinePulse: "cos-timelinePulse-kcBM6",
|
|
2301
2896
|
axis: "cos-axis-9DWis",
|
|
2302
2897
|
track: "cos-track-jG-HV",
|
|
@@ -2306,7 +2901,7 @@ var j = {
|
|
|
2306
2901
|
dot: "cos-dot-HJEVy",
|
|
2307
2902
|
pulse: "cos-pulse-N6FD1",
|
|
2308
2903
|
name: "cos-name-7zefJ"
|
|
2309
|
-
},
|
|
2904
|
+
}, wt = ({ steps: e = [
|
|
2310
2905
|
"Start",
|
|
2311
2906
|
"Process",
|
|
2312
2907
|
"Review",
|
|
@@ -2314,26 +2909,26 @@ var j = {
|
|
|
2314
2909
|
], current: t = 0, color: n = "#22d3ee" }) => {
|
|
2315
2910
|
let r = y(t, 0, Math.max(0, e.length - 1)), i = e.length > 1 ? r / (e.length - 1) : 0;
|
|
2316
2911
|
return /* @__PURE__ */ l("div", {
|
|
2317
|
-
className:
|
|
2912
|
+
className: q.timelinePulse,
|
|
2318
2913
|
style: {
|
|
2319
2914
|
"--pulse-color": n,
|
|
2320
2915
|
"--step-count": e.length,
|
|
2321
2916
|
"--progress-ratio": i
|
|
2322
2917
|
},
|
|
2323
2918
|
children: /* @__PURE__ */ u("div", {
|
|
2324
|
-
className:
|
|
2919
|
+
className: q.axis,
|
|
2325
2920
|
children: [
|
|
2326
|
-
/* @__PURE__ */ l("div", { className:
|
|
2327
|
-
/* @__PURE__ */ l("div", { className:
|
|
2921
|
+
/* @__PURE__ */ l("div", { className: q.track }),
|
|
2922
|
+
/* @__PURE__ */ l("div", { className: q.progress }),
|
|
2328
2923
|
/* @__PURE__ */ l("ul", {
|
|
2329
|
-
className:
|
|
2924
|
+
className: q.steps,
|
|
2330
2925
|
children: e.map((e, t) => {
|
|
2331
2926
|
let n = t < r ? "done" : t === r ? "current" : "pending";
|
|
2332
2927
|
return /* @__PURE__ */ u("li", {
|
|
2333
|
-
className:
|
|
2928
|
+
className: q.step,
|
|
2334
2929
|
"data-state": n,
|
|
2335
|
-
children: [/* @__PURE__ */ l("span", { className:
|
|
2336
|
-
className:
|
|
2930
|
+
children: [/* @__PURE__ */ l("span", { className: q.dot }), /* @__PURE__ */ l("span", {
|
|
2931
|
+
className: q.name,
|
|
2337
2932
|
children: e
|
|
2338
2933
|
})]
|
|
2339
2934
|
}, e + t);
|
|
@@ -2342,11 +2937,11 @@ var j = {
|
|
|
2342
2937
|
]
|
|
2343
2938
|
})
|
|
2344
2939
|
});
|
|
2345
|
-
},
|
|
2940
|
+
}, Tt = {
|
|
2346
2941
|
rippleWater: "cos-rippleWater-wsinI",
|
|
2347
2942
|
canvas: "cos-canvas-XOdSF",
|
|
2348
2943
|
hint: "cos-hint-0JH5D"
|
|
2349
|
-
},
|
|
2944
|
+
}, Et = ({ width: e = 800, height: r = 500, color: i = "#38bdf8" }) => {
|
|
2350
2945
|
let a = o(null), s = o([]), c = o(0), d = t((t, n) => {
|
|
2351
2946
|
let i = a.current;
|
|
2352
2947
|
if (!i) return;
|
|
@@ -2393,32 +2988,32 @@ var j = {
|
|
|
2393
2988
|
r,
|
|
2394
2989
|
e
|
|
2395
2990
|
]), /* @__PURE__ */ u("div", {
|
|
2396
|
-
className:
|
|
2991
|
+
className: Tt.rippleWater,
|
|
2397
2992
|
style: {
|
|
2398
2993
|
width: e,
|
|
2399
2994
|
height: r
|
|
2400
2995
|
},
|
|
2401
2996
|
children: [/* @__PURE__ */ l("canvas", {
|
|
2402
2997
|
ref: a,
|
|
2403
|
-
className:
|
|
2998
|
+
className: Tt.canvas,
|
|
2404
2999
|
style: {
|
|
2405
3000
|
width: e,
|
|
2406
3001
|
height: r
|
|
2407
3002
|
}
|
|
2408
3003
|
}), /* @__PURE__ */ l("span", {
|
|
2409
|
-
className:
|
|
3004
|
+
className: Tt.hint,
|
|
2410
3005
|
children: "点击水面产生涟漪"
|
|
2411
3006
|
})]
|
|
2412
3007
|
});
|
|
2413
|
-
},
|
|
3008
|
+
}, Dt = {
|
|
2414
3009
|
scrambleText: "cos-scrambleText-hN4Wm",
|
|
2415
3010
|
text: "cos-text-frsHs",
|
|
2416
3011
|
cursor: "cos-cursor-3zQOy",
|
|
2417
3012
|
blink: "cos-blink-OcKXu"
|
|
2418
|
-
},
|
|
3013
|
+
}, Ot = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%&*", kt = ({ text: e = "DECRYPTED", duration: t = 2e3, charset: r = Ot }) => {
|
|
2419
3014
|
let [i, a] = s(""), c = o(0), d = o(0);
|
|
2420
3015
|
return n(() => {
|
|
2421
|
-
let n = r.length > 0 ? r :
|
|
3016
|
+
let n = r.length > 0 ? r : Ot, i = e;
|
|
2422
3017
|
d.current = performance.now();
|
|
2423
3018
|
let o = (e) => {
|
|
2424
3019
|
let r = e - d.current, s = Math.min(r / t, 1), l = Math.floor(s * i.length);
|
|
@@ -2430,18 +3025,18 @@ var j = {
|
|
|
2430
3025
|
t,
|
|
2431
3026
|
r
|
|
2432
3027
|
]), /* @__PURE__ */ l("div", {
|
|
2433
|
-
className:
|
|
3028
|
+
className: Dt.scrambleText,
|
|
2434
3029
|
children: /* @__PURE__ */ u("p", {
|
|
2435
|
-
className:
|
|
2436
|
-
children: [i, /* @__PURE__ */ l("span", { className:
|
|
3030
|
+
className: Dt.text,
|
|
3031
|
+
children: [i, /* @__PURE__ */ l("span", { className: Dt.cursor })]
|
|
2437
3032
|
})
|
|
2438
3033
|
});
|
|
2439
|
-
},
|
|
3034
|
+
}, J = {
|
|
2440
3035
|
scratchCard: "cos-scratchCard-McIEK",
|
|
2441
3036
|
prize: "cos-prize-X0z5V",
|
|
2442
3037
|
canvas: "cos-canvas-JqIlr",
|
|
2443
3038
|
hidden: "cos-hidden-Lsfbt"
|
|
2444
|
-
},
|
|
3039
|
+
}, At = ({ coverColor: e = "#94a3b8", prize: r = "🎉 恭喜中奖!", onReveal: i, width: a = 300, height: c = 180 }) => {
|
|
2445
3040
|
let d = o(null), f = o(!1), p = o(!1), m = o(i), [h, g] = s(!1);
|
|
2446
3041
|
n(() => {
|
|
2447
3042
|
m.current = i;
|
|
@@ -2504,17 +3099,17 @@ var j = {
|
|
|
2504
3099
|
f.current = !1;
|
|
2505
3100
|
};
|
|
2506
3101
|
return /* @__PURE__ */ u("div", {
|
|
2507
|
-
className:
|
|
3102
|
+
className: J.scratchCard,
|
|
2508
3103
|
style: {
|
|
2509
3104
|
width: a,
|
|
2510
3105
|
height: c
|
|
2511
3106
|
},
|
|
2512
3107
|
children: [/* @__PURE__ */ l("div", {
|
|
2513
|
-
className:
|
|
3108
|
+
className: J.prize,
|
|
2514
3109
|
children: r
|
|
2515
3110
|
}), /* @__PURE__ */ l("canvas", {
|
|
2516
3111
|
ref: d,
|
|
2517
|
-
className: `${
|
|
3112
|
+
className: `${J.canvas} ${h ? J.hidden : ""}`,
|
|
2518
3113
|
style: {
|
|
2519
3114
|
width: a,
|
|
2520
3115
|
height: c
|
|
@@ -2528,7 +3123,7 @@ var j = {
|
|
|
2528
3123
|
onTouchEnd: C
|
|
2529
3124
|
})]
|
|
2530
3125
|
});
|
|
2531
|
-
},
|
|
3126
|
+
}, Y = {
|
|
2532
3127
|
slotMachine: "cos-slotMachine-P6FyZ",
|
|
2533
3128
|
machine: "cos-machine-B066r",
|
|
2534
3129
|
reel: "cos-reel-eEpJ3",
|
|
@@ -2537,14 +3132,14 @@ var j = {
|
|
|
2537
3132
|
mask: "cos-mask-jdrj3",
|
|
2538
3133
|
spinBtn: "cos-spinBtn-DvDE7",
|
|
2539
3134
|
result: "cos-result-dLN5b"
|
|
2540
|
-
},
|
|
3135
|
+
}, jt = [
|
|
2541
3136
|
"🍒",
|
|
2542
3137
|
"🍋",
|
|
2543
3138
|
"🍊",
|
|
2544
3139
|
"🍇",
|
|
2545
3140
|
"⭐",
|
|
2546
3141
|
"7️⃣"
|
|
2547
|
-
],
|
|
3142
|
+
], Mt = (e) => 1 - (1 - e) ** 3, Nt = ({ symbols: e = jt, onSpinEnd: r }) => {
|
|
2548
3143
|
let [i, a] = s(!1), [c, d] = s([
|
|
2549
3144
|
0,
|
|
2550
3145
|
0,
|
|
@@ -2561,31 +3156,31 @@ var j = {
|
|
|
2561
3156
|
return n(() => () => {
|
|
2562
3157
|
g.current && (g.current.cancelled = !0), cancelAnimationFrame(m.current);
|
|
2563
3158
|
}, []), /* @__PURE__ */ u("div", {
|
|
2564
|
-
className:
|
|
3159
|
+
className: Y.slotMachine,
|
|
2565
3160
|
children: [
|
|
2566
3161
|
/* @__PURE__ */ l("div", {
|
|
2567
|
-
className:
|
|
3162
|
+
className: Y.machine,
|
|
2568
3163
|
children: [
|
|
2569
3164
|
0,
|
|
2570
3165
|
1,
|
|
2571
3166
|
2
|
|
2572
3167
|
].map((e) => /* @__PURE__ */ u("div", {
|
|
2573
|
-
className:
|
|
3168
|
+
className: Y.reel,
|
|
2574
3169
|
style: { height: 240 },
|
|
2575
3170
|
children: [/* @__PURE__ */ l("div", {
|
|
2576
|
-
className:
|
|
3171
|
+
className: Y.strip,
|
|
2577
3172
|
style: { transform: `translateY(${c[e]}px)` },
|
|
2578
3173
|
children: _.map((e, t) => /* @__PURE__ */ l("div", {
|
|
2579
|
-
className:
|
|
3174
|
+
className: Y.item,
|
|
2580
3175
|
style: { height: 80 },
|
|
2581
3176
|
children: e
|
|
2582
3177
|
}, t))
|
|
2583
|
-
}), /* @__PURE__ */ l("div", { className:
|
|
3178
|
+
}), /* @__PURE__ */ l("div", { className: Y.mask })]
|
|
2584
3179
|
}, e))
|
|
2585
3180
|
}),
|
|
2586
3181
|
/* @__PURE__ */ l("button", {
|
|
2587
3182
|
type: "button",
|
|
2588
|
-
className:
|
|
3183
|
+
className: Y.spinBtn,
|
|
2589
3184
|
onClick: () => {
|
|
2590
3185
|
if (i) return;
|
|
2591
3186
|
a(!0), p([]);
|
|
@@ -2604,7 +3199,7 @@ var j = {
|
|
|
2604
3199
|
if (d(r.map((e, t) => {
|
|
2605
3200
|
let r = i - l - s[t];
|
|
2606
3201
|
if (r < 0) return e;
|
|
2607
|
-
let a =
|
|
3202
|
+
let a = Mt(Math.min(r / o, 1));
|
|
2608
3203
|
return e + (n[t] - e) * a;
|
|
2609
3204
|
})), !s.every((e) => i - l - e >= o)) m.current = requestAnimationFrame(f);
|
|
2610
3205
|
else if (!u.cancelled) {
|
|
@@ -2619,12 +3214,12 @@ var j = {
|
|
|
2619
3214
|
children: i ? "旋转中..." : "开始"
|
|
2620
3215
|
}),
|
|
2621
3216
|
f.length > 0 && !i && /* @__PURE__ */ l("p", {
|
|
2622
|
-
className:
|
|
3217
|
+
className: Y.result,
|
|
2623
3218
|
children: f[0] === f[1] && f[1] === f[2] ? "🎰 大奖!" : `结果: ${f.join(" ")}`
|
|
2624
3219
|
})
|
|
2625
3220
|
]
|
|
2626
3221
|
});
|
|
2627
|
-
},
|
|
3222
|
+
}, X = {
|
|
2628
3223
|
splitReveal: "cos-splitReveal-6W8-6",
|
|
2629
3224
|
text: "cos-text-miTsj",
|
|
2630
3225
|
char: "cos-char-0gPJV",
|
|
@@ -2633,27 +3228,27 @@ var j = {
|
|
|
2633
3228
|
fromBottom: "cos-fromBottom-24D6g",
|
|
2634
3229
|
fromLeft: "cos-fromLeft-OMiPY",
|
|
2635
3230
|
fromRight: "cos-fromRight-EcMOR"
|
|
2636
|
-
},
|
|
3231
|
+
}, Pt = [
|
|
2637
3232
|
"fromTop",
|
|
2638
3233
|
"fromBottom",
|
|
2639
3234
|
"fromLeft",
|
|
2640
3235
|
"fromRight"
|
|
2641
|
-
],
|
|
2642
|
-
className:
|
|
3236
|
+
], Ft = ({ text: e = "REVEAL", delay: t = 80, color: n = "#f8fafc" }) => /* @__PURE__ */ l("div", {
|
|
3237
|
+
className: X.splitReveal,
|
|
2643
3238
|
children: /* @__PURE__ */ l("h1", {
|
|
2644
|
-
className:
|
|
3239
|
+
className: X.text,
|
|
2645
3240
|
style: { "--reveal-color": n },
|
|
2646
3241
|
children: e.split("").map((e, n) => /* @__PURE__ */ l("span", {
|
|
2647
|
-
className: `${
|
|
3242
|
+
className: `${X.char} ${X[Pt[n % Pt.length]]}`,
|
|
2648
3243
|
style: { animationDelay: `${n * t}ms` },
|
|
2649
3244
|
children: e === " " ? "\xA0" : e
|
|
2650
3245
|
}, `${e}-${n}`))
|
|
2651
3246
|
})
|
|
2652
|
-
}),
|
|
3247
|
+
}), It = {
|
|
2653
3248
|
spotlight: "cos-spotlight-OddY1",
|
|
2654
3249
|
content: "cos-content-5I1Wy",
|
|
2655
3250
|
overlay: "cos-overlay-F6CJ5"
|
|
2656
|
-
},
|
|
3251
|
+
}, Lt = ({ children: e, radius: n = 120, dimColor: r = "rgba(0, 0, 0, 0.85)" }) => {
|
|
2657
3252
|
let i = o(null), a = t((e) => {
|
|
2658
3253
|
let t = i.current;
|
|
2659
3254
|
if (!t) return;
|
|
@@ -2662,16 +3257,16 @@ var j = {
|
|
|
2662
3257
|
}, []);
|
|
2663
3258
|
return /* @__PURE__ */ u("div", {
|
|
2664
3259
|
ref: i,
|
|
2665
|
-
className:
|
|
3260
|
+
className: It.spotlight,
|
|
2666
3261
|
style: {
|
|
2667
3262
|
"--spot-radius": `${n}px`,
|
|
2668
3263
|
"--dim-color": r
|
|
2669
3264
|
},
|
|
2670
3265
|
onMouseMove: a,
|
|
2671
3266
|
children: [/* @__PURE__ */ l("div", {
|
|
2672
|
-
className:
|
|
3267
|
+
className: It.content,
|
|
2673
3268
|
children: e
|
|
2674
|
-
}), /* @__PURE__ */ l("div", { className:
|
|
3269
|
+
}), /* @__PURE__ */ l("div", { className: It.overlay })]
|
|
2675
3270
|
});
|
|
2676
3271
|
}, Z = {
|
|
2677
3272
|
turntable: "cos-turntable-dkc32",
|
|
@@ -2681,7 +3276,7 @@ var j = {
|
|
|
2681
3276
|
spinBtn: "cos-spinBtn-l9JIC",
|
|
2682
3277
|
result: "cos-result-H8q2c",
|
|
2683
3278
|
"fade-in": "cos-fade-in-U9bUC"
|
|
2684
|
-
},
|
|
3279
|
+
}, Rt = [
|
|
2685
3280
|
"#FF6B6B",
|
|
2686
3281
|
"#4ECDC4",
|
|
2687
3282
|
"#FFE66D",
|
|
@@ -2690,19 +3285,19 @@ var j = {
|
|
|
2690
3285
|
"#F472B6",
|
|
2691
3286
|
"#34D399",
|
|
2692
3287
|
"#FB923C"
|
|
2693
|
-
],
|
|
3288
|
+
], zt = [
|
|
2694
3289
|
{ label: "一等奖" },
|
|
2695
3290
|
{ label: "二等奖" },
|
|
2696
3291
|
{ label: "三等奖" },
|
|
2697
3292
|
{ label: "谢谢参与" },
|
|
2698
3293
|
{ label: "优惠券" },
|
|
2699
3294
|
{ label: "再来一次" }
|
|
2700
|
-
],
|
|
3295
|
+
], Bt = (e) => 1 - (1 - e) ** 3, Vt = ({ prizes: e = zt, size: r = 360, spinDuration: i = 4e3, spinRounds: a = 5, buttonText: c = "开始抽奖", onSpinEnd: d }) => {
|
|
2701
3296
|
let f = o(null), p = o(0), m = o(0), h = o(1), [g, _] = s(!1), [v, y] = s(null), b = o(d), x = o(null);
|
|
2702
3297
|
n(() => {
|
|
2703
3298
|
b.current = d;
|
|
2704
3299
|
}, [d]);
|
|
2705
|
-
let S = r + 48, C = (e, t) => t.color ??
|
|
3300
|
+
let S = r + 48, C = (e, t) => t.color ?? Rt[e % Rt.length], w = t((t) => {
|
|
2706
3301
|
let n = f.current;
|
|
2707
3302
|
if (!n) return;
|
|
2708
3303
|
let i = n.getContext("2d");
|
|
@@ -2732,7 +3327,7 @@ var j = {
|
|
|
2732
3327
|
}, [S, w]), n(() => () => {
|
|
2733
3328
|
x.current && (x.current.cancelled = !0), m.current && cancelAnimationFrame(m.current);
|
|
2734
3329
|
}, []);
|
|
2735
|
-
let
|
|
3330
|
+
let T = (t) => {
|
|
2736
3331
|
let n = 360 / e.length, r = (180 / Math.PI * t % 360 + 360) % 360;
|
|
2737
3332
|
return Math.floor((360 - r + n / 2) % 360 / n) % e.length;
|
|
2738
3333
|
};
|
|
@@ -2768,10 +3363,10 @@ var j = {
|
|
|
2768
3363
|
x.current = l;
|
|
2769
3364
|
let u = (t) => {
|
|
2770
3365
|
if (l.cancelled) return;
|
|
2771
|
-
let n = t - c, r = Math.min(n / i, 1), a =
|
|
3366
|
+
let n = t - c, r = Math.min(n / i, 1), a = Bt(r), d = s + (o - s) * a;
|
|
2772
3367
|
if (p.current = d, w(d), r < 1) m.current = requestAnimationFrame(u);
|
|
2773
3368
|
else if (!l.cancelled) {
|
|
2774
|
-
let t =
|
|
3369
|
+
let t = T(d), n = e[t];
|
|
2775
3370
|
p.current = d, _(!1), y(n), b.current?.(n, t);
|
|
2776
3371
|
}
|
|
2777
3372
|
};
|
|
@@ -2794,11 +3389,11 @@ var j = {
|
|
|
2794
3389
|
prompt: "cos-prompt-Y4hVD",
|
|
2795
3390
|
cursor: "cos-cursor-m8hGi",
|
|
2796
3391
|
blink: "cos-blink-XykM7"
|
|
2797
|
-
},
|
|
3392
|
+
}, Ht = [
|
|
2798
3393
|
"Hello, cos-design!",
|
|
2799
3394
|
"欢迎来到组件库 ✨",
|
|
2800
3395
|
"Build something fun 🚀"
|
|
2801
|
-
],
|
|
3396
|
+
], Ut = ({ texts: e, speed: t, deleteSpeed: r, pause: i }) => {
|
|
2802
3397
|
let [a, o] = s(""), [c, d] = s(0), [f, p] = s(!1);
|
|
2803
3398
|
return n(() => {
|
|
2804
3399
|
let n = e[c % e.length], s;
|
|
@@ -2846,9 +3441,9 @@ var j = {
|
|
|
2846
3441
|
})]
|
|
2847
3442
|
})
|
|
2848
3443
|
});
|
|
2849
|
-
},
|
|
2850
|
-
let i = e.length > 0 ? e :
|
|
2851
|
-
return /* @__PURE__ */ l(
|
|
3444
|
+
}, Wt = ({ texts: e = Ht, speed: t = 100, deleteSpeed: n = 50, pause: r = 2e3 }) => {
|
|
3445
|
+
let i = e.length > 0 ? e : Ht;
|
|
3446
|
+
return /* @__PURE__ */ l(Ut, {
|
|
2852
3447
|
texts: i,
|
|
2853
3448
|
speed: t,
|
|
2854
3449
|
deleteSpeed: n,
|
|
@@ -2860,7 +3455,7 @@ var j = {
|
|
|
2860
3455
|
label: "cos-label-9BHOU",
|
|
2861
3456
|
wave: "cos-wave-GycLU",
|
|
2862
3457
|
ripple: "cos-ripple-5ZFpr"
|
|
2863
|
-
},
|
|
3458
|
+
}, Gt = ({ text: e = "点我试试", color: t = "#38bdf8", className: n, style: r, ...i }) => /* @__PURE__ */ l("div", {
|
|
2864
3459
|
className: $.waveButton,
|
|
2865
3460
|
children: /* @__PURE__ */ u("button", {
|
|
2866
3461
|
type: "button",
|
|
@@ -2879,26 +3474,26 @@ var j = {
|
|
|
2879
3474
|
})
|
|
2880
3475
|
]
|
|
2881
3476
|
})
|
|
2882
|
-
}),
|
|
3477
|
+
}), Kt = {
|
|
2883
3478
|
waveText: "cos-waveText-Zy2Tp",
|
|
2884
3479
|
text: "cos-text-el-KR",
|
|
2885
3480
|
char: "cos-char-Y9-mV",
|
|
2886
3481
|
wave: "cos-wave-jVRCz"
|
|
2887
|
-
},
|
|
2888
|
-
className:
|
|
3482
|
+
}, qt = ({ text: e = "WAVE", amplitude: t = 12, color: n = "#38bdf8", fontSize: r = 56 }) => /* @__PURE__ */ l("div", {
|
|
3483
|
+
className: Kt.waveText,
|
|
2889
3484
|
children: /* @__PURE__ */ l("h1", {
|
|
2890
|
-
className:
|
|
3485
|
+
className: Kt.text,
|
|
2891
3486
|
style: {
|
|
2892
3487
|
fontSize: r,
|
|
2893
3488
|
"--wave-color": n,
|
|
2894
3489
|
"--wave-amp": `${t}px`
|
|
2895
3490
|
},
|
|
2896
3491
|
children: e.split("").map((e, t) => /* @__PURE__ */ l("span", {
|
|
2897
|
-
className:
|
|
3492
|
+
className: Kt.char,
|
|
2898
3493
|
style: { animationDelay: `${t * .1}s` },
|
|
2899
3494
|
children: e === " " ? "\xA0" : e
|
|
2900
3495
|
}, `${e}-${t}`))
|
|
2901
3496
|
})
|
|
2902
3497
|
});
|
|
2903
3498
|
//#endregion
|
|
2904
|
-
export { x as AudioVisualizer, _ as Aurora, f as BarcodeScan, m as BurnAway, C as CanvasClock,
|
|
3499
|
+
export { x as AudioVisualizer, _ as Aurora, f as BarcodeScan, m as BurnAway, C as CanvasClock, te as Charge, D as ClickSpark, ne as Confetti, ce as Countdown, he as CursorTrail, ie as CyberGrid, _e as DiceRoll, ue as DnaHelix, ye as DoublePendulum, pe as ElectricArc, Ee as Fireworks, ke as FlipCounter, Pe as GlitchText, Me as GradientFlow, Le as GravityBalls, Re as HolographicCard, He as LiquidGlass, ze as LiquidProgress, Ve as LorenzAttractor, We as MagneticButton, Ke as MatrixRain, Xe as MazeGenerator, Je as MetaballPool, Qe as MeteorRain, $e as NeonText, tt as NewtonCradle, rt as OrbitalChart, it as ParticleNetwork, ot as PlasmaBall, gt as ProgressChest, vt as RadarScan, yt as RedPacketRain, bt as ReturnCity, Et as RippleWater, St as RopeChain, kt as ScrambleText, At as ScratchCard, Nt as SlotMachine, ct as SmokeFog, pt as Snowfall, dt as SolarSystem, Ct as Speedometer, Ft as SplitReveal, Lt as Spotlight, ht as Starfield, wt as TimelinePulse, Vt as Turntable, Wt as Typewriter, Gt as WaveButton, qt as WaveText };
|