cos-design 3.3.0 → 3.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/README.md +21 -12
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +657 -405
- package/dist/{components → src/components}/index.d.ts +2 -0
- package/dist/{components → src/components}/weatherBackground/index.d.ts +12 -0
- package/dist/src/components/weatherBackground/live-weather.d.ts +32 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/vite-env.d.ts +39 -0
- package/package.json +3 -58
- package/dist/components/_shared/visibility.d.ts +0 -3
- /package/dist/{components → src/components}/audioVisualizer/index.d.ts +0 -0
- /package/dist/{components → src/components}/aurora/index.d.ts +0 -0
- /package/dist/{components → src/components}/barcodeScan/index.d.ts +0 -0
- /package/dist/{components → src/components}/burnAway/index.d.ts +0 -0
- /package/dist/{components → src/components}/canvasClock/index.d.ts +0 -0
- /package/dist/{components → src/components}/charge/index.d.ts +0 -0
- /package/dist/{components → src/components}/clickSpark/index.d.ts +0 -0
- /package/dist/{components → src/components}/confetti/index.d.ts +0 -0
- /package/dist/{components → src/components}/countdown/index.d.ts +0 -0
- /package/dist/{components → src/components}/cursorTrail/index.d.ts +0 -0
- /package/dist/{components → src/components}/cyberGrid/index.d.ts +0 -0
- /package/dist/{components → src/components}/diceRoll/index.d.ts +0 -0
- /package/dist/{components → src/components}/dnaHelix/index.d.ts +0 -0
- /package/dist/{components → src/components}/doublePendulum/index.d.ts +0 -0
- /package/dist/{components → src/components}/electricArc/index.d.ts +0 -0
- /package/dist/{components → src/components}/fireworks/index.d.ts +0 -0
- /package/dist/{components → src/components}/flipCounter/index.d.ts +0 -0
- /package/dist/{components → src/components}/glitchText/index.d.ts +0 -0
- /package/dist/{components → src/components}/gradientFlow/index.d.ts +0 -0
- /package/dist/{components → src/components}/gravityBalls/index.d.ts +0 -0
- /package/dist/{components → src/components}/holographicCard/index.d.ts +0 -0
- /package/dist/{components → src/components}/liquidGlass/index.d.ts +0 -0
- /package/dist/{components → src/components}/liquidProgress/index.d.ts +0 -0
- /package/dist/{components → src/components}/lorenzAttractor/index.d.ts +0 -0
- /package/dist/{components → src/components}/magneticButton/index.d.ts +0 -0
- /package/dist/{components → src/components}/matrixRain/index.d.ts +0 -0
- /package/dist/{components → src/components}/mazeGenerator/index.d.ts +0 -0
- /package/dist/{components → src/components}/metaballPool/index.d.ts +0 -0
- /package/dist/{components → src/components}/meteorRain/index.d.ts +0 -0
- /package/dist/{components → src/components}/neonText/index.d.ts +0 -0
- /package/dist/{components → src/components}/newtonCradle/index.d.ts +0 -0
- /package/dist/{components → src/components}/orbitalChart/index.d.ts +0 -0
- /package/dist/{components → src/components}/particleNetwork/index.d.ts +0 -0
- /package/dist/{components → src/components}/plasmaBall/index.d.ts +0 -0
- /package/dist/{components → src/components}/progressChest/index.d.ts +0 -0
- /package/dist/{components → src/components}/radarScan/index.d.ts +0 -0
- /package/dist/{components → src/components}/redPacketRain/index.d.ts +0 -0
- /package/dist/{components → src/components}/returnCity/index.d.ts +0 -0
- /package/dist/{components → src/components}/rippleWater/index.d.ts +0 -0
- /package/dist/{components → src/components}/ropeChain/index.d.ts +0 -0
- /package/dist/{components → src/components}/scrambleText/index.d.ts +0 -0
- /package/dist/{components → src/components}/scratchCard/index.d.ts +0 -0
- /package/dist/{components → src/components}/slotMachine/index.d.ts +0 -0
- /package/dist/{components → src/components}/smokeFog/index.d.ts +0 -0
- /package/dist/{components → src/components}/snowfall/index.d.ts +0 -0
- /package/dist/{components → src/components}/solarSystem/index.d.ts +0 -0
- /package/dist/{components → src/components}/speedometer/index.d.ts +0 -0
- /package/dist/{components → src/components}/splitReveal/index.d.ts +0 -0
- /package/dist/{components → src/components}/spotlight/index.d.ts +0 -0
- /package/dist/{components → src/components}/starfield/index.d.ts +0 -0
- /package/dist/{components → src/components}/timelinePulse/index.d.ts +0 -0
- /package/dist/{components → src/components}/turntable/index.d.ts +0 -0
- /package/dist/{components → src/components}/typewriter/index.d.ts +0 -0
- /package/dist/{components → src/components}/waveButton/index.d.ts +0 -0
- /package/dist/{components → src/components}/waveText/index.d.ts +0 -0
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
|
-
}, T = 15, E = 258,
|
|
292
|
+
}, T = 15, E = 258, D = (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;
|
|
@@ -340,12 +340,12 @@ import './index.css';var d = {
|
|
|
340
340
|
children: [b, "%"]
|
|
341
341
|
})]
|
|
342
342
|
});
|
|
343
|
-
},
|
|
343
|
+
}, O = {
|
|
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
|
+
}, k = ({ 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: O.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: O.canvas
|
|
395
395
|
}),
|
|
396
396
|
e && /* @__PURE__ */ l("div", {
|
|
397
|
-
className:
|
|
397
|
+
className: O.content,
|
|
398
398
|
children: e
|
|
399
399
|
}),
|
|
400
400
|
!e && /* @__PURE__ */ l("p", {
|
|
401
|
-
className:
|
|
401
|
+
className: O.hint,
|
|
402
402
|
children: "点击任意位置产生火花"
|
|
403
403
|
})
|
|
404
404
|
]
|
|
405
405
|
});
|
|
406
|
-
},
|
|
406
|
+
}, A = {
|
|
407
407
|
confetti: "cos-confetti-MeNtU",
|
|
408
408
|
canvas: "cos-canvas-0T3Vs",
|
|
409
409
|
hint: "cos-hint-sGHEi"
|
|
410
|
-
},
|
|
410
|
+
}, j = [
|
|
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
|
+
], M = () => j[Math.floor(Math.random() * j.length)], N = (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: M(),
|
|
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
|
+
}, ee = 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(...N(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: A.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: A.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: A.hint,
|
|
485
485
|
children: "点击画布再次喷射"
|
|
486
486
|
})]
|
|
487
487
|
});
|
|
488
488
|
});
|
|
489
|
-
|
|
490
|
-
var
|
|
489
|
+
ee.displayName = "Confetti";
|
|
490
|
+
var te = {
|
|
491
491
|
cyberGrid: "cos-cyberGrid-VgJwl",
|
|
492
492
|
canvas: "cos-canvas--Mq-O"
|
|
493
|
-
},
|
|
493
|
+
}, ne = ({ 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 ne = {
|
|
|
532
532
|
i,
|
|
533
533
|
e
|
|
534
534
|
]), /* @__PURE__ */ l("div", {
|
|
535
|
-
className:
|
|
535
|
+
className: te.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: te.canvas,
|
|
543
543
|
style: {
|
|
544
544
|
width: e,
|
|
545
545
|
height: t
|
|
546
546
|
}
|
|
547
547
|
})
|
|
548
548
|
});
|
|
549
|
-
},
|
|
549
|
+
}, P = {
|
|
550
550
|
countdown: "cos-countdown-5ZKKP",
|
|
551
551
|
unit: "cos-unit-dth8N",
|
|
552
552
|
value: "cos-value-yVzcP",
|
|
@@ -554,7 +554,7 @@ var ne = {
|
|
|
554
554
|
ended: "cos-ended-c0dsD",
|
|
555
555
|
pulse: "cos-pulse-krQd-",
|
|
556
556
|
invalid: "cos-invalid-d6t-L"
|
|
557
|
-
},
|
|
557
|
+
}, re = (e) => e instanceof Date ? e.getTime() : typeof e == "number" ? e : new Date(e).getTime(), ie = (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 ne = {
|
|
|
563
563
|
minutes: Math.floor(n % 3600 / 60),
|
|
564
564
|
seconds: n % 60
|
|
565
565
|
};
|
|
566
|
-
},
|
|
566
|
+
}, ae = [
|
|
567
567
|
{
|
|
568
568
|
key: "days",
|
|
569
569
|
label: "天"
|
|
@@ -580,8 +580,8 @@ var ne = {
|
|
|
580
580
|
key: "seconds",
|
|
581
581
|
label: "秒"
|
|
582
582
|
}
|
|
583
|
-
],
|
|
584
|
-
let c = a(() =>
|
|
583
|
+
], oe = ({ targetDate: e, onEnd: t, showLabels: r = !0, color: i = "#f472b6" }) => {
|
|
584
|
+
let c = a(() => re(e), [e]), d = !Number.isNaN(c), [, f] = s(0), p = o(!1), m = o(t), h = d ? ie(c) : {
|
|
585
585
|
days: 0,
|
|
586
586
|
hours: 0,
|
|
587
587
|
minutes: 0,
|
|
@@ -601,32 +601,32 @@ var ne = {
|
|
|
601
601
|
}, 1e3);
|
|
602
602
|
return () => clearInterval(e);
|
|
603
603
|
}, [d, c]), d ? /* @__PURE__ */ u("div", {
|
|
604
|
-
className:
|
|
604
|
+
className: P.countdown,
|
|
605
605
|
style: { "--countdown-color": i },
|
|
606
|
-
children: [
|
|
607
|
-
className:
|
|
606
|
+
children: [ae.map(({ key: e, label: t }) => /* @__PURE__ */ u("div", {
|
|
607
|
+
className: P.unit,
|
|
608
608
|
children: [/* @__PURE__ */ l("div", {
|
|
609
|
-
className:
|
|
609
|
+
className: P.value,
|
|
610
610
|
children: String(h[e]).padStart(2, "0")
|
|
611
611
|
}), r && /* @__PURE__ */ l("span", {
|
|
612
|
-
className:
|
|
612
|
+
className: P.label,
|
|
613
613
|
children: t
|
|
614
614
|
})]
|
|
615
615
|
}, e)), h.total <= 0 && /* @__PURE__ */ l("p", {
|
|
616
|
-
className:
|
|
616
|
+
className: P.ended,
|
|
617
617
|
children: "时间到!"
|
|
618
618
|
})]
|
|
619
619
|
}) : /* @__PURE__ */ l("div", {
|
|
620
|
-
className:
|
|
620
|
+
className: P.countdown,
|
|
621
621
|
children: /* @__PURE__ */ l("p", {
|
|
622
|
-
className:
|
|
622
|
+
className: P.invalid,
|
|
623
623
|
children: "无效的目标时间"
|
|
624
624
|
})
|
|
625
625
|
});
|
|
626
|
-
},
|
|
626
|
+
}, se = {
|
|
627
627
|
dnaHelix: "cos-dnaHelix-nEQLW",
|
|
628
628
|
canvas: "cos-canvas-uEV8B"
|
|
629
|
-
},
|
|
629
|
+
}, ce = ({ 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 ne = {
|
|
|
656
656
|
r,
|
|
657
657
|
e
|
|
658
658
|
]), /* @__PURE__ */ l("div", {
|
|
659
|
-
className:
|
|
659
|
+
className: se.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: se.canvas,
|
|
667
667
|
style: {
|
|
668
668
|
width: e,
|
|
669
669
|
height: t
|
|
670
670
|
}
|
|
671
671
|
})
|
|
672
672
|
});
|
|
673
|
-
},
|
|
673
|
+
}, le = {
|
|
674
674
|
electricArc: "cos-electricArc-BFlY3",
|
|
675
675
|
canvas: "cos-canvas-iowDx"
|
|
676
|
-
},
|
|
676
|
+
}, F = (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 = F(e, t, o + f, s + p, i * .6, a - 1), h = F(o + f, s + p, n, r, i * .6, a - 1);
|
|
679
679
|
return [...m.slice(0, -1), ...h];
|
|
680
|
-
},
|
|
680
|
+
}, ue = ({ 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 ne = {
|
|
|
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 = F(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 ne = {
|
|
|
705
705
|
t,
|
|
706
706
|
e
|
|
707
707
|
]), /* @__PURE__ */ l("div", {
|
|
708
|
-
className:
|
|
708
|
+
className: le.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: le.canvas,
|
|
716
716
|
style: {
|
|
717
717
|
width: e,
|
|
718
718
|
height: t
|
|
719
719
|
}
|
|
720
720
|
})
|
|
721
721
|
});
|
|
722
|
-
},
|
|
722
|
+
}, de = {
|
|
723
723
|
cursorTrail: "cos-cursorTrail-fpz5p",
|
|
724
724
|
canvas: "cos-canvas-Iuyp3",
|
|
725
725
|
hint: "cos-hint-9GLHx"
|
|
726
|
-
},
|
|
726
|
+
}, fe = ({ 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 ne = {
|
|
|
762
762
|
t,
|
|
763
763
|
r
|
|
764
764
|
]), /* @__PURE__ */ u("div", {
|
|
765
|
-
className:
|
|
765
|
+
className: de.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: de.canvas,
|
|
773
773
|
style: {
|
|
774
774
|
width: r,
|
|
775
775
|
height: i
|
|
@@ -782,11 +782,11 @@ var ne = {
|
|
|
782
782
|
};
|
|
783
783
|
}
|
|
784
784
|
}), /* @__PURE__ */ l("p", {
|
|
785
|
-
className:
|
|
785
|
+
className: de.hint,
|
|
786
786
|
children: "移动鼠标查看粒子轨迹"
|
|
787
787
|
})]
|
|
788
788
|
});
|
|
789
|
-
},
|
|
789
|
+
}, I = {
|
|
790
790
|
diceRoll: "cos-diceRoll-GDwjV",
|
|
791
791
|
scene: "cos-scene-tmnKM",
|
|
792
792
|
cube: "cos-cube-RklEa",
|
|
@@ -801,7 +801,7 @@ var ne = {
|
|
|
801
801
|
face6: "cos-face6-Yp-MX",
|
|
802
802
|
rollBtn: "cos-rollBtn-nXMWJ",
|
|
803
803
|
result: "cos-result-kXzu9"
|
|
804
|
-
},
|
|
804
|
+
}, pe = {
|
|
805
805
|
1: {
|
|
806
806
|
x: 0,
|
|
807
807
|
y: 0
|
|
@@ -826,7 +826,7 @@ var ne = {
|
|
|
826
826
|
x: 90,
|
|
827
827
|
y: 0
|
|
828
828
|
}
|
|
829
|
-
},
|
|
829
|
+
}, me = ({ 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 ne = {
|
|
|
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 = pe[e] ?? pe[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 ne = {
|
|
|
876
876
|
[75, 75]
|
|
877
877
|
]
|
|
878
878
|
}[e] ?? []).map(([e, t], n) => /* @__PURE__ */ l("span", {
|
|
879
|
-
className:
|
|
879
|
+
className: I.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: I.diceRoll,
|
|
887
887
|
children: [
|
|
888
888
|
/* @__PURE__ */ l("div", {
|
|
889
|
-
className:
|
|
889
|
+
className: I.scene,
|
|
890
890
|
children: /* @__PURE__ */ l("div", {
|
|
891
|
-
className: `${
|
|
891
|
+
className: `${I.cube} ${r ? I.rolling : ""}`,
|
|
892
892
|
style: { transform: `rotateX(${d.x}deg) rotateY(${d.y}deg) rotateZ(${d.z}deg)` },
|
|
893
893
|
children: [
|
|
894
894
|
1,
|
|
@@ -898,28 +898,28 @@ var ne = {
|
|
|
898
898
|
5,
|
|
899
899
|
6
|
|
900
900
|
].map((e) => /* @__PURE__ */ l("div", {
|
|
901
|
-
className: `${
|
|
901
|
+
className: `${I.face} ${I[`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: I.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: I.result,
|
|
915
915
|
children: ["点数: ", a]
|
|
916
916
|
})
|
|
917
917
|
]
|
|
918
918
|
});
|
|
919
|
-
},
|
|
919
|
+
}, he = {
|
|
920
920
|
doublePendulum: "cos-doublePendulum-FUEeK",
|
|
921
921
|
canvas: "cos-canvas-OVkhW"
|
|
922
|
-
},
|
|
922
|
+
}, ge = ({ width: e = 400, height: t = 400, trailLength: r = 120, color: i = "#38bdf8", color2: a = "#a78bfa" }) => {
|
|
923
923
|
let s = o(null), c = o({
|
|
924
924
|
theta1: Math.PI / 2 + .1,
|
|
925
925
|
theta2: Math.PI / 2 - .2,
|
|
@@ -938,13 +938,13 @@ var ne = {
|
|
|
938
938
|
y = e;
|
|
939
939
|
}), x = () => {
|
|
940
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), E = p * (3 - 1 * Math.cos(2 * o - 2 * s)),
|
|
942
|
-
n.omega1 +=
|
|
943
|
-
let
|
|
944
|
-
|
|
945
|
-
x:
|
|
946
|
-
y:
|
|
947
|
-
}),
|
|
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), E = p * (3 - 1 * Math.cos(2 * o - 2 * s)), D = (-9.8 * 3 * S - 1 * h * Math.sin(o - 2 * s) - 2 * C * 1 * (b * b * m + v * v * p * w)) / E, O = 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 += D * g, n.omega2 += O * g, n.theta1 += n.omega1 * g, n.theta2 += n.omega2 * g;
|
|
943
|
+
let k = d + p * Math.sin(n.theta1), A = f + p * Math.cos(n.theta1), j = k + m * Math.sin(n.theta2), M = A + m * Math.cos(n.theta2), N = u.current;
|
|
944
|
+
N.push({
|
|
945
|
+
x: j,
|
|
946
|
+
y: M
|
|
947
|
+
}), N.length > r && N.shift(), l.fillStyle = "rgba(15, 23, 42, 0.22)", l.fillRect(0, 0, e, t), N.length > 1 && (l.beginPath(), N.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(k, A), l.lineTo(j, M), 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(k, A, 10, 0, Math.PI * 2), l.fillStyle = i, l.shadowColor = i, l.shadowBlur = 10, l.fill(), l.shadowBlur = 0, l.beginPath(), l.arc(j, M, 10, 0, Math.PI * 2), l.fillStyle = a, l.shadowColor = a, l.shadowBlur = 10, l.fill(), l.shadowBlur = 0;
|
|
948
948
|
};
|
|
949
949
|
return l.fillStyle = "#0f172a", l.fillRect(0, 0, e, t), x(), () => {
|
|
950
950
|
cancelAnimationFrame(_), b();
|
|
@@ -956,32 +956,32 @@ var ne = {
|
|
|
956
956
|
r,
|
|
957
957
|
e
|
|
958
958
|
]), /* @__PURE__ */ l("div", {
|
|
959
|
-
className:
|
|
959
|
+
className: he.doublePendulum,
|
|
960
960
|
style: {
|
|
961
961
|
width: e,
|
|
962
962
|
height: t
|
|
963
963
|
},
|
|
964
964
|
children: /* @__PURE__ */ l("canvas", {
|
|
965
965
|
ref: s,
|
|
966
|
-
className:
|
|
966
|
+
className: he.canvas,
|
|
967
967
|
style: {
|
|
968
968
|
width: e,
|
|
969
969
|
height: t
|
|
970
970
|
}
|
|
971
971
|
})
|
|
972
972
|
});
|
|
973
|
-
},
|
|
973
|
+
}, _e = {
|
|
974
974
|
fireworks: "cos-fireworks-fsSqL",
|
|
975
975
|
canvas: "cos-canvas-spL8G",
|
|
976
976
|
hint: "cos-hint-5XDRH"
|
|
977
|
-
},
|
|
977
|
+
}, ve = [
|
|
978
978
|
"#ff6b6b",
|
|
979
979
|
"#ffd93d",
|
|
980
980
|
"#6bcb77",
|
|
981
981
|
"#4d96ff",
|
|
982
982
|
"#a66cff",
|
|
983
983
|
"#ff85c0"
|
|
984
|
-
],
|
|
984
|
+
], ye = .12, be = 240, xe = () => ve[Math.floor(Math.random() * ve.length)], Se = (e, t, n) => {
|
|
985
985
|
let r = 60 + Math.floor(Math.random() * 30);
|
|
986
986
|
return Array.from({ length: r }, () => {
|
|
987
987
|
let r = Math.random() * Math.PI * 2, i = Math.random() * 4 + 2;
|
|
@@ -991,11 +991,11 @@ var ne = {
|
|
|
991
991
|
vx: Math.cos(r) * i,
|
|
992
992
|
vy: Math.sin(r) * i,
|
|
993
993
|
alpha: 1,
|
|
994
|
-
color: Math.random() > .3 ? n :
|
|
994
|
+
color: Math.random() > .3 ? n : xe(),
|
|
995
995
|
decay: Math.random() * .015 + .01
|
|
996
996
|
};
|
|
997
997
|
});
|
|
998
|
-
},
|
|
998
|
+
}, Ce = e(({ width: e = 800, height: r = 500, auto: a = !0 }, s) => {
|
|
999
999
|
let c = o(null), d = o([]), f = o(0), p = t((t) => {
|
|
1000
1000
|
let n = t ?? Math.random() * e * .6 + e * .2;
|
|
1001
1001
|
d.current.push({
|
|
@@ -1003,7 +1003,7 @@ var ne = {
|
|
|
1003
1003
|
y: r,
|
|
1004
1004
|
vy: -(Math.random() * 4 + 6),
|
|
1005
1005
|
targetY: Math.random() * r * .35 + r * .15,
|
|
1006
|
-
color:
|
|
1006
|
+
color: xe(),
|
|
1007
1007
|
exploded: !1,
|
|
1008
1008
|
particles: [],
|
|
1009
1009
|
age: 0
|
|
@@ -1022,9 +1022,9 @@ var ne = {
|
|
|
1022
1022
|
}), u = () => {
|
|
1023
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) => {
|
|
1024
1024
|
if (!e.exploded) {
|
|
1025
|
-
e.age += 1, e.y += e.vy, e.vy +=
|
|
1026
|
-
let t = e.vy >= 0, n = e.y <= e.targetY, r = e.y < 0, a = e.age >=
|
|
1027
|
-
return (t || n || r || a) && (e.exploded = !0, e.particles =
|
|
1025
|
+
e.age += 1, e.y += e.vy, e.vy += ye, 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 >= be;
|
|
1027
|
+
return (t || n || r || a) && (e.exploded = !0, e.particles = Se(e.x, e.y, e.color)), !0;
|
|
1028
1028
|
}
|
|
1029
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;
|
|
1030
1030
|
}));
|
|
@@ -1038,14 +1038,14 @@ var ne = {
|
|
|
1038
1038
|
p,
|
|
1039
1039
|
e
|
|
1040
1040
|
]), /* @__PURE__ */ u("div", {
|
|
1041
|
-
className:
|
|
1041
|
+
className: _e.fireworks,
|
|
1042
1042
|
style: {
|
|
1043
1043
|
width: e,
|
|
1044
1044
|
height: r
|
|
1045
1045
|
},
|
|
1046
1046
|
children: [/* @__PURE__ */ l("canvas", {
|
|
1047
1047
|
ref: c,
|
|
1048
|
-
className:
|
|
1048
|
+
className: _e.canvas,
|
|
1049
1049
|
style: {
|
|
1050
1050
|
width: e,
|
|
1051
1051
|
height: r
|
|
@@ -1055,13 +1055,13 @@ var ne = {
|
|
|
1055
1055
|
p(e.clientX - t.left);
|
|
1056
1056
|
}
|
|
1057
1057
|
}), /* @__PURE__ */ l("p", {
|
|
1058
|
-
className:
|
|
1058
|
+
className: _e.hint,
|
|
1059
1059
|
children: "点击画布燃放烟花"
|
|
1060
1060
|
})]
|
|
1061
1061
|
});
|
|
1062
1062
|
});
|
|
1063
|
-
|
|
1064
|
-
var
|
|
1063
|
+
Ce.displayName = "Fireworks";
|
|
1064
|
+
var L = {
|
|
1065
1065
|
flipCounter: "cos-flipCounter-3LuI0",
|
|
1066
1066
|
digit: "cos-digit-yJRPy",
|
|
1067
1067
|
digitCard: "cos-digitCard-zZUzt",
|
|
@@ -1073,7 +1073,7 @@ var I = {
|
|
|
1073
1073
|
isFlipping: "cos-isFlipping-EVEdI",
|
|
1074
1074
|
"fold-top": "cos-fold-top-v-6XJ",
|
|
1075
1075
|
"unfold-bottom": "cos-unfold-bottom-e2gzU"
|
|
1076
|
-
},
|
|
1076
|
+
}, we = (e, t) => Math.max(0, Math.floor(e)).toString().padStart(t, "0").slice(-t), Te = ({ digit: e, color: t, duration: r }) => {
|
|
1077
1077
|
let i = o(e), [a, d] = s(!1), [f, p] = s(e);
|
|
1078
1078
|
n(() => {
|
|
1079
1079
|
if (e === i.current) return;
|
|
@@ -1083,58 +1083,58 @@ var I = {
|
|
|
1083
1083
|
}, [e, r]);
|
|
1084
1084
|
let m = a ? f : e;
|
|
1085
1085
|
return /* @__PURE__ */ l("div", {
|
|
1086
|
-
className:
|
|
1086
|
+
className: L.digit,
|
|
1087
1087
|
style: {
|
|
1088
1088
|
"--flip-color": t,
|
|
1089
1089
|
"--flip-duration": `${r}ms`
|
|
1090
1090
|
},
|
|
1091
1091
|
children: /* @__PURE__ */ u("div", {
|
|
1092
|
-
className: `${
|
|
1092
|
+
className: `${L.digitCard} ${a ? L.isFlipping : ""}`,
|
|
1093
1093
|
children: [
|
|
1094
1094
|
/* @__PURE__ */ l("div", {
|
|
1095
|
-
className:
|
|
1095
|
+
className: L.staticTop,
|
|
1096
1096
|
children: /* @__PURE__ */ l("span", { children: m })
|
|
1097
1097
|
}),
|
|
1098
1098
|
/* @__PURE__ */ l("div", {
|
|
1099
|
-
className:
|
|
1099
|
+
className: L.staticBottom,
|
|
1100
1100
|
children: /* @__PURE__ */ l("span", { children: m })
|
|
1101
1101
|
}),
|
|
1102
1102
|
a && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("div", {
|
|
1103
|
-
className: `${
|
|
1103
|
+
className: `${L.flap} ${L.flapTop}`,
|
|
1104
1104
|
children: /* @__PURE__ */ l("span", { children: f })
|
|
1105
1105
|
}), /* @__PURE__ */ l("div", {
|
|
1106
|
-
className: `${
|
|
1106
|
+
className: `${L.flap} ${L.flapBottom}`,
|
|
1107
1107
|
children: /* @__PURE__ */ l("span", { children: e })
|
|
1108
1108
|
})] })
|
|
1109
1109
|
]
|
|
1110
1110
|
})
|
|
1111
1111
|
});
|
|
1112
|
-
},
|
|
1113
|
-
let i =
|
|
1112
|
+
}, Ee = ({ value: e, digits: t = 4, color: n = "#38bdf8", duration: r = 600 }) => {
|
|
1113
|
+
let i = we(e, t).split("");
|
|
1114
1114
|
return /* @__PURE__ */ l("div", {
|
|
1115
|
-
className:
|
|
1116
|
-
children: i.map((e, t) => /* @__PURE__ */ l(
|
|
1115
|
+
className: L.flipCounter,
|
|
1116
|
+
children: i.map((e, t) => /* @__PURE__ */ l(Te, {
|
|
1117
1117
|
digit: e,
|
|
1118
1118
|
color: n,
|
|
1119
1119
|
duration: r
|
|
1120
1120
|
}, t))
|
|
1121
1121
|
});
|
|
1122
|
-
},
|
|
1122
|
+
}, De = {
|
|
1123
1123
|
gradientFlow: "cos-gradientFlow-XhN16",
|
|
1124
1124
|
text: "cos-text-ORuqk",
|
|
1125
1125
|
flow: "cos-flow-9FzMA"
|
|
1126
|
-
},
|
|
1126
|
+
}, Oe = [
|
|
1127
1127
|
"#ff00de",
|
|
1128
1128
|
"#7c3aed",
|
|
1129
1129
|
"#00f0ff",
|
|
1130
1130
|
"#38bdf8",
|
|
1131
1131
|
"#ff00de"
|
|
1132
|
-
],
|
|
1133
|
-
let r = t.length >= 2 ? t.join(", ") :
|
|
1132
|
+
], ke = ({ text: e = "GRADIENT", colors: t = Oe, fontSize: n = 64 }) => {
|
|
1133
|
+
let r = t.length >= 2 ? t.join(", ") : Oe.join(", ");
|
|
1134
1134
|
return /* @__PURE__ */ l("div", {
|
|
1135
|
-
className:
|
|
1135
|
+
className: De.gradientFlow,
|
|
1136
1136
|
children: /* @__PURE__ */ l("h1", {
|
|
1137
|
-
className:
|
|
1137
|
+
className: De.text,
|
|
1138
1138
|
style: {
|
|
1139
1139
|
fontSize: n,
|
|
1140
1140
|
backgroundImage: `linear-gradient(90deg, ${r})`
|
|
@@ -1142,15 +1142,15 @@ var I = {
|
|
|
1142
1142
|
children: e
|
|
1143
1143
|
})
|
|
1144
1144
|
});
|
|
1145
|
-
},
|
|
1145
|
+
}, Ae = {
|
|
1146
1146
|
glitchText: "cos-glitchText-dZ-sR",
|
|
1147
1147
|
text: "cos-text-JsPHN",
|
|
1148
1148
|
"glitch-1": "cos-glitch-1-s9pqH",
|
|
1149
1149
|
"glitch-2": "cos-glitch-2-GhFB-"
|
|
1150
|
-
},
|
|
1151
|
-
className:
|
|
1150
|
+
}, je = ({ text: e = "GLITCH", color: t = "#f8fafc", glitchColor1: n = "#ff00de", glitchColor2: r = "#00f0ff", fontSize: i = 64 }) => /* @__PURE__ */ l("div", {
|
|
1151
|
+
className: Ae.glitchText,
|
|
1152
1152
|
children: /* @__PURE__ */ l("h1", {
|
|
1153
|
-
className:
|
|
1153
|
+
className: Ae.text,
|
|
1154
1154
|
"data-text": e,
|
|
1155
1155
|
style: {
|
|
1156
1156
|
fontSize: i,
|
|
@@ -1160,16 +1160,16 @@ var I = {
|
|
|
1160
1160
|
},
|
|
1161
1161
|
children: e
|
|
1162
1162
|
})
|
|
1163
|
-
}),
|
|
1163
|
+
}), Me = {
|
|
1164
1164
|
gravityBalls: "cos-gravityBalls-LdwFo",
|
|
1165
1165
|
canvas: "cos-canvas-n7esd"
|
|
1166
|
-
},
|
|
1166
|
+
}, Ne = [
|
|
1167
1167
|
"#38bdf8",
|
|
1168
1168
|
"#a78bfa",
|
|
1169
1169
|
"#f472b6",
|
|
1170
1170
|
"#4ade80",
|
|
1171
1171
|
"#fbbf24"
|
|
1172
|
-
],
|
|
1172
|
+
], Pe = ({ width: e = 400, height: t = 300, ballCount: r = 12 }) => {
|
|
1173
1173
|
let i = o(null), a = o([]);
|
|
1174
1174
|
return n(() => {
|
|
1175
1175
|
a.current = Array.from({ length: r }, () => ({
|
|
@@ -1178,7 +1178,7 @@ var I = {
|
|
|
1178
1178
|
vx: (Math.random() - .5) * 4,
|
|
1179
1179
|
vy: Math.random() * 2,
|
|
1180
1180
|
r: Math.random() * 10 + 8,
|
|
1181
|
-
color:
|
|
1181
|
+
color: Ne[Math.floor(Math.random() * Ne.length)]
|
|
1182
1182
|
}));
|
|
1183
1183
|
}, [
|
|
1184
1184
|
r,
|
|
@@ -1218,34 +1218,34 @@ var I = {
|
|
|
1218
1218
|
cancelAnimationFrame(s), l();
|
|
1219
1219
|
};
|
|
1220
1220
|
}, [t, e]), /* @__PURE__ */ l("div", {
|
|
1221
|
-
className:
|
|
1221
|
+
className: Me.gravityBalls,
|
|
1222
1222
|
style: {
|
|
1223
1223
|
width: e,
|
|
1224
1224
|
height: t
|
|
1225
1225
|
},
|
|
1226
1226
|
children: /* @__PURE__ */ l("canvas", {
|
|
1227
1227
|
ref: i,
|
|
1228
|
-
className:
|
|
1228
|
+
className: Me.canvas,
|
|
1229
1229
|
style: {
|
|
1230
1230
|
width: e,
|
|
1231
1231
|
height: t
|
|
1232
1232
|
}
|
|
1233
1233
|
})
|
|
1234
1234
|
});
|
|
1235
|
-
},
|
|
1235
|
+
}, R = {
|
|
1236
1236
|
wrap: "cos-wrap-r1gGL",
|
|
1237
1237
|
card: "cos-card-3W10s",
|
|
1238
1238
|
shine: "cos-shine-0xjID",
|
|
1239
1239
|
image: "cos-image-AV2XG",
|
|
1240
1240
|
placeholder: "cos-placeholder-wuuL3",
|
|
1241
1241
|
info: "cos-info-CNR0r"
|
|
1242
|
-
},
|
|
1242
|
+
}, Fe = ({ title: e = "全息卡片", subtitle: t = "移动鼠标体验 3D 效果", image: n }) => {
|
|
1243
1243
|
let r = o(null);
|
|
1244
1244
|
return /* @__PURE__ */ l("div", {
|
|
1245
|
-
className:
|
|
1245
|
+
className: R.wrap,
|
|
1246
1246
|
children: /* @__PURE__ */ u("div", {
|
|
1247
1247
|
ref: r,
|
|
1248
|
-
className:
|
|
1248
|
+
className: R.card,
|
|
1249
1249
|
onMouseMove: (e) => {
|
|
1250
1250
|
let t = r.current;
|
|
1251
1251
|
if (!t) return;
|
|
@@ -1257,23 +1257,23 @@ var I = {
|
|
|
1257
1257
|
e && (e.style.setProperty("--rx", "0deg"), e.style.setProperty("--ry", "0deg"), e.style.setProperty("--gx", "50%"), e.style.setProperty("--gy", "50%"));
|
|
1258
1258
|
},
|
|
1259
1259
|
children: [
|
|
1260
|
-
/* @__PURE__ */ l("div", { className:
|
|
1260
|
+
/* @__PURE__ */ l("div", { className: R.shine }),
|
|
1261
1261
|
n ? /* @__PURE__ */ l("img", {
|
|
1262
1262
|
src: n,
|
|
1263
1263
|
alt: e,
|
|
1264
|
-
className:
|
|
1264
|
+
className: R.image
|
|
1265
1265
|
}) : /* @__PURE__ */ l("div", {
|
|
1266
|
-
className:
|
|
1266
|
+
className: R.placeholder,
|
|
1267
1267
|
children: /* @__PURE__ */ l("span", { children: "✦" })
|
|
1268
1268
|
}),
|
|
1269
1269
|
/* @__PURE__ */ u("div", {
|
|
1270
|
-
className:
|
|
1270
|
+
className: R.info,
|
|
1271
1271
|
children: [/* @__PURE__ */ l("h3", { children: e }), /* @__PURE__ */ l("p", { children: t })]
|
|
1272
1272
|
})
|
|
1273
1273
|
]
|
|
1274
1274
|
})
|
|
1275
1275
|
});
|
|
1276
|
-
},
|
|
1276
|
+
}, z = {
|
|
1277
1277
|
liquidProgress: "cos-liquidProgress-ABZZA",
|
|
1278
1278
|
svg: "cos-svg-YdTvy",
|
|
1279
1279
|
track: "cos-track-IhMjO",
|
|
@@ -1281,7 +1281,7 @@ var I = {
|
|
|
1281
1281
|
fillBg: "cos-fillBg-pwLI1",
|
|
1282
1282
|
wave: "cos-wave-CBwgG",
|
|
1283
1283
|
label: "cos-label-WYDqS"
|
|
1284
|
-
},
|
|
1284
|
+
}, Ie = ({ value: e = 0, max: t = 100, size: i = 160, color: a = "#38bdf8" }) => {
|
|
1285
1285
|
let s = o(null), c = r().replace(/:/g, ""), d = y(t > 0 ? e / t * 100 : 0, 0, 100), f = 100 - d;
|
|
1286
1286
|
return n(() => {
|
|
1287
1287
|
let e = 0, t = 0, n = document.hidden, r = v((e) => {
|
|
@@ -1301,7 +1301,7 @@ var I = {
|
|
|
1301
1301
|
cancelAnimationFrame(e), r();
|
|
1302
1302
|
};
|
|
1303
1303
|
}, [f]), /* @__PURE__ */ u("div", {
|
|
1304
|
-
className:
|
|
1304
|
+
className: z.liquidProgress,
|
|
1305
1305
|
style: {
|
|
1306
1306
|
width: i,
|
|
1307
1307
|
height: i,
|
|
@@ -1309,7 +1309,7 @@ var I = {
|
|
|
1309
1309
|
},
|
|
1310
1310
|
children: [/* @__PURE__ */ u("svg", {
|
|
1311
1311
|
viewBox: "0 0 100 100",
|
|
1312
|
-
className:
|
|
1312
|
+
className: z.svg,
|
|
1313
1313
|
children: [
|
|
1314
1314
|
/* @__PURE__ */ l("defs", { children: /* @__PURE__ */ l("clipPath", {
|
|
1315
1315
|
id: `clip-${c}`,
|
|
@@ -1323,7 +1323,7 @@ var I = {
|
|
|
1323
1323
|
cx: "50",
|
|
1324
1324
|
cy: "50",
|
|
1325
1325
|
r: 45,
|
|
1326
|
-
className:
|
|
1326
|
+
className: z.track,
|
|
1327
1327
|
strokeWidth: 10,
|
|
1328
1328
|
fill: "none"
|
|
1329
1329
|
}),
|
|
@@ -1334,10 +1334,10 @@ var I = {
|
|
|
1334
1334
|
y: "0",
|
|
1335
1335
|
width: "100",
|
|
1336
1336
|
height: "100",
|
|
1337
|
-
className:
|
|
1337
|
+
className: z.fillBg
|
|
1338
1338
|
}), /* @__PURE__ */ l("path", {
|
|
1339
1339
|
ref: s,
|
|
1340
|
-
className:
|
|
1340
|
+
className: z.wave,
|
|
1341
1341
|
d: `M0,${f} Q25,${f - 4} 50,${f} T100,${f} V100 H0 Z`
|
|
1342
1342
|
})]
|
|
1343
1343
|
}),
|
|
@@ -1345,20 +1345,20 @@ var I = {
|
|
|
1345
1345
|
cx: "50",
|
|
1346
1346
|
cy: "50",
|
|
1347
1347
|
r: 45,
|
|
1348
|
-
className:
|
|
1348
|
+
className: z.ring,
|
|
1349
1349
|
strokeWidth: 10,
|
|
1350
1350
|
fill: "none"
|
|
1351
1351
|
})
|
|
1352
1352
|
]
|
|
1353
1353
|
}), /* @__PURE__ */ u("span", {
|
|
1354
|
-
className:
|
|
1354
|
+
className: z.label,
|
|
1355
1355
|
children: [Math.round(d), "%"]
|
|
1356
1356
|
})]
|
|
1357
1357
|
});
|
|
1358
|
-
},
|
|
1358
|
+
}, Le = {
|
|
1359
1359
|
lorenzAttractor: "cos-lorenzAttractor--UAI7",
|
|
1360
1360
|
canvas: "cos-canvas-oeXce"
|
|
1361
|
-
},
|
|
1361
|
+
}, Re = ({ width: e = 400, height: t = 360, speed: r = 1, color: i = "#f472b6", pointCount: a = 2e3 }) => {
|
|
1362
1362
|
let s = o(null), c = o(0);
|
|
1363
1363
|
return n(() => {
|
|
1364
1364
|
let n = s.current;
|
|
@@ -1408,45 +1408,45 @@ var I = {
|
|
|
1408
1408
|
r,
|
|
1409
1409
|
e
|
|
1410
1410
|
]), /* @__PURE__ */ l("div", {
|
|
1411
|
-
className:
|
|
1411
|
+
className: Le.lorenzAttractor,
|
|
1412
1412
|
style: {
|
|
1413
1413
|
width: e,
|
|
1414
1414
|
height: t
|
|
1415
1415
|
},
|
|
1416
1416
|
children: /* @__PURE__ */ l("canvas", {
|
|
1417
1417
|
ref: s,
|
|
1418
|
-
className:
|
|
1418
|
+
className: Le.canvas,
|
|
1419
1419
|
style: {
|
|
1420
1420
|
width: e,
|
|
1421
1421
|
height: t
|
|
1422
1422
|
}
|
|
1423
1423
|
})
|
|
1424
1424
|
});
|
|
1425
|
-
},
|
|
1425
|
+
}, ze = {
|
|
1426
1426
|
liquidGlass: "cos-liquidGlass-Z3bQg",
|
|
1427
1427
|
panel: "cos-panel-XYboD",
|
|
1428
1428
|
content: "cos-content-MHfkS"
|
|
1429
|
-
},
|
|
1430
|
-
className:
|
|
1429
|
+
}, Be = ({ children: e = "液态玻璃面板", blur: t = 16, borderRadius: n = 20 }) => /* @__PURE__ */ l("div", {
|
|
1430
|
+
className: ze.liquidGlass,
|
|
1431
1431
|
children: /* @__PURE__ */ l("div", {
|
|
1432
|
-
className:
|
|
1432
|
+
className: ze.panel,
|
|
1433
1433
|
style: {
|
|
1434
1434
|
"--glass-blur": `${t}px`,
|
|
1435
1435
|
"--glass-radius": `${n}px`
|
|
1436
1436
|
},
|
|
1437
1437
|
children: /* @__PURE__ */ l("div", {
|
|
1438
|
-
className:
|
|
1438
|
+
className: ze.content,
|
|
1439
1439
|
children: e
|
|
1440
1440
|
})
|
|
1441
1441
|
})
|
|
1442
|
-
}),
|
|
1442
|
+
}), Ve = {
|
|
1443
1443
|
magneticButton: "cos-magneticButton-GbRkE",
|
|
1444
1444
|
btn: "cos-btn--b2BJ"
|
|
1445
|
-
},
|
|
1445
|
+
}, He = ({ children: e = "磁吸按钮", strength: t = .4, color: n = "#6366f1" }) => {
|
|
1446
1446
|
let r = o(null), i = o(null);
|
|
1447
1447
|
return /* @__PURE__ */ l("div", {
|
|
1448
1448
|
ref: r,
|
|
1449
|
-
className:
|
|
1449
|
+
className: Ve.magneticButton,
|
|
1450
1450
|
onMouseMove: (e) => {
|
|
1451
1451
|
let n = r.current, a = i.current;
|
|
1452
1452
|
if (!n || !a) return;
|
|
@@ -1460,19 +1460,19 @@ var I = {
|
|
|
1460
1460
|
children: /* @__PURE__ */ l("button", {
|
|
1461
1461
|
ref: i,
|
|
1462
1462
|
type: "button",
|
|
1463
|
-
className:
|
|
1463
|
+
className: Ve.btn,
|
|
1464
1464
|
style: { "--btn-color": n },
|
|
1465
1465
|
children: e
|
|
1466
1466
|
})
|
|
1467
1467
|
});
|
|
1468
|
-
},
|
|
1468
|
+
}, B = {
|
|
1469
1469
|
matrixRain: "cos-matrixRain-qg9HC",
|
|
1470
1470
|
canvas: "cos-canvas--AvpG",
|
|
1471
1471
|
overlay: "cos-overlay-knj3b",
|
|
1472
1472
|
title: "cos-title-sDfhs",
|
|
1473
1473
|
flicker: "cos-flicker-smHxl",
|
|
1474
1474
|
subtitle: "cos-subtitle-CWheW"
|
|
1475
|
-
},
|
|
1475
|
+
}, Ue = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*アイウエオカキクケコ", We = ({ width: e = 800, height: t = 500, density: r = .6, color: i = "#00ff41", showOverlay: a = !0, title: s = "MATRIX", subtitle: c = "数字雨效果" }) => {
|
|
1476
1476
|
let d = o(null);
|
|
1477
1477
|
return n(() => {
|
|
1478
1478
|
let n = d.current;
|
|
@@ -1486,7 +1486,7 @@ var I = {
|
|
|
1486
1486
|
u = e;
|
|
1487
1487
|
}), p = () => {
|
|
1488
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) => {
|
|
1489
|
-
let a =
|
|
1489
|
+
let a = Ue[Math.floor(Math.random() * 53)], s = n / r * 16;
|
|
1490
1490
|
o.fillStyle = i, o.fillText(a, s, e * 16), e * 16 > t && Math.random() > .975 && (c[n] = 0), c[n] += 1;
|
|
1491
1491
|
}));
|
|
1492
1492
|
};
|
|
@@ -1499,33 +1499,33 @@ var I = {
|
|
|
1499
1499
|
t,
|
|
1500
1500
|
e
|
|
1501
1501
|
]), /* @__PURE__ */ u("div", {
|
|
1502
|
-
className:
|
|
1502
|
+
className: B.matrixRain,
|
|
1503
1503
|
style: {
|
|
1504
1504
|
width: e,
|
|
1505
1505
|
height: t
|
|
1506
1506
|
},
|
|
1507
1507
|
children: [/* @__PURE__ */ l("canvas", {
|
|
1508
1508
|
ref: d,
|
|
1509
|
-
className:
|
|
1509
|
+
className: B.canvas,
|
|
1510
1510
|
style: {
|
|
1511
1511
|
width: e,
|
|
1512
1512
|
height: t
|
|
1513
1513
|
}
|
|
1514
1514
|
}), a && /* @__PURE__ */ u("div", {
|
|
1515
|
-
className:
|
|
1515
|
+
className: B.overlay,
|
|
1516
1516
|
children: [/* @__PURE__ */ l("h2", {
|
|
1517
|
-
className:
|
|
1517
|
+
className: B.title,
|
|
1518
1518
|
children: s
|
|
1519
1519
|
}), /* @__PURE__ */ l("p", {
|
|
1520
|
-
className:
|
|
1520
|
+
className: B.subtitle,
|
|
1521
1521
|
children: c
|
|
1522
1522
|
})]
|
|
1523
1523
|
})]
|
|
1524
1524
|
});
|
|
1525
|
-
},
|
|
1525
|
+
}, Ge = {
|
|
1526
1526
|
metaballPool: "cos-metaballPool-JJaI9",
|
|
1527
1527
|
canvas: "cos-canvas-S7fDD"
|
|
1528
|
-
},
|
|
1528
|
+
}, Ke = ({ width: e = 400, height: t = 300, ballCount: r = 5, color: i = "#38bdf8" }) => {
|
|
1529
1529
|
let a = o(null), s = o([]), c = o({
|
|
1530
1530
|
x: -999,
|
|
1531
1531
|
y: -999,
|
|
@@ -1615,7 +1615,7 @@ var I = {
|
|
|
1615
1615
|
t,
|
|
1616
1616
|
e
|
|
1617
1617
|
]), /* @__PURE__ */ l("div", {
|
|
1618
|
-
className:
|
|
1618
|
+
className: Ge.metaballPool,
|
|
1619
1619
|
style: {
|
|
1620
1620
|
width: e,
|
|
1621
1621
|
height: t,
|
|
@@ -1623,17 +1623,17 @@ var I = {
|
|
|
1623
1623
|
},
|
|
1624
1624
|
children: /* @__PURE__ */ l("canvas", {
|
|
1625
1625
|
ref: a,
|
|
1626
|
-
className:
|
|
1626
|
+
className: Ge.canvas,
|
|
1627
1627
|
style: {
|
|
1628
1628
|
width: e,
|
|
1629
1629
|
height: t
|
|
1630
1630
|
}
|
|
1631
1631
|
})
|
|
1632
1632
|
});
|
|
1633
|
-
},
|
|
1633
|
+
}, qe = {
|
|
1634
1634
|
mazeGenerator: "cos-mazeGenerator-QEa0s",
|
|
1635
1635
|
canvas: "cos-canvas-emhxb"
|
|
1636
|
-
},
|
|
1636
|
+
}, Je = ({ width: e = 400, height: t = 300, cellSize: r = 20, onGenerated: i }) => {
|
|
1637
1637
|
let a = o(null), s = o(i);
|
|
1638
1638
|
return n(() => {
|
|
1639
1639
|
s.current = i;
|
|
@@ -1720,24 +1720,24 @@ var I = {
|
|
|
1720
1720
|
t,
|
|
1721
1721
|
e
|
|
1722
1722
|
]), /* @__PURE__ */ l("div", {
|
|
1723
|
-
className:
|
|
1723
|
+
className: qe.mazeGenerator,
|
|
1724
1724
|
style: {
|
|
1725
1725
|
width: e,
|
|
1726
1726
|
height: t
|
|
1727
1727
|
},
|
|
1728
1728
|
children: /* @__PURE__ */ l("canvas", {
|
|
1729
1729
|
ref: a,
|
|
1730
|
-
className:
|
|
1730
|
+
className: qe.canvas,
|
|
1731
1731
|
style: {
|
|
1732
1732
|
width: e,
|
|
1733
1733
|
height: t
|
|
1734
1734
|
}
|
|
1735
1735
|
})
|
|
1736
1736
|
});
|
|
1737
|
-
},
|
|
1737
|
+
}, Ye = {
|
|
1738
1738
|
meteorRain: "cos-meteorRain-v8RNI",
|
|
1739
1739
|
canvas: "cos-canvas-hyFMr"
|
|
1740
|
-
},
|
|
1740
|
+
}, Xe = ({ width: e = 800, height: t = 500, meteorCount: r = 8 }) => {
|
|
1741
1741
|
let i = o(null), a = o([]), s = o(0);
|
|
1742
1742
|
return n(() => {
|
|
1743
1743
|
a.current = Array.from({ length: r }, () => ({
|
|
@@ -1772,47 +1772,47 @@ var I = {
|
|
|
1772
1772
|
cancelAnimationFrame(s.current), l();
|
|
1773
1773
|
};
|
|
1774
1774
|
}, [t, e]), /* @__PURE__ */ l("div", {
|
|
1775
|
-
className:
|
|
1775
|
+
className: Ye.meteorRain,
|
|
1776
1776
|
style: {
|
|
1777
1777
|
width: e,
|
|
1778
1778
|
height: t
|
|
1779
1779
|
},
|
|
1780
1780
|
children: /* @__PURE__ */ l("canvas", {
|
|
1781
1781
|
ref: i,
|
|
1782
|
-
className:
|
|
1782
|
+
className: Ye.canvas,
|
|
1783
1783
|
style: {
|
|
1784
1784
|
width: e,
|
|
1785
1785
|
height: t
|
|
1786
1786
|
}
|
|
1787
1787
|
})
|
|
1788
1788
|
});
|
|
1789
|
-
},
|
|
1789
|
+
}, V = {
|
|
1790
1790
|
neonText: "cos-neonText-JMP7i",
|
|
1791
1791
|
text: "cos-text-GTO-0",
|
|
1792
1792
|
flicker: "cos-flicker-nXceV",
|
|
1793
1793
|
"neon-flicker": "cos-neon-flicker-uDkmM",
|
|
1794
1794
|
reflection: "cos-reflection-aEYj6"
|
|
1795
|
-
},
|
|
1796
|
-
className:
|
|
1795
|
+
}, Ze = ({ text: e = "NEON", color: t = "#ff00de", fontSize: n = 72, flicker: r = !0 }) => /* @__PURE__ */ u("div", {
|
|
1796
|
+
className: V.neonText,
|
|
1797
1797
|
children: [/* @__PURE__ */ l("h1", {
|
|
1798
|
-
className: `${
|
|
1798
|
+
className: `${V.text} ${r ? V.flicker : ""}`,
|
|
1799
1799
|
style: {
|
|
1800
1800
|
fontSize: n,
|
|
1801
1801
|
"--neon-color": t
|
|
1802
1802
|
},
|
|
1803
1803
|
children: e
|
|
1804
1804
|
}), /* @__PURE__ */ l("p", {
|
|
1805
|
-
className:
|
|
1805
|
+
className: V.reflection,
|
|
1806
1806
|
style: {
|
|
1807
1807
|
fontSize: n * .35,
|
|
1808
1808
|
color: t
|
|
1809
1809
|
},
|
|
1810
1810
|
children: e
|
|
1811
1811
|
})]
|
|
1812
|
-
}),
|
|
1812
|
+
}), Qe = {
|
|
1813
1813
|
newtonCradle: "cos-newtonCradle-mFl-b",
|
|
1814
1814
|
canvas: "cos-canvas-TWKl5"
|
|
1815
|
-
},
|
|
1815
|
+
}, $e = ({ ballCount: e = 5, color: t = "#38bdf8", width: r = 280, height: i = 200 }) => {
|
|
1816
1816
|
let a = o(null), s = Math.max(2, Math.min(e, 7));
|
|
1817
1817
|
return n(() => {
|
|
1818
1818
|
let e = a.current;
|
|
@@ -1875,7 +1875,7 @@ var I = {
|
|
|
1875
1875
|
i,
|
|
1876
1876
|
r
|
|
1877
1877
|
]), /* @__PURE__ */ l("div", {
|
|
1878
|
-
className:
|
|
1878
|
+
className: Qe.newtonCradle,
|
|
1879
1879
|
style: {
|
|
1880
1880
|
width: r,
|
|
1881
1881
|
height: i,
|
|
@@ -1883,19 +1883,19 @@ var I = {
|
|
|
1883
1883
|
},
|
|
1884
1884
|
children: /* @__PURE__ */ l("canvas", {
|
|
1885
1885
|
ref: a,
|
|
1886
|
-
className:
|
|
1886
|
+
className: Qe.canvas,
|
|
1887
1887
|
style: {
|
|
1888
1888
|
width: r,
|
|
1889
1889
|
height: i
|
|
1890
1890
|
}
|
|
1891
1891
|
})
|
|
1892
1892
|
});
|
|
1893
|
-
},
|
|
1893
|
+
}, H = {
|
|
1894
1894
|
orbitalChart: "cos-orbitalChart-XLORB",
|
|
1895
1895
|
canvas: "cos-canvas-hGVud",
|
|
1896
1896
|
legend: "cos-legend-Np9Mm",
|
|
1897
1897
|
swatch: "cos-swatch-xEKvA"
|
|
1898
|
-
},
|
|
1898
|
+
}, et = [
|
|
1899
1899
|
{
|
|
1900
1900
|
label: "A",
|
|
1901
1901
|
value: 30,
|
|
@@ -1916,7 +1916,7 @@ var I = {
|
|
|
1916
1916
|
value: 25,
|
|
1917
1917
|
color: "#4ade80"
|
|
1918
1918
|
}
|
|
1919
|
-
],
|
|
1919
|
+
], tt = ({ data: e = et, size: t = 240 }) => {
|
|
1920
1920
|
let r = o(null);
|
|
1921
1921
|
return n(() => {
|
|
1922
1922
|
let n = r.current;
|
|
@@ -1945,23 +1945,23 @@ var I = {
|
|
|
1945
1945
|
cancelAnimationFrame(u), p();
|
|
1946
1946
|
};
|
|
1947
1947
|
}, [e, t]), /* @__PURE__ */ u("div", {
|
|
1948
|
-
className:
|
|
1948
|
+
className: H.orbitalChart,
|
|
1949
1949
|
style: {
|
|
1950
1950
|
width: t,
|
|
1951
1951
|
height: t
|
|
1952
1952
|
},
|
|
1953
1953
|
children: [/* @__PURE__ */ l("canvas", {
|
|
1954
1954
|
ref: r,
|
|
1955
|
-
className:
|
|
1955
|
+
className: H.canvas,
|
|
1956
1956
|
style: {
|
|
1957
1957
|
width: t,
|
|
1958
1958
|
height: t
|
|
1959
1959
|
}
|
|
1960
1960
|
}), /* @__PURE__ */ l("ul", {
|
|
1961
|
-
className:
|
|
1961
|
+
className: H.legend,
|
|
1962
1962
|
children: e.map((e) => /* @__PURE__ */ u("li", { children: [
|
|
1963
1963
|
/* @__PURE__ */ l("span", {
|
|
1964
|
-
className:
|
|
1964
|
+
className: H.swatch,
|
|
1965
1965
|
style: { background: e.color }
|
|
1966
1966
|
}),
|
|
1967
1967
|
e.label,
|
|
@@ -1971,11 +1971,11 @@ var I = {
|
|
|
1971
1971
|
] }, e.label))
|
|
1972
1972
|
})]
|
|
1973
1973
|
});
|
|
1974
|
-
},
|
|
1974
|
+
}, nt = {
|
|
1975
1975
|
particleNetwork: "cos-particleNetwork-GSZq-",
|
|
1976
1976
|
canvas: "cos-canvas-E-BGP",
|
|
1977
1977
|
hint: "cos-hint-LEO5o"
|
|
1978
|
-
},
|
|
1978
|
+
}, rt = ({ width: e = 800, height: r = 500, particleCount: i = 60, linkDistance: a = 120, repelRadius: s = 150, color: c = "#38bdf8" }) => {
|
|
1979
1979
|
let d = o(null), f = o([]), p = o({
|
|
1980
1980
|
x: -1e3,
|
|
1981
1981
|
y: -1e3
|
|
@@ -2058,14 +2058,14 @@ var I = {
|
|
|
2058
2058
|
};
|
|
2059
2059
|
};
|
|
2060
2060
|
return /* @__PURE__ */ u("div", {
|
|
2061
|
-
className:
|
|
2061
|
+
className: nt.particleNetwork,
|
|
2062
2062
|
style: {
|
|
2063
2063
|
width: e,
|
|
2064
2064
|
height: r
|
|
2065
2065
|
},
|
|
2066
2066
|
children: [/* @__PURE__ */ l("canvas", {
|
|
2067
2067
|
ref: d,
|
|
2068
|
-
className:
|
|
2068
|
+
className: nt.canvas,
|
|
2069
2069
|
style: {
|
|
2070
2070
|
width: e,
|
|
2071
2071
|
height: r
|
|
@@ -2075,14 +2075,14 @@ var I = {
|
|
|
2075
2075
|
onTouchMove: _,
|
|
2076
2076
|
onTouchEnd: y
|
|
2077
2077
|
}), /* @__PURE__ */ l("p", {
|
|
2078
|
-
className:
|
|
2078
|
+
className: nt.hint,
|
|
2079
2079
|
children: "移动鼠标或手指与粒子互动"
|
|
2080
2080
|
})]
|
|
2081
2081
|
});
|
|
2082
|
-
},
|
|
2082
|
+
}, it = {
|
|
2083
2083
|
plasmaBall: "cos-plasmaBall-xGHSj",
|
|
2084
2084
|
canvas: "cos-canvas-V1CgL"
|
|
2085
|
-
},
|
|
2085
|
+
}, at = ({ width: e = 320, height: t = 320, color: r = "#a78bfa", arcCount: i = 8 }) => {
|
|
2086
2086
|
let a = o(null), s = o({
|
|
2087
2087
|
x: e / 2,
|
|
2088
2088
|
y: t / 2,
|
|
@@ -2143,24 +2143,24 @@ var I = {
|
|
|
2143
2143
|
t,
|
|
2144
2144
|
e
|
|
2145
2145
|
]), /* @__PURE__ */ l("div", {
|
|
2146
|
-
className:
|
|
2146
|
+
className: it.plasmaBall,
|
|
2147
2147
|
style: {
|
|
2148
2148
|
width: e,
|
|
2149
2149
|
height: t
|
|
2150
2150
|
},
|
|
2151
2151
|
children: /* @__PURE__ */ l("canvas", {
|
|
2152
2152
|
ref: a,
|
|
2153
|
-
className:
|
|
2153
|
+
className: it.canvas,
|
|
2154
2154
|
style: {
|
|
2155
2155
|
width: e,
|
|
2156
2156
|
height: t
|
|
2157
2157
|
}
|
|
2158
2158
|
})
|
|
2159
2159
|
});
|
|
2160
|
-
},
|
|
2160
|
+
}, ot = {
|
|
2161
2161
|
smokeFog: "cos-smokeFog-SYlts",
|
|
2162
2162
|
canvas: "cos-canvas-iOJV7"
|
|
2163
|
-
},
|
|
2163
|
+
}, st = ({ width: e = 800, height: t = 500, density: r = .5 }) => {
|
|
2164
2164
|
let i = o(null), a = o([]), s = o(0);
|
|
2165
2165
|
return n(() => {
|
|
2166
2166
|
let n = Math.floor(20 + r * 40);
|
|
@@ -2200,24 +2200,24 @@ var I = {
|
|
|
2200
2200
|
cancelAnimationFrame(s.current), u();
|
|
2201
2201
|
};
|
|
2202
2202
|
}, [t, e]), /* @__PURE__ */ l("div", {
|
|
2203
|
-
className:
|
|
2203
|
+
className: ot.smokeFog,
|
|
2204
2204
|
style: {
|
|
2205
2205
|
width: e,
|
|
2206
2206
|
height: t
|
|
2207
2207
|
},
|
|
2208
2208
|
children: /* @__PURE__ */ l("canvas", {
|
|
2209
2209
|
ref: i,
|
|
2210
|
-
className:
|
|
2210
|
+
className: ot.canvas,
|
|
2211
2211
|
style: {
|
|
2212
2212
|
width: e,
|
|
2213
2213
|
height: t
|
|
2214
2214
|
}
|
|
2215
2215
|
})
|
|
2216
2216
|
});
|
|
2217
|
-
},
|
|
2217
|
+
}, ct = {
|
|
2218
2218
|
solarSystem: "cos-solarSystem-27h8F",
|
|
2219
2219
|
canvas: "cos-canvas-C0nRa"
|
|
2220
|
-
},
|
|
2220
|
+
}, lt = [
|
|
2221
2221
|
{
|
|
2222
2222
|
name: "Mercury",
|
|
2223
2223
|
radius: 0,
|
|
@@ -2275,10 +2275,10 @@ var I = {
|
|
|
2275
2275
|
size: 2,
|
|
2276
2276
|
parent: 2
|
|
2277
2277
|
}
|
|
2278
|
-
],
|
|
2278
|
+
], ut = ({ width: e = 400, height: t = 400, speed: r = 1, showOrbits: i = !0 }) => {
|
|
2279
2279
|
let a = o(null), s = o([]), c = o([]);
|
|
2280
2280
|
return n(() => {
|
|
2281
|
-
s.current =
|
|
2281
|
+
s.current = lt.map((e) => ({
|
|
2282
2282
|
...e,
|
|
2283
2283
|
angle: Math.random() * Math.PI * 2
|
|
2284
2284
|
})), c.current = Array.from({ length: 80 }, () => ({
|
|
@@ -2327,24 +2327,24 @@ var I = {
|
|
|
2327
2327
|
r,
|
|
2328
2328
|
e
|
|
2329
2329
|
]), /* @__PURE__ */ l("div", {
|
|
2330
|
-
className:
|
|
2330
|
+
className: ct.solarSystem,
|
|
2331
2331
|
style: {
|
|
2332
2332
|
width: e,
|
|
2333
2333
|
height: t
|
|
2334
2334
|
},
|
|
2335
2335
|
children: /* @__PURE__ */ l("canvas", {
|
|
2336
2336
|
ref: a,
|
|
2337
|
-
className:
|
|
2337
|
+
className: ct.canvas,
|
|
2338
2338
|
style: {
|
|
2339
2339
|
width: e,
|
|
2340
2340
|
height: t
|
|
2341
2341
|
}
|
|
2342
2342
|
})
|
|
2343
2343
|
});
|
|
2344
|
-
},
|
|
2344
|
+
}, dt = {
|
|
2345
2345
|
snowfall: "cos-snowfall-Q-Dhg",
|
|
2346
2346
|
canvas: "cos-canvas-bJVF8"
|
|
2347
|
-
},
|
|
2347
|
+
}, ft = ({ width: e = 800, height: r = 500, mode: i = "snow", count: a = 120 }) => {
|
|
2348
2348
|
let s = o(null), c = o([]), u = o(0), d = t((t) => ({
|
|
2349
2349
|
x: Math.random() * e,
|
|
2350
2350
|
y: t ?? Math.random() * r,
|
|
@@ -2391,24 +2391,24 @@ var I = {
|
|
|
2391
2391
|
i,
|
|
2392
2392
|
e
|
|
2393
2393
|
]), /* @__PURE__ */ l("div", {
|
|
2394
|
-
className:
|
|
2394
|
+
className: dt.snowfall,
|
|
2395
2395
|
style: {
|
|
2396
2396
|
width: e,
|
|
2397
2397
|
height: r
|
|
2398
2398
|
},
|
|
2399
2399
|
children: /* @__PURE__ */ l("canvas", {
|
|
2400
2400
|
ref: s,
|
|
2401
|
-
className:
|
|
2401
|
+
className: dt.canvas,
|
|
2402
2402
|
style: {
|
|
2403
2403
|
width: e,
|
|
2404
2404
|
height: r
|
|
2405
2405
|
}
|
|
2406
2406
|
})
|
|
2407
2407
|
});
|
|
2408
|
-
},
|
|
2408
|
+
}, pt = {
|
|
2409
2409
|
starfield: "cos-starfield-QTwia",
|
|
2410
2410
|
canvas: "cos-canvas-C2t3g"
|
|
2411
|
-
},
|
|
2411
|
+
}, mt = ({ width: e = 800, height: t = 500, starCount: r = 400, speed: i = 1 }) => {
|
|
2412
2412
|
let a = o(null), s = o([]), c = o(0);
|
|
2413
2413
|
return n(() => {
|
|
2414
2414
|
s.current = Array.from({ length: r }, () => ({
|
|
@@ -2451,21 +2451,21 @@ var I = {
|
|
|
2451
2451
|
r,
|
|
2452
2452
|
e
|
|
2453
2453
|
]), /* @__PURE__ */ l("div", {
|
|
2454
|
-
className:
|
|
2454
|
+
className: pt.starfield,
|
|
2455
2455
|
style: {
|
|
2456
2456
|
width: e,
|
|
2457
2457
|
height: t
|
|
2458
2458
|
},
|
|
2459
2459
|
children: /* @__PURE__ */ l("canvas", {
|
|
2460
2460
|
ref: a,
|
|
2461
|
-
className:
|
|
2461
|
+
className: pt.canvas,
|
|
2462
2462
|
style: {
|
|
2463
2463
|
width: e,
|
|
2464
2464
|
height: t
|
|
2465
2465
|
}
|
|
2466
2466
|
})
|
|
2467
2467
|
});
|
|
2468
|
-
},
|
|
2468
|
+
}, U = {
|
|
2469
2469
|
progressChest: "cos-progressChest-Bqcv1",
|
|
2470
2470
|
barWrap: "cos-barWrap-E2pnl",
|
|
2471
2471
|
barTrack: "cos-barTrack-dKLhs",
|
|
@@ -2480,37 +2480,37 @@ var I = {
|
|
|
2480
2480
|
treasure: "cos-treasure-nx-6S",
|
|
2481
2481
|
pop: "cos-pop-uRZvT",
|
|
2482
2482
|
label: "cos-label-61hRe"
|
|
2483
|
-
},
|
|
2483
|
+
}, ht = ({ progress: e = 0, onOpen: t, label: r = "开启宝箱" }) => {
|
|
2484
2484
|
let i = o(!1), a = o(t), s = y(e, 0, 100), c = s >= 100;
|
|
2485
2485
|
return n(() => {
|
|
2486
2486
|
a.current = t;
|
|
2487
2487
|
}, [t]), n(() => {
|
|
2488
2488
|
c && !i.current && (i.current = !0, a.current?.()), c || (i.current = !1);
|
|
2489
2489
|
}, [c]), /* @__PURE__ */ u("div", {
|
|
2490
|
-
className:
|
|
2490
|
+
className: U.progressChest,
|
|
2491
2491
|
children: [
|
|
2492
2492
|
/* @__PURE__ */ u("div", {
|
|
2493
|
-
className:
|
|
2493
|
+
className: U.barWrap,
|
|
2494
2494
|
children: [/* @__PURE__ */ l("div", {
|
|
2495
|
-
className:
|
|
2495
|
+
className: U.barTrack,
|
|
2496
2496
|
children: /* @__PURE__ */ l("div", {
|
|
2497
|
-
className:
|
|
2497
|
+
className: U.barFill,
|
|
2498
2498
|
style: { width: `${s}%` }
|
|
2499
2499
|
})
|
|
2500
2500
|
}), /* @__PURE__ */ u("span", {
|
|
2501
|
-
className:
|
|
2501
|
+
className: U.pct,
|
|
2502
2502
|
children: [s.toFixed(0), "%"]
|
|
2503
2503
|
})]
|
|
2504
2504
|
}),
|
|
2505
2505
|
/* @__PURE__ */ u("div", {
|
|
2506
|
-
className: `${
|
|
2506
|
+
className: `${U.chest} ${c ? U.open : ""}`,
|
|
2507
2507
|
children: [/* @__PURE__ */ u("div", {
|
|
2508
|
-
className:
|
|
2509
|
-
children: [/* @__PURE__ */ l("div", { className:
|
|
2508
|
+
className: U.lid,
|
|
2509
|
+
children: [/* @__PURE__ */ l("div", { className: U.lidTop }), /* @__PURE__ */ l("div", { className: U.lock })]
|
|
2510
2510
|
}), /* @__PURE__ */ l("div", {
|
|
2511
|
-
className:
|
|
2511
|
+
className: U.body,
|
|
2512
2512
|
children: c && /* @__PURE__ */ u("div", {
|
|
2513
|
-
className:
|
|
2513
|
+
className: U.treasure,
|
|
2514
2514
|
children: [
|
|
2515
2515
|
/* @__PURE__ */ l("span", { children: "💎" }),
|
|
2516
2516
|
/* @__PURE__ */ l("span", { children: "✨" }),
|
|
@@ -2520,15 +2520,15 @@ var I = {
|
|
|
2520
2520
|
})]
|
|
2521
2521
|
}),
|
|
2522
2522
|
/* @__PURE__ */ l("p", {
|
|
2523
|
-
className:
|
|
2523
|
+
className: U.label,
|
|
2524
2524
|
children: c ? "宝箱已开启!" : r
|
|
2525
2525
|
})
|
|
2526
2526
|
]
|
|
2527
2527
|
});
|
|
2528
|
-
},
|
|
2528
|
+
}, gt = {
|
|
2529
2529
|
radarScan: "cos-radarScan-PZaG8",
|
|
2530
2530
|
canvas: "cos-canvas-fUw5N"
|
|
2531
|
-
},
|
|
2531
|
+
}, _t = ({ size: e = 300, color: t = "#22d3ee", blipCount: r = 5 }) => {
|
|
2532
2532
|
let i = o(null), a = o(0), s = o([]), c = o(0);
|
|
2533
2533
|
return n(() => {
|
|
2534
2534
|
s.current = Array.from({ length: r }, () => ({
|
|
@@ -2565,27 +2565,27 @@ var I = {
|
|
|
2565
2565
|
t,
|
|
2566
2566
|
e
|
|
2567
2567
|
]), /* @__PURE__ */ l("div", {
|
|
2568
|
-
className:
|
|
2568
|
+
className: gt.radarScan,
|
|
2569
2569
|
style: {
|
|
2570
2570
|
width: e,
|
|
2571
2571
|
height: e
|
|
2572
2572
|
},
|
|
2573
2573
|
children: /* @__PURE__ */ l("canvas", {
|
|
2574
2574
|
ref: i,
|
|
2575
|
-
className:
|
|
2575
|
+
className: gt.canvas,
|
|
2576
2576
|
style: {
|
|
2577
2577
|
width: e,
|
|
2578
2578
|
height: e
|
|
2579
2579
|
}
|
|
2580
2580
|
})
|
|
2581
2581
|
});
|
|
2582
|
-
},
|
|
2582
|
+
}, W = {
|
|
2583
2583
|
redPacketRain: "cos-redPacketRain-eJ7FW",
|
|
2584
2584
|
canvas: "cos-canvas-direH",
|
|
2585
2585
|
hud: "cos-hud-InqMq",
|
|
2586
2586
|
end: "cos-end-u0J7o",
|
|
2587
2587
|
hint: "cos-hint-sO6ld"
|
|
2588
|
-
},
|
|
2588
|
+
}, vt = ({ duration: e = 1e4, onGrab: r }) => {
|
|
2589
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);
|
|
2590
2590
|
n(() => {
|
|
2591
2591
|
y.current = r;
|
|
@@ -2631,11 +2631,11 @@ var I = {
|
|
|
2631
2631
|
cancelAnimationFrame(c.current), clearTimeout(l), s();
|
|
2632
2632
|
};
|
|
2633
2633
|
}, [e, b]), /* @__PURE__ */ u("div", {
|
|
2634
|
-
className:
|
|
2634
|
+
className: W.redPacketRain,
|
|
2635
2635
|
children: [
|
|
2636
2636
|
/* @__PURE__ */ l("canvas", {
|
|
2637
2637
|
ref: i,
|
|
2638
|
-
className:
|
|
2638
|
+
className: W.canvas,
|
|
2639
2639
|
style: {
|
|
2640
2640
|
width: 400,
|
|
2641
2641
|
height: 500
|
|
@@ -2649,25 +2649,25 @@ var I = {
|
|
|
2649
2649
|
}
|
|
2650
2650
|
}),
|
|
2651
2651
|
/* @__PURE__ */ u("div", {
|
|
2652
|
-
className:
|
|
2652
|
+
className: W.hud,
|
|
2653
2653
|
children: [/* @__PURE__ */ u("span", { children: ["已抢: ¥", p] }), !h && /* @__PURE__ */ l("span", {
|
|
2654
|
-
className:
|
|
2654
|
+
className: W.end,
|
|
2655
2655
|
children: "红包雨结束"
|
|
2656
2656
|
})]
|
|
2657
2657
|
}),
|
|
2658
2658
|
/* @__PURE__ */ l("p", {
|
|
2659
|
-
className:
|
|
2659
|
+
className: W.hint,
|
|
2660
2660
|
children: "点击红包抢夺"
|
|
2661
2661
|
})
|
|
2662
2662
|
]
|
|
2663
2663
|
});
|
|
2664
|
-
},
|
|
2664
|
+
}, G = {
|
|
2665
2665
|
returnCityContainer: "cos-returnCityContainer-6XTxj",
|
|
2666
2666
|
star: "cos-star-a59Dx",
|
|
2667
2667
|
glassWrap: "cos-glassWrap-golMO",
|
|
2668
2668
|
rotate: "cos-rotate-7X9Jj",
|
|
2669
2669
|
glassItem: "cos-glassItem-OwlFI"
|
|
2670
|
-
},
|
|
2670
|
+
}, yt = ({ starCount: e, glassCount: t = 8, glassRadius: r = 150 }) => {
|
|
2671
2671
|
let i = o(null), a = o(null);
|
|
2672
2672
|
return n(() => {
|
|
2673
2673
|
let n = i.current, o = a.current;
|
|
@@ -2676,13 +2676,13 @@ var I = {
|
|
|
2676
2676
|
for (let e = 0; e < f; e++) {
|
|
2677
2677
|
let e = window.setTimeout(() => {
|
|
2678
2678
|
let e = document.createElement("div");
|
|
2679
|
-
e.className =
|
|
2679
|
+
e.className = G.star, e.style.top = `${Math.random() * d}px`, e.style.left = `${Math.random() * u}px`, n.append(e), c.push(e);
|
|
2680
2680
|
}, Math.random() * 2e3);
|
|
2681
2681
|
s.push(e);
|
|
2682
2682
|
}
|
|
2683
2683
|
for (let e = 0; e < t; e++) {
|
|
2684
2684
|
let n = document.createElement("div");
|
|
2685
|
-
n.className =
|
|
2685
|
+
n.className = G.glassItem, n.style.transform = `rotateY(${360 / t * e}deg) translateZ(${r}px)`, o.appendChild(n), l.push(n);
|
|
2686
2686
|
let i = window.setTimeout(() => {
|
|
2687
2687
|
n.style.top = "0px", n.style.opacity = "1";
|
|
2688
2688
|
}, e * 300);
|
|
@@ -2697,16 +2697,16 @@ var I = {
|
|
|
2697
2697
|
r
|
|
2698
2698
|
]), /* @__PURE__ */ l("div", {
|
|
2699
2699
|
ref: i,
|
|
2700
|
-
className:
|
|
2700
|
+
className: G.returnCityContainer,
|
|
2701
2701
|
children: /* @__PURE__ */ l("div", {
|
|
2702
2702
|
ref: a,
|
|
2703
|
-
className:
|
|
2703
|
+
className: G.glassWrap
|
|
2704
2704
|
})
|
|
2705
2705
|
});
|
|
2706
|
-
},
|
|
2706
|
+
}, bt = {
|
|
2707
2707
|
ropeChain: "cos-ropeChain-gYaSK",
|
|
2708
2708
|
canvas: "cos-canvas-5i95N"
|
|
2709
|
-
},
|
|
2709
|
+
}, xt = ({ width: e = 400, height: t = 400, segments: r = 16, color: i = "#38bdf8", gravity: a = .4 }) => {
|
|
2710
2710
|
let s = o(null), c = o([]), u = o({
|
|
2711
2711
|
active: !1,
|
|
2712
2712
|
index: -1
|
|
@@ -2791,21 +2791,21 @@ var I = {
|
|
|
2791
2791
|
r,
|
|
2792
2792
|
e
|
|
2793
2793
|
]), /* @__PURE__ */ l("div", {
|
|
2794
|
-
className:
|
|
2794
|
+
className: bt.ropeChain,
|
|
2795
2795
|
style: {
|
|
2796
2796
|
width: e,
|
|
2797
2797
|
height: t
|
|
2798
2798
|
},
|
|
2799
2799
|
children: /* @__PURE__ */ l("canvas", {
|
|
2800
2800
|
ref: s,
|
|
2801
|
-
className:
|
|
2801
|
+
className: bt.canvas,
|
|
2802
2802
|
style: {
|
|
2803
2803
|
width: e,
|
|
2804
2804
|
height: t
|
|
2805
2805
|
}
|
|
2806
2806
|
})
|
|
2807
2807
|
});
|
|
2808
|
-
},
|
|
2808
|
+
}, K = {
|
|
2809
2809
|
speedometer: "cos-speedometer-INc7F",
|
|
2810
2810
|
svg: "cos-svg-HG-lE",
|
|
2811
2811
|
track: "cos-track-5-922",
|
|
@@ -2815,37 +2815,37 @@ var I = {
|
|
|
2815
2815
|
hub: "cos-hub-4WaHw",
|
|
2816
2816
|
valueText: "cos-valueText--q4Xi",
|
|
2817
2817
|
label: "cos-label-hOPy1"
|
|
2818
|
-
},
|
|
2818
|
+
}, q = (e, t, n, r) => {
|
|
2819
2819
|
let i = (r - 90) * Math.PI / 180;
|
|
2820
2820
|
return {
|
|
2821
2821
|
x: e + n * Math.cos(i),
|
|
2822
2822
|
y: t + n * Math.sin(i)
|
|
2823
2823
|
};
|
|
2824
|
-
},
|
|
2824
|
+
}, St = ({ value: e = 0, max: t = 100, label: n = "SPEED", color: r = "#f97316" }) => {
|
|
2825
2825
|
let i = -120 + y(t > 0 ? e / t : 0, 0, 1) * 240, o = a(() => {
|
|
2826
|
-
let e =
|
|
2826
|
+
let e = q(100, 100, 72, -120), t = q(100, 100, 72, 120);
|
|
2827
2827
|
return `M ${e.x} ${e.y} A 72 72 0 1 1 ${t.x} ${t.y}`;
|
|
2828
2828
|
}, []), s = a(() => {
|
|
2829
|
-
let e =
|
|
2829
|
+
let e = q(100, 100, 72, -120), t = q(100, 100, 72, i), n = +(i - -120 > 180);
|
|
2830
2830
|
return `M ${e.x} ${e.y} A 72 72 0 ${n} 1 ${t.x} ${t.y}`;
|
|
2831
|
-
}, [i]), c =
|
|
2831
|
+
}, [i]), c = q(100, 100, 58, i);
|
|
2832
2832
|
return /* @__PURE__ */ u("div", {
|
|
2833
|
-
className:
|
|
2833
|
+
className: K.speedometer,
|
|
2834
2834
|
style: { "--gauge-color": r },
|
|
2835
2835
|
children: [/* @__PURE__ */ u("svg", {
|
|
2836
2836
|
viewBox: "0 0 200 130",
|
|
2837
|
-
className:
|
|
2837
|
+
className: K.svg,
|
|
2838
2838
|
children: [
|
|
2839
2839
|
/* @__PURE__ */ l("path", {
|
|
2840
2840
|
d: o,
|
|
2841
|
-
className:
|
|
2841
|
+
className: K.track,
|
|
2842
2842
|
fill: "none",
|
|
2843
2843
|
strokeWidth: "12",
|
|
2844
2844
|
strokeLinecap: "round"
|
|
2845
2845
|
}),
|
|
2846
2846
|
/* @__PURE__ */ l("path", {
|
|
2847
2847
|
d: s,
|
|
2848
|
-
className:
|
|
2848
|
+
className: K.valueArc,
|
|
2849
2849
|
fill: "none",
|
|
2850
2850
|
strokeWidth: "12",
|
|
2851
2851
|
strokeLinecap: "round"
|
|
@@ -2857,13 +2857,13 @@ var I = {
|
|
|
2857
2857
|
60,
|
|
2858
2858
|
120
|
|
2859
2859
|
].map((e) => {
|
|
2860
|
-
let t =
|
|
2860
|
+
let t = q(100, 100, 58, e), n = q(100, 100, 66, e);
|
|
2861
2861
|
return /* @__PURE__ */ l("line", {
|
|
2862
2862
|
x1: t.x,
|
|
2863
2863
|
y1: t.y,
|
|
2864
2864
|
x2: n.x,
|
|
2865
2865
|
y2: n.y,
|
|
2866
|
-
className:
|
|
2866
|
+
className: K.tick
|
|
2867
2867
|
}, e);
|
|
2868
2868
|
}),
|
|
2869
2869
|
/* @__PURE__ */ l("line", {
|
|
@@ -2871,27 +2871,27 @@ var I = {
|
|
|
2871
2871
|
y1: "100",
|
|
2872
2872
|
x2: c.x,
|
|
2873
2873
|
y2: c.y,
|
|
2874
|
-
className:
|
|
2874
|
+
className: K.needle
|
|
2875
2875
|
}),
|
|
2876
2876
|
/* @__PURE__ */ l("circle", {
|
|
2877
2877
|
cx: "100",
|
|
2878
2878
|
cy: "100",
|
|
2879
2879
|
r: "6",
|
|
2880
|
-
className:
|
|
2880
|
+
className: K.hub
|
|
2881
2881
|
}),
|
|
2882
2882
|
/* @__PURE__ */ l("text", {
|
|
2883
2883
|
x: "100",
|
|
2884
2884
|
y: "118",
|
|
2885
|
-
className:
|
|
2885
|
+
className: K.valueText,
|
|
2886
2886
|
children: Math.round(e)
|
|
2887
2887
|
})
|
|
2888
2888
|
]
|
|
2889
2889
|
}), /* @__PURE__ */ l("span", {
|
|
2890
|
-
className:
|
|
2890
|
+
className: K.label,
|
|
2891
2891
|
children: n
|
|
2892
2892
|
})]
|
|
2893
2893
|
});
|
|
2894
|
-
},
|
|
2894
|
+
}, J = {
|
|
2895
2895
|
timelinePulse: "cos-timelinePulse-kcBM6",
|
|
2896
2896
|
axis: "cos-axis-9DWis",
|
|
2897
2897
|
track: "cos-track-jG-HV",
|
|
@@ -2901,7 +2901,7 @@ var I = {
|
|
|
2901
2901
|
dot: "cos-dot-HJEVy",
|
|
2902
2902
|
pulse: "cos-pulse-N6FD1",
|
|
2903
2903
|
name: "cos-name-7zefJ"
|
|
2904
|
-
},
|
|
2904
|
+
}, Ct = ({ steps: e = [
|
|
2905
2905
|
"Start",
|
|
2906
2906
|
"Process",
|
|
2907
2907
|
"Review",
|
|
@@ -2909,26 +2909,26 @@ var I = {
|
|
|
2909
2909
|
], current: t = 0, color: n = "#22d3ee" }) => {
|
|
2910
2910
|
let r = y(t, 0, Math.max(0, e.length - 1)), i = e.length > 1 ? r / (e.length - 1) : 0;
|
|
2911
2911
|
return /* @__PURE__ */ l("div", {
|
|
2912
|
-
className:
|
|
2912
|
+
className: J.timelinePulse,
|
|
2913
2913
|
style: {
|
|
2914
2914
|
"--pulse-color": n,
|
|
2915
2915
|
"--step-count": e.length,
|
|
2916
2916
|
"--progress-ratio": i
|
|
2917
2917
|
},
|
|
2918
2918
|
children: /* @__PURE__ */ u("div", {
|
|
2919
|
-
className:
|
|
2919
|
+
className: J.axis,
|
|
2920
2920
|
children: [
|
|
2921
|
-
/* @__PURE__ */ l("div", { className:
|
|
2922
|
-
/* @__PURE__ */ l("div", { className:
|
|
2921
|
+
/* @__PURE__ */ l("div", { className: J.track }),
|
|
2922
|
+
/* @__PURE__ */ l("div", { className: J.progress }),
|
|
2923
2923
|
/* @__PURE__ */ l("ul", {
|
|
2924
|
-
className:
|
|
2924
|
+
className: J.steps,
|
|
2925
2925
|
children: e.map((e, t) => {
|
|
2926
2926
|
let n = t < r ? "done" : t === r ? "current" : "pending";
|
|
2927
2927
|
return /* @__PURE__ */ u("li", {
|
|
2928
|
-
className:
|
|
2928
|
+
className: J.step,
|
|
2929
2929
|
"data-state": n,
|
|
2930
|
-
children: [/* @__PURE__ */ l("span", { className:
|
|
2931
|
-
className:
|
|
2930
|
+
children: [/* @__PURE__ */ l("span", { className: J.dot }), /* @__PURE__ */ l("span", {
|
|
2931
|
+
className: J.name,
|
|
2932
2932
|
children: e
|
|
2933
2933
|
})]
|
|
2934
2934
|
}, e + t);
|
|
@@ -2937,11 +2937,11 @@ var I = {
|
|
|
2937
2937
|
]
|
|
2938
2938
|
})
|
|
2939
2939
|
});
|
|
2940
|
-
},
|
|
2940
|
+
}, wt = {
|
|
2941
2941
|
rippleWater: "cos-rippleWater-wsinI",
|
|
2942
2942
|
canvas: "cos-canvas-XOdSF",
|
|
2943
2943
|
hint: "cos-hint-0JH5D"
|
|
2944
|
-
},
|
|
2944
|
+
}, Tt = ({ width: e = 800, height: r = 500, color: i = "#38bdf8" }) => {
|
|
2945
2945
|
let a = o(null), s = o([]), c = o(0), d = t((t, n) => {
|
|
2946
2946
|
let i = a.current;
|
|
2947
2947
|
if (!i) return;
|
|
@@ -2988,32 +2988,32 @@ var I = {
|
|
|
2988
2988
|
r,
|
|
2989
2989
|
e
|
|
2990
2990
|
]), /* @__PURE__ */ u("div", {
|
|
2991
|
-
className:
|
|
2991
|
+
className: wt.rippleWater,
|
|
2992
2992
|
style: {
|
|
2993
2993
|
width: e,
|
|
2994
2994
|
height: r
|
|
2995
2995
|
},
|
|
2996
2996
|
children: [/* @__PURE__ */ l("canvas", {
|
|
2997
2997
|
ref: a,
|
|
2998
|
-
className:
|
|
2998
|
+
className: wt.canvas,
|
|
2999
2999
|
style: {
|
|
3000
3000
|
width: e,
|
|
3001
3001
|
height: r
|
|
3002
3002
|
}
|
|
3003
3003
|
}), /* @__PURE__ */ l("span", {
|
|
3004
|
-
className:
|
|
3004
|
+
className: wt.hint,
|
|
3005
3005
|
children: "点击水面产生涟漪"
|
|
3006
3006
|
})]
|
|
3007
3007
|
});
|
|
3008
|
-
},
|
|
3008
|
+
}, Et = {
|
|
3009
3009
|
scrambleText: "cos-scrambleText-hN4Wm",
|
|
3010
3010
|
text: "cos-text-frsHs",
|
|
3011
3011
|
cursor: "cos-cursor-3zQOy",
|
|
3012
3012
|
blink: "cos-blink-OcKXu"
|
|
3013
|
-
},
|
|
3013
|
+
}, Dt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%&*", Ot = ({ text: e = "DECRYPTED", duration: t = 2e3, charset: r = Dt }) => {
|
|
3014
3014
|
let [i, a] = s(""), c = o(0), d = o(0);
|
|
3015
3015
|
return n(() => {
|
|
3016
|
-
let n = r.length > 0 ? r :
|
|
3016
|
+
let n = r.length > 0 ? r : Dt, i = e;
|
|
3017
3017
|
d.current = performance.now();
|
|
3018
3018
|
let o = (e) => {
|
|
3019
3019
|
let r = e - d.current, s = Math.min(r / t, 1), l = Math.floor(s * i.length);
|
|
@@ -3025,18 +3025,18 @@ var I = {
|
|
|
3025
3025
|
t,
|
|
3026
3026
|
r
|
|
3027
3027
|
]), /* @__PURE__ */ l("div", {
|
|
3028
|
-
className:
|
|
3028
|
+
className: Et.scrambleText,
|
|
3029
3029
|
children: /* @__PURE__ */ u("p", {
|
|
3030
|
-
className:
|
|
3031
|
-
children: [i, /* @__PURE__ */ l("span", { className:
|
|
3030
|
+
className: Et.text,
|
|
3031
|
+
children: [i, /* @__PURE__ */ l("span", { className: Et.cursor })]
|
|
3032
3032
|
})
|
|
3033
3033
|
});
|
|
3034
|
-
},
|
|
3034
|
+
}, Y = {
|
|
3035
3035
|
scratchCard: "cos-scratchCard-McIEK",
|
|
3036
3036
|
prize: "cos-prize-X0z5V",
|
|
3037
3037
|
canvas: "cos-canvas-JqIlr",
|
|
3038
3038
|
hidden: "cos-hidden-Lsfbt"
|
|
3039
|
-
},
|
|
3039
|
+
}, kt = ({ coverColor: e = "#94a3b8", prize: r = "🎉 恭喜中奖!", onReveal: i, width: a = 300, height: c = 180 }) => {
|
|
3040
3040
|
let d = o(null), f = o(!1), p = o(!1), m = o(i), [h, g] = s(!1);
|
|
3041
3041
|
n(() => {
|
|
3042
3042
|
m.current = i;
|
|
@@ -3099,17 +3099,17 @@ var I = {
|
|
|
3099
3099
|
f.current = !1;
|
|
3100
3100
|
};
|
|
3101
3101
|
return /* @__PURE__ */ u("div", {
|
|
3102
|
-
className:
|
|
3102
|
+
className: Y.scratchCard,
|
|
3103
3103
|
style: {
|
|
3104
3104
|
width: a,
|
|
3105
3105
|
height: c
|
|
3106
3106
|
},
|
|
3107
3107
|
children: [/* @__PURE__ */ l("div", {
|
|
3108
|
-
className:
|
|
3108
|
+
className: Y.prize,
|
|
3109
3109
|
children: r
|
|
3110
3110
|
}), /* @__PURE__ */ l("canvas", {
|
|
3111
3111
|
ref: d,
|
|
3112
|
-
className: `${
|
|
3112
|
+
className: `${Y.canvas} ${h ? Y.hidden : ""}`,
|
|
3113
3113
|
style: {
|
|
3114
3114
|
width: a,
|
|
3115
3115
|
height: c
|
|
@@ -3123,7 +3123,7 @@ var I = {
|
|
|
3123
3123
|
onTouchEnd: C
|
|
3124
3124
|
})]
|
|
3125
3125
|
});
|
|
3126
|
-
},
|
|
3126
|
+
}, X = {
|
|
3127
3127
|
slotMachine: "cos-slotMachine-P6FyZ",
|
|
3128
3128
|
machine: "cos-machine-B066r",
|
|
3129
3129
|
reel: "cos-reel-eEpJ3",
|
|
@@ -3132,14 +3132,14 @@ var I = {
|
|
|
3132
3132
|
mask: "cos-mask-jdrj3",
|
|
3133
3133
|
spinBtn: "cos-spinBtn-DvDE7",
|
|
3134
3134
|
result: "cos-result-dLN5b"
|
|
3135
|
-
},
|
|
3135
|
+
}, At = [
|
|
3136
3136
|
"🍒",
|
|
3137
3137
|
"🍋",
|
|
3138
3138
|
"🍊",
|
|
3139
3139
|
"🍇",
|
|
3140
3140
|
"⭐",
|
|
3141
3141
|
"7️⃣"
|
|
3142
|
-
],
|
|
3142
|
+
], jt = (e) => 1 - (1 - e) ** 3, Mt = ({ symbols: e = At, onSpinEnd: r }) => {
|
|
3143
3143
|
let [i, a] = s(!1), [c, d] = s([
|
|
3144
3144
|
0,
|
|
3145
3145
|
0,
|
|
@@ -3156,31 +3156,31 @@ var I = {
|
|
|
3156
3156
|
return n(() => () => {
|
|
3157
3157
|
g.current && (g.current.cancelled = !0), cancelAnimationFrame(m.current);
|
|
3158
3158
|
}, []), /* @__PURE__ */ u("div", {
|
|
3159
|
-
className:
|
|
3159
|
+
className: X.slotMachine,
|
|
3160
3160
|
children: [
|
|
3161
3161
|
/* @__PURE__ */ l("div", {
|
|
3162
|
-
className:
|
|
3162
|
+
className: X.machine,
|
|
3163
3163
|
children: [
|
|
3164
3164
|
0,
|
|
3165
3165
|
1,
|
|
3166
3166
|
2
|
|
3167
3167
|
].map((e) => /* @__PURE__ */ u("div", {
|
|
3168
|
-
className:
|
|
3168
|
+
className: X.reel,
|
|
3169
3169
|
style: { height: 240 },
|
|
3170
3170
|
children: [/* @__PURE__ */ l("div", {
|
|
3171
|
-
className:
|
|
3171
|
+
className: X.strip,
|
|
3172
3172
|
style: { transform: `translateY(${c[e]}px)` },
|
|
3173
3173
|
children: _.map((e, t) => /* @__PURE__ */ l("div", {
|
|
3174
|
-
className:
|
|
3174
|
+
className: X.item,
|
|
3175
3175
|
style: { height: 80 },
|
|
3176
3176
|
children: e
|
|
3177
3177
|
}, t))
|
|
3178
|
-
}), /* @__PURE__ */ l("div", { className:
|
|
3178
|
+
}), /* @__PURE__ */ l("div", { className: X.mask })]
|
|
3179
3179
|
}, e))
|
|
3180
3180
|
}),
|
|
3181
3181
|
/* @__PURE__ */ l("button", {
|
|
3182
3182
|
type: "button",
|
|
3183
|
-
className:
|
|
3183
|
+
className: X.spinBtn,
|
|
3184
3184
|
onClick: () => {
|
|
3185
3185
|
if (i) return;
|
|
3186
3186
|
a(!0), p([]);
|
|
@@ -3199,7 +3199,7 @@ var I = {
|
|
|
3199
3199
|
if (d(r.map((e, t) => {
|
|
3200
3200
|
let r = i - l - s[t];
|
|
3201
3201
|
if (r < 0) return e;
|
|
3202
|
-
let a =
|
|
3202
|
+
let a = jt(Math.min(r / o, 1));
|
|
3203
3203
|
return e + (n[t] - e) * a;
|
|
3204
3204
|
})), !s.every((e) => i - l - e >= o)) m.current = requestAnimationFrame(f);
|
|
3205
3205
|
else if (!u.cancelled) {
|
|
@@ -3214,12 +3214,12 @@ var I = {
|
|
|
3214
3214
|
children: i ? "旋转中..." : "开始"
|
|
3215
3215
|
}),
|
|
3216
3216
|
f.length > 0 && !i && /* @__PURE__ */ l("p", {
|
|
3217
|
-
className:
|
|
3217
|
+
className: X.result,
|
|
3218
3218
|
children: f[0] === f[1] && f[1] === f[2] ? "🎰 大奖!" : `结果: ${f.join(" ")}`
|
|
3219
3219
|
})
|
|
3220
3220
|
]
|
|
3221
3221
|
});
|
|
3222
|
-
},
|
|
3222
|
+
}, Nt = {
|
|
3223
3223
|
splitReveal: "cos-splitReveal-6W8-6",
|
|
3224
3224
|
text: "cos-text-miTsj",
|
|
3225
3225
|
char: "cos-char-0gPJV",
|
|
@@ -3234,12 +3234,12 @@ var I = {
|
|
|
3234
3234
|
"fromLeft",
|
|
3235
3235
|
"fromRight"
|
|
3236
3236
|
], Ft = ({ text: e = "REVEAL", delay: t = 80, color: n = "#f8fafc" }) => /* @__PURE__ */ l("div", {
|
|
3237
|
-
className:
|
|
3237
|
+
className: Nt.splitReveal,
|
|
3238
3238
|
children: /* @__PURE__ */ l("h1", {
|
|
3239
|
-
className:
|
|
3239
|
+
className: Nt.text,
|
|
3240
3240
|
style: { "--reveal-color": n },
|
|
3241
3241
|
children: e.split("").map((e, n) => /* @__PURE__ */ l("span", {
|
|
3242
|
-
className: `${
|
|
3242
|
+
className: `${Nt.char} ${Nt[Pt[n % Pt.length]]}`,
|
|
3243
3243
|
style: { animationDelay: `${n * t}ms` },
|
|
3244
3244
|
children: e === " " ? "\xA0" : e
|
|
3245
3245
|
}, `${e}-${n}`))
|
|
@@ -3474,10 +3474,136 @@ var I = {
|
|
|
3474
3474
|
})
|
|
3475
3475
|
]
|
|
3476
3476
|
})
|
|
3477
|
-
}), Kt = {
|
|
3477
|
+
}), Kt = 39, qt = {
|
|
3478
|
+
0: "sunny",
|
|
3479
|
+
1: "sunny",
|
|
3480
|
+
2: "partlyCloudy",
|
|
3481
|
+
3: "overcast",
|
|
3482
|
+
45: "fog",
|
|
3483
|
+
48: "fog",
|
|
3484
|
+
51: "lightRain",
|
|
3485
|
+
53: "lightRain",
|
|
3486
|
+
55: "moderateRain",
|
|
3487
|
+
56: "sleet",
|
|
3488
|
+
57: "sleet",
|
|
3489
|
+
61: "lightRain",
|
|
3490
|
+
63: "moderateRain",
|
|
3491
|
+
65: "heavyRain",
|
|
3492
|
+
66: "sleet",
|
|
3493
|
+
67: "sleet",
|
|
3494
|
+
71: "lightSnow",
|
|
3495
|
+
73: "moderateSnow",
|
|
3496
|
+
75: "heavySnow",
|
|
3497
|
+
77: "lightSnow",
|
|
3498
|
+
80: "lightRain",
|
|
3499
|
+
81: "moderateRain",
|
|
3500
|
+
82: "heavyRain",
|
|
3501
|
+
85: "lightSnow",
|
|
3502
|
+
86: "heavySnow",
|
|
3503
|
+
95: "thunderstorm",
|
|
3504
|
+
96: "thunderstorm",
|
|
3505
|
+
99: "thunderstorm"
|
|
3506
|
+
}, Jt = (e, t = 0) => {
|
|
3507
|
+
let n = qt[e] ?? "overcast";
|
|
3508
|
+
return (n === "sunny" || n === "partlyCloudy" || n === "overcast") && t >= Kt ? "gale" : n;
|
|
3509
|
+
}, Yt = {
|
|
3510
|
+
weather: null,
|
|
3511
|
+
status: "idle",
|
|
3512
|
+
error: null,
|
|
3513
|
+
current: null
|
|
3514
|
+
}, Xt = {
|
|
3515
|
+
weather: null,
|
|
3516
|
+
status: "locating",
|
|
3517
|
+
error: null,
|
|
3518
|
+
current: null
|
|
3519
|
+
}, Zt = {
|
|
3520
|
+
weather: null,
|
|
3521
|
+
status: "fetching",
|
|
3522
|
+
error: null,
|
|
3523
|
+
current: null
|
|
3524
|
+
}, Qt = (e) => e != null && Number.isFinite(e.latitude) && Number.isFinite(e.longitude), $t = (e = !0, t) => {
|
|
3525
|
+
let r = Qt(t), i = r ? t.latitude : null, a = r ? t.longitude : null, o = e ? r ? Zt : Xt : Yt, c = `${e}:${i},${a}`, [l, u] = s(o), [d, f] = s(c);
|
|
3526
|
+
return d !== c && (f(c), u((t) => e && t.weather ? {
|
|
3527
|
+
...o,
|
|
3528
|
+
weather: t.weather,
|
|
3529
|
+
current: t.current
|
|
3530
|
+
} : o)), n(() => {
|
|
3531
|
+
if (!e) return;
|
|
3532
|
+
let t = !1, n = new AbortController(), r = async (e, r) => {
|
|
3533
|
+
try {
|
|
3534
|
+
let i = new URLSearchParams({
|
|
3535
|
+
latitude: String(e),
|
|
3536
|
+
longitude: String(r),
|
|
3537
|
+
current: "weather_code,wind_speed_10m,is_day"
|
|
3538
|
+
}), a = await fetch(`https://api.open-meteo.com/v1/forecast?${i}`, { signal: n.signal });
|
|
3539
|
+
if (!a.ok) throw Error(`Open-Meteo 请求失败(HTTP ${a.status})`);
|
|
3540
|
+
let o = await a.json(), s = Number(o?.current?.weather_code);
|
|
3541
|
+
if (Number.isNaN(s)) throw Error("Open-Meteo 返回数据缺少 weather_code");
|
|
3542
|
+
let c = Number(o?.current?.wind_speed_10m ?? 0);
|
|
3543
|
+
if (t) return;
|
|
3544
|
+
u({
|
|
3545
|
+
weather: Jt(s, c),
|
|
3546
|
+
status: "success",
|
|
3547
|
+
error: null,
|
|
3548
|
+
current: {
|
|
3549
|
+
weatherCode: s,
|
|
3550
|
+
windSpeed: c,
|
|
3551
|
+
isDay: o?.current?.is_day === 1,
|
|
3552
|
+
latitude: e,
|
|
3553
|
+
longitude: r
|
|
3554
|
+
}
|
|
3555
|
+
});
|
|
3556
|
+
} catch (e) {
|
|
3557
|
+
if (t || e instanceof DOMException && e.name === "AbortError") return;
|
|
3558
|
+
u({
|
|
3559
|
+
weather: null,
|
|
3560
|
+
status: "error",
|
|
3561
|
+
error: e instanceof Error ? e.message : "天气获取失败",
|
|
3562
|
+
current: null
|
|
3563
|
+
});
|
|
3564
|
+
}
|
|
3565
|
+
};
|
|
3566
|
+
return i != null && a != null ? (r(i, a), () => {
|
|
3567
|
+
t = !0, n.abort();
|
|
3568
|
+
}) : typeof navigator > "u" || !navigator.geolocation ? (Promise.resolve().then(() => {
|
|
3569
|
+
t || u({
|
|
3570
|
+
weather: null,
|
|
3571
|
+
status: "error",
|
|
3572
|
+
error: "当前环境不支持定位",
|
|
3573
|
+
current: null
|
|
3574
|
+
});
|
|
3575
|
+
}), () => {
|
|
3576
|
+
t = !0;
|
|
3577
|
+
}) : (navigator.geolocation.getCurrentPosition(({ coords: e }) => {
|
|
3578
|
+
t || (u((e) => ({
|
|
3579
|
+
...e,
|
|
3580
|
+
status: "fetching"
|
|
3581
|
+
})), r(e.latitude, e.longitude));
|
|
3582
|
+
}, (e) => {
|
|
3583
|
+
t || u({
|
|
3584
|
+
weather: null,
|
|
3585
|
+
status: "error",
|
|
3586
|
+
error: e.message || "定位失败",
|
|
3587
|
+
current: null
|
|
3588
|
+
});
|
|
3589
|
+
}, {
|
|
3590
|
+
timeout: 1e4,
|
|
3591
|
+
maximumAge: 600 * 1e3
|
|
3592
|
+
}), () => {
|
|
3593
|
+
t = !0, n.abort();
|
|
3594
|
+
});
|
|
3595
|
+
}, [
|
|
3596
|
+
e,
|
|
3597
|
+
i,
|
|
3598
|
+
a
|
|
3599
|
+
]), l;
|
|
3600
|
+
}, en = {
|
|
3478
3601
|
weatherBackground: "cos-weatherBackground-Mnm22",
|
|
3479
|
-
canvas: "cos-canvas-nvqMt"
|
|
3480
|
-
|
|
3602
|
+
canvas: "cos-canvas-nvqMt",
|
|
3603
|
+
loadingOverlay: "cos-loadingOverlay-O58B7",
|
|
3604
|
+
loadingSpinner: "cos-loadingSpinner-NQ9yG",
|
|
3605
|
+
"weather-loading-spin": "cos-weather-loading-spin-IPFWZ"
|
|
3606
|
+
}, tn = {
|
|
3481
3607
|
sunny: {
|
|
3482
3608
|
sky: ["#4a9fe0", "#c8e8fb"],
|
|
3483
3609
|
sun: "full",
|
|
@@ -3786,12 +3912,81 @@ var I = {
|
|
|
3786
3912
|
snowCount: 160,
|
|
3787
3913
|
lightning: !1
|
|
3788
3914
|
}
|
|
3789
|
-
},
|
|
3915
|
+
}, nn = {
|
|
3916
|
+
sunny: {
|
|
3917
|
+
sky: ["#0b1a33", "#27476e"],
|
|
3918
|
+
stars: 110
|
|
3919
|
+
},
|
|
3920
|
+
partlyCloudy: {
|
|
3921
|
+
sky: ["#0f1f38", "#2c4666"],
|
|
3922
|
+
stars: 60
|
|
3923
|
+
},
|
|
3924
|
+
overcast: {
|
|
3925
|
+
sky: ["#181f2a", "#333e4e"],
|
|
3926
|
+
stars: 0
|
|
3927
|
+
},
|
|
3928
|
+
lightRain: {
|
|
3929
|
+
sky: ["#151b26", "#2b3442"],
|
|
3930
|
+
stars: 0
|
|
3931
|
+
},
|
|
3932
|
+
moderateRain: {
|
|
3933
|
+
sky: ["#11161f", "#242c3a"],
|
|
3934
|
+
stars: 0
|
|
3935
|
+
},
|
|
3936
|
+
heavyRain: {
|
|
3937
|
+
sky: ["#0c1017", "#1c232e"],
|
|
3938
|
+
stars: 0
|
|
3939
|
+
},
|
|
3940
|
+
thunderstorm: {
|
|
3941
|
+
sky: ["#0a0e18", "#192132"],
|
|
3942
|
+
stars: 0
|
|
3943
|
+
},
|
|
3944
|
+
fog: {
|
|
3945
|
+
sky: ["#1c222b", "#3a434e"],
|
|
3946
|
+
stars: 0
|
|
3947
|
+
},
|
|
3948
|
+
lightSnow: {
|
|
3949
|
+
sky: ["#161e2b", "#3a4656"],
|
|
3950
|
+
stars: 20
|
|
3951
|
+
},
|
|
3952
|
+
moderateSnow: {
|
|
3953
|
+
sky: ["#131a26", "#333f4f"],
|
|
3954
|
+
stars: 8
|
|
3955
|
+
},
|
|
3956
|
+
heavySnow: {
|
|
3957
|
+
sky: ["#101623", "#2a3545"],
|
|
3958
|
+
stars: 0
|
|
3959
|
+
},
|
|
3960
|
+
sleet: {
|
|
3961
|
+
sky: ["#121924", "#2c3745"],
|
|
3962
|
+
stars: 0
|
|
3963
|
+
},
|
|
3964
|
+
hail: {
|
|
3965
|
+
sky: ["#0e141d", "#26303e"],
|
|
3966
|
+
stars: 0
|
|
3967
|
+
},
|
|
3968
|
+
smog: {
|
|
3969
|
+
sky: ["#1a1812", "#38321f"],
|
|
3970
|
+
stars: 0
|
|
3971
|
+
},
|
|
3972
|
+
gale: {
|
|
3973
|
+
sky: ["#101a26", "#2e3d4d"],
|
|
3974
|
+
stars: 30
|
|
3975
|
+
},
|
|
3976
|
+
snow: {
|
|
3977
|
+
sky: ["#131a26", "#333f4f"],
|
|
3978
|
+
stars: 8
|
|
3979
|
+
}
|
|
3980
|
+
}, rn = ([e, t, n]) => [
|
|
3981
|
+
Math.round(e * .3 + 18),
|
|
3982
|
+
Math.round(t * .3 + 24),
|
|
3983
|
+
Math.round(n * .3 + 42)
|
|
3984
|
+
], an = (e) => {
|
|
3790
3985
|
let t = Math.ceil(e * 2 + 4), n = document.createElement("canvas");
|
|
3791
3986
|
n.width = t, n.height = t;
|
|
3792
3987
|
let r = n.getContext("2d"), i = r.createRadialGradient(t / 2, t / 2, 0, t / 2, t / 2, e + 1);
|
|
3793
3988
|
return i.addColorStop(0, "rgba(255, 255, 255, 1)"), i.addColorStop(.6, "rgba(255, 255, 255, 0.85)"), i.addColorStop(1, "rgba(255, 255, 255, 0)"), r.fillStyle = i, r.fillRect(0, 0, t, t), n;
|
|
3794
|
-
},
|
|
3989
|
+
}, on = (e) => {
|
|
3795
3990
|
let t = Math.ceil(e * 2 + 6), n = document.createElement("canvas");
|
|
3796
3991
|
n.width = t, n.height = t;
|
|
3797
3992
|
let r = n.getContext("2d");
|
|
@@ -3818,7 +4013,7 @@ var I = {
|
|
|
3818
4013
|
r.closePath(), r.stroke();
|
|
3819
4014
|
}
|
|
3820
4015
|
return n;
|
|
3821
|
-
},
|
|
4016
|
+
}, sn = (e, t, n) => {
|
|
3822
4017
|
let r = 1 + Math.random() ** 1.6 * 4.2, i = r >= 2.4;
|
|
3823
4018
|
return {
|
|
3824
4019
|
x: Math.random() * e,
|
|
@@ -3830,27 +4025,61 @@ var I = {
|
|
|
3830
4025
|
rotation: Math.random() * Math.PI * 2,
|
|
3831
4026
|
rotationSpeed: (Math.random() - .5) * .025,
|
|
3832
4027
|
opacity: .55 + Math.random() * .45,
|
|
3833
|
-
sprite: i ?
|
|
4028
|
+
sprite: i ? on(r * 2.4) : an(r)
|
|
3834
4029
|
};
|
|
3835
|
-
},
|
|
4030
|
+
}, cn = (e, t, n, r, i, a) => {
|
|
3836
4031
|
if (a <= 0) return [[e, t], [n, r]];
|
|
3837
|
-
let o = (e + n) / 2 + (Math.random() - .5) * i, s = (t + r) / 2, c =
|
|
4032
|
+
let o = (e + n) / 2 + (Math.random() - .5) * i, s = (t + r) / 2, c = cn(e, t, o, s, i * .55, a - 1), l = cn(o, s, n, r, i * .55, a - 1);
|
|
3838
4033
|
return [...c.slice(0, -1), ...l];
|
|
3839
|
-
},
|
|
3840
|
-
let
|
|
4034
|
+
}, ln = ({ width: e = 800, height: t = 450, weather: r = "sunny", night: i = !1, live: a = !1, latitude: s, longitude: c, onLiveWeather: d, loading: f = !1 }) => {
|
|
4035
|
+
let p = o(null), m = $t(a, s != null && c != null ? {
|
|
4036
|
+
latitude: s,
|
|
4037
|
+
longitude: c
|
|
4038
|
+
} : void 0), h = a && m.weather ? m.weather : r, g = a && m.current ? !m.current.isDay : i, _ = f || a && (m.status === "locating" || m.status === "fetching"), y = o(d);
|
|
3841
4039
|
return n(() => {
|
|
3842
|
-
|
|
4040
|
+
y.current = d;
|
|
4041
|
+
}), n(() => {
|
|
4042
|
+
m.weather && y.current?.(m.weather);
|
|
4043
|
+
}, [m.weather]), n(() => {
|
|
4044
|
+
let n = p.current;
|
|
3843
4045
|
if (!n) return;
|
|
3844
|
-
let
|
|
3845
|
-
n.width = e *
|
|
3846
|
-
let
|
|
3847
|
-
if (!
|
|
3848
|
-
|
|
3849
|
-
let
|
|
4046
|
+
let r = window.devicePixelRatio || 1;
|
|
4047
|
+
n.width = e * r, n.height = t * r;
|
|
4048
|
+
let i = n.getContext("2d");
|
|
4049
|
+
if (!i) return;
|
|
4050
|
+
i.setTransform(r, 0, 0, r, 0, 0);
|
|
4051
|
+
let a = tn[h], o = nn[h], s = g ? o.sky : a.sky, c = g ? rn(a.cloudColor) : a.cloudColor, l = e * .72, u = t * .26, d = Math.min(e, t) * .09, f = g ? Array.from({ length: o.stars }, () => ({
|
|
4052
|
+
x: Math.random() * e,
|
|
4053
|
+
y: Math.random() * t * .72,
|
|
4054
|
+
r: .4 + Math.random() * 1.1,
|
|
4055
|
+
phase: Math.random() * Math.PI * 2,
|
|
4056
|
+
speed: .015 + Math.random() * .035
|
|
4057
|
+
})) : [], m = [
|
|
4058
|
+
{
|
|
4059
|
+
dx: -.32,
|
|
4060
|
+
dy: .08,
|
|
4061
|
+
r: .17
|
|
4062
|
+
},
|
|
4063
|
+
{
|
|
4064
|
+
dx: .24,
|
|
4065
|
+
dy: -.22,
|
|
4066
|
+
r: .12
|
|
4067
|
+
},
|
|
4068
|
+
{
|
|
4069
|
+
dx: .04,
|
|
4070
|
+
dy: .34,
|
|
4071
|
+
r: .1
|
|
4072
|
+
},
|
|
4073
|
+
{
|
|
4074
|
+
dx: .36,
|
|
4075
|
+
dy: .24,
|
|
4076
|
+
r: .07
|
|
4077
|
+
}
|
|
4078
|
+
], _ = Array.from({ length: a.cloudCount }, () => {
|
|
3850
4079
|
let n = .7 + Math.random() * .9, r = 4 + Math.floor(Math.random() * 3);
|
|
3851
4080
|
return {
|
|
3852
4081
|
x: Math.random() * (e + 240) - 120,
|
|
3853
|
-
y: t * .06 + Math.random() * t *
|
|
4082
|
+
y: t * .06 + Math.random() * t * a.cloudSpread,
|
|
3854
4083
|
scale: n,
|
|
3855
4084
|
speed: .12 + Math.random() * .22,
|
|
3856
4085
|
puffs: Array.from({ length: r }, (e, t) => ({
|
|
@@ -3859,19 +4088,19 @@ var I = {
|
|
|
3859
4088
|
r: 22 + Math.random() * 20
|
|
3860
4089
|
}))
|
|
3861
4090
|
};
|
|
3862
|
-
}),
|
|
4091
|
+
}), y = a.rain ? Array.from({ length: a.rain.count }, () => ({
|
|
3863
4092
|
x: Math.random() * (e + 160) - 80,
|
|
3864
4093
|
y: Math.random() * t,
|
|
3865
4094
|
len: 8 + Math.random() * 10,
|
|
3866
|
-
speed:
|
|
3867
|
-
})) : [],
|
|
4095
|
+
speed: a.rain.speed * (.75 + Math.random() * .5)
|
|
4096
|
+
})) : [], b = [], x = Array.from({ length: a.fogBanks }, (n, r) => ({
|
|
3868
4097
|
x: Math.random() * e,
|
|
3869
|
-
y: r / Math.max(
|
|
4098
|
+
y: r / Math.max(a.fogBanks - 1, 1) * t * .9 + t * .05,
|
|
3870
4099
|
rw: e * (.25 + Math.random() * .3),
|
|
3871
4100
|
rh: t * (.08 + Math.random() * .08),
|
|
3872
4101
|
speed: (.1 + Math.random() * .25) * (r % 2 == 0 ? 1 : -1),
|
|
3873
4102
|
alpha: .16 + Math.random() * .14
|
|
3874
|
-
})),
|
|
4103
|
+
})), S = Array.from({ length: a.snowCount }, () => sn(e, t)), C = h === "hail" ? Array.from({ length: 130 }, () => ({
|
|
3875
4104
|
x: Math.random() * (e + 180) - 90,
|
|
3876
4105
|
y: Math.random() * t,
|
|
3877
4106
|
r: 1.8 + Math.random() * 3,
|
|
@@ -3879,7 +4108,7 @@ var I = {
|
|
|
3879
4108
|
vy: 8 + Math.random() * 5,
|
|
3880
4109
|
bounces: 0,
|
|
3881
4110
|
opacity: .65 + Math.random() * .35
|
|
3882
|
-
})) : [],
|
|
4111
|
+
})) : [], w = h === "gale" ? Array.from({ length: 46 }, () => ({
|
|
3883
4112
|
x: Math.random() * e,
|
|
3884
4113
|
y: Math.random() * t,
|
|
3885
4114
|
length: 45 + Math.random() * 130,
|
|
@@ -3887,143 +4116,166 @@ var I = {
|
|
|
3887
4116
|
wave: Math.random() * Math.PI * 2,
|
|
3888
4117
|
alpha: .12 + Math.random() * .3,
|
|
3889
4118
|
width: .6 + Math.random() * 1.2
|
|
3890
|
-
})) : [],
|
|
3891
|
-
|
|
3892
|
-
}),
|
|
3893
|
-
let n =
|
|
3894
|
-
n.addColorStop(0, s
|
|
3895
|
-
},
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
4119
|
+
})) : [], T = 0, E = 0, D = 0, O = [], k = 120 + Math.random() * 240, A = 0, j = document.hidden, M = v((e) => {
|
|
4120
|
+
j = e;
|
|
4121
|
+
}), N = () => {
|
|
4122
|
+
let n = i.createLinearGradient(0, 0, 0, t);
|
|
4123
|
+
n.addColorStop(0, s[0]), n.addColorStop(1, s[1]), i.fillStyle = n, i.fillRect(0, 0, e, t);
|
|
4124
|
+
}, ee = () => {
|
|
4125
|
+
for (let e of f) {
|
|
4126
|
+
let t = .35 + (Math.sin(T * e.speed + e.phase) + 1) * .325;
|
|
4127
|
+
i.beginPath(), i.arc(e.x, e.y, e.r, 0, Math.PI * 2), i.fillStyle = `rgba(226, 235, 255, ${t})`, i.fill();
|
|
4128
|
+
}
|
|
4129
|
+
}, te = () => {
|
|
4130
|
+
if (a.sun === "none") return;
|
|
4131
|
+
let n = d * .88, r = a.sun === "dim", o = i.createRadialGradient(l, u, 0, l, u, n * (r ? 1.8 : 2.8));
|
|
4132
|
+
o.addColorStop(0, `rgba(214, 226, 245, ${r ? .18 : .35})`), o.addColorStop(1, "rgba(214, 226, 245, 0)"), i.fillStyle = o, i.fillRect(0, 0, e, t);
|
|
4133
|
+
let s = r ? .5 : 1, c = i.createRadialGradient(l - n * .25, u - n * .25, 0, l, u, n);
|
|
4134
|
+
c.addColorStop(0, `rgba(245, 248, 252, ${s})`), c.addColorStop(1, `rgba(196, 208, 226, ${s})`), i.beginPath(), i.arc(l, u, n, 0, Math.PI * 2), i.fillStyle = c, i.fill();
|
|
4135
|
+
for (let e of m) i.beginPath(), i.arc(l + e.dx * n, u + e.dy * n, e.r * n, 0, Math.PI * 2), i.fillStyle = `rgba(170, 184, 206, ${s * .55})`, i.fill();
|
|
4136
|
+
}, ne = () => {
|
|
4137
|
+
if (g) {
|
|
4138
|
+
ee(), te();
|
|
4139
|
+
return;
|
|
4140
|
+
}
|
|
4141
|
+
if (a.sun === "none") return;
|
|
4142
|
+
if (a.sun === "full") {
|
|
4143
|
+
let n = 1 + Math.sin(T * .02) * .04, r = i.createRadialGradient(l, u, 0, l, u, d * 3.4 * n);
|
|
4144
|
+
r.addColorStop(0, "rgba(255, 236, 168, 0.9)"), r.addColorStop(.35, "rgba(255, 214, 112, 0.32)"), r.addColorStop(1, "rgba(255, 214, 112, 0)"), i.fillStyle = r, i.fillRect(0, 0, e, t), i.save(), i.translate(l, u), i.rotate(T * .003);
|
|
3900
4145
|
for (let e = 0; e < 12; e++) {
|
|
3901
|
-
|
|
3902
|
-
let e =
|
|
3903
|
-
e.addColorStop(0, "rgba(255, 230, 150, 0.5)"), e.addColorStop(1, "rgba(255, 230, 150, 0)"),
|
|
4146
|
+
i.rotate(Math.PI / 6);
|
|
4147
|
+
let e = i.createLinearGradient(d * 1.2, 0, d * 2.4, 0);
|
|
4148
|
+
e.addColorStop(0, "rgba(255, 230, 150, 0.5)"), e.addColorStop(1, "rgba(255, 230, 150, 0)"), i.strokeStyle = e, i.lineWidth = 3, i.beginPath(), i.moveTo(d * 1.2, 0), i.lineTo(d * 2.4, 0), i.stroke();
|
|
3904
4149
|
}
|
|
3905
|
-
|
|
4150
|
+
i.restore();
|
|
3906
4151
|
}
|
|
3907
|
-
if (
|
|
3908
|
-
let n =
|
|
3909
|
-
n.addColorStop(0, "rgba(255, 240, 190, 0.7)"), n.addColorStop(1, "rgba(255, 240, 190, 0)"),
|
|
4152
|
+
if (a.sun === "soft") {
|
|
4153
|
+
let n = i.createRadialGradient(l, u, 0, l, u, d * 2.4);
|
|
4154
|
+
n.addColorStop(0, "rgba(255, 240, 190, 0.7)"), n.addColorStop(1, "rgba(255, 240, 190, 0)"), i.fillStyle = n, i.fillRect(0, 0, e, t);
|
|
3910
4155
|
}
|
|
3911
|
-
let n =
|
|
3912
|
-
r.addColorStop(0, `rgba(255, 250, 224, ${n})`), r.addColorStop(1, `rgba(255, 214, 102, ${n})`),
|
|
3913
|
-
},
|
|
3914
|
-
let [t, n,
|
|
3915
|
-
for (let
|
|
3916
|
-
|
|
3917
|
-
for (let e of
|
|
3918
|
-
let
|
|
3919
|
-
u.addColorStop(0, `rgba(${t}, ${n}, ${
|
|
4156
|
+
let n = a.sun === "dim" ? .35 : 1, r = i.createRadialGradient(l - d * .2, u - d * .2, 0, l, u, d);
|
|
4157
|
+
r.addColorStop(0, `rgba(255, 250, 224, ${n})`), r.addColorStop(1, `rgba(255, 214, 102, ${n})`), i.beginPath(), i.arc(l, u, d, 0, Math.PI * 2), i.fillStyle = r, i.fill();
|
|
4158
|
+
}, P = () => {
|
|
4159
|
+
let [t, n, r] = c;
|
|
4160
|
+
for (let o of _) {
|
|
4161
|
+
o.x += o.speed * (h === "gale" ? 7 : 1), o.x - 140 * o.scale > e && (o.x = -160 * o.scale);
|
|
4162
|
+
for (let e of o.puffs) {
|
|
4163
|
+
let s = o.x + e.dx * o.scale, c = o.y + e.dy * o.scale, l = e.r * o.scale, u = i.createRadialGradient(s, c, 0, s, c, l);
|
|
4164
|
+
u.addColorStop(0, `rgba(${t}, ${n}, ${r}, ${a.cloudAlpha})`), u.addColorStop(1, `rgba(${t}, ${n}, ${r}, 0)`), i.beginPath(), i.arc(s, c, l, 0, Math.PI * 2), i.fillStyle = u, i.fill();
|
|
3920
4165
|
}
|
|
3921
4166
|
}
|
|
3922
|
-
},
|
|
3923
|
-
if (!
|
|
3924
|
-
let { wind: n, alpha: r, splash:
|
|
3925
|
-
|
|
3926
|
-
for (let r of
|
|
4167
|
+
}, re = () => {
|
|
4168
|
+
if (!a.rain) return;
|
|
4169
|
+
let { wind: n, alpha: r, splash: o } = a.rain;
|
|
4170
|
+
i.strokeStyle = `rgba(214, 228, 240, ${r})`, i.lineWidth = 1.2, i.beginPath();
|
|
4171
|
+
for (let r of y) {
|
|
3927
4172
|
let a = Math.hypot(n, r.speed) || 1, s = n / a, c = r.speed / a;
|
|
3928
|
-
|
|
4173
|
+
i.moveTo(r.x, r.y), i.lineTo(r.x + s * r.len, r.y + c * r.len), r.x += n, r.y += r.speed, r.y > t && (o && Math.random() < .3 && b.length < 60 && b.push({
|
|
3929
4174
|
x: r.x,
|
|
3930
4175
|
r: 1,
|
|
3931
4176
|
alpha: .5
|
|
3932
4177
|
}), r.y = -r.len, r.x = Math.random() * (e + 160) - 80);
|
|
3933
4178
|
}
|
|
3934
|
-
|
|
3935
|
-
for (let e =
|
|
3936
|
-
let n =
|
|
4179
|
+
i.stroke();
|
|
4180
|
+
for (let e = b.length - 1; e >= 0; e--) {
|
|
4181
|
+
let n = b[e];
|
|
3937
4182
|
if (n.r += .8, n.alpha -= .035, n.alpha <= 0) {
|
|
3938
|
-
|
|
4183
|
+
b.splice(e, 1);
|
|
3939
4184
|
continue;
|
|
3940
4185
|
}
|
|
3941
|
-
|
|
4186
|
+
i.beginPath(), i.ellipse(n.x, t - 3, n.r, n.r * .35, 0, Math.PI, Math.PI * 2), i.strokeStyle = `rgba(214, 228, 240, ${n.alpha})`, i.lineWidth = 1, i.stroke();
|
|
3942
4187
|
}
|
|
3943
|
-
},
|
|
3944
|
-
let t =
|
|
3945
|
-
|
|
4188
|
+
}, ie = () => {
|
|
4189
|
+
let t = h === "smog" ? "168, 155, 126" : "226, 232, 238";
|
|
4190
|
+
g && (t = h === "smog" ? "96, 88, 66" : "138, 150, 168");
|
|
4191
|
+
for (let n of x) {
|
|
3946
4192
|
n.x += n.speed, n.speed > 0 && n.x - n.rw > e && (n.x = -n.rw), n.speed < 0 && n.x + n.rw < 0 && (n.x = e + n.rw);
|
|
3947
|
-
let r =
|
|
3948
|
-
r.addColorStop(0, `rgba(${t}, ${n.alpha})`), r.addColorStop(1, `rgba(${t}, 0)`),
|
|
4193
|
+
let r = i.createRadialGradient(n.x, n.y, 0, n.x, n.y, n.rw);
|
|
4194
|
+
r.addColorStop(0, `rgba(${t}, ${n.alpha})`), r.addColorStop(1, `rgba(${t}, 0)`), i.save(), i.translate(n.x, n.y), i.scale(1, n.rh / n.rw), i.translate(-n.x, -n.y), i.beginPath(), i.arc(n.x, n.y, n.rw, 0, Math.PI * 2), i.fillStyle = r, i.fill(), i.restore();
|
|
3949
4195
|
}
|
|
3950
|
-
},
|
|
3951
|
-
for (let n of
|
|
3952
|
-
},
|
|
3953
|
-
if (
|
|
3954
|
-
let r = n.x,
|
|
3955
|
-
n.vy += .16, n.x += n.vx, n.y += n.vy,
|
|
4196
|
+
}, ae = () => {
|
|
4197
|
+
for (let n of S) n.y += n.speed, n.x += Math.sin(T * .02 + n.phase) * (.3 + n.size * .08) + n.drift, n.rotation += n.rotationSpeed, n.y - n.sprite.height > t && (n.y = -n.sprite.height, n.x = Math.random() * e, n.phase = Math.random() * Math.PI * 2, n.drift = (Math.random() - .5) * .4, n.opacity = .55 + Math.random() * .45), n.x > e + 20 && (n.x = -20), n.x < -20 && (n.x = e + 20), i.save(), i.globalAlpha = n.opacity, i.translate(n.x, n.y), i.rotate(n.rotation), i.drawImage(n.sprite, -n.sprite.width / 2, -n.sprite.height / 2), i.restore();
|
|
4198
|
+
}, oe = () => {
|
|
4199
|
+
if (C.length !== 0) for (let n of C) {
|
|
4200
|
+
let r = n.x, a = n.y;
|
|
4201
|
+
n.vy += .16, n.x += n.vx, n.y += n.vy, i.beginPath(), i.moveTo(r, a), i.lineTo(n.x, n.y), i.strokeStyle = `rgba(225, 239, 250, ${n.opacity * .25})`, i.lineWidth = n.r * .65, i.stroke(), n.y + n.r >= t && (n.bounces === 0 ? (n.y = t - n.r, n.vy *= -.36, n.vx *= .72, n.bounces = 1) : (n.x = Math.random() * (e + 180) - 90, n.y = -10 - Math.random() * t * .25, n.vx = -2.2 - Math.random() * 1.8, n.vy = 8 + Math.random() * 5, n.bounces = 0)), i.beginPath(), i.arc(n.x, n.y, n.r, 0, Math.PI * 2), i.fillStyle = `rgba(241, 248, 255, ${n.opacity})`, i.fill(), i.strokeStyle = `rgba(174, 207, 229, ${n.opacity * .75})`, i.lineWidth = .7, i.stroke(), i.beginPath(), i.arc(n.x - n.r * .3, n.y - n.r * .3, Math.max(.6, n.r * .24), 0, Math.PI * 2), i.fillStyle = `rgba(255, 255, 255, ${n.opacity})`, i.fill();
|
|
3956
4202
|
}
|
|
3957
|
-
},
|
|
3958
|
-
if (
|
|
4203
|
+
}, se = () => {
|
|
4204
|
+
if (w.length !== 0) for (let n of w) {
|
|
3959
4205
|
n.x += n.speed, n.wave += .04, n.x - n.length > e && (n.x = -n.length - Math.random() * e * .3, n.y = Math.random() * t);
|
|
3960
|
-
let r = Math.sin(n.wave) * 8,
|
|
3961
|
-
if (
|
|
4206
|
+
let r = Math.sin(n.wave) * 8, a = n.x + n.length;
|
|
4207
|
+
if (i.beginPath(), i.moveTo(n.x, n.y), i.bezierCurveTo(n.x + n.length * .3, n.y + r, n.x + n.length * .7, n.y - r, a, n.y), i.strokeStyle = `rgba(235, 244, 250, ${n.alpha})`, i.lineWidth = n.width, i.lineCap = "round", i.stroke(), n.length > 100) {
|
|
3962
4208
|
let e = n.x + n.length * .58, t = n.y - r * .4;
|
|
3963
|
-
|
|
4209
|
+
i.save(), i.translate(e, t), i.rotate(n.wave * 2), i.beginPath(), i.ellipse(0, 0, 4, 1.6, 0, 0, Math.PI * 2), i.fillStyle = `rgba(91, 76, 52, ${n.alpha * 1.6})`, i.fill(), i.restore();
|
|
3964
4210
|
}
|
|
3965
4211
|
}
|
|
3966
|
-
},
|
|
3967
|
-
if (
|
|
3968
|
-
if (
|
|
3969
|
-
|
|
4212
|
+
}, ce = () => {
|
|
4213
|
+
if (a.lightning) {
|
|
4214
|
+
if (T >= k) {
|
|
4215
|
+
k = T + 150 + Math.random() * 300, E = .5, D = 9;
|
|
3970
4216
|
let n = e * (.15 + Math.random() * .7);
|
|
3971
|
-
|
|
4217
|
+
O = cn(n, t * .12, n + (Math.random() - .5) * e * .2, t * .92, 60, 6);
|
|
3972
4218
|
}
|
|
3973
|
-
if (
|
|
3974
|
-
--
|
|
3975
|
-
let e =
|
|
3976
|
-
|
|
4219
|
+
if (D > 0) {
|
|
4220
|
+
--D;
|
|
4221
|
+
let e = D / 9;
|
|
4222
|
+
i.beginPath(), O.forEach(([e, t], n) => n === 0 ? i.moveTo(e, t) : i.lineTo(e, t)), i.strokeStyle = `rgba(240, 246, 255, ${e})`, i.lineWidth = 2.4, i.shadowColor = "#bcd7ff", i.shadowBlur = 16, i.stroke(), i.shadowBlur = 0;
|
|
3977
4223
|
}
|
|
3978
|
-
|
|
4224
|
+
E > .01 && (i.fillStyle = `rgba(226, 236, 255, ${E})`, i.fillRect(0, 0, e, t), E *= .82);
|
|
3979
4225
|
}
|
|
3980
|
-
},
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
4226
|
+
}, le = () => {
|
|
4227
|
+
if (a.haze <= 0) return;
|
|
4228
|
+
let n = h === "smog" ? "177, 164, 135" : "220, 226, 232";
|
|
4229
|
+
g && (n = h === "smog" ? "82, 74, 54" : "116, 128, 145"), i.fillStyle = `rgba(${n}, ${a.haze})`, i.fillRect(0, 0, e, t);
|
|
4230
|
+
}, F = () => {
|
|
4231
|
+
A = requestAnimationFrame(F), !j && (T += 1, N(), ne(), P(), ie(), le(), re(), ae(), oe(), se(), ce());
|
|
3984
4232
|
};
|
|
3985
|
-
return
|
|
3986
|
-
cancelAnimationFrame(
|
|
4233
|
+
return F(), () => {
|
|
4234
|
+
cancelAnimationFrame(A), M();
|
|
3987
4235
|
};
|
|
3988
4236
|
}, [
|
|
4237
|
+
g,
|
|
4238
|
+
h,
|
|
3989
4239
|
t,
|
|
3990
|
-
r,
|
|
3991
4240
|
e
|
|
3992
|
-
]), /* @__PURE__ */
|
|
3993
|
-
className:
|
|
4241
|
+
]), /* @__PURE__ */ u("div", {
|
|
4242
|
+
className: en.weatherBackground,
|
|
3994
4243
|
style: {
|
|
3995
4244
|
width: e,
|
|
3996
4245
|
height: t
|
|
3997
4246
|
},
|
|
3998
|
-
children: /* @__PURE__ */ l("canvas", {
|
|
3999
|
-
ref:
|
|
4000
|
-
className:
|
|
4247
|
+
children: [/* @__PURE__ */ l("canvas", {
|
|
4248
|
+
ref: p,
|
|
4249
|
+
className: en.canvas,
|
|
4001
4250
|
style: {
|
|
4002
4251
|
width: e,
|
|
4003
4252
|
height: t
|
|
4004
4253
|
}
|
|
4005
|
-
})
|
|
4254
|
+
}), _ && /* @__PURE__ */ u("div", {
|
|
4255
|
+
className: en.loadingOverlay,
|
|
4256
|
+
children: [/* @__PURE__ */ l("div", { className: en.loadingSpinner }), /* @__PURE__ */ l("span", { children: "天气加载中…" })]
|
|
4257
|
+
})]
|
|
4006
4258
|
});
|
|
4007
|
-
},
|
|
4259
|
+
}, un = {
|
|
4008
4260
|
waveText: "cos-waveText-Zy2Tp",
|
|
4009
4261
|
text: "cos-text-el-KR",
|
|
4010
4262
|
char: "cos-char-Y9-mV",
|
|
4011
4263
|
wave: "cos-wave-jVRCz"
|
|
4012
|
-
},
|
|
4013
|
-
className:
|
|
4264
|
+
}, dn = ({ text: e = "WAVE", amplitude: t = 12, color: n = "#38bdf8", fontSize: r = 56 }) => /* @__PURE__ */ l("div", {
|
|
4265
|
+
className: un.waveText,
|
|
4014
4266
|
children: /* @__PURE__ */ l("h1", {
|
|
4015
|
-
className:
|
|
4267
|
+
className: un.text,
|
|
4016
4268
|
style: {
|
|
4017
4269
|
fontSize: r,
|
|
4018
4270
|
"--wave-color": n,
|
|
4019
4271
|
"--wave-amp": `${t}px`
|
|
4020
4272
|
},
|
|
4021
4273
|
children: e.split("").map((e, t) => /* @__PURE__ */ l("span", {
|
|
4022
|
-
className:
|
|
4274
|
+
className: un.char,
|
|
4023
4275
|
style: { animationDelay: `${t * .1}s` },
|
|
4024
4276
|
children: e === " " ? "\xA0" : e
|
|
4025
4277
|
}, `${e}-${t}`))
|
|
4026
4278
|
})
|
|
4027
4279
|
});
|
|
4028
4280
|
//#endregion
|
|
4029
|
-
export { x as AudioVisualizer, _ as Aurora, f as BarcodeScan, m as BurnAway, C as CanvasClock,
|
|
4281
|
+
export { x as AudioVisualizer, _ as Aurora, f as BarcodeScan, m as BurnAway, C as CanvasClock, D as Charge, k as ClickSpark, ee as Confetti, oe as Countdown, fe as CursorTrail, ne as CyberGrid, me as DiceRoll, ce as DnaHelix, ge as DoublePendulum, ue as ElectricArc, Ce as Fireworks, Ee as FlipCounter, je as GlitchText, ke as GradientFlow, Pe as GravityBalls, Fe as HolographicCard, Be as LiquidGlass, Ie as LiquidProgress, Re as LorenzAttractor, He as MagneticButton, We as MatrixRain, Je as MazeGenerator, Ke as MetaballPool, Xe as MeteorRain, Ze as NeonText, $e as NewtonCradle, tt as OrbitalChart, rt as ParticleNetwork, at as PlasmaBall, ht as ProgressChest, _t as RadarScan, vt as RedPacketRain, yt as ReturnCity, Tt as RippleWater, xt as RopeChain, Ot as ScrambleText, kt as ScratchCard, Mt as SlotMachine, st as SmokeFog, ft as Snowfall, ut as SolarSystem, St as Speedometer, Ft as SplitReveal, Lt as Spotlight, mt as Starfield, Ct as TimelinePulse, Vt as Turntable, Wt as Typewriter, Gt as WaveButton, dn as WaveText, ln as WeatherBackground, Jt as mapWmoCodeToWeatherType, $t as useLiveWeather };
|