@ecmaos/kernel 0.2.4 → 0.2.5

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.
@@ -356,7 +356,6 @@ async function blank({ terminal }) {
356
356
  async function exit$1(canvas, terminal) {
357
357
  canvas.remove();
358
358
  terminal.listen();
359
- terminal.focus();
360
359
  }
361
360
  const __vite_glob_0_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
362
361
  __proto__: null,
@@ -403,13 +402,206 @@ async function exit(interval, canvas, terminal) {
403
402
  clearInterval(interval);
404
403
  canvas.remove();
405
404
  terminal.listen();
406
- terminal.focus();
407
405
  }
408
406
  const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
409
407
  __proto__: null,
410
408
  default: matrix,
411
409
  exit
412
410
  }, Symbol.toStringTag, { value: "Module" }));
411
+ function isObject$7(input) {
412
+ return typeof input === "object" && input !== null;
413
+ }
414
+ function isArrayLike$6(input) {
415
+ return isObject$7(input) && typeof input.length === "number";
416
+ }
417
+ function arrayify$5(input) {
418
+ if (Array.isArray(input)) {
419
+ return input;
420
+ } else if (input === void 0) {
421
+ return [];
422
+ } else if (isArrayLike$6(input) || input instanceof Set) {
423
+ return Array.from(input);
424
+ } else {
425
+ return [input];
426
+ }
427
+ }
428
+ const csi$5 = "\x1B[";
429
+ const ansi$5 = {};
430
+ ansi$5.style = {
431
+ reset: "\x1B[0m",
432
+ bold: "\x1B[1m",
433
+ italic: "\x1B[3m",
434
+ underline: "\x1B[4m",
435
+ fontDefault: "\x1B[10m",
436
+ font2: "\x1B[11m",
437
+ font3: "\x1B[12m",
438
+ font4: "\x1B[13m",
439
+ font5: "\x1B[14m",
440
+ font6: "\x1B[15m",
441
+ imageNegative: "\x1B[7m",
442
+ imagePositive: "\x1B[27m",
443
+ black: "\x1B[30m",
444
+ red: "\x1B[31m",
445
+ green: "\x1B[32m",
446
+ yellow: "\x1B[33m",
447
+ blue: "\x1B[34m",
448
+ magenta: "\x1B[35m",
449
+ cyan: "\x1B[36m",
450
+ white: "\x1B[37m",
451
+ grey: "\x1B[90m",
452
+ gray: "\x1B[90m",
453
+ brightRed: "\x1B[91m",
454
+ brightGreen: "\x1B[92m",
455
+ brightYellow: "\x1B[93m",
456
+ brightBlue: "\x1B[94m",
457
+ brightMagenta: "\x1B[95m",
458
+ brightCyan: "\x1B[96m",
459
+ brightWhite: "\x1B[97m",
460
+ "bg-black": "\x1B[40m",
461
+ "bg-red": "\x1B[41m",
462
+ "bg-green": "\x1B[42m",
463
+ "bg-yellow": "\x1B[43m",
464
+ "bg-blue": "\x1B[44m",
465
+ "bg-magenta": "\x1B[45m",
466
+ "bg-cyan": "\x1B[46m",
467
+ "bg-white": "\x1B[47m",
468
+ "bg-grey": "\x1B[100m",
469
+ "bg-gray": "\x1B[100m",
470
+ "bg-brightRed": "\x1B[101m",
471
+ "bg-brightGreen": "\x1B[102m",
472
+ "bg-brightYellow": "\x1B[103m",
473
+ "bg-brightBlue": "\x1B[104m",
474
+ "bg-brightMagenta": "\x1B[105m",
475
+ "bg-brightCyan": "\x1B[106m",
476
+ "bg-brightWhite": "\x1B[107m"
477
+ };
478
+ ansi$5.rgb = function(r, g, b) {
479
+ return `\x1B[38;2;${r};${g};${b}m`;
480
+ };
481
+ ansi$5.bgRgb = function(r, g, b) {
482
+ return `\x1B[48;2;${r};${g};${b}m`;
483
+ };
484
+ ansi$5.styles = function(styles2) {
485
+ styles2 = arrayify$5(styles2);
486
+ return styles2.map(function(effect) {
487
+ const rgbMatches = effect.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
488
+ const bgRgbMatches = effect.match(/bg-rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
489
+ if (bgRgbMatches) {
490
+ const [full, r, g, b] = bgRgbMatches;
491
+ return ansi$5.bgRgb(r, g, b);
492
+ } else if (rgbMatches) {
493
+ const [full, r, g, b] = rgbMatches;
494
+ return ansi$5.rgb(r, g, b);
495
+ } else {
496
+ return ansi$5.style[effect];
497
+ }
498
+ }).join("");
499
+ };
500
+ ansi$5.format = function(str, styleArray) {
501
+ const re2 = /\[([\w\s-\(\),]+)\]{([^]*?)}/;
502
+ let matches;
503
+ str = String(str);
504
+ if (!str) return "";
505
+ while (matches = str.match(re2)) {
506
+ const inlineStyles = matches[1].split(/\s+/);
507
+ const inlineString = matches[2];
508
+ str = str.replace(matches[0], ansi$5.format(inlineString, inlineStyles));
509
+ }
510
+ return styleArray && styleArray.length ? ansi$5.styles(styleArray) + str + ansi$5.style.reset : str;
511
+ };
512
+ ansi$5.cursor = {
513
+ /**
514
+ * Moves the cursor `lines` cells up. If the cursor is already at the edge of the screen, this has no effect
515
+ * @param [lines=1] {number}
516
+ * @return {string}
517
+ */
518
+ up: function(lines) {
519
+ return csi$5 + (lines || 1) + "A";
520
+ },
521
+ /**
522
+ * Moves the cursor `lines` cells down. If the cursor is already at the edge of the screen, this has no effect
523
+ * @param [lines=1] {number}
524
+ * @return {string}
525
+ */
526
+ down: function(lines) {
527
+ return csi$5 + (lines || 1) + "B";
528
+ },
529
+ /**
530
+ * Moves the cursor `lines` cells forward. If the cursor is already at the edge of the screen, this has no effect
531
+ * @param [lines=1] {number}
532
+ * @return {string}
533
+ */
534
+ forward: function(lines) {
535
+ return csi$5 + (lines || 1) + "C";
536
+ },
537
+ /**
538
+ * Moves the cursor `lines` cells back. If the cursor is already at the edge of the screen, this has no effect
539
+ * @param [lines=1] {number}
540
+ * @return {string}
541
+ */
542
+ back: function(lines) {
543
+ return csi$5 + (lines || 1) + "D";
544
+ },
545
+ /**
546
+ * Moves cursor to beginning of the line n lines down.
547
+ * @param [lines=1] {number}
548
+ * @return {string}
549
+ */
550
+ nextLine: function(lines) {
551
+ return csi$5 + (lines || 1) + "E";
552
+ },
553
+ /**
554
+ * Moves cursor to beginning of the line n lines up.
555
+ * @param [lines=1] {number}
556
+ * @return {string}
557
+ */
558
+ previousLine: function(lines) {
559
+ return csi$5 + (lines || 1) + "F";
560
+ },
561
+ /**
562
+ * Moves the cursor to column n.
563
+ * @param n {number} - column number
564
+ * @return {string}
565
+ */
566
+ horizontalAbsolute: function(n) {
567
+ return csi$5 + n + "G";
568
+ },
569
+ /**
570
+ * Moves the cursor to row n, column m. The values are 1-based, and default to 1 (top left corner) if omitted.
571
+ * @param n {number} - row number
572
+ * @param m {number} - column number
573
+ * @return {string}
574
+ */
575
+ position: function(n, m) {
576
+ return csi$5 + (n || 1) + ";" + (m || 1) + "H";
577
+ },
578
+ /**
579
+ * Hides the cursor
580
+ */
581
+ hide: csi$5 + "?25l",
582
+ /**
583
+ * Shows the cursor
584
+ */
585
+ show: csi$5 + "?25h"
586
+ };
587
+ ansi$5.erase = {
588
+ /**
589
+ * Clears part of the screen. If n is 0 (or missing), clear from cursor to end of screen. If n is 1, clear from cursor to beginning of the screen. If n is 2, clear entire screen.
590
+ * @param n {number}
591
+ * @return {string}
592
+ */
593
+ display: function(n) {
594
+ return csi$5 + (n || 0) + "J";
595
+ },
596
+ /**
597
+ * Erases part of the line. If n is zero (or missing), clear from cursor to the end of the line. If n is one, clear from cursor to beginning of the line. If n is two, clear entire line. Cursor position does not change.
598
+ * @param n {number}
599
+ * @return {string}
600
+ */
601
+ inLine: function(n) {
602
+ return csi$5 + (n || 0) + "K";
603
+ }
604
+ };
413
605
  const ANSI_BACKGROUND_OFFSET = 10;
414
606
  const wrapAnsi16 = (offset = 0) => (code2) => `\x1B[${code2 + offset}m`;
415
607
  const wrapAnsi256 = (offset = 0) => (code2) => `\x1B[${38 + offset};5;${code2}m`;
@@ -19520,26 +19712,26 @@ const AudioDevice = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
19520
19712
  getDrivers: getDrivers$c,
19521
19713
  pkg: pkg$c
19522
19714
  }, Symbol.toStringTag, { value: "Module" }));
19523
- function isObject$7(input) {
19715
+ function isObject$6(input) {
19524
19716
  return typeof input === "object" && input !== null;
19525
19717
  }
19526
- function isArrayLike$6(input) {
19527
- return isObject$7(input) && typeof input.length === "number";
19718
+ function isArrayLike$5(input) {
19719
+ return isObject$6(input) && typeof input.length === "number";
19528
19720
  }
19529
- function arrayify$5(input) {
19721
+ function arrayify$4(input) {
19530
19722
  if (Array.isArray(input)) {
19531
19723
  return input;
19532
19724
  } else if (input === void 0) {
19533
19725
  return [];
19534
- } else if (isArrayLike$6(input) || input instanceof Set) {
19726
+ } else if (isArrayLike$5(input) || input instanceof Set) {
19535
19727
  return Array.from(input);
19536
19728
  } else {
19537
19729
  return [input];
19538
19730
  }
19539
19731
  }
19540
- const csi$5 = "\x1B[";
19541
- const ansi$5 = {};
19542
- ansi$5.style = {
19732
+ const csi$4 = "\x1B[";
19733
+ const ansi$4 = {};
19734
+ ansi$4.style = {
19543
19735
  reset: "\x1B[0m",
19544
19736
  bold: "\x1B[1m",
19545
19737
  italic: "\x1B[3m",
@@ -19587,29 +19779,29 @@ ansi$5.style = {
19587
19779
  "bg-brightCyan": "\x1B[106m",
19588
19780
  "bg-brightWhite": "\x1B[107m"
19589
19781
  };
19590
- ansi$5.rgb = function(r, g, b) {
19782
+ ansi$4.rgb = function(r, g, b) {
19591
19783
  return `\x1B[38;2;${r};${g};${b}m`;
19592
19784
  };
19593
- ansi$5.bgRgb = function(r, g, b) {
19785
+ ansi$4.bgRgb = function(r, g, b) {
19594
19786
  return `\x1B[48;2;${r};${g};${b}m`;
19595
19787
  };
19596
- ansi$5.styles = function(styles2) {
19597
- styles2 = arrayify$5(styles2);
19788
+ ansi$4.styles = function(styles2) {
19789
+ styles2 = arrayify$4(styles2);
19598
19790
  return styles2.map(function(effect) {
19599
19791
  const rgbMatches = effect.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
19600
19792
  const bgRgbMatches = effect.match(/bg-rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
19601
19793
  if (bgRgbMatches) {
19602
19794
  const [full, r, g, b] = bgRgbMatches;
19603
- return ansi$5.bgRgb(r, g, b);
19795
+ return ansi$4.bgRgb(r, g, b);
19604
19796
  } else if (rgbMatches) {
19605
19797
  const [full, r, g, b] = rgbMatches;
19606
- return ansi$5.rgb(r, g, b);
19798
+ return ansi$4.rgb(r, g, b);
19607
19799
  } else {
19608
- return ansi$5.style[effect];
19800
+ return ansi$4.style[effect];
19609
19801
  }
19610
19802
  }).join("");
19611
19803
  };
19612
- ansi$5.format = function(str, styleArray) {
19804
+ ansi$4.format = function(str, styleArray) {
19613
19805
  const re2 = /\[([\w\s-\(\),]+)\]{([^]*?)}/;
19614
19806
  let matches;
19615
19807
  str = String(str);
@@ -19617,18 +19809,18 @@ ansi$5.format = function(str, styleArray) {
19617
19809
  while (matches = str.match(re2)) {
19618
19810
  const inlineStyles = matches[1].split(/\s+/);
19619
19811
  const inlineString = matches[2];
19620
- str = str.replace(matches[0], ansi$5.format(inlineString, inlineStyles));
19812
+ str = str.replace(matches[0], ansi$4.format(inlineString, inlineStyles));
19621
19813
  }
19622
- return styleArray && styleArray.length ? ansi$5.styles(styleArray) + str + ansi$5.style.reset : str;
19814
+ return styleArray && styleArray.length ? ansi$4.styles(styleArray) + str + ansi$4.style.reset : str;
19623
19815
  };
19624
- ansi$5.cursor = {
19816
+ ansi$4.cursor = {
19625
19817
  /**
19626
19818
  * Moves the cursor `lines` cells up. If the cursor is already at the edge of the screen, this has no effect
19627
19819
  * @param [lines=1] {number}
19628
19820
  * @return {string}
19629
19821
  */
19630
19822
  up: function(lines) {
19631
- return csi$5 + (lines || 1) + "A";
19823
+ return csi$4 + (lines || 1) + "A";
19632
19824
  },
19633
19825
  /**
19634
19826
  * Moves the cursor `lines` cells down. If the cursor is already at the edge of the screen, this has no effect
@@ -19636,7 +19828,7 @@ ansi$5.cursor = {
19636
19828
  * @return {string}
19637
19829
  */
19638
19830
  down: function(lines) {
19639
- return csi$5 + (lines || 1) + "B";
19831
+ return csi$4 + (lines || 1) + "B";
19640
19832
  },
19641
19833
  /**
19642
19834
  * Moves the cursor `lines` cells forward. If the cursor is already at the edge of the screen, this has no effect
@@ -19644,7 +19836,7 @@ ansi$5.cursor = {
19644
19836
  * @return {string}
19645
19837
  */
19646
19838
  forward: function(lines) {
19647
- return csi$5 + (lines || 1) + "C";
19839
+ return csi$4 + (lines || 1) + "C";
19648
19840
  },
19649
19841
  /**
19650
19842
  * Moves the cursor `lines` cells back. If the cursor is already at the edge of the screen, this has no effect
@@ -19652,7 +19844,7 @@ ansi$5.cursor = {
19652
19844
  * @return {string}
19653
19845
  */
19654
19846
  back: function(lines) {
19655
- return csi$5 + (lines || 1) + "D";
19847
+ return csi$4 + (lines || 1) + "D";
19656
19848
  },
19657
19849
  /**
19658
19850
  * Moves cursor to beginning of the line n lines down.
@@ -19660,7 +19852,7 @@ ansi$5.cursor = {
19660
19852
  * @return {string}
19661
19853
  */
19662
19854
  nextLine: function(lines) {
19663
- return csi$5 + (lines || 1) + "E";
19855
+ return csi$4 + (lines || 1) + "E";
19664
19856
  },
19665
19857
  /**
19666
19858
  * Moves cursor to beginning of the line n lines up.
@@ -19668,7 +19860,7 @@ ansi$5.cursor = {
19668
19860
  * @return {string}
19669
19861
  */
19670
19862
  previousLine: function(lines) {
19671
- return csi$5 + (lines || 1) + "F";
19863
+ return csi$4 + (lines || 1) + "F";
19672
19864
  },
19673
19865
  /**
19674
19866
  * Moves the cursor to column n.
@@ -19676,7 +19868,7 @@ ansi$5.cursor = {
19676
19868
  * @return {string}
19677
19869
  */
19678
19870
  horizontalAbsolute: function(n) {
19679
- return csi$5 + n + "G";
19871
+ return csi$4 + n + "G";
19680
19872
  },
19681
19873
  /**
19682
19874
  * Moves the cursor to row n, column m. The values are 1-based, and default to 1 (top left corner) if omitted.
@@ -19685,25 +19877,25 @@ ansi$5.cursor = {
19685
19877
  * @return {string}
19686
19878
  */
19687
19879
  position: function(n, m) {
19688
- return csi$5 + (n || 1) + ";" + (m || 1) + "H";
19880
+ return csi$4 + (n || 1) + ";" + (m || 1) + "H";
19689
19881
  },
19690
19882
  /**
19691
19883
  * Hides the cursor
19692
19884
  */
19693
- hide: csi$5 + "?25l",
19885
+ hide: csi$4 + "?25l",
19694
19886
  /**
19695
19887
  * Shows the cursor
19696
19888
  */
19697
- show: csi$5 + "?25h"
19889
+ show: csi$4 + "?25h"
19698
19890
  };
19699
- ansi$5.erase = {
19891
+ ansi$4.erase = {
19700
19892
  /**
19701
19893
  * Clears part of the screen. If n is 0 (or missing), clear from cursor to end of screen. If n is 1, clear from cursor to beginning of the screen. If n is 2, clear entire screen.
19702
19894
  * @param n {number}
19703
19895
  * @return {string}
19704
19896
  */
19705
19897
  display: function(n) {
19706
- return csi$5 + (n || 0) + "J";
19898
+ return csi$4 + (n || 0) + "J";
19707
19899
  },
19708
19900
  /**
19709
19901
  * Erases part of the line. If n is zero (or missing), clear from cursor to the end of the line. If n is one, clear from cursor to beginning of the line. If n is two, clear entire line. Cursor position does not change.
@@ -19711,7 +19903,7 @@ ansi$5.erase = {
19711
19903
  * @return {string}
19712
19904
  */
19713
19905
  inLine: function(n) {
19714
- return csi$5 + (n || 0) + "K";
19906
+ return csi$4 + (n || 0) + "K";
19715
19907
  }
19716
19908
  };
19717
19909
  const pkg$b = {
@@ -19744,11 +19936,11 @@ Commands:
19744
19936
  try {
19745
19937
  switch (args[0]) {
19746
19938
  case "status":
19747
- terminal.writeln(`${ansi$5.style.bold}🔋 Battery Status:${ansi$5.style.reset}
19748
- 🔌 Charging: ${battery.charging ? ansi$5.style.green + "Yes" : ansi$5.style.red + "No"}${ansi$5.style.reset}
19749
- ⏱️ Charging Time: ${battery.chargingTime === Infinity ? ansi$5.style.gray + "N/A" : ansi$5.style.cyan + battery.chargingTime}${ansi$5.style.reset}
19750
- ⌛ Discharging Time: ${battery.dischargingTime === Infinity ? ansi$5.style.gray + "N/A" : ansi$5.style.cyan + battery.dischargingTime}${ansi$5.style.reset}
19751
- 📊 Level: ${ansi$5.style[battery.level > 0.5 ? "green" : battery.level > 0.2 ? "yellow" : "red"]}${(battery.level * 100).toFixed(1)}%${ansi$5.style.reset}`);
19939
+ terminal.writeln(`${ansi$4.style.bold}🔋 Battery Status:${ansi$4.style.reset}
19940
+ 🔌 Charging: ${battery.charging ? ansi$4.style.green + "Yes" : ansi$4.style.red + "No"}${ansi$4.style.reset}
19941
+ ⏱️ Charging Time: ${battery.chargingTime === Infinity ? ansi$4.style.gray + "N/A" : ansi$4.style.cyan + battery.chargingTime}${ansi$4.style.reset}
19942
+ ⌛ Discharging Time: ${battery.dischargingTime === Infinity ? ansi$4.style.gray + "N/A" : ansi$4.style.cyan + battery.dischargingTime}${ansi$4.style.reset}
19943
+ 📊 Level: ${ansi$4.style[battery.level > 0.5 ? "green" : battery.level > 0.2 ? "yellow" : "red"]}${(battery.level * 100).toFixed(1)}%${ansi$4.style.reset}`);
19752
19944
  break;
19753
19945
  case "charging":
19754
19946
  terminal.writeln(`${battery.charging}`);
@@ -20081,26 +20273,26 @@ const BluetoothDevice = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.def
20081
20273
  getDrivers: getDrivers$a,
20082
20274
  pkg: pkg$a
20083
20275
  }, Symbol.toStringTag, { value: "Module" }));
20084
- function isObject$6(input) {
20276
+ function isObject$5(input) {
20085
20277
  return typeof input === "object" && input !== null;
20086
20278
  }
20087
- function isArrayLike$5(input) {
20088
- return isObject$6(input) && typeof input.length === "number";
20279
+ function isArrayLike$4(input) {
20280
+ return isObject$5(input) && typeof input.length === "number";
20089
20281
  }
20090
- function arrayify$4(input) {
20282
+ function arrayify$3(input) {
20091
20283
  if (Array.isArray(input)) {
20092
20284
  return input;
20093
20285
  } else if (input === void 0) {
20094
20286
  return [];
20095
- } else if (isArrayLike$5(input) || input instanceof Set) {
20287
+ } else if (isArrayLike$4(input) || input instanceof Set) {
20096
20288
  return Array.from(input);
20097
20289
  } else {
20098
20290
  return [input];
20099
20291
  }
20100
20292
  }
20101
- const csi$4 = "\x1B[";
20102
- const ansi$4 = {};
20103
- ansi$4.style = {
20293
+ const csi$3 = "\x1B[";
20294
+ const ansi$3 = {};
20295
+ ansi$3.style = {
20104
20296
  reset: "\x1B[0m",
20105
20297
  bold: "\x1B[1m",
20106
20298
  italic: "\x1B[3m",
@@ -20148,29 +20340,29 @@ ansi$4.style = {
20148
20340
  "bg-brightCyan": "\x1B[106m",
20149
20341
  "bg-brightWhite": "\x1B[107m"
20150
20342
  };
20151
- ansi$4.rgb = function(r, g, b) {
20343
+ ansi$3.rgb = function(r, g, b) {
20152
20344
  return `\x1B[38;2;${r};${g};${b}m`;
20153
20345
  };
20154
- ansi$4.bgRgb = function(r, g, b) {
20346
+ ansi$3.bgRgb = function(r, g, b) {
20155
20347
  return `\x1B[48;2;${r};${g};${b}m`;
20156
20348
  };
20157
- ansi$4.styles = function(styles2) {
20158
- styles2 = arrayify$4(styles2);
20349
+ ansi$3.styles = function(styles2) {
20350
+ styles2 = arrayify$3(styles2);
20159
20351
  return styles2.map(function(effect) {
20160
20352
  const rgbMatches = effect.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
20161
20353
  const bgRgbMatches = effect.match(/bg-rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
20162
20354
  if (bgRgbMatches) {
20163
20355
  const [full, r, g, b] = bgRgbMatches;
20164
- return ansi$4.bgRgb(r, g, b);
20356
+ return ansi$3.bgRgb(r, g, b);
20165
20357
  } else if (rgbMatches) {
20166
20358
  const [full, r, g, b] = rgbMatches;
20167
- return ansi$4.rgb(r, g, b);
20359
+ return ansi$3.rgb(r, g, b);
20168
20360
  } else {
20169
- return ansi$4.style[effect];
20361
+ return ansi$3.style[effect];
20170
20362
  }
20171
20363
  }).join("");
20172
20364
  };
20173
- ansi$4.format = function(str, styleArray) {
20365
+ ansi$3.format = function(str, styleArray) {
20174
20366
  const re2 = /\[([\w\s-\(\),]+)\]{([^]*?)}/;
20175
20367
  let matches;
20176
20368
  str = String(str);
@@ -20178,18 +20370,18 @@ ansi$4.format = function(str, styleArray) {
20178
20370
  while (matches = str.match(re2)) {
20179
20371
  const inlineStyles = matches[1].split(/\s+/);
20180
20372
  const inlineString = matches[2];
20181
- str = str.replace(matches[0], ansi$4.format(inlineString, inlineStyles));
20373
+ str = str.replace(matches[0], ansi$3.format(inlineString, inlineStyles));
20182
20374
  }
20183
- return styleArray && styleArray.length ? ansi$4.styles(styleArray) + str + ansi$4.style.reset : str;
20375
+ return styleArray && styleArray.length ? ansi$3.styles(styleArray) + str + ansi$3.style.reset : str;
20184
20376
  };
20185
- ansi$4.cursor = {
20377
+ ansi$3.cursor = {
20186
20378
  /**
20187
20379
  * Moves the cursor `lines` cells up. If the cursor is already at the edge of the screen, this has no effect
20188
20380
  * @param [lines=1] {number}
20189
20381
  * @return {string}
20190
20382
  */
20191
20383
  up: function(lines) {
20192
- return csi$4 + (lines || 1) + "A";
20384
+ return csi$3 + (lines || 1) + "A";
20193
20385
  },
20194
20386
  /**
20195
20387
  * Moves the cursor `lines` cells down. If the cursor is already at the edge of the screen, this has no effect
@@ -20197,7 +20389,7 @@ ansi$4.cursor = {
20197
20389
  * @return {string}
20198
20390
  */
20199
20391
  down: function(lines) {
20200
- return csi$4 + (lines || 1) + "B";
20392
+ return csi$3 + (lines || 1) + "B";
20201
20393
  },
20202
20394
  /**
20203
20395
  * Moves the cursor `lines` cells forward. If the cursor is already at the edge of the screen, this has no effect
@@ -20205,7 +20397,7 @@ ansi$4.cursor = {
20205
20397
  * @return {string}
20206
20398
  */
20207
20399
  forward: function(lines) {
20208
- return csi$4 + (lines || 1) + "C";
20400
+ return csi$3 + (lines || 1) + "C";
20209
20401
  },
20210
20402
  /**
20211
20403
  * Moves the cursor `lines` cells back. If the cursor is already at the edge of the screen, this has no effect
@@ -20213,7 +20405,7 @@ ansi$4.cursor = {
20213
20405
  * @return {string}
20214
20406
  */
20215
20407
  back: function(lines) {
20216
- return csi$4 + (lines || 1) + "D";
20408
+ return csi$3 + (lines || 1) + "D";
20217
20409
  },
20218
20410
  /**
20219
20411
  * Moves cursor to beginning of the line n lines down.
@@ -20221,7 +20413,7 @@ ansi$4.cursor = {
20221
20413
  * @return {string}
20222
20414
  */
20223
20415
  nextLine: function(lines) {
20224
- return csi$4 + (lines || 1) + "E";
20416
+ return csi$3 + (lines || 1) + "E";
20225
20417
  },
20226
20418
  /**
20227
20419
  * Moves cursor to beginning of the line n lines up.
@@ -20229,7 +20421,7 @@ ansi$4.cursor = {
20229
20421
  * @return {string}
20230
20422
  */
20231
20423
  previousLine: function(lines) {
20232
- return csi$4 + (lines || 1) + "F";
20424
+ return csi$3 + (lines || 1) + "F";
20233
20425
  },
20234
20426
  /**
20235
20427
  * Moves the cursor to column n.
@@ -20237,7 +20429,7 @@ ansi$4.cursor = {
20237
20429
  * @return {string}
20238
20430
  */
20239
20431
  horizontalAbsolute: function(n) {
20240
- return csi$4 + n + "G";
20432
+ return csi$3 + n + "G";
20241
20433
  },
20242
20434
  /**
20243
20435
  * Moves the cursor to row n, column m. The values are 1-based, and default to 1 (top left corner) if omitted.
@@ -20246,25 +20438,25 @@ ansi$4.cursor = {
20246
20438
  * @return {string}
20247
20439
  */
20248
20440
  position: function(n, m) {
20249
- return csi$4 + (n || 1) + ";" + (m || 1) + "H";
20441
+ return csi$3 + (n || 1) + ";" + (m || 1) + "H";
20250
20442
  },
20251
20443
  /**
20252
20444
  * Hides the cursor
20253
20445
  */
20254
- hide: csi$4 + "?25l",
20446
+ hide: csi$3 + "?25l",
20255
20447
  /**
20256
20448
  * Shows the cursor
20257
20449
  */
20258
- show: csi$4 + "?25h"
20450
+ show: csi$3 + "?25h"
20259
20451
  };
20260
- ansi$4.erase = {
20452
+ ansi$3.erase = {
20261
20453
  /**
20262
20454
  * Clears part of the screen. If n is 0 (or missing), clear from cursor to end of screen. If n is 1, clear from cursor to beginning of the screen. If n is 2, clear entire screen.
20263
20455
  * @param n {number}
20264
20456
  * @return {string}
20265
20457
  */
20266
20458
  display: function(n) {
20267
- return csi$4 + (n || 0) + "J";
20459
+ return csi$3 + (n || 0) + "J";
20268
20460
  },
20269
20461
  /**
20270
20462
  * Erases part of the line. If n is zero (or missing), clear from cursor to the end of the line. If n is one, clear from cursor to beginning of the line. If n is two, clear entire line. Cursor position does not change.
@@ -20272,7 +20464,7 @@ ansi$4.erase = {
20272
20464
  * @return {string}
20273
20465
  */
20274
20466
  inLine: function(n) {
20275
- return csi$4 + (n || 0) + "K";
20467
+ return csi$3 + (n || 0) + "K";
20276
20468
  }
20277
20469
  };
20278
20470
  const pkg$9 = {
@@ -20307,16 +20499,16 @@ Commands:
20307
20499
  terminal.writeln("No gamepads connected");
20308
20500
  break;
20309
20501
  }
20310
- terminal.writeln(`${ansi$4.style.bold}🎮 Connected Gamepads:${ansi$4.style.reset}`);
20502
+ terminal.writeln(`${ansi$3.style.bold}🎮 Connected Gamepads:${ansi$3.style.reset}`);
20311
20503
  connectedPads.forEach((gamepad2) => {
20312
20504
  if (!gamepad2)
20313
20505
  return;
20314
20506
  terminal.writeln(`
20315
- 🎮 Index: ${ansi$4.style.cyan}${gamepad2.index}${ansi$4.style.reset}
20316
- 📝 ID: ${ansi$4.style.cyan}${gamepad2.id}${ansi$4.style.reset}
20317
- 🔌 Connected: ${ansi$4.style.cyan}${gamepad2.connected}${ansi$4.style.reset}
20318
- 🎯 Buttons: ${ansi$4.style.cyan}${gamepad2.buttons.length}${ansi$4.style.reset}
20319
- 📊 Axes: ${ansi$4.style.cyan}${gamepad2.axes.length}${ansi$4.style.reset}`);
20507
+ 🎮 Index: ${ansi$3.style.cyan}${gamepad2.index}${ansi$3.style.reset}
20508
+ 📝 ID: ${ansi$3.style.cyan}${gamepad2.id}${ansi$3.style.reset}
20509
+ 🔌 Connected: ${ansi$3.style.cyan}${gamepad2.connected}${ansi$3.style.reset}
20510
+ 🎯 Buttons: ${ansi$3.style.cyan}${gamepad2.buttons.length}${ansi$3.style.reset}
20511
+ 📊 Axes: ${ansi$3.style.cyan}${gamepad2.axes.length}${ansi$3.style.reset}`);
20320
20512
  });
20321
20513
  break;
20322
20514
  case "info":
@@ -20331,7 +20523,7 @@ Commands:
20331
20523
  terminal.writeln(`No gamepad found at index ${index}`);
20332
20524
  return 1;
20333
20525
  }
20334
- terminal.writeln(`${ansi$4.style.bold}Gamepad Information:${ansi$4.style.reset}
20526
+ terminal.writeln(`${ansi$3.style.bold}Gamepad Information:${ansi$3.style.reset}
20335
20527
  Index: ${gamepad.index}
20336
20528
  ID: ${gamepad.id}
20337
20529
  Connected: ${gamepad.connected}
@@ -20369,26 +20561,26 @@ const GamepadDevice = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin
20369
20561
  getDrivers: getDrivers$9,
20370
20562
  pkg: pkg$9
20371
20563
  }, Symbol.toStringTag, { value: "Module" }));
20372
- function isObject$5(input) {
20564
+ function isObject$4(input) {
20373
20565
  return typeof input === "object" && input !== null;
20374
20566
  }
20375
- function isArrayLike$4(input) {
20376
- return isObject$5(input) && typeof input.length === "number";
20567
+ function isArrayLike$3(input) {
20568
+ return isObject$4(input) && typeof input.length === "number";
20377
20569
  }
20378
- function arrayify$3(input) {
20570
+ function arrayify$2(input) {
20379
20571
  if (Array.isArray(input)) {
20380
20572
  return input;
20381
20573
  } else if (input === void 0) {
20382
20574
  return [];
20383
- } else if (isArrayLike$4(input) || input instanceof Set) {
20575
+ } else if (isArrayLike$3(input) || input instanceof Set) {
20384
20576
  return Array.from(input);
20385
20577
  } else {
20386
20578
  return [input];
20387
20579
  }
20388
20580
  }
20389
- const csi$3 = "\x1B[";
20390
- const ansi$3 = {};
20391
- ansi$3.style = {
20581
+ const csi$2 = "\x1B[";
20582
+ const ansi$2 = {};
20583
+ ansi$2.style = {
20392
20584
  reset: "\x1B[0m",
20393
20585
  bold: "\x1B[1m",
20394
20586
  italic: "\x1B[3m",
@@ -20436,29 +20628,29 @@ ansi$3.style = {
20436
20628
  "bg-brightCyan": "\x1B[106m",
20437
20629
  "bg-brightWhite": "\x1B[107m"
20438
20630
  };
20439
- ansi$3.rgb = function(r, g, b) {
20631
+ ansi$2.rgb = function(r, g, b) {
20440
20632
  return `\x1B[38;2;${r};${g};${b}m`;
20441
20633
  };
20442
- ansi$3.bgRgb = function(r, g, b) {
20634
+ ansi$2.bgRgb = function(r, g, b) {
20443
20635
  return `\x1B[48;2;${r};${g};${b}m`;
20444
20636
  };
20445
- ansi$3.styles = function(styles2) {
20446
- styles2 = arrayify$3(styles2);
20637
+ ansi$2.styles = function(styles2) {
20638
+ styles2 = arrayify$2(styles2);
20447
20639
  return styles2.map(function(effect) {
20448
20640
  const rgbMatches = effect.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
20449
20641
  const bgRgbMatches = effect.match(/bg-rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
20450
20642
  if (bgRgbMatches) {
20451
20643
  const [full, r, g, b] = bgRgbMatches;
20452
- return ansi$3.bgRgb(r, g, b);
20644
+ return ansi$2.bgRgb(r, g, b);
20453
20645
  } else if (rgbMatches) {
20454
20646
  const [full, r, g, b] = rgbMatches;
20455
- return ansi$3.rgb(r, g, b);
20647
+ return ansi$2.rgb(r, g, b);
20456
20648
  } else {
20457
- return ansi$3.style[effect];
20649
+ return ansi$2.style[effect];
20458
20650
  }
20459
20651
  }).join("");
20460
20652
  };
20461
- ansi$3.format = function(str, styleArray) {
20653
+ ansi$2.format = function(str, styleArray) {
20462
20654
  const re2 = /\[([\w\s-\(\),]+)\]{([^]*?)}/;
20463
20655
  let matches;
20464
20656
  str = String(str);
@@ -20466,18 +20658,18 @@ ansi$3.format = function(str, styleArray) {
20466
20658
  while (matches = str.match(re2)) {
20467
20659
  const inlineStyles = matches[1].split(/\s+/);
20468
20660
  const inlineString = matches[2];
20469
- str = str.replace(matches[0], ansi$3.format(inlineString, inlineStyles));
20661
+ str = str.replace(matches[0], ansi$2.format(inlineString, inlineStyles));
20470
20662
  }
20471
- return styleArray && styleArray.length ? ansi$3.styles(styleArray) + str + ansi$3.style.reset : str;
20663
+ return styleArray && styleArray.length ? ansi$2.styles(styleArray) + str + ansi$2.style.reset : str;
20472
20664
  };
20473
- ansi$3.cursor = {
20665
+ ansi$2.cursor = {
20474
20666
  /**
20475
20667
  * Moves the cursor `lines` cells up. If the cursor is already at the edge of the screen, this has no effect
20476
20668
  * @param [lines=1] {number}
20477
20669
  * @return {string}
20478
20670
  */
20479
20671
  up: function(lines) {
20480
- return csi$3 + (lines || 1) + "A";
20672
+ return csi$2 + (lines || 1) + "A";
20481
20673
  },
20482
20674
  /**
20483
20675
  * Moves the cursor `lines` cells down. If the cursor is already at the edge of the screen, this has no effect
@@ -20485,7 +20677,7 @@ ansi$3.cursor = {
20485
20677
  * @return {string}
20486
20678
  */
20487
20679
  down: function(lines) {
20488
- return csi$3 + (lines || 1) + "B";
20680
+ return csi$2 + (lines || 1) + "B";
20489
20681
  },
20490
20682
  /**
20491
20683
  * Moves the cursor `lines` cells forward. If the cursor is already at the edge of the screen, this has no effect
@@ -20493,7 +20685,7 @@ ansi$3.cursor = {
20493
20685
  * @return {string}
20494
20686
  */
20495
20687
  forward: function(lines) {
20496
- return csi$3 + (lines || 1) + "C";
20688
+ return csi$2 + (lines || 1) + "C";
20497
20689
  },
20498
20690
  /**
20499
20691
  * Moves the cursor `lines` cells back. If the cursor is already at the edge of the screen, this has no effect
@@ -20501,7 +20693,7 @@ ansi$3.cursor = {
20501
20693
  * @return {string}
20502
20694
  */
20503
20695
  back: function(lines) {
20504
- return csi$3 + (lines || 1) + "D";
20696
+ return csi$2 + (lines || 1) + "D";
20505
20697
  },
20506
20698
  /**
20507
20699
  * Moves cursor to beginning of the line n lines down.
@@ -20509,7 +20701,7 @@ ansi$3.cursor = {
20509
20701
  * @return {string}
20510
20702
  */
20511
20703
  nextLine: function(lines) {
20512
- return csi$3 + (lines || 1) + "E";
20704
+ return csi$2 + (lines || 1) + "E";
20513
20705
  },
20514
20706
  /**
20515
20707
  * Moves cursor to beginning of the line n lines up.
@@ -20517,7 +20709,7 @@ ansi$3.cursor = {
20517
20709
  * @return {string}
20518
20710
  */
20519
20711
  previousLine: function(lines) {
20520
- return csi$3 + (lines || 1) + "F";
20712
+ return csi$2 + (lines || 1) + "F";
20521
20713
  },
20522
20714
  /**
20523
20715
  * Moves the cursor to column n.
@@ -20525,7 +20717,7 @@ ansi$3.cursor = {
20525
20717
  * @return {string}
20526
20718
  */
20527
20719
  horizontalAbsolute: function(n) {
20528
- return csi$3 + n + "G";
20720
+ return csi$2 + n + "G";
20529
20721
  },
20530
20722
  /**
20531
20723
  * Moves the cursor to row n, column m. The values are 1-based, and default to 1 (top left corner) if omitted.
@@ -20534,25 +20726,25 @@ ansi$3.cursor = {
20534
20726
  * @return {string}
20535
20727
  */
20536
20728
  position: function(n, m) {
20537
- return csi$3 + (n || 1) + ";" + (m || 1) + "H";
20729
+ return csi$2 + (n || 1) + ";" + (m || 1) + "H";
20538
20730
  },
20539
20731
  /**
20540
20732
  * Hides the cursor
20541
20733
  */
20542
- hide: csi$3 + "?25l",
20734
+ hide: csi$2 + "?25l",
20543
20735
  /**
20544
20736
  * Shows the cursor
20545
20737
  */
20546
- show: csi$3 + "?25h"
20738
+ show: csi$2 + "?25h"
20547
20739
  };
20548
- ansi$3.erase = {
20740
+ ansi$2.erase = {
20549
20741
  /**
20550
20742
  * Clears part of the screen. If n is 0 (or missing), clear from cursor to end of screen. If n is 1, clear from cursor to beginning of the screen. If n is 2, clear entire screen.
20551
20743
  * @param n {number}
20552
20744
  * @return {string}
20553
20745
  */
20554
20746
  display: function(n) {
20555
- return csi$3 + (n || 0) + "J";
20747
+ return csi$2 + (n || 0) + "J";
20556
20748
  },
20557
20749
  /**
20558
20750
  * Erases part of the line. If n is zero (or missing), clear from cursor to the end of the line. If n is one, clear from cursor to beginning of the line. If n is two, clear entire line. Cursor position does not change.
@@ -20560,7 +20752,7 @@ ansi$3.erase = {
20560
20752
  * @return {string}
20561
20753
  */
20562
20754
  inLine: function(n) {
20563
- return csi$3 + (n || 0) + "K";
20755
+ return csi$2 + (n || 0) + "K";
20564
20756
  }
20565
20757
  };
20566
20758
  const pkg$8 = {
@@ -20593,14 +20785,14 @@ Commands:
20593
20785
  const position = await new Promise((resolve2, reject) => {
20594
20786
  navigator.geolocation.getCurrentPosition(resolve2, reject);
20595
20787
  });
20596
- terminal.writeln(`${ansi$3.style.bold}📍 Current Position:${ansi$3.style.reset}
20597
- 🌍 Latitude: ${ansi$3.style.cyan}${position.coords.latitude}${ansi$3.style.reset}
20598
- 🌍 Longitude: ${ansi$3.style.cyan}${position.coords.longitude}${ansi$3.style.reset}
20599
- 📏 Accuracy: ${ansi$3.style.cyan}${position.coords.accuracy}m${ansi$3.style.reset}
20600
- 🏔️ Altitude: ${position.coords.altitude ? ansi$3.style.cyan + position.coords.altitude + "m" : ansi$3.style.gray + "N/A"}${ansi$3.style.reset}
20601
- 🎯 Altitude Accuracy: ${position.coords.altitudeAccuracy ? ansi$3.style.cyan + position.coords.altitudeAccuracy + "m" : ansi$3.style.gray + "N/A"}${ansi$3.style.reset}
20602
- 🧭 Heading: ${position.coords.heading ? ansi$3.style.cyan + position.coords.heading + "°" : ansi$3.style.gray + "N/A"}${ansi$3.style.reset}
20603
- 🚀 Speed: ${position.coords.speed ? ansi$3.style.cyan + position.coords.speed + "m/s" : ansi$3.style.gray + "N/A"}${ansi$3.style.reset}`);
20788
+ terminal.writeln(`${ansi$2.style.bold}📍 Current Position:${ansi$2.style.reset}
20789
+ 🌍 Latitude: ${ansi$2.style.cyan}${position.coords.latitude}${ansi$2.style.reset}
20790
+ 🌍 Longitude: ${ansi$2.style.cyan}${position.coords.longitude}${ansi$2.style.reset}
20791
+ 📏 Accuracy: ${ansi$2.style.cyan}${position.coords.accuracy}m${ansi$2.style.reset}
20792
+ 🏔️ Altitude: ${position.coords.altitude ? ansi$2.style.cyan + position.coords.altitude + "m" : ansi$2.style.gray + "N/A"}${ansi$2.style.reset}
20793
+ 🎯 Altitude Accuracy: ${position.coords.altitudeAccuracy ? ansi$2.style.cyan + position.coords.altitudeAccuracy + "m" : ansi$2.style.gray + "N/A"}${ansi$2.style.reset}
20794
+ 🧭 Heading: ${position.coords.heading ? ansi$2.style.cyan + position.coords.heading + "°" : ansi$2.style.gray + "N/A"}${ansi$2.style.reset}
20795
+ 🚀 Speed: ${position.coords.speed ? ansi$2.style.cyan + position.coords.speed + "m/s" : ansi$2.style.gray + "N/A"}${ansi$2.style.reset}`);
20604
20796
  break;
20605
20797
  case "watch":
20606
20798
  const watchId = navigator.geolocation.watchPosition(
@@ -20852,26 +21044,26 @@ const GPUDevice = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
20852
21044
  getDrivers: getDrivers$7,
20853
21045
  pkg: pkg$7
20854
21046
  }, Symbol.toStringTag, { value: "Module" }));
20855
- function isObject$4(input) {
21047
+ function isObject$3(input) {
20856
21048
  return typeof input === "object" && input !== null;
20857
21049
  }
20858
- function isArrayLike$3(input) {
20859
- return isObject$4(input) && typeof input.length === "number";
21050
+ function isArrayLike$2(input) {
21051
+ return isObject$3(input) && typeof input.length === "number";
20860
21052
  }
20861
- function arrayify$2(input) {
21053
+ function arrayify$1(input) {
20862
21054
  if (Array.isArray(input)) {
20863
21055
  return input;
20864
21056
  } else if (input === void 0) {
20865
21057
  return [];
20866
- } else if (isArrayLike$3(input) || input instanceof Set) {
21058
+ } else if (isArrayLike$2(input) || input instanceof Set) {
20867
21059
  return Array.from(input);
20868
21060
  } else {
20869
21061
  return [input];
20870
21062
  }
20871
21063
  }
20872
- const csi$2 = "\x1B[";
20873
- const ansi$2 = {};
20874
- ansi$2.style = {
21064
+ const csi$1 = "\x1B[";
21065
+ const ansi$1 = {};
21066
+ ansi$1.style = {
20875
21067
  reset: "\x1B[0m",
20876
21068
  bold: "\x1B[1m",
20877
21069
  italic: "\x1B[3m",
@@ -20919,29 +21111,29 @@ ansi$2.style = {
20919
21111
  "bg-brightCyan": "\x1B[106m",
20920
21112
  "bg-brightWhite": "\x1B[107m"
20921
21113
  };
20922
- ansi$2.rgb = function(r, g, b) {
21114
+ ansi$1.rgb = function(r, g, b) {
20923
21115
  return `\x1B[38;2;${r};${g};${b}m`;
20924
21116
  };
20925
- ansi$2.bgRgb = function(r, g, b) {
21117
+ ansi$1.bgRgb = function(r, g, b) {
20926
21118
  return `\x1B[48;2;${r};${g};${b}m`;
20927
21119
  };
20928
- ansi$2.styles = function(styles2) {
20929
- styles2 = arrayify$2(styles2);
21120
+ ansi$1.styles = function(styles2) {
21121
+ styles2 = arrayify$1(styles2);
20930
21122
  return styles2.map(function(effect) {
20931
21123
  const rgbMatches = effect.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
20932
21124
  const bgRgbMatches = effect.match(/bg-rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
20933
21125
  if (bgRgbMatches) {
20934
21126
  const [full, r, g, b] = bgRgbMatches;
20935
- return ansi$2.bgRgb(r, g, b);
21127
+ return ansi$1.bgRgb(r, g, b);
20936
21128
  } else if (rgbMatches) {
20937
21129
  const [full, r, g, b] = rgbMatches;
20938
- return ansi$2.rgb(r, g, b);
21130
+ return ansi$1.rgb(r, g, b);
20939
21131
  } else {
20940
- return ansi$2.style[effect];
21132
+ return ansi$1.style[effect];
20941
21133
  }
20942
21134
  }).join("");
20943
21135
  };
20944
- ansi$2.format = function(str, styleArray) {
21136
+ ansi$1.format = function(str, styleArray) {
20945
21137
  const re2 = /\[([\w\s-\(\),]+)\]{([^]*?)}/;
20946
21138
  let matches;
20947
21139
  str = String(str);
@@ -20949,18 +21141,18 @@ ansi$2.format = function(str, styleArray) {
20949
21141
  while (matches = str.match(re2)) {
20950
21142
  const inlineStyles = matches[1].split(/\s+/);
20951
21143
  const inlineString = matches[2];
20952
- str = str.replace(matches[0], ansi$2.format(inlineString, inlineStyles));
21144
+ str = str.replace(matches[0], ansi$1.format(inlineString, inlineStyles));
20953
21145
  }
20954
- return styleArray && styleArray.length ? ansi$2.styles(styleArray) + str + ansi$2.style.reset : str;
21146
+ return styleArray && styleArray.length ? ansi$1.styles(styleArray) + str + ansi$1.style.reset : str;
20955
21147
  };
20956
- ansi$2.cursor = {
21148
+ ansi$1.cursor = {
20957
21149
  /**
20958
21150
  * Moves the cursor `lines` cells up. If the cursor is already at the edge of the screen, this has no effect
20959
21151
  * @param [lines=1] {number}
20960
21152
  * @return {string}
20961
21153
  */
20962
21154
  up: function(lines) {
20963
- return csi$2 + (lines || 1) + "A";
21155
+ return csi$1 + (lines || 1) + "A";
20964
21156
  },
20965
21157
  /**
20966
21158
  * Moves the cursor `lines` cells down. If the cursor is already at the edge of the screen, this has no effect
@@ -20968,7 +21160,7 @@ ansi$2.cursor = {
20968
21160
  * @return {string}
20969
21161
  */
20970
21162
  down: function(lines) {
20971
- return csi$2 + (lines || 1) + "B";
21163
+ return csi$1 + (lines || 1) + "B";
20972
21164
  },
20973
21165
  /**
20974
21166
  * Moves the cursor `lines` cells forward. If the cursor is already at the edge of the screen, this has no effect
@@ -20976,7 +21168,7 @@ ansi$2.cursor = {
20976
21168
  * @return {string}
20977
21169
  */
20978
21170
  forward: function(lines) {
20979
- return csi$2 + (lines || 1) + "C";
21171
+ return csi$1 + (lines || 1) + "C";
20980
21172
  },
20981
21173
  /**
20982
21174
  * Moves the cursor `lines` cells back. If the cursor is already at the edge of the screen, this has no effect
@@ -20984,7 +21176,7 @@ ansi$2.cursor = {
20984
21176
  * @return {string}
20985
21177
  */
20986
21178
  back: function(lines) {
20987
- return csi$2 + (lines || 1) + "D";
21179
+ return csi$1 + (lines || 1) + "D";
20988
21180
  },
20989
21181
  /**
20990
21182
  * Moves cursor to beginning of the line n lines down.
@@ -20992,7 +21184,7 @@ ansi$2.cursor = {
20992
21184
  * @return {string}
20993
21185
  */
20994
21186
  nextLine: function(lines) {
20995
- return csi$2 + (lines || 1) + "E";
21187
+ return csi$1 + (lines || 1) + "E";
20996
21188
  },
20997
21189
  /**
20998
21190
  * Moves cursor to beginning of the line n lines up.
@@ -21000,7 +21192,7 @@ ansi$2.cursor = {
21000
21192
  * @return {string}
21001
21193
  */
21002
21194
  previousLine: function(lines) {
21003
- return csi$2 + (lines || 1) + "F";
21195
+ return csi$1 + (lines || 1) + "F";
21004
21196
  },
21005
21197
  /**
21006
21198
  * Moves the cursor to column n.
@@ -21008,7 +21200,7 @@ ansi$2.cursor = {
21008
21200
  * @return {string}
21009
21201
  */
21010
21202
  horizontalAbsolute: function(n) {
21011
- return csi$2 + n + "G";
21203
+ return csi$1 + n + "G";
21012
21204
  },
21013
21205
  /**
21014
21206
  * Moves the cursor to row n, column m. The values are 1-based, and default to 1 (top left corner) if omitted.
@@ -21017,25 +21209,25 @@ ansi$2.cursor = {
21017
21209
  * @return {string}
21018
21210
  */
21019
21211
  position: function(n, m) {
21020
- return csi$2 + (n || 1) + ";" + (m || 1) + "H";
21212
+ return csi$1 + (n || 1) + ";" + (m || 1) + "H";
21021
21213
  },
21022
21214
  /**
21023
21215
  * Hides the cursor
21024
21216
  */
21025
- hide: csi$2 + "?25l",
21217
+ hide: csi$1 + "?25l",
21026
21218
  /**
21027
21219
  * Shows the cursor
21028
21220
  */
21029
- show: csi$2 + "?25h"
21221
+ show: csi$1 + "?25h"
21030
21222
  };
21031
- ansi$2.erase = {
21223
+ ansi$1.erase = {
21032
21224
  /**
21033
21225
  * Clears part of the screen. If n is 0 (or missing), clear from cursor to end of screen. If n is 1, clear from cursor to beginning of the screen. If n is 2, clear entire screen.
21034
21226
  * @param n {number}
21035
21227
  * @return {string}
21036
21228
  */
21037
21229
  display: function(n) {
21038
- return csi$2 + (n || 0) + "J";
21230
+ return csi$1 + (n || 0) + "J";
21039
21231
  },
21040
21232
  /**
21041
21233
  * Erases part of the line. If n is zero (or missing), clear from cursor to the end of the line. If n is one, clear from cursor to beginning of the line. If n is two, clear entire line. Cursor position does not change.
@@ -21043,7 +21235,7 @@ ansi$2.erase = {
21043
21235
  * @return {string}
21044
21236
  */
21045
21237
  inLine: function(n) {
21046
- return csi$2 + (n || 0) + "K";
21238
+ return csi$1 + (n || 0) + "K";
21047
21239
  }
21048
21240
  };
21049
21241
  const pkg$6 = {
@@ -21083,13 +21275,13 @@ Commands:
21083
21275
  terminal.writeln("No HID devices connected");
21084
21276
  break;
21085
21277
  }
21086
- terminal.writeln(`${ansi$2.style.bold}🎮 Connected HID Devices:${ansi$2.style.reset}`);
21278
+ terminal.writeln(`${ansi$1.style.bold}🎮 Connected HID Devices:${ansi$1.style.reset}`);
21087
21279
  uniqueDevices.forEach((device2) => {
21088
21280
  terminal.writeln(`
21089
- 📱 Device ID: ${ansi$2.style.cyan}${device2.productId}${ansi$2.style.reset}
21090
- 📝 Name: ${ansi$2.style.cyan}${device2.productName}${ansi$2.style.reset}
21091
- 🏢 Manufacturer: ${ansi$2.style.cyan}${device2.vendorId}${ansi$2.style.reset}
21092
- 🔌 Connected: ${ansi$2.style.cyan}${device2.opened ? "Yes" : "No"}${ansi$2.style.reset}`);
21281
+ 📱 Device ID: ${ansi$1.style.cyan}${device2.productId}${ansi$1.style.reset}
21282
+ 📝 Name: ${ansi$1.style.cyan}${device2.productName}${ansi$1.style.reset}
21283
+ 🏢 Manufacturer: ${ansi$1.style.cyan}${device2.vendorId}${ansi$1.style.reset}
21284
+ 🔌 Connected: ${ansi$1.style.cyan}${device2.opened ? "Yes" : "No"}${ansi$1.style.reset}`);
21093
21285
  });
21094
21286
  break;
21095
21287
  case "request":
@@ -21146,7 +21338,7 @@ Commands:
21146
21338
  terminal.writeln(`Device with ID ${args[1]} not found`);
21147
21339
  return 1;
21148
21340
  }
21149
- terminal.writeln(`${ansi$2.style.bold}Device Information:${ansi$2.style.reset}
21341
+ terminal.writeln(`${ansi$1.style.bold}Device Information:${ansi$1.style.reset}
21150
21342
  Product ID: ${targetDevice.productId}
21151
21343
  Vendor ID: ${targetDevice.vendorId}
21152
21344
  Product Name: ${targetDevice.productName}
@@ -21458,26 +21650,26 @@ const PresentationDevice = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
21458
21650
  getDrivers: getDrivers$4,
21459
21651
  pkg: pkg$4
21460
21652
  }, Symbol.toStringTag, { value: "Module" }));
21461
- function isObject$3(input) {
21653
+ function isObject$2(input) {
21462
21654
  return typeof input === "object" && input !== null;
21463
21655
  }
21464
- function isArrayLike$2(input) {
21465
- return isObject$3(input) && typeof input.length === "number";
21656
+ function isArrayLike$1(input) {
21657
+ return isObject$2(input) && typeof input.length === "number";
21466
21658
  }
21467
- function arrayify$1(input) {
21659
+ function arrayify(input) {
21468
21660
  if (Array.isArray(input)) {
21469
21661
  return input;
21470
21662
  } else if (input === void 0) {
21471
21663
  return [];
21472
- } else if (isArrayLike$2(input) || input instanceof Set) {
21664
+ } else if (isArrayLike$1(input) || input instanceof Set) {
21473
21665
  return Array.from(input);
21474
21666
  } else {
21475
21667
  return [input];
21476
21668
  }
21477
21669
  }
21478
- const csi$1 = "\x1B[";
21479
- const ansi$1 = {};
21480
- ansi$1.style = {
21670
+ const csi = "\x1B[";
21671
+ const ansi = {};
21672
+ ansi.style = {
21481
21673
  reset: "\x1B[0m",
21482
21674
  bold: "\x1B[1m",
21483
21675
  italic: "\x1B[3m",
@@ -21525,29 +21717,29 @@ ansi$1.style = {
21525
21717
  "bg-brightCyan": "\x1B[106m",
21526
21718
  "bg-brightWhite": "\x1B[107m"
21527
21719
  };
21528
- ansi$1.rgb = function(r, g, b) {
21720
+ ansi.rgb = function(r, g, b) {
21529
21721
  return `\x1B[38;2;${r};${g};${b}m`;
21530
21722
  };
21531
- ansi$1.bgRgb = function(r, g, b) {
21723
+ ansi.bgRgb = function(r, g, b) {
21532
21724
  return `\x1B[48;2;${r};${g};${b}m`;
21533
21725
  };
21534
- ansi$1.styles = function(styles2) {
21535
- styles2 = arrayify$1(styles2);
21726
+ ansi.styles = function(styles2) {
21727
+ styles2 = arrayify(styles2);
21536
21728
  return styles2.map(function(effect) {
21537
21729
  const rgbMatches = effect.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
21538
21730
  const bgRgbMatches = effect.match(/bg-rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
21539
21731
  if (bgRgbMatches) {
21540
21732
  const [full, r, g, b] = bgRgbMatches;
21541
- return ansi$1.bgRgb(r, g, b);
21733
+ return ansi.bgRgb(r, g, b);
21542
21734
  } else if (rgbMatches) {
21543
21735
  const [full, r, g, b] = rgbMatches;
21544
- return ansi$1.rgb(r, g, b);
21736
+ return ansi.rgb(r, g, b);
21545
21737
  } else {
21546
- return ansi$1.style[effect];
21738
+ return ansi.style[effect];
21547
21739
  }
21548
21740
  }).join("");
21549
21741
  };
21550
- ansi$1.format = function(str, styleArray) {
21742
+ ansi.format = function(str, styleArray) {
21551
21743
  const re2 = /\[([\w\s-\(\),]+)\]{([^]*?)}/;
21552
21744
  let matches;
21553
21745
  str = String(str);
@@ -21555,18 +21747,18 @@ ansi$1.format = function(str, styleArray) {
21555
21747
  while (matches = str.match(re2)) {
21556
21748
  const inlineStyles = matches[1].split(/\s+/);
21557
21749
  const inlineString = matches[2];
21558
- str = str.replace(matches[0], ansi$1.format(inlineString, inlineStyles));
21750
+ str = str.replace(matches[0], ansi.format(inlineString, inlineStyles));
21559
21751
  }
21560
- return styleArray && styleArray.length ? ansi$1.styles(styleArray) + str + ansi$1.style.reset : str;
21752
+ return styleArray && styleArray.length ? ansi.styles(styleArray) + str + ansi.style.reset : str;
21561
21753
  };
21562
- ansi$1.cursor = {
21754
+ ansi.cursor = {
21563
21755
  /**
21564
21756
  * Moves the cursor `lines` cells up. If the cursor is already at the edge of the screen, this has no effect
21565
21757
  * @param [lines=1] {number}
21566
21758
  * @return {string}
21567
21759
  */
21568
21760
  up: function(lines) {
21569
- return csi$1 + (lines || 1) + "A";
21761
+ return csi + (lines || 1) + "A";
21570
21762
  },
21571
21763
  /**
21572
21764
  * Moves the cursor `lines` cells down. If the cursor is already at the edge of the screen, this has no effect
@@ -21574,7 +21766,7 @@ ansi$1.cursor = {
21574
21766
  * @return {string}
21575
21767
  */
21576
21768
  down: function(lines) {
21577
- return csi$1 + (lines || 1) + "B";
21769
+ return csi + (lines || 1) + "B";
21578
21770
  },
21579
21771
  /**
21580
21772
  * Moves the cursor `lines` cells forward. If the cursor is already at the edge of the screen, this has no effect
@@ -21582,7 +21774,7 @@ ansi$1.cursor = {
21582
21774
  * @return {string}
21583
21775
  */
21584
21776
  forward: function(lines) {
21585
- return csi$1 + (lines || 1) + "C";
21777
+ return csi + (lines || 1) + "C";
21586
21778
  },
21587
21779
  /**
21588
21780
  * Moves the cursor `lines` cells back. If the cursor is already at the edge of the screen, this has no effect
@@ -21590,7 +21782,7 @@ ansi$1.cursor = {
21590
21782
  * @return {string}
21591
21783
  */
21592
21784
  back: function(lines) {
21593
- return csi$1 + (lines || 1) + "D";
21785
+ return csi + (lines || 1) + "D";
21594
21786
  },
21595
21787
  /**
21596
21788
  * Moves cursor to beginning of the line n lines down.
@@ -21598,7 +21790,7 @@ ansi$1.cursor = {
21598
21790
  * @return {string}
21599
21791
  */
21600
21792
  nextLine: function(lines) {
21601
- return csi$1 + (lines || 1) + "E";
21793
+ return csi + (lines || 1) + "E";
21602
21794
  },
21603
21795
  /**
21604
21796
  * Moves cursor to beginning of the line n lines up.
@@ -21606,7 +21798,7 @@ ansi$1.cursor = {
21606
21798
  * @return {string}
21607
21799
  */
21608
21800
  previousLine: function(lines) {
21609
- return csi$1 + (lines || 1) + "F";
21801
+ return csi + (lines || 1) + "F";
21610
21802
  },
21611
21803
  /**
21612
21804
  * Moves the cursor to column n.
@@ -21614,7 +21806,7 @@ ansi$1.cursor = {
21614
21806
  * @return {string}
21615
21807
  */
21616
21808
  horizontalAbsolute: function(n) {
21617
- return csi$1 + n + "G";
21809
+ return csi + n + "G";
21618
21810
  },
21619
21811
  /**
21620
21812
  * Moves the cursor to row n, column m. The values are 1-based, and default to 1 (top left corner) if omitted.
@@ -21623,25 +21815,25 @@ ansi$1.cursor = {
21623
21815
  * @return {string}
21624
21816
  */
21625
21817
  position: function(n, m) {
21626
- return csi$1 + (n || 1) + ";" + (m || 1) + "H";
21818
+ return csi + (n || 1) + ";" + (m || 1) + "H";
21627
21819
  },
21628
21820
  /**
21629
21821
  * Hides the cursor
21630
21822
  */
21631
- hide: csi$1 + "?25l",
21823
+ hide: csi + "?25l",
21632
21824
  /**
21633
21825
  * Shows the cursor
21634
21826
  */
21635
- show: csi$1 + "?25h"
21827
+ show: csi + "?25h"
21636
21828
  };
21637
- ansi$1.erase = {
21829
+ ansi.erase = {
21638
21830
  /**
21639
21831
  * Clears part of the screen. If n is 0 (or missing), clear from cursor to end of screen. If n is 1, clear from cursor to beginning of the screen. If n is 2, clear entire screen.
21640
21832
  * @param n {number}
21641
21833
  * @return {string}
21642
21834
  */
21643
21835
  display: function(n) {
21644
- return csi$1 + (n || 0) + "J";
21836
+ return csi + (n || 0) + "J";
21645
21837
  },
21646
21838
  /**
21647
21839
  * Erases part of the line. If n is zero (or missing), clear from cursor to the end of the line. If n is one, clear from cursor to beginning of the line. If n is two, clear entire line. Cursor position does not change.
@@ -21649,7 +21841,7 @@ ansi$1.erase = {
21649
21841
  * @return {string}
21650
21842
  */
21651
21843
  inLine: function(n) {
21652
- return csi$1 + (n || 0) + "K";
21844
+ return csi + (n || 0) + "K";
21653
21845
  }
21654
21846
  };
21655
21847
  const pkg$3 = {
@@ -21681,7 +21873,7 @@ Commands:
21681
21873
  if ("Gyroscope" in globalThis) sensors.push("gyroscope");
21682
21874
  if ("LinearAccelerationSensor" in globalThis) sensors.push("linear");
21683
21875
  if ("AbsoluteOrientationSensor" in globalThis) sensors.push("orientation");
21684
- terminal.writeln(`${ansi$1.style.bold}📱 Available Sensors:${ansi$1.style.reset}`);
21876
+ terminal.writeln(`${ansi.style.bold}📱 Available Sensors:${ansi.style.reset}`);
21685
21877
  sensors.forEach((sensor2) => terminal.writeln(` - ${sensor2}`));
21686
21878
  break;
21687
21879
  case "read":
@@ -21902,27 +22094,27 @@ function displaySensorData(sensor, sensorType, terminal) {
21902
22094
  switch (sensorType) {
21903
22095
  case "accelerometer":
21904
22096
  case "linear":
21905
- terminal.writeln(`${ansi$1.style.bold}📊 ${sensorType.charAt(0).toUpperCase() + sensorType.slice(1)} Reading:${ansi$1.style.reset}
21906
- 🕒 Time: ${ansi$1.style.cyan}${timestamp}${ansi$1.style.reset}
21907
- X: ${ansi$1.style.cyan}${sensor.x.toFixed(2)}${ansi$1.style.reset} m/s²
21908
- Y: ${ansi$1.style.cyan}${sensor.y.toFixed(2)}${ansi$1.style.reset} m/s²
21909
- Z: ${ansi$1.style.cyan}${sensor.z.toFixed(2)}${ansi$1.style.reset} m/s²`);
22097
+ terminal.writeln(`${ansi.style.bold}📊 ${sensorType.charAt(0).toUpperCase() + sensorType.slice(1)} Reading:${ansi.style.reset}
22098
+ 🕒 Time: ${ansi.style.cyan}${timestamp}${ansi.style.reset}
22099
+ X: ${ansi.style.cyan}${sensor.x.toFixed(2)}${ansi.style.reset} m/s²
22100
+ Y: ${ansi.style.cyan}${sensor.y.toFixed(2)}${ansi.style.reset} m/s²
22101
+ Z: ${ansi.style.cyan}${sensor.z.toFixed(2)}${ansi.style.reset} m/s²`);
21910
22102
  break;
21911
22103
  case "gyroscope":
21912
- terminal.writeln(`${ansi$1.style.bold}📊 Gyroscope Reading:${ansi$1.style.reset}
21913
- 🕒 Time: ${ansi$1.style.cyan}${timestamp}${ansi$1.style.reset}
21914
- X: ${ansi$1.style.cyan}${sensor.x.toFixed(2)}${ansi$1.style.reset} rad/s
21915
- Y: ${ansi$1.style.cyan}${sensor.y.toFixed(2)}${ansi$1.style.reset} rad/s
21916
- Z: ${ansi$1.style.cyan}${sensor.z.toFixed(2)}${ansi$1.style.reset} rad/s`);
22104
+ terminal.writeln(`${ansi.style.bold}📊 Gyroscope Reading:${ansi.style.reset}
22105
+ 🕒 Time: ${ansi.style.cyan}${timestamp}${ansi.style.reset}
22106
+ X: ${ansi.style.cyan}${sensor.x.toFixed(2)}${ansi.style.reset} rad/s
22107
+ Y: ${ansi.style.cyan}${sensor.y.toFixed(2)}${ansi.style.reset} rad/s
22108
+ Z: ${ansi.style.cyan}${sensor.z.toFixed(2)}${ansi.style.reset} rad/s`);
21917
22109
  break;
21918
22110
  case "orientation":
21919
- terminal.writeln(`${ansi$1.style.bold}📊 Orientation Reading:${ansi$1.style.reset}
21920
- 🕒 Time: ${ansi$1.style.cyan}${timestamp}${ansi$1.style.reset}
22111
+ terminal.writeln(`${ansi.style.bold}📊 Orientation Reading:${ansi.style.reset}
22112
+ 🕒 Time: ${ansi.style.cyan}${timestamp}${ansi.style.reset}
21921
22113
  Quaternion:
21922
- X: ${ansi$1.style.cyan}${sensor.quaternion[0].toFixed(3)}${ansi$1.style.reset}
21923
- Y: ${ansi$1.style.cyan}${sensor.quaternion[1].toFixed(3)}${ansi$1.style.reset}
21924
- Z: ${ansi$1.style.cyan}${sensor.quaternion[2].toFixed(3)}${ansi$1.style.reset}
21925
- W: ${ansi$1.style.cyan}${sensor.quaternion[3].toFixed(3)}${ansi$1.style.reset}`);
22114
+ X: ${ansi.style.cyan}${sensor.quaternion[0].toFixed(3)}${ansi.style.reset}
22115
+ Y: ${ansi.style.cyan}${sensor.quaternion[1].toFixed(3)}${ansi.style.reset}
22116
+ Z: ${ansi.style.cyan}${sensor.quaternion[2].toFixed(3)}${ansi.style.reset}
22117
+ W: ${ansi.style.cyan}${sensor.quaternion[3].toFixed(3)}${ansi.style.reset}`);
21926
22118
  break;
21927
22119
  }
21928
22120
  }
@@ -22390,7 +22582,7 @@ class Dom {
22390
22582
  }
22391
22583
  async topbar(show) {
22392
22584
  if (!this._topbar) return;
22393
- const { default: topbar } = await import("./topbar.min-CYYqkupv.js").then((n) => n.t);
22585
+ const { default: topbar } = await import("./topbar.min-xBbuiIjv.js").then((n) => n.t);
22394
22586
  this._topbarShow = show ?? !this._topbarShow;
22395
22587
  if (this._topbarShow) topbar.show();
22396
22588
  else topbar.hide();
@@ -27190,16 +27382,16 @@ function hasOwn(obj, prop) {
27190
27382
  return Object.prototype.hasOwnProperty.call(obj, prop);
27191
27383
  }
27192
27384
  function isRegExp(re2) {
27193
- return isObject$2(re2) && objectToString(re2) === "[object RegExp]";
27385
+ return isObject$1(re2) && objectToString(re2) === "[object RegExp]";
27194
27386
  }
27195
- function isObject$2(arg) {
27387
+ function isObject$1(arg) {
27196
27388
  return typeof arg === "object" && arg !== null;
27197
27389
  }
27198
27390
  function isError$1(e2) {
27199
- return isObject$2(e2) && (objectToString(e2) === "[object Error]" || e2 instanceof Error);
27391
+ return isObject$1(e2) && (objectToString(e2) === "[object Error]" || e2 instanceof Error);
27200
27392
  }
27201
27393
  function isDate(d) {
27202
- return isObject$2(d) && objectToString(d) === "[object Date]";
27394
+ return isObject$1(d) && objectToString(d) === "[object Date]";
27203
27395
  }
27204
27396
  function objectToString(o) {
27205
27397
  return Object.prototype.toString.call(o);
@@ -27400,7 +27592,7 @@ function reduceToSingleString(output, base, braces) {
27400
27592
  }
27401
27593
  function _extend(origin, add) {
27402
27594
  const typedOrigin = { ...origin };
27403
- if (!add || !isObject$2(add))
27595
+ if (!add || !isObject$1(add))
27404
27596
  return origin;
27405
27597
  const clonedAdd = { ...add };
27406
27598
  const keys = Object.keys(add);
@@ -28002,200 +28194,6 @@ class Log extends Logger$1 {
28002
28194
  return this._name;
28003
28195
  }
28004
28196
  }
28005
- function isObject$1(input) {
28006
- return typeof input === "object" && input !== null;
28007
- }
28008
- function isArrayLike$1(input) {
28009
- return isObject$1(input) && typeof input.length === "number";
28010
- }
28011
- function arrayify(input) {
28012
- if (Array.isArray(input)) {
28013
- return input;
28014
- } else if (input === void 0) {
28015
- return [];
28016
- } else if (isArrayLike$1(input) || input instanceof Set) {
28017
- return Array.from(input);
28018
- } else {
28019
- return [input];
28020
- }
28021
- }
28022
- const csi = "\x1B[";
28023
- const ansi = {};
28024
- ansi.style = {
28025
- reset: "\x1B[0m",
28026
- bold: "\x1B[1m",
28027
- italic: "\x1B[3m",
28028
- underline: "\x1B[4m",
28029
- fontDefault: "\x1B[10m",
28030
- font2: "\x1B[11m",
28031
- font3: "\x1B[12m",
28032
- font4: "\x1B[13m",
28033
- font5: "\x1B[14m",
28034
- font6: "\x1B[15m",
28035
- imageNegative: "\x1B[7m",
28036
- imagePositive: "\x1B[27m",
28037
- black: "\x1B[30m",
28038
- red: "\x1B[31m",
28039
- green: "\x1B[32m",
28040
- yellow: "\x1B[33m",
28041
- blue: "\x1B[34m",
28042
- magenta: "\x1B[35m",
28043
- cyan: "\x1B[36m",
28044
- white: "\x1B[37m",
28045
- grey: "\x1B[90m",
28046
- gray: "\x1B[90m",
28047
- brightRed: "\x1B[91m",
28048
- brightGreen: "\x1B[92m",
28049
- brightYellow: "\x1B[93m",
28050
- brightBlue: "\x1B[94m",
28051
- brightMagenta: "\x1B[95m",
28052
- brightCyan: "\x1B[96m",
28053
- brightWhite: "\x1B[97m",
28054
- "bg-black": "\x1B[40m",
28055
- "bg-red": "\x1B[41m",
28056
- "bg-green": "\x1B[42m",
28057
- "bg-yellow": "\x1B[43m",
28058
- "bg-blue": "\x1B[44m",
28059
- "bg-magenta": "\x1B[45m",
28060
- "bg-cyan": "\x1B[46m",
28061
- "bg-white": "\x1B[47m",
28062
- "bg-grey": "\x1B[100m",
28063
- "bg-gray": "\x1B[100m",
28064
- "bg-brightRed": "\x1B[101m",
28065
- "bg-brightGreen": "\x1B[102m",
28066
- "bg-brightYellow": "\x1B[103m",
28067
- "bg-brightBlue": "\x1B[104m",
28068
- "bg-brightMagenta": "\x1B[105m",
28069
- "bg-brightCyan": "\x1B[106m",
28070
- "bg-brightWhite": "\x1B[107m"
28071
- };
28072
- ansi.rgb = function(r, g, b) {
28073
- return `\x1B[38;2;${r};${g};${b}m`;
28074
- };
28075
- ansi.bgRgb = function(r, g, b) {
28076
- return `\x1B[48;2;${r};${g};${b}m`;
28077
- };
28078
- ansi.styles = function(styles2) {
28079
- styles2 = arrayify(styles2);
28080
- return styles2.map(function(effect) {
28081
- const rgbMatches = effect.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
28082
- const bgRgbMatches = effect.match(/bg-rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
28083
- if (bgRgbMatches) {
28084
- const [full, r, g, b] = bgRgbMatches;
28085
- return ansi.bgRgb(r, g, b);
28086
- } else if (rgbMatches) {
28087
- const [full, r, g, b] = rgbMatches;
28088
- return ansi.rgb(r, g, b);
28089
- } else {
28090
- return ansi.style[effect];
28091
- }
28092
- }).join("");
28093
- };
28094
- ansi.format = function(str, styleArray) {
28095
- const re2 = /\[([\w\s-\(\),]+)\]{([^]*?)}/;
28096
- let matches;
28097
- str = String(str);
28098
- if (!str) return "";
28099
- while (matches = str.match(re2)) {
28100
- const inlineStyles = matches[1].split(/\s+/);
28101
- const inlineString = matches[2];
28102
- str = str.replace(matches[0], ansi.format(inlineString, inlineStyles));
28103
- }
28104
- return styleArray && styleArray.length ? ansi.styles(styleArray) + str + ansi.style.reset : str;
28105
- };
28106
- ansi.cursor = {
28107
- /**
28108
- * Moves the cursor `lines` cells up. If the cursor is already at the edge of the screen, this has no effect
28109
- * @param [lines=1] {number}
28110
- * @return {string}
28111
- */
28112
- up: function(lines) {
28113
- return csi + (lines || 1) + "A";
28114
- },
28115
- /**
28116
- * Moves the cursor `lines` cells down. If the cursor is already at the edge of the screen, this has no effect
28117
- * @param [lines=1] {number}
28118
- * @return {string}
28119
- */
28120
- down: function(lines) {
28121
- return csi + (lines || 1) + "B";
28122
- },
28123
- /**
28124
- * Moves the cursor `lines` cells forward. If the cursor is already at the edge of the screen, this has no effect
28125
- * @param [lines=1] {number}
28126
- * @return {string}
28127
- */
28128
- forward: function(lines) {
28129
- return csi + (lines || 1) + "C";
28130
- },
28131
- /**
28132
- * Moves the cursor `lines` cells back. If the cursor is already at the edge of the screen, this has no effect
28133
- * @param [lines=1] {number}
28134
- * @return {string}
28135
- */
28136
- back: function(lines) {
28137
- return csi + (lines || 1) + "D";
28138
- },
28139
- /**
28140
- * Moves cursor to beginning of the line n lines down.
28141
- * @param [lines=1] {number}
28142
- * @return {string}
28143
- */
28144
- nextLine: function(lines) {
28145
- return csi + (lines || 1) + "E";
28146
- },
28147
- /**
28148
- * Moves cursor to beginning of the line n lines up.
28149
- * @param [lines=1] {number}
28150
- * @return {string}
28151
- */
28152
- previousLine: function(lines) {
28153
- return csi + (lines || 1) + "F";
28154
- },
28155
- /**
28156
- * Moves the cursor to column n.
28157
- * @param n {number} - column number
28158
- * @return {string}
28159
- */
28160
- horizontalAbsolute: function(n) {
28161
- return csi + n + "G";
28162
- },
28163
- /**
28164
- * Moves the cursor to row n, column m. The values are 1-based, and default to 1 (top left corner) if omitted.
28165
- * @param n {number} - row number
28166
- * @param m {number} - column number
28167
- * @return {string}
28168
- */
28169
- position: function(n, m) {
28170
- return csi + (n || 1) + ";" + (m || 1) + "H";
28171
- },
28172
- /**
28173
- * Hides the cursor
28174
- */
28175
- hide: csi + "?25l",
28176
- /**
28177
- * Shows the cursor
28178
- */
28179
- show: csi + "?25h"
28180
- };
28181
- ansi.erase = {
28182
- /**
28183
- * Clears part of the screen. If n is 0 (or missing), clear from cursor to end of screen. If n is 1, clear from cursor to beginning of the screen. If n is 2, clear entire screen.
28184
- * @param n {number}
28185
- * @return {string}
28186
- */
28187
- display: function(n) {
28188
- return csi + (n || 0) + "J";
28189
- },
28190
- /**
28191
- * Erases part of the line. If n is zero (or missing), clear from cursor to the end of the line. If n is one, clear from cursor to beginning of the line. If n is two, clear entire line. Cursor position does not change.
28192
- * @param n {number}
28193
- * @return {string}
28194
- */
28195
- inLine: function(n) {
28196
- return csi + (n || 0) + "K";
28197
- }
28198
- };
28199
28197
  const dots = { "interval": 80, "frames": ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"] };
28200
28198
  const dots2 = { "interval": 80, "frames": ["⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷"] };
28201
28199
  const dots3 = { "interval": 80, "frames": ["⠋", "⠙", "⠚", "⠞", "⠖", "⠦", "⠴", "⠲", "⠳", "⠓"] };
@@ -38823,7 +38821,7 @@ class ArgvArray extends Array {
38823
38821
  load(argv) {
38824
38822
  this.clear();
38825
38823
  if (argv && argv !== process$1$1.argv) {
38826
- argv = arrayify(argv);
38824
+ argv = arrayify$5(argv);
38827
38825
  } else {
38828
38826
  argv = process$1$1.argv.slice(0);
38829
38827
  const deleteCount = process$1$1.execArgv.some(isExecArg) ? 1 : 2;
@@ -39151,7 +39149,7 @@ class Definitions extends Array {
39151
39149
  }
39152
39150
  static from(definitions, caseInsensitive) {
39153
39151
  if (definitions instanceof this) return definitions;
39154
- const result = super.from(arrayify(definitions), (def) => OptionDefinition.create(def));
39152
+ const result = super.from(arrayify$5(definitions), (def) => OptionDefinition.create(def));
39155
39153
  result.validate(caseInsensitive);
39156
39154
  return result;
39157
39155
  }
@@ -39162,7 +39160,7 @@ function halt(name, message) {
39162
39160
  throw err2;
39163
39161
  }
39164
39162
  function containsValidGroup(def) {
39165
- return arrayify(def.group).some((group) => group);
39163
+ return arrayify$5(def.group).some((group) => group);
39166
39164
  }
39167
39165
  function hasDuplicates(array) {
39168
39166
  const items = {};
@@ -39314,7 +39312,7 @@ class Option {
39314
39312
  resetToDefault() {
39315
39313
  if (t.isDefined(this.definition.defaultValue)) {
39316
39314
  if (this.definition.isMultiple()) {
39317
- _value$1.set(this, arrayify(this.definition.defaultValue).slice());
39315
+ _value$1.set(this, arrayify$5(this.definition.defaultValue).slice());
39318
39316
  } else {
39319
39317
  _value$1.set(this, this.definition.defaultValue);
39320
39318
  }
@@ -39719,7 +39717,7 @@ class GroupedOutput extends Output {
39719
39717
  this.definitions.whereGrouped().forEach((def) => {
39720
39718
  const name = options.camelCase ? camelCase(def.name) : def.name;
39721
39719
  const outputValue = superOutputNoCamel[def.name];
39722
- for (const groupName of arrayify(def.group)) {
39720
+ for (const groupName of arrayify$5(def.group)) {
39723
39721
  grouped[groupName] = grouped[groupName] || {};
39724
39722
  if (t.isDefined(outputValue)) {
39725
39723
  grouped[groupName][name] = outputValue;
@@ -41436,7 +41434,7 @@ class Section {
41436
41434
  }
41437
41435
  add(lines) {
41438
41436
  if (lines) {
41439
- arrayify(lines).forEach((line3) => this.lines.push(line3));
41437
+ arrayify$5(lines).forEach((line3) => this.lines.push(line3));
41440
41438
  } else {
41441
41439
  this.lines.push("");
41442
41440
  }
@@ -41485,7 +41483,7 @@ class Rows {
41485
41483
  this.load(rows, columns);
41486
41484
  }
41487
41485
  load(rows, columns) {
41488
- for (const row of arrayify(rows)) {
41486
+ for (const row of arrayify$5(rows)) {
41489
41487
  const map = new Map(columns.list.map((column) => [column, new Cell(row[column.name], column)]));
41490
41488
  this.list.push(map);
41491
41489
  }
@@ -41544,7 +41542,7 @@ const _maxWidth = /* @__PURE__ */ new WeakMap();
41544
41542
  class Columns {
41545
41543
  constructor(columns) {
41546
41544
  this.list = [];
41547
- for (const column of arrayify(columns)) {
41545
+ for (const column of arrayify$5(columns)) {
41548
41546
  this.add(column);
41549
41547
  }
41550
41548
  }
@@ -41629,7 +41627,7 @@ class Columns {
41629
41627
  */
41630
41628
  static getColumns(rows) {
41631
41629
  const columns = new Columns();
41632
- for (const row of arrayify(rows)) {
41630
+ for (const row of arrayify$5(rows)) {
41633
41631
  for (const columnName in row) {
41634
41632
  let column = columns.get(columnName);
41635
41633
  if (!column) {
@@ -41856,7 +41854,7 @@ class Table {
41856
41854
  column.get = optionColumn.get;
41857
41855
  }
41858
41856
  }
41859
- for (const row of arrayify(data)) {
41857
+ for (const row of arrayify$5(data)) {
41860
41858
  for (const columnName in row) {
41861
41859
  const column = this.columns.get(columnName);
41862
41860
  const cell = new Cell(row[columnName], column);
@@ -41937,9 +41935,9 @@ class Table {
41937
41935
  class OptionList extends Section {
41938
41936
  constructor(data) {
41939
41937
  super();
41940
- let definitions = arrayify(data.optionList);
41941
- const hide = arrayify(data.hide);
41942
- const groups = arrayify(data.group);
41938
+ let definitions = arrayify$5(data.optionList);
41939
+ const hide = arrayify$5(data.hide);
41940
+ const groups = arrayify$5(data.group);
41943
41941
  if (hide.length) {
41944
41942
  definitions = definitions.filter((definition) => {
41945
41943
  return hide.indexOf(definition.name) === -1;
@@ -41949,7 +41947,7 @@ class OptionList extends Section {
41949
41947
  if (groups.length) {
41950
41948
  definitions = definitions.filter((def) => {
41951
41949
  const noGroupMatch = groups.indexOf("_none") > -1 && def.group === void 0;
41952
- const groupMatch = intersect(arrayify(def.group), groups);
41950
+ const groupMatch = intersect(arrayify$5(def.group), groups);
41953
41951
  return noGroupMatch || groupMatch ? def : void 0;
41954
41952
  });
41955
41953
  }
@@ -42011,7 +42009,7 @@ class ContentSection extends Section {
42011
42009
  this.header(section.header);
42012
42010
  if (section.content) {
42013
42011
  if (section.raw) {
42014
- const content = arrayify(section.content).map((line3) => chalkFormat(line3));
42012
+ const content = arrayify$5(section.content).map((line3) => chalkFormat(line3));
42015
42013
  this.add(content);
42016
42014
  } else {
42017
42015
  this.add(getContentLines(section.content));
@@ -42078,7 +42076,7 @@ function ansiFormatRow(row) {
42078
42076
  return row;
42079
42077
  }
42080
42078
  function commandLineUsage(sections) {
42081
- sections = arrayify(sections);
42079
+ sections = arrayify$5(sections);
42082
42080
  if (sections.length) {
42083
42081
  const output = sections.map((section) => {
42084
42082
  if (section.optionList) {
@@ -50615,7 +50613,7 @@ async function createSimpleWebSocket(url) {
50615
50613
  case "node": {
50616
50614
  let WebSocket2;
50617
50615
  try {
50618
- WebSocket2 = (await import("./browser-CoSyrw7Q.js").then((n) => n.b)).default;
50616
+ WebSocket2 = (await import("./browser-C0q0NWWv.js").then((n) => n.b)).default;
50619
50617
  } catch (error) {
50620
50618
  try {
50621
50619
  WebSocket2 = __require("ws");
@@ -69557,7 +69555,7 @@ const TerminalCommands = (kernel, shell, terminal) => {
69557
69555
  { name: "reinstall", type: Boolean, description: "Reinstall the package if it is already installed" }
69558
69556
  ],
69559
69557
  run: async (argv) => {
69560
- const { default: install } = await import("./install--B0gJ8Dk.js");
69558
+ const { default: install } = await import("./install-C64fBUI2.js");
69561
69559
  return await install({ kernel, shell, terminal, args: [argv.package, argv.registry, argv.reinstall] });
69562
69560
  }
69563
69561
  }),
@@ -70122,7 +70120,7 @@ const edit = async ({ kernel, shell, terminal, args }) => {
70122
70120
  let mode2 = "normal";
70123
70121
  let startLine = 0;
70124
70122
  const renderScreen = () => {
70125
- terminal.write(ansi.erase.display(2) + ansi.cursor.position(0, 0));
70123
+ terminal.write(ansi$5.erase.display(2) + ansi$5.cursor.position(0, 0));
70126
70124
  const visibleLines = lines.slice(startLine, startLine + terminal.rows - 1);
70127
70125
  visibleLines.forEach((line3) => terminal.writeln(line3));
70128
70126
  let modeColor = chalk$1.gray;
@@ -70208,7 +70206,7 @@ const edit = async ({ kernel, shell, terminal, args }) => {
70208
70206
  }
70209
70207
  break;
70210
70208
  case ":":
70211
- terminal.write(ansi.cursor.position(terminal.rows, 0) + ansi.erase.inLine());
70209
+ terminal.write(ansi$5.cursor.position(terminal.rows, 0) + ansi$5.erase.inLine());
70212
70210
  const cmdLine = await terminal.readline(":", false, true);
70213
70211
  const lineNum = parseInt(cmdLine);
70214
70212
  if (!isNaN(lineNum)) {
@@ -70371,7 +70369,7 @@ const edit = async ({ kernel, shell, terminal, args }) => {
70371
70369
  break;
70372
70370
  }
70373
70371
  }
70374
- terminal.write(ansi.erase.display(2) + ansi.cursor.position());
70372
+ terminal.write(ansi$5.erase.display(2) + ansi$5.cursor.position());
70375
70373
  terminal.listen();
70376
70374
  };
70377
70375
  const env = async ({ shell, terminal, args }) => {
@@ -70747,7 +70745,7 @@ const snake = ({ kernel, terminal }) => {
70747
70745
  const gameBoard = Array(height).fill(null).map(() => Array(width).fill(" "));
70748
70746
  snake2.forEach((segment3) => gameBoard[segment3.y][segment3.x] = segment3.y === snake2[0].y && segment3.x === snake2[0].x ? chalk$1.yellow("█") : chalk$1.gray("█"));
70749
70747
  gameBoard[food.y][food.x] = chalk$1.green("●");
70750
- terminal.write(ansi.erase.display(2) + ansi.cursor.position(2, 1));
70748
+ terminal.write(ansi$5.erase.display(2) + ansi$5.cursor.position(2, 1));
70751
70749
  terminal.writeln(chalk$1.blue("┌" + "─".repeat(width) + "┐"));
70752
70750
  gameBoard.forEach((row) => terminal.writeln(chalk$1.blue("│" + row.join("") + "│")));
70753
70751
  terminal.writeln(chalk$1.blue(`└${"─".repeat(width)}┘`));
@@ -70767,7 +70765,7 @@ const snake = ({ kernel, terminal }) => {
70767
70765
  } else snake2.pop();
70768
70766
  return;
70769
70767
  };
70770
- terminal.write(ansi.cursor.hide);
70768
+ terminal.write(ansi$5.cursor.hide);
70771
70769
  terminal.unlisten();
70772
70770
  renderGame();
70773
70771
  const keyListener = terminal.onKey(({ domEvent }) => {
@@ -70807,7 +70805,7 @@ const snake = ({ kernel, terminal }) => {
70807
70805
  terminal.listen();
70808
70806
  clearInterval(gameLoop);
70809
70807
  terminal.writeln("Game Over!");
70810
- terminal.write(ansi.cursor.show + terminal.prompt());
70808
+ terminal.write(ansi$5.cursor.show + terminal.prompt());
70811
70809
  return;
70812
70810
  }
70813
70811
  if (!gameStarted) return;
@@ -71211,7 +71209,7 @@ class Terminal extends xtermExports.Terminal {
71211
71209
  if (!options.kernel) throw new Error("Terminal requires a kernel");
71212
71210
  super({ ...DefaultTerminalOptions, ...options });
71213
71211
  __publicField(this, "_addons", /* @__PURE__ */ new Map());
71214
- __publicField(this, "_ansi", ansi);
71212
+ __publicField(this, "_ansi", ansi$5);
71215
71213
  __publicField(this, "_cmd", "");
71216
71214
  __publicField(this, "_commands");
71217
71215
  __publicField(this, "_cursorPosition", 0);
@@ -71453,18 +71451,18 @@ class Terminal extends xtermExports.Terminal {
71453
71451
  resolve2(input);
71454
71452
  break;
71455
71453
  case "ArrowLeft":
71456
- this.write(ansi.cursor.back());
71454
+ this.write(ansi$5.cursor.back());
71457
71455
  cursor--;
71458
71456
  break;
71459
71457
  case "ArrowRight":
71460
- this.write(ansi.cursor.forward());
71458
+ this.write(ansi$5.cursor.forward());
71461
71459
  cursor++;
71462
71460
  break;
71463
71461
  case "Home":
71464
- this.write(ansi.cursor.horizontalAbsolute(0));
71462
+ this.write(ansi$5.cursor.horizontalAbsolute(0));
71465
71463
  break;
71466
71464
  case "End":
71467
- this.write(ansi.cursor.horizontalAbsolute(input.length));
71465
+ this.write(ansi$5.cursor.horizontalAbsolute(input.length));
71468
71466
  break;
71469
71467
  case "Escape":
71470
71468
  disposable.dispose();
@@ -71473,7 +71471,7 @@ class Terminal extends xtermExports.Terminal {
71473
71471
  case "Backspace":
71474
71472
  if (cursor > 0) {
71475
71473
  input = input.slice(0, cursor - 1) + input.slice(cursor);
71476
- this.write(ansi.cursor.horizontalAbsolute(0) + ansi.erase.inLine(2) + ":" + input);
71474
+ this.write(ansi$5.cursor.horizontalAbsolute(0) + ansi$5.erase.inLine(2) + ":" + input);
71477
71475
  cursor--;
71478
71476
  } else this.write("\x07");
71479
71477
  break;
@@ -71483,7 +71481,7 @@ class Terminal extends xtermExports.Terminal {
71483
71481
  default:
71484
71482
  if (domEvent.key.length === 1 && domEvent.key.match(/^[a-zA-Z0-9]$/)) {
71485
71483
  input = input.slice(0, cursor) + domEvent.key + input.slice(cursor);
71486
- if (!hide) this.write(ansi.cursor.horizontalAbsolute(0) + ansi.erase.inLine(2) + prompt + input);
71484
+ if (!hide) this.write(ansi$5.cursor.horizontalAbsolute(0) + ansi$5.erase.inLine(2) + prompt + input);
71487
71485
  cursor++;
71488
71486
  }
71489
71487
  }
@@ -71526,7 +71524,7 @@ class Terminal extends xtermExports.Terminal {
71526
71524
  this._cmd = "";
71527
71525
  this._cursorPosition = 0;
71528
71526
  this.unlisten();
71529
- this.write("\n" + this.prompt());
71527
+ this.write(this.prompt());
71530
71528
  this.listen();
71531
71529
  return;
71532
71530
  case "l":
@@ -71534,7 +71532,7 @@ class Terminal extends xtermExports.Terminal {
71534
71532
  case "v":
71535
71533
  return this.paste();
71536
71534
  case "Escape":
71537
- return this.write(ansi.erase.display(2) + ansi.cursor.position() + this.prompt());
71535
+ return this.write(ansi$5.erase.display(2) + ansi$5.cursor.position() + this.prompt());
71538
71536
  }
71539
71537
  }
71540
71538
  switch (keyName) {
@@ -71576,7 +71574,7 @@ class Terminal extends xtermExports.Terminal {
71576
71574
  }
71577
71575
  this._cmd = "";
71578
71576
  this._cursorPosition = 0;
71579
- this.write(this.prompt());
71577
+ this.write("\n" + ansi$5.erase.inLine(2) + this.prompt());
71580
71578
  break;
71581
71579
  case "Backspace":
71582
71580
  if (this._cursorPosition > 0) {
@@ -71590,7 +71588,7 @@ class Terminal extends xtermExports.Terminal {
71590
71588
  case "Delete":
71591
71589
  if (this._cursorPosition < this._cmd.length) {
71592
71590
  this._cmd = this._cmd.slice(0, this._cursorPosition) + this._cmd.slice(this._cursorPosition + 1);
71593
- this.write(ansi.erase.inLine(2) + ansi.cursor.horizontalAbsolute(0));
71591
+ this.write(ansi$5.erase.inLine(2) + ansi$5.cursor.horizontalAbsolute(0));
71594
71592
  if (this._multiLineMode) {
71595
71593
  const parts = this._cmd.split("#");
71596
71594
  if (parts.length > 1) {
@@ -71669,11 +71667,11 @@ class Terminal extends xtermExports.Terminal {
71669
71667
  break;
71670
71668
  case "Home":
71671
71669
  this._cursorPosition = 0;
71672
- this.write(ansi.cursor.horizontalAbsolute(this.prompt().replace(/\x1b\[[0-9;]*[a-zA-Z]/g, "").length + 1));
71670
+ this.write(ansi$5.cursor.horizontalAbsolute(this.prompt().replace(/\x1b\[[0-9;]*[a-zA-Z]/g, "").length + 1));
71673
71671
  break;
71674
71672
  case "End":
71675
71673
  this._cursorPosition = this._cmd.length + 1;
71676
- this.write(ansi.cursor.horizontalAbsolute(this.prompt().replace(/\x1b\[[0-9;]*[a-zA-Z]/g, "").length + this._cmd.length + 1));
71674
+ this.write(ansi$5.cursor.horizontalAbsolute(this.prompt().replace(/\x1b\[[0-9;]*[a-zA-Z]/g, "").length + this._cmd.length + 1));
71677
71675
  break;
71678
71676
  case "Tab": {
71679
71677
  domEvent.preventDefault();
@@ -71690,7 +71688,7 @@ class Terminal extends xtermExports.Terminal {
71690
71688
  await this._shell.execute(`ls ${path2}`);
71691
71689
  this.write(this.prompt() + this._cmd);
71692
71690
  } else if (matches.length > 0) {
71693
- this.write("\r" + ansi.erase.inLine());
71691
+ this.write("\r" + ansi$5.erase.inLine());
71694
71692
  this._tabCompletionIndex = (this._tabCompletionIndex + 1) % matches.length;
71695
71693
  const newCmd = matches[this._tabCompletionIndex] || "";
71696
71694
  this._cmd = newCmd;
@@ -71709,7 +71707,7 @@ class Terminal extends xtermExports.Terminal {
71709
71707
  if (key.length === 1) {
71710
71708
  this._cmd = this._cmd.slice(0, this._cursorPosition) + key + this._cmd.slice(this._cursorPosition);
71711
71709
  this._cursorPosition++;
71712
- this.write(ansi.erase.inLine(2) + ansi.cursor.horizontalAbsolute(0));
71710
+ this.write(ansi$5.erase.inLine(2) + ansi$5.cursor.horizontalAbsolute(0));
71713
71711
  if (this._multiLineMode) {
71714
71712
  const parts = this._cmd.split("#");
71715
71713
  if (parts.length > 1) {
@@ -71756,7 +71754,7 @@ class Terminal extends xtermExports.Terminal {
71756
71754
  const currentLine = this._cmd;
71757
71755
  this._cmd = "";
71758
71756
  this._cursorPosition = 0;
71759
- this.write("\r" + ansi.erase.inLine(2));
71757
+ this.write("\r" + ansi$5.erase.inLine(2));
71760
71758
  return currentLine;
71761
71759
  }
71762
71760
  restoreCommand(cmd) {
@@ -71838,7 +71836,7 @@ class Spinner {
71838
71836
  }
71839
71837
  start() {
71840
71838
  let index = 0;
71841
- this.terminal.write(ansi.cursor.hide);
71839
+ this.terminal.write(ansi$5.cursor.hide);
71842
71840
  const interval = setInterval(() => {
71843
71841
  const currentFrame = this.frames[index];
71844
71842
  const fullText = `${this.prefix ? this.prefix + " " : ""}${currentFrame}${this.suffix ? " " + this.suffix : ""}`;
@@ -71856,7 +71854,7 @@ class Spinner {
71856
71854
  }
71857
71855
  stop() {
71858
71856
  clearInterval(this.loop);
71859
- this.terminal.write(ansi.cursor.show);
71857
+ this.terminal.write(ansi$5.cursor.show);
71860
71858
  }
71861
71859
  }
71862
71860
  const isString = (obj) => typeof obj === "string";
@@ -82595,7 +82593,7 @@ var createBIOS = (() => {
82595
82593
  return moduleRtn;
82596
82594
  };
82597
82595
  })();
82598
- const __vite_import_meta_env__ = { "AUTHOR": { "name": "Jay Mathis", "email": "code@mathis.network", "url": "https://github.com/mathiscode" }, "BASE_URL": "/", "DESCRIPTION": "ecmaOS: Micro-kernel and framework for web technologies", "DEV": false, "HOMEPAGE": "https://ecmaos.sh", "KNOWN_ISSUES": ["Keyboard is broken on mobile; ecmaOS is not mobile-friendly at this time", "Don't expect any sort of POSIX compliance at this stage", "Most commands/devices are very basic implementations, not complete reproductions", "stdin/stdout/stderr streams and redirection can be wonky and don't work everywhere, but are coming along", "CTRL-C will return you to a prompt, but doesn't currently interrupt a process", "Lots of unfinished work; watch your step"], "MODE": "production", "NAME": "@ecmaos/kernel", "PROD": true, "REPOSITORY": "https://github.com/ecmaos/ecmaos", "SSR": false, "TIPS": ["You can 'run' some devices that offer a CLI - for example, '/dev/battery --help'"], "VERSION": "0.2.3", "VITE_APP_SHOW_DEFAULT_LOGIN": "true", "VITE_AUTOLOGIN_PASSWORD": "root", "VITE_AUTOLOGIN_USERNAME": "root", "VITE_KERNEL_INTERVALS_PROC": "1000", "VITE_KERNEL_MODULES": "@ecmaos-modules/sample@0.1.2", "VITE_METAL_SOCKET": "ws://localhost:30445/socket", "VITE_PORT": "30443" };
82596
+ const __vite_import_meta_env__ = { "AUTHOR": { "name": "Jay Mathis", "email": "code@mathis.network", "url": "https://github.com/mathiscode" }, "BASE_URL": "/", "DESCRIPTION": "ecmaOS: Micro-kernel and framework for web technologies", "DEV": false, "HOMEPAGE": "https://ecmaos.sh", "KNOWN_ISSUES": ["Keyboard is broken on mobile; ecmaOS is not mobile-friendly at this time", "Don't expect any sort of POSIX compliance at this stage", "Most commands/devices are very basic implementations, not complete reproductions", "stdin/stdout/stderr streams and redirection can be wonky and don't work everywhere, but are coming along", "CTRL-C will return you to a prompt, but doesn't currently interrupt a process", "Lots of unfinished work; watch your step"], "MODE": "production", "NAME": "@ecmaos/kernel", "PROD": true, "REPOSITORY": "https://github.com/ecmaos/ecmaos", "SSR": false, "TIPS": ["You can 'run' some devices that offer a CLI - for example, '/dev/battery --help'"], "VERSION": "0.2.4", "VITE_APP_SHOW_DEFAULT_LOGIN": "true", "VITE_AUTOLOGIN_PASSWORD": "root", "VITE_AUTOLOGIN_USERNAME": "root", "VITE_KERNEL_INTERVALS_PROC": "1000", "VITE_KERNEL_MODULES": "@ecmaos-modules/sample@0.1.2", "VITE_METAL_SOCKET": "ws://localhost:30445/socket", "VITE_PORT": "30443" };
82599
82597
  var define_import_meta_env_AUTHOR_default = { name: "Jay Mathis", email: "code@mathis.network", url: "https://github.com/mathiscode" };
82600
82598
  var define_import_meta_env_KNOWN_ISSUES_default = ["Keyboard is broken on mobile; ecmaOS is not mobile-friendly at this time", "Don't expect any sort of POSIX compliance at this stage", "Most commands/devices are very basic implementations, not complete reproductions", "stdin/stdout/stderr streams and redirection can be wonky and don't work everywhere, but are coming along", "CTRL-C will return you to a prompt, but doesn't currently interrupt a process", "Lots of unfinished work; watch your step"];
82601
82599
  var define_import_meta_env_TIPS_default = ["You can 'run' some devices that offer a CLI - for example, '/dev/battery --help'"];
@@ -82639,7 +82637,7 @@ class Kernel {
82639
82637
  /** Name of the kernel */
82640
82638
  __publicField(this, "name", "@ecmaos/kernel");
82641
82639
  /** Version string of the kernel */
82642
- __publicField(this, "version", "0.2.3");
82640
+ __publicField(this, "version", "0.2.4");
82643
82641
  /** Authentication and authorization service */
82644
82642
  __publicField(this, "auth");
82645
82643
  /** BIOS module providing low-level functionality */
@@ -82793,7 +82791,7 @@ class Kernel {
82793
82791
  } catch (error) {
82794
82792
  this.log?.error(`Failed to load figlet font ${figletFont}: ${error.message}`);
82795
82793
  }
82796
- this.terminal.writeln(`${this.terminal.createSpecialLink("https://ecmaos.sh", "@ecmaos/kernel")} v${"0.2.3"}`);
82794
+ this.terminal.writeln(`${this.terminal.createSpecialLink("https://ecmaos.sh", "@ecmaos/kernel")} v${"0.2.4"}`);
82797
82795
  this.terminal.writeln(`${t2("kernel.madeBy", "Made with ❤️ by Jay Mathis")} ${this.terminal.createSpecialLink(
82798
82796
  define_import_meta_env_AUTHOR_default?.url || "https://github.com/mathiscode",
82799
82797
  `${define_import_meta_env_AUTHOR_default?.name} <${define_import_meta_env_AUTHOR_default?.email}>`
@@ -82812,13 +82810,13 @@ class Kernel {
82812
82810
  spinner.start();
82813
82811
  if (logoFiglet) console.log(`%c${logoFiglet}`, "color: green");
82814
82812
  console.log(`%c${"https://github.com/ecmaos/ecmaos"}`, "color: blue; text-decoration: underline; font-size: 16px");
82815
- this.log.info(`${"@ecmaos/kernel"} v${"0.2.3"}`);
82813
+ this.log.info(`${"@ecmaos/kernel"} v${"0.2.4"}`);
82816
82814
  if (Notification?.permission === "default") Notification.requestPermission();
82817
82815
  if (Notification?.permission === "denied") this.log?.warn(t2("kernel.permissionNotificationDenied", "Notification permission denied"));
82818
82816
  this.intervals.set("title-blink", () => {
82819
82817
  globalThis.document.title = globalThis.document.title.includes("_") ? "ecmaos# " : "ecmaos# _";
82820
82818
  }, 600);
82821
- this.toast.success(`${"@ecmaos/kernel"} v${"0.2.3"}`);
82819
+ this.toast.success(`${"@ecmaos/kernel"} v${"0.2.4"}`);
82822
82820
  }
82823
82821
  await this.configure({ filesystem: Filesystem.options() });
82824
82822
  const requiredPaths = [
@@ -83012,7 +83010,7 @@ class Kernel {
83012
83010
  });
83013
83011
  initProcess.start();
83014
83012
  this._state = KernelState.RUNNING;
83015
- this.terminal.write(this.terminal.prompt());
83013
+ this.terminal.write(ansi$5.erase.inLine(2) + this.terminal.prompt());
83016
83014
  this.terminal.focus();
83017
83015
  this.terminal.listen();
83018
83016
  } catch (error) {
@@ -83451,7 +83449,7 @@ class Kernel {
83451
83449
  memory: "?",
83452
83450
  platform: navigator.userAgentData?.platform || navigator?.platform || navigator.userAgent,
83453
83451
  querystring: location.search,
83454
- version: `${"@ecmaos/kernel"} ${"0.2.3"}`,
83452
+ version: `${"@ecmaos/kernel"} ${"0.2.4"}`,
83455
83453
  language: navigator.language,
83456
83454
  host: location.host,
83457
83455
  userAgent: navigator.userAgent,
@@ -83522,4 +83520,4 @@ export {
83522
83520
  getDefaultExportFromCjs$2 as g,
83523
83521
  process$1$1 as p
83524
83522
  };
83525
- //# sourceMappingURL=empty-DAF3BgdH.js.map
83523
+ //# sourceMappingURL=empty-BMkCc_7L.js.map