@rollipop/rolldown 1.0.0-rc.2 → 1.0.0-rc.3

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 (44) hide show
  1. package/dist/cli-setup.mjs +1 -1
  2. package/dist/cli.mjs +27 -996
  3. package/dist/config.d.mts +10 -5
  4. package/dist/config.mjs +9 -12
  5. package/dist/experimental-index.d.mts +72 -14
  6. package/dist/experimental-index.mjs +64 -11
  7. package/dist/experimental-runtime-types.d.ts +0 -5
  8. package/dist/filter-index.d.mts +2 -2
  9. package/dist/filter-index.mjs +24 -1
  10. package/dist/get-log-filter.d.mts +3 -7
  11. package/dist/get-log-filter.mjs +23 -2
  12. package/dist/index.d.mts +4 -4
  13. package/dist/index.mjs +10 -9
  14. package/dist/parallel-plugin-worker.mjs +5 -4
  15. package/dist/parallel-plugin.d.mts +2 -2
  16. package/dist/parse-ast-index.d.mts +26 -2
  17. package/dist/parse-ast-index.mjs +61 -2
  18. package/dist/plugins-index.d.mts +8 -5
  19. package/dist/plugins-index.mjs +8 -5
  20. package/dist/shared/{binding-Bo6UcGYl.d.mts → binding-C4ZlFAt6.d.mts} +302 -117
  21. package/dist/shared/{binding-9QXxzPo6.mjs → binding-D25Pz9Tj.mjs} +32 -26
  22. package/dist/shared/{bindingify-input-options-C--dZCPv.mjs → bindingify-input-options-D6jfpJ6l.mjs} +52 -113
  23. package/dist/shared/{constructors-DsYXT8FB.mjs → constructors-BAGdj697.mjs} +8 -5
  24. package/dist/shared/{constructors-B64fS2o1.d.mts → constructors-C-tyKVjw.d.mts} +9 -4
  25. package/dist/shared/{define-config-DT_Hpxdr.d.mts → define-config-BKLqq_zt.d.mts} +148 -43
  26. package/dist/shared/error-BoaGIj5N.mjs +90 -0
  27. package/dist/shared/get-log-filter-semyr3Lj.d.mts +35 -0
  28. package/dist/shared/{load-config-TBowPn4n.mjs → load-config-CV5K8wKJ.mjs} +10 -2
  29. package/dist/shared/{logs-NH298mHo.mjs → logs-CCc_0vhs.mjs} +1 -1
  30. package/dist/shared/{normalize-string-or-regex-CaBvmZZK.mjs → normalize-string-or-regex-tBSnk6HY.mjs} +2 -2
  31. package/dist/shared/parse-DWZRPGsB.mjs +77 -0
  32. package/dist/shared/{rolldown-5hTSdYMy.mjs → rolldown-CZ1SIh-x.mjs} +1 -1
  33. package/dist/shared/{rolldown-build-B7oitB1K.mjs → rolldown-build-BYA-VVk0.mjs} +1019 -26
  34. package/dist/shared/transform-CIcvJTbn.mjs +93 -0
  35. package/dist/shared/transform-DoG7c5_r.d.mts +132 -0
  36. package/dist/shared/{watch-CkctCkiN.mjs → watch-DV7vV2OV.mjs} +6 -5
  37. package/dist/utils-index.d.mts +376 -0
  38. package/dist/utils-index.mjs +2426 -0
  39. package/package.json +17 -16
  40. package/dist/shared/parse-ast-index-BQ9Myuc2.mjs +0 -99
  41. /package/dist/shared/{define-config-BVG4QvnP.mjs → define-config-BMj_QknW.mjs} +0 -0
  42. /package/dist/shared/{logging-CE90D8JR.d.mts → logging-C6h4g8dA.d.mts} +0 -0
  43. /package/dist/shared/{misc-CCZIsXVO.mjs → misc-Xty885dB.mjs} +0 -0
  44. /package/dist/shared/{prompt-CI-U8Lh4.mjs → prompt-B56gTa4S.mjs} +0 -0
@@ -1,11 +1,14 @@
1
- import { n as __toESM, t as require_binding } from "./binding-9QXxzPo6.mjs";
2
- import { i as logInputHookInOutputPlugin, n as error } from "./logs-NH298mHo.mjs";
3
- import { n as BuiltinPlugin } from "./normalize-string-or-regex-CaBvmZZK.mjs";
4
- import { S as VERSION, _ as LOG_LEVEL_DEBUG, b as LOG_LEVEL_WARN, c as transformToRollupOutput, d as transformAssetSource, f as lazyProp, g as normalizeLog, h as normalizeHook, i as transformModuleInfo, l as transformRenderedChunk, m as MinimalPluginContextImpl, p as PlainObjectLike, s as unwrapBindingResult, t as bindingifyInputOptions, u as __decorate, v as LOG_LEVEL_ERROR, x as logLevelPriority, y as LOG_LEVEL_INFO } from "./bindingify-input-options-C--dZCPv.mjs";
5
- import { i as unimplemented } from "./misc-CCZIsXVO.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-D25Pz9Tj.mjs";
2
+ import { i as logInputHookInOutputPlugin, n as error } from "./logs-CCc_0vhs.mjs";
3
+ import { n as BuiltinPlugin } from "./normalize-string-or-regex-tBSnk6HY.mjs";
4
+ import { _ as LOG_LEVEL_WARN, a as transformToRollupOutput, b as VERSION, c as transformAssetSource, d as MinimalPluginContextImpl, f as normalizeHook, g as LOG_LEVEL_INFO, h as LOG_LEVEL_ERROR, i as transformModuleInfo, l as lazyProp, m as LOG_LEVEL_DEBUG, o as transformRenderedChunk, p as normalizeLog, s as __decorate, t as bindingifyInputOptions, u as PlainObjectLike, v as logLevelPriority } from "./bindingify-input-options-D6jfpJ6l.mjs";
5
+ import { i as unimplemented } from "./misc-Xty885dB.mjs";
6
+ import { i as unwrapBindingResult } from "./error-BoaGIj5N.mjs";
6
7
  import { Worker } from "node:worker_threads";
7
- import path from "node:path";
8
- import { styleText } from "node:util";
8
+ import path, { sep } from "node:path";
9
+ import { formatWithOptions, styleText } from "node:util";
10
+ import process$1 from "node:process";
11
+ import * as tty from "node:tty";
9
12
  import os from "node:os";
10
13
 
11
14
  //#region src/log/logger.ts
@@ -1477,6 +1480,7 @@ const ModuleTypesSchema = record(string(), union([
1477
1480
  literal("asset"),
1478
1481
  literal("base64"),
1479
1482
  literal("binary"),
1483
+ literal("copy"),
1480
1484
  literal("css"),
1481
1485
  literal("dataurl"),
1482
1486
  literal("empty"),
@@ -1590,7 +1594,9 @@ const ChecksOptionsSchema = strictObject({
1590
1594
  preferBuiltinFeature: pipe(optional(boolean()), description("Whether to emit warnings when a plugin that is covered by a built-in feature is used")),
1591
1595
  couldNotCleanDirectory: pipe(optional(boolean()), description("Whether to emit warnings when Rolldown could not clean the output directory")),
1592
1596
  pluginTimings: pipe(optional(boolean()), description("Whether to emit warnings when plugins take significant time during the build process")),
1593
- duplicateShebang: pipe(optional(boolean()), description("Whether to emit warnings when both the code and postBanner contain shebang"))
1597
+ duplicateShebang: pipe(optional(boolean()), description("Whether to emit warnings when both the code and postBanner contain shebang")),
1598
+ unsupportedTsconfigOption: pipe(optional(boolean()), description("Whether to emit warnings when a tsconfig option or combination of options is not supported")),
1599
+ ineffectiveDynamicImport: pipe(optional(boolean()), description("Whether to emit warnings when a module is dynamically imported but also statically imported, making the dynamic import ineffective for code splitting"))
1594
1600
  });
1595
1601
  isTypeTrue();
1596
1602
  const CompressOptionsKeepNamesSchema = strictObject({
@@ -1814,7 +1820,9 @@ const AdvancedChunksSchema = strictObject({
1814
1820
  minShareCount: optional(number()),
1815
1821
  maxSize: optional(number()),
1816
1822
  minModuleSize: optional(number()),
1817
- maxModuleSize: optional(number())
1823
+ maxModuleSize: optional(number()),
1824
+ entriesAware: optional(boolean()),
1825
+ entriesAwareMergeThreshold: optional(number())
1818
1826
  })))
1819
1827
  });
1820
1828
  isTypeTrue();
@@ -1865,8 +1873,6 @@ const OutputOptionsSchema = strictObject({
1865
1873
  assetFileNames: optional(AssetFileNamesSchema),
1866
1874
  entryFileNames: optional(ChunkFileNamesSchema),
1867
1875
  chunkFileNames: optional(ChunkFileNamesSchema),
1868
- cssEntryFileNames: optional(ChunkFileNamesSchema),
1869
- cssChunkFileNames: optional(ChunkFileNamesSchema),
1870
1876
  sanitizeFileName: optional(SanitizeFileNameSchema),
1871
1877
  minify: pipe(optional(union([
1872
1878
  boolean(),
@@ -1883,7 +1889,12 @@ const OutputOptionsSchema = strictObject({
1883
1889
  manualChunks: optional(ManualChunksFunctionSchema),
1884
1890
  codeSplitting: optional(union([boolean(), AdvancedChunksSchema])),
1885
1891
  advancedChunks: optional(AdvancedChunksSchema),
1886
- legalComments: pipe(optional(union([literal("none"), literal("inline")])), description("Control comments in the output")),
1892
+ legalComments: pipe(optional(union([literal("none"), literal("inline")])), description("Control legal comments in the output")),
1893
+ comments: pipe(optional(union([boolean(), strictObject({
1894
+ legal: optional(boolean()),
1895
+ annotation: optional(boolean()),
1896
+ jsdoc: optional(boolean())
1897
+ })])), description("Control comments in the output")),
1887
1898
  plugins: optional(custom(() => true)),
1888
1899
  polyfillRequire: pipe(optional(boolean()), description("Disable require polyfill injection")),
1889
1900
  hoistTransitiveImports: optional(literal(false)),
@@ -1905,8 +1916,6 @@ const OutputCliOverrideSchema = strictObject({
1905
1916
  assetFileNames: pipe(optional(string()), description("Name pattern for asset files")),
1906
1917
  entryFileNames: pipe(optional(string()), description("Name pattern for emitted entry chunks")),
1907
1918
  chunkFileNames: pipe(optional(string()), description("Name pattern for emitted secondary chunks")),
1908
- cssEntryFileNames: pipe(optional(string()), description("Name pattern for emitted css entry chunks")),
1909
- cssChunkFileNames: pipe(optional(string()), description("Name pattern for emitted css secondary chunks")),
1910
1919
  sanitizeFileName: pipe(optional(boolean()), description("Sanitize file name")),
1911
1920
  banner: pipe(optional(string()), description(getAddonDescription("top", "outside"))),
1912
1921
  footer: pipe(optional(string()), description(getAddonDescription("bottom", "outside"))),
@@ -2028,10 +2037,990 @@ var ChunkingContextImpl = class {
2028
2037
  }
2029
2038
  };
2030
2039
 
2040
+ //#endregion
2041
+ //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/core.mjs
2042
+ const LogLevels = {
2043
+ silent: Number.NEGATIVE_INFINITY,
2044
+ fatal: 0,
2045
+ error: 0,
2046
+ warn: 1,
2047
+ log: 2,
2048
+ info: 3,
2049
+ success: 3,
2050
+ fail: 3,
2051
+ ready: 3,
2052
+ start: 3,
2053
+ box: 3,
2054
+ debug: 4,
2055
+ trace: 5,
2056
+ verbose: Number.POSITIVE_INFINITY
2057
+ };
2058
+ const LogTypes = {
2059
+ silent: { level: -1 },
2060
+ fatal: { level: LogLevels.fatal },
2061
+ error: { level: LogLevels.error },
2062
+ warn: { level: LogLevels.warn },
2063
+ log: { level: LogLevels.log },
2064
+ info: { level: LogLevels.info },
2065
+ success: { level: LogLevels.success },
2066
+ fail: { level: LogLevels.fail },
2067
+ ready: { level: LogLevels.info },
2068
+ start: { level: LogLevels.info },
2069
+ box: { level: LogLevels.info },
2070
+ debug: { level: LogLevels.debug },
2071
+ trace: { level: LogLevels.trace },
2072
+ verbose: { level: LogLevels.verbose }
2073
+ };
2074
+ function isPlainObject$1(value) {
2075
+ if (value === null || typeof value !== "object") return false;
2076
+ const prototype = Object.getPrototypeOf(value);
2077
+ if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) return false;
2078
+ if (Symbol.iterator in value) return false;
2079
+ if (Symbol.toStringTag in value) return Object.prototype.toString.call(value) === "[object Module]";
2080
+ return true;
2081
+ }
2082
+ function _defu(baseObject, defaults, namespace = ".", merger) {
2083
+ if (!isPlainObject$1(defaults)) return _defu(baseObject, {}, namespace, merger);
2084
+ const object = Object.assign({}, defaults);
2085
+ for (const key in baseObject) {
2086
+ if (key === "__proto__" || key === "constructor") continue;
2087
+ const value = baseObject[key];
2088
+ if (value === null || value === void 0) continue;
2089
+ if (merger && merger(object, key, value, namespace)) continue;
2090
+ if (Array.isArray(value) && Array.isArray(object[key])) object[key] = [...value, ...object[key]];
2091
+ else if (isPlainObject$1(value) && isPlainObject$1(object[key])) object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
2092
+ else object[key] = value;
2093
+ }
2094
+ return object;
2095
+ }
2096
+ function createDefu(merger) {
2097
+ return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
2098
+ }
2099
+ const defu = createDefu();
2100
+ function isPlainObject(obj) {
2101
+ return Object.prototype.toString.call(obj) === "[object Object]";
2102
+ }
2103
+ function isLogObj(arg) {
2104
+ if (!isPlainObject(arg)) return false;
2105
+ if (!arg.message && !arg.args) return false;
2106
+ if (arg.stack) return false;
2107
+ return true;
2108
+ }
2109
+ let paused = false;
2110
+ const queue = [];
2111
+ var Consola = class Consola {
2112
+ options;
2113
+ _lastLog;
2114
+ _mockFn;
2115
+ /**
2116
+ * Creates an instance of Consola with specified options or defaults.
2117
+ *
2118
+ * @param {Partial<ConsolaOptions>} [options={}] - Configuration options for the Consola instance.
2119
+ */
2120
+ constructor(options = {}) {
2121
+ const types = options.types || LogTypes;
2122
+ this.options = defu({
2123
+ ...options,
2124
+ defaults: { ...options.defaults },
2125
+ level: _normalizeLogLevel(options.level, types),
2126
+ reporters: [...options.reporters || []]
2127
+ }, {
2128
+ types: LogTypes,
2129
+ throttle: 1e3,
2130
+ throttleMin: 5,
2131
+ formatOptions: {
2132
+ date: true,
2133
+ colors: false,
2134
+ compact: true
2135
+ }
2136
+ });
2137
+ for (const type in types) {
2138
+ const defaults = {
2139
+ type,
2140
+ ...this.options.defaults,
2141
+ ...types[type]
2142
+ };
2143
+ this[type] = this._wrapLogFn(defaults);
2144
+ this[type].raw = this._wrapLogFn(defaults, true);
2145
+ }
2146
+ if (this.options.mockFn) this.mockTypes();
2147
+ this._lastLog = {};
2148
+ }
2149
+ /**
2150
+ * Gets the current log level of the Consola instance.
2151
+ *
2152
+ * @returns {number} The current log level.
2153
+ */
2154
+ get level() {
2155
+ return this.options.level;
2156
+ }
2157
+ /**
2158
+ * Sets the minimum log level that will be output by the instance.
2159
+ *
2160
+ * @param {number} level - The new log level to set.
2161
+ */
2162
+ set level(level) {
2163
+ this.options.level = _normalizeLogLevel(level, this.options.types, this.options.level);
2164
+ }
2165
+ /**
2166
+ * Displays a prompt to the user and returns the response.
2167
+ * Throw an error if `prompt` is not supported by the current configuration.
2168
+ *
2169
+ * @template T
2170
+ * @param {string} message - The message to display in the prompt.
2171
+ * @param {T} [opts] - Optional options for the prompt. See {@link PromptOptions}.
2172
+ * @returns {promise<T>} A promise that infer with the prompt options. See {@link PromptOptions}.
2173
+ */
2174
+ prompt(message, opts) {
2175
+ if (!this.options.prompt) throw new Error("prompt is not supported!");
2176
+ return this.options.prompt(message, opts);
2177
+ }
2178
+ /**
2179
+ * Creates a new instance of Consola, inheriting options from the current instance, with possible overrides.
2180
+ *
2181
+ * @param {Partial<ConsolaOptions>} options - Optional overrides for the new instance. See {@link ConsolaOptions}.
2182
+ * @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.
2183
+ */
2184
+ create(options) {
2185
+ const instance = new Consola({
2186
+ ...this.options,
2187
+ ...options
2188
+ });
2189
+ if (this._mockFn) instance.mockTypes(this._mockFn);
2190
+ return instance;
2191
+ }
2192
+ /**
2193
+ * Creates a new Consola instance with the specified default log object properties.
2194
+ *
2195
+ * @param {InputLogObject} defaults - Default properties to include in any log from the new instance. See {@link InputLogObject}.
2196
+ * @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.
2197
+ */
2198
+ withDefaults(defaults) {
2199
+ return this.create({
2200
+ ...this.options,
2201
+ defaults: {
2202
+ ...this.options.defaults,
2203
+ ...defaults
2204
+ }
2205
+ });
2206
+ }
2207
+ /**
2208
+ * Creates a new Consola instance with a specified tag, which will be included in every log.
2209
+ *
2210
+ * @param {string} tag - The tag to include in each log of the new instance.
2211
+ * @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.
2212
+ */
2213
+ withTag(tag) {
2214
+ return this.withDefaults({ tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag });
2215
+ }
2216
+ /**
2217
+ * Adds a custom reporter to the Consola instance.
2218
+ * Reporters will be called for each log message, depending on their implementation and log level.
2219
+ *
2220
+ * @param {ConsolaReporter} reporter - The reporter to add. See {@link ConsolaReporter}.
2221
+ * @returns {Consola} The current Consola instance.
2222
+ */
2223
+ addReporter(reporter) {
2224
+ this.options.reporters.push(reporter);
2225
+ return this;
2226
+ }
2227
+ /**
2228
+ * Removes a custom reporter from the Consola instance.
2229
+ * If no reporter is specified, all reporters will be removed.
2230
+ *
2231
+ * @param {ConsolaReporter} reporter - The reporter to remove. See {@link ConsolaReporter}.
2232
+ * @returns {Consola} The current Consola instance.
2233
+ */
2234
+ removeReporter(reporter) {
2235
+ if (reporter) {
2236
+ const i = this.options.reporters.indexOf(reporter);
2237
+ if (i !== -1) return this.options.reporters.splice(i, 1);
2238
+ } else this.options.reporters.splice(0);
2239
+ return this;
2240
+ }
2241
+ /**
2242
+ * Replaces all reporters of the Consola instance with the specified array of reporters.
2243
+ *
2244
+ * @param {ConsolaReporter[]} reporters - The new reporters to set. See {@link ConsolaReporter}.
2245
+ * @returns {Consola} The current Consola instance.
2246
+ */
2247
+ setReporters(reporters) {
2248
+ this.options.reporters = Array.isArray(reporters) ? reporters : [reporters];
2249
+ return this;
2250
+ }
2251
+ wrapAll() {
2252
+ this.wrapConsole();
2253
+ this.wrapStd();
2254
+ }
2255
+ restoreAll() {
2256
+ this.restoreConsole();
2257
+ this.restoreStd();
2258
+ }
2259
+ /**
2260
+ * Overrides console methods with Consola logging methods for consistent logging.
2261
+ */
2262
+ wrapConsole() {
2263
+ for (const type in this.options.types) {
2264
+ if (!console["__" + type]) console["__" + type] = console[type];
2265
+ console[type] = this[type].raw;
2266
+ }
2267
+ }
2268
+ /**
2269
+ * Restores the original console methods, removing Consola overrides.
2270
+ */
2271
+ restoreConsole() {
2272
+ for (const type in this.options.types) if (console["__" + type]) {
2273
+ console[type] = console["__" + type];
2274
+ delete console["__" + type];
2275
+ }
2276
+ }
2277
+ /**
2278
+ * Overrides standard output and error streams to redirect them through Consola.
2279
+ */
2280
+ wrapStd() {
2281
+ this._wrapStream(this.options.stdout, "log");
2282
+ this._wrapStream(this.options.stderr, "log");
2283
+ }
2284
+ _wrapStream(stream, type) {
2285
+ if (!stream) return;
2286
+ if (!stream.__write) stream.__write = stream.write;
2287
+ stream.write = (data) => {
2288
+ this[type].raw(String(data).trim());
2289
+ };
2290
+ }
2291
+ /**
2292
+ * Restores the original standard output and error streams, removing the Consola redirection.
2293
+ */
2294
+ restoreStd() {
2295
+ this._restoreStream(this.options.stdout);
2296
+ this._restoreStream(this.options.stderr);
2297
+ }
2298
+ _restoreStream(stream) {
2299
+ if (!stream) return;
2300
+ if (stream.__write) {
2301
+ stream.write = stream.__write;
2302
+ delete stream.__write;
2303
+ }
2304
+ }
2305
+ /**
2306
+ * Pauses logging, queues incoming logs until resumed.
2307
+ */
2308
+ pauseLogs() {
2309
+ paused = true;
2310
+ }
2311
+ /**
2312
+ * Resumes logging, processing any queued logs.
2313
+ */
2314
+ resumeLogs() {
2315
+ paused = false;
2316
+ const _queue = queue.splice(0);
2317
+ for (const item of _queue) item[0]._logFn(item[1], item[2]);
2318
+ }
2319
+ /**
2320
+ * Replaces logging methods with mocks if a mock function is provided.
2321
+ *
2322
+ * @param {ConsolaOptions["mockFn"]} mockFn - The function to use for mocking logging methods. See {@link ConsolaOptions["mockFn"]}.
2323
+ */
2324
+ mockTypes(mockFn) {
2325
+ const _mockFn = mockFn || this.options.mockFn;
2326
+ this._mockFn = _mockFn;
2327
+ if (typeof _mockFn !== "function") return;
2328
+ for (const type in this.options.types) {
2329
+ this[type] = _mockFn(type, this.options.types[type]) || this[type];
2330
+ this[type].raw = this[type];
2331
+ }
2332
+ }
2333
+ _wrapLogFn(defaults, isRaw) {
2334
+ return (...args) => {
2335
+ if (paused) {
2336
+ queue.push([
2337
+ this,
2338
+ defaults,
2339
+ args,
2340
+ isRaw
2341
+ ]);
2342
+ return;
2343
+ }
2344
+ return this._logFn(defaults, args, isRaw);
2345
+ };
2346
+ }
2347
+ _logFn(defaults, args, isRaw) {
2348
+ if ((defaults.level || 0) > this.level) return false;
2349
+ const logObj = {
2350
+ date: /* @__PURE__ */ new Date(),
2351
+ args: [],
2352
+ ...defaults,
2353
+ level: _normalizeLogLevel(defaults.level, this.options.types)
2354
+ };
2355
+ if (!isRaw && args.length === 1 && isLogObj(args[0])) Object.assign(logObj, args[0]);
2356
+ else logObj.args = [...args];
2357
+ if (logObj.message) {
2358
+ logObj.args.unshift(logObj.message);
2359
+ delete logObj.message;
2360
+ }
2361
+ if (logObj.additional) {
2362
+ if (!Array.isArray(logObj.additional)) logObj.additional = logObj.additional.split("\n");
2363
+ logObj.args.push("\n" + logObj.additional.join("\n"));
2364
+ delete logObj.additional;
2365
+ }
2366
+ logObj.type = typeof logObj.type === "string" ? logObj.type.toLowerCase() : "log";
2367
+ logObj.tag = typeof logObj.tag === "string" ? logObj.tag : "";
2368
+ const resolveLog = (newLog = false) => {
2369
+ const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
2370
+ if (this._lastLog.object && repeated > 0) {
2371
+ const args2 = [...this._lastLog.object.args];
2372
+ if (repeated > 1) args2.push(`(repeated ${repeated} times)`);
2373
+ this._log({
2374
+ ...this._lastLog.object,
2375
+ args: args2
2376
+ });
2377
+ this._lastLog.count = 1;
2378
+ }
2379
+ if (newLog) {
2380
+ this._lastLog.object = logObj;
2381
+ this._log(logObj);
2382
+ }
2383
+ };
2384
+ clearTimeout(this._lastLog.timeout);
2385
+ const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
2386
+ this._lastLog.time = logObj.date;
2387
+ if (diffTime < this.options.throttle) try {
2388
+ const serializedLog = JSON.stringify([
2389
+ logObj.type,
2390
+ logObj.tag,
2391
+ logObj.args
2392
+ ]);
2393
+ const isSameLog = this._lastLog.serialized === serializedLog;
2394
+ this._lastLog.serialized = serializedLog;
2395
+ if (isSameLog) {
2396
+ this._lastLog.count = (this._lastLog.count || 0) + 1;
2397
+ if (this._lastLog.count > this.options.throttleMin) {
2398
+ this._lastLog.timeout = setTimeout(resolveLog, this.options.throttle);
2399
+ return;
2400
+ }
2401
+ }
2402
+ } catch {}
2403
+ resolveLog(true);
2404
+ }
2405
+ _log(logObj) {
2406
+ for (const reporter of this.options.reporters) reporter.log(logObj, { options: this.options });
2407
+ }
2408
+ };
2409
+ function _normalizeLogLevel(input, types = {}, defaultLevel = 3) {
2410
+ if (input === void 0) return defaultLevel;
2411
+ if (typeof input === "number") return input;
2412
+ if (types[input] && types[input].level !== void 0) return types[input].level;
2413
+ return defaultLevel;
2414
+ }
2415
+ Consola.prototype.add = Consola.prototype.addReporter;
2416
+ Consola.prototype.remove = Consola.prototype.removeReporter;
2417
+ Consola.prototype.clear = Consola.prototype.removeReporter;
2418
+ Consola.prototype.withScope = Consola.prototype.withTag;
2419
+ Consola.prototype.mock = Consola.prototype.mockTypes;
2420
+ Consola.prototype.pause = Consola.prototype.pauseLogs;
2421
+ Consola.prototype.resume = Consola.prototype.resumeLogs;
2422
+ function createConsola$1(options = {}) {
2423
+ return new Consola(options);
2424
+ }
2425
+
2426
+ //#endregion
2427
+ //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs
2428
+ function parseStack(stack, message) {
2429
+ const cwd = process.cwd() + sep;
2430
+ return stack.split("\n").splice(message.split("\n").length).map((l) => l.trim().replace("file://", "").replace(cwd, ""));
2431
+ }
2432
+ function writeStream(data, stream) {
2433
+ return (stream.__write || stream.write).call(stream, data);
2434
+ }
2435
+ const bracket = (x) => x ? `[${x}]` : "";
2436
+ var BasicReporter = class {
2437
+ formatStack(stack, message, opts) {
2438
+ const indent = " ".repeat((opts?.errorLevel || 0) + 1);
2439
+ return indent + parseStack(stack, message).join(`
2440
+ ${indent}`);
2441
+ }
2442
+ formatError(err, opts) {
2443
+ const message = err.message ?? formatWithOptions(opts, err);
2444
+ const stack = err.stack ? this.formatStack(err.stack, message, opts) : "";
2445
+ const level = opts?.errorLevel || 0;
2446
+ const causedPrefix = level > 0 ? `${" ".repeat(level)}[cause]: ` : "";
2447
+ const causedError = err.cause ? "\n\n" + this.formatError(err.cause, {
2448
+ ...opts,
2449
+ errorLevel: level + 1
2450
+ }) : "";
2451
+ return causedPrefix + message + "\n" + stack + causedError;
2452
+ }
2453
+ formatArgs(args, opts) {
2454
+ return formatWithOptions(opts, ...args.map((arg) => {
2455
+ if (arg && typeof arg.stack === "string") return this.formatError(arg, opts);
2456
+ return arg;
2457
+ }));
2458
+ }
2459
+ formatDate(date, opts) {
2460
+ return opts.date ? date.toLocaleTimeString() : "";
2461
+ }
2462
+ filterAndJoin(arr) {
2463
+ return arr.filter(Boolean).join(" ");
2464
+ }
2465
+ formatLogObj(logObj, opts) {
2466
+ const message = this.formatArgs(logObj.args, opts);
2467
+ if (logObj.type === "box") return "\n" + [
2468
+ bracket(logObj.tag),
2469
+ logObj.title && logObj.title,
2470
+ ...message.split("\n")
2471
+ ].filter(Boolean).map((l) => " > " + l).join("\n") + "\n";
2472
+ return this.filterAndJoin([
2473
+ bracket(logObj.type),
2474
+ bracket(logObj.tag),
2475
+ message
2476
+ ]);
2477
+ }
2478
+ log(logObj, ctx) {
2479
+ return writeStream(this.formatLogObj(logObj, {
2480
+ columns: ctx.options.stdout.columns || 0,
2481
+ ...ctx.options.formatOptions
2482
+ }) + "\n", logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout);
2483
+ }
2484
+ };
2485
+
2486
+ //#endregion
2487
+ //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs
2488
+ const { env = {}, argv = [], platform = "" } = typeof process === "undefined" ? {} : process;
2489
+ const isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
2490
+ const isForced = "FORCE_COLOR" in env || argv.includes("--color");
2491
+ const isWindows = platform === "win32";
2492
+ const isDumbTerminal = env.TERM === "dumb";
2493
+ const isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
2494
+ const isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
2495
+ const isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
2496
+ 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)) {
2497
+ return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
2498
+ }
2499
+ function clearBleed(index, string, open, close, replace) {
2500
+ return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
2501
+ }
2502
+ function filterEmpty(open, close, replace = open, at = open.length + 1) {
2503
+ return (string) => string || !(string === "" || string === void 0) ? clearBleed(("" + string).indexOf(close, at), string, open, close, replace) : "";
2504
+ }
2505
+ function init(open, close, replace) {
2506
+ return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
2507
+ }
2508
+ const colorDefs = {
2509
+ reset: init(0, 0),
2510
+ bold: init(1, 22, "\x1B[22m\x1B[1m"),
2511
+ dim: init(2, 22, "\x1B[22m\x1B[2m"),
2512
+ italic: init(3, 23),
2513
+ underline: init(4, 24),
2514
+ inverse: init(7, 27),
2515
+ hidden: init(8, 28),
2516
+ strikethrough: init(9, 29),
2517
+ black: init(30, 39),
2518
+ red: init(31, 39),
2519
+ green: init(32, 39),
2520
+ yellow: init(33, 39),
2521
+ blue: init(34, 39),
2522
+ magenta: init(35, 39),
2523
+ cyan: init(36, 39),
2524
+ white: init(37, 39),
2525
+ gray: init(90, 39),
2526
+ bgBlack: init(40, 49),
2527
+ bgRed: init(41, 49),
2528
+ bgGreen: init(42, 49),
2529
+ bgYellow: init(43, 49),
2530
+ bgBlue: init(44, 49),
2531
+ bgMagenta: init(45, 49),
2532
+ bgCyan: init(46, 49),
2533
+ bgWhite: init(47, 49),
2534
+ blackBright: init(90, 39),
2535
+ redBright: init(91, 39),
2536
+ greenBright: init(92, 39),
2537
+ yellowBright: init(93, 39),
2538
+ blueBright: init(94, 39),
2539
+ magentaBright: init(95, 39),
2540
+ cyanBright: init(96, 39),
2541
+ whiteBright: init(97, 39),
2542
+ bgBlackBright: init(100, 49),
2543
+ bgRedBright: init(101, 49),
2544
+ bgGreenBright: init(102, 49),
2545
+ bgYellowBright: init(103, 49),
2546
+ bgBlueBright: init(104, 49),
2547
+ bgMagentaBright: init(105, 49),
2548
+ bgCyanBright: init(106, 49),
2549
+ bgWhiteBright: init(107, 49)
2550
+ };
2551
+ function createColors(useColor = isColorSupported) {
2552
+ return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
2553
+ }
2554
+ const colors = createColors();
2555
+ function getColor$1(color, fallback = "reset") {
2556
+ return colors[color] || colors[fallback];
2557
+ }
2558
+ const ansiRegex$1 = [String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`, String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join("|");
2559
+ function stripAnsi$1(text) {
2560
+ return text.replace(new RegExp(ansiRegex$1, "g"), "");
2561
+ }
2562
+ const boxStylePresets = {
2563
+ solid: {
2564
+ tl: "┌",
2565
+ tr: "┐",
2566
+ bl: "└",
2567
+ br: "┘",
2568
+ h: "─",
2569
+ v: "│"
2570
+ },
2571
+ double: {
2572
+ tl: "╔",
2573
+ tr: "╗",
2574
+ bl: "╚",
2575
+ br: "╝",
2576
+ h: "═",
2577
+ v: "║"
2578
+ },
2579
+ doubleSingle: {
2580
+ tl: "╓",
2581
+ tr: "╖",
2582
+ bl: "╙",
2583
+ br: "╜",
2584
+ h: "─",
2585
+ v: "║"
2586
+ },
2587
+ doubleSingleRounded: {
2588
+ tl: "╭",
2589
+ tr: "╮",
2590
+ bl: "╰",
2591
+ br: "╯",
2592
+ h: "─",
2593
+ v: "║"
2594
+ },
2595
+ singleThick: {
2596
+ tl: "┏",
2597
+ tr: "┓",
2598
+ bl: "┗",
2599
+ br: "┛",
2600
+ h: "━",
2601
+ v: "┃"
2602
+ },
2603
+ singleDouble: {
2604
+ tl: "╒",
2605
+ tr: "╕",
2606
+ bl: "╘",
2607
+ br: "╛",
2608
+ h: "═",
2609
+ v: "│"
2610
+ },
2611
+ singleDoubleRounded: {
2612
+ tl: "╭",
2613
+ tr: "╮",
2614
+ bl: "╰",
2615
+ br: "╯",
2616
+ h: "═",
2617
+ v: "│"
2618
+ },
2619
+ rounded: {
2620
+ tl: "╭",
2621
+ tr: "╮",
2622
+ bl: "╰",
2623
+ br: "╯",
2624
+ h: "─",
2625
+ v: "│"
2626
+ }
2627
+ };
2628
+ const defaultStyle = {
2629
+ borderColor: "white",
2630
+ borderStyle: "rounded",
2631
+ valign: "center",
2632
+ padding: 2,
2633
+ marginLeft: 1,
2634
+ marginTop: 1,
2635
+ marginBottom: 1
2636
+ };
2637
+ function box(text, _opts = {}) {
2638
+ const opts = {
2639
+ ..._opts,
2640
+ style: {
2641
+ ...defaultStyle,
2642
+ ..._opts.style
2643
+ }
2644
+ };
2645
+ const textLines = text.split("\n");
2646
+ const boxLines = [];
2647
+ const _color = getColor$1(opts.style.borderColor);
2648
+ const borderStyle = { ...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle };
2649
+ if (_color) for (const key in borderStyle) borderStyle[key] = _color(borderStyle[key]);
2650
+ const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
2651
+ const height = textLines.length + paddingOffset;
2652
+ const width = Math.max(...textLines.map((line) => stripAnsi$1(line).length), opts.title ? stripAnsi$1(opts.title).length : 0) + paddingOffset;
2653
+ const widthOffset = width + paddingOffset;
2654
+ const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
2655
+ if (opts.style.marginTop > 0) boxLines.push("".repeat(opts.style.marginTop));
2656
+ if (opts.title) {
2657
+ const title = _color ? _color(opts.title) : opts.title;
2658
+ const left = borderStyle.h.repeat(Math.floor((width - stripAnsi$1(opts.title).length) / 2));
2659
+ const right = borderStyle.h.repeat(width - stripAnsi$1(opts.title).length - stripAnsi$1(left).length + paddingOffset);
2660
+ boxLines.push(`${leftSpace}${borderStyle.tl}${left}${title}${right}${borderStyle.tr}`);
2661
+ } else boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
2662
+ const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
2663
+ for (let i = 0; i < height; i++) if (i < valignOffset || i >= valignOffset + textLines.length) boxLines.push(`${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`);
2664
+ else {
2665
+ const line = textLines[i - valignOffset];
2666
+ const left = " ".repeat(paddingOffset);
2667
+ const right = " ".repeat(width - stripAnsi$1(line).length);
2668
+ boxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);
2669
+ }
2670
+ boxLines.push(`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`);
2671
+ if (opts.style.marginBottom > 0) boxLines.push("".repeat(opts.style.marginBottom));
2672
+ return boxLines.join("\n");
2673
+ }
2674
+
2675
+ //#endregion
2676
+ //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/index.mjs
2677
+ const r = Object.create(null), i = (e) => globalThis.process?.env || import.meta.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e ? r : globalThis), o = new Proxy(r, {
2678
+ get(e, s) {
2679
+ return i()[s] ?? r[s];
2680
+ },
2681
+ has(e, s) {
2682
+ return s in i() || s in r;
2683
+ },
2684
+ set(e, s, E) {
2685
+ const B = i(true);
2686
+ return B[s] = E, true;
2687
+ },
2688
+ deleteProperty(e, s) {
2689
+ if (!s) return false;
2690
+ const E = i(true);
2691
+ return delete E[s], true;
2692
+ },
2693
+ ownKeys() {
2694
+ const e = i(true);
2695
+ return Object.keys(e);
2696
+ }
2697
+ }), t = typeof process < "u" && process.env && process.env.NODE_ENV || "", f = [
2698
+ ["APPVEYOR"],
2699
+ [
2700
+ "AWS_AMPLIFY",
2701
+ "AWS_APP_ID",
2702
+ { ci: true }
2703
+ ],
2704
+ ["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],
2705
+ ["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],
2706
+ ["APPCIRCLE", "AC_APPCIRCLE"],
2707
+ ["BAMBOO", "bamboo_planKey"],
2708
+ ["BITBUCKET", "BITBUCKET_COMMIT"],
2709
+ ["BITRISE", "BITRISE_IO"],
2710
+ ["BUDDY", "BUDDY_WORKSPACE_ID"],
2711
+ ["BUILDKITE"],
2712
+ ["CIRCLE", "CIRCLECI"],
2713
+ ["CIRRUS", "CIRRUS_CI"],
2714
+ [
2715
+ "CLOUDFLARE_PAGES",
2716
+ "CF_PAGES",
2717
+ { ci: true }
2718
+ ],
2719
+ ["CODEBUILD", "CODEBUILD_BUILD_ARN"],
2720
+ ["CODEFRESH", "CF_BUILD_ID"],
2721
+ ["DRONE"],
2722
+ ["DRONE", "DRONE_BUILD_EVENT"],
2723
+ ["DSARI"],
2724
+ ["GITHUB_ACTIONS"],
2725
+ ["GITLAB", "GITLAB_CI"],
2726
+ ["GITLAB", "CI_MERGE_REQUEST_ID"],
2727
+ ["GOCD", "GO_PIPELINE_LABEL"],
2728
+ ["LAYERCI"],
2729
+ ["HUDSON", "HUDSON_URL"],
2730
+ ["JENKINS", "JENKINS_URL"],
2731
+ ["MAGNUM"],
2732
+ ["NETLIFY"],
2733
+ [
2734
+ "NETLIFY",
2735
+ "NETLIFY_LOCAL",
2736
+ { ci: false }
2737
+ ],
2738
+ ["NEVERCODE"],
2739
+ ["RENDER"],
2740
+ ["SAIL", "SAILCI"],
2741
+ ["SEMAPHORE"],
2742
+ ["SCREWDRIVER"],
2743
+ ["SHIPPABLE"],
2744
+ ["SOLANO", "TDDIUM"],
2745
+ ["STRIDER"],
2746
+ ["TEAMCITY", "TEAMCITY_VERSION"],
2747
+ ["TRAVIS"],
2748
+ ["VERCEL", "NOW_BUILDER"],
2749
+ [
2750
+ "VERCEL",
2751
+ "VERCEL",
2752
+ { ci: false }
2753
+ ],
2754
+ [
2755
+ "VERCEL",
2756
+ "VERCEL_ENV",
2757
+ { ci: false }
2758
+ ],
2759
+ ["APPCENTER", "APPCENTER_BUILD_ID"],
2760
+ [
2761
+ "CODESANDBOX",
2762
+ "CODESANDBOX_SSE",
2763
+ { ci: false }
2764
+ ],
2765
+ [
2766
+ "CODESANDBOX",
2767
+ "CODESANDBOX_HOST",
2768
+ { ci: false }
2769
+ ],
2770
+ ["STACKBLITZ"],
2771
+ ["STORMKIT"],
2772
+ ["CLEAVR"],
2773
+ ["ZEABUR"],
2774
+ [
2775
+ "CODESPHERE",
2776
+ "CODESPHERE_APP_ID",
2777
+ { ci: true }
2778
+ ],
2779
+ ["RAILWAY", "RAILWAY_PROJECT_ID"],
2780
+ ["RAILWAY", "RAILWAY_SERVICE_ID"],
2781
+ ["DENO-DEPLOY", "DENO_DEPLOYMENT_ID"],
2782
+ [
2783
+ "FIREBASE_APP_HOSTING",
2784
+ "FIREBASE_APP_HOSTING",
2785
+ { ci: true }
2786
+ ]
2787
+ ];
2788
+ function b() {
2789
+ if (globalThis.process?.env) for (const e of f) {
2790
+ const s = e[1] || e[0];
2791
+ if (globalThis.process?.env[s]) return {
2792
+ name: e[0].toLowerCase(),
2793
+ ...e[2]
2794
+ };
2795
+ }
2796
+ return globalThis.process?.env?.SHELL === "/bin/jsh" && globalThis.process?.versions?.webcontainer ? {
2797
+ name: "stackblitz",
2798
+ ci: false
2799
+ } : {
2800
+ name: "",
2801
+ ci: false
2802
+ };
2803
+ }
2804
+ const l = b();
2805
+ l.name;
2806
+ function n(e) {
2807
+ return e ? e !== "false" : false;
2808
+ }
2809
+ const I = globalThis.process?.platform || "", T = n(o.CI) || l.ci !== false, a = n(globalThis.process?.stdout && globalThis.process?.stdout.isTTY), g = n(o.DEBUG), R = t === "test" || n(o.TEST);
2810
+ n(o.MINIMAL);
2811
+ const A = /^win/i.test(I);
2812
+ !n(o.NO_COLOR) && (n(o.FORCE_COLOR) || (a || A) && o.TERM);
2813
+ const C = (globalThis.process?.versions?.node || "").replace(/^v/, "") || null;
2814
+ Number(C?.split(".")[0]);
2815
+ const y = globalThis.process || Object.create(null), _ = { versions: {} };
2816
+ new Proxy(y, { get(e, s) {
2817
+ if (s === "env") return o;
2818
+ if (s in e) return e[s];
2819
+ if (s in _) return _[s];
2820
+ } });
2821
+ const c = globalThis.process?.release?.name === "node", O = !!globalThis.Bun || !!globalThis.process?.versions?.bun, D = !!globalThis.Deno, L = !!globalThis.fastly, S = !!globalThis.Netlify, u = !!globalThis.EdgeRuntime, N = globalThis.navigator?.userAgent === "Cloudflare-Workers", F = [
2822
+ [S, "netlify"],
2823
+ [u, "edge-light"],
2824
+ [N, "workerd"],
2825
+ [L, "fastly"],
2826
+ [D, "deno"],
2827
+ [O, "bun"],
2828
+ [c, "node"]
2829
+ ];
2830
+ function G() {
2831
+ const e = F.find((s) => s[0]);
2832
+ if (e) return { name: e[1] };
2833
+ }
2834
+ G()?.name;
2835
+ function ansiRegex({ onlyFirst = false } = {}) {
2836
+ const pattern = [`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))`, "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
2837
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
2838
+ }
2839
+ const regex = ansiRegex();
2840
+ function stripAnsi(string) {
2841
+ if (typeof string !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
2842
+ return string.replace(regex, "");
2843
+ }
2844
+ function isAmbiguous(x) {
2845
+ return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
2846
+ }
2847
+ function isFullWidth(x) {
2848
+ return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
2849
+ }
2850
+ function isWide(x) {
2851
+ return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101631 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
2852
+ }
2853
+ function validate(codePoint) {
2854
+ if (!Number.isSafeInteger(codePoint)) throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
2855
+ }
2856
+ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
2857
+ validate(codePoint);
2858
+ if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) return 2;
2859
+ return 1;
2860
+ }
2861
+ const emojiRegex = () => {
2862
+ 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\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](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\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]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\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])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\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-\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]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\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(?:[\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\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\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-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\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-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\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;
2863
+ };
2864
+ const segmenter = globalThis.Intl?.Segmenter ? new Intl.Segmenter() : { segment: (str) => str.split("") };
2865
+ const defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
2866
+ function stringWidth$1(string, options = {}) {
2867
+ if (typeof string !== "string" || string.length === 0) return 0;
2868
+ const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options;
2869
+ if (!countAnsiEscapeCodes) string = stripAnsi(string);
2870
+ if (string.length === 0) return 0;
2871
+ let width = 0;
2872
+ const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
2873
+ for (const { segment: character } of segmenter.segment(string)) {
2874
+ const codePoint = character.codePointAt(0);
2875
+ if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) continue;
2876
+ if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) continue;
2877
+ if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) continue;
2878
+ if (codePoint >= 55296 && codePoint <= 57343) continue;
2879
+ if (codePoint >= 65024 && codePoint <= 65039) continue;
2880
+ if (defaultIgnorableCodePointRegex.test(character)) continue;
2881
+ if (emojiRegex().test(character)) {
2882
+ width += 2;
2883
+ continue;
2884
+ }
2885
+ width += eastAsianWidth(codePoint, eastAsianWidthOptions);
2886
+ }
2887
+ return width;
2888
+ }
2889
+ function isUnicodeSupported() {
2890
+ const { env } = process$1;
2891
+ const { TERM, TERM_PROGRAM } = env;
2892
+ if (process$1.platform !== "win32") return TERM !== "linux";
2893
+ return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
2894
+ }
2895
+ const TYPE_COLOR_MAP = {
2896
+ info: "cyan",
2897
+ fail: "red",
2898
+ success: "green",
2899
+ ready: "green",
2900
+ start: "magenta"
2901
+ };
2902
+ const LEVEL_COLOR_MAP = {
2903
+ 0: "red",
2904
+ 1: "yellow"
2905
+ };
2906
+ const unicode = isUnicodeSupported();
2907
+ const s = (c, fallback) => unicode ? c : fallback;
2908
+ const TYPE_ICONS = {
2909
+ error: s("✖", "×"),
2910
+ fatal: s("✖", "×"),
2911
+ ready: s("✔", "√"),
2912
+ warn: s("⚠", "‼"),
2913
+ info: s("ℹ", "i"),
2914
+ success: s("✔", "√"),
2915
+ debug: s("⚙", "D"),
2916
+ trace: s("→", "→"),
2917
+ fail: s("✖", "×"),
2918
+ start: s("◐", "o"),
2919
+ log: ""
2920
+ };
2921
+ function stringWidth(str) {
2922
+ if (!(typeof Intl === "object") || !Intl.Segmenter) return stripAnsi$1(str).length;
2923
+ return stringWidth$1(str);
2924
+ }
2925
+ var FancyReporter = class extends BasicReporter {
2926
+ formatStack(stack, message, opts) {
2927
+ const indent = " ".repeat((opts?.errorLevel || 0) + 1);
2928
+ return `
2929
+ ${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_, m) => `(${colors.cyan(m)})`)).join(`
2930
+ ${indent}`);
2931
+ }
2932
+ formatType(logObj, isBadge, opts) {
2933
+ const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
2934
+ if (isBadge) return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
2935
+ const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
2936
+ return _type ? getColor(typeColor)(_type) : "";
2937
+ }
2938
+ formatLogObj(logObj, opts) {
2939
+ const [message, ...additional] = this.formatArgs(logObj.args, opts).split("\n");
2940
+ if (logObj.type === "box") return box(characterFormat(message + (additional.length > 0 ? "\n" + additional.join("\n") : "")), {
2941
+ title: logObj.title ? characterFormat(logObj.title) : void 0,
2942
+ style: logObj.style
2943
+ });
2944
+ const date = this.formatDate(logObj.date, opts);
2945
+ const coloredDate = date && colors.gray(date);
2946
+ const isBadge = logObj.badge ?? logObj.level < 2;
2947
+ const type = this.formatType(logObj, isBadge, opts);
2948
+ const tag = logObj.tag ? colors.gray(logObj.tag) : "";
2949
+ let line;
2950
+ const left = this.filterAndJoin([type, characterFormat(message)]);
2951
+ const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
2952
+ const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
2953
+ line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
2954
+ line += characterFormat(additional.length > 0 ? "\n" + additional.join("\n") : "");
2955
+ if (logObj.type === "trace") {
2956
+ const _err = /* @__PURE__ */ new Error("Trace: " + logObj.message);
2957
+ line += this.formatStack(_err.stack || "", _err.message);
2958
+ }
2959
+ return isBadge ? "\n" + line + "\n" : line;
2960
+ }
2961
+ };
2962
+ function characterFormat(str) {
2963
+ return str.replace(/`([^`]+)`/gm, (_, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_, m) => ` ${colors.underline(m)} `);
2964
+ }
2965
+ function getColor(color = "white") {
2966
+ return colors[color] || colors.white;
2967
+ }
2968
+ function getBgColor(color = "bgWhite") {
2969
+ return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
2970
+ }
2971
+ function createConsola(options = {}) {
2972
+ let level = _getDefaultLogLevel();
2973
+ if (process.env.CONSOLA_LEVEL) level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
2974
+ return createConsola$1({
2975
+ level,
2976
+ defaults: { level },
2977
+ stdout: process.stdout,
2978
+ stderr: process.stderr,
2979
+ prompt: (...args) => import("./prompt-B56gTa4S.mjs").then((m) => m.prompt(...args)),
2980
+ reporters: options.reporters || [options.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
2981
+ ...options
2982
+ });
2983
+ }
2984
+ function _getDefaultLogLevel() {
2985
+ if (g) return LogLevels.debug;
2986
+ if (R) return LogLevels.warn;
2987
+ return LogLevels.info;
2988
+ }
2989
+ const consola = createConsola();
2990
+
2991
+ //#endregion
2992
+ //#region src/cli/logger.ts
2993
+ /**
2994
+ * Console logger
2995
+ */
2996
+ const logger = process.env.ROLLDOWN_TEST ? createTestingLogger() : createConsola({ formatOptions: { date: false } });
2997
+ function createTestingLogger() {
2998
+ const types = [
2999
+ "silent",
3000
+ "fatal",
3001
+ "error",
3002
+ "warn",
3003
+ "log",
3004
+ "info",
3005
+ "success",
3006
+ "fail",
3007
+ "ready",
3008
+ "start",
3009
+ "box",
3010
+ "debug",
3011
+ "trace",
3012
+ "verbose"
3013
+ ];
3014
+ const ret = Object.create(null);
3015
+ for (const type of types) ret[type] = (...args) => console.log(...args);
3016
+ return ret;
3017
+ }
3018
+
2031
3019
  //#endregion
2032
3020
  //#region src/utils/bindingify-output-options.ts
2033
3021
  function bindingifyOutputOptions(outputOptions) {
2034
- const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, postBanner, postFooter, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir, strictExecutionOrder, globalIdentifiers } = outputOptions;
3022
+ const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, banner, footer, postBanner, postFooter, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, comments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir, strictExecutionOrder, globalIdentifiers } = outputOptions;
3023
+ if (legalComments != null) logger.warn("`legalComments` option is deprecated, please use `comments.legal` instead.");
2035
3024
  const { inlineDynamicImports, advancedChunks } = bindingifyCodeSplitting(outputOptions.codeSplitting, outputOptions.inlineDynamicImports, outputOptions.advancedChunks, manualChunks);
2036
3025
  return {
2037
3026
  dir,
@@ -2059,8 +3048,6 @@ function bindingifyOutputOptions(outputOptions) {
2059
3048
  assetFileNames: bindingifyAssetFilenames(assetFileNames),
2060
3049
  entryFileNames,
2061
3050
  chunkFileNames,
2062
- cssEntryFileNames,
2063
- cssChunkFileNames,
2064
3051
  plugins: [],
2065
3052
  minify: outputOptions.minify,
2066
3053
  externalLiveBindings: outputOptions.externalLiveBindings,
@@ -2072,6 +3059,7 @@ function bindingifyOutputOptions(outputOptions) {
2072
3059
  preserveModules,
2073
3060
  virtualDirname,
2074
3061
  legalComments,
3062
+ comments: bindingifyComments(comments),
2075
3063
  preserveModulesRoot,
2076
3064
  topLevelVar,
2077
3065
  minifyInternalExports: outputOptions.minifyInternalExports,
@@ -2121,36 +3109,41 @@ function bindingifyAssetFilenames(assetFileNames) {
2121
3109
  };
2122
3110
  return assetFileNames;
2123
3111
  }
3112
+ function bindingifyComments(comments) {
3113
+ if (comments == null) return;
3114
+ if (typeof comments === "boolean") return comments;
3115
+ return comments;
3116
+ }
2124
3117
  function bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, advancedChunks, manualChunks) {
2125
3118
  let inlineDynamicImports;
2126
3119
  let effectiveChunksOption;
2127
3120
  if (codeSplitting === false) {
2128
- if (inlineDynamicImportsOption != null) console.warn("`inlineDynamicImports` option is ignored because `codeSplitting: false` is set.");
3121
+ if (inlineDynamicImportsOption != null) logger.warn("`inlineDynamicImports` option is ignored because `codeSplitting: false` is set.");
2129
3122
  if (manualChunks != null) throw new Error("Invalid configuration: \"output.manualChunks\" cannot be used when \"output.codeSplitting\" is set to false.");
2130
- if (advancedChunks != null) console.warn("`advancedChunks` option is ignored because `codeSplitting` is set to `false`.");
3123
+ if (advancedChunks != null) logger.warn("`advancedChunks` option is ignored because `codeSplitting` is set to `false`.");
2131
3124
  return {
2132
3125
  inlineDynamicImports: true,
2133
3126
  advancedChunks: void 0
2134
3127
  };
2135
3128
  } else if (codeSplitting === true) {
2136
- if (inlineDynamicImportsOption != null) console.warn("`inlineDynamicImports` option is ignored because `codeSplitting: true` is set.");
3129
+ if (inlineDynamicImportsOption != null) logger.warn("`inlineDynamicImports` option is ignored because `codeSplitting: true` is set.");
2137
3130
  } else if (codeSplitting == null) {
2138
3131
  if (inlineDynamicImportsOption != null) {
2139
- console.warn("`inlineDynamicImports` option is deprecated, please use `codeSplitting: false` instead.");
3132
+ logger.warn("`inlineDynamicImports` option is deprecated, please use `codeSplitting: false` instead.");
2140
3133
  inlineDynamicImports = inlineDynamicImportsOption;
2141
3134
  }
2142
3135
  } else {
2143
3136
  effectiveChunksOption = codeSplitting;
2144
- if (inlineDynamicImportsOption != null) console.warn("`inlineDynamicImports` option is ignored because the `codeSplitting` option is specified.");
3137
+ if (inlineDynamicImportsOption != null) logger.warn("`inlineDynamicImports` option is ignored because the `codeSplitting` option is specified.");
2145
3138
  }
2146
3139
  if (inlineDynamicImports === true && manualChunks != null) throw new Error("Invalid value \"true\" for option \"output.inlineDynamicImports\" - this option is not supported for \"output.manualChunks\".");
2147
3140
  if (effectiveChunksOption == null) {
2148
3141
  if (advancedChunks != null) {
2149
- console.warn("`advancedChunks` option is deprecated, please use `codeSplitting` instead.");
3142
+ logger.warn("`advancedChunks` option is deprecated, please use `codeSplitting` instead.");
2150
3143
  effectiveChunksOption = advancedChunks;
2151
3144
  }
2152
- } else if (advancedChunks != null) console.warn("`advancedChunks` option is ignored because the `codeSplitting` option is specified.");
2153
- if (manualChunks != null && effectiveChunksOption != null) console.warn("`manualChunks` option is ignored because the `codeSplitting` option is specified.");
3145
+ } else if (advancedChunks != null) logger.warn("`advancedChunks` option is ignored because the `codeSplitting` option is specified.");
3146
+ if (manualChunks != null && effectiveChunksOption != null) logger.warn("`manualChunks` option is ignored because the `codeSplitting` option is specified.");
2154
3147
  else if (manualChunks != null) effectiveChunksOption = { groups: [{ name(moduleId, ctx) {
2155
3148
  return manualChunks(moduleId, { getModuleInfo: (id) => ctx.getModuleInfo(id) });
2156
3149
  } }] };
@@ -2371,4 +3364,4 @@ var RolldownBuild = class RolldownBuild {
2371
3364
  };
2372
3365
 
2373
3366
  //#endregion
2374
- export { getOutputCliKeys as a, styleText$1 as c, getInputCliKeys as i, PluginDriver as l, createBundlerOptions as n, validateCliOptions as o, getCliSchemaInfo as r, validateOption as s, RolldownBuild as t };
3367
+ export { getInputCliKeys as a, validateOption as c, getCliSchemaInfo as i, styleText$1 as l, createBundlerOptions as n, getOutputCliKeys as o, logger as r, validateCliOptions as s, RolldownBuild as t, PluginDriver as u };