cos-design 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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, ee = 258, te = (e) => {
292
+ }, T = 15, E = 258, ee = (e) => {
293
293
  let { initQuantity: t = 0, value: r, onChange: i, autoCharge: a = !0, interval: c = 500, step: d = .01 } = e, f = o(null), p = r !== void 0, [m, h] = s(() => y(t, 0, 100)), g = y(p ? r : m, 0, 100), _ = o(g), v = o(i);
294
294
  n(() => {
295
295
  v.current = i;
@@ -299,7 +299,7 @@ import './index.css';var d = {
299
299
  let e = f.current;
300
300
  if (!e) return;
301
301
  let t = () => {
302
- let t = Math.max(0, e.clientHeight - ee);
302
+ let t = Math.max(0, e.clientHeight - E);
303
303
  e.style.setProperty("--charge-rise-max", `${t}px`);
304
304
  };
305
305
  t();
@@ -340,12 +340,12 @@ import './index.css';var d = {
340
340
  children: [b, "%"]
341
341
  })]
342
342
  });
343
- }, E = {
343
+ }, D = {
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
- }, D = ({ children: e, color: r = "#fbbf24", count: i = 16 }) => {
348
+ }, O = ({ 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: E.clickSpark,
386
+ className: D.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: E.canvas
394
+ className: D.canvas
395
395
  }),
396
396
  e && /* @__PURE__ */ l("div", {
397
- className: E.content,
397
+ className: D.content,
398
398
  children: e
399
399
  }),
400
400
  !e && /* @__PURE__ */ l("p", {
401
- className: E.hint,
401
+ className: D.hint,
402
402
  children: "点击任意位置产生火花"
403
403
  })
404
404
  ]
405
405
  });
406
- }, O = {
406
+ }, k = {
407
407
  confetti: "cos-confetti-MeNtU",
408
408
  canvas: "cos-canvas-0T3Vs",
409
409
  hint: "cos-hint-sGHEi"
410
- }, k = [
410
+ }, A = [
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
- ], A = () => k[Math.floor(Math.random() * k.length)], j = (e, t, n) => {
418
+ ], j = () => A[Math.floor(Math.random() * A.length)], M = (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: A(),
429
+ color: j(),
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
- }, ne = e(({ width: e = 800, height: r = 400, auto: a = !0, particleCount: s = 120 }, c) => {
436
+ }, te = 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(...j(e, t, n));
449
+ f.current.push(...M(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: O.confetti,
470
+ className: k.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: O.canvas,
477
+ className: k.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: O.hint,
484
+ className: k.hint,
485
485
  children: "点击画布再次喷射"
486
486
  })]
487
487
  });
488
488
  });
489
- ne.displayName = "Confetti";
490
- var re = {
489
+ te.displayName = "Confetti";
490
+ var ne = {
491
491
  cyberGrid: "cos-cyberGrid-VgJwl",
492
492
  canvas: "cos-canvas--Mq-O"
493
- }, ie = ({ width: e = 800, height: t = 500, color: r = "#00f0ff", speed: i = 1 }) => {
493
+ }, re = ({ 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 re = {
532
532
  i,
533
533
  e
534
534
  ]), /* @__PURE__ */ l("div", {
535
- className: re.cyberGrid,
535
+ className: ne.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: re.canvas,
542
+ className: ne.canvas,
543
543
  style: {
544
544
  width: e,
545
545
  height: t
546
546
  }
547
547
  })
548
548
  });
549
- }, M = {
549
+ }, N = {
550
550
  countdown: "cos-countdown-5ZKKP",
551
551
  unit: "cos-unit-dth8N",
552
552
  value: "cos-value-yVzcP",
@@ -554,7 +554,7 @@ var re = {
554
554
  ended: "cos-ended-c0dsD",
555
555
  pulse: "cos-pulse-krQd-",
556
556
  invalid: "cos-invalid-d6t-L"
557
- }, ae = (e) => e instanceof Date ? e.getTime() : typeof e == "number" ? e : new Date(e).getTime(), oe = (e) => {
557
+ }, ie = (e) => e instanceof Date ? e.getTime() : typeof e == "number" ? e : new Date(e).getTime(), ae = (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 re = {
563
563
  minutes: Math.floor(n % 3600 / 60),
564
564
  seconds: n % 60
565
565
  };
566
- }, se = [
566
+ }, oe = [
567
567
  {
568
568
  key: "days",
569
569
  label: "天"
@@ -580,8 +580,8 @@ var re = {
580
580
  key: "seconds",
581
581
  label: "秒"
582
582
  }
583
- ], ce = ({ targetDate: e, onEnd: t, showLabels: r = !0, color: i = "#f472b6" }) => {
584
- let c = a(() => ae(e), [e]), d = !Number.isNaN(c), [, f] = s(0), p = o(!1), m = o(t), h = d ? oe(c) : {
583
+ ], se = ({ targetDate: e, onEnd: t, showLabels: r = !0, color: i = "#f472b6" }) => {
584
+ let c = a(() => ie(e), [e]), d = !Number.isNaN(c), [, f] = s(0), p = o(!1), m = o(t), h = d ? ae(c) : {
585
585
  days: 0,
586
586
  hours: 0,
587
587
  minutes: 0,
@@ -601,32 +601,32 @@ var re = {
601
601
  }, 1e3);
602
602
  return () => clearInterval(e);
603
603
  }, [d, c]), d ? /* @__PURE__ */ u("div", {
604
- className: M.countdown,
604
+ className: N.countdown,
605
605
  style: { "--countdown-color": i },
606
- children: [se.map(({ key: e, label: t }) => /* @__PURE__ */ u("div", {
607
- className: M.unit,
606
+ children: [oe.map(({ key: e, label: t }) => /* @__PURE__ */ u("div", {
607
+ className: N.unit,
608
608
  children: [/* @__PURE__ */ l("div", {
609
- className: M.value,
609
+ className: N.value,
610
610
  children: String(h[e]).padStart(2, "0")
611
611
  }), r && /* @__PURE__ */ l("span", {
612
- className: M.label,
612
+ className: N.label,
613
613
  children: t
614
614
  })]
615
615
  }, e)), h.total <= 0 && /* @__PURE__ */ l("p", {
616
- className: M.ended,
616
+ className: N.ended,
617
617
  children: "时间到!"
618
618
  })]
619
619
  }) : /* @__PURE__ */ l("div", {
620
- className: M.countdown,
620
+ className: N.countdown,
621
621
  children: /* @__PURE__ */ l("p", {
622
- className: M.invalid,
622
+ className: N.invalid,
623
623
  children: "无效的目标时间"
624
624
  })
625
625
  });
626
- }, le = {
626
+ }, ce = {
627
627
  dnaHelix: "cos-dnaHelix-nEQLW",
628
628
  canvas: "cos-canvas-uEV8B"
629
- }, ue = ({ width: e = 200, height: t = 360, speed: r = 1, color: i = "#38bdf8" }) => {
629
+ }, le = ({ 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 re = {
656
656
  r,
657
657
  e
658
658
  ]), /* @__PURE__ */ l("div", {
659
- className: le.dnaHelix,
659
+ className: ce.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: le.canvas,
666
+ className: ce.canvas,
667
667
  style: {
668
668
  width: e,
669
669
  height: t
670
670
  }
671
671
  })
672
672
  });
673
- }, de = {
673
+ }, ue = {
674
674
  electricArc: "cos-electricArc-BFlY3",
675
675
  canvas: "cos-canvas-iowDx"
676
- }, fe = (e, t, n, r, i, a) => {
676
+ }, de = (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 = fe(e, t, o + f, s + p, i * .6, a - 1), h = fe(o + f, s + p, n, r, i * .6, a - 1);
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 = de(e, t, o + f, s + p, i * .6, a - 1), h = de(o + f, s + p, n, r, i * .6, a - 1);
679
679
  return [...m.slice(0, -1), ...h];
680
- }, pe = ({ width: e = 320, height: t = 160, color: r = "#67e8f9" }) => {
680
+ }, fe = ({ 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 re = {
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 = fe(40, s, c, l, 40, 5);
695
+ let n = de(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 re = {
705
705
  t,
706
706
  e
707
707
  ]), /* @__PURE__ */ l("div", {
708
- className: de.electricArc,
708
+ className: ue.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: de.canvas,
715
+ className: ue.canvas,
716
716
  style: {
717
717
  width: e,
718
718
  height: t
719
719
  }
720
720
  })
721
721
  });
722
- }, me = {
722
+ }, pe = {
723
723
  cursorTrail: "cos-cursorTrail-fpz5p",
724
724
  canvas: "cos-canvas-Iuyp3",
725
725
  hint: "cos-hint-9GLHx"
726
- }, he = ({ color: e = "#38bdf8", length: t = 20, width: r = 800, height: i = 400 }) => {
726
+ }, me = ({ 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 re = {
762
762
  t,
763
763
  r
764
764
  ]), /* @__PURE__ */ u("div", {
765
- className: me.cursorTrail,
765
+ className: pe.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: me.canvas,
772
+ className: pe.canvas,
773
773
  style: {
774
774
  width: r,
775
775
  height: i
@@ -782,11 +782,11 @@ var re = {
782
782
  };
783
783
  }
784
784
  }), /* @__PURE__ */ l("p", {
785
- className: me.hint,
785
+ className: pe.hint,
786
786
  children: "移动鼠标查看粒子轨迹"
787
787
  })]
788
788
  });
789
- }, N = {
789
+ }, P = {
790
790
  diceRoll: "cos-diceRoll-GDwjV",
791
791
  scene: "cos-scene-tmnKM",
792
792
  cube: "cos-cube-RklEa",
@@ -801,7 +801,7 @@ var re = {
801
801
  face6: "cos-face6-Yp-MX",
802
802
  rollBtn: "cos-rollBtn-nXMWJ",
803
803
  result: "cos-result-kXzu9"
804
- }, ge = {
804
+ }, he = {
805
805
  1: {
806
806
  x: 0,
807
807
  y: 0
@@ -826,7 +826,7 @@ var re = {
826
826
  x: 90,
827
827
  y: 0
828
828
  }
829
- }, _e = ({ onRoll: e, sides: t = 6 }) => {
829
+ }, ge = ({ 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 re = {
838
838
  let h = () => {
839
839
  if (r) return;
840
840
  i(!0);
841
- let e = Math.floor(Math.random() * t) + 1, n = ge[e] ?? ge[1], a = 360 * (3 + Math.floor(Math.random() * 3)), o = 360 * (3 + Math.floor(Math.random() * 3));
841
+ let e = Math.floor(Math.random() * t) + 1, n = he[e] ?? he[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 re = {
876
876
  [75, 75]
877
877
  ]
878
878
  }[e] ?? []).map(([e, t], n) => /* @__PURE__ */ l("span", {
879
- className: N.dot,
879
+ className: P.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: N.diceRoll,
886
+ className: P.diceRoll,
887
887
  children: [
888
888
  /* @__PURE__ */ l("div", {
889
- className: N.scene,
889
+ className: P.scene,
890
890
  children: /* @__PURE__ */ l("div", {
891
- className: `${N.cube} ${r ? N.rolling : ""}`,
891
+ className: `${P.cube} ${r ? P.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 re = {
898
898
  5,
899
899
  6
900
900
  ].map((e) => /* @__PURE__ */ l("div", {
901
- className: `${N.face} ${N[`face${e}`]}`,
901
+ className: `${P.face} ${P[`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: N.rollBtn,
908
+ className: P.rollBtn,
909
909
  onClick: h,
910
910
  disabled: r,
911
911
  children: r ? "掷骰中..." : "掷骰子"
912
912
  }),
913
913
  !r && /* @__PURE__ */ u("p", {
914
- className: N.result,
914
+ className: P.result,
915
915
  children: ["点数: ", a]
916
916
  })
917
917
  ]
918
918
  });
919
- }, ve = {
919
+ }, _e = {
920
920
  doublePendulum: "cos-doublePendulum-FUEeK",
921
921
  canvas: "cos-canvas-OVkhW"
922
- }, ye = ({ width: e = 400, height: t = 400, trailLength: r = 120, color: i = "#38bdf8", color2: a = "#a78bfa" }) => {
922
+ }, ve = ({ 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 re = {
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), ee = p * (3 - 1 * Math.cos(2 * o - 2 * s)), te = (-9.8 * 3 * S - 1 * h * Math.sin(o - 2 * s) - 2 * C * 1 * (b * b * m + v * v * p * w)) / ee, E = 2 * C * (v * v * p * 2 + h * 2 * T + b * b * m * 1 * w) / (m * (3 - 1 * Math.cos(2 * o - 2 * s)));
942
- n.omega1 += te * g, n.omega2 += E * g, n.theta1 += n.omega1 * g, n.theta2 += n.omega2 * g;
943
- let D = d + p * Math.sin(n.theta1), O = f + p * Math.cos(n.theta1), k = D + m * Math.sin(n.theta2), A = O + m * Math.cos(n.theta2), j = u.current;
944
- j.push({
945
- x: k,
946
- y: A
947
- }), j.length > r && j.shift(), l.fillStyle = "rgba(15, 23, 42, 0.22)", l.fillRect(0, 0, e, t), j.length > 1 && (l.beginPath(), j.forEach((e, t) => t === 0 ? l.moveTo(e.x, e.y) : l.lineTo(e.x, e.y)), l.strokeStyle = a, l.lineWidth = 1.5, l.globalAlpha = .7, l.stroke(), l.globalAlpha = 1), l.beginPath(), l.moveTo(d, f), l.lineTo(D, O), l.lineTo(k, A), l.strokeStyle = "#64748b", l.lineWidth = 2, l.stroke(), l.beginPath(), l.arc(d, f, 5, 0, Math.PI * 2), l.fillStyle = "#94a3b8", l.fill(), l.beginPath(), l.arc(D, O, 10, 0, Math.PI * 2), l.fillStyle = i, l.shadowColor = i, l.shadowBlur = 10, l.fill(), l.shadowBlur = 0, l.beginPath(), l.arc(k, A, 10, 0, Math.PI * 2), l.fillStyle = a, l.shadowColor = a, l.shadowBlur = 10, l.fill(), l.shadowBlur = 0;
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)), ee = (-9.8 * 3 * S - 1 * h * Math.sin(o - 2 * s) - 2 * C * 1 * (b * b * m + v * v * p * w)) / E, D = 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 += ee * g, n.omega2 += D * g, n.theta1 += n.omega1 * g, n.theta2 += n.omega2 * g;
943
+ let O = d + p * Math.sin(n.theta1), k = f + p * Math.cos(n.theta1), A = O + m * Math.sin(n.theta2), j = k + m * Math.cos(n.theta2), M = u.current;
944
+ M.push({
945
+ x: A,
946
+ y: j
947
+ }), M.length > r && M.shift(), l.fillStyle = "rgba(15, 23, 42, 0.22)", l.fillRect(0, 0, e, t), M.length > 1 && (l.beginPath(), M.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(O, k), l.lineTo(A, j), 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(O, k, 10, 0, Math.PI * 2), l.fillStyle = i, l.shadowColor = i, l.shadowBlur = 10, l.fill(), l.shadowBlur = 0, l.beginPath(), l.arc(A, j, 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 re = {
956
956
  r,
957
957
  e
958
958
  ]), /* @__PURE__ */ l("div", {
959
- className: ve.doublePendulum,
959
+ className: _e.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: ve.canvas,
966
+ className: _e.canvas,
967
967
  style: {
968
968
  width: e,
969
969
  height: t
970
970
  }
971
971
  })
972
972
  });
973
- }, be = {
973
+ }, F = {
974
974
  fireworks: "cos-fireworks-fsSqL",
975
975
  canvas: "cos-canvas-spL8G",
976
976
  hint: "cos-hint-5XDRH"
977
- }, xe = [
977
+ }, ye = [
978
978
  "#ff6b6b",
979
979
  "#ffd93d",
980
980
  "#6bcb77",
981
981
  "#4d96ff",
982
982
  "#a66cff",
983
983
  "#ff85c0"
984
- ], Se = .12, Ce = 240, we = () => xe[Math.floor(Math.random() * xe.length)], Te = (e, t, n) => {
984
+ ], be = .12, xe = 240, Se = () => ye[Math.floor(Math.random() * ye.length)], Ce = (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 re = {
991
991
  vx: Math.cos(r) * i,
992
992
  vy: Math.sin(r) * i,
993
993
  alpha: 1,
994
- color: Math.random() > .3 ? n : we(),
994
+ color: Math.random() > .3 ? n : Se(),
995
995
  decay: Math.random() * .015 + .01
996
996
  };
997
997
  });
998
- }, Ee = e(({ width: e = 800, height: r = 500, auto: a = !0 }, s) => {
998
+ }, we = 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 re = {
1003
1003
  y: r,
1004
1004
  vy: -(Math.random() * 4 + 6),
1005
1005
  targetY: Math.random() * r * .35 + r * .15,
1006
- color: we(),
1006
+ color: Se(),
1007
1007
  exploded: !1,
1008
1008
  particles: [],
1009
1009
  age: 0
@@ -1022,9 +1022,9 @@ var re = {
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 += Se, i.beginPath(), i.arc(e.x, e.y, 2.5, 0, Math.PI * 2), i.fillStyle = e.color, i.fill();
1026
- let t = e.vy >= 0, n = e.y <= e.targetY, r = e.y < 0, a = e.age >= Ce;
1027
- return (t || n || r || a) && (e.exploded = !0, e.particles = Te(e.x, e.y, e.color)), !0;
1025
+ e.age += 1, e.y += e.vy, e.vy += be, 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 >= xe;
1027
+ return (t || n || r || a) && (e.exploded = !0, e.particles = Ce(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 re = {
1038
1038
  p,
1039
1039
  e
1040
1040
  ]), /* @__PURE__ */ u("div", {
1041
- className: be.fireworks,
1041
+ className: F.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: be.canvas,
1048
+ className: F.canvas,
1049
1049
  style: {
1050
1050
  width: e,
1051
1051
  height: r
@@ -1055,13 +1055,13 @@ var re = {
1055
1055
  p(e.clientX - t.left);
1056
1056
  }
1057
1057
  }), /* @__PURE__ */ l("p", {
1058
- className: be.hint,
1058
+ className: F.hint,
1059
1059
  children: "点击画布燃放烟花"
1060
1060
  })]
1061
1061
  });
1062
1062
  });
1063
- Ee.displayName = "Fireworks";
1064
- var P = {
1063
+ we.displayName = "Fireworks";
1064
+ var I = {
1065
1065
  flipCounter: "cos-flipCounter-3LuI0",
1066
1066
  digit: "cos-digit-yJRPy",
1067
1067
  digitCard: "cos-digitCard-zZUzt",
@@ -1073,7 +1073,7 @@ var P = {
1073
1073
  isFlipping: "cos-isFlipping-EVEdI",
1074
1074
  "fold-top": "cos-fold-top-v-6XJ",
1075
1075
  "unfold-bottom": "cos-unfold-bottom-e2gzU"
1076
- }, De = (e, t) => Math.max(0, Math.floor(e)).toString().padStart(t, "0").slice(-t), Oe = ({ digit: e, color: t, duration: r }) => {
1076
+ }, Te = (e, t) => Math.max(0, Math.floor(e)).toString().padStart(t, "0").slice(-t), Ee = ({ 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 P = {
1083
1083
  }, [e, r]);
1084
1084
  let m = a ? f : e;
1085
1085
  return /* @__PURE__ */ l("div", {
1086
- className: P.digit,
1086
+ className: I.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: `${P.digitCard} ${a ? P.isFlipping : ""}`,
1092
+ className: `${I.digitCard} ${a ? I.isFlipping : ""}`,
1093
1093
  children: [
1094
1094
  /* @__PURE__ */ l("div", {
1095
- className: P.staticTop,
1095
+ className: I.staticTop,
1096
1096
  children: /* @__PURE__ */ l("span", { children: m })
1097
1097
  }),
1098
1098
  /* @__PURE__ */ l("div", {
1099
- className: P.staticBottom,
1099
+ className: I.staticBottom,
1100
1100
  children: /* @__PURE__ */ l("span", { children: m })
1101
1101
  }),
1102
1102
  a && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("div", {
1103
- className: `${P.flap} ${P.flapTop}`,
1103
+ className: `${I.flap} ${I.flapTop}`,
1104
1104
  children: /* @__PURE__ */ l("span", { children: f })
1105
1105
  }), /* @__PURE__ */ l("div", {
1106
- className: `${P.flap} ${P.flapBottom}`,
1106
+ className: `${I.flap} ${I.flapBottom}`,
1107
1107
  children: /* @__PURE__ */ l("span", { children: e })
1108
1108
  })] })
1109
1109
  ]
1110
1110
  })
1111
1111
  });
1112
- }, ke = ({ value: e, digits: t = 4, color: n = "#38bdf8", duration: r = 600 }) => {
1113
- let i = De(e, t).split("");
1112
+ }, De = ({ value: e, digits: t = 4, color: n = "#38bdf8", duration: r = 600 }) => {
1113
+ let i = Te(e, t).split("");
1114
1114
  return /* @__PURE__ */ l("div", {
1115
- className: P.flipCounter,
1116
- children: i.map((e, t) => /* @__PURE__ */ l(Oe, {
1115
+ className: I.flipCounter,
1116
+ children: i.map((e, t) => /* @__PURE__ */ l(Ee, {
1117
1117
  digit: e,
1118
1118
  color: n,
1119
1119
  duration: r
1120
1120
  }, t))
1121
1121
  });
1122
- }, Ae = {
1122
+ }, Oe = {
1123
1123
  gradientFlow: "cos-gradientFlow-XhN16",
1124
1124
  text: "cos-text-ORuqk",
1125
1125
  flow: "cos-flow-9FzMA"
1126
- }, je = [
1126
+ }, ke = [
1127
1127
  "#ff00de",
1128
1128
  "#7c3aed",
1129
1129
  "#00f0ff",
1130
1130
  "#38bdf8",
1131
1131
  "#ff00de"
1132
- ], Me = ({ text: e = "GRADIENT", colors: t = je, fontSize: n = 64 }) => {
1133
- let r = t.length >= 2 ? t.join(", ") : je.join(", ");
1132
+ ], Ae = ({ text: e = "GRADIENT", colors: t = ke, fontSize: n = 64 }) => {
1133
+ let r = t.length >= 2 ? t.join(", ") : ke.join(", ");
1134
1134
  return /* @__PURE__ */ l("div", {
1135
- className: Ae.gradientFlow,
1135
+ className: Oe.gradientFlow,
1136
1136
  children: /* @__PURE__ */ l("h1", {
1137
- className: Ae.text,
1137
+ className: Oe.text,
1138
1138
  style: {
1139
1139
  fontSize: n,
1140
1140
  backgroundImage: `linear-gradient(90deg, ${r})`
@@ -1142,15 +1142,15 @@ var P = {
1142
1142
  children: e
1143
1143
  })
1144
1144
  });
1145
- }, Ne = {
1145
+ }, je = {
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
- }, Pe = ({ text: e = "GLITCH", color: t = "#f8fafc", glitchColor1: n = "#ff00de", glitchColor2: r = "#00f0ff", fontSize: i = 64 }) => /* @__PURE__ */ l("div", {
1151
- className: Ne.glitchText,
1150
+ }, Me = ({ text: e = "GLITCH", color: t = "#f8fafc", glitchColor1: n = "#ff00de", glitchColor2: r = "#00f0ff", fontSize: i = 64 }) => /* @__PURE__ */ l("div", {
1151
+ className: je.glitchText,
1152
1152
  children: /* @__PURE__ */ l("h1", {
1153
- className: Ne.text,
1153
+ className: je.text,
1154
1154
  "data-text": e,
1155
1155
  style: {
1156
1156
  fontSize: i,
@@ -1160,16 +1160,16 @@ var P = {
1160
1160
  },
1161
1161
  children: e
1162
1162
  })
1163
- }), Fe = {
1163
+ }), Ne = {
1164
1164
  gravityBalls: "cos-gravityBalls-LdwFo",
1165
1165
  canvas: "cos-canvas-n7esd"
1166
- }, Ie = [
1166
+ }, Pe = [
1167
1167
  "#38bdf8",
1168
1168
  "#a78bfa",
1169
1169
  "#f472b6",
1170
1170
  "#4ade80",
1171
1171
  "#fbbf24"
1172
- ], Le = ({ width: e = 400, height: t = 300, ballCount: r = 12 }) => {
1172
+ ], Fe = ({ 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 P = {
1178
1178
  vx: (Math.random() - .5) * 4,
1179
1179
  vy: Math.random() * 2,
1180
1180
  r: Math.random() * 10 + 8,
1181
- color: Ie[Math.floor(Math.random() * Ie.length)]
1181
+ color: Pe[Math.floor(Math.random() * Pe.length)]
1182
1182
  }));
1183
1183
  }, [
1184
1184
  r,
@@ -1218,34 +1218,34 @@ var P = {
1218
1218
  cancelAnimationFrame(s), l();
1219
1219
  };
1220
1220
  }, [t, e]), /* @__PURE__ */ l("div", {
1221
- className: Fe.gravityBalls,
1221
+ className: Ne.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: Fe.canvas,
1228
+ className: Ne.canvas,
1229
1229
  style: {
1230
1230
  width: e,
1231
1231
  height: t
1232
1232
  }
1233
1233
  })
1234
1234
  });
1235
- }, F = {
1235
+ }, L = {
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
- }, Re = ({ title: e = "全息卡片", subtitle: t = "移动鼠标体验 3D 效果", image: n }) => {
1242
+ }, Ie = ({ title: e = "全息卡片", subtitle: t = "移动鼠标体验 3D 效果", image: n }) => {
1243
1243
  let r = o(null);
1244
1244
  return /* @__PURE__ */ l("div", {
1245
- className: F.wrap,
1245
+ className: L.wrap,
1246
1246
  children: /* @__PURE__ */ u("div", {
1247
1247
  ref: r,
1248
- className: F.card,
1248
+ className: L.card,
1249
1249
  onMouseMove: (e) => {
1250
1250
  let t = r.current;
1251
1251
  if (!t) return;
@@ -1257,23 +1257,23 @@ var P = {
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: F.shine }),
1260
+ /* @__PURE__ */ l("div", { className: L.shine }),
1261
1261
  n ? /* @__PURE__ */ l("img", {
1262
1262
  src: n,
1263
1263
  alt: e,
1264
- className: F.image
1264
+ className: L.image
1265
1265
  }) : /* @__PURE__ */ l("div", {
1266
- className: F.placeholder,
1266
+ className: L.placeholder,
1267
1267
  children: /* @__PURE__ */ l("span", { children: "✦" })
1268
1268
  }),
1269
1269
  /* @__PURE__ */ u("div", {
1270
- className: F.info,
1270
+ className: L.info,
1271
1271
  children: [/* @__PURE__ */ l("h3", { children: e }), /* @__PURE__ */ l("p", { children: t })]
1272
1272
  })
1273
1273
  ]
1274
1274
  })
1275
1275
  });
1276
- }, I = {
1276
+ }, R = {
1277
1277
  liquidProgress: "cos-liquidProgress-ABZZA",
1278
1278
  svg: "cos-svg-YdTvy",
1279
1279
  track: "cos-track-IhMjO",
@@ -1281,7 +1281,7 @@ var P = {
1281
1281
  fillBg: "cos-fillBg-pwLI1",
1282
1282
  wave: "cos-wave-CBwgG",
1283
1283
  label: "cos-label-WYDqS"
1284
- }, ze = ({ value: e = 0, max: t = 100, size: i = 160, color: a = "#38bdf8" }) => {
1284
+ }, Le = ({ 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 P = {
1301
1301
  cancelAnimationFrame(e), r();
1302
1302
  };
1303
1303
  }, [f]), /* @__PURE__ */ u("div", {
1304
- className: I.liquidProgress,
1304
+ className: R.liquidProgress,
1305
1305
  style: {
1306
1306
  width: i,
1307
1307
  height: i,
@@ -1309,7 +1309,7 @@ var P = {
1309
1309
  },
1310
1310
  children: [/* @__PURE__ */ u("svg", {
1311
1311
  viewBox: "0 0 100 100",
1312
- className: I.svg,
1312
+ className: R.svg,
1313
1313
  children: [
1314
1314
  /* @__PURE__ */ l("defs", { children: /* @__PURE__ */ l("clipPath", {
1315
1315
  id: `clip-${c}`,
@@ -1323,7 +1323,7 @@ var P = {
1323
1323
  cx: "50",
1324
1324
  cy: "50",
1325
1325
  r: 45,
1326
- className: I.track,
1326
+ className: R.track,
1327
1327
  strokeWidth: 10,
1328
1328
  fill: "none"
1329
1329
  }),
@@ -1334,10 +1334,10 @@ var P = {
1334
1334
  y: "0",
1335
1335
  width: "100",
1336
1336
  height: "100",
1337
- className: I.fillBg
1337
+ className: R.fillBg
1338
1338
  }), /* @__PURE__ */ l("path", {
1339
1339
  ref: s,
1340
- className: I.wave,
1340
+ className: R.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 P = {
1345
1345
  cx: "50",
1346
1346
  cy: "50",
1347
1347
  r: 45,
1348
- className: I.ring,
1348
+ className: R.ring,
1349
1349
  strokeWidth: 10,
1350
1350
  fill: "none"
1351
1351
  })
1352
1352
  ]
1353
1353
  }), /* @__PURE__ */ u("span", {
1354
- className: I.label,
1354
+ className: R.label,
1355
1355
  children: [Math.round(d), "%"]
1356
1356
  })]
1357
1357
  });
1358
- }, Be = {
1358
+ }, Re = {
1359
1359
  lorenzAttractor: "cos-lorenzAttractor--UAI7",
1360
1360
  canvas: "cos-canvas-oeXce"
1361
- }, Ve = ({ width: e = 400, height: t = 360, speed: r = 1, color: i = "#f472b6", pointCount: a = 2e3 }) => {
1361
+ }, ze = ({ 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 P = {
1408
1408
  r,
1409
1409
  e
1410
1410
  ]), /* @__PURE__ */ l("div", {
1411
- className: Be.lorenzAttractor,
1411
+ className: Re.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: Be.canvas,
1418
+ className: Re.canvas,
1419
1419
  style: {
1420
1420
  width: e,
1421
1421
  height: t
1422
1422
  }
1423
1423
  })
1424
1424
  });
1425
- }, L = {
1425
+ }, Be = {
1426
1426
  liquidGlass: "cos-liquidGlass-Z3bQg",
1427
1427
  panel: "cos-panel-XYboD",
1428
1428
  content: "cos-content-MHfkS"
1429
- }, He = ({ children: e = "液态玻璃面板", blur: t = 16, borderRadius: n = 20 }) => /* @__PURE__ */ l("div", {
1430
- className: L.liquidGlass,
1429
+ }, Ve = ({ children: e = "液态玻璃面板", blur: t = 16, borderRadius: n = 20 }) => /* @__PURE__ */ l("div", {
1430
+ className: Be.liquidGlass,
1431
1431
  children: /* @__PURE__ */ l("div", {
1432
- className: L.panel,
1432
+ className: Be.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: L.content,
1438
+ className: Be.content,
1439
1439
  children: e
1440
1440
  })
1441
1441
  })
1442
- }), Ue = {
1442
+ }), He = {
1443
1443
  magneticButton: "cos-magneticButton-GbRkE",
1444
1444
  btn: "cos-btn--b2BJ"
1445
- }, We = ({ children: e = "磁吸按钮", strength: t = .4, color: n = "#6366f1" }) => {
1445
+ }, Ue = ({ 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: Ue.magneticButton,
1449
+ className: He.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 P = {
1460
1460
  children: /* @__PURE__ */ l("button", {
1461
1461
  ref: i,
1462
1462
  type: "button",
1463
- className: Ue.btn,
1463
+ className: He.btn,
1464
1464
  style: { "--btn-color": n },
1465
1465
  children: e
1466
1466
  })
1467
1467
  });
1468
- }, R = {
1468
+ }, z = {
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
- }, Ge = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*アイウエオカキクケコ", Ke = ({ width: e = 800, height: t = 500, density: r = .6, color: i = "#00ff41", showOverlay: a = !0, title: s = "MATRIX", subtitle: c = "数字雨效果" }) => {
1475
+ }, We = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*アイウエオカキクケコ", Ge = ({ 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 P = {
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 = Ge[Math.floor(Math.random() * 53)], s = n / r * 16;
1489
+ let a = We[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 P = {
1499
1499
  t,
1500
1500
  e
1501
1501
  ]), /* @__PURE__ */ u("div", {
1502
- className: R.matrixRain,
1502
+ className: z.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: R.canvas,
1509
+ className: z.canvas,
1510
1510
  style: {
1511
1511
  width: e,
1512
1512
  height: t
1513
1513
  }
1514
1514
  }), a && /* @__PURE__ */ u("div", {
1515
- className: R.overlay,
1515
+ className: z.overlay,
1516
1516
  children: [/* @__PURE__ */ l("h2", {
1517
- className: R.title,
1517
+ className: z.title,
1518
1518
  children: s
1519
1519
  }), /* @__PURE__ */ l("p", {
1520
- className: R.subtitle,
1520
+ className: z.subtitle,
1521
1521
  children: c
1522
1522
  })]
1523
1523
  })]
1524
1524
  });
1525
- }, qe = {
1525
+ }, Ke = {
1526
1526
  metaballPool: "cos-metaballPool-JJaI9",
1527
1527
  canvas: "cos-canvas-S7fDD"
1528
- }, Je = ({ width: e = 400, height: t = 300, ballCount: r = 5, color: i = "#38bdf8" }) => {
1528
+ }, qe = ({ 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 P = {
1615
1615
  t,
1616
1616
  e
1617
1617
  ]), /* @__PURE__ */ l("div", {
1618
- className: qe.metaballPool,
1618
+ className: Ke.metaballPool,
1619
1619
  style: {
1620
1620
  width: e,
1621
1621
  height: t,
@@ -1623,17 +1623,17 @@ var P = {
1623
1623
  },
1624
1624
  children: /* @__PURE__ */ l("canvas", {
1625
1625
  ref: a,
1626
- className: qe.canvas,
1626
+ className: Ke.canvas,
1627
1627
  style: {
1628
1628
  width: e,
1629
1629
  height: t
1630
1630
  }
1631
1631
  })
1632
1632
  });
1633
- }, Ye = {
1633
+ }, Je = {
1634
1634
  mazeGenerator: "cos-mazeGenerator-QEa0s",
1635
1635
  canvas: "cos-canvas-emhxb"
1636
- }, Xe = ({ width: e = 400, height: t = 300, cellSize: r = 20, onGenerated: i }) => {
1636
+ }, Ye = ({ 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 P = {
1720
1720
  t,
1721
1721
  e
1722
1722
  ]), /* @__PURE__ */ l("div", {
1723
- className: Ye.mazeGenerator,
1723
+ className: Je.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: Ye.canvas,
1730
+ className: Je.canvas,
1731
1731
  style: {
1732
1732
  width: e,
1733
1733
  height: t
1734
1734
  }
1735
1735
  })
1736
1736
  });
1737
- }, Ze = {
1737
+ }, Xe = {
1738
1738
  meteorRain: "cos-meteorRain-v8RNI",
1739
1739
  canvas: "cos-canvas-hyFMr"
1740
- }, Qe = ({ width: e = 800, height: t = 500, meteorCount: r = 8 }) => {
1740
+ }, Ze = ({ 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 P = {
1772
1772
  cancelAnimationFrame(s.current), l();
1773
1773
  };
1774
1774
  }, [t, e]), /* @__PURE__ */ l("div", {
1775
- className: Ze.meteorRain,
1775
+ className: Xe.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: Ze.canvas,
1782
+ className: Xe.canvas,
1783
1783
  style: {
1784
1784
  width: e,
1785
1785
  height: t
1786
1786
  }
1787
1787
  })
1788
1788
  });
1789
- }, z = {
1789
+ }, B = {
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
- }, $e = ({ text: e = "NEON", color: t = "#ff00de", fontSize: n = 72, flicker: r = !0 }) => /* @__PURE__ */ u("div", {
1796
- className: z.neonText,
1795
+ }, Qe = ({ text: e = "NEON", color: t = "#ff00de", fontSize: n = 72, flicker: r = !0 }) => /* @__PURE__ */ u("div", {
1796
+ className: B.neonText,
1797
1797
  children: [/* @__PURE__ */ l("h1", {
1798
- className: `${z.text} ${r ? z.flicker : ""}`,
1798
+ className: `${B.text} ${r ? B.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: z.reflection,
1805
+ className: B.reflection,
1806
1806
  style: {
1807
1807
  fontSize: n * .35,
1808
1808
  color: t
1809
1809
  },
1810
1810
  children: e
1811
1811
  })]
1812
- }), et = {
1812
+ }), $e = {
1813
1813
  newtonCradle: "cos-newtonCradle-mFl-b",
1814
1814
  canvas: "cos-canvas-TWKl5"
1815
- }, tt = ({ ballCount: e = 5, color: t = "#38bdf8", width: r = 280, height: i = 200 }) => {
1815
+ }, et = ({ 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 P = {
1875
1875
  i,
1876
1876
  r
1877
1877
  ]), /* @__PURE__ */ l("div", {
1878
- className: et.newtonCradle,
1878
+ className: $e.newtonCradle,
1879
1879
  style: {
1880
1880
  width: r,
1881
1881
  height: i,
@@ -1883,19 +1883,19 @@ var P = {
1883
1883
  },
1884
1884
  children: /* @__PURE__ */ l("canvas", {
1885
1885
  ref: a,
1886
- className: et.canvas,
1886
+ className: $e.canvas,
1887
1887
  style: {
1888
1888
  width: r,
1889
1889
  height: i
1890
1890
  }
1891
1891
  })
1892
1892
  });
1893
- }, B = {
1893
+ }, V = {
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
- }, nt = [
1898
+ }, tt = [
1899
1899
  {
1900
1900
  label: "A",
1901
1901
  value: 30,
@@ -1916,7 +1916,7 @@ var P = {
1916
1916
  value: 25,
1917
1917
  color: "#4ade80"
1918
1918
  }
1919
- ], rt = ({ data: e = nt, size: t = 240 }) => {
1919
+ ], nt = ({ data: e = tt, size: t = 240 }) => {
1920
1920
  let r = o(null);
1921
1921
  return n(() => {
1922
1922
  let n = r.current;
@@ -1945,23 +1945,23 @@ var P = {
1945
1945
  cancelAnimationFrame(u), p();
1946
1946
  };
1947
1947
  }, [e, t]), /* @__PURE__ */ u("div", {
1948
- className: B.orbitalChart,
1948
+ className: V.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: B.canvas,
1955
+ className: V.canvas,
1956
1956
  style: {
1957
1957
  width: t,
1958
1958
  height: t
1959
1959
  }
1960
1960
  }), /* @__PURE__ */ l("ul", {
1961
- className: B.legend,
1961
+ className: V.legend,
1962
1962
  children: e.map((e) => /* @__PURE__ */ u("li", { children: [
1963
1963
  /* @__PURE__ */ l("span", {
1964
- className: B.swatch,
1964
+ className: V.swatch,
1965
1965
  style: { background: e.color }
1966
1966
  }),
1967
1967
  e.label,
@@ -1971,7 +1971,7 @@ var P = {
1971
1971
  ] }, e.label))
1972
1972
  })]
1973
1973
  });
1974
- }, V = {
1974
+ }, rt = {
1975
1975
  particleNetwork: "cos-particleNetwork-GSZq-",
1976
1976
  canvas: "cos-canvas-E-BGP",
1977
1977
  hint: "cos-hint-LEO5o"
@@ -2058,14 +2058,14 @@ var P = {
2058
2058
  };
2059
2059
  };
2060
2060
  return /* @__PURE__ */ u("div", {
2061
- className: V.particleNetwork,
2061
+ className: rt.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: V.canvas,
2068
+ className: rt.canvas,
2069
2069
  style: {
2070
2070
  width: e,
2071
2071
  height: r
@@ -2075,7 +2075,7 @@ var P = {
2075
2075
  onTouchMove: _,
2076
2076
  onTouchEnd: y
2077
2077
  }), /* @__PURE__ */ l("p", {
2078
- className: V.hint,
2078
+ className: rt.hint,
2079
2079
  children: "移动鼠标或手指与粒子互动"
2080
2080
  })]
2081
2081
  });
@@ -3475,25 +3475,555 @@ var P = {
3475
3475
  ]
3476
3476
  })
3477
3477
  }), Kt = {
3478
+ weatherBackground: "cos-weatherBackground-Mnm22",
3479
+ canvas: "cos-canvas-nvqMt"
3480
+ }, qt = {
3481
+ sunny: {
3482
+ sky: ["#4a9fe0", "#c8e8fb"],
3483
+ sun: "full",
3484
+ cloudCount: 1,
3485
+ cloudColor: [
3486
+ 255,
3487
+ 255,
3488
+ 255
3489
+ ],
3490
+ cloudAlpha: .5,
3491
+ cloudSpread: .12,
3492
+ rain: null,
3493
+ fogBanks: 0,
3494
+ haze: 0,
3495
+ snowCount: 0,
3496
+ lightning: !1
3497
+ },
3498
+ partlyCloudy: {
3499
+ sky: ["#5b9bd0", "#cfe6f3"],
3500
+ sun: "soft",
3501
+ cloudCount: 5,
3502
+ cloudColor: [
3503
+ 255,
3504
+ 255,
3505
+ 255
3506
+ ],
3507
+ cloudAlpha: .85,
3508
+ cloudSpread: .22,
3509
+ rain: null,
3510
+ fogBanks: 0,
3511
+ haze: 0,
3512
+ snowCount: 0,
3513
+ lightning: !1
3514
+ },
3515
+ overcast: {
3516
+ sky: ["#8a97a8", "#c3cbd6"],
3517
+ sun: "none",
3518
+ cloudCount: 9,
3519
+ cloudColor: [
3520
+ 100,
3521
+ 116,
3522
+ 139
3523
+ ],
3524
+ cloudAlpha: .55,
3525
+ cloudSpread: .3,
3526
+ rain: null,
3527
+ fogBanks: 0,
3528
+ haze: .06,
3529
+ snowCount: 0,
3530
+ lightning: !1
3531
+ },
3532
+ lightRain: {
3533
+ sky: ["#6b7a8f", "#9aa7b8"],
3534
+ sun: "none",
3535
+ cloudCount: 7,
3536
+ cloudColor: [
3537
+ 71,
3538
+ 85,
3539
+ 105
3540
+ ],
3541
+ cloudAlpha: .6,
3542
+ cloudSpread: .24,
3543
+ rain: {
3544
+ count: 70,
3545
+ speed: 7,
3546
+ wind: -.8,
3547
+ alpha: .4,
3548
+ splash: !1
3549
+ },
3550
+ fogBanks: 0,
3551
+ haze: .04,
3552
+ snowCount: 0,
3553
+ lightning: !1
3554
+ },
3555
+ moderateRain: {
3556
+ sky: ["#55637a", "#7e8ba0"],
3557
+ sun: "none",
3558
+ cloudCount: 8,
3559
+ cloudColor: [
3560
+ 51,
3561
+ 65,
3562
+ 85
3563
+ ],
3564
+ cloudAlpha: .65,
3565
+ cloudSpread: .26,
3566
+ rain: {
3567
+ count: 150,
3568
+ speed: 10,
3569
+ wind: -1.5,
3570
+ alpha: .5,
3571
+ splash: !0
3572
+ },
3573
+ fogBanks: 0,
3574
+ haze: .06,
3575
+ snowCount: 0,
3576
+ lightning: !1
3577
+ },
3578
+ heavyRain: {
3579
+ sky: ["#3d4a5f", "#5d6a80"],
3580
+ sun: "none",
3581
+ cloudCount: 9,
3582
+ cloudColor: [
3583
+ 30,
3584
+ 41,
3585
+ 59
3586
+ ],
3587
+ cloudAlpha: .7,
3588
+ cloudSpread: .3,
3589
+ rain: {
3590
+ count: 280,
3591
+ speed: 14,
3592
+ wind: -2.8,
3593
+ alpha: .55,
3594
+ splash: !0
3595
+ },
3596
+ fogBanks: 0,
3597
+ haze: .1,
3598
+ snowCount: 0,
3599
+ lightning: !1
3600
+ },
3601
+ thunderstorm: {
3602
+ sky: ["#252f42", "#43506a"],
3603
+ sun: "none",
3604
+ cloudCount: 10,
3605
+ cloudColor: [
3606
+ 15,
3607
+ 23,
3608
+ 42
3609
+ ],
3610
+ cloudAlpha: .75,
3611
+ cloudSpread: .32,
3612
+ rain: {
3613
+ count: 240,
3614
+ speed: 13,
3615
+ wind: -2.2,
3616
+ alpha: .55,
3617
+ splash: !0
3618
+ },
3619
+ fogBanks: 0,
3620
+ haze: .08,
3621
+ snowCount: 0,
3622
+ lightning: !0
3623
+ },
3624
+ fog: {
3625
+ sky: ["#aab4bf", "#d5dbe1"],
3626
+ sun: "dim",
3627
+ cloudCount: 3,
3628
+ cloudColor: [
3629
+ 203,
3630
+ 213,
3631
+ 225
3632
+ ],
3633
+ cloudAlpha: .4,
3634
+ cloudSpread: .2,
3635
+ rain: null,
3636
+ fogBanks: 10,
3637
+ haze: .28,
3638
+ snowCount: 0,
3639
+ lightning: !1
3640
+ },
3641
+ lightSnow: {
3642
+ sky: ["#aab8c8", "#e2e8ef"],
3643
+ sun: "none",
3644
+ cloudCount: 5,
3645
+ cloudColor: [
3646
+ 166,
3647
+ 180,
3648
+ 196
3649
+ ],
3650
+ cloudAlpha: .45,
3651
+ cloudSpread: .22,
3652
+ rain: null,
3653
+ fogBanks: 0,
3654
+ haze: .05,
3655
+ snowCount: 70,
3656
+ lightning: !1
3657
+ },
3658
+ moderateSnow: {
3659
+ sky: ["#9fb0c4", "#dde5ee"],
3660
+ sun: "none",
3661
+ cloudCount: 6,
3662
+ cloudColor: [
3663
+ 148,
3664
+ 163,
3665
+ 184
3666
+ ],
3667
+ cloudAlpha: .5,
3668
+ cloudSpread: .24,
3669
+ rain: null,
3670
+ fogBanks: 0,
3671
+ haze: .08,
3672
+ snowCount: 160,
3673
+ lightning: !1
3674
+ },
3675
+ heavySnow: {
3676
+ sky: ["#8495aa", "#c7d1dc"],
3677
+ sun: "none",
3678
+ cloudCount: 9,
3679
+ cloudColor: [
3680
+ 100,
3681
+ 116,
3682
+ 139
3683
+ ],
3684
+ cloudAlpha: .62,
3685
+ cloudSpread: .3,
3686
+ rain: null,
3687
+ fogBanks: 3,
3688
+ haze: .14,
3689
+ snowCount: 300,
3690
+ lightning: !1
3691
+ },
3692
+ sleet: {
3693
+ sky: ["#78899e", "#b8c5d2"],
3694
+ sun: "none",
3695
+ cloudCount: 8,
3696
+ cloudColor: [
3697
+ 71,
3698
+ 85,
3699
+ 105
3700
+ ],
3701
+ cloudAlpha: .6,
3702
+ cloudSpread: .28,
3703
+ rain: {
3704
+ count: 100,
3705
+ speed: 9,
3706
+ wind: -1.4,
3707
+ alpha: .42,
3708
+ splash: !0
3709
+ },
3710
+ fogBanks: 0,
3711
+ haze: .09,
3712
+ snowCount: 100,
3713
+ lightning: !1
3714
+ },
3715
+ hail: {
3716
+ sky: ["#46566c", "#77889d"],
3717
+ sun: "none",
3718
+ cloudCount: 9,
3719
+ cloudColor: [
3720
+ 30,
3721
+ 41,
3722
+ 59
3723
+ ],
3724
+ cloudAlpha: .68,
3725
+ cloudSpread: .3,
3726
+ rain: {
3727
+ count: 80,
3728
+ speed: 11,
3729
+ wind: -2.5,
3730
+ alpha: .38,
3731
+ splash: !0
3732
+ },
3733
+ fogBanks: 0,
3734
+ haze: .1,
3735
+ snowCount: 0,
3736
+ lightning: !1
3737
+ },
3738
+ smog: {
3739
+ sky: ["#8f8b7e", "#c5bca8"],
3740
+ sun: "dim",
3741
+ cloudCount: 3,
3742
+ cloudColor: [
3743
+ 142,
3744
+ 136,
3745
+ 119
3746
+ ],
3747
+ cloudAlpha: .35,
3748
+ cloudSpread: .2,
3749
+ rain: null,
3750
+ fogBanks: 12,
3751
+ haze: .34,
3752
+ snowCount: 0,
3753
+ lightning: !1
3754
+ },
3755
+ gale: {
3756
+ sky: ["#587087", "#a6b5c2"],
3757
+ sun: "soft",
3758
+ cloudCount: 8,
3759
+ cloudColor: [
3760
+ 203,
3761
+ 213,
3762
+ 225
3763
+ ],
3764
+ cloudAlpha: .72,
3765
+ cloudSpread: .3,
3766
+ rain: null,
3767
+ fogBanks: 0,
3768
+ haze: .04,
3769
+ snowCount: 0,
3770
+ lightning: !1
3771
+ },
3772
+ snow: {
3773
+ sky: ["#9fb0c4", "#dde5ee"],
3774
+ sun: "none",
3775
+ cloudCount: 6,
3776
+ cloudColor: [
3777
+ 148,
3778
+ 163,
3779
+ 184
3780
+ ],
3781
+ cloudAlpha: .5,
3782
+ cloudSpread: .24,
3783
+ rain: null,
3784
+ fogBanks: 0,
3785
+ haze: .08,
3786
+ snowCount: 160,
3787
+ lightning: !1
3788
+ }
3789
+ }, Jt = (e) => {
3790
+ let t = Math.ceil(e * 2 + 4), n = document.createElement("canvas");
3791
+ n.width = t, n.height = t;
3792
+ let r = n.getContext("2d"), i = r.createRadialGradient(t / 2, t / 2, 0, t / 2, t / 2, e + 1);
3793
+ 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
+ }, Yt = (e) => {
3795
+ let t = Math.ceil(e * 2 + 6), n = document.createElement("canvas");
3796
+ n.width = t, n.height = t;
3797
+ let r = n.getContext("2d");
3798
+ r.translate(t / 2, t / 2), r.strokeStyle = "rgba(255, 255, 255, 0.95)", r.lineCap = "round", r.lineWidth = Math.max(e * .11, .7), r.shadowColor = "rgba(255, 255, 255, 0.5)", r.shadowBlur = e * .25;
3799
+ let i = 1 + Math.floor(Math.random() * 3), a = Array.from({ length: i }, () => ({
3800
+ pos: .3 + Math.random() * .5,
3801
+ len: e * (.22 + Math.random() * .34),
3802
+ angle: Math.PI / 3 * (.8 + Math.random() * .45)
3803
+ })), o = Math.random() < .55, s = e * (.14 + Math.random() * .12), c = Math.random() < .45, l = e * (.14 + Math.random() * .14);
3804
+ for (let t = 0; t < 6; t++) {
3805
+ r.save(), r.rotate(t * Math.PI / 3), r.beginPath(), r.moveTo(0, 0), r.lineTo(0, -e);
3806
+ for (let t of a) {
3807
+ let n = -e * t.pos;
3808
+ r.moveTo(0, n), r.lineTo(Math.sin(t.angle) * t.len, n - Math.cos(t.angle) * t.len), r.moveTo(0, n), r.lineTo(-Math.sin(t.angle) * t.len, n - Math.cos(t.angle) * t.len);
3809
+ }
3810
+ o && (r.moveTo(0, -e), r.lineTo(s * .7, -e - s * .5), r.moveTo(0, -e), r.lineTo(-s * .7, -e - s * .5)), r.stroke(), r.restore();
3811
+ }
3812
+ if (c) {
3813
+ r.beginPath();
3814
+ for (let e = 0; e < 6; e++) {
3815
+ let t = e * Math.PI / 3 - Math.PI / 2, n = Math.cos(t) * l, i = Math.sin(t) * l;
3816
+ e === 0 ? r.moveTo(n, i) : r.lineTo(n, i);
3817
+ }
3818
+ r.closePath(), r.stroke();
3819
+ }
3820
+ return n;
3821
+ }, Xt = (e, t, n) => {
3822
+ let r = 1 + Math.random() ** 1.6 * 4.2, i = r >= 2.4;
3823
+ return {
3824
+ x: Math.random() * e,
3825
+ y: n ?? Math.random() * t,
3826
+ size: r,
3827
+ speed: .4 + r * .28 + Math.random() * .4,
3828
+ phase: Math.random() * Math.PI * 2,
3829
+ drift: (Math.random() - .5) * .4,
3830
+ rotation: Math.random() * Math.PI * 2,
3831
+ rotationSpeed: (Math.random() - .5) * .025,
3832
+ opacity: .55 + Math.random() * .45,
3833
+ sprite: i ? Yt(r * 2.4) : Jt(r)
3834
+ };
3835
+ }, Zt = (e, t, n, r, i, a) => {
3836
+ if (a <= 0) return [[e, t], [n, r]];
3837
+ let o = (e + n) / 2 + (Math.random() - .5) * i, s = (t + r) / 2, c = Zt(e, t, o, s, i * .55, a - 1), l = Zt(o, s, n, r, i * .55, a - 1);
3838
+ return [...c.slice(0, -1), ...l];
3839
+ }, Qt = ({ width: e = 800, height: t = 450, weather: r = "sunny" }) => {
3840
+ let i = o(null);
3841
+ return n(() => {
3842
+ let n = i.current;
3843
+ if (!n) return;
3844
+ let a = window.devicePixelRatio || 1;
3845
+ n.width = e * a, n.height = t * a;
3846
+ let o = n.getContext("2d");
3847
+ if (!o) return;
3848
+ o.setTransform(a, 0, 0, a, 0, 0);
3849
+ let s = qt[r], c = e * .72, l = t * .26, u = Math.min(e, t) * .09, d = Array.from({ length: s.cloudCount }, () => {
3850
+ let n = .7 + Math.random() * .9, r = 4 + Math.floor(Math.random() * 3);
3851
+ return {
3852
+ x: Math.random() * (e + 240) - 120,
3853
+ y: t * .06 + Math.random() * t * s.cloudSpread,
3854
+ scale: n,
3855
+ speed: .12 + Math.random() * .22,
3856
+ puffs: Array.from({ length: r }, (e, t) => ({
3857
+ dx: (t - r / 2) * 26 + (Math.random() - .5) * 14,
3858
+ dy: (Math.random() - .5) * 14,
3859
+ r: 22 + Math.random() * 20
3860
+ }))
3861
+ };
3862
+ }), f = s.rain ? Array.from({ length: s.rain.count }, () => ({
3863
+ x: Math.random() * (e + 160) - 80,
3864
+ y: Math.random() * t,
3865
+ len: 8 + Math.random() * 10,
3866
+ speed: s.rain.speed * (.75 + Math.random() * .5)
3867
+ })) : [], p = [], m = Array.from({ length: s.fogBanks }, (n, r) => ({
3868
+ x: Math.random() * e,
3869
+ y: r / Math.max(s.fogBanks - 1, 1) * t * .9 + t * .05,
3870
+ rw: e * (.25 + Math.random() * .3),
3871
+ rh: t * (.08 + Math.random() * .08),
3872
+ speed: (.1 + Math.random() * .25) * (r % 2 == 0 ? 1 : -1),
3873
+ alpha: .16 + Math.random() * .14
3874
+ })), h = Array.from({ length: s.snowCount }, () => Xt(e, t)), g = r === "hail" ? Array.from({ length: 130 }, () => ({
3875
+ x: Math.random() * (e + 180) - 90,
3876
+ y: Math.random() * t,
3877
+ r: 1.8 + Math.random() * 3,
3878
+ vx: -2.2 - Math.random() * 1.8,
3879
+ vy: 8 + Math.random() * 5,
3880
+ bounces: 0,
3881
+ opacity: .65 + Math.random() * .35
3882
+ })) : [], _ = r === "gale" ? Array.from({ length: 46 }, () => ({
3883
+ x: Math.random() * e,
3884
+ y: Math.random() * t,
3885
+ length: 45 + Math.random() * 130,
3886
+ speed: 8 + Math.random() * 10,
3887
+ wave: Math.random() * Math.PI * 2,
3888
+ alpha: .12 + Math.random() * .3,
3889
+ width: .6 + Math.random() * 1.2
3890
+ })) : [], y = 0, b = 0, x = 0, S = [], C = 120 + Math.random() * 240, w = 0, T = document.hidden, E = v((e) => {
3891
+ T = e;
3892
+ }), ee = () => {
3893
+ let n = o.createLinearGradient(0, 0, 0, t);
3894
+ n.addColorStop(0, s.sky[0]), n.addColorStop(1, s.sky[1]), o.fillStyle = n, o.fillRect(0, 0, e, t);
3895
+ }, D = () => {
3896
+ if (s.sun === "none") return;
3897
+ if (s.sun === "full") {
3898
+ let n = 1 + Math.sin(y * .02) * .04, r = o.createRadialGradient(c, l, 0, c, l, u * 3.4 * n);
3899
+ 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)"), o.fillStyle = r, o.fillRect(0, 0, e, t), o.save(), o.translate(c, l), o.rotate(y * .003);
3900
+ for (let e = 0; e < 12; e++) {
3901
+ o.rotate(Math.PI / 6);
3902
+ let e = o.createLinearGradient(u * 1.2, 0, u * 2.4, 0);
3903
+ e.addColorStop(0, "rgba(255, 230, 150, 0.5)"), e.addColorStop(1, "rgba(255, 230, 150, 0)"), o.strokeStyle = e, o.lineWidth = 3, o.beginPath(), o.moveTo(u * 1.2, 0), o.lineTo(u * 2.4, 0), o.stroke();
3904
+ }
3905
+ o.restore();
3906
+ }
3907
+ if (s.sun === "soft") {
3908
+ let n = o.createRadialGradient(c, l, 0, c, l, u * 2.4);
3909
+ n.addColorStop(0, "rgba(255, 240, 190, 0.7)"), n.addColorStop(1, "rgba(255, 240, 190, 0)"), o.fillStyle = n, o.fillRect(0, 0, e, t);
3910
+ }
3911
+ let n = s.sun === "dim" ? .35 : 1, r = o.createRadialGradient(c - u * .2, l - u * .2, 0, c, l, u);
3912
+ r.addColorStop(0, `rgba(255, 250, 224, ${n})`), r.addColorStop(1, `rgba(255, 214, 102, ${n})`), o.beginPath(), o.arc(c, l, u, 0, Math.PI * 2), o.fillStyle = r, o.fill();
3913
+ }, O = () => {
3914
+ let [t, n, i] = s.cloudColor;
3915
+ for (let a of d) {
3916
+ a.x += a.speed * (r === "gale" ? 7 : 1), a.x - 140 * a.scale > e && (a.x = -160 * a.scale);
3917
+ for (let e of a.puffs) {
3918
+ let r = a.x + e.dx * a.scale, c = a.y + e.dy * a.scale, l = e.r * a.scale, u = o.createRadialGradient(r, c, 0, r, c, l);
3919
+ u.addColorStop(0, `rgba(${t}, ${n}, ${i}, ${s.cloudAlpha})`), u.addColorStop(1, `rgba(${t}, ${n}, ${i}, 0)`), o.beginPath(), o.arc(r, c, l, 0, Math.PI * 2), o.fillStyle = u, o.fill();
3920
+ }
3921
+ }
3922
+ }, k = () => {
3923
+ if (!s.rain) return;
3924
+ let { wind: n, alpha: r, splash: i } = s.rain;
3925
+ o.strokeStyle = `rgba(214, 228, 240, ${r})`, o.lineWidth = 1.2, o.beginPath();
3926
+ for (let r of f) {
3927
+ let a = Math.hypot(n, r.speed) || 1, s = n / a, c = r.speed / a;
3928
+ o.moveTo(r.x, r.y), o.lineTo(r.x + s * r.len, r.y + c * r.len), r.x += n, r.y += r.speed, r.y > t && (i && Math.random() < .3 && p.length < 60 && p.push({
3929
+ x: r.x,
3930
+ r: 1,
3931
+ alpha: .5
3932
+ }), r.y = -r.len, r.x = Math.random() * (e + 160) - 80);
3933
+ }
3934
+ o.stroke();
3935
+ for (let e = p.length - 1; e >= 0; e--) {
3936
+ let n = p[e];
3937
+ if (n.r += .8, n.alpha -= .035, n.alpha <= 0) {
3938
+ p.splice(e, 1);
3939
+ continue;
3940
+ }
3941
+ o.beginPath(), o.ellipse(n.x, t - 3, n.r, n.r * .35, 0, Math.PI, Math.PI * 2), o.strokeStyle = `rgba(214, 228, 240, ${n.alpha})`, o.lineWidth = 1, o.stroke();
3942
+ }
3943
+ }, A = () => {
3944
+ let t = r === "smog" ? "168, 155, 126" : "226, 232, 238";
3945
+ for (let n of m) {
3946
+ 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 = o.createRadialGradient(n.x, n.y, 0, n.x, n.y, n.rw);
3948
+ r.addColorStop(0, `rgba(${t}, ${n.alpha})`), r.addColorStop(1, `rgba(${t}, 0)`), o.save(), o.translate(n.x, n.y), o.scale(1, n.rh / n.rw), o.translate(-n.x, -n.y), o.beginPath(), o.arc(n.x, n.y, n.rw, 0, Math.PI * 2), o.fillStyle = r, o.fill(), o.restore();
3949
+ }
3950
+ }, j = () => {
3951
+ for (let n of h) n.y += n.speed, n.x += Math.sin(y * .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), o.save(), o.globalAlpha = n.opacity, o.translate(n.x, n.y), o.rotate(n.rotation), o.drawImage(n.sprite, -n.sprite.width / 2, -n.sprite.height / 2), o.restore();
3952
+ }, M = () => {
3953
+ if (g.length !== 0) for (let n of g) {
3954
+ let r = n.x, i = n.y;
3955
+ n.vy += .16, n.x += n.vx, n.y += n.vy, o.beginPath(), o.moveTo(r, i), o.lineTo(n.x, n.y), o.strokeStyle = `rgba(225, 239, 250, ${n.opacity * .25})`, o.lineWidth = n.r * .65, o.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)), o.beginPath(), o.arc(n.x, n.y, n.r, 0, Math.PI * 2), o.fillStyle = `rgba(241, 248, 255, ${n.opacity})`, o.fill(), o.strokeStyle = `rgba(174, 207, 229, ${n.opacity * .75})`, o.lineWidth = .7, o.stroke(), o.beginPath(), o.arc(n.x - n.r * .3, n.y - n.r * .3, Math.max(.6, n.r * .24), 0, Math.PI * 2), o.fillStyle = `rgba(255, 255, 255, ${n.opacity})`, o.fill();
3956
+ }
3957
+ }, te = () => {
3958
+ if (_.length !== 0) for (let n of _) {
3959
+ 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, i = n.x + n.length;
3961
+ if (o.beginPath(), o.moveTo(n.x, n.y), o.bezierCurveTo(n.x + n.length * .3, n.y + r, n.x + n.length * .7, n.y - r, i, n.y), o.strokeStyle = `rgba(235, 244, 250, ${n.alpha})`, o.lineWidth = n.width, o.lineCap = "round", o.stroke(), n.length > 100) {
3962
+ let e = n.x + n.length * .58, t = n.y - r * .4;
3963
+ o.save(), o.translate(e, t), o.rotate(n.wave * 2), o.beginPath(), o.ellipse(0, 0, 4, 1.6, 0, 0, Math.PI * 2), o.fillStyle = `rgba(91, 76, 52, ${n.alpha * 1.6})`, o.fill(), o.restore();
3964
+ }
3965
+ }
3966
+ }, ne = () => {
3967
+ if (s.lightning) {
3968
+ if (y >= C) {
3969
+ C = y + 150 + Math.random() * 300, b = .5, x = 9;
3970
+ let n = e * (.15 + Math.random() * .7);
3971
+ S = Zt(n, t * .12, n + (Math.random() - .5) * e * .2, t * .92, 60, 6);
3972
+ }
3973
+ if (x > 0) {
3974
+ --x;
3975
+ let e = x / 9;
3976
+ o.beginPath(), S.forEach(([e, t], n) => n === 0 ? o.moveTo(e, t) : o.lineTo(e, t)), o.strokeStyle = `rgba(240, 246, 255, ${e})`, o.lineWidth = 2.4, o.shadowColor = "#bcd7ff", o.shadowBlur = 16, o.stroke(), o.shadowBlur = 0;
3977
+ }
3978
+ b > .01 && (o.fillStyle = `rgba(226, 236, 255, ${b})`, o.fillRect(0, 0, e, t), b *= .82);
3979
+ }
3980
+ }, re = () => {
3981
+ s.haze <= 0 || (o.fillStyle = r === "smog" ? `rgba(177, 164, 135, ${s.haze})` : `rgba(220, 226, 232, ${s.haze})`, o.fillRect(0, 0, e, t));
3982
+ }, N = () => {
3983
+ w = requestAnimationFrame(N), !T && (y += 1, ee(), D(), O(), A(), re(), k(), j(), M(), te(), ne());
3984
+ };
3985
+ return N(), () => {
3986
+ cancelAnimationFrame(w), E();
3987
+ };
3988
+ }, [
3989
+ t,
3990
+ r,
3991
+ e
3992
+ ]), /* @__PURE__ */ l("div", {
3993
+ className: Kt.weatherBackground,
3994
+ style: {
3995
+ width: e,
3996
+ height: t
3997
+ },
3998
+ children: /* @__PURE__ */ l("canvas", {
3999
+ ref: i,
4000
+ className: Kt.canvas,
4001
+ style: {
4002
+ width: e,
4003
+ height: t
4004
+ }
4005
+ })
4006
+ });
4007
+ }, $t = {
3478
4008
  waveText: "cos-waveText-Zy2Tp",
3479
4009
  text: "cos-text-el-KR",
3480
4010
  char: "cos-char-Y9-mV",
3481
4011
  wave: "cos-wave-jVRCz"
3482
- }, qt = ({ text: e = "WAVE", amplitude: t = 12, color: n = "#38bdf8", fontSize: r = 56 }) => /* @__PURE__ */ l("div", {
3483
- className: Kt.waveText,
4012
+ }, en = ({ text: e = "WAVE", amplitude: t = 12, color: n = "#38bdf8", fontSize: r = 56 }) => /* @__PURE__ */ l("div", {
4013
+ className: $t.waveText,
3484
4014
  children: /* @__PURE__ */ l("h1", {
3485
- className: Kt.text,
4015
+ className: $t.text,
3486
4016
  style: {
3487
4017
  fontSize: r,
3488
4018
  "--wave-color": n,
3489
4019
  "--wave-amp": `${t}px`
3490
4020
  },
3491
4021
  children: e.split("").map((e, t) => /* @__PURE__ */ l("span", {
3492
- className: Kt.char,
4022
+ className: $t.char,
3493
4023
  style: { animationDelay: `${t * .1}s` },
3494
4024
  children: e === " " ? "\xA0" : e
3495
4025
  }, `${e}-${t}`))
3496
4026
  })
3497
4027
  });
3498
4028
  //#endregion
3499
- export { x as AudioVisualizer, _ as Aurora, f as BarcodeScan, m as BurnAway, C as CanvasClock, te as Charge, D as ClickSpark, ne as Confetti, ce as Countdown, he as CursorTrail, ie as CyberGrid, _e as DiceRoll, ue as DnaHelix, ye as DoublePendulum, pe as ElectricArc, Ee as Fireworks, ke as FlipCounter, Pe as GlitchText, Me as GradientFlow, Le as GravityBalls, Re as HolographicCard, He as LiquidGlass, ze as LiquidProgress, Ve as LorenzAttractor, We as MagneticButton, Ke as MatrixRain, Xe as MazeGenerator, Je as MetaballPool, Qe as MeteorRain, $e as NeonText, tt as NewtonCradle, rt as OrbitalChart, it as ParticleNetwork, ot as PlasmaBall, gt as ProgressChest, vt as RadarScan, yt as RedPacketRain, bt as ReturnCity, Et as RippleWater, St as RopeChain, kt as ScrambleText, At as ScratchCard, Nt as SlotMachine, ct as SmokeFog, pt as Snowfall, dt as SolarSystem, Ct as Speedometer, Ft as SplitReveal, Lt as Spotlight, ht as Starfield, wt as TimelinePulse, Vt as Turntable, Wt as Typewriter, Gt as WaveButton, qt as WaveText };
4029
+ export { x as AudioVisualizer, _ as Aurora, f as BarcodeScan, m as BurnAway, C as CanvasClock, ee as Charge, O as ClickSpark, te as Confetti, se as Countdown, me as CursorTrail, re as CyberGrid, ge as DiceRoll, le as DnaHelix, ve as DoublePendulum, fe as ElectricArc, we as Fireworks, De as FlipCounter, Me as GlitchText, Ae as GradientFlow, Fe as GravityBalls, Ie as HolographicCard, Ve as LiquidGlass, Le as LiquidProgress, ze as LorenzAttractor, Ue as MagneticButton, Ge as MatrixRain, Ye as MazeGenerator, qe as MetaballPool, Ze as MeteorRain, Qe as NeonText, et as NewtonCradle, nt as OrbitalChart, it as ParticleNetwork, ot as PlasmaBall, gt as ProgressChest, vt as RadarScan, yt as RedPacketRain, bt as ReturnCity, Et as RippleWater, St as RopeChain, kt as ScrambleText, At as ScratchCard, Nt as SlotMachine, ct as SmokeFog, pt as Snowfall, dt as SolarSystem, Ct as Speedometer, Ft as SplitReveal, Lt as Spotlight, ht as Starfield, wt as TimelinePulse, Vt as Turntable, Wt as Typewriter, Gt as WaveButton, en as WaveText, Qt as WeatherBackground };