rolldown 0.14.0 → 0.15.0-snapshot-5e456b6-20241203003703

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 (93) hide show
  1. package/dist/cjs/cli.cjs +782 -854
  2. package/dist/cjs/experimental-index.cjs +68 -26
  3. package/dist/cjs/index.cjs +6 -8
  4. package/dist/cjs/parallel-plugin-worker.cjs +20 -14
  5. package/dist/cjs/parallel-plugin.cjs +1 -3
  6. package/dist/esm/cli.mjs +722 -796
  7. package/dist/esm/experimental-index.mjs +44 -7
  8. package/dist/esm/index.mjs +2 -4
  9. package/dist/esm/parallel-plugin-worker.mjs +15 -10
  10. package/dist/esm/parallel-plugin.mjs +1 -3
  11. package/dist/shared/{chunk-JoMxl5V2.cjs → chunk-BK2Ye-xa.cjs} +19 -6
  12. package/dist/shared/{consola.36c0034f-Xyw7SC_7.mjs → consola_36c0034f-DWsVjwtA.mjs} +218 -283
  13. package/dist/shared/{consola.36c0034f-HcmWcfPe.cjs → consola_36c0034f-_8_dG1Nr.cjs} +249 -295
  14. package/dist/shared/{prompt-hoPhcrA-.mjs → prompt-DGW8ZJmn.mjs} +125 -174
  15. package/dist/shared/{prompt-9Ij3R3TG.cjs → prompt-RFvZMmjc.cjs} +157 -204
  16. package/dist/shared/src-COU7qQBJ.cjs +2899 -0
  17. package/dist/shared/src-DEPa5yhI.mjs +2771 -0
  18. package/dist/types/api/build.d.ts +14 -0
  19. package/dist/types/api/experimental.d.ts +7 -0
  20. package/dist/types/api/rolldown/index.d.ts +3 -0
  21. package/dist/types/api/rolldown/rolldown-build.d.ts +12 -0
  22. package/dist/types/api/watch/index.d.ts +3 -0
  23. package/dist/types/{watcher.d.ts → api/watch/watcher.d.ts} +5 -3
  24. package/dist/types/binding.d.ts +175 -40
  25. package/dist/types/builtin-plugin/alias-plugin.d.ts +10 -0
  26. package/dist/types/builtin-plugin/constructors.d.ts +20 -0
  27. package/dist/types/builtin-plugin/replace-plugin.d.ts +28 -0
  28. package/dist/types/{options/normalized-ecma-transform-plugin-config.d.ts → builtin-plugin/transform-plugin.d.ts} +2 -1
  29. package/dist/types/builtin-plugin/utils.d.ts +8 -0
  30. package/dist/types/cli/arguments/normalize.d.ts +2 -6
  31. package/dist/types/cli/arguments/schema.d.ts +169 -81
  32. package/dist/types/constants/plugin.d.ts +3 -1
  33. package/dist/types/experimental-index.d.ts +5 -2
  34. package/dist/types/index.d.ts +13 -10
  35. package/dist/types/log/locate-character/index.d.ts +13 -0
  36. package/dist/types/log/logger.d.ts +2 -16
  37. package/dist/types/log/logging.d.ts +6 -3
  38. package/dist/types/log/logs.d.ts +2 -0
  39. package/dist/types/options/input-options-schema.d.ts +596 -0
  40. package/dist/types/options/input-options.d.ts +74 -430
  41. package/dist/types/options/normalized-input-options.d.ts +17 -11
  42. package/dist/types/options/normalized-output-options.d.ts +57 -21
  43. package/dist/types/options/output-options-schema.d.ts +147 -0
  44. package/dist/types/options/output-options.d.ts +72 -265
  45. package/dist/types/options/watch-options.d.ts +5 -0
  46. package/dist/types/plugin/bindingify-build-hooks.d.ts +9 -11
  47. package/dist/types/plugin/bindingify-hook-filter.d.ts +5 -5
  48. package/dist/types/plugin/bindingify-output-hooks.d.ts +13 -16
  49. package/dist/types/plugin/bindingify-plugin.d.ts +12 -3
  50. package/dist/types/plugin/bindingify-watch-hooks.d.ts +3 -5
  51. package/dist/types/plugin/hook-filter.d.ts +1 -1
  52. package/dist/types/plugin/index.d.ts +21 -18
  53. package/dist/types/plugin/minimal-plugin-context.d.ts +15 -0
  54. package/dist/types/plugin/plugin-context-data.d.ts +4 -5
  55. package/dist/types/plugin/plugin-context.d.ts +9 -4
  56. package/dist/types/plugin/plugin-driver.d.ts +4 -5
  57. package/dist/types/plugin/transform-plugin-context.d.ts +4 -3
  58. package/dist/types/rollup-types.d.ts +1 -1
  59. package/dist/types/treeshake/index.d.ts +0 -12
  60. package/dist/types/treeshake/module-side-effects.d.ts +111 -11
  61. package/dist/types/types/rolldown-output.d.ts +11 -2
  62. package/dist/types/types/utils.d.ts +1 -0
  63. package/dist/types/utils/bindingify-input-options.d.ts +7 -0
  64. package/dist/types/utils/bindingify-output-options.d.ts +3 -0
  65. package/dist/types/utils/define-config.d.ts +3 -0
  66. package/dist/types/utils/error.d.ts +1 -0
  67. package/dist/types/utils/normalize-hook.d.ts +1 -1
  68. package/dist/types/utils/normalize-plugin-option.d.ts +8 -3
  69. package/dist/types/{options/utils.d.ts → utils/normalize-string-or-regex.d.ts} +1 -1
  70. package/dist/types/utils/transform-rendered-chunk.d.ts +4 -0
  71. package/dist/types/utils/transform-rendered-module.d.ts +3 -0
  72. package/dist/types/utils/transform-sourcemap.d.ts +2 -0
  73. package/dist/types/utils/transform-to-rollup-output.d.ts +1 -0
  74. package/package.json +30 -22
  75. package/dist/shared/rolldown-binding.wasi.cjs +0 -187
  76. package/dist/shared/src_index-3pqhEViJ.cjs +0 -2785
  77. package/dist/shared/src_index-ywYMd4vB.mjs +0 -2786
  78. package/dist/shared/wasi-worker-browser.mjs +0 -39
  79. package/dist/shared/wasi-worker.mjs +0 -63
  80. package/dist/shared/watcher-worker.js +0 -1
  81. package/dist/types/constants/types.d.ts +0 -1
  82. package/dist/types/options/bindingify-input-options.d.ts +0 -4
  83. package/dist/types/options/bindingify-output-options.d.ts +0 -3
  84. package/dist/types/options/normalized-alias-plugin-config.d.ts +0 -8
  85. package/dist/types/options/watch-option.d.ts +0 -5
  86. package/dist/types/plugin/builtin-plugin.d.ts +0 -81
  87. package/dist/types/rolldown-build.d.ts +0 -10
  88. package/dist/types/rolldown.d.ts +0 -12
  89. package/dist/types/types/rendered-module.d.ts +0 -2
  90. package/dist/types/utils/normalize-input-options.d.ts +0 -3
  91. package/dist/types/utils/normalize-output-options.d.ts +0 -3
  92. package/dist/types/utils/normalize-tree-shake.d.ts +0 -3
  93. /package/dist/types/{utils/type-assert.d.ts → types/assert.d.ts} +0 -0
@@ -1,7 +1,5 @@
1
- import __node_module__ from 'node:module';
2
- const require = __node_module__.createRequire(import.meta.url)
3
1
  import { sep } from "node:path";
4
- import { default as process$1 } from "node:process";
2
+ import process$1 from "node:process";
5
3
  import { formatWithOptions } from "node:util";
6
4
  import * as tty from "node:tty";
7
5
 
@@ -23,47 +21,35 @@ const LogLevels = {
23
21
  verbose: Number.POSITIVE_INFINITY
24
22
  };
25
23
  const LogTypes = {
26
- silent: {level: -1},
27
- fatal: {level: LogLevels.fatal},
28
- error: {level: LogLevels.error},
29
- warn: {level: LogLevels.warn},
30
- log: {level: LogLevels.log},
31
- info: {level: LogLevels.info},
32
- success: {level: LogLevels.success},
33
- fail: {level: LogLevels.fail},
34
- ready: {level: LogLevels.info},
35
- start: {level: LogLevels.info},
36
- box: {level: LogLevels.info},
37
- debug: {level: LogLevels.debug},
38
- trace: {level: LogLevels.trace},
39
- verbose: {level: LogLevels.verbose}
24
+ silent: { level: -1 },
25
+ fatal: { level: LogLevels.fatal },
26
+ error: { level: LogLevels.error },
27
+ warn: { level: LogLevels.warn },
28
+ log: { level: LogLevels.log },
29
+ info: { level: LogLevels.info },
30
+ success: { level: LogLevels.success },
31
+ fail: { level: LogLevels.fail },
32
+ ready: { level: LogLevels.info },
33
+ start: { level: LogLevels.info },
34
+ box: { level: LogLevels.info },
35
+ debug: { level: LogLevels.debug },
36
+ trace: { level: LogLevels.trace },
37
+ verbose: { level: LogLevels.verbose }
40
38
  };
41
39
  function isObject(value) {
42
40
  return value !== null && typeof value === "object";
43
41
  }
44
42
  function _defu(baseObject, defaults, namespace = ".", merger) {
45
- if (!isObject(defaults)) {
46
- return _defu(baseObject, {}, namespace, merger);
47
- }
43
+ if (!isObject(defaults)) return _defu(baseObject, {}, namespace, merger);
48
44
  const object = Object.assign({}, defaults);
49
45
  for (const key in baseObject) {
50
- if (key === "__proto__" || key === "constructor") {
51
- continue;
52
- }
46
+ if (key === "__proto__" || key === "constructor") continue;
53
47
  const value = baseObject[key];
54
- if (value === null || value === void 0) {
55
- continue;
56
- }
57
- if (merger && merger(object, key, value, namespace)) {
58
- continue;
59
- }
60
- if (Array.isArray(value) && Array.isArray(object[key])) {
61
- object[key] = [...value, ...object[key]];
62
- } else if (isObject(value) && isObject(object[key])) {
63
- object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
64
- } else {
65
- object[key] = value;
66
- }
48
+ if (value === null || value === void 0) continue;
49
+ if (merger && merger(object, key, value, namespace)) continue;
50
+ if (Array.isArray(value) && Array.isArray(object[key])) object[key] = [...value, ...object[key]];
51
+ else if (isObject(value) && isObject(object[key])) object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
52
+ else object[key] = value;
67
53
  }
68
54
  return object;
69
55
  }
@@ -75,25 +61,19 @@ function isPlainObject(obj) {
75
61
  return Object.prototype.toString.call(obj) === "[object Object]";
76
62
  }
77
63
  function isLogObj(arg) {
78
- if (!isPlainObject(arg)) {
79
- return false;
80
- }
81
- if (!arg.message && !arg.args) {
82
- return false;
83
- }
84
- if (arg.stack) {
85
- return false;
86
- }
64
+ if (!isPlainObject(arg)) return false;
65
+ if (!arg.message && !arg.args) return false;
66
+ if (arg.stack) return false;
87
67
  return true;
88
68
  }
89
69
  let paused = false;
90
70
  const queue = [];
91
- class Consola {
71
+ var Consola = class Consola {
92
72
  constructor(options = {}) {
93
73
  const types = options.types || LogTypes;
94
74
  this.options = defu({
95
75
  ...options,
96
- defaults: {...options.defaults},
76
+ defaults: { ...options.defaults },
97
77
  level: _normalizeLogLevel(options.level, types),
98
78
  reporters: [...options.reporters || []]
99
79
  }, {
@@ -115,9 +95,7 @@ class Consola {
115
95
  this[type] = this._wrapLogFn(defaults);
116
96
  this[type].raw = this._wrapLogFn(defaults, true);
117
97
  }
118
- if (this.options.mockFn) {
119
- this.mockTypes();
120
- }
98
+ if (this.options.mockFn) this.mockTypes();
121
99
  this._lastLog = {};
122
100
  }
123
101
  get level() {
@@ -127,9 +105,7 @@ class Consola {
127
105
  this.options.level = _normalizeLogLevel(level, this.options.types, this.options.level);
128
106
  }
129
107
  prompt(message, opts) {
130
- if (!this.options.prompt) {
131
- throw new Error("prompt is not supported!");
132
- }
108
+ if (!this.options.prompt) throw new Error("prompt is not supported!");
133
109
  return this.options.prompt(message, opts);
134
110
  }
135
111
  create(options) {
@@ -137,9 +113,7 @@ class Consola {
137
113
  ...this.options,
138
114
  ...options
139
115
  });
140
- if (this._mockFn) {
141
- instance.mockTypes(this._mockFn);
142
- }
116
+ if (this._mockFn) instance.mockTypes(this._mockFn);
143
117
  return instance;
144
118
  }
145
119
  withDefaults(defaults) {
@@ -152,7 +126,7 @@ class Consola {
152
126
  });
153
127
  }
154
128
  withTag(tag) {
155
- return this.withDefaults({tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag});
129
+ return this.withDefaults({ tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag });
156
130
  }
157
131
  addReporter(reporter) {
158
132
  this.options.reporters.push(reporter);
@@ -161,12 +135,8 @@ class Consola {
161
135
  removeReporter(reporter) {
162
136
  if (reporter) {
163
137
  const i = this.options.reporters.indexOf(reporter);
164
- if (i >= 0) {
165
- return this.options.reporters.splice(i, 1);
166
- }
167
- } else {
168
- this.options.reporters.splice(0);
169
- }
138
+ if (i >= 0) return this.options.reporters.splice(i, 1);
139
+ } else this.options.reporters.splice(0);
170
140
  return this;
171
141
  }
172
142
  setReporters(reporters) {
@@ -183,18 +153,14 @@ class Consola {
183
153
  }
184
154
  wrapConsole() {
185
155
  for (const type in this.options.types) {
186
- if (!console["__" + type]) {
187
- console["__" + type] = console[type];
188
- }
156
+ if (!console["__" + type]) console["__" + type] = console[type];
189
157
  console[type] = this[type].raw;
190
158
  }
191
159
  }
192
160
  restoreConsole() {
193
- for (const type in this.options.types) {
194
- if (console["__" + type]) {
195
- console[type] = console["__" + type];
196
- delete console["__" + type];
197
- }
161
+ for (const type in this.options.types) if (console["__" + type]) {
162
+ console[type] = console["__" + type];
163
+ delete console["__" + type];
198
164
  }
199
165
  }
200
166
  wrapStd() {
@@ -202,14 +168,10 @@ class Consola {
202
168
  this._wrapStream(this.options.stderr, "log");
203
169
  }
204
170
  _wrapStream(stream, type) {
205
- if (!stream) {
206
- return;
207
- }
208
- if (!stream.__write) {
209
- stream.__write = stream.write;
210
- }
171
+ if (!stream) return;
172
+ if (!stream.__write) stream.__write = stream.write;
211
173
  stream.write = (data) => {
212
- this[type].raw((String(data)).trim());
174
+ this[type].raw(String(data).trim());
213
175
  };
214
176
  }
215
177
  restoreStd() {
@@ -217,9 +179,7 @@ class Consola {
217
179
  this._restoreStream(this.options.stderr);
218
180
  }
219
181
  _restoreStream(stream) {
220
- if (!stream) {
221
- return;
222
- }
182
+ if (!stream) return;
223
183
  if (stream.__write) {
224
184
  stream.write = stream.__write;
225
185
  delete stream.__write;
@@ -231,16 +191,12 @@ class Consola {
231
191
  resumeLogs() {
232
192
  paused = false;
233
193
  const _queue = queue.splice(0);
234
- for (const item of _queue) {
235
- item[0]._logFn(item[1], item[2]);
236
- }
194
+ for (const item of _queue) item[0]._logFn(item[1], item[2]);
237
195
  }
238
196
  mockTypes(mockFn) {
239
197
  const _mockFn = mockFn || this.options.mockFn;
240
198
  this._mockFn = _mockFn;
241
- if (typeof _mockFn !== "function") {
242
- return;
243
- }
199
+ if (typeof _mockFn !== "function") return;
244
200
  for (const type in this.options.types) {
245
201
  this[type] = _mockFn(type, this.options.types[type]) || this[type];
246
202
  this[type].raw = this[type];
@@ -249,35 +205,33 @@ class Consola {
249
205
  _wrapLogFn(defaults, isRaw) {
250
206
  return (...args) => {
251
207
  if (paused) {
252
- queue.push([this, defaults, args, isRaw]);
208
+ queue.push([
209
+ this,
210
+ defaults,
211
+ args,
212
+ isRaw
213
+ ]);
253
214
  return;
254
215
  }
255
216
  return this._logFn(defaults, args, isRaw);
256
217
  };
257
218
  }
258
219
  _logFn(defaults, args, isRaw) {
259
- if ((defaults.level || 0) > this.level) {
260
- return false;
261
- }
220
+ if ((defaults.level || 0) > this.level) return false;
262
221
  const logObj = {
263
222
  date: /* @__PURE__ */ new Date(),
264
223
  args: [],
265
224
  ...defaults,
266
225
  level: _normalizeLogLevel(defaults.level, this.options.types)
267
226
  };
268
- if (!isRaw && args.length === 1 && isLogObj(args[0])) {
269
- Object.assign(logObj, args[0]);
270
- } else {
271
- logObj.args = [...args];
272
- }
227
+ if (!isRaw && args.length === 1 && isLogObj(args[0])) Object.assign(logObj, args[0]);
228
+ else logObj.args = [...args];
273
229
  if (logObj.message) {
274
230
  logObj.args.unshift(logObj.message);
275
231
  delete logObj.message;
276
232
  }
277
233
  if (logObj.additional) {
278
- if (!Array.isArray(logObj.additional)) {
279
- logObj.additional = logObj.additional.split("\n");
280
- }
234
+ if (!Array.isArray(logObj.additional)) logObj.additional = logObj.additional.split("\n");
281
235
  logObj.args.push("\n" + logObj.additional.join("\n"));
282
236
  delete logObj.additional;
283
237
  }
@@ -287,9 +241,7 @@ class Consola {
287
241
  const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
288
242
  if (this._lastLog.object && repeated > 0) {
289
243
  const args2 = [...this._lastLog.object.args];
290
- if (repeated > 1) {
291
- args2.push(`(repeated ${repeated} times)`);
292
- }
244
+ if (repeated > 1) args2.push(`(repeated ${repeated} times)`);
293
245
  this._log({
294
246
  ...this._lastLog.object,
295
247
  args: args2
@@ -304,38 +256,32 @@ class Consola {
304
256
  clearTimeout(this._lastLog.timeout);
305
257
  const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
306
258
  this._lastLog.time = logObj.date;
307
- if (diffTime < this.options.throttle) {
308
- try {
309
- const serializedLog = JSON.stringify([logObj.type, logObj.tag, logObj.args]);
310
- const isSameLog = this._lastLog.serialized === serializedLog;
311
- this._lastLog.serialized = serializedLog;
312
- if (isSameLog) {
313
- this._lastLog.count = (this._lastLog.count || 0) + 1;
314
- if (this._lastLog.count > this.options.throttleMin) {
315
- this._lastLog.timeout = setTimeout(resolveLog, this.options.throttle);
316
- return;
317
- }
259
+ if (diffTime < this.options.throttle) try {
260
+ const serializedLog = JSON.stringify([
261
+ logObj.type,
262
+ logObj.tag,
263
+ logObj.args
264
+ ]);
265
+ const isSameLog = this._lastLog.serialized === serializedLog;
266
+ this._lastLog.serialized = serializedLog;
267
+ if (isSameLog) {
268
+ this._lastLog.count = (this._lastLog.count || 0) + 1;
269
+ if (this._lastLog.count > this.options.throttleMin) {
270
+ this._lastLog.timeout = setTimeout(resolveLog, this.options.throttle);
271
+ return;
318
272
  }
319
- } catch {}
320
- }
273
+ }
274
+ } catch {}
321
275
  resolveLog(true);
322
276
  }
323
277
  _log(logObj) {
324
- for (const reporter of this.options.reporters) {
325
- reporter.log(logObj, {options: this.options});
326
- }
278
+ for (const reporter of this.options.reporters) reporter.log(logObj, { options: this.options });
327
279
  }
328
- }
280
+ };
329
281
  function _normalizeLogLevel(input, types = {}, defaultLevel = 3) {
330
- if (input === void 0) {
331
- return defaultLevel;
332
- }
333
- if (typeof input === "number") {
334
- return input;
335
- }
336
- if (types[input] && types[input].level !== void 0) {
337
- return types[input].level;
338
- }
282
+ if (input === void 0) return defaultLevel;
283
+ if (typeof input === "number") return input;
284
+ if (types[input] && types[input].level !== void 0) return types[input].level;
339
285
  return defaultLevel;
340
286
  }
341
287
  Consola.prototype.add = Consola.prototype.addReporter;
@@ -353,7 +299,7 @@ function createConsola$1(options = {}) {
353
299
  //#region ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.06ad8a64.mjs
354
300
  function parseStack(stack) {
355
301
  const cwd = process.cwd() + sep;
356
- const lines = ((stack.split("\n")).splice(1)).map((l) => ((l.trim()).replace("file://", "")).replace(cwd, ""));
302
+ const lines = stack.split("\n").splice(1).map((l) => l.trim().replace("file://", "").replace(cwd, ""));
357
303
  return lines;
358
304
  }
359
305
  function writeStream(data, stream) {
@@ -361,15 +307,13 @@ function writeStream(data, stream) {
361
307
  return write.call(stream, data);
362
308
  }
363
309
  const bracket = (x) => x ? `[${x}]` : "";
364
- class BasicReporter {
310
+ var BasicReporter = class {
365
311
  formatStack(stack, opts) {
366
- return " " + (parseStack(stack)).join("\n ");
312
+ return " " + parseStack(stack).join("\n ");
367
313
  }
368
314
  formatArgs(args, opts) {
369
315
  const _args = args.map((arg) => {
370
- if (arg && typeof arg.stack === "string") {
371
- return arg.message + "\n" + this.formatStack(arg.stack, opts);
372
- }
316
+ if (arg && typeof arg.stack === "string") return arg.message + "\n" + this.formatStack(arg.stack, opts);
373
317
  return arg;
374
318
  });
375
319
  return formatWithOptions(opts, ..._args);
@@ -378,14 +322,20 @@ class BasicReporter {
378
322
  return opts.date ? date.toLocaleTimeString() : "";
379
323
  }
380
324
  filterAndJoin(arr) {
381
- return (arr.filter(Boolean)).join(" ");
325
+ return arr.filter(Boolean).join(" ");
382
326
  }
383
327
  formatLogObj(logObj, opts) {
384
328
  const message = this.formatArgs(logObj.args, opts);
385
- if (logObj.type === "box") {
386
- return "\n" + (([bracket(logObj.tag), logObj.title && logObj.title, ...message.split("\n")].filter(Boolean)).map((l) => " > " + l)).join("\n") + "\n";
387
- }
388
- return this.filterAndJoin([bracket(logObj.type), bracket(logObj.tag), message]);
329
+ if (logObj.type === "box") return "\n" + [
330
+ bracket(logObj.tag),
331
+ logObj.title && logObj.title,
332
+ ...message.split("\n")
333
+ ].filter(Boolean).map((l) => " > " + l).join("\n") + "\n";
334
+ return this.filterAndJoin([
335
+ bracket(logObj.type),
336
+ bracket(logObj.tag),
337
+ message
338
+ ]);
389
339
  }
390
340
  log(logObj, ctx) {
391
341
  const line = this.formatLogObj(logObj, {
@@ -394,17 +344,17 @@ class BasicReporter {
394
344
  });
395
345
  return writeStream(line + "\n", logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout);
396
346
  }
397
- }
347
+ };
398
348
 
399
349
  //#endregion
400
350
  //#region ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/utils.mjs
401
- const { env: env = {}, argv: argv = [], platform: platform = "" } = typeof process === "undefined" ? {} : process;
402
- const isDisabled = "NO_COLOR"in env || argv.includes("--no-color");
403
- const isForced = "FORCE_COLOR"in env || argv.includes("--color");
351
+ const { env = {}, argv = [], platform = "" } = typeof process === "undefined" ? {} : process;
352
+ const isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
353
+ const isForced = "FORCE_COLOR" in env || argv.includes("--color");
404
354
  const isWindows = platform === "win32";
405
355
  const isDumbTerminal = env.TERM === "dumb";
406
356
  const isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
407
- const isCI$1 = "CI"in env && ("GITHUB_ACTIONS"in env || "GITLAB_CI"in env || "CIRCLECI"in env);
357
+ const isCI$1 = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
408
358
  const isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI$1);
409
359
  function replaceClose(index, string, close, replace, head = string.slice(0, Math.max(0, index)) + replace, tail = string.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) {
410
360
  return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
@@ -462,7 +412,7 @@ const colorDefs = {
462
412
  bgWhiteBright: init(107, 49)
463
413
  };
464
414
  function createColors(useColor = isColorSupported) {
465
- return useColor ? colorDefs : Object.fromEntries((Object.keys(colorDefs)).map((key) => [key, String]));
415
+ return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
466
416
  }
467
417
  const colors = createColors();
468
418
  function getColor$1(color, fallback = "reset") {
@@ -558,64 +508,103 @@ function box(text, _opts = {}) {
558
508
  const textLines = text.split("\n");
559
509
  const boxLines = [];
560
510
  const _color = getColor$1(opts.style.borderColor);
561
- const borderStyle = {...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle};
562
- if (_color) {
563
- for (const key in borderStyle) {
564
- borderStyle[key] = _color(borderStyle[key]);
565
- }
566
- }
511
+ const borderStyle = { ...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle };
512
+ if (_color) for (const key in borderStyle) borderStyle[key] = _color(borderStyle[key]);
567
513
  const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
568
514
  const height = textLines.length + paddingOffset;
569
515
  const width = Math.max(...textLines.map((line) => line.length)) + paddingOffset;
570
516
  const widthOffset = width + paddingOffset;
571
517
  const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
572
- if (opts.style.marginTop > 0) {
573
- boxLines.push("".repeat(opts.style.marginTop));
574
- }
518
+ if (opts.style.marginTop > 0) boxLines.push("".repeat(opts.style.marginTop));
575
519
  if (opts.title) {
576
- const left = borderStyle.h.repeat(Math.floor((width - (stripAnsi$1(opts.title)).length) / 2));
577
- const right = borderStyle.h.repeat(width - (stripAnsi$1(opts.title)).length - (stripAnsi$1(left)).length + paddingOffset);
520
+ const left = borderStyle.h.repeat(Math.floor((width - stripAnsi$1(opts.title).length) / 2));
521
+ const right = borderStyle.h.repeat(width - stripAnsi$1(opts.title).length - stripAnsi$1(left).length + paddingOffset);
578
522
  boxLines.push(`${leftSpace}${borderStyle.tl}${left}${opts.title}${right}${borderStyle.tr}`);
579
- } else {
580
- boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
581
- }
523
+ } else boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
582
524
  const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
583
- for (let i = 0; i < height; i++) {
584
- if (i < valignOffset || i >= valignOffset + textLines.length) {
585
- boxLines.push(`${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`);
586
- } else {
587
- const line = textLines[i - valignOffset];
588
- const left = " ".repeat(paddingOffset);
589
- const right = " ".repeat(width - (stripAnsi$1(line)).length);
590
- boxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);
591
- }
525
+ for (let i = 0; i < height; i++) if (i < valignOffset || i >= valignOffset + textLines.length) boxLines.push(`${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`);
526
+ else {
527
+ const line = textLines[i - valignOffset];
528
+ const left = " ".repeat(paddingOffset);
529
+ const right = " ".repeat(width - stripAnsi$1(line).length);
530
+ boxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);
592
531
  }
593
532
  boxLines.push(`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`);
594
- if (opts.style.marginBottom > 0) {
595
- boxLines.push("".repeat(opts.style.marginBottom));
596
- }
533
+ if (opts.style.marginBottom > 0) boxLines.push("".repeat(opts.style.marginBottom));
597
534
  return boxLines.join("\n");
598
535
  }
599
536
 
600
537
  //#endregion
601
538
  //#region ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.36c0034f.mjs
602
- const providers = [["APPVEYOR"], ["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"], ["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"], ["APPCIRCLE", "AC_APPCIRCLE"], ["BAMBOO", "bamboo_planKey"], ["BITBUCKET", "BITBUCKET_COMMIT"], ["BITRISE", "BITRISE_IO"], ["BUDDY", "BUDDY_WORKSPACE_ID"], ["BUILDKITE"], ["CIRCLE", "CIRCLECI"], ["CIRRUS", "CIRRUS_CI"], ["CLOUDFLARE_PAGES", "CF_PAGES", {ci: true}], ["CODEBUILD", "CODEBUILD_BUILD_ARN"], ["CODEFRESH", "CF_BUILD_ID"], ["DRONE"], ["DRONE", "DRONE_BUILD_EVENT"], ["DSARI"], ["GITHUB_ACTIONS"], ["GITLAB", "GITLAB_CI"], ["GITLAB", "CI_MERGE_REQUEST_ID"], ["GOCD", "GO_PIPELINE_LABEL"], ["LAYERCI"], ["HUDSON", "HUDSON_URL"], ["JENKINS", "JENKINS_URL"], ["MAGNUM"], ["NETLIFY"], ["NETLIFY", "NETLIFY_LOCAL", {ci: false}], ["NEVERCODE"], ["RENDER"], ["SAIL", "SAILCI"], ["SEMAPHORE"], ["SCREWDRIVER"], ["SHIPPABLE"], ["SOLANO", "TDDIUM"], ["STRIDER"], ["TEAMCITY", "TEAMCITY_VERSION"], ["TRAVIS"], ["VERCEL", "NOW_BUILDER"], ["APPCENTER", "APPCENTER_BUILD_ID"], ["CODESANDBOX", "CODESANDBOX_SSE", {ci: false}], ["STACKBLITZ"], ["STORMKIT"], ["CLEAVR"]];
539
+ const providers = [
540
+ ["APPVEYOR"],
541
+ ["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],
542
+ ["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],
543
+ ["APPCIRCLE", "AC_APPCIRCLE"],
544
+ ["BAMBOO", "bamboo_planKey"],
545
+ ["BITBUCKET", "BITBUCKET_COMMIT"],
546
+ ["BITRISE", "BITRISE_IO"],
547
+ ["BUDDY", "BUDDY_WORKSPACE_ID"],
548
+ ["BUILDKITE"],
549
+ ["CIRCLE", "CIRCLECI"],
550
+ ["CIRRUS", "CIRRUS_CI"],
551
+ [
552
+ "CLOUDFLARE_PAGES",
553
+ "CF_PAGES",
554
+ { ci: true }
555
+ ],
556
+ ["CODEBUILD", "CODEBUILD_BUILD_ARN"],
557
+ ["CODEFRESH", "CF_BUILD_ID"],
558
+ ["DRONE"],
559
+ ["DRONE", "DRONE_BUILD_EVENT"],
560
+ ["DSARI"],
561
+ ["GITHUB_ACTIONS"],
562
+ ["GITLAB", "GITLAB_CI"],
563
+ ["GITLAB", "CI_MERGE_REQUEST_ID"],
564
+ ["GOCD", "GO_PIPELINE_LABEL"],
565
+ ["LAYERCI"],
566
+ ["HUDSON", "HUDSON_URL"],
567
+ ["JENKINS", "JENKINS_URL"],
568
+ ["MAGNUM"],
569
+ ["NETLIFY"],
570
+ [
571
+ "NETLIFY",
572
+ "NETLIFY_LOCAL",
573
+ { ci: false }
574
+ ],
575
+ ["NEVERCODE"],
576
+ ["RENDER"],
577
+ ["SAIL", "SAILCI"],
578
+ ["SEMAPHORE"],
579
+ ["SCREWDRIVER"],
580
+ ["SHIPPABLE"],
581
+ ["SOLANO", "TDDIUM"],
582
+ ["STRIDER"],
583
+ ["TEAMCITY", "TEAMCITY_VERSION"],
584
+ ["TRAVIS"],
585
+ ["VERCEL", "NOW_BUILDER"],
586
+ ["APPCENTER", "APPCENTER_BUILD_ID"],
587
+ [
588
+ "CODESANDBOX",
589
+ "CODESANDBOX_SSE",
590
+ { ci: false }
591
+ ],
592
+ ["STACKBLITZ"],
593
+ ["STORMKIT"],
594
+ ["CLEAVR"]
595
+ ];
603
596
  function detectProvider(env$1) {
604
597
  for (const provider of providers) {
605
598
  const envName = provider[1] || provider[0];
606
- if (env$1[envName]) {
607
- return {
608
- name: provider[0].toLowerCase(),
609
- ...provider[2]
610
- };
611
- }
612
- }
613
- if (env$1.SHELL && env$1.SHELL === "/bin/jsh") {
614
- return {
615
- name: "stackblitz",
616
- ci: false
599
+ if (env$1[envName]) return {
600
+ name: provider[0].toLowerCase(),
601
+ ...provider[2]
617
602
  };
618
603
  }
604
+ if (env$1.SHELL && env$1.SHELL === "/bin/jsh") return {
605
+ name: "stackblitz",
606
+ ci: false
607
+ };
619
608
  return {
620
609
  name: "",
621
610
  ci: false
@@ -635,60 +624,43 @@ toBoolean(envShim.MINIMAL) || isCI || isTest || !hasTTY;
635
624
  function toBoolean(val) {
636
625
  return val ? val !== "false" : false;
637
626
  }
638
- function ansiRegex({ onlyFirst: onlyFirst = false } = {}) {
627
+ function ansiRegex({ onlyFirst = false } = {}) {
639
628
  const pattern = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
640
629
  return new RegExp(pattern, onlyFirst ? undefined : "g");
641
630
  }
642
631
  const regex = ansiRegex();
643
632
  function stripAnsi(string) {
644
- if (typeof string !== "string") {
645
- throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
646
- }
633
+ if (typeof string !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
647
634
  return string.replace(regex, "");
648
635
  }
649
636
  function getDefaultExportFromCjs(x) {
650
637
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
651
638
  }
652
- var eastasianwidth = {exports: {}};
639
+ var eastasianwidth = { exports: {} };
653
640
  (function(module) {
654
641
  var eaw = {};
655
- {
656
- module.exports = eaw;
657
- }
642
+ module.exports = eaw;
658
643
  eaw.eastAsianWidth = function(character) {
659
644
  var x = character.charCodeAt(0);
660
645
  var y = character.length == 2 ? character.charCodeAt(1) : 0;
661
646
  var codePoint = x;
662
- if (0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF) {
663
- x &= 0x3FF;
664
- y &= 0x3FF;
647
+ if (55296 <= x && x <= 56319 && 56320 <= y && y <= 57343) {
648
+ x &= 1023;
649
+ y &= 1023;
665
650
  codePoint = x << 10 | y;
666
- codePoint += 0x10000;
667
- }
668
- if (0x3000 == codePoint || 0xFF01 <= codePoint && codePoint <= 0xFF60 || 0xFFE0 <= codePoint && codePoint <= 0xFFE6) {
669
- return "F";
670
- }
671
- if (0x20A9 == codePoint || 0xFF61 <= codePoint && codePoint <= 0xFFBE || 0xFFC2 <= codePoint && codePoint <= 0xFFC7 || 0xFFCA <= codePoint && codePoint <= 0xFFCF || 0xFFD2 <= codePoint && codePoint <= 0xFFD7 || 0xFFDA <= codePoint && codePoint <= 0xFFDC || 0xFFE8 <= codePoint && codePoint <= 0xFFEE) {
672
- return "H";
673
- }
674
- if (0x1100 <= codePoint && codePoint <= 0x115F || 0x11A3 <= codePoint && codePoint <= 0x11A7 || 0x11FA <= codePoint && codePoint <= 0x11FF || 0x2329 <= codePoint && codePoint <= 0x232A || 0x2E80 <= codePoint && codePoint <= 0x2E99 || 0x2E9B <= codePoint && codePoint <= 0x2EF3 || 0x2F00 <= codePoint && codePoint <= 0x2FD5 || 0x2FF0 <= codePoint && codePoint <= 0x2FFB || 0x3001 <= codePoint && codePoint <= 0x303E || 0x3041 <= codePoint && codePoint <= 0x3096 || 0x3099 <= codePoint && codePoint <= 0x30FF || 0x3105 <= codePoint && codePoint <= 0x312D || 0x3131 <= codePoint && codePoint <= 0x318E || 0x3190 <= codePoint && codePoint <= 0x31BA || 0x31C0 <= codePoint && codePoint <= 0x31E3 || 0x31F0 <= codePoint && codePoint <= 0x321E || 0x3220 <= codePoint && codePoint <= 0x3247 || 0x3250 <= codePoint && codePoint <= 0x32FE || 0x3300 <= codePoint && codePoint <= 0x4DBF || 0x4E00 <= codePoint && codePoint <= 0xA48C || 0xA490 <= codePoint && codePoint <= 0xA4C6 || 0xA960 <= codePoint && codePoint <= 0xA97C || 0xAC00 <= codePoint && codePoint <= 0xD7A3 || 0xD7B0 <= codePoint && codePoint <= 0xD7C6 || 0xD7CB <= codePoint && codePoint <= 0xD7FB || 0xF900 <= codePoint && codePoint <= 0xFAFF || 0xFE10 <= codePoint && codePoint <= 0xFE19 || 0xFE30 <= codePoint && codePoint <= 0xFE52 || 0xFE54 <= codePoint && codePoint <= 0xFE66 || 0xFE68 <= codePoint && codePoint <= 0xFE6B || 0x1B000 <= codePoint && codePoint <= 0x1B001 || 0x1F200 <= codePoint && codePoint <= 0x1F202 || 0x1F210 <= codePoint && codePoint <= 0x1F23A || 0x1F240 <= codePoint && codePoint <= 0x1F248 || 0x1F250 <= codePoint && codePoint <= 0x1F251 || 0x20000 <= codePoint && codePoint <= 0x2F73F || 0x2B740 <= codePoint && codePoint <= 0x2FFFD || 0x30000 <= codePoint && codePoint <= 0x3FFFD) {
675
- return "W";
676
- }
677
- if (0x0020 <= codePoint && codePoint <= 0x007E || 0x00A2 <= codePoint && codePoint <= 0x00A3 || 0x00A5 <= codePoint && codePoint <= 0x00A6 || 0x00AC == codePoint || 0x00AF == codePoint || 0x27E6 <= codePoint && codePoint <= 0x27ED || 0x2985 <= codePoint && codePoint <= 0x2986) {
678
- return "Na";
679
- }
680
- if (0x00A1 == codePoint || 0x00A4 == codePoint || 0x00A7 <= codePoint && codePoint <= 0x00A8 || 0x00AA == codePoint || 0x00AD <= codePoint && codePoint <= 0x00AE || 0x00B0 <= codePoint && codePoint <= 0x00B4 || 0x00B6 <= codePoint && codePoint <= 0x00BA || 0x00BC <= codePoint && codePoint <= 0x00BF || 0x00C6 == codePoint || 0x00D0 == codePoint || 0x00D7 <= codePoint && codePoint <= 0x00D8 || 0x00DE <= codePoint && codePoint <= 0x00E1 || 0x00E6 == codePoint || 0x00E8 <= codePoint && codePoint <= 0x00EA || 0x00EC <= codePoint && codePoint <= 0x00ED || 0x00F0 == codePoint || 0x00F2 <= codePoint && codePoint <= 0x00F3 || 0x00F7 <= codePoint && codePoint <= 0x00FA || 0x00FC == codePoint || 0x00FE == codePoint || 0x0101 == codePoint || 0x0111 == codePoint || 0x0113 == codePoint || 0x011B == codePoint || 0x0126 <= codePoint && codePoint <= 0x0127 || 0x012B == codePoint || 0x0131 <= codePoint && codePoint <= 0x0133 || 0x0138 == codePoint || 0x013F <= codePoint && codePoint <= 0x0142 || 0x0144 == codePoint || 0x0148 <= codePoint && codePoint <= 0x014B || 0x014D == codePoint || 0x0152 <= codePoint && codePoint <= 0x0153 || 0x0166 <= codePoint && codePoint <= 0x0167 || 0x016B == codePoint || 0x01CE == codePoint || 0x01D0 == codePoint || 0x01D2 == codePoint || 0x01D4 == codePoint || 0x01D6 == codePoint || 0x01D8 == codePoint || 0x01DA == codePoint || 0x01DC == codePoint || 0x0251 == codePoint || 0x0261 == codePoint || 0x02C4 == codePoint || 0x02C7 == codePoint || 0x02C9 <= codePoint && codePoint <= 0x02CB || 0x02CD == codePoint || 0x02D0 == codePoint || 0x02D8 <= codePoint && codePoint <= 0x02DB || 0x02DD == codePoint || 0x02DF == codePoint || 0x0300 <= codePoint && codePoint <= 0x036F || 0x0391 <= codePoint && codePoint <= 0x03A1 || 0x03A3 <= codePoint && codePoint <= 0x03A9 || 0x03B1 <= codePoint && codePoint <= 0x03C1 || 0x03C3 <= codePoint && codePoint <= 0x03C9 || 0x0401 == codePoint || 0x0410 <= codePoint && codePoint <= 0x044F || 0x0451 == codePoint || 0x2010 == codePoint || 0x2013 <= codePoint && codePoint <= 0x2016 || 0x2018 <= codePoint && codePoint <= 0x2019 || 0x201C <= codePoint && codePoint <= 0x201D || 0x2020 <= codePoint && codePoint <= 0x2022 || 0x2024 <= codePoint && codePoint <= 0x2027 || 0x2030 == codePoint || 0x2032 <= codePoint && codePoint <= 0x2033 || 0x2035 == codePoint || 0x203B == codePoint || 0x203E == codePoint || 0x2074 == codePoint || 0x207F == codePoint || 0x2081 <= codePoint && codePoint <= 0x2084 || 0x20AC == codePoint || 0x2103 == codePoint || 0x2105 == codePoint || 0x2109 == codePoint || 0x2113 == codePoint || 0x2116 == codePoint || 0x2121 <= codePoint && codePoint <= 0x2122 || 0x2126 == codePoint || 0x212B == codePoint || 0x2153 <= codePoint && codePoint <= 0x2154 || 0x215B <= codePoint && codePoint <= 0x215E || 0x2160 <= codePoint && codePoint <= 0x216B || 0x2170 <= codePoint && codePoint <= 0x2179 || 0x2189 == codePoint || 0x2190 <= codePoint && codePoint <= 0x2199 || 0x21B8 <= codePoint && codePoint <= 0x21B9 || 0x21D2 == codePoint || 0x21D4 == codePoint || 0x21E7 == codePoint || 0x2200 == codePoint || 0x2202 <= codePoint && codePoint <= 0x2203 || 0x2207 <= codePoint && codePoint <= 0x2208 || 0x220B == codePoint || 0x220F == codePoint || 0x2211 == codePoint || 0x2215 == codePoint || 0x221A == codePoint || 0x221D <= codePoint && codePoint <= 0x2220 || 0x2223 == codePoint || 0x2225 == codePoint || 0x2227 <= codePoint && codePoint <= 0x222C || 0x222E == codePoint || 0x2234 <= codePoint && codePoint <= 0x2237 || 0x223C <= codePoint && codePoint <= 0x223D || 0x2248 == codePoint || 0x224C == codePoint || 0x2252 == codePoint || 0x2260 <= codePoint && codePoint <= 0x2261 || 0x2264 <= codePoint && codePoint <= 0x2267 || 0x226A <= codePoint && codePoint <= 0x226B || 0x226E <= codePoint && codePoint <= 0x226F || 0x2282 <= codePoint && codePoint <= 0x2283 || 0x2286 <= codePoint && codePoint <= 0x2287 || 0x2295 == codePoint || 0x2299 == codePoint || 0x22A5 == codePoint || 0x22BF == codePoint || 0x2312 == codePoint || 0x2460 <= codePoint && codePoint <= 0x24E9 || 0x24EB <= codePoint && codePoint <= 0x254B || 0x2550 <= codePoint && codePoint <= 0x2573 || 0x2580 <= codePoint && codePoint <= 0x258F || 0x2592 <= codePoint && codePoint <= 0x2595 || 0x25A0 <= codePoint && codePoint <= 0x25A1 || 0x25A3 <= codePoint && codePoint <= 0x25A9 || 0x25B2 <= codePoint && codePoint <= 0x25B3 || 0x25B6 <= codePoint && codePoint <= 0x25B7 || 0x25BC <= codePoint && codePoint <= 0x25BD || 0x25C0 <= codePoint && codePoint <= 0x25C1 || 0x25C6 <= codePoint && codePoint <= 0x25C8 || 0x25CB == codePoint || 0x25CE <= codePoint && codePoint <= 0x25D1 || 0x25E2 <= codePoint && codePoint <= 0x25E5 || 0x25EF == codePoint || 0x2605 <= codePoint && codePoint <= 0x2606 || 0x2609 == codePoint || 0x260E <= codePoint && codePoint <= 0x260F || 0x2614 <= codePoint && codePoint <= 0x2615 || 0x261C == codePoint || 0x261E == codePoint || 0x2640 == codePoint || 0x2642 == codePoint || 0x2660 <= codePoint && codePoint <= 0x2661 || 0x2663 <= codePoint && codePoint <= 0x2665 || 0x2667 <= codePoint && codePoint <= 0x266A || 0x266C <= codePoint && codePoint <= 0x266D || 0x266F == codePoint || 0x269E <= codePoint && codePoint <= 0x269F || 0x26BE <= codePoint && codePoint <= 0x26BF || 0x26C4 <= codePoint && codePoint <= 0x26CD || 0x26CF <= codePoint && codePoint <= 0x26E1 || 0x26E3 == codePoint || 0x26E8 <= codePoint && codePoint <= 0x26FF || 0x273D == codePoint || 0x2757 == codePoint || 0x2776 <= codePoint && codePoint <= 0x277F || 0x2B55 <= codePoint && codePoint <= 0x2B59 || 0x3248 <= codePoint && codePoint <= 0x324F || 0xE000 <= codePoint && codePoint <= 0xF8FF || 0xFE00 <= codePoint && codePoint <= 0xFE0F || 0xFFFD == codePoint || 0x1F100 <= codePoint && codePoint <= 0x1F10A || 0x1F110 <= codePoint && codePoint <= 0x1F12D || 0x1F130 <= codePoint && codePoint <= 0x1F169 || 0x1F170 <= codePoint && codePoint <= 0x1F19A || 0xE0100 <= codePoint && codePoint <= 0xE01EF || 0xF0000 <= codePoint && codePoint <= 0xFFFFD || 0x100000 <= codePoint && codePoint <= 0x10FFFD) {
681
- return "A";
651
+ codePoint += 65536;
682
652
  }
653
+ if (12288 == codePoint || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510) return "F";
654
+ if (8361 == codePoint || 65377 <= codePoint && codePoint <= 65470 || 65474 <= codePoint && codePoint <= 65479 || 65482 <= codePoint && codePoint <= 65487 || 65490 <= codePoint && codePoint <= 65495 || 65498 <= codePoint && codePoint <= 65500 || 65512 <= codePoint && codePoint <= 65518) return "H";
655
+ if (4352 <= codePoint && codePoint <= 4447 || 4515 <= codePoint && codePoint <= 4519 || 4602 <= codePoint && codePoint <= 4607 || 9001 <= codePoint && codePoint <= 9002 || 11904 <= codePoint && codePoint <= 11929 || 11931 <= codePoint && codePoint <= 12019 || 12032 <= codePoint && codePoint <= 12245 || 12272 <= codePoint && codePoint <= 12283 || 12289 <= codePoint && codePoint <= 12350 || 12353 <= codePoint && codePoint <= 12438 || 12441 <= codePoint && codePoint <= 12543 || 12549 <= codePoint && codePoint <= 12589 || 12593 <= codePoint && codePoint <= 12686 || 12688 <= codePoint && codePoint <= 12730 || 12736 <= codePoint && codePoint <= 12771 || 12784 <= codePoint && codePoint <= 12830 || 12832 <= codePoint && codePoint <= 12871 || 12880 <= codePoint && codePoint <= 13054 || 13056 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42124 || 42128 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 55216 <= codePoint && codePoint <= 55238 || 55243 <= codePoint && codePoint <= 55291 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65106 || 65108 <= codePoint && codePoint <= 65126 || 65128 <= codePoint && codePoint <= 65131 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127490 || 127504 <= codePoint && codePoint <= 127546 || 127552 <= codePoint && codePoint <= 127560 || 127568 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 194367 || 177984 <= codePoint && codePoint <= 196605 || 196608 <= codePoint && codePoint <= 262141) return "W";
656
+ if (32 <= codePoint && codePoint <= 126 || 162 <= codePoint && codePoint <= 163 || 165 <= codePoint && codePoint <= 166 || 172 == codePoint || 175 == codePoint || 10214 <= codePoint && codePoint <= 10221 || 10629 <= codePoint && codePoint <= 10630) return "Na";
657
+ if (161 == codePoint || 164 == codePoint || 167 <= codePoint && codePoint <= 168 || 170 == codePoint || 173 <= codePoint && codePoint <= 174 || 176 <= codePoint && codePoint <= 180 || 182 <= codePoint && codePoint <= 186 || 188 <= codePoint && codePoint <= 191 || 198 == codePoint || 208 == codePoint || 215 <= codePoint && codePoint <= 216 || 222 <= codePoint && codePoint <= 225 || 230 == codePoint || 232 <= codePoint && codePoint <= 234 || 236 <= codePoint && codePoint <= 237 || 240 == codePoint || 242 <= codePoint && codePoint <= 243 || 247 <= codePoint && codePoint <= 250 || 252 == codePoint || 254 == codePoint || 257 == codePoint || 273 == codePoint || 275 == codePoint || 283 == codePoint || 294 <= codePoint && codePoint <= 295 || 299 == codePoint || 305 <= codePoint && codePoint <= 307 || 312 == codePoint || 319 <= codePoint && codePoint <= 322 || 324 == codePoint || 328 <= codePoint && codePoint <= 331 || 333 == codePoint || 338 <= codePoint && codePoint <= 339 || 358 <= codePoint && codePoint <= 359 || 363 == codePoint || 462 == codePoint || 464 == codePoint || 466 == codePoint || 468 == codePoint || 470 == codePoint || 472 == codePoint || 474 == codePoint || 476 == codePoint || 593 == codePoint || 609 == codePoint || 708 == codePoint || 711 == codePoint || 713 <= codePoint && codePoint <= 715 || 717 == codePoint || 720 == codePoint || 728 <= codePoint && codePoint <= 731 || 733 == codePoint || 735 == codePoint || 768 <= codePoint && codePoint <= 879 || 913 <= codePoint && codePoint <= 929 || 931 <= codePoint && codePoint <= 937 || 945 <= codePoint && codePoint <= 961 || 963 <= codePoint && codePoint <= 969 || 1025 == codePoint || 1040 <= codePoint && codePoint <= 1103 || 1105 == codePoint || 8208 == codePoint || 8211 <= codePoint && codePoint <= 8214 || 8216 <= codePoint && codePoint <= 8217 || 8220 <= codePoint && codePoint <= 8221 || 8224 <= codePoint && codePoint <= 8226 || 8228 <= codePoint && codePoint <= 8231 || 8240 == codePoint || 8242 <= codePoint && codePoint <= 8243 || 8245 == codePoint || 8251 == codePoint || 8254 == codePoint || 8308 == codePoint || 8319 == codePoint || 8321 <= codePoint && codePoint <= 8324 || 8364 == codePoint || 8451 == codePoint || 8453 == codePoint || 8457 == codePoint || 8467 == codePoint || 8470 == codePoint || 8481 <= codePoint && codePoint <= 8482 || 8486 == codePoint || 8491 == codePoint || 8531 <= codePoint && codePoint <= 8532 || 8539 <= codePoint && codePoint <= 8542 || 8544 <= codePoint && codePoint <= 8555 || 8560 <= codePoint && codePoint <= 8569 || 8585 == codePoint || 8592 <= codePoint && codePoint <= 8601 || 8632 <= codePoint && codePoint <= 8633 || 8658 == codePoint || 8660 == codePoint || 8679 == codePoint || 8704 == codePoint || 8706 <= codePoint && codePoint <= 8707 || 8711 <= codePoint && codePoint <= 8712 || 8715 == codePoint || 8719 == codePoint || 8721 == codePoint || 8725 == codePoint || 8730 == codePoint || 8733 <= codePoint && codePoint <= 8736 || 8739 == codePoint || 8741 == codePoint || 8743 <= codePoint && codePoint <= 8748 || 8750 == codePoint || 8756 <= codePoint && codePoint <= 8759 || 8764 <= codePoint && codePoint <= 8765 || 8776 == codePoint || 8780 == codePoint || 8786 == codePoint || 8800 <= codePoint && codePoint <= 8801 || 8804 <= codePoint && codePoint <= 8807 || 8810 <= codePoint && codePoint <= 8811 || 8814 <= codePoint && codePoint <= 8815 || 8834 <= codePoint && codePoint <= 8835 || 8838 <= codePoint && codePoint <= 8839 || 8853 == codePoint || 8857 == codePoint || 8869 == codePoint || 8895 == codePoint || 8978 == codePoint || 9312 <= codePoint && codePoint <= 9449 || 9451 <= codePoint && codePoint <= 9547 || 9552 <= codePoint && codePoint <= 9587 || 9600 <= codePoint && codePoint <= 9615 || 9618 <= codePoint && codePoint <= 9621 || 9632 <= codePoint && codePoint <= 9633 || 9635 <= codePoint && codePoint <= 9641 || 9650 <= codePoint && codePoint <= 9651 || 9654 <= codePoint && codePoint <= 9655 || 9660 <= codePoint && codePoint <= 9661 || 9664 <= codePoint && codePoint <= 9665 || 9670 <= codePoint && codePoint <= 9672 || 9675 == codePoint || 9678 <= codePoint && codePoint <= 9681 || 9698 <= codePoint && codePoint <= 9701 || 9711 == codePoint || 9733 <= codePoint && codePoint <= 9734 || 9737 == codePoint || 9742 <= codePoint && codePoint <= 9743 || 9748 <= codePoint && codePoint <= 9749 || 9756 == codePoint || 9758 == codePoint || 9792 == codePoint || 9794 == codePoint || 9824 <= codePoint && codePoint <= 9825 || 9827 <= codePoint && codePoint <= 9829 || 9831 <= codePoint && codePoint <= 9834 || 9836 <= codePoint && codePoint <= 9837 || 9839 == codePoint || 9886 <= codePoint && codePoint <= 9887 || 9918 <= codePoint && codePoint <= 9919 || 9924 <= codePoint && codePoint <= 9933 || 9935 <= codePoint && codePoint <= 9953 || 9955 == codePoint || 9960 <= codePoint && codePoint <= 9983 || 10045 == codePoint || 10071 == codePoint || 10102 <= codePoint && codePoint <= 10111 || 11093 <= codePoint && codePoint <= 11097 || 12872 <= codePoint && codePoint <= 12879 || 57344 <= codePoint && codePoint <= 63743 || 65024 <= codePoint && codePoint <= 65039 || 65533 == codePoint || 127232 <= codePoint && codePoint <= 127242 || 127248 <= codePoint && codePoint <= 127277 || 127280 <= codePoint && codePoint <= 127337 || 127344 <= codePoint && codePoint <= 127386 || 917760 <= codePoint && codePoint <= 917999 || 983040 <= codePoint && codePoint <= 1048573 || 1048576 <= codePoint && codePoint <= 1114109) return "A";
683
658
  return "N";
684
659
  };
685
660
  eaw.characterLength = function(character) {
686
661
  var code = this.eastAsianWidth(character);
687
- if (code == "F" || code == "W" || code == "A") {
688
- return 2;
689
- } else {
690
- return 1;
691
- }
662
+ if (code == "F" || code == "W" || code == "A") return 2;
663
+ else return 1;
692
664
  };
693
665
  function stringToArray(string) {
694
666
  return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
@@ -696,34 +668,23 @@ var eastasianwidth = {exports: {}};
696
668
  eaw.length = function(string) {
697
669
  var characters = stringToArray(string);
698
670
  var len = 0;
699
- for (var i = 0; i < characters.length; i++) {
700
- len = len + this.characterLength(characters[i]);
701
- }
671
+ for (var i = 0; i < characters.length; i++) len = len + this.characterLength(characters[i]);
702
672
  return len;
703
673
  };
704
674
  eaw.slice = function(text, start, end) {
705
675
  textLen = eaw.length(text);
706
676
  start = start ? start : 0;
707
677
  end = end ? end : 1;
708
- if (start < 0) {
709
- start = textLen + start;
710
- }
711
- if (end < 0) {
712
- end = textLen + end;
713
- }
678
+ if (start < 0) start = textLen + start;
679
+ if (end < 0) end = textLen + end;
714
680
  var result = "";
715
681
  var eawLen = 0;
716
682
  var chars = stringToArray(text);
717
683
  for (var i = 0; i < chars.length; i++) {
718
684
  var char = chars[i];
719
685
  var charLen = eaw.length(char);
720
- if (eawLen >= start - (charLen == 2 ? 1 : 0)) {
721
- if (eawLen + charLen <= end) {
722
- result += char;
723
- } else {
724
- break;
725
- }
726
- }
686
+ if (eawLen >= start - (charLen == 2 ? 1 : 0)) if (eawLen + charLen <= end) result += char;
687
+ else break;
727
688
  eawLen += charLen;
728
689
  }
729
690
  return result;
@@ -735,31 +696,21 @@ const emojiRegex = () => {
735
696
  return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
736
697
  };
737
698
  function stringWidth$1(string, options) {
738
- if (typeof string !== "string" || string.length === 0) {
739
- return 0;
740
- }
699
+ if (typeof string !== "string" || string.length === 0) return 0;
741
700
  options = {
742
701
  ambiguousIsNarrow: true,
743
702
  countAnsiEscapeCodes: false,
744
703
  ...options
745
704
  };
746
- if (!options.countAnsiEscapeCodes) {
747
- string = stripAnsi(string);
748
- }
749
- if (string.length === 0) {
750
- return 0;
751
- }
705
+ if (!options.countAnsiEscapeCodes) string = stripAnsi(string);
706
+ if (string.length === 0) return 0;
752
707
  const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
753
708
  let width = 0;
754
- for (const { segment: character } of (new Intl.Segmenter()).segment(string)) {
709
+ for (const { segment: character } of new Intl.Segmenter().segment(string)) {
755
710
  const codePoint = character.codePointAt(0);
756
- if (codePoint <= 0x1F || codePoint >= 0x7F && codePoint <= 0x9F) {
757
- continue;
758
- }
759
- if (codePoint >= 0x3_00 && codePoint <= 0x3_6F) {
760
- continue;
761
- }
762
- if ((emojiRegex()).test(character)) {
711
+ if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) continue;
712
+ if (codePoint >= 768 && codePoint <= 879) continue;
713
+ if (emojiRegex().test(character)) {
763
714
  width += 2;
764
715
  continue;
765
716
  }
@@ -774,17 +725,13 @@ function stringWidth$1(string, options) {
774
725
  width += ambiguousCharacterWidth;
775
726
  break;
776
727
  }
777
- default: {
778
- width += 1;
779
- }
728
+ default: width += 1;
780
729
  }
781
730
  }
782
731
  return width;
783
732
  }
784
733
  function isUnicodeSupported() {
785
- if (process$1.platform !== "win32") {
786
- return process$1.env.TERM !== "linux";
787
- }
734
+ if (process$1.platform !== "win32") return process$1.env.TERM !== "linux";
788
735
  return Boolean(process$1.env.CI) || Boolean(process$1.env.WT_SESSION) || Boolean(process$1.env.TERMINUS_SUBLIME) || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
789
736
  }
790
737
  const TYPE_COLOR_MAP = {
@@ -814,31 +761,25 @@ const TYPE_ICONS = {
814
761
  log: ""
815
762
  };
816
763
  function stringWidth(str) {
817
- if (!Intl.Segmenter) {
818
- return (stripAnsi$1(str)).length;
819
- }
764
+ if (!Intl.Segmenter) return stripAnsi$1(str).length;
820
765
  return stringWidth$1(str);
821
766
  }
822
- class FancyReporter extends BasicReporter {
767
+ var FancyReporter = class extends BasicReporter {
823
768
  formatStack(stack) {
824
- return "\n" + ((parseStack(stack)).map((line) => " " + (line.replace(/^at +/, (m) => colors.gray(m))).replace(/\((.+)\)/, (_, m) => `(${colors.cyan(m)})`))).join("\n");
769
+ return "\n" + parseStack(stack).map((line) => " " + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_, m) => `(${colors.cyan(m)})`)).join("\n");
825
770
  }
826
771
  formatType(logObj, isBadge, opts) {
827
772
  const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
828
- if (isBadge) {
829
- return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
830
- }
773
+ if (isBadge) return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
831
774
  const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
832
775
  return _type ? getColor(typeColor)(_type) : "";
833
776
  }
834
777
  formatLogObj(logObj, opts) {
835
- const [message, ...additional] = (this.formatArgs(logObj.args, opts)).split("\n");
836
- if (logObj.type === "box") {
837
- return box(characterFormat(message + (additional.length > 0 ? "\n" + additional.join("\n") : "")), {
838
- title: logObj.title ? characterFormat(logObj.title) : void 0,
839
- style: logObj.style
840
- });
841
- }
778
+ const [message, ...additional] = this.formatArgs(logObj.args, opts).split("\n");
779
+ if (logObj.type === "box") return box(characterFormat(message + (additional.length > 0 ? "\n" + additional.join("\n") : "")), {
780
+ title: logObj.title ? characterFormat(logObj.title) : void 0,
781
+ style: logObj.style
782
+ });
842
783
  const date = this.formatDate(logObj.date, opts);
843
784
  const coloredDate = date && colors.gray(date);
844
785
  const isBadge = logObj.badge ?? logObj.level < 2;
@@ -856,9 +797,9 @@ class FancyReporter extends BasicReporter {
856
797
  }
857
798
  return isBadge ? "\n" + line + "\n" : line;
858
799
  }
859
- }
800
+ };
860
801
  function characterFormat(str) {
861
- return (str.replace(/`([^`]+)`/gm, (_, m) => colors.cyan(m))).replace(/\s+_([^_]+)_\s+/gm, (_, m) => ` ${colors.underline(m)} `);
802
+ return str.replace(/`([^`]+)`/gm, (_, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_, m) => ` ${colors.underline(m)} `);
862
803
  }
863
804
  function getColor(color = "white") {
864
805
  return colors[color] || colors.white;
@@ -868,30 +809,24 @@ function getBgColor(color = "bgWhite") {
868
809
  }
869
810
  function createConsola(options = {}) {
870
811
  let level = _getDefaultLogLevel();
871
- if (process.env.CONSOLA_LEVEL) {
872
- level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
873
- }
812
+ if (process.env.CONSOLA_LEVEL) level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
874
813
  const consola2 = createConsola$1({
875
814
  level,
876
- defaults: {level},
815
+ defaults: { level },
877
816
  stdout: process.stdout,
878
817
  stderr: process.stderr,
879
- prompt: (...args) => (import("./prompt-hoPhcrA-.mjs")).then((m) => m.prompt(...args)),
818
+ prompt: (...args) => import("./prompt-DGW8ZJmn.mjs").then((m) => m.prompt(...args)),
880
819
  reporters: options.reporters || [options.fancy ?? !(isCI || isTest) ? new FancyReporter() : new BasicReporter()],
881
820
  ...options
882
821
  });
883
822
  return consola2;
884
823
  }
885
824
  function _getDefaultLogLevel() {
886
- if (isDebug) {
887
- return LogLevels.debug;
888
- }
889
- if (isTest) {
890
- return LogLevels.warn;
891
- }
825
+ if (isDebug) return LogLevels.debug;
826
+ if (isTest) return LogLevels.warn;
892
827
  return LogLevels.info;
893
828
  }
894
829
  const consola = createConsola();
895
830
 
896
831
  //#endregion
897
- export { colors, createConsola, getDefaultExportFromCjs, isUnicodeSupported };
832
+ export { colors, createConsola, getDefaultExportFromCjs, isUnicodeSupported };