@prozilla-os/terminal 1.1.17 → 1.1.20

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.
Files changed (84) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +85 -85
  3. package/dist/chunks/cat-DGK7wWrK.js +16 -0
  4. package/dist/chunks/{cat-F1pnUhWr.js.map → cat-DGK7wWrK.js.map} +1 -1
  5. package/dist/chunks/{cd-SY_-kgyu.js → cd-DvjkW_6o.js} +5 -6
  6. package/dist/chunks/{cd-SY_-kgyu.js.map → cd-DvjkW_6o.js.map} +1 -1
  7. package/dist/chunks/{clear-DtYBxmDr.js → clear-BF9eb1Dq.js} +2 -2
  8. package/dist/chunks/{clear-DtYBxmDr.js.map → clear-BF9eb1Dq.js.map} +1 -1
  9. package/dist/chunks/{cmatrix-BI2_Y5OW.js → cmatrix-VYovsHQW.js} +4 -5
  10. package/dist/chunks/{cmatrix-BI2_Y5OW.js.map → cmatrix-VYovsHQW.js.map} +1 -1
  11. package/dist/chunks/compgen-3TwdgHm_.js +13 -0
  12. package/dist/chunks/{compgen-7prOo2oi.js.map → compgen-3TwdgHm_.js.map} +1 -1
  13. package/dist/chunks/{cowsay-B6TRoqbg.js → cowsay-IfArfPSJ.js} +4 -5
  14. package/dist/chunks/{cowsay-B6TRoqbg.js.map → cowsay-IfArfPSJ.js.map} +1 -1
  15. package/dist/chunks/{dir-BlrznBqV.js → dir-B_Ipo5xb.js} +2 -2
  16. package/dist/chunks/{dir-BlrznBqV.js.map → dir-B_Ipo5xb.js.map} +1 -1
  17. package/dist/chunks/{echo-PyZ6XYF6.js → echo-DX-Ar2Ut.js} +2 -2
  18. package/dist/chunks/{echo-PyZ6XYF6.js.map → echo-DX-Ar2Ut.js.map} +1 -1
  19. package/dist/chunks/{eval-CnKC-mrj.js → eval-C7InkmFY.js} +2 -2
  20. package/dist/chunks/eval-C7InkmFY.js.map +1 -0
  21. package/dist/chunks/{exit-CizX3N_u.js → exit-D7PPqtiE.js} +2 -2
  22. package/dist/chunks/{exit-CizX3N_u.js.map → exit-D7PPqtiE.js.map} +1 -1
  23. package/dist/chunks/{fortune-Cs0PtMgs.js → fortune-zyxpnYNP.js} +2 -2
  24. package/dist/chunks/{fortune-Cs0PtMgs.js.map → fortune-zyxpnYNP.js.map} +1 -1
  25. package/dist/chunks/{help-BUCTSaeJ.js → help-BEgNbwLL.js} +8 -9
  26. package/dist/chunks/help-BEgNbwLL.js.map +1 -0
  27. package/dist/chunks/{hostname-BBOQWx6L.js → hostname-DU1lQde2.js} +2 -2
  28. package/dist/chunks/{hostname-BBOQWx6L.js.map → hostname-DU1lQde2.js.map} +1 -1
  29. package/dist/chunks/lolcat-5-mBWD9l.js +35 -0
  30. package/dist/chunks/{lolcat-DiLqxxCO.js.map → lolcat-5-mBWD9l.js.map} +1 -1
  31. package/dist/chunks/{ls-DScdmJPT.js → ls-DnkSPHVM.js} +4 -5
  32. package/dist/chunks/{ls-DScdmJPT.js.map → ls-DnkSPHVM.js.map} +1 -1
  33. package/dist/chunks/{main-CkpVfeUg.js → main-CXiltWT-.js} +382 -332
  34. package/dist/chunks/main-CXiltWT-.js.map +1 -0
  35. package/dist/chunks/{make-D_hXz4-L.js → make-DqVQDThH.js} +2 -3
  36. package/dist/chunks/make-DqVQDThH.js.map +1 -0
  37. package/dist/chunks/{man-C2UviS5N.js → man-D_hBUTDt.js} +4 -5
  38. package/dist/chunks/{man-C2UviS5N.js.map → man-D_hBUTDt.js.map} +1 -1
  39. package/dist/chunks/{mkdir-BTSAC1PK.js → mkdir-BCvMrPTX.js} +2 -2
  40. package/dist/chunks/{mkdir-BTSAC1PK.js.map → mkdir-BCvMrPTX.js.map} +1 -1
  41. package/dist/chunks/{neofetch-Bq355NBE.js → neofetch-BFHOITJj.js} +10 -11
  42. package/dist/chunks/neofetch-BFHOITJj.js.map +1 -0
  43. package/dist/chunks/{pwd-CSapfDtw.js → pwd-C21tQanw.js} +2 -2
  44. package/dist/chunks/{pwd-CSapfDtw.js.map → pwd-C21tQanw.js.map} +1 -1
  45. package/dist/chunks/{reboot-Bwxhoa8q.js → reboot-C2t7a3Av.js} +2 -2
  46. package/dist/chunks/{reboot-Bwxhoa8q.js.map → reboot-C2t7a3Av.js.map} +1 -1
  47. package/dist/chunks/reload-C9o_dGZw.js +10 -0
  48. package/dist/chunks/reload-C9o_dGZw.js.map +1 -0
  49. package/dist/chunks/{rev-C8qQIyj_.js → rev-CBibYebM.js} +2 -2
  50. package/dist/chunks/{rev-C8qQIyj_.js.map → rev-CBibYebM.js.map} +1 -1
  51. package/dist/chunks/rm-ChTrwld4.js +12 -0
  52. package/dist/chunks/{rm-BwOe-Kq2.js.map → rm-ChTrwld4.js.map} +1 -1
  53. package/dist/chunks/rmdir-CUM4xt2w.js +11 -0
  54. package/dist/chunks/{rmdir-B9pGhEAU.js.map → rmdir-CUM4xt2w.js.map} +1 -1
  55. package/dist/chunks/{sl-DaCRRvuh.js → sl-DrATMkz6.js} +4 -5
  56. package/dist/chunks/{sl-DaCRRvuh.js.map → sl-DrATMkz6.js.map} +1 -1
  57. package/dist/chunks/touch-CqBIAjMe.js +19 -0
  58. package/dist/chunks/{touch-x95bWUyt.js.map → touch-CqBIAjMe.js.map} +1 -1
  59. package/dist/chunks/{uptime-BYmCcOUM.js → uptime-xM-0FRzA.js} +2 -2
  60. package/dist/chunks/{uptime-BYmCcOUM.js.map → uptime-xM-0FRzA.js.map} +1 -1
  61. package/dist/chunks/whatis-vXemLo9m.js +13 -0
  62. package/dist/chunks/{whatis-DL62XQIi.js.map → whatis-vXemLo9m.js.map} +1 -1
  63. package/dist/chunks/{whoami-CQNGmqxL.js → whoami-CnUR69yX.js} +2 -2
  64. package/dist/chunks/{whoami-CQNGmqxL.js.map → whoami-CnUR69yX.js.map} +1 -1
  65. package/dist/main.d.ts +101 -1
  66. package/dist/main.js +6 -3
  67. package/dist/main.js.map +1 -1
  68. package/package.json +4 -4
  69. package/dist/chunks/cat-F1pnUhWr.js +0 -17
  70. package/dist/chunks/command-nBL1aO7T.js +0 -43
  71. package/dist/chunks/command-nBL1aO7T.js.map +0 -1
  72. package/dist/chunks/compgen-7prOo2oi.js +0 -14
  73. package/dist/chunks/eval-CnKC-mrj.js.map +0 -1
  74. package/dist/chunks/help-BUCTSaeJ.js.map +0 -1
  75. package/dist/chunks/lolcat-DiLqxxCO.js +0 -36
  76. package/dist/chunks/main-CkpVfeUg.js.map +0 -1
  77. package/dist/chunks/make-D_hXz4-L.js.map +0 -1
  78. package/dist/chunks/neofetch-Bq355NBE.js.map +0 -1
  79. package/dist/chunks/reload-CnQb5yj-.js +0 -11
  80. package/dist/chunks/reload-CnQb5yj-.js.map +0 -1
  81. package/dist/chunks/rm-BwOe-Kq2.js +0 -13
  82. package/dist/chunks/rmdir-B9pGhEAU.js +0 -12
  83. package/dist/chunks/touch-x95bWUyt.js +0 -20
  84. package/dist/chunks/whatis-DL62XQIi.js +0 -14
@@ -1,64 +1,68 @@
1
- var Pe = Object.defineProperty;
2
- var Me = (e, s, n) => s in e ? Pe(e, s, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[s] = n;
3
- var W = (e, s, n) => Me(e, typeof s != "symbol" ? s + "" : s, n);
4
- import { useSystemManager as De, useVirtualRoot as Re, useSettingsManager as He, App as xe, AppsConfig as je } from "@prozilla-os/core";
5
- import { jsx as L, jsxs as Y } from "react/jsx-runtime";
6
- import * as q from "react";
7
- import { forwardRef as Fe, useState as S, useRef as pe, useEffect as z } from "react";
8
- import { ANSI as b, EventEmitter as Je, clamp as Ve, removeFromArray as de } from "@prozilla-os/shared";
9
- const We = "_Terminal_1l267_1", ze = "_Prefix_1l267_51", qe = "_Input_1l267_63", Ge = "_Output_1l267_63", Be = "_blink_1l267_1", N = {
10
- Terminal: We,
11
- Prefix: ze,
12
- Input: qe,
13
- Output: Ge,
14
- "Input-container": "_Input-container_1l267_93",
15
- blink: Be,
16
- "ansi-black-fg": "_ansi-black-fg_1l267_197",
17
- "ansi-red-fg": "_ansi-red-fg_1l267_199",
18
- "ansi-green-fg": "_ansi-green-fg_1l267_201",
19
- "ansi-yellow-fg": "_ansi-yellow-fg_1l267_203",
20
- "ansi-blue-fg": "_ansi-blue-fg_1l267_205",
21
- "ansi-magenta-fg": "_ansi-magenta-fg_1l267_207",
22
- "ansi-cyan-fg": "_ansi-cyan-fg_1l267_209",
23
- "ansi-white-fg": "_ansi-white-fg_1l267_211",
24
- "ansi-bright-black-fg": "_ansi-bright-black-fg_1l267_215",
25
- "ansi-bright-red-fg": "_ansi-bright-red-fg_1l267_217",
26
- "ansi-bright-green-fg": "_ansi-bright-green-fg_1l267_219",
27
- "ansi-bright-yellow-fg": "_ansi-bright-yellow-fg_1l267_221",
28
- "ansi-bright-blue-fg": "_ansi-bright-blue-fg_1l267_223",
29
- "ansi-bright-magenta-fg": "_ansi-bright-magenta-fg_1l267_225",
30
- "ansi-bright-cyan-fg": "_ansi-bright-cyan-fg_1l267_227",
31
- "ansi-bright-white-fg": "_ansi-bright-white-fg_1l267_229",
32
- "ansi-black-bg": "_ansi-black-bg_1l267_233",
33
- "ansi-red-bg": "_ansi-red-bg_1l267_235",
34
- "ansi-green-bg": "_ansi-green-bg_1l267_237",
35
- "ansi-yellow-bg": "_ansi-yellow-bg_1l267_239",
36
- "ansi-blue-bg": "_ansi-blue-bg_1l267_241",
37
- "ansi-magenta-bg": "_ansi-magenta-bg_1l267_243",
38
- "ansi-cyan-bg": "_ansi-cyan-bg_1l267_245",
39
- "ansi-white-bg": "_ansi-white-bg_1l267_247",
40
- "ansi-dim": "_ansi-dim_1l267_251"
1
+ var He = Object.defineProperty;
2
+ var pe = (t) => {
3
+ throw TypeError(t);
41
4
  };
42
- function Ke(e) {
43
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
5
+ var je = (t, e, s) => e in t ? He(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
6
+ var S = (t, e, s) => je(t, typeof e != "symbol" ? e + "" : e, s), de = (t, e, s) => e.has(t) || pe("Cannot " + s);
7
+ var _e = (t, e, s) => (de(t, e, "read from private field"), s ? s.call(t) : e.get(t)), ve = (t, e, s) => e.has(t) ? pe("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), be = (t, e, s, n) => (de(t, e, "write to private field"), n ? n.call(t, s) : e.set(t, s), s);
8
+ import { useSystemManager as Fe, useVirtualRoot as qe, useSettingsManager as Je, App as Ve, AppsConfig as We } from "@prozilla-os/core";
9
+ import { jsx as N, jsxs as Y } from "react/jsx-runtime";
10
+ import * as G from "react";
11
+ import { forwardRef as ze, useState as T, useRef as ye, useEffect as z } from "react";
12
+ import { ANSI as v, EventEmitter as Ge, clamp as Be, removeFromArray as we } from "@prozilla-os/shared";
13
+ const Ke = "_Terminal_1n5va_1", Ue = "_Prefix_1n5va_26", Xe = "_Input_1n5va_32", Ze = "_Output_1n5va_32", Qe = "_blink_1n5va_1", M = {
14
+ Terminal: Ke,
15
+ Prefix: Ue,
16
+ Input: Xe,
17
+ Output: Ze,
18
+ "Input-container": "_Input-container_1n5va_47",
19
+ blink: Qe,
20
+ "ansi-black-fg": "_ansi-black-fg_1n5va_99",
21
+ "ansi-red-fg": "_ansi-red-fg_1n5va_100",
22
+ "ansi-green-fg": "_ansi-green-fg_1n5va_101",
23
+ "ansi-yellow-fg": "_ansi-yellow-fg_1n5va_102",
24
+ "ansi-blue-fg": "_ansi-blue-fg_1n5va_103",
25
+ "ansi-magenta-fg": "_ansi-magenta-fg_1n5va_104",
26
+ "ansi-cyan-fg": "_ansi-cyan-fg_1n5va_105",
27
+ "ansi-white-fg": "_ansi-white-fg_1n5va_106",
28
+ "ansi-bright-black-fg": "_ansi-bright-black-fg_1n5va_108",
29
+ "ansi-bright-red-fg": "_ansi-bright-red-fg_1n5va_109",
30
+ "ansi-bright-green-fg": "_ansi-bright-green-fg_1n5va_110",
31
+ "ansi-bright-yellow-fg": "_ansi-bright-yellow-fg_1n5va_111",
32
+ "ansi-bright-blue-fg": "_ansi-bright-blue-fg_1n5va_112",
33
+ "ansi-bright-magenta-fg": "_ansi-bright-magenta-fg_1n5va_113",
34
+ "ansi-bright-cyan-fg": "_ansi-bright-cyan-fg_1n5va_114",
35
+ "ansi-bright-white-fg": "_ansi-bright-white-fg_1n5va_115",
36
+ "ansi-black-bg": "_ansi-black-bg_1n5va_117",
37
+ "ansi-red-bg": "_ansi-red-bg_1n5va_118",
38
+ "ansi-green-bg": "_ansi-green-bg_1n5va_119",
39
+ "ansi-yellow-bg": "_ansi-yellow-bg_1n5va_120",
40
+ "ansi-blue-bg": "_ansi-blue-bg_1n5va_121",
41
+ "ansi-magenta-bg": "_ansi-magenta-bg_1n5va_122",
42
+ "ansi-cyan-bg": "_ansi-cyan-bg_1n5va_123",
43
+ "ansi-white-bg": "_ansi-white-bg_1n5va_124",
44
+ "ansi-dim": "_ansi-dim_1n5va_126"
45
+ };
46
+ function Ye(t) {
47
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
44
48
  }
45
- var _e = /* @__PURE__ */ function() {
46
- function e(s, n) {
47
- for (var t = 0; t < n.length; t++) {
48
- var f = n[t];
49
- f.enumerable = f.enumerable || !1, f.configurable = !0, "value" in f && (f.writable = !0), Object.defineProperty(s, f.key, f);
49
+ var ke = /* @__PURE__ */ function() {
50
+ function t(e, s) {
51
+ for (var n = 0; n < s.length; n++) {
52
+ var f = s[n];
53
+ f.enumerable = f.enumerable || !1, f.configurable = !0, "value" in f && (f.writable = !0), Object.defineProperty(e, f.key, f);
50
54
  }
51
55
  }
52
- return function(s, n, t) {
53
- return n && e(s.prototype, n), t && e(s, t), s;
56
+ return function(e, s, n) {
57
+ return s && t(e.prototype, s), n && t(e, n), e;
54
58
  };
55
59
  }();
56
- function Ue(e, s) {
57
- if (!(e instanceof s))
60
+ function et(t, e) {
61
+ if (!(t instanceof e))
58
62
  throw new TypeError("Cannot call a class as a function");
59
63
  }
60
- var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class: "ansi-red" }, { color: "0, 187, 0", class: "ansi-green" }, { color: "187, 187, 0", class: "ansi-yellow" }, { color: "0, 0, 187", class: "ansi-blue" }, { color: "187, 0, 187", class: "ansi-magenta" }, { color: "0, 187, 187", class: "ansi-cyan" }, { color: "255,255,255", class: "ansi-white" }], [{ color: "85, 85, 85", class: "ansi-bright-black" }, { color: "255, 85, 85", class: "ansi-bright-red" }, { color: "0, 255, 0", class: "ansi-bright-green" }, { color: "255, 255, 85", class: "ansi-bright-yellow" }, { color: "85, 85, 255", class: "ansi-bright-blue" }, { color: "255, 85, 255", class: "ansi-bright-magenta" }, { color: "85, 255, 255", class: "ansi-bright-cyan" }, { color: "255, 255, 255", class: "ansi-bright-white" }]], Xe = /(https?:\/\/(?:[A-Za-z0-9#;/?:@=+$',_.!~*()[\]-]|&amp;|%[A-Fa-f0-9]{2})+)/gm, Ze = function() {
61
- _e(e, null, [{
64
+ var L = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class: "ansi-red" }, { color: "0, 187, 0", class: "ansi-green" }, { color: "187, 187, 0", class: "ansi-yellow" }, { color: "0, 0, 187", class: "ansi-blue" }, { color: "187, 0, 187", class: "ansi-magenta" }, { color: "0, 187, 187", class: "ansi-cyan" }, { color: "255,255,255", class: "ansi-white" }], [{ color: "85, 85, 85", class: "ansi-bright-black" }, { color: "255, 85, 85", class: "ansi-bright-red" }, { color: "0, 255, 0", class: "ansi-bright-green" }, { color: "255, 255, 85", class: "ansi-bright-yellow" }, { color: "85, 85, 255", class: "ansi-bright-blue" }, { color: "255, 85, 255", class: "ansi-bright-magenta" }, { color: "85, 255, 255", class: "ansi-bright-cyan" }, { color: "255, 255, 255", class: "ansi-bright-white" }]], tt = /(https?:\/\/(?:[A-Za-z0-9#;/?:@=+$',_.!~*()[\]-]|&amp;|%[A-Fa-f0-9]{2})+)/gm, st = function() {
65
+ ke(t, null, [{
62
66
  key: "escapeForHtml",
63
67
  /**
64
68
  * Anser.escapeForHtml
@@ -73,8 +77,8 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
73
77
  * @param {String} txt The input text (containing the ANSI snippets).
74
78
  * @returns {String} The escaped html.
75
79
  */
76
- value: function(n) {
77
- return new e().escapeForHtml(n);
80
+ value: function(s) {
81
+ return new t().escapeForHtml(s);
78
82
  }
79
83
  /**
80
84
  * Anser.linkify
@@ -90,8 +94,8 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
90
94
  */
91
95
  }, {
92
96
  key: "linkify",
93
- value: function(n) {
94
- return new e().linkify(n);
97
+ value: function(s) {
98
+ return new t().linkify(s);
95
99
  }
96
100
  /**
97
101
  * Anser.ansiToHtml
@@ -119,8 +123,8 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
119
123
  */
120
124
  }, {
121
125
  key: "ansiToHtml",
122
- value: function(n, t) {
123
- return new e().ansiToHtml(n, t);
126
+ value: function(s, n) {
127
+ return new t().ansiToHtml(s, n);
124
128
  }
125
129
  /**
126
130
  * Anser.ansiToJson
@@ -134,8 +138,8 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
134
138
  */
135
139
  }, {
136
140
  key: "ansiToJson",
137
- value: function(n, t) {
138
- return new e().ansiToJson(n, t);
141
+ value: function(s, n) {
142
+ return new t().ansiToJson(s, n);
139
143
  }
140
144
  /**
141
145
  * Anser.ansiToText
@@ -148,8 +152,8 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
148
152
  */
149
153
  }, {
150
154
  key: "ansiToText",
151
- value: function(n) {
152
- return new e().ansiToText(n);
155
+ value: function(s) {
156
+ return new t().ansiToText(s);
153
157
  }
154
158
  /**
155
159
  * Anser
@@ -160,18 +164,18 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
160
164
  * @returns {Anser}
161
165
  */
162
166
  }]);
163
- function e() {
164
- Ue(this, e), this.fg = this.bg = this.fg_truecolor = this.bg_truecolor = null, this.bright = 0, this.decorations = [];
167
+ function t() {
168
+ et(this, t), this.fg = this.bg = this.fg_truecolor = this.bg_truecolor = null, this.bright = 0, this.decorations = [];
165
169
  }
166
- return _e(e, [{
170
+ return ke(t, [{
167
171
  key: "setupPalette",
168
172
  value: function() {
169
173
  this.PALETTE_COLORS = [];
170
- for (var n = 0; n < 2; ++n)
171
- for (var t = 0; t < 8; ++t)
172
- this.PALETTE_COLORS.push(A[n][t].color);
173
- for (var f = [0, 95, 135, 175, 215, 255], y = function(a, v, k) {
174
- return f[a] + ", " + f[v] + ", " + f[k];
174
+ for (var s = 0; s < 2; ++s)
175
+ for (var n = 0; n < 8; ++n)
176
+ this.PALETTE_COLORS.push(L[s][n].color);
177
+ for (var f = [0, 95, 135, 175, 215, 255], y = function(a, b, k) {
178
+ return f[a] + ", " + f[b] + ", " + f[k];
175
179
  }, i = 0; i < 6; ++i)
176
180
  for (var u = 0; u < 6; ++u)
177
181
  for (var c = 0; c < 6; ++c)
@@ -190,9 +194,9 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
190
194
  */
191
195
  }, {
192
196
  key: "escapeForHtml",
193
- value: function(n) {
194
- return n.replace(/[&<>\"]/gm, function(t) {
195
- return t == "&" ? "&amp;" : t == '"' ? "&quot;" : t == "<" ? "&lt;" : t == ">" ? "&gt;" : "";
197
+ value: function(s) {
198
+ return s.replace(/[&<>\"]/gm, function(n) {
199
+ return n == "&" ? "&amp;" : n == '"' ? "&quot;" : n == "<" ? "&lt;" : n == ">" ? "&gt;" : "";
196
200
  });
197
201
  }
198
202
  /**
@@ -206,9 +210,9 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
206
210
  */
207
211
  }, {
208
212
  key: "linkify",
209
- value: function(n) {
210
- return n.replace(Xe, function(t) {
211
- return '<a href="' + t + '">' + t + "</a>";
213
+ value: function(s) {
214
+ return s.replace(tt, function(n) {
215
+ return '<a href="' + n + '">' + n + "</a>";
212
216
  });
213
217
  }
214
218
  /**
@@ -223,8 +227,8 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
223
227
  */
224
228
  }, {
225
229
  key: "ansiToHtml",
226
- value: function(n, t) {
227
- return this.process(n, t, !0);
230
+ value: function(s, n) {
231
+ return this.process(s, n, !0);
228
232
  }
229
233
  /**
230
234
  * ansiToJson
@@ -238,8 +242,8 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
238
242
  */
239
243
  }, {
240
244
  key: "ansiToJson",
241
- value: function(n, t) {
242
- return t = t || {}, t.json = !0, t.clearLine = !1, this.process(n, t, !0);
245
+ value: function(s, n) {
246
+ return n = n || {}, n.json = !0, n.clearLine = !1, this.process(s, n, !0);
243
247
  }
244
248
  /**
245
249
  * ansiToText
@@ -252,8 +256,8 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
252
256
  */
253
257
  }, {
254
258
  key: "ansiToText",
255
- value: function(n) {
256
- return this.process(n, {}, !1);
259
+ value: function(s) {
260
+ return this.process(s, {}, !1);
257
261
  }
258
262
  /**
259
263
  * process
@@ -271,15 +275,15 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
271
275
  */
272
276
  }, {
273
277
  key: "process",
274
- value: function(n, t, f) {
275
- var y = this, i = this, u = n.split(/\033\[/), c = u.shift();
276
- t == null && (t = {}), t.clearLine = /\r/.test(n);
278
+ value: function(s, n, f) {
279
+ var y = this, i = this, u = s.split(/\033\[/), c = u.shift();
280
+ n == null && (n = {}), n.clearLine = /\r/.test(s);
277
281
  var o = u.map(function(_) {
278
- return y.processChunk(_, t, f);
282
+ return y.processChunk(_, n, f);
279
283
  });
280
- if (t && t.json) {
284
+ if (n && n.json) {
281
285
  var r = i.processChunkJson("");
282
- return r.content = c, r.clearLine = t.clearLine, o.unshift(r), t.remove_empty && (o = o.filter(function(_) {
286
+ return r.content = c, r.clearLine = n.clearLine, o.unshift(r), n.remove_empty && (o = o.filter(function(_) {
283
287
  return !_.isEmpty();
284
288
  })), o;
285
289
  } else
@@ -313,23 +317,23 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
313
317
  */
314
318
  }, {
315
319
  key: "processChunkJson",
316
- value: function(n, t, f) {
317
- t = typeof t > "u" ? {} : t;
318
- var y = t.use_classes = typeof t.use_classes < "u" && t.use_classes, i = t.key = y ? "class" : "color", u = {
319
- content: n,
320
+ value: function(s, n, f) {
321
+ n = typeof n > "u" ? {} : n;
322
+ var y = n.use_classes = typeof n.use_classes < "u" && n.use_classes, i = n.key = y ? "class" : "color", u = {
323
+ content: s,
320
324
  fg: null,
321
325
  bg: null,
322
326
  fg_truecolor: null,
323
327
  bg_truecolor: null,
324
328
  isInverted: !1,
325
- clearLine: t.clearLine,
329
+ clearLine: n.clearLine,
326
330
  decoration: null,
327
331
  decorations: [],
328
332
  was_processed: !1,
329
333
  isEmpty: function() {
330
334
  return !u.content;
331
335
  }
332
- }, c = n.match(/^([!\x3c-\x3f]*)([\d;]*)([\x20-\x2c]*[\x40-\x7e])([\s\S]*)/m);
336
+ }, c = s.match(/^([!\x3c-\x3f]*)([\d;]*)([\x20-\x2c]*[\x40-\x7e])([\s\S]*)/m);
333
337
  if (!c) return u;
334
338
  u.content = c[4];
335
339
  var o = c[2].split(";");
@@ -376,31 +380,31 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
376
380
  else if (a === 49)
377
381
  r.bg = null;
378
382
  else if (a >= 30 && a < 38)
379
- r.fg = A[0][a % 10][i];
383
+ r.fg = L[0][a % 10][i];
380
384
  else if (a >= 90 && a < 98)
381
- r.fg = A[1][a % 10][i];
385
+ r.fg = L[1][a % 10][i];
382
386
  else if (a >= 40 && a < 48)
383
- r.bg = A[0][a % 10][i];
387
+ r.bg = L[0][a % 10][i];
384
388
  else if (a >= 100 && a < 108)
385
- r.bg = A[1][a % 10][i];
389
+ r.bg = L[1][a % 10][i];
386
390
  else if (a === 38 || a === 48) {
387
- var v = a === 38;
391
+ var b = a === 38;
388
392
  if (o.length >= 1) {
389
393
  var k = o.shift();
390
394
  if (k === "5" && o.length >= 1) {
391
395
  var h = parseInt(o.shift());
392
396
  if (h >= 0 && h <= 255)
393
397
  if (!y)
394
- this.PALETTE_COLORS || r.setupPalette(), v ? r.fg = this.PALETTE_COLORS[h] : r.bg = this.PALETTE_COLORS[h];
398
+ this.PALETTE_COLORS || r.setupPalette(), b ? r.fg = this.PALETTE_COLORS[h] : r.bg = this.PALETTE_COLORS[h];
395
399
  else {
396
- var $ = h >= 16 ? "ansi-palette-" + h : A[h > 7 ? 1 : 0][h % 8].class;
397
- v ? r.fg = $ : r.bg = $;
400
+ var E = h >= 16 ? "ansi-palette-" + h : L[h > 7 ? 1 : 0][h % 8].class;
401
+ b ? r.fg = E : r.bg = E;
398
402
  }
399
403
  } else if (k === "2" && o.length >= 3) {
400
- var O = parseInt(o.shift()), M = parseInt(o.shift()), D = parseInt(o.shift());
401
- if (O >= 0 && O <= 255 && M >= 0 && M <= 255 && D >= 0 && D <= 255) {
402
- var T = O + ", " + M + ", " + D;
403
- y ? v ? (r.fg = "ansi-truecolor", r.fg_truecolor = T) : (r.bg = "ansi-truecolor", r.bg_truecolor = T) : v ? r.fg = T : r.bg = T;
404
+ var $ = parseInt(o.shift()), R = parseInt(o.shift()), D = parseInt(o.shift());
405
+ if ($ >= 0 && $ <= 255 && R >= 0 && R <= 255 && D >= 0 && D <= 255) {
406
+ var A = $ + ", " + R + ", " + D;
407
+ y ? b ? (r.fg = "ansi-truecolor", r.fg_truecolor = A) : (r.bg = "ansi-truecolor", r.bg_truecolor = A) : b ? r.fg = A : r.bg = A;
404
408
  }
405
409
  }
406
410
  }
@@ -425,201 +429,201 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
425
429
  */
426
430
  }, {
427
431
  key: "processChunk",
428
- value: function(n, t, f) {
432
+ value: function(s, n, f) {
429
433
  var y = this;
430
- t = t || {};
431
- var i = this.processChunkJson(n, t, f), u = t.use_classes;
432
- if (i.decorations = i.decorations.filter(function(v) {
433
- if (v === "reverse") {
434
- i.fg || (i.fg = A[0][7][u ? "class" : "color"]), i.bg || (i.bg = A[0][0][u ? "class" : "color"]);
434
+ n = n || {};
435
+ var i = this.processChunkJson(s, n, f), u = n.use_classes;
436
+ if (i.decorations = i.decorations.filter(function(b) {
437
+ if (b === "reverse") {
438
+ i.fg || (i.fg = L[0][7][u ? "class" : "color"]), i.bg || (i.bg = L[0][0][u ? "class" : "color"]);
435
439
  var k = i.fg;
436
440
  i.fg = i.bg, i.bg = k;
437
441
  var h = i.fg_truecolor;
438
442
  return i.fg_truecolor = i.bg_truecolor, i.bg_truecolor = h, i.isInverted = !0, !1;
439
443
  }
440
444
  return !0;
441
- }), t.json)
445
+ }), n.json)
442
446
  return i;
443
447
  if (i.isEmpty())
444
448
  return "";
445
449
  if (!i.was_processed)
446
450
  return i.content;
447
451
  var c = [], o = [], r = [], _ = {}, a = function(k) {
448
- var h = [], $ = void 0;
449
- for ($ in k)
450
- k.hasOwnProperty($) && h.push("data-" + $ + '="' + y.escapeForHtml(k[$]) + '"');
452
+ var h = [], E = void 0;
453
+ for (E in k)
454
+ k.hasOwnProperty(E) && h.push("data-" + E + '="' + y.escapeForHtml(k[E]) + '"');
451
455
  return h.length > 0 ? " " + h.join(" ") : "";
452
456
  };
453
- return i.isInverted && (_["ansi-is-inverted"] = "true"), i.fg && (u ? (c.push(i.fg + "-fg"), i.fg_truecolor !== null && (_["ansi-truecolor-fg"] = i.fg_truecolor, i.fg_truecolor = null)) : c.push("color:rgb(" + i.fg + ")")), i.bg && (u ? (c.push(i.bg + "-bg"), i.bg_truecolor !== null && (_["ansi-truecolor-bg"] = i.bg_truecolor, i.bg_truecolor = null)) : c.push("background-color:rgb(" + i.bg + ")")), i.decorations.forEach(function(v) {
457
+ return i.isInverted && (_["ansi-is-inverted"] = "true"), i.fg && (u ? (c.push(i.fg + "-fg"), i.fg_truecolor !== null && (_["ansi-truecolor-fg"] = i.fg_truecolor, i.fg_truecolor = null)) : c.push("color:rgb(" + i.fg + ")")), i.bg && (u ? (c.push(i.bg + "-bg"), i.bg_truecolor !== null && (_["ansi-truecolor-bg"] = i.bg_truecolor, i.bg_truecolor = null)) : c.push("background-color:rgb(" + i.bg + ")")), i.decorations.forEach(function(b) {
454
458
  if (u) {
455
- o.push("ansi-" + v);
459
+ o.push("ansi-" + b);
456
460
  return;
457
461
  }
458
- v === "bold" ? o.push("font-weight:bold") : v === "dim" ? o.push("opacity:0.5") : v === "italic" ? o.push("font-style:italic") : v === "hidden" ? o.push("visibility:hidden") : v === "strikethrough" ? r.push("line-through") : r.push(v);
462
+ b === "bold" ? o.push("font-weight:bold") : b === "dim" ? o.push("opacity:0.5") : b === "italic" ? o.push("font-style:italic") : b === "hidden" ? o.push("visibility:hidden") : b === "strikethrough" ? r.push("line-through") : r.push(b);
459
463
  }), r.length && o.push("text-decoration:" + r.join(" ")), u ? '<span class="' + c.concat(o).join(" ") + '"' + a(_) + ">" + i.content + "</span>" : '<span style="' + c.concat(o).join(";") + '"' + a(_) + ">" + i.content + "</span>";
460
464
  }
461
465
  }, {
462
466
  key: "removeDecoration",
463
- value: function(n) {
464
- var t = this.decorations.indexOf(n);
465
- t >= 0 && this.decorations.splice(t, 1);
467
+ value: function(s) {
468
+ var n = this.decorations.indexOf(s);
469
+ n >= 0 && this.decorations.splice(n, 1);
466
470
  }
467
- }]), e;
468
- }(), Qe = Ze;
469
- const Ye = /* @__PURE__ */ Ke(Qe);
470
- var te = { exports: {} };
471
- function se(e) {
472
- if (!e) return "";
473
- if (!/\r/.test(e)) return e;
474
- for (e = e.replace(/\r+\n/gm, `
475
- `); /\r./.test(e); )
476
- e = e.replace(/^([^\r\n]*)\r+([^\r\n]+)/gm, function(s, n, t) {
477
- return t + n.slice(t.length);
471
+ }]), t;
472
+ }(), nt = st;
473
+ const rt = /* @__PURE__ */ Ye(nt);
474
+ var ee = { exports: {} };
475
+ function te(t) {
476
+ if (!t) return "";
477
+ if (!/\r/.test(t)) return t;
478
+ for (t = t.replace(/\r+\n/gm, `
479
+ `); /\r./.test(t); )
480
+ t = t.replace(/^([^\r\n]*)\r+([^\r\n]+)/gm, function(e, s, n) {
481
+ return n + s.slice(n.length);
478
482
  });
479
- return e;
483
+ return t;
480
484
  }
481
- function et(e) {
482
- for (var s = 0, n = 0; n < e.length; n++)
483
- e[s].length <= e[n].length && (s = n);
484
- return s;
485
+ function it(t) {
486
+ for (var e = 0, s = 0; s < t.length; s++)
487
+ t[e].length <= t[s].length && (e = s);
488
+ return e;
485
489
  }
486
- function be(e) {
487
- if (!/\r/.test(e)) return e;
488
- for (var s = e.split("\r"), n = []; s.length > 0; ) {
489
- var t = et(s);
490
- n.push(s[t]), s = s.slice(t + 1);
490
+ function Ce(t) {
491
+ if (!/\r/.test(t)) return t;
492
+ for (var e = t.split("\r"), s = []; e.length > 0; ) {
493
+ var n = it(e);
494
+ s.push(e[n]), e = e.slice(n + 1);
491
495
  }
492
- return n.join("\r");
496
+ return s.join("\r");
493
497
  }
494
- function tt(e) {
495
- if (!e) return "";
496
- if (!/\r/.test(e)) return e;
497
- if (!/\n/.test(e)) return be(e);
498
- e = e.replace(/\r+\n/gm, `
498
+ function at(t) {
499
+ if (!t) return "";
500
+ if (!/\r/.test(t)) return t;
501
+ if (!/\n/.test(t)) return Ce(t);
502
+ t = t.replace(/\r+\n/gm, `
499
503
  `);
500
- var s = e.lastIndexOf(`
504
+ var e = t.lastIndexOf(`
501
505
  `);
502
- return se(e.slice(0, s)) + `
503
- ` + be(e.slice(s + 1));
506
+ return te(t.slice(0, e)) + `
507
+ ` + Ce(t.slice(e + 1));
504
508
  }
505
- te.exports = se;
506
- var st = te.exports.escapeCarriageReturn = se;
507
- te.exports.escapeCarriageReturnSafe = tt;
508
- function nt(e, s) {
509
- return e = st(ot(e)), Ye.ansiToJson(e, {
509
+ ee.exports = te;
510
+ var ot = ee.exports.escapeCarriageReturn = te;
511
+ ee.exports.escapeCarriageReturnSafe = at;
512
+ function lt(t, e) {
513
+ return t = ot(ht(t)), rt.ansiToJson(t, {
510
514
  json: !0,
511
515
  // eslint-disable-next-line @typescript-eslint/naming-convention
512
516
  remove_empty: !0,
513
517
  // eslint-disable-next-line @typescript-eslint/naming-convention
514
- use_classes: s
518
+ use_classes: e
515
519
  });
516
520
  }
517
- function rt(e) {
518
- const s = [];
519
- return e.bg && s.push(N[`${e.bg}-bg`]), e.fg && s.push(N[`${e.fg}-fg`]), e.decoration && s.push(N[`ansi-${e.decoration}`]), s.length === 0 ? null : s.join(" ");
521
+ function ct(t) {
522
+ const e = [];
523
+ return t.bg && e.push(M[`${t.bg}-bg`]), t.fg && e.push(M[`${t.fg}-fg`]), t.decoration && e.push(M[`ansi-${t.decoration}`]), e.length === 0 ? null : e.join(" ");
520
524
  }
521
- function it(e) {
522
- const s = {};
523
- switch (e.bg && (s.backgroundColor = `rgb(${e.bg})`), e.fg && (s.color = `rgb(${e.fg})`), e.decoration) {
525
+ function ut(t) {
526
+ const e = {};
527
+ switch (t.bg && (e.backgroundColor = `rgb(${t.bg})`), t.fg && (e.color = `rgb(${t.fg})`), t.decoration) {
524
528
  case "bold":
525
- s.fontWeight = "bold";
529
+ e.fontWeight = "bold";
526
530
  break;
527
531
  case "dim":
528
- s.opacity = "0.5";
532
+ e.opacity = "0.5";
529
533
  break;
530
534
  case "italic":
531
- s.fontStyle = "italic";
535
+ e.fontStyle = "italic";
532
536
  break;
533
537
  case "hidden":
534
- s.visibility = "hidden";
538
+ e.visibility = "hidden";
535
539
  break;
536
540
  case "strikethrough":
537
- s.textDecoration = "line-through";
541
+ e.textDecoration = "line-through";
538
542
  break;
539
543
  case "underline":
540
- s.textDecoration = "underline";
544
+ e.textDecoration = "underline";
541
545
  break;
542
546
  case "blink":
543
- s.textDecoration = "blink";
547
+ e.textDecoration = "blink";
544
548
  break;
545
549
  }
546
- return s;
550
+ return e;
547
551
  }
548
- function at(e, s, n, t) {
549
- const f = s ? null : it(n), y = s ? rt(n) : null;
550
- if (!e)
551
- return q.createElement(
552
+ function ft(t, e, s, n) {
553
+ const f = e ? null : ut(s), y = e ? ct(s) : null;
554
+ if (!t)
555
+ return G.createElement(
552
556
  "pre",
553
- { style: f, key: t, className: y },
554
- n.content
557
+ { style: f, key: n, className: y },
558
+ s.content
555
559
  );
556
560
  const i = [], u = /(\s|^)(https?:\/\/(?:www\.|(?!www))[^\s.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/g;
557
561
  let c = 0, o;
558
- for (; (o = u.exec(n.content)) !== null; ) {
562
+ for (; (o = u.exec(s.content)) !== null; ) {
559
563
  const [, r, _] = o, a = o.index + r.length;
560
- a > c && i.push(n.content.substring(c, a));
561
- const v = _.startsWith("www.") ? `http://${_}` : _;
564
+ a > c && i.push(s.content.substring(c, a));
565
+ const b = _.startsWith("www.") ? `http://${_}` : _;
562
566
  i.push(
563
- q.createElement(
567
+ G.createElement(
564
568
  "a",
565
569
  {
566
570
  key: c,
567
- href: v,
571
+ href: b,
568
572
  target: "_blank"
569
573
  },
570
574
  `${_}`
571
575
  )
572
576
  ), c = u.lastIndex;
573
577
  }
574
- return c < n.content.length && i.push(n.content.substring(c)), q.createElement("span", { style: f, key: t, className: y }, i);
578
+ return c < s.content.length && i.push(s.content.substring(c)), G.createElement("span", { style: f, key: n, className: y }, i);
575
579
  }
576
- function ke(e) {
577
- const { className: s, useClasses: n, children: t, linkify: f } = e;
578
- return q.createElement(
580
+ function Se(t) {
581
+ const { className: e, useClasses: s, children: n, linkify: f } = t;
582
+ return G.createElement(
579
583
  "code",
580
- { className: s },
581
- nt(t ?? "", n ?? !1).map(
584
+ { className: e },
585
+ lt(n ?? "", s ?? !1).map(
582
586
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
583
- at.bind(null, f ?? !1, n ?? !1)
587
+ ft.bind(null, f ?? !1, s ?? !1)
584
588
  )
585
589
  );
586
590
  }
587
- function ot(e) {
588
- let s = e;
591
+ function ht(t) {
592
+ let e = t;
589
593
  do
590
- e = s, s = e.replace(/[^\n]\x08/gm, "");
591
- while (s.length < e.length);
592
- return e;
594
+ t = e, e = t.replace(/[^\n]\x08/gm, "");
595
+ while (e.length < t.length);
596
+ return t;
593
597
  }
594
- const ve = Fe(({ text: e }, s) => {
595
- const n = e == null ? void 0 : e.split(`
598
+ const Oe = ze(({ text: t }, e) => {
599
+ const s = t == null ? void 0 : t.split(`
596
600
  `);
597
- return /* @__PURE__ */ L("div", { ref: s, children: n == null ? void 0 : n.map(
598
- (t, f) => /* @__PURE__ */ L(ke, { className: N.Output, useClasses: !0, children: t === "" ? " " : t }, f)
601
+ return /* @__PURE__ */ N("div", { ref: e, children: s == null ? void 0 : s.map(
602
+ (n, f) => /* @__PURE__ */ N(Se, { className: M.Output, useClasses: !0, children: n === "" ? " " : n }, f)
599
603
  ) });
600
604
  });
601
- function lt({ value: e, prefix: s, onChange: n, onKeyUp: t, onKeyDown: f, inputRef: y }) {
602
- const [i, u] = S(0), c = () => {
605
+ function gt({ value: t, prefix: e, onChange: s, onKeyUp: n, onKeyDown: f, inputRef: y }) {
606
+ const [i, u] = T(0), c = () => {
603
607
  var r;
604
608
  const o = (r = y.current) == null ? void 0 : r.selectionStart;
605
609
  o != null && u(o);
606
610
  };
607
- return /* @__PURE__ */ Y("span", { className: N.Input, children: [
608
- s && /* @__PURE__ */ L(ke, { className: N.Prefix, useClasses: !0, children: s }),
609
- /* @__PURE__ */ Y("span", { className: N["Input-container"], style: { "--cursor-offset": i }, children: [
610
- /* @__PURE__ */ L("span", { "aria-hidden": "true", children: e }),
611
- /* @__PURE__ */ L(
611
+ return /* @__PURE__ */ Y("span", { className: M.Input, children: [
612
+ e && /* @__PURE__ */ N(Se, { className: M.Prefix, useClasses: !0, children: e }),
613
+ /* @__PURE__ */ Y("span", { className: M["Input-container"], style: { "--cursor-offset": i }, children: [
614
+ /* @__PURE__ */ N("span", { "aria-hidden": "true", children: t }),
615
+ /* @__PURE__ */ N(
612
616
  "input",
613
617
  {
614
618
  id: "input",
615
- value: e,
619
+ value: t,
616
620
  "aria-label": "Command input",
617
621
  onChange: (o) => {
618
- n(o), c();
622
+ s(o), c();
619
623
  },
620
624
  ref: y,
621
625
  onKeyUp: (o) => {
622
- t == null || t(o);
626
+ n == null || n(o);
623
627
  },
624
628
  onKeyDown: (o) => {
625
629
  f == null || f(o), c();
@@ -638,9 +642,9 @@ function lt({ value: e, prefix: s, onChange: n, onKeyUp: t, onKeyDown: f, inputR
638
642
  ] })
639
643
  ] });
640
644
  }
641
- const Z = "user", Q = "prozilla-os", _t = 50, ye = `${b.fg.cyan + b.decoration.dim}$APP_NAME - Made by Prozilla${b.reset}
642
- ${b.decoration.dim}Type 'help' for a list of commands.${b.reset}
643
- `, E = b.fg.cyan, bt = `
645
+ const Z = "user", Q = "prozilla-os", kt = 50, Ee = `${v.fg.cyan + v.decoration.dim}$APP_NAME - Made by Prozilla${v.reset}
646
+ ${v.decoration.dim}Type 'help' for a list of commands.${v.reset}
647
+ `, O = v.fg.cyan, Ct = `
644
648
  :.
645
649
  -==.
646
650
  .=====:
@@ -648,98 +652,91 @@ ${b.decoration.dim}Type 'help' for a list of commands.${b.reset}
648
652
  :===+=----------::..
649
653
  =+=---------------:..
650
654
  --------------------:.
651
- .:-+=----${b.fg.white}*###*${E}--${b.fg.white}*####=${E}---.
652
- :==+----${b.fg.white}#%+${E}-${b.fg.white}+%#${E}-${b.fg.white}##%*+${E}----:.
653
- .=----${b.fg.white}#%+${E}-${b.fg.white}+%#${E}-${b.fg.white}*+${E}-${b.fg.white}%#+${E}---:.
654
- ==----${b.fg.white}*###*${E}--${b.fg.white}*###*${E}----.
655
+ .:-+=----${v.fg.white}*###*${O}--${v.fg.white}*####=${O}---.
656
+ :==+----${v.fg.white}#%+${O}-${v.fg.white}+%#${O}-${v.fg.white}##%*+${O}----:.
657
+ .=----${v.fg.white}#%+${O}-${v.fg.white}+%#${O}-${v.fg.white}*+${O}-${v.fg.white}%#+${O}---:.
658
+ ==----${v.fg.white}*###*${O}--${v.fg.white}*###*${O}----.
655
659
  ==+-------------------:.
656
660
  ...::---------------:.
657
661
  .::---------::..
658
- ....::... `, ct = {
662
+ ....::... `, mt = {
659
663
  new: "new",
660
664
  start: "start",
661
665
  stop: "stop"
662
666
  };
663
- class P extends Je {
667
+ class P extends Ge {
664
668
  constructor() {
665
669
  super(...arguments);
666
- W(this, "enabled", !1);
670
+ S(this, "enabled", !1);
667
671
  }
668
- start(n) {
669
- return this.enabled ? this : (n == null || n(this), this.enabled = !0, this.emit("start"), this);
672
+ start(s) {
673
+ return this.enabled ? this : (s == null || s(this), this.enabled = !0, this.emit("start"), this);
670
674
  }
671
675
  stop() {
672
676
  return this.enabled ? (this.enabled = !1, this.emit("stop"), this) : this;
673
677
  }
674
- send(n) {
675
- return this.enabled && this.emit("new", n), this;
678
+ send(s) {
679
+ return this.enabled && this.emit("new", s), this;
676
680
  }
677
681
  }
678
- W(P, "EVENT_NAMES", ct);
679
- function F(e, s) {
680
- return `${b.fg.red}${e}: ${s}${b.reset}`;
682
+ S(P, "EVENT_NAMES", mt);
683
+ function q(t, e) {
684
+ return `${v.fg.red}${t}: ${e}${v.reset}`;
681
685
  }
682
- function vt(e) {
683
- return e.replace(/\u001b\[([0-9]+)m/gm, "");
686
+ function Ot(t) {
687
+ return t.replace(/\u001b\[([0-9]+)m/gm, "");
684
688
  }
685
- let G = [];
686
- const we = /* @__PURE__ */ Object.assign({ "./commands/cat.ts": () => import("./cat-F1pnUhWr.js"), "./commands/cd.ts": () => import("./cd-SY_-kgyu.js"), "./commands/clear.ts": () => import("./clear-DtYBxmDr.js"), "./commands/cmatrix.ts": () => import("./cmatrix-BI2_Y5OW.js"), "./commands/compgen.ts": () => import("./compgen-7prOo2oi.js"), "./commands/cowsay.ts": () => import("./cowsay-B6TRoqbg.js"), "./commands/dir.ts": () => import("./dir-BlrznBqV.js"), "./commands/echo.ts": () => import("./echo-PyZ6XYF6.js"), "./commands/eval.ts": () => import("./eval-CnKC-mrj.js"), "./commands/exit.ts": () => import("./exit-CizX3N_u.js"), "./commands/fortune.ts": () => import("./fortune-Cs0PtMgs.js"), "./commands/help.ts": () => import("./help-BUCTSaeJ.js"), "./commands/history.ts": () => import("./history-l0sNRNKZ.js"), "./commands/hostname.ts": () => import("./hostname-BBOQWx6L.js"), "./commands/lolcat.ts": () => import("./lolcat-DiLqxxCO.js"), "./commands/ls.ts": () => import("./ls-DScdmJPT.js"), "./commands/make.ts": () => import("./make-D_hXz4-L.js"), "./commands/man.ts": () => import("./man-C2UviS5N.js"), "./commands/mkdir.ts": () => import("./mkdir-BTSAC1PK.js"), "./commands/neofetch.ts": () => import("./neofetch-Bq355NBE.js"), "./commands/pwd.ts": () => import("./pwd-CSapfDtw.js"), "./commands/reboot.ts": () => import("./reboot-Bwxhoa8q.js"), "./commands/reload.ts": () => import("./reload-CnQb5yj-.js"), "./commands/rev.ts": () => import("./rev-C8qQIyj_.js"), "./commands/rm.ts": () => import("./rm-BwOe-Kq2.js"), "./commands/rmdir.ts": () => import("./rmdir-B9pGhEAU.js"), "./commands/sl.ts": () => import("./sl-DaCRRvuh.js"), "./commands/touch.ts": () => import("./touch-x95bWUyt.js"), "./commands/uptime.ts": () => import("./uptime-BYmCcOUM.js"), "./commands/whatis.ts": () => import("./whatis-DL62XQIi.js"), "./commands/whoami.ts": () => import("./whoami-CQNGmqxL.js") }), Ce = () => {
687
- G = [];
688
- for (const e in we)
689
- we[e]().then((s) => {
690
- const n = Object.keys(s)[0], t = s[n];
691
- t != null && (t.setName(n.toLowerCase()), G.push(t));
689
+ let B = [];
690
+ const $e = /* @__PURE__ */ Object.assign({ "./commands/cat.ts": () => import("./cat-DGK7wWrK.js"), "./commands/cd.ts": () => import("./cd-DvjkW_6o.js"), "./commands/clear.ts": () => import("./clear-BF9eb1Dq.js"), "./commands/cmatrix.ts": () => import("./cmatrix-VYovsHQW.js"), "./commands/compgen.ts": () => import("./compgen-3TwdgHm_.js"), "./commands/cowsay.ts": () => import("./cowsay-IfArfPSJ.js"), "./commands/dir.ts": () => import("./dir-B_Ipo5xb.js"), "./commands/echo.ts": () => import("./echo-DX-Ar2Ut.js"), "./commands/eval.ts": () => import("./eval-C7InkmFY.js"), "./commands/exit.ts": () => import("./exit-D7PPqtiE.js"), "./commands/fortune.ts": () => import("./fortune-zyxpnYNP.js"), "./commands/help.ts": () => import("./help-BEgNbwLL.js"), "./commands/history.ts": () => import("./history-l0sNRNKZ.js"), "./commands/hostname.ts": () => import("./hostname-DU1lQde2.js"), "./commands/lolcat.ts": () => import("./lolcat-5-mBWD9l.js"), "./commands/ls.ts": () => import("./ls-DnkSPHVM.js"), "./commands/make.ts": () => import("./make-DqVQDThH.js"), "./commands/man.ts": () => import("./man-D_hBUTDt.js"), "./commands/mkdir.ts": () => import("./mkdir-BCvMrPTX.js"), "./commands/neofetch.ts": () => import("./neofetch-BFHOITJj.js"), "./commands/pwd.ts": () => import("./pwd-C21tQanw.js"), "./commands/reboot.ts": () => import("./reboot-C2t7a3Av.js"), "./commands/reload.ts": () => import("./reload-C9o_dGZw.js"), "./commands/rev.ts": () => import("./rev-CBibYebM.js"), "./commands/rm.ts": () => import("./rm-ChTrwld4.js"), "./commands/rmdir.ts": () => import("./rmdir-CUM4xt2w.js"), "./commands/sl.ts": () => import("./sl-DrATMkz6.js"), "./commands/touch.ts": () => import("./touch-CqBIAjMe.js"), "./commands/uptime.ts": () => import("./uptime-xM-0FRzA.js"), "./commands/whatis.ts": () => import("./whatis-vXemLo9m.js"), "./commands/whoami.ts": () => import("./whoami-CnUR69yX.js") }), Te = () => {
691
+ B = [];
692
+ for (const t in $e)
693
+ $e[t]().then((e) => {
694
+ const s = Object.keys(e)[0], n = e[s];
695
+ n != null && (n.name || n.setName(s.toLowerCase()), B.push(n));
692
696
  });
693
697
  };
694
- Ce();
695
- const B = class B {
696
- static find(s) {
697
- let n = null;
698
- return this.COMMANDS.forEach((t) => {
699
- if (t.name === s) {
700
- n = t;
701
- return;
702
- }
703
- }), n;
698
+ Te();
699
+ class se {
700
+ static addCommand(e) {
701
+ this.COMMANDS.push(e);
704
702
  }
705
- static search(s) {
706
- return this.COMMANDS.filter((t) => {
707
- var f;
708
- return (f = t.name) == null ? void 0 : f.match(s);
709
- });
703
+ static find(e) {
704
+ return this.COMMANDS.find((s) => s.name == e);
705
+ }
706
+ static search(e) {
707
+ return this.COMMANDS.filter((s) => s.name.match(e));
710
708
  }
711
709
  static reload() {
712
- Ce(), B.COMMANDS = G;
710
+ Te(), this.COMMANDS = B;
713
711
  }
714
- };
715
- W(B, "COMMANDS", G);
716
- let ee = B;
717
- function ut({ app: e, path: s, input: n, setTitle: t, close: f, active: y, focus: i }) {
718
- const u = De(), [c, o] = S(0), [r, _] = S(n ?? ""), [a, v] = S([{
719
- text: e ? ye.replace("$APP_NAME", e.name) : ye,
712
+ }
713
+ S(se, "COMMANDS", B);
714
+ function pt({ app: t, path: e, input: s, setTitle: n, close: f, active: y, focus: i }) {
715
+ const u = Fe(), [c, o] = T(0), [r, _] = T(s ?? ""), [a, b] = T([{
716
+ text: t ? Ee.replace("$APP_NAME", t.name) : Ee,
720
717
  isInput: !1
721
- }]), k = Re(), [h, $] = S(k == null ? void 0 : k.navigate(s ?? "~")), O = pe(null), [M, D] = S(0), [T, K] = S(null), [U, ne] = S(null), R = pe(null), [re, ie] = S(!1), Ee = He();
718
+ }]), k = qe(), [h, E] = T(k == null ? void 0 : k.navigate(e ?? "~")), $ = ye(null), [R, D] = T(0), [A, K] = T(null), [U, ne] = T(null), x = ye(null), [re, ie] = T(!1), Ae = Je();
722
719
  z(() => {
723
- h != null && (t == null || t(`${Z}@${Q}: ${h.root ? "/" : h.path}`));
724
- }, [h == null ? void 0 : h.path, h == null ? void 0 : h.root, t]), z(() => {
725
- !O.current || !y || O.current.focus();
726
- }, [O, y]);
720
+ h != null && (n == null || n(`${Z}@${Q}: ${h.root ? "/" : h.path}`));
721
+ }, [h == null ? void 0 : h.path, h == null ? void 0 : h.root, n]), z(() => {
722
+ !$.current || !y || $.current.focus();
723
+ }, [$, y]);
727
724
  const ae = () => {
728
- R.current.scrollTop = R.current.scrollHeight;
725
+ x.current.scrollTop = x.current.scrollHeight;
729
726
  };
730
727
  z(() => {
731
- re || R.current == null || U == null || (ae(), ie(!0));
732
- }, [re, U, R]), z(() => {
733
- R.current == null || T != null || ae();
728
+ re || x.current == null || U == null || (ae(), ie(!0));
729
+ }, [re, U, x]), z(() => {
730
+ x.current == null || A != null || ae();
734
731
  }, [r]);
735
- const oe = `${b.fg.cyan + Z}@${Q + b.reset}:${b.fg.blue + (h != null && h.root || h == null ? "/" : h == null ? void 0 : h.path) + b.reset}$ `, le = a, X = (l) => {
736
- le.push(l), v(le);
737
- }, J = (l) => {
732
+ const oe = `${v.fg.cyan + Z}@${Q + v.reset}:${v.fg.blue + (h != null && h.root || h == null ? "/" : h == null ? void 0 : h.path) + v.reset}$ `, le = a, X = (l) => {
733
+ le.push(l), b(le);
734
+ }, V = (l) => {
738
735
  X({
739
736
  text: l,
740
737
  isInput: !1
741
738
  });
742
- }, $e = (l, p) => {
739
+ }, Ie = (l, p) => {
743
740
  K(l), ie(!1);
744
741
  const g = (d) => {
745
742
  y && (d.ctrlKey || d.metaKey) && d.key === "c" && l.stop();
@@ -751,13 +748,13 @@ function ut({ app: e, path: s, input: n, setTitle: t, close: f, active: y, focus
751
748
  for (const I of p)
752
749
  w instanceof P || (w = await ce(w ? `${I} ${w}` : I));
753
750
  if (w instanceof P) {
754
- l.stop(), J(b.fg.red + "Stream failed");
751
+ l.stop(), V(v.fg.red + "Stream failed");
755
752
  return;
756
753
  }
757
754
  m = w, ne(w);
758
755
  })();
759
756
  }), l.on(P.EVENT_NAMES.stop, () => {
760
- document.removeEventListener("keydown", g), J(m), K(null), ne(null);
757
+ document.removeEventListener("keydown", g), V(m), K(null), ne(null);
761
758
  }), document.addEventListener("keydown", g);
762
759
  }, ce = async (l) => {
763
760
  var he;
@@ -768,41 +765,41 @@ function ut({ app: e, path: s, input: n, setTitle: t, close: f, active: y, focus
768
765
  d[0].toLowerCase() === "sudo" && d.length >= 2 && d.shift();
769
766
  const w = (he = d.shift()) == null ? void 0 : he.toLowerCase();
770
767
  if (w == null) return;
771
- const I = ee.find(w);
772
- if (!I) return F(w, "Command not found");
768
+ const I = se.find(w);
769
+ if (!I) return q(w, "Command not found");
773
770
  d = d.map((C) => C.startsWith('"') && C.endsWith('"') ? C.slice(1, -1) : C);
774
771
  const H = [], fe = {};
775
772
  if (d.filter((C) => C.startsWith("-")).forEach((C) => {
776
- const ge = (j) => {
777
- if (H.includes(j))
773
+ const ge = (F) => {
774
+ if (H.includes(F))
778
775
  return;
779
- H.push(j);
780
- const x = I.getOption(H[H.length - 1]);
781
- if (x != null && x.isInput) {
776
+ H.push(F);
777
+ const j = I.getOption(H[H.length - 1]);
778
+ if (j != null && j.isInput) {
782
779
  const me = d[d.indexOf(C) + 1];
783
- fe[x.short] = me, de(me, d);
780
+ fe[j.short] = me, we(me, d);
784
781
  }
785
782
  };
786
783
  if (C.startsWith("--")) {
787
- const j = C.substring(2).toLowerCase();
788
- ge(j);
784
+ const F = C.substring(2).toLowerCase();
785
+ ge(F);
789
786
  } else
790
- C.substring(1).split("").forEach((x) => {
791
- ge(x);
787
+ C.substring(1).split("").forEach((j) => {
788
+ ge(j);
792
789
  });
793
- de(C, d);
790
+ we(C, d);
794
791
  }), I.requireArgs && d.length === 0)
795
- return F(w, `Incorrect usage: ${w} requires at least 1 argument`);
792
+ return q(w, `Incorrect usage: ${w} requires at least 1 argument`);
796
793
  if (I.requireOptions && H.length === 0)
797
- return F(w, `Incorrect usage: ${w} requires at least 1 option`);
798
- let V = null;
794
+ return q(w, `Incorrect usage: ${w} requires at least 1 option`);
795
+ let W = null;
799
796
  try {
800
- if (V = await I.execute(d, {
801
- promptOutput: J,
797
+ if (W = await I.execute(d, {
798
+ promptOutput: V,
802
799
  pushHistory: X,
803
800
  virtualRoot: k,
804
801
  currentDirectory: h,
805
- setCurrentDirectory: $,
802
+ setCurrentDirectory: E,
806
803
  username: Z,
807
804
  hostname: Q,
808
805
  rawInputValue: g,
@@ -810,19 +807,19 @@ function ut({ app: e, path: s, input: n, setTitle: t, close: f, active: y, focus
810
807
  exit: f,
811
808
  inputs: fe,
812
809
  timestamp: m,
813
- settingsManager: Ee,
810
+ settingsManager: Ae,
814
811
  systemManager: u,
815
- app: e
816
- }), V == null)
817
- return F(w, "Command failed");
818
- if (!V.blank)
819
- return V;
812
+ app: t
813
+ }), W == null)
814
+ return q(w, "Command failed");
815
+ if (!W.blank)
816
+ return W;
820
817
  } catch (C) {
821
- return console.error(C), F(w, "Command failed");
818
+ return console.error(C), q(w, "Command failed");
822
819
  }
823
- }, Oe = () => {
820
+ }, Le = () => {
824
821
  _(""), D(0);
825
- }, Se = async (l) => {
822
+ }, Ne = async (l) => {
826
823
  X({
827
824
  text: oe + l,
828
825
  isInput: !0,
@@ -833,58 +830,58 @@ function ut({ app: e, path: s, input: n, setTitle: t, close: f, active: y, focus
833
830
  let m = null;
834
831
  for (const d of p)
835
832
  m instanceof P || (m = await ce(m ? `${d} ${m}` : d), g.push(d));
836
- Oe(), p = p.filter((d) => !g.includes(d)), m && (m instanceof P ? $e(m, p) : J(`${m}
833
+ Le(), p = p.filter((d) => !g.includes(d)), m && (m instanceof P ? Ie(m, p) : V(`${m}
837
834
  `));
838
835
  }, ue = (l) => {
839
- const p = a.filter(({ isInput: m }) => m), g = Ve(M + l, 0, p.length);
840
- if (g === M) {
836
+ const p = a.filter(({ isInput: m }) => m), g = Be(R + l, 0, p.length);
837
+ if (g === R) {
841
838
  l < 0 && _("");
842
839
  return;
843
840
  }
844
841
  _(g === 0 ? "" : p[p.length - g].value ?? ""), D(g);
845
- }, Te = (l) => {
842
+ }, Me = (l) => {
846
843
  const p = l.target.value, { key: g } = l;
847
- g === "Enter" ? (Se(p), o((m) => m + 1)) : g === "ArrowUp" ? (l.preventDefault(), ue(1)) : g === "ArrowDown" ? (l.preventDefault(), ue(-1)) : !T && (l.ctrlKey || l.metaKey) && g === "c" && _((m) => m + "^C");
848
- }, Ie = (l) => {
844
+ g === "Enter" ? (Ne(p), o((m) => m + 1)) : g === "ArrowUp" ? (l.preventDefault(), ue(1)) : g === "ArrowDown" ? (l.preventDefault(), ue(-1)) : !A && (l.ctrlKey || l.metaKey) && g === "c" && _((m) => m + "^C");
845
+ }, Pe = (l) => {
849
846
  const p = l.target.value;
850
847
  return _(p);
851
- }, Ae = () => {
848
+ }, Re = () => {
852
849
  const l = a.slice(-16);
853
850
  let p = 0;
854
851
  return l.forEach((g, m) => {
855
852
  g.clear && (p = m + 1);
856
- }), l.slice(p).map(({ text: g }, m) => /* @__PURE__ */ L(ve, { text: g }, m));
857
- }, Le = (l) => {
853
+ }), l.slice(p).map(({ text: g }, m) => /* @__PURE__ */ N(Oe, { text: g }, m));
854
+ }, De = (l) => {
858
855
  var p, g;
859
856
  i == null || i(l), l.button === 2 && (l.preventDefault(), (g = (p = navigator.clipboard).readText) == null || g.call(p).then((m) => {
860
857
  _(r + m);
861
858
  }).catch((m) => {
862
859
  console.error(m);
863
860
  }));
864
- }, Ne = (l) => {
861
+ }, xe = (l) => {
865
862
  l.preventDefault();
866
863
  };
867
864
  return /* @__PURE__ */ Y(
868
865
  "div",
869
866
  {
870
- ref: R,
871
- className: N.Terminal,
872
- onMouseDown: Le,
873
- onContextMenu: Ne,
867
+ ref: x,
868
+ className: M.Terminal,
869
+ onMouseDown: De,
870
+ onContextMenu: xe,
874
871
  onClick: (l) => {
875
872
  var p, g;
876
- ((p = window.getSelection()) == null ? void 0 : p.toString()) === "" && (l.preventDefault(), (g = O.current) == null || g.focus());
873
+ ((p = window.getSelection()) == null ? void 0 : p.toString()) === "" && (l.preventDefault(), (g = $.current) == null || g.focus());
877
874
  },
878
875
  children: [
879
- Ae(),
880
- T ? /* @__PURE__ */ L(ve, { text: U ?? "" }) : /* @__PURE__ */ L(
881
- lt,
876
+ Re(),
877
+ A ? /* @__PURE__ */ N(Oe, { text: U ?? "" }) : /* @__PURE__ */ N(
878
+ gt,
882
879
  {
883
880
  value: r,
884
881
  prefix: oe,
885
- onKeyDown: Te,
886
- onChange: Ie,
887
- inputRef: O
882
+ onKeyDown: Me,
883
+ onChange: Pe,
884
+ inputRef: $
888
885
  },
889
886
  c
890
887
  )
@@ -892,16 +889,69 @@ function ut({ app: e, path: s, input: n, setTitle: t, close: f, active: y, focus
892
889
  }
893
890
  );
894
891
  }
895
- const ft = new xe("Terminal", "terminal", ut).setIconUrl("https://os.prozilla.dev/assets/apps/icons/terminal.svg").setRole(je.APP_ROLES.terminal).setCategory("Utilities & tools");
896
- ft.setMetadata({ name: "@prozilla-os/terminal", version: "1.1.16", author: "Prozilla" });
892
+ class dt extends Ve {
893
+ constructor() {
894
+ super("Terminal", "terminal", pt), this.setIconUrl("https://os.prozilla.dev/assets/apps/icons/terminal.svg"), this.setRole(We.APP_ROLES.terminal), this.setCategory("Utilities & tools");
895
+ }
896
+ addCommands(e) {
897
+ return e.forEach((s) => this.addCommand(s)), this;
898
+ }
899
+ addCommand(e) {
900
+ return se.addCommand(e), this;
901
+ }
902
+ }
903
+ var J;
904
+ class Et {
905
+ constructor() {
906
+ ve(this, J);
907
+ S(this, "options", []);
908
+ S(this, "manual");
909
+ S(this, "requireArgs");
910
+ S(this, "requireOptions");
911
+ S(this, "execute", () => {
912
+ });
913
+ }
914
+ setName(e) {
915
+ var s;
916
+ return be(this, J, e), e && !((s = this.manual) != null && s.usage) && (this.manual || (this.manual = {}), this.manual.usage = e), this;
917
+ }
918
+ get name() {
919
+ return _e(this, J) ?? "";
920
+ }
921
+ setExecute(e) {
922
+ return this.execute = e, this;
923
+ }
924
+ setRequireArgs(e) {
925
+ return this.requireArgs = e, this;
926
+ }
927
+ setRequireOptions(e) {
928
+ return this.requireOptions = e, this;
929
+ }
930
+ setManual({ purpose: e, usage: s, description: n, options: f }) {
931
+ return this.manual = { purpose: e, usage: s, description: n, options: f }, this;
932
+ }
933
+ addOption({ short: e, long: s, isInput: n }) {
934
+ return this.options.push({ short: e, long: s, isInput: n }), this;
935
+ }
936
+ getOption(e) {
937
+ let s = null;
938
+ return this.options.forEach((n) => {
939
+ (n.short === e || n.long === e) && (s = n);
940
+ }), s;
941
+ }
942
+ }
943
+ J = new WeakMap();
944
+ const $t = new dt();
897
945
  export {
898
- E as A,
899
- ee as C,
900
- _t as M,
946
+ O as A,
947
+ Et as C,
948
+ kt as M,
901
949
  P as S,
902
- bt as a,
903
- F as f,
904
- vt as r,
905
- ft as t
950
+ dt as T,
951
+ se as a,
952
+ Ct as b,
953
+ q as f,
954
+ Ot as r,
955
+ $t as t
906
956
  };
907
- //# sourceMappingURL=main-CkpVfeUg.js.map
957
+ //# sourceMappingURL=main-CXiltWT-.js.map