@vibeframe/mcp-server 0.54.0 → 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +549 -304
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -6893,8 +6893,8 @@ var init_chrome = __esm({
6893
6893
 
6894
6894
  // ../cli/src/pipeline/renderers/html-clips.ts
6895
6895
  function relAsset(url) {
6896
- const basename18 = url.split("/").pop() ?? url;
6897
- return `assets/${basename18}`;
6896
+ const basename19 = url.split("/").pop() ?? url;
6897
+ return `assets/${basename19}`;
6898
6898
  }
6899
6899
  function buildClipElements(state) {
6900
6900
  return state.clips.map((clip) => {
@@ -8047,7 +8047,7 @@ is not a problem with esbuild. You need to fix your environment instead.
8047
8047
  let latestResultPromise;
8048
8048
  let provideLatestResult;
8049
8049
  if (isContext)
8050
- requestCallbacks["on-end"] = (id, request22) => new Promise((resolve41) => {
8050
+ requestCallbacks["on-end"] = (id, request22) => new Promise((resolve44) => {
8051
8051
  buildResponseToResult(request22, (err, result, onEndErrors, onEndWarnings) => {
8052
8052
  const response = {
8053
8053
  errors: onEndErrors,
@@ -8057,7 +8057,7 @@ is not a problem with esbuild. You need to fix your environment instead.
8057
8057
  latestResultPromise = void 0;
8058
8058
  provideLatestResult = void 0;
8059
8059
  sendResponse(id, response);
8060
- resolve41();
8060
+ resolve44();
8061
8061
  });
8062
8062
  });
8063
8063
  sendRequest(refs3, request5, (error, response) => {
@@ -8074,10 +8074,10 @@ is not a problem with esbuild. You need to fix your environment instead.
8074
8074
  let didDispose = false;
8075
8075
  const result = {
8076
8076
  rebuild: () => {
8077
- if (!latestResultPromise) latestResultPromise = new Promise((resolve41, reject) => {
8077
+ if (!latestResultPromise) latestResultPromise = new Promise((resolve44, reject) => {
8078
8078
  let settlePromise;
8079
8079
  provideLatestResult = (err, result2) => {
8080
- if (!settlePromise) settlePromise = () => err ? reject(err) : resolve41(result2);
8080
+ if (!settlePromise) settlePromise = () => err ? reject(err) : resolve44(result2);
8081
8081
  };
8082
8082
  const triggerAnotherBuild = () => {
8083
8083
  const request22 = {
@@ -8098,7 +8098,7 @@ is not a problem with esbuild. You need to fix your environment instead.
8098
8098
  });
8099
8099
  return latestResultPromise;
8100
8100
  },
8101
- watch: (options2 = {}) => new Promise((resolve41, reject) => {
8101
+ watch: (options2 = {}) => new Promise((resolve44, reject) => {
8102
8102
  if (!streamIn.hasFS) throw new Error(`Cannot use the "watch" API in this environment`);
8103
8103
  const keys2 = {};
8104
8104
  const delay = getFlag3(options2, keys2, "delay", mustBeInteger);
@@ -8110,10 +8110,10 @@ is not a problem with esbuild. You need to fix your environment instead.
8110
8110
  if (delay) request22.delay = delay;
8111
8111
  sendRequest(refs3, request22, (error2) => {
8112
8112
  if (error2) reject(new Error(error2));
8113
- else resolve41(void 0);
8113
+ else resolve44(void 0);
8114
8114
  });
8115
8115
  }),
8116
- serve: (options2 = {}) => new Promise((resolve41, reject) => {
8116
+ serve: (options2 = {}) => new Promise((resolve44, reject) => {
8117
8117
  if (!streamIn.hasFS) throw new Error(`Cannot use the "serve" API in this environment`);
8118
8118
  const keys2 = {};
8119
8119
  const port = getFlag3(options2, keys2, "port", mustBeValidPortNumber);
@@ -8151,28 +8151,28 @@ is not a problem with esbuild. You need to fix your environment instead.
8151
8151
  sendResponse(id, {});
8152
8152
  };
8153
8153
  }
8154
- resolve41(response2);
8154
+ resolve44(response2);
8155
8155
  });
8156
8156
  }),
8157
- cancel: () => new Promise((resolve41) => {
8158
- if (didDispose) return resolve41();
8157
+ cancel: () => new Promise((resolve44) => {
8158
+ if (didDispose) return resolve44();
8159
8159
  const request22 = {
8160
8160
  command: "cancel",
8161
8161
  key: buildKey
8162
8162
  };
8163
8163
  sendRequest(refs3, request22, () => {
8164
- resolve41();
8164
+ resolve44();
8165
8165
  });
8166
8166
  }),
8167
- dispose: () => new Promise((resolve41) => {
8168
- if (didDispose) return resolve41();
8167
+ dispose: () => new Promise((resolve44) => {
8168
+ if (didDispose) return resolve44();
8169
8169
  didDispose = true;
8170
8170
  const request22 = {
8171
8171
  command: "dispose",
8172
8172
  key: buildKey
8173
8173
  };
8174
8174
  sendRequest(refs3, request22, () => {
8175
- resolve41();
8175
+ resolve44();
8176
8176
  scheduleOnDisposeCallbacks();
8177
8177
  refs3.unref();
8178
8178
  });
@@ -8211,7 +8211,7 @@ is not a problem with esbuild. You need to fix your environment instead.
8211
8211
  onLoad: []
8212
8212
  };
8213
8213
  i++;
8214
- let resolve41 = (path33, options = {}) => {
8214
+ let resolve44 = (path33, options = {}) => {
8215
8215
  if (!isSetupDone) throw new Error('Cannot call "resolve" before plugin setup has completed');
8216
8216
  if (typeof path33 !== "string") throw new Error(`The path to resolve must be a string`);
8217
8217
  let keys22 = /* @__PURE__ */ Object.create(null);
@@ -8255,7 +8255,7 @@ is not a problem with esbuild. You need to fix your environment instead.
8255
8255
  };
8256
8256
  let promise = setup({
8257
8257
  initialOptions,
8258
- resolve: resolve41,
8258
+ resolve: resolve44,
8259
8259
  onStart(callback) {
8260
8260
  let registeredText = `This error came from the "onStart" callback registered here:`;
8261
8261
  let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onStart");
@@ -9133,46 +9133,46 @@ More information: The file containing the code for esbuild's JavaScript API (${_
9133
9133
  }
9134
9134
  };
9135
9135
  longLivedService = {
9136
- build: (options) => new Promise((resolve41, reject) => {
9136
+ build: (options) => new Promise((resolve44, reject) => {
9137
9137
  service.buildOrContext({
9138
9138
  callName: "build",
9139
9139
  refs: refs3,
9140
9140
  options,
9141
9141
  isTTY: isTTY(),
9142
9142
  defaultWD,
9143
- callback: (err, res) => err ? reject(err) : resolve41(res)
9143
+ callback: (err, res) => err ? reject(err) : resolve44(res)
9144
9144
  });
9145
9145
  }),
9146
- context: (options) => new Promise((resolve41, reject) => service.buildOrContext({
9146
+ context: (options) => new Promise((resolve44, reject) => service.buildOrContext({
9147
9147
  callName: "context",
9148
9148
  refs: refs3,
9149
9149
  options,
9150
9150
  isTTY: isTTY(),
9151
9151
  defaultWD,
9152
- callback: (err, res) => err ? reject(err) : resolve41(res)
9152
+ callback: (err, res) => err ? reject(err) : resolve44(res)
9153
9153
  })),
9154
- transform: (input3, options) => new Promise((resolve41, reject) => service.transform({
9154
+ transform: (input3, options) => new Promise((resolve44, reject) => service.transform({
9155
9155
  callName: "transform",
9156
9156
  refs: refs3,
9157
9157
  input: input3,
9158
9158
  options: options || {},
9159
9159
  isTTY: isTTY(),
9160
9160
  fs: fsAsync,
9161
- callback: (err, res) => err ? reject(err) : resolve41(res)
9161
+ callback: (err, res) => err ? reject(err) : resolve44(res)
9162
9162
  })),
9163
- formatMessages: (messages, options) => new Promise((resolve41, reject) => service.formatMessages({
9163
+ formatMessages: (messages, options) => new Promise((resolve44, reject) => service.formatMessages({
9164
9164
  callName: "formatMessages",
9165
9165
  refs: refs3,
9166
9166
  messages,
9167
9167
  options,
9168
- callback: (err, res) => err ? reject(err) : resolve41(res)
9168
+ callback: (err, res) => err ? reject(err) : resolve44(res)
9169
9169
  })),
9170
- analyzeMetafile: (metafile, options) => new Promise((resolve41, reject) => service.analyzeMetafile({
9170
+ analyzeMetafile: (metafile, options) => new Promise((resolve44, reject) => service.analyzeMetafile({
9171
9171
  callName: "analyzeMetafile",
9172
9172
  refs: refs3,
9173
9173
  metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile),
9174
9174
  options,
9175
- callback: (err, res) => err ? reject(err) : resolve41(res)
9175
+ callback: (err, res) => err ? reject(err) : resolve44(res)
9176
9176
  }))
9177
9177
  };
9178
9178
  return longLivedService;
@@ -9250,13 +9250,13 @@ error: ${text}`);
9250
9250
  worker.postMessage(msg);
9251
9251
  let status = Atomics.wait(sharedBufferView, 0, 0);
9252
9252
  if (status !== "ok" && status !== "not-equal") throw new Error("Internal error: Atomics.wait() failed: " + status);
9253
- let { message: { id: id2, resolve: resolve41, reject, properties } } = worker_threads2.receiveMessageOnPort(mainPort);
9253
+ let { message: { id: id2, resolve: resolve44, reject, properties } } = worker_threads2.receiveMessageOnPort(mainPort);
9254
9254
  if (id !== id2) throw new Error(`Internal error: Expected id ${id} but got id ${id2}`);
9255
9255
  if (reject) {
9256
9256
  applyProperties(reject, properties);
9257
9257
  throw reject;
9258
9258
  }
9259
- return resolve41;
9259
+ return resolve44;
9260
9260
  };
9261
9261
  worker.unref();
9262
9262
  return {
@@ -12904,7 +12904,7 @@ var require_previous_map = __commonJS({
12904
12904
  "../../node_modules/.pnpm/postcss@8.5.6/node_modules/postcss/lib/previous-map.js"(exports, module) {
12905
12905
  "use strict";
12906
12906
  var { existsSync: existsSync38, readFileSync: readFileSync11 } = __require("fs");
12907
- var { dirname: dirname25, join: join23 } = __require("path");
12907
+ var { dirname: dirname26, join: join23 } = __require("path");
12908
12908
  var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
12909
12909
  function fromBase64(str) {
12910
12910
  if (Buffer) {
@@ -12923,7 +12923,7 @@ var require_previous_map = __commonJS({
12923
12923
  if (!this.mapFile && opts.from) {
12924
12924
  this.mapFile = opts.from;
12925
12925
  }
12926
- if (this.mapFile) this.root = dirname25(this.mapFile);
12926
+ if (this.mapFile) this.root = dirname26(this.mapFile);
12927
12927
  if (text) this.text = text;
12928
12928
  }
12929
12929
  consumer() {
@@ -12965,7 +12965,7 @@ var require_previous_map = __commonJS({
12965
12965
  }
12966
12966
  }
12967
12967
  loadFile(path14) {
12968
- this.root = dirname25(path14);
12968
+ this.root = dirname26(path14);
12969
12969
  if (existsSync38(path14)) {
12970
12970
  this.mapFile = path14;
12971
12971
  return readFileSync11(path14, "utf-8").toString().trim();
@@ -13002,7 +13002,7 @@ var require_previous_map = __commonJS({
13002
13002
  return this.decodeInline(this.annotation);
13003
13003
  } else if (this.annotation) {
13004
13004
  let map3 = this.annotation;
13005
- if (file) map3 = join23(dirname25(file), map3);
13005
+ if (file) map3 = join23(dirname26(file), map3);
13006
13006
  return this.loadFile(map3);
13007
13007
  }
13008
13008
  }
@@ -13024,7 +13024,7 @@ var require_input = __commonJS({
13024
13024
  "../../node_modules/.pnpm/postcss@8.5.6/node_modules/postcss/lib/input.js"(exports, module) {
13025
13025
  "use strict";
13026
13026
  var { nanoid } = require_non_secure();
13027
- var { isAbsolute: isAbsolute5, resolve: resolve41 } = __require("path");
13027
+ var { isAbsolute: isAbsolute5, resolve: resolve44 } = __require("path");
13028
13028
  var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
13029
13029
  var { fileURLToPath: fileURLToPath6, pathToFileURL } = __require("url");
13030
13030
  var CssSyntaxError2 = require_css_syntax_error();
@@ -13032,7 +13032,7 @@ var require_input = __commonJS({
13032
13032
  var terminalHighlight = require_terminal_highlight();
13033
13033
  var lineToIndexCache = /* @__PURE__ */ Symbol("lineToIndexCache");
13034
13034
  var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
13035
- var pathAvailable = Boolean(resolve41 && isAbsolute5);
13035
+ var pathAvailable = Boolean(resolve44 && isAbsolute5);
13036
13036
  function getLineToIndex(input3) {
13037
13037
  if (input3[lineToIndexCache]) return input3[lineToIndexCache];
13038
13038
  let lines = input3.css.split("\n");
@@ -13066,7 +13066,7 @@ var require_input = __commonJS({
13066
13066
  if (!pathAvailable || /^\w+:\/\//.test(opts.from) || isAbsolute5(opts.from)) {
13067
13067
  this.file = opts.from;
13068
13068
  } else {
13069
- this.file = resolve41(opts.from);
13069
+ this.file = resolve44(opts.from);
13070
13070
  }
13071
13071
  }
13072
13072
  if (pathAvailable && sourceMapAvailable) {
@@ -13179,7 +13179,7 @@ var require_input = __commonJS({
13179
13179
  if (/^\w+:\/\//.test(file)) {
13180
13180
  return file;
13181
13181
  }
13182
- return resolve41(this.map.consumer().sourceRoot || this.map.root || ".", file);
13182
+ return resolve44(this.map.consumer().sourceRoot || this.map.root || ".", file);
13183
13183
  }
13184
13184
  origin(line, column, endLine, endColumn) {
13185
13185
  if (!this.map) return false;
@@ -13438,12 +13438,12 @@ var require_fromJSON = __commonJS({
13438
13438
  var require_map_generator = __commonJS({
13439
13439
  "../../node_modules/.pnpm/postcss@8.5.6/node_modules/postcss/lib/map-generator.js"(exports, module) {
13440
13440
  "use strict";
13441
- var { dirname: dirname25, relative: relative8, resolve: resolve41, sep } = __require("path");
13441
+ var { dirname: dirname26, relative: relative8, resolve: resolve44, sep } = __require("path");
13442
13442
  var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
13443
13443
  var { pathToFileURL } = __require("url");
13444
13444
  var Input2 = require_input();
13445
13445
  var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
13446
- var pathAvailable = Boolean(dirname25 && resolve41 && relative8 && sep);
13446
+ var pathAvailable = Boolean(dirname26 && resolve44 && relative8 && sep);
13447
13447
  var MapGenerator = class {
13448
13448
  constructor(stringify5, root2, opts, cssString) {
13449
13449
  this.stringify = stringify5;
@@ -13475,7 +13475,7 @@ var require_map_generator = __commonJS({
13475
13475
  applyPrevMaps() {
13476
13476
  for (let prev of this.previous()) {
13477
13477
  let from3 = this.toUrl(this.path(prev.file));
13478
- let root2 = prev.root || dirname25(prev.file);
13478
+ let root2 = prev.root || dirname26(prev.file);
13479
13479
  let map3;
13480
13480
  if (this.mapOpts.sourcesContent === false) {
13481
13481
  map3 = new SourceMapConsumer(prev.text);
@@ -13662,9 +13662,9 @@ var require_map_generator = __commonJS({
13662
13662
  if (/^\w+:\/\//.test(file)) return file;
13663
13663
  let cached = this.memoizedPaths.get(file);
13664
13664
  if (cached) return cached;
13665
- let from3 = this.opts.to ? dirname25(this.opts.to) : ".";
13665
+ let from3 = this.opts.to ? dirname26(this.opts.to) : ".";
13666
13666
  if (typeof this.mapOpts.annotation === "string") {
13667
- from3 = dirname25(resolve41(from3, this.mapOpts.annotation));
13667
+ from3 = dirname26(resolve44(from3, this.mapOpts.annotation));
13668
13668
  }
13669
13669
  let path14 = relative8(from3, file);
13670
13670
  this.memoizedPaths.set(file, path14);
@@ -15190,11 +15190,11 @@ function __extends(d, b) {
15190
15190
  }
15191
15191
  function __awaiter(thisArg, _arguments, P, generator) {
15192
15192
  function adopt(value) {
15193
- return value instanceof P ? value : new P(function(resolve41) {
15194
- resolve41(value);
15193
+ return value instanceof P ? value : new P(function(resolve44) {
15194
+ resolve44(value);
15195
15195
  });
15196
15196
  }
15197
- return new (P || (P = Promise))(function(resolve41, reject) {
15197
+ return new (P || (P = Promise))(function(resolve44, reject) {
15198
15198
  function fulfilled(value) {
15199
15199
  try {
15200
15200
  step(generator.next(value));
@@ -15210,7 +15210,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
15210
15210
  }
15211
15211
  }
15212
15212
  function step(result) {
15213
- result.done ? resolve41(result.value) : adopt(result.value).then(fulfilled, rejected);
15213
+ result.done ? resolve44(result.value) : adopt(result.value).then(fulfilled, rejected);
15214
15214
  }
15215
15215
  step((generator = generator.apply(thisArg, _arguments || [])).next());
15216
15216
  });
@@ -15373,14 +15373,14 @@ function __asyncValues(o) {
15373
15373
  }, i);
15374
15374
  function verb(n) {
15375
15375
  i[n] = o[n] && function(v) {
15376
- return new Promise(function(resolve41, reject) {
15377
- v = o[n](v), settle(resolve41, reject, v.done, v.value);
15376
+ return new Promise(function(resolve44, reject) {
15377
+ v = o[n](v), settle(resolve44, reject, v.done, v.value);
15378
15378
  });
15379
15379
  };
15380
15380
  }
15381
- function settle(resolve41, reject, d, v) {
15381
+ function settle(resolve44, reject, d, v) {
15382
15382
  Promise.resolve(v).then(function(v2) {
15383
- resolve41({ value: v2, done: d });
15383
+ resolve44({ value: v2, done: d });
15384
15384
  }, reject);
15385
15385
  }
15386
15386
  }
@@ -15905,7 +15905,7 @@ function of() {
15905
15905
  }
15906
15906
  function lastValueFrom(source3, config22) {
15907
15907
  var hasConfig = typeof config22 === "object";
15908
- return new Promise(function(resolve41, reject) {
15908
+ return new Promise(function(resolve44, reject) {
15909
15909
  var _hasValue = false;
15910
15910
  var _value;
15911
15911
  source3.subscribe({
@@ -15916,9 +15916,9 @@ function lastValueFrom(source3, config22) {
15916
15916
  error: reject,
15917
15917
  complete: function() {
15918
15918
  if (_hasValue) {
15919
- resolve41(_value);
15919
+ resolve44(_value);
15920
15920
  } else if (hasConfig) {
15921
- resolve41(config22.defaultValue);
15921
+ resolve44(config22.defaultValue);
15922
15922
  } else {
15923
15923
  reject(new EmptyError());
15924
15924
  }
@@ -15928,16 +15928,16 @@ function lastValueFrom(source3, config22) {
15928
15928
  }
15929
15929
  function firstValueFrom(source3, config22) {
15930
15930
  var hasConfig = typeof config22 === "object";
15931
- return new Promise(function(resolve41, reject) {
15931
+ return new Promise(function(resolve44, reject) {
15932
15932
  var subscriber = new SafeSubscriber({
15933
15933
  next: function(value) {
15934
- resolve41(value);
15934
+ resolve44(value);
15935
15935
  subscriber.unsubscribe();
15936
15936
  },
15937
15937
  error: reject,
15938
15938
  complete: function() {
15939
15939
  if (hasConfig) {
15940
- resolve41(config22.defaultValue);
15940
+ resolve44(config22.defaultValue);
15941
15941
  } else {
15942
15942
  reject(new EmptyError());
15943
15943
  }
@@ -16976,7 +16976,7 @@ var init_rxjs = __esm({
16976
16976
  Observable22.prototype.forEach = function(next, promiseCtor) {
16977
16977
  var _this = this;
16978
16978
  promiseCtor = getPromiseCtor(promiseCtor);
16979
- return new promiseCtor(function(resolve41, reject) {
16979
+ return new promiseCtor(function(resolve44, reject) {
16980
16980
  var subscriber = new SafeSubscriber({
16981
16981
  next: function(value) {
16982
16982
  try {
@@ -16987,7 +16987,7 @@ var init_rxjs = __esm({
16987
16987
  }
16988
16988
  },
16989
16989
  error: reject,
16990
- complete: resolve41
16990
+ complete: resolve44
16991
16991
  });
16992
16992
  _this.subscribe(subscriber);
16993
16993
  });
@@ -17009,14 +17009,14 @@ var init_rxjs = __esm({
17009
17009
  Observable22.prototype.toPromise = function(promiseCtor) {
17010
17010
  var _this = this;
17011
17011
  promiseCtor = getPromiseCtor(promiseCtor);
17012
- return new promiseCtor(function(resolve41, reject) {
17012
+ return new promiseCtor(function(resolve44, reject) {
17013
17013
  var value;
17014
17014
  _this.subscribe(function(x) {
17015
17015
  return value = x;
17016
17016
  }, function(err) {
17017
17017
  return reject(err);
17018
17018
  }, function() {
17019
- return resolve41(value);
17019
+ return resolve44(value);
17020
17020
  });
17021
17021
  });
17022
17022
  };
@@ -19434,8 +19434,8 @@ var init_Deferred = __esm({
19434
19434
  // SAFETY: This is ensured by #taskPromise.
19435
19435
  #resolve;
19436
19436
  // TODO: Switch to Promise.withResolvers with Node 22
19437
- #taskPromise = new Promise((resolve41) => {
19438
- this.#resolve = resolve41;
19437
+ #taskPromise = new Promise((resolve44) => {
19438
+ this.#resolve = resolve44;
19439
19439
  });
19440
19440
  #timeoutId;
19441
19441
  #timeoutError;
@@ -19525,12 +19525,12 @@ var init_Mutex = __esm({
19525
19525
  return new _Mutex.Guard(this, onRelease);
19526
19526
  }
19527
19527
  release() {
19528
- const resolve41 = this.#acquirers.shift();
19529
- if (!resolve41) {
19528
+ const resolve44 = this.#acquirers.shift();
19529
+ if (!resolve44) {
19530
19530
  this.#locked = false;
19531
19531
  return;
19532
19532
  }
19533
- resolve41();
19533
+ resolve44();
19534
19534
  }
19535
19535
  };
19536
19536
  }
@@ -21545,12 +21545,12 @@ var init_locators = __esm({
21545
21545
  }
21546
21546
  return defer(() => {
21547
21547
  return from(handle.evaluate((element) => {
21548
- return new Promise((resolve41) => {
21548
+ return new Promise((resolve44) => {
21549
21549
  window.requestAnimationFrame(() => {
21550
21550
  const rect1 = element.getBoundingClientRect();
21551
21551
  window.requestAnimationFrame(() => {
21552
21552
  const rect2 = element.getBoundingClientRect();
21553
- resolve41([
21553
+ resolve44([
21554
21554
  {
21555
21555
  x: rect1.x,
21556
21556
  y: rect1.y,
@@ -23289,9 +23289,9 @@ var init_ElementHandle = __esm({
23289
23289
  const handle = await this.#asSVGElementHandle();
23290
23290
  const target = __addDisposableResource6(env_5, handle && await handle.#getOwnerSVGElement(), false);
23291
23291
  return await (target ?? this).evaluate(async (element, threshold) => {
23292
- const visibleRatio = await new Promise((resolve41) => {
23292
+ const visibleRatio = await new Promise((resolve44) => {
23293
23293
  const observer = new IntersectionObserver((entries2) => {
23294
- resolve41(entries2[0].intersectionRatio);
23294
+ resolve44(entries2[0].intersectionRatio);
23295
23295
  observer.disconnect();
23296
23296
  });
23297
23297
  observer.observe(element);
@@ -23984,7 +23984,7 @@ var init_Frame = __esm({
23984
23984
  }
23985
23985
  type = type ?? "text/javascript";
23986
23986
  return await this.mainRealm().transferHandle(await this.isolatedRealm().evaluateHandle(async ({ url, id, type: type2, content: content2 }) => {
23987
- return await new Promise((resolve41, reject) => {
23987
+ return await new Promise((resolve44, reject) => {
23988
23988
  const script = document.createElement("script");
23989
23989
  script.type = type2;
23990
23990
  script.text = content2;
@@ -23997,12 +23997,12 @@ var init_Frame = __esm({
23997
23997
  if (url) {
23998
23998
  script.src = url;
23999
23999
  script.addEventListener("load", () => {
24000
- resolve41(script);
24000
+ resolve44(script);
24001
24001
  }, { once: true });
24002
24002
  document.head.appendChild(script);
24003
24003
  } else {
24004
24004
  document.head.appendChild(script);
24005
- resolve41(script);
24005
+ resolve44(script);
24006
24006
  }
24007
24007
  });
24008
24008
  }, { ...options, type, content }));
@@ -24022,7 +24022,7 @@ var init_Frame = __esm({
24022
24022
  options.content = content;
24023
24023
  }
24024
24024
  return await this.mainRealm().transferHandle(await this.isolatedRealm().evaluateHandle(async ({ url, content: content2 }) => {
24025
- return await new Promise((resolve41, reject) => {
24025
+ return await new Promise((resolve44, reject) => {
24026
24026
  let element;
24027
24027
  if (!url) {
24028
24028
  element = document.createElement("style");
@@ -24034,7 +24034,7 @@ var init_Frame = __esm({
24034
24034
  element = link;
24035
24035
  }
24036
24036
  element.addEventListener("load", () => {
24037
- resolve41(element);
24037
+ resolve44(element);
24038
24038
  }, { once: true });
24039
24039
  element.addEventListener("error", (event) => {
24040
24040
  reject(new Error(event.message ?? "Could not load style"));
@@ -25773,9 +25773,9 @@ var init_Page = __esm({
25773
25773
  ++this.#screencastSessionCount;
25774
25774
  if (!this.#startScreencastPromise) {
25775
25775
  this.#startScreencastPromise = this.mainFrame().client.send("Page.startScreencast", { format: "png" }).then(() => {
25776
- return new Promise((resolve41) => {
25776
+ return new Promise((resolve44) => {
25777
25777
  return this.mainFrame().client.once("Page.screencastFrame", () => {
25778
- return resolve41();
25778
+ return resolve44();
25779
25779
  });
25780
25780
  });
25781
25781
  });
@@ -29164,11 +29164,11 @@ function addPageBinding(type, name, prefix) {
29164
29164
  return value instanceof Node;
29165
29165
  })
29166
29166
  }));
29167
- return new Promise((resolve41, reject) => {
29167
+ return new Promise((resolve44, reject) => {
29168
29168
  callPuppeteer.callbacks.set(seq, {
29169
29169
  resolve(value) {
29170
29170
  callPuppeteer.args.delete(seq);
29171
- resolve41(value);
29171
+ resolve44(value);
29172
29172
  },
29173
29173
  reject(value) {
29174
29174
  callPuppeteer.args.delete(seq);
@@ -33007,8 +33007,8 @@ var init_Input2 = __esm({
33007
33007
  if (typeof delay === "number") {
33008
33008
  await Promise.all(actions);
33009
33009
  actions.length = 0;
33010
- await new Promise((resolve41) => {
33011
- setTimeout(resolve41, delay);
33010
+ await new Promise((resolve44) => {
33011
+ setTimeout(resolve44, delay);
33012
33012
  });
33013
33013
  }
33014
33014
  actions.push(this.up({ ...options, clickCount }));
@@ -33028,9 +33028,9 @@ var init_Input2 = __esm({
33028
33028
  });
33029
33029
  }
33030
33030
  async drag(start, target) {
33031
- const promise = new Promise((resolve41) => {
33031
+ const promise = new Promise((resolve44) => {
33032
33032
  this.#client.once("Input.dragIntercepted", (event) => {
33033
- return resolve41(event.data);
33033
+ return resolve44(event.data);
33034
33034
  });
33035
33035
  });
33036
33036
  await this.move(start.x, start.y);
@@ -33071,8 +33071,8 @@ var init_Input2 = __esm({
33071
33071
  await this.dragEnter(target, data);
33072
33072
  await this.dragOver(target, data);
33073
33073
  if (delay) {
33074
- await new Promise((resolve41) => {
33075
- return setTimeout(resolve41, delay);
33074
+ await new Promise((resolve44) => {
33075
+ return setTimeout(resolve44, delay);
33076
33076
  });
33077
33077
  }
33078
33078
  await this.drop(target, data);
@@ -33333,11 +33333,11 @@ var init_WebMCP = __esm({
33333
33333
  */
33334
33334
  async execute(input3 = {}) {
33335
33335
  const { invocationId } = await this.#webmcp.invokeTool(this, input3);
33336
- return await new Promise((resolve41) => {
33336
+ return await new Promise((resolve44) => {
33337
33337
  const handler4 = (event) => {
33338
33338
  if (event.id === invocationId) {
33339
33339
  this.#webmcp.off("toolresponded", handler4);
33340
- resolve41(event);
33340
+ resolve44(event);
33341
33341
  }
33342
33342
  };
33343
33343
  this.#webmcp.on("toolresponded", handler4);
@@ -34145,9 +34145,9 @@ var init_Page2 = __esm({
34145
34145
  async captureHeapSnapshot(options) {
34146
34146
  const { createWriteStream: createWriteStream3 } = environment.value.fs;
34147
34147
  const stream = createWriteStream3(options.path);
34148
- const streamPromise = new Promise((resolve41, reject) => {
34148
+ const streamPromise = new Promise((resolve44, reject) => {
34149
34149
  stream.on("error", reject);
34150
- stream.on("finish", resolve41);
34150
+ stream.on("finish", resolve44);
34151
34151
  });
34152
34152
  const client = this.#primaryTargetClient;
34153
34153
  await client.send("HeapProfiler.enable");
@@ -35513,12 +35513,12 @@ var init_Browser2 = __esm({
35513
35513
  for (const [targetId, targetInfo] of this._targetManager().getDiscoveredTargetInfos().entries()) {
35514
35514
  if (targetInfo.url.includes(id) && targetInfo.type === "service_worker") {
35515
35515
  this._targetManager().addToIgnoreTarget(targetId);
35516
- targetDestroyedPromises.push(new Promise((resolve41) => {
35516
+ targetDestroyedPromises.push(new Promise((resolve44) => {
35517
35517
  return setTimeout(() => {
35518
35518
  this.#connection.emit("Target.targetDestroyed", {
35519
35519
  targetId
35520
35520
  });
35521
- resolve41(null);
35521
+ resolve44(null);
35522
35522
  }, 0);
35523
35523
  }));
35524
35524
  }
@@ -35921,10 +35921,10 @@ var init_BrowserWebSocketTransport = __esm({
35921
35921
  "../../node_modules/.pnpm/puppeteer-core@24.41.0/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserWebSocketTransport.js"() {
35922
35922
  BrowserWebSocketTransport = class _BrowserWebSocketTransport {
35923
35923
  static create(url) {
35924
- return new Promise((resolve41, reject) => {
35924
+ return new Promise((resolve44, reject) => {
35925
35925
  const ws = new WebSocket(url);
35926
35926
  ws.addEventListener("open", () => {
35927
- return resolve41(new _BrowserWebSocketTransport(ws));
35927
+ return resolve44(new _BrowserWebSocketTransport(ws));
35928
35928
  });
35929
35929
  ws.addEventListener("error", reject);
35930
35930
  });
@@ -38846,11 +38846,11 @@ var require_BrowsingContextProcessor = __commonJS({
38846
38846
  }
38847
38847
  const parentCdpClient = context3.cdpTarget.parentCdpClient;
38848
38848
  try {
38849
- const detachedFromTargetPromise = new Promise((resolve41) => {
38849
+ const detachedFromTargetPromise = new Promise((resolve44) => {
38850
38850
  const onContextDestroyed = (event) => {
38851
38851
  if (event.targetId === params.context) {
38852
38852
  parentCdpClient.off("Target.detachedFromTarget", onContextDestroyed);
38853
- resolve41();
38853
+ resolve44();
38854
38854
  }
38855
38855
  };
38856
38856
  parentCdpClient.on("Target.detachedFromTarget", onContextDestroyed);
@@ -40213,7 +40213,7 @@ var require_ActionDispatcher = __commonJS({
40213
40213
  }
40214
40214
  }
40215
40215
  const promises = [
40216
- new Promise((resolve41) => setTimeout(resolve41, this.#tickDuration))
40216
+ new Promise((resolve44) => setTimeout(resolve44, this.#tickDuration))
40217
40217
  ];
40218
40218
  for (const option of options) {
40219
40219
  promises.push(this.#dispatchAction(option));
@@ -40814,8 +40814,8 @@ var require_Mutex = __commonJS({
40814
40814
  acquire() {
40815
40815
  const state = { resolved: false };
40816
40816
  if (this.#locked) {
40817
- return new Promise((resolve41) => {
40818
- this.#acquirers.push(() => resolve41(this.#release.bind(this, state)));
40817
+ return new Promise((resolve44) => {
40818
+ this.#acquirers.push(() => resolve44(this.#release.bind(this, state)));
40819
40819
  });
40820
40820
  }
40821
40821
  this.#locked = true;
@@ -40826,12 +40826,12 @@ var require_Mutex = __commonJS({
40826
40826
  throw new Error("Cannot release more than once.");
40827
40827
  }
40828
40828
  state.resolved = true;
40829
- const resolve41 = this.#acquirers.shift();
40830
- if (!resolve41) {
40829
+ const resolve44 = this.#acquirers.shift();
40830
+ if (!resolve44) {
40831
40831
  this.#locked = false;
40832
40832
  return;
40833
40833
  }
40834
- resolve41();
40834
+ resolve44();
40835
40835
  }
40836
40836
  async run(action) {
40837
40837
  const release = await this.acquire();
@@ -42013,8 +42013,8 @@ var require_ChannelProxy = __commonJS({
42013
42013
  * in the queue.
42014
42014
  */
42015
42015
  async getMessage() {
42016
- const onMessage = queue.length > 0 ? Promise.resolve() : new Promise((resolve41) => {
42017
- queueNonEmptyResolver = resolve41;
42016
+ const onMessage = queue.length > 0 ? Promise.resolve() : new Promise((resolve44) => {
42017
+ queueNonEmptyResolver = resolve44;
42018
42018
  });
42019
42019
  await onMessage;
42020
42020
  return queue.shift();
@@ -42119,7 +42119,7 @@ var require_ChannelProxy = __commonJS({
42119
42119
  functionDeclaration: String((id) => {
42120
42120
  const w = window;
42121
42121
  if (w[id] === void 0) {
42122
- return new Promise((resolve41) => w[id] = resolve41);
42122
+ return new Promise((resolve44) => w[id] = resolve44);
42123
42123
  }
42124
42124
  const channelProxy = w[id];
42125
42125
  delete w[id];
@@ -43620,8 +43620,8 @@ var require_Deferred = __commonJS({
43620
43620
  return this.#result;
43621
43621
  }
43622
43622
  constructor() {
43623
- this.#promise = new Promise((resolve41, reject) => {
43624
- this.#resolve = resolve41;
43623
+ this.#promise = new Promise((resolve44, reject) => {
43624
+ this.#resolve = resolve44;
43625
43625
  this.#reject = reject;
43626
43626
  });
43627
43627
  this.#promise.catch((_error) => {
@@ -48465,11 +48465,11 @@ var require_BrowsingContextStorage = __commonJS({
48465
48465
  if (this.#contexts.has(browsingContextId)) {
48466
48466
  return Promise.resolve(this.getContext(browsingContextId));
48467
48467
  }
48468
- return new Promise((resolve41) => {
48468
+ return new Promise((resolve44) => {
48469
48469
  const listener = (event) => {
48470
48470
  if (event.browsingContext.id === browsingContextId) {
48471
48471
  this.#eventEmitter.off("added", listener);
48472
- resolve41(event.browsingContext);
48472
+ resolve44(event.browsingContext);
48473
48473
  }
48474
48474
  };
48475
48475
  this.#eventEmitter.on("added", listener);
@@ -52069,8 +52069,8 @@ var init_ExposedFunction = __esm({
52069
52069
  const functionDeclaration = stringifyFunction(interpolateFunction((callback) => {
52070
52070
  Object.assign(globalThis, {
52071
52071
  [PLACEHOLDER("name")]: function(...args) {
52072
- return new Promise((resolve41, reject) => {
52073
- callback([resolve41, reject, args]);
52072
+ return new Promise((resolve44, reject) => {
52073
+ callback([resolve44, reject, args]);
52074
52074
  });
52075
52075
  }
52076
52076
  });
@@ -52158,8 +52158,8 @@ var init_ExposedFunction = __esm({
52158
52158
  return;
52159
52159
  }
52160
52160
  try {
52161
- await dataHandle.evaluate(([resolve41], result2) => {
52162
- resolve41(result2);
52161
+ await dataHandle.evaluate(([resolve44], result2) => {
52162
+ resolve44(result2);
52163
52163
  }, result);
52164
52164
  } catch (error) {
52165
52165
  debugError(error);
@@ -60301,7 +60301,7 @@ var init_NodeWebSocketTransport = __esm({
60301
60301
  init_version();
60302
60302
  NodeWebSocketTransport = class _NodeWebSocketTransport {
60303
60303
  static create(url, headers) {
60304
- return new Promise((resolve41, reject) => {
60304
+ return new Promise((resolve44, reject) => {
60305
60305
  const ws = new wrapper_default(url, [], {
60306
60306
  followRedirects: true,
60307
60307
  perMessageDeflate: false,
@@ -60314,7 +60314,7 @@ var init_NodeWebSocketTransport = __esm({
60314
60314
  }
60315
60315
  });
60316
60316
  ws.addEventListener("open", () => {
60317
- return resolve41(new _NodeWebSocketTransport(ws));
60317
+ return resolve44(new _NodeWebSocketTransport(ws));
60318
60318
  });
60319
60319
  ws.addEventListener("error", reject);
60320
60320
  });
@@ -63375,8 +63375,8 @@ var require_helpers = __commonJS({
63375
63375
  function req(url, opts = {}) {
63376
63376
  const href = typeof url === "string" ? url : url.href;
63377
63377
  const req2 = (href.startsWith("https:") ? https3 : http3).request(url, opts);
63378
- const promise = new Promise((resolve41, reject) => {
63379
- req2.once("response", resolve41).once("error", reject).end();
63378
+ const promise = new Promise((resolve44, reject) => {
63379
+ req2.once("response", resolve44).once("error", reject).end();
63380
63380
  });
63381
63381
  req2.then = promise.then.bind(promise);
63382
63382
  return req2;
@@ -63753,7 +63753,7 @@ var require_parse_proxy_response = __commonJS({
63753
63753
  var debug_1 = __importDefault3(require_src());
63754
63754
  var debug7 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
63755
63755
  function parseProxyResponse(socket) {
63756
- return new Promise((resolve41, reject) => {
63756
+ return new Promise((resolve44, reject) => {
63757
63757
  let buffersLength = 0;
63758
63758
  const buffers = [];
63759
63759
  function read() {
@@ -63819,7 +63819,7 @@ var require_parse_proxy_response = __commonJS({
63819
63819
  }
63820
63820
  debug7("got proxy server response: %o %o", firstLine, headers);
63821
63821
  cleanup();
63822
- resolve41({
63822
+ resolve44({
63823
63823
  connect: {
63824
63824
  statusCode,
63825
63825
  statusText,
@@ -67077,11 +67077,11 @@ var require_socksclient = __commonJS({
67077
67077
  "use strict";
67078
67078
  var __awaiter4 = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
67079
67079
  function adopt(value) {
67080
- return value instanceof P ? value : new P(function(resolve41) {
67081
- resolve41(value);
67080
+ return value instanceof P ? value : new P(function(resolve44) {
67081
+ resolve44(value);
67082
67082
  });
67083
67083
  }
67084
- return new (P || (P = Promise))(function(resolve41, reject) {
67084
+ return new (P || (P = Promise))(function(resolve44, reject) {
67085
67085
  function fulfilled(value) {
67086
67086
  try {
67087
67087
  step(generator.next(value));
@@ -67097,7 +67097,7 @@ var require_socksclient = __commonJS({
67097
67097
  }
67098
67098
  }
67099
67099
  function step(result) {
67100
- result.done ? resolve41(result.value) : adopt(result.value).then(fulfilled, rejected);
67100
+ result.done ? resolve44(result.value) : adopt(result.value).then(fulfilled, rejected);
67101
67101
  }
67102
67102
  step((generator = generator.apply(thisArg, _arguments || [])).next());
67103
67103
  });
@@ -67131,13 +67131,13 @@ var require_socksclient = __commonJS({
67131
67131
  * @returns { Promise }
67132
67132
  */
67133
67133
  static createConnection(options, callback) {
67134
- return new Promise((resolve41, reject) => {
67134
+ return new Promise((resolve44, reject) => {
67135
67135
  try {
67136
67136
  (0, helpers_1.validateSocksClientOptions)(options, ["connect"]);
67137
67137
  } catch (err) {
67138
67138
  if (typeof callback === "function") {
67139
67139
  callback(err);
67140
- return resolve41(err);
67140
+ return resolve44(err);
67141
67141
  } else {
67142
67142
  return reject(err);
67143
67143
  }
@@ -67148,16 +67148,16 @@ var require_socksclient = __commonJS({
67148
67148
  client.removeAllListeners();
67149
67149
  if (typeof callback === "function") {
67150
67150
  callback(null, info);
67151
- resolve41(info);
67151
+ resolve44(info);
67152
67152
  } else {
67153
- resolve41(info);
67153
+ resolve44(info);
67154
67154
  }
67155
67155
  });
67156
67156
  client.once("error", (err) => {
67157
67157
  client.removeAllListeners();
67158
67158
  if (typeof callback === "function") {
67159
67159
  callback(err);
67160
- resolve41(err);
67160
+ resolve44(err);
67161
67161
  } else {
67162
67162
  reject(err);
67163
67163
  }
@@ -67174,13 +67174,13 @@ var require_socksclient = __commonJS({
67174
67174
  * @returns { Promise }
67175
67175
  */
67176
67176
  static createConnectionChain(options, callback) {
67177
- return new Promise((resolve41, reject) => __awaiter4(this, void 0, void 0, function* () {
67177
+ return new Promise((resolve44, reject) => __awaiter4(this, void 0, void 0, function* () {
67178
67178
  try {
67179
67179
  (0, helpers_1.validateSocksClientChainOptions)(options);
67180
67180
  } catch (err) {
67181
67181
  if (typeof callback === "function") {
67182
67182
  callback(err);
67183
- return resolve41(err);
67183
+ return resolve44(err);
67184
67184
  } else {
67185
67185
  return reject(err);
67186
67186
  }
@@ -67206,14 +67206,14 @@ var require_socksclient = __commonJS({
67206
67206
  }
67207
67207
  if (typeof callback === "function") {
67208
67208
  callback(null, { socket: sock });
67209
- resolve41({ socket: sock });
67209
+ resolve44({ socket: sock });
67210
67210
  } else {
67211
- resolve41({ socket: sock });
67211
+ resolve44({ socket: sock });
67212
67212
  }
67213
67213
  } catch (err) {
67214
67214
  if (typeof callback === "function") {
67215
67215
  callback(err);
67216
- resolve41(err);
67216
+ resolve44(err);
67217
67217
  } else {
67218
67218
  reject(err);
67219
67219
  }
@@ -67897,12 +67897,12 @@ var require_dist4 = __commonJS({
67897
67897
  let { host } = opts;
67898
67898
  const { port, lookup: lookupFn = dns.lookup } = opts;
67899
67899
  if (shouldLookup) {
67900
- host = await new Promise((resolve41, reject) => {
67900
+ host = await new Promise((resolve44, reject) => {
67901
67901
  lookupFn(host, {}, (err, res) => {
67902
67902
  if (err) {
67903
67903
  reject(err);
67904
67904
  } else {
67905
- resolve41(res);
67905
+ resolve44(res);
67906
67906
  }
67907
67907
  });
67908
67908
  });
@@ -68562,7 +68562,7 @@ var require_netUtils = __commonJS({
68562
68562
  return `${socket.remoteAddress}:${socket.remotePort}`;
68563
68563
  }
68564
68564
  function upgradeSocket(socket, options) {
68565
- return new Promise((resolve41, reject) => {
68565
+ return new Promise((resolve44, reject) => {
68566
68566
  const tlsOptions = Object.assign({}, options, {
68567
68567
  socket
68568
68568
  });
@@ -68572,7 +68572,7 @@ var require_netUtils = __commonJS({
68572
68572
  reject(tlsSocket.authorizationError);
68573
68573
  } else {
68574
68574
  tlsSocket.removeAllListeners("error");
68575
- resolve41(tlsSocket);
68575
+ resolve44(tlsSocket);
68576
68576
  }
68577
68577
  }).once("error", (error) => {
68578
68578
  reject(error);
@@ -69202,7 +69202,7 @@ var require_transfer = __commonJS({
69202
69202
  };
69203
69203
  }
69204
69204
  function connectForPassiveTransfer(host, port, ftp) {
69205
- return new Promise((resolve41, reject) => {
69205
+ return new Promise((resolve44, reject) => {
69206
69206
  let socket = ftp._newSocket();
69207
69207
  const handleConnErr = function(err) {
69208
69208
  err.message = "Can't open data connection in passive mode: " + err.message;
@@ -69230,7 +69230,7 @@ var require_transfer = __commonJS({
69230
69230
  socket.removeListener("error", handleConnErr);
69231
69231
  socket.removeListener("timeout", handleTimeout);
69232
69232
  ftp.dataSocket = socket;
69233
- resolve41();
69233
+ resolve44();
69234
69234
  });
69235
69235
  });
69236
69236
  }
@@ -81702,11 +81702,11 @@ function __metadata(metadataKey, metadataValue) {
81702
81702
  }
81703
81703
  function __awaiter2(thisArg, _arguments, P, generator) {
81704
81704
  function adopt(value) {
81705
- return value instanceof P ? value : new P(function(resolve41) {
81706
- resolve41(value);
81705
+ return value instanceof P ? value : new P(function(resolve44) {
81706
+ resolve44(value);
81707
81707
  });
81708
81708
  }
81709
- return new (P || (P = Promise))(function(resolve41, reject) {
81709
+ return new (P || (P = Promise))(function(resolve44, reject) {
81710
81710
  function fulfilled(value) {
81711
81711
  try {
81712
81712
  step(generator.next(value));
@@ -81722,7 +81722,7 @@ function __awaiter2(thisArg, _arguments, P, generator) {
81722
81722
  }
81723
81723
  }
81724
81724
  function step(result) {
81725
- result.done ? resolve41(result.value) : adopt(result.value).then(fulfilled, rejected);
81725
+ result.done ? resolve44(result.value) : adopt(result.value).then(fulfilled, rejected);
81726
81726
  }
81727
81727
  step((generator = generator.apply(thisArg, _arguments || [])).next());
81728
81728
  });
@@ -81913,14 +81913,14 @@ function __asyncValues2(o) {
81913
81913
  }, i);
81914
81914
  function verb(n) {
81915
81915
  i[n] = o[n] && function(v) {
81916
- return new Promise(function(resolve41, reject) {
81917
- v = o[n](v), settle(resolve41, reject, v.done, v.value);
81916
+ return new Promise(function(resolve44, reject) {
81917
+ v = o[n](v), settle(resolve44, reject, v.done, v.value);
81918
81918
  });
81919
81919
  };
81920
81920
  }
81921
- function settle(resolve41, reject, d, v) {
81921
+ function settle(resolve44, reject, d, v) {
81922
81922
  Promise.resolve(v).then(function(v2) {
81923
- resolve41({ value: v2, done: d });
81923
+ resolve44({ value: v2, done: d });
81924
81924
  }, reject);
81925
81925
  }
81926
81926
  }
@@ -85473,12 +85473,12 @@ var require_util4 = __commonJS({
85473
85473
  exports.isGMT = exports.dnsLookup = void 0;
85474
85474
  var dns_1 = __require("dns");
85475
85475
  function dnsLookup(host, opts) {
85476
- return new Promise((resolve41, reject) => {
85476
+ return new Promise((resolve44, reject) => {
85477
85477
  (0, dns_1.lookup)(host, opts, (err, res) => {
85478
85478
  if (err) {
85479
85479
  reject(err);
85480
85480
  } else {
85481
- resolve41(res);
85481
+ resolve44(res);
85482
85482
  }
85483
85483
  });
85484
85484
  });
@@ -86083,10 +86083,10 @@ var require_myIpAddress = __commonJS({
86083
86083
  var ip_1 = require_ip();
86084
86084
  var net_1 = __importDefault3(__require("net"));
86085
86085
  async function myIpAddress() {
86086
- return new Promise((resolve41, reject) => {
86086
+ return new Promise((resolve44, reject) => {
86087
86087
  const socket = net_1.default.connect({ host: "8.8.8.8", port: 53 });
86088
86088
  const onError = () => {
86089
- resolve41(ip_1.ip.address());
86089
+ resolve44(ip_1.ip.address());
86090
86090
  };
86091
86091
  socket.once("error", onError);
86092
86092
  socket.once("connect", () => {
@@ -86094,9 +86094,9 @@ var require_myIpAddress = __commonJS({
86094
86094
  const addr = socket.address();
86095
86095
  socket.destroy();
86096
86096
  if (typeof addr === "string") {
86097
- resolve41(addr);
86097
+ resolve44(addr);
86098
86098
  } else if (addr.address) {
86099
- resolve41(addr.address);
86099
+ resolve44(addr.address);
86100
86100
  } else {
86101
86101
  reject(new Error("Expected a `string`"));
86102
86102
  }
@@ -86674,8 +86674,8 @@ var require_deferred_promise = __commonJS({
86674
86674
  this.context = args.context;
86675
86675
  this.owner = args.context.runtime;
86676
86676
  this.handle = args.promiseHandle;
86677
- this.settled = new Promise((resolve41) => {
86678
- this.onSettled = resolve41;
86677
+ this.settled = new Promise((resolve44) => {
86678
+ this.onSettled = resolve44;
86679
86679
  });
86680
86680
  this.resolveHandle = args.resolveHandle;
86681
86681
  this.rejectHandle = args.rejectHandle;
@@ -87196,13 +87196,13 @@ var require_context = __commonJS({
87196
87196
  if (vmResolveResult.error) {
87197
87197
  return Promise.resolve(vmResolveResult);
87198
87198
  }
87199
- return new Promise((resolve41) => {
87199
+ return new Promise((resolve44) => {
87200
87200
  lifetime_1.Scope.withScope((scope) => {
87201
87201
  const resolveHandle = scope.manage(this.newFunction("resolve", (value) => {
87202
- resolve41({ value: value && value.dup() });
87202
+ resolve44({ value: value && value.dup() });
87203
87203
  }));
87204
87204
  const rejectHandle = scope.manage(this.newFunction("reject", (error) => {
87205
- resolve41({ error: error && error.dup() });
87205
+ resolve44({ error: error && error.dup() });
87206
87206
  }));
87207
87207
  const promiseHandle = scope.manage(vmResolveResult.value);
87208
87208
  const promiseThenHandle = scope.manage(this.getProp(promiseHandle, "then"));
@@ -89577,13 +89577,13 @@ import * as http from "node:http";
89577
89577
  import * as https from "node:https";
89578
89578
  import { URL as URL2, urlToHttpOptions } from "node:url";
89579
89579
  function headHttpRequest(url) {
89580
- return new Promise((resolve41) => {
89580
+ return new Promise((resolve44) => {
89581
89581
  const request5 = httpRequest(url, "HEAD", (response) => {
89582
89582
  response.resume();
89583
- resolve41(response.statusCode === 200);
89583
+ resolve44(response.statusCode === 200);
89584
89584
  }, false);
89585
89585
  request5.on("error", () => {
89586
- resolve41(false);
89586
+ resolve44(false);
89587
89587
  });
89588
89588
  });
89589
89589
  }
@@ -89611,7 +89611,7 @@ function httpRequest(url, method, response, keepAlive = true) {
89611
89611
  return request5;
89612
89612
  }
89613
89613
  function downloadFile(url, destinationPath, progressCallback) {
89614
- return new Promise((resolve41, reject) => {
89614
+ return new Promise((resolve44, reject) => {
89615
89615
  let downloadedBytes = 0;
89616
89616
  let totalBytes = 0;
89617
89617
  function onData(chunk) {
@@ -89627,7 +89627,7 @@ function downloadFile(url, destinationPath, progressCallback) {
89627
89627
  }
89628
89628
  const file = createWriteStream(destinationPath);
89629
89629
  file.on("close", () => {
89630
- return resolve41();
89630
+ return resolve44();
89631
89631
  });
89632
89632
  file.on("error", (error) => {
89633
89633
  return reject(error);
@@ -89652,7 +89652,7 @@ async function getJSON(url) {
89652
89652
  }
89653
89653
  }
89654
89654
  function getText(url) {
89655
- return new Promise((resolve41, reject) => {
89655
+ return new Promise((resolve44, reject) => {
89656
89656
  const request5 = httpRequest(url, "GET", (response) => {
89657
89657
  let data = "";
89658
89658
  if (response.statusCode && response.statusCode >= 400) {
@@ -89663,7 +89663,7 @@ function getText(url) {
89663
89663
  });
89664
89664
  response.on("end", () => {
89665
89665
  try {
89666
- return resolve41(String(data));
89666
+ return resolve44(String(data));
89667
89667
  } catch {
89668
89668
  return reject(new Error(`Failed to read text response from ${url}`));
89669
89669
  }
@@ -91055,7 +91055,7 @@ var init_launch = __esm({
91055
91055
  if (opts.onExit) {
91056
91056
  this.#onExitHook = opts.onExit;
91057
91057
  }
91058
- this.#browserProcessExiting = new Promise((resolve41, reject) => {
91058
+ this.#browserProcessExiting = new Promise((resolve44, reject) => {
91059
91059
  this.#browserProcess.once("exit", async () => {
91060
91060
  debugLaunch(`Browser process ${this.#browserProcess.pid} onExit`);
91061
91061
  this.#clearListeners();
@@ -91066,7 +91066,7 @@ var init_launch = __esm({
91066
91066
  reject(err);
91067
91067
  return;
91068
91068
  }
91069
- resolve41();
91069
+ resolve44();
91070
91070
  });
91071
91071
  });
91072
91072
  }
@@ -91182,7 +91182,7 @@ Error cause: ${isErrorLike2(error) ? error.stack : error}`);
91182
91182
  return [...this.#logs];
91183
91183
  }
91184
91184
  waitForLineOutput(regex2, timeout3 = 0) {
91185
- return new Promise((resolve41, reject) => {
91185
+ return new Promise((resolve44, reject) => {
91186
91186
  const onClose = (errorOrCode) => {
91187
91187
  cleanup();
91188
91188
  reject(new Error([
@@ -91218,7 +91218,7 @@ Error cause: ${isErrorLike2(error) ? error.stack : error}`);
91218
91218
  return;
91219
91219
  }
91220
91220
  cleanup();
91221
- resolve41(match2[1]);
91221
+ resolve44(match2[1]);
91222
91222
  }
91223
91223
  });
91224
91224
  }
@@ -91687,7 +91687,7 @@ var require_get_stream = __commonJS({
91687
91687
  };
91688
91688
  const { maxBuffer } = options;
91689
91689
  let stream;
91690
- await new Promise((resolve41, reject) => {
91690
+ await new Promise((resolve44, reject) => {
91691
91691
  const rejectPromise = (error) => {
91692
91692
  if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
91693
91693
  error.bufferedData = stream.getBufferedValue();
@@ -91699,7 +91699,7 @@ var require_get_stream = __commonJS({
91699
91699
  rejectPromise(error);
91700
91700
  return;
91701
91701
  }
91702
- resolve41();
91702
+ resolve44();
91703
91703
  });
91704
91704
  stream.on("data", () => {
91705
91705
  if (stream.getBufferedLength() > maxBuffer) {
@@ -92988,7 +92988,7 @@ var require_extract_zip = __commonJS({
92988
92988
  debug7("opening", this.zipPath, "with opts", this.opts);
92989
92989
  this.zipfile = await openZip(this.zipPath, { lazyEntries: true });
92990
92990
  this.canceled = false;
92991
- return new Promise((resolve41, reject) => {
92991
+ return new Promise((resolve44, reject) => {
92992
92992
  this.zipfile.on("error", (err) => {
92993
92993
  this.canceled = true;
92994
92994
  reject(err);
@@ -92997,7 +92997,7 @@ var require_extract_zip = __commonJS({
92997
92997
  this.zipfile.on("close", () => {
92998
92998
  if (!this.canceled) {
92999
92999
  debug7("zip extraction complete");
93000
- resolve41();
93000
+ resolve44();
93001
93001
  }
93002
93002
  });
93003
93003
  this.zipfile.on("entry", async (entry) => {
@@ -94254,8 +94254,8 @@ var require_streamx = __commonJS({
94254
94254
  return this;
94255
94255
  },
94256
94256
  next() {
94257
- return new Promise(function(resolve41, reject) {
94258
- promiseResolve = resolve41;
94257
+ return new Promise(function(resolve44, reject) {
94258
+ promiseResolve = resolve44;
94259
94259
  promiseReject = reject;
94260
94260
  const data = stream.read();
94261
94261
  if (data !== null) ondata(data);
@@ -94285,11 +94285,11 @@ var require_streamx = __commonJS({
94285
94285
  }
94286
94286
  function destroy(err) {
94287
94287
  stream.destroy(err);
94288
- return new Promise((resolve41, reject) => {
94289
- if (stream._duplexState & DESTROYED) return resolve41({ value: void 0, done: true });
94288
+ return new Promise((resolve44, reject) => {
94289
+ if (stream._duplexState & DESTROYED) return resolve44({ value: void 0, done: true });
94290
94290
  stream.once("close", function() {
94291
94291
  if (err) reject(err);
94292
- else resolve41({ value: void 0, done: true });
94292
+ else resolve44({ value: void 0, done: true });
94293
94293
  });
94294
94294
  });
94295
94295
  }
@@ -94333,8 +94333,8 @@ var require_streamx = __commonJS({
94333
94333
  const writes = pending + (ws._duplexState & WRITE_WRITING ? 1 : 0);
94334
94334
  if (writes === 0) return Promise.resolve(true);
94335
94335
  if (state.drains === null) state.drains = [];
94336
- return new Promise((resolve41) => {
94337
- state.drains.push({ writes, resolve: resolve41 });
94336
+ return new Promise((resolve44) => {
94337
+ state.drains.push({ writes, resolve: resolve44 });
94338
94338
  });
94339
94339
  }
94340
94340
  write(data) {
@@ -94439,10 +94439,10 @@ var require_streamx = __commonJS({
94439
94439
  cb(null);
94440
94440
  }
94441
94441
  function pipelinePromise(...streams) {
94442
- return new Promise((resolve41, reject) => {
94442
+ return new Promise((resolve44, reject) => {
94443
94443
  return pipeline(...streams, (err) => {
94444
94444
  if (err) return reject(err);
94445
- resolve41();
94445
+ resolve44();
94446
94446
  });
94447
94447
  });
94448
94448
  }
@@ -95097,16 +95097,16 @@ var require_extract = __commonJS({
95097
95097
  entryCallback = null;
95098
95098
  cb(err);
95099
95099
  }
95100
- function onnext(resolve41, reject) {
95100
+ function onnext(resolve44, reject) {
95101
95101
  if (error) {
95102
95102
  return reject(error);
95103
95103
  }
95104
95104
  if (entryStream) {
95105
- resolve41({ value: entryStream, done: false });
95105
+ resolve44({ value: entryStream, done: false });
95106
95106
  entryStream = null;
95107
95107
  return;
95108
95108
  }
95109
- promiseResolve = resolve41;
95109
+ promiseResolve = resolve44;
95110
95110
  promiseReject = reject;
95111
95111
  consumeCallback(null);
95112
95112
  if (extract._finished && promiseResolve) {
@@ -95134,11 +95134,11 @@ var require_extract = __commonJS({
95134
95134
  function destroy(err) {
95135
95135
  extract.destroy(err);
95136
95136
  consumeCallback(err);
95137
- return new Promise((resolve41, reject) => {
95138
- if (extract.destroyed) return resolve41({ value: void 0, done: true });
95137
+ return new Promise((resolve44, reject) => {
95138
+ if (extract.destroyed) return resolve44({ value: void 0, done: true });
95139
95139
  extract.once("close", function() {
95140
95140
  if (err) reject(err);
95141
- else resolve41({ value: void 0, done: true });
95141
+ else resolve44({ value: void 0, done: true });
95142
95142
  });
95143
95143
  });
95144
95144
  }
@@ -100114,12 +100114,12 @@ var init_yargs_factory = __esm({
100114
100114
  async getCompletion(args, done) {
100115
100115
  argsert("<array> [function]", [args, done], arguments.length);
100116
100116
  if (!done) {
100117
- return new Promise((resolve41, reject) => {
100117
+ return new Promise((resolve44, reject) => {
100118
100118
  __classPrivateFieldGet2(this, _YargsInstance_completion, "f").getCompletion(args, (err, completions) => {
100119
100119
  if (err)
100120
100120
  reject(err);
100121
100121
  else
100122
- resolve41(completions);
100122
+ resolve44(completions);
100123
100123
  });
100124
100124
  });
100125
100125
  } else {
@@ -102921,8 +102921,8 @@ var init_ScreenRecorder = __esm({
102921
102921
  static {
102922
102922
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
102923
102923
  __esDecorate23(this, _private_writeFrame_descriptor = { value: __setFunctionName6(async function(buffer) {
102924
- const error = await new Promise((resolve41) => {
102925
- this.#process.stdin.write(buffer, resolve41);
102924
+ const error = await new Promise((resolve44) => {
102925
+ this.#process.stdin.write(buffer, resolve44);
102926
102926
  });
102927
102927
  if (error) {
102928
102928
  console.log(`ffmpeg failed to write: ${error.message}.`);
@@ -103112,8 +103112,8 @@ var init_ScreenRecorder = __esm({
103112
103112
  const [buffer, timestamp] = await this.#lastFrame;
103113
103113
  await Promise.all(Array(Math.max(1, Math.round(this.#fps * (performance.now() - timestamp) / 1e3))).fill(buffer).map(this.#writeFrame.bind(this)));
103114
103114
  this.#process.stdin.end();
103115
- await new Promise((resolve41) => {
103116
- this.#process.once("close", resolve41);
103115
+ await new Promise((resolve44) => {
103116
+ this.#process.once("close", resolve44);
103117
103117
  });
103118
103118
  }
103119
103119
  /**
@@ -115453,7 +115453,7 @@ ${lanes.join("\n")}
115453
115453
  writeOutputIsTTY() {
115454
115454
  return process.stdout.isTTY;
115455
115455
  },
115456
- readFile: readFile24,
115456
+ readFile: readFile26,
115457
115457
  writeFile: writeFile27,
115458
115458
  watchFile: watchFile2,
115459
115459
  watchDirectory,
@@ -115659,7 +115659,7 @@ ${lanes.join("\n")}
115659
115659
  callback
115660
115660
  );
115661
115661
  }
115662
- function readFile24(fileName, _encoding) {
115662
+ function readFile26(fileName, _encoding) {
115663
115663
  let buffer;
115664
115664
  try {
115665
115665
  buffer = _fs.readFileSync(fileName);
@@ -140286,8 +140286,8 @@ ${lanes.join("\n")}
140286
140286
  return void 0;
140287
140287
  }
140288
140288
  function tryRenameExternalModule(factory2, moduleName, sourceFile) {
140289
- const rename6 = sourceFile.renamedDependencies && sourceFile.renamedDependencies.get(moduleName.text);
140290
- return rename6 ? factory2.createStringLiteral(rename6) : void 0;
140289
+ const rename7 = sourceFile.renamedDependencies && sourceFile.renamedDependencies.get(moduleName.text);
140290
+ return rename7 ? factory2.createStringLiteral(rename7) : void 0;
140291
140291
  }
140292
140292
  function tryGetModuleNameFromFile(factory2, file, host, options) {
140293
140293
  if (!file) {
@@ -152215,7 +152215,7 @@ ${lanes.join("\n")}
152215
152215
  const possibleOption = getSpellingSuggestion(unknownOption, diagnostics.optionDeclarations, getOptionName);
152216
152216
  return possibleOption ? createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.unknownDidYouMeanDiagnostic, unknownOptionErrorText || unknownOption, possibleOption.name) : createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.unknownOptionDiagnostic, unknownOptionErrorText || unknownOption);
152217
152217
  }
152218
- function parseCommandLineWorker(diagnostics, commandLine, readFile24) {
152218
+ function parseCommandLineWorker(diagnostics, commandLine, readFile26) {
152219
152219
  const options = {};
152220
152220
  let watchOptions;
152221
152221
  const fileNames = [];
@@ -152263,7 +152263,7 @@ ${lanes.join("\n")}
152263
152263
  }
152264
152264
  }
152265
152265
  function parseResponseFile(fileName) {
152266
- const text = tryReadFile(fileName, readFile24 || ((fileName2) => sys.readFile(fileName2)));
152266
+ const text = tryReadFile(fileName, readFile26 || ((fileName2) => sys.readFile(fileName2)));
152267
152267
  if (!isString3(text)) {
152268
152268
  errors.push(text);
152269
152269
  return;
@@ -152366,8 +152366,8 @@ ${lanes.join("\n")}
152366
152366
  unknownDidYouMeanDiagnostic: Diagnostics.Unknown_compiler_option_0_Did_you_mean_1,
152367
152367
  optionTypeMismatchDiagnostic: Diagnostics.Compiler_option_0_expects_an_argument
152368
152368
  };
152369
- function parseCommandLine(commandLine, readFile24) {
152370
- return parseCommandLineWorker(compilerOptionsDidYouMeanDiagnostics, commandLine, readFile24);
152369
+ function parseCommandLine(commandLine, readFile26) {
152370
+ return parseCommandLineWorker(compilerOptionsDidYouMeanDiagnostics, commandLine, readFile26);
152371
152371
  }
152372
152372
  function getOptionFromName(optionName, allowShort) {
152373
152373
  return getOptionDeclarationFromName(getOptionsNameMap, optionName, allowShort);
@@ -152449,8 +152449,8 @@ ${lanes.join("\n")}
152449
152449
  watchOptionsToExtend
152450
152450
  );
152451
152451
  }
152452
- function readConfigFile(fileName, readFile24) {
152453
- const textOrDiagnostic = tryReadFile(fileName, readFile24);
152452
+ function readConfigFile(fileName, readFile26) {
152453
+ const textOrDiagnostic = tryReadFile(fileName, readFile26);
152454
152454
  return isString3(textOrDiagnostic) ? parseConfigFileTextToJson(fileName, textOrDiagnostic) : { config: {}, error: textOrDiagnostic };
152455
152455
  }
152456
152456
  function parseConfigFileTextToJson(fileName, jsonText) {
@@ -152465,14 +152465,14 @@ ${lanes.join("\n")}
152465
152465
  error: jsonSourceFile.parseDiagnostics.length ? jsonSourceFile.parseDiagnostics[0] : void 0
152466
152466
  };
152467
152467
  }
152468
- function readJsonConfigFile(fileName, readFile24) {
152469
- const textOrDiagnostic = tryReadFile(fileName, readFile24);
152468
+ function readJsonConfigFile(fileName, readFile26) {
152469
+ const textOrDiagnostic = tryReadFile(fileName, readFile26);
152470
152470
  return isString3(textOrDiagnostic) ? parseJsonText(fileName, textOrDiagnostic) : { fileName, parseDiagnostics: [textOrDiagnostic] };
152471
152471
  }
152472
- function tryReadFile(fileName, readFile24) {
152472
+ function tryReadFile(fileName, readFile26) {
152473
152473
  let text;
152474
152474
  try {
152475
- text = readFile24(fileName);
152475
+ text = readFile26(fileName);
152476
152476
  } catch (e) {
152477
152477
  return createCompilerDiagnostic(Diagnostics.Cannot_read_file_0_Colon_1, fileName, e.message);
152478
152478
  }
@@ -230569,7 +230569,7 @@ ${lanes.join("\n")}
230569
230569
  }
230570
230570
  }
230571
230571
  function createImportCallExpressionAMD(arg, containsLexicalThis) {
230572
- const resolve41 = factory2.createUniqueName("resolve");
230572
+ const resolve44 = factory2.createUniqueName("resolve");
230573
230573
  const reject = factory2.createUniqueName("reject");
230574
230574
  const parameters = [
230575
230575
  factory2.createParameterDeclaration(
@@ -230578,7 +230578,7 @@ ${lanes.join("\n")}
230578
230578
  /*dotDotDotToken*/
230579
230579
  void 0,
230580
230580
  /*name*/
230581
- resolve41
230581
+ resolve44
230582
230582
  ),
230583
230583
  factory2.createParameterDeclaration(
230584
230584
  /*modifiers*/
@@ -230595,7 +230595,7 @@ ${lanes.join("\n")}
230595
230595
  factory2.createIdentifier("require"),
230596
230596
  /*typeArguments*/
230597
230597
  void 0,
230598
- [factory2.createArrayLiteralExpression([arg || factory2.createOmittedExpression()]), resolve41, reject]
230598
+ [factory2.createArrayLiteralExpression([arg || factory2.createOmittedExpression()]), resolve44, reject]
230599
230599
  )
230600
230600
  )
230601
230601
  ]);
@@ -242130,12 +242130,12 @@ ${lanes.join("\n")}
242130
242130
  function createCompilerHost(options, setParentNodes) {
242131
242131
  return createCompilerHostWorker(options, setParentNodes);
242132
242132
  }
242133
- function createGetSourceFile(readFile24, setParentNodes) {
242133
+ function createGetSourceFile(readFile26, setParentNodes) {
242134
242134
  return (fileName, languageVersionOrOptions, onError) => {
242135
242135
  let text;
242136
242136
  try {
242137
242137
  mark("beforeIORead");
242138
- text = readFile24(fileName);
242138
+ text = readFile26(fileName);
242139
242139
  mark("afterIORead");
242140
242140
  measure("I/O Read", "beforeIORead", "afterIORead");
242141
242141
  } catch (e) {
@@ -243039,7 +243039,7 @@ ${lanes.join("\n")}
243039
243039
  getRedirectFromOutput,
243040
243040
  forEachResolvedProjectReference: forEachResolvedProjectReference2
243041
243041
  });
243042
- const readFile24 = host.readFile.bind(host);
243042
+ const readFile26 = host.readFile.bind(host);
243043
243043
  (_e = tracing) == null ? void 0 : _e.push(tracing.Phase.Program, "shouldProgramCreateNewSourceFiles", { hasOldProgram: !!oldProgram });
243044
243044
  const shouldCreateNewSourceFile = shouldProgramCreateNewSourceFiles(oldProgram, options);
243045
243045
  (_f = tracing) == null ? void 0 : _f.pop();
@@ -243265,7 +243265,7 @@ ${lanes.join("\n")}
243265
243265
  shouldTransformImportCall,
243266
243266
  emitBuildInfo,
243267
243267
  fileExists,
243268
- readFile: readFile24,
243268
+ readFile: readFile26,
243269
243269
  directoryExists,
243270
243270
  getSymlinkCache,
243271
243271
  realpath: (_o = host.realpath) == null ? void 0 : _o.bind(host),
@@ -243405,9 +243405,9 @@ ${lanes.join("\n")}
243405
243405
  /*ignoreCase*/
243406
243406
  false
243407
243407
  )) {
243408
- const basename18 = getBaseFileName(a.fileName);
243409
- if (basename18 === "lib.d.ts" || basename18 === "lib.es6.d.ts") return 0;
243410
- const name = removeSuffix(removePrefix(basename18, "lib."), ".d.ts");
243408
+ const basename19 = getBaseFileName(a.fileName);
243409
+ if (basename19 === "lib.d.ts" || basename19 === "lib.es6.d.ts") return 0;
243410
+ const name = removeSuffix(removePrefix(basename19, "lib."), ".d.ts");
243411
243411
  const index = libs.indexOf(name);
243412
243412
  if (index !== -1) return index + 1;
243413
243413
  }
@@ -274408,19 +274408,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
274408
274408
  }
274409
274409
  function convertNamedExport(sourceFile, assignment, changes, exports2) {
274410
274410
  const { text } = assignment.left.name;
274411
- const rename6 = exports2.get(text);
274412
- if (rename6 !== void 0) {
274411
+ const rename7 = exports2.get(text);
274412
+ if (rename7 !== void 0) {
274413
274413
  const newNodes = [
274414
274414
  makeConst(
274415
274415
  /*modifiers*/
274416
274416
  void 0,
274417
- rename6,
274417
+ rename7,
274418
274418
  assignment.right
274419
274419
  ),
274420
274420
  makeExportDeclaration([factory.createExportSpecifier(
274421
274421
  /*isTypeOnly*/
274422
274422
  false,
274423
- rename6,
274423
+ rename7,
274424
274424
  text
274425
274425
  )])
274426
274426
  ];
@@ -307153,8 +307153,8 @@ ${options.prefix}` : "\n" : options.prefix
307153
307153
  }
307154
307154
  };
307155
307155
  for (const file of files) {
307156
- const basename18 = getBaseFileName(file);
307157
- if (basename18 === "package.json" || basename18 === "bower.json") {
307156
+ const basename19 = getBaseFileName(file);
307157
+ if (basename19 === "package.json" || basename19 === "bower.json") {
307158
307158
  createProjectWatcher(
307159
307159
  file,
307160
307160
  "FileWatcher"
@@ -310826,8 +310826,8 @@ All files are: ${JSON.stringify(names)}`,
310826
310826
  var _a7;
310827
310827
  const fileOrDirectoryPath = removeIgnoredPath(this.toPath(fileOrDirectory));
310828
310828
  if (!fileOrDirectoryPath) return;
310829
- const basename18 = getBaseFileName(fileOrDirectoryPath);
310830
- if (((_a7 = result.affectedModuleSpecifierCacheProjects) == null ? void 0 : _a7.size) && (basename18 === "package.json" || basename18 === "node_modules")) {
310829
+ const basename19 = getBaseFileName(fileOrDirectoryPath);
310830
+ if (((_a7 = result.affectedModuleSpecifierCacheProjects) == null ? void 0 : _a7.size) && (basename19 === "package.json" || basename19 === "node_modules")) {
310831
310831
  result.affectedModuleSpecifierCacheProjects.forEach((project) => {
310832
310832
  var _a23;
310833
310833
  (_a23 = project.getModuleSpecifierCache()) == null ? void 0 : _a23.clear();
@@ -317313,8 +317313,8 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
317313
317313
  installPackage(options) {
317314
317314
  this.packageInstallId++;
317315
317315
  const request5 = { kind: "installPackage", ...options, id: this.packageInstallId };
317316
- const promise = new Promise((resolve41, reject) => {
317317
- (this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map())).set(this.packageInstallId, { resolve: resolve41, reject });
317316
+ const promise = new Promise((resolve44, reject) => {
317317
+ (this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map())).set(this.packageInstallId, { resolve: resolve44, reject });
317318
317318
  });
317319
317319
  this.installer.send(request5);
317320
317320
  return promise;
@@ -429342,7 +429342,7 @@ var init_GeminiProvider = __esm({
429342
429342
  * Sleep helper
429343
429343
  */
429344
429344
  sleep(ms) {
429345
- return new Promise((resolve41) => setTimeout(resolve41, ms));
429345
+ return new Promise((resolve44) => setTimeout(resolve44, ms));
429346
429346
  }
429347
429347
  /**
429348
429348
  * Extend a previously generated Veo video
@@ -433429,7 +433429,7 @@ var init_RunwayProvider = __esm({
433429
433429
  * Sleep helper
433430
433430
  */
433431
433431
  sleep(ms) {
433432
- return new Promise((resolve41) => setTimeout(resolve41, ms));
433432
+ return new Promise((resolve44) => setTimeout(resolve44, ms));
433433
433433
  }
433434
433434
  };
433435
433435
  RunwayProvider.API_VERSION = "2024-11-06";
@@ -433861,7 +433861,7 @@ var init_KlingProvider = __esm({
433861
433861
  * Sleep helper
433862
433862
  */
433863
433863
  sleep(ms) {
433864
- return new Promise((resolve41) => setTimeout(resolve41, ms));
433864
+ return new Promise((resolve44) => setTimeout(resolve44, ms));
433865
433865
  }
433866
433866
  };
433867
433867
  klingProvider = new KlingProvider();
@@ -434170,7 +434170,7 @@ var init_GrokProvider = __esm({
434170
434170
  }
434171
434171
  }
434172
434172
  sleep(ms) {
434173
- return new Promise((resolve41) => setTimeout(resolve41, ms));
434173
+ return new Promise((resolve44) => setTimeout(resolve44, ms));
434174
434174
  }
434175
434175
  };
434176
434176
  grokProvider = new GrokProvider();
@@ -434443,7 +434443,7 @@ var init_ReplicateProvider = __esm({
434443
434443
  * Sleep helper
434444
434444
  */
434445
434445
  sleep(ms) {
434446
- return new Promise((resolve41) => setTimeout(resolve41, ms));
434446
+ return new Promise((resolve44) => setTimeout(resolve44, ms));
434447
434447
  }
434448
434448
  /**
434449
434449
  * Generate music from text prompt using MusicGen
@@ -442683,7 +442683,7 @@ async function prompt(question, hidden = false) {
442683
442683
  input: process.stdin,
442684
442684
  output: process.stdout
442685
442685
  });
442686
- return new Promise((resolve41) => {
442686
+ return new Promise((resolve44) => {
442687
442687
  if (hidden && process.stdin.isTTY) {
442688
442688
  process.stdout.write(question);
442689
442689
  let input3 = "";
@@ -442697,7 +442697,7 @@ async function prompt(question, hidden = false) {
442697
442697
  process.stdin.removeListener("data", onData);
442698
442698
  process.stdout.write("\n");
442699
442699
  rl.close();
442700
- resolve41(input3);
442700
+ resolve44(input3);
442701
442701
  } else if (char === "") {
442702
442702
  process.exit(1);
442703
442703
  } else if (char === "\x7F" || char === "\b") {
@@ -442712,7 +442712,7 @@ async function prompt(question, hidden = false) {
442712
442712
  } else {
442713
442713
  rl.question(question, (answer) => {
442714
442714
  rl.close();
442715
- resolve41(answer);
442715
+ resolve44(answer);
442716
442716
  });
442717
442717
  }
442718
442718
  });
@@ -443100,8 +443100,8 @@ registerRoot(Root);
443100
443100
  await mkdir6(REMOTION_CACHE_DIR, { recursive: true });
443101
443101
  await writeFile7(join18(REMOTION_CACHE_DIR, "package.json"), packageJsonStr);
443102
443102
  if (existsSync18(join18(dir, "node_modules"))) {
443103
- const { rename: rename6, symlink } = await import("node:fs/promises");
443104
- await rename6(join18(dir, "node_modules"), cachedModules).catch(() => {
443103
+ const { rename: rename7, symlink } = await import("node:fs/promises");
443104
+ await rename7(join18(dir, "node_modules"), cachedModules).catch(() => {
443105
443105
  });
443106
443106
  await symlink(cachedModules, join18(dir, "node_modules"), "dir").catch(() => {
443107
443107
  });
@@ -447018,7 +447018,7 @@ import { readFile as readFile12, writeFile as writeFile13, mkdir as mkdir11, unl
447018
447018
  import { resolve as resolve24, basename as basename9, dirname as dirname15, extname as extname7 } from "node:path";
447019
447019
  import { existsSync as existsSync26 } from "node:fs";
447020
447020
  function sleep(ms) {
447021
- return new Promise((resolve41) => setTimeout(resolve41, ms));
447021
+ return new Promise((resolve44) => setTimeout(resolve44, ms));
447022
447022
  }
447023
447023
  async function uploadToImgbb(imageBuffer, apiKey) {
447024
447024
  try {
@@ -450307,10 +450307,10 @@ async function prompt2(question) {
450307
450307
  input: input3,
450308
450308
  output: process.stdout
450309
450309
  });
450310
- return new Promise((resolve41) => {
450310
+ return new Promise((resolve44) => {
450311
450311
  rl.question(question, (answer) => {
450312
450312
  rl.close();
450313
- resolve41(answer);
450313
+ resolve44(answer);
450314
450314
  });
450315
450315
  });
450316
450316
  }
@@ -451593,8 +451593,8 @@ Examples:
451593
451593
  "-vn",
451594
451594
  tempPath
451595
451595
  ]);
451596
- const { rename: rename6 } = await import("node:fs/promises");
451597
- await rename6(tempPath, outputPath);
451596
+ const { rename: rename7 } = await import("node:fs/promises");
451597
+ await rename7(tempPath, outputPath);
451598
451598
  fitSpinner.succeed(source_default.green(`Adjusted to fit ${options.fitDuration}s (${tempo.toFixed(3)}x speed)`));
451599
451599
  } catch (err) {
451600
451600
  fitSpinner.fail(source_default.yellow("Tempo adjustment failed \u2014 keeping original audio"));
@@ -453336,8 +453336,8 @@ async function executeSpeedRamp(options) {
453336
453336
  const audioBuffer = await readFile18(tempAudio);
453337
453337
  const transcript = await whisper.transcribe(new Blob([audioBuffer]), language);
453338
453338
  try {
453339
- const { unlink: unlink5 } = await import("node:fs/promises");
453340
- await unlink5(tempAudio);
453339
+ const { unlink: unlink6 } = await import("node:fs/promises");
453340
+ await unlink6(tempAudio);
453341
453341
  } catch {
453342
453342
  }
453343
453343
  if (!transcript.segments || transcript.segments.length === 0) {
@@ -453721,8 +453721,8 @@ Run 'vibe schema edit.<command>' for structured parameter info.
453721
453721
  maxSpeed: parseFloat(options.maxSpeed)
453722
453722
  });
453723
453723
  try {
453724
- const { unlink: unlink5 } = await import("node:fs/promises");
453725
- await unlink5(tempAudio);
453724
+ const { unlink: unlink6 } = await import("node:fs/promises");
453725
+ await unlink6(tempAudio);
453726
453726
  } catch {
453727
453727
  }
453728
453728
  spinner2.succeed(source_default.green(`Found ${speedResult.keyframes.length} speed keyframes`));
@@ -454793,8 +454793,8 @@ ${segmentTexts}`,
454793
454793
  console.log();
454794
454794
  if (isVideo && audioPath !== absPath) {
454795
454795
  try {
454796
- const { unlink: unlink5 } = await import("node:fs/promises");
454797
- await unlink5(audioPath);
454796
+ const { unlink: unlink6 } = await import("node:fs/promises");
454797
+ await unlink6(audioPath);
454798
454798
  } catch {
454799
454799
  }
454800
454800
  }
@@ -455032,8 +455032,8 @@ ${segmentTexts}`,
455032
455032
  await writeFile20(finalOutputPath, combinedBuffer);
455033
455033
  if (isVideo && audioPath !== absPath) {
455034
455034
  try {
455035
- const { unlink: unlink5 } = await import("node:fs/promises");
455036
- await unlink5(audioPath);
455035
+ const { unlink: unlink6 } = await import("node:fs/promises");
455036
+ await unlink6(audioPath);
455037
455037
  } catch {
455038
455038
  }
455039
455039
  }
@@ -456542,7 +456542,7 @@ function buildFFmpegArgs(clips, sources, presetSettings, outputPath, options, so
456542
456542
  return args;
456543
456543
  }
456544
456544
  function runFFmpegProcess(ffmpegPath, args, onProgress) {
456545
- return new Promise((resolve41, reject) => {
456545
+ return new Promise((resolve44, reject) => {
456546
456546
  const ffmpeg = spawn9(ffmpegPath, args, {
456547
456547
  stdio: ["pipe", "pipe", "pipe"]
456548
456548
  });
@@ -456566,7 +456566,7 @@ function runFFmpegProcess(ffmpegPath, args, onProgress) {
456566
456566
  });
456567
456567
  ffmpeg.on("close", (code) => {
456568
456568
  if (code === 0) {
456569
- resolve41();
456569
+ resolve44();
456570
456570
  } else {
456571
456571
  const errorMatch = stderr.match(/Error.*$/m);
456572
456572
  const errorMsg = errorMatch ? errorMatch[0] : `FFmpeg exited with code ${code}`;
@@ -456702,17 +456702,17 @@ function getPresetSettings(preset, aspectRatio) {
456702
456702
  }
456703
456703
  async function runHyperframesExport(projectPath, options, spinner2) {
456704
456704
  spinner2.text = "Loading project...";
456705
- const { readFile: readFile24 } = await import("node:fs/promises");
456706
- const { resolve: resolve41, basename: basename18 } = await import("node:path");
456705
+ const { readFile: readFile26 } = await import("node:fs/promises");
456706
+ const { resolve: resolve44, basename: basename19 } = await import("node:path");
456707
456707
  const { Project: Project2 } = await Promise.resolve().then(() => (init_engine(), engine_exports));
456708
456708
  const { createHyperframesBackend: createHyperframesBackend2 } = await Promise.resolve().then(() => (init_hyperframes(), hyperframes_exports));
456709
456709
  const { exitWithError: exitWithError2, generalError: generalError2, outputResult: outputResult2 } = await Promise.resolve().then(() => (init_output(), output_exports));
456710
456710
  const chalk2 = (await Promise.resolve().then(() => (init_source(), source_exports))).default;
456711
- const filePath = resolve41(process.cwd(), projectPath);
456712
- const content = await readFile24(filePath, "utf-8");
456711
+ const filePath = resolve44(process.cwd(), projectPath);
456712
+ const content = await readFile26(filePath, "utf-8");
456713
456713
  const project = Project2.fromJSON(JSON.parse(content));
456714
456714
  const state = project.getState();
456715
- const outputPath = options.output ? resolve41(process.cwd(), options.output) : resolve41(process.cwd(), `${basename18(projectPath, ".vibe.json")}.${options.format ?? "mp4"}`);
456715
+ const outputPath = options.output ? resolve44(process.cwd(), options.output) : resolve44(process.cwd(), `${basename19(projectPath, ".vibe.json")}.${options.format ?? "mp4"}`);
456716
456716
  const quality = ["draft", "standard", "high"].includes(options.preset ?? "") ? options.preset : "standard";
456717
456717
  const backend = createHyperframesBackend2();
456718
456718
  spinner2.text = "Rendering with Hyperframes...";
@@ -458321,8 +458321,8 @@ async function handleAiPipelineToolCall(name, args) {
458321
458321
  } finally {
458322
458322
  if (tempPath) {
458323
458323
  try {
458324
- const { unlink: unlink5 } = await import("node:fs/promises");
458325
- await unlink5(tempPath);
458324
+ const { unlink: unlink6 } = await import("node:fs/promises");
458325
+ await unlink6(tempPath);
458326
458326
  } catch {
458327
458327
  }
458328
458328
  }
@@ -459509,16 +459509,223 @@ async function handleAiEditAdvancedToolCall(name, args) {
459509
459509
  // src/tools/scene.ts
459510
459510
  init_scene_project();
459511
459511
  init_scene_lint();
459512
- import { resolve as resolve39 } from "node:path";
459512
+ import { resolve as resolve41 } from "node:path";
459513
459513
 
459514
459514
  // ../cli/src/commands/_shared/scene-render.ts
459515
459515
  var import_yaml5 = __toESM(require_dist14(), 1);
459516
459516
  init_dist();
459517
459517
  init_chrome();
459518
459518
  init_scene_lint();
459519
- import { mkdir as mkdir18, stat as stat3 } from "node:fs/promises";
459519
+ import { mkdir as mkdir18, readFile as readFile23, stat as stat3 } from "node:fs/promises";
459520
459520
  import { existsSync as existsSync36 } from "node:fs";
459521
- import { resolve as resolve37, relative as relative6, dirname as dirname23, basename as basename16 } from "node:path";
459521
+ import { resolve as resolve39, relative as relative6, dirname as dirname24, basename as basename17 } from "node:path";
459522
+
459523
+ // ../cli/src/commands/_shared/scene-audio-scan.ts
459524
+ import { readFile as readFile22 } from "node:fs/promises";
459525
+ import { resolve as resolve37 } from "node:path";
459526
+ function parseRootClips(rootHtml) {
459527
+ const clips = [];
459528
+ const clipRegex = /<div\b[^>]*class="clip"[^>]*>/gi;
459529
+ let match2;
459530
+ while ((match2 = clipRegex.exec(rootHtml)) !== null) {
459531
+ const tag = match2[0];
459532
+ const compositionId = pickAttr(tag, "data-composition-id");
459533
+ const compositionSrc = pickAttr(tag, "data-composition-src");
459534
+ const start = pickNumberAttr(tag, "data-start");
459535
+ const duration = pickNumberAttr(tag, "data-duration");
459536
+ const trackIndex = pickNumberAttr(tag, "data-track-index") ?? 1;
459537
+ if (!compositionId || !compositionSrc || start === null || duration === null) {
459538
+ continue;
459539
+ }
459540
+ clips.push({ compositionId, compositionSrc, start, duration, trackIndex });
459541
+ }
459542
+ return clips;
459543
+ }
459544
+ function parseSceneAudios(compositionHtml) {
459545
+ const out = [];
459546
+ const audioRegex = /<audio\b([^>]*)>/gi;
459547
+ let match2;
459548
+ while ((match2 = audioRegex.exec(compositionHtml)) !== null) {
459549
+ const attrs = match2[1];
459550
+ const src = pickAttr(attrs, "src");
459551
+ if (!src) continue;
459552
+ const localStart = pickNumberAttr(attrs, "data-start") ?? 0;
459553
+ const durationRaw = pickAttr(attrs, "data-duration");
459554
+ const durationHint = !durationRaw || durationRaw === "auto" ? "auto" : Number(durationRaw);
459555
+ const volume = pickNumberAttr(attrs, "data-volume") ?? 1;
459556
+ const trackIndex = pickNumberAttr(attrs, "data-track-index") ?? 2;
459557
+ out.push({ srcRel: src, localStart, durationHint, volume, trackIndex });
459558
+ }
459559
+ return out;
459560
+ }
459561
+ function makeFsCompositionReader(projectDir) {
459562
+ return async (compositionSrcRel) => {
459563
+ const abs = resolve37(projectDir, compositionSrcRel);
459564
+ try {
459565
+ return await readFile22(abs, "utf-8");
459566
+ } catch {
459567
+ return null;
459568
+ }
459569
+ };
459570
+ }
459571
+ async function scanSceneAudio(opts) {
459572
+ const reader = opts.readComposition ?? makeFsCompositionReader(opts.projectDir);
459573
+ const clips = parseRootClips(opts.rootHtml);
459574
+ const out = [];
459575
+ for (const clip of clips) {
459576
+ const html = await reader(clip.compositionSrc);
459577
+ if (!html) continue;
459578
+ const audios = parseSceneAudios(html);
459579
+ for (const audio of audios) {
459580
+ out.push({
459581
+ srcRel: audio.srcRel,
459582
+ srcAbs: resolve37(opts.projectDir, audio.srcRel),
459583
+ absoluteStart: clip.start + audio.localStart,
459584
+ durationHint: audio.durationHint,
459585
+ clipDurationCap: clip.duration - audio.localStart,
459586
+ volume: audio.volume,
459587
+ trackIndex: audio.trackIndex,
459588
+ compositionSrc: clip.compositionSrc
459589
+ });
459590
+ }
459591
+ }
459592
+ out.sort((a, b) => a.absoluteStart - b.absoluteStart);
459593
+ return out;
459594
+ }
459595
+ function pickAttr(tag, name) {
459596
+ const re = new RegExp(`\\b${escapeRegex3(name)}\\s*=\\s*("([^"]*)"|'([^']*)')`);
459597
+ const m = tag.match(re);
459598
+ if (!m) return null;
459599
+ return m[2] ?? m[3] ?? null;
459600
+ }
459601
+ function pickNumberAttr(tag, name) {
459602
+ const raw2 = pickAttr(tag, name);
459603
+ if (raw2 === null) return null;
459604
+ const n = Number(raw2);
459605
+ return Number.isFinite(n) ? n : null;
459606
+ }
459607
+ function escapeRegex3(s) {
459608
+ return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
459609
+ }
459610
+
459611
+ // ../cli/src/commands/_shared/scene-audio-mux.ts
459612
+ init_exec_safe();
459613
+ import { rename as rename6, unlink as unlink5 } from "node:fs/promises";
459614
+ import { resolve as resolve38, dirname as dirname23, extname as extname12, basename as basename16 } from "node:path";
459615
+ function buildAudioMuxFilter(audios) {
459616
+ if (audios.length === 0) return null;
459617
+ const labels = [];
459618
+ const stages = [];
459619
+ audios.forEach((a, i) => {
459620
+ const inputIdx = i + 1;
459621
+ const delayMs = Math.max(0, Math.round(a.absoluteStart * 1e3));
459622
+ const volume = Number.isFinite(a.volume) ? a.volume : 1;
459623
+ const trimSec = Math.max(0, a.clipDurationCap);
459624
+ const label = `a${i}`;
459625
+ const stage = [
459626
+ `[${inputIdx}:a]`,
459627
+ `atrim=duration=${trimSec.toFixed(3)},`,
459628
+ `asetpts=PTS-STARTPTS,`,
459629
+ `adelay=${delayMs}:all=1,`,
459630
+ `volume=${volume}`,
459631
+ `[${label}]`
459632
+ ].join("");
459633
+ stages.push(stage);
459634
+ labels.push(`[${label}]`);
459635
+ });
459636
+ if (audios.length === 1) {
459637
+ return {
459638
+ filterComplex: stages.join(";"),
459639
+ outLabel: labels[0],
459640
+ inputCount: 1
459641
+ };
459642
+ }
459643
+ const mix = `${labels.join("")}amix=inputs=${audios.length}:dropout_transition=0:normalize=0[mixed]`;
459644
+ return {
459645
+ filterComplex: `${stages.join(";")};${mix}`,
459646
+ outLabel: "[mixed]",
459647
+ inputCount: audios.length
459648
+ };
459649
+ }
459650
+ function audioCodecForFormat(format4) {
459651
+ if (format4 === "webm") return "libopus";
459652
+ if (format4 === "mov") return "pcm_s16le";
459653
+ return "aac";
459654
+ }
459655
+ async function muxAudioIntoVideo(opts) {
459656
+ if (opts.audios.length === 0) {
459657
+ return { success: true, outputPath: opts.videoPath, audioCount: 0 };
459658
+ }
459659
+ if (!commandExists("ffmpeg")) {
459660
+ return {
459661
+ success: false,
459662
+ outputPath: opts.videoPath,
459663
+ audioCount: opts.audios.length,
459664
+ error: "ffmpeg not found in PATH \u2014 install via `brew install ffmpeg` (mac) or your package manager"
459665
+ };
459666
+ }
459667
+ const filter4 = buildAudioMuxFilter(opts.audios);
459668
+ if (!filter4) {
459669
+ return { success: true, outputPath: opts.videoPath, audioCount: 0 };
459670
+ }
459671
+ const ext = extname12(opts.videoPath) || `.${opts.format}`;
459672
+ const tmpPath = resolve38(
459673
+ dirname23(opts.videoPath),
459674
+ `.${basename16(opts.videoPath, ext)}.muxing${ext}`
459675
+ );
459676
+ const args = ["-y", "-loglevel", "error", "-i", opts.videoPath];
459677
+ for (const a of opts.audios) {
459678
+ args.push("-i", a.srcAbs);
459679
+ }
459680
+ args.push(
459681
+ "-filter_complex",
459682
+ filter4.filterComplex,
459683
+ "-map",
459684
+ "0:v",
459685
+ "-map",
459686
+ filter4.outLabel,
459687
+ "-c:v",
459688
+ "copy",
459689
+ "-c:a",
459690
+ audioCodecForFormat(opts.format),
459691
+ // Cap on the video duration so audio that overruns the producer's render
459692
+ // (e.g. a long Kokoro wav on a short scene) doesn't extend the output.
459693
+ // Video drives the timeline because the producer already counted frames.
459694
+ "-t",
459695
+ opts.totalDuration && opts.totalDuration > 0 ? opts.totalDuration.toFixed(3) : opts.videoDuration?.toFixed(3) ?? ""
459696
+ );
459697
+ if (args[args.length - 1] === "") {
459698
+ args.pop();
459699
+ args.pop();
459700
+ }
459701
+ args.push("-movflags", "+faststart", tmpPath);
459702
+ try {
459703
+ const { stderr } = await execSafe("ffmpeg", args);
459704
+ if (stderr && opts.onProgress) {
459705
+ stderr.split(/\r?\n/).forEach((line) => opts.onProgress?.(line));
459706
+ }
459707
+ } catch (err) {
459708
+ const msg = err instanceof Error ? err.message : String(err);
459709
+ try {
459710
+ await unlink5(tmpPath);
459711
+ } catch {
459712
+ }
459713
+ return {
459714
+ success: false,
459715
+ outputPath: opts.videoPath,
459716
+ audioCount: opts.audios.length,
459717
+ error: `ffmpeg mux failed: ${msg}`
459718
+ };
459719
+ }
459720
+ await rename6(tmpPath, opts.videoPath);
459721
+ return {
459722
+ success: true,
459723
+ outputPath: opts.videoPath,
459724
+ audioCount: opts.audios.length
459725
+ };
459726
+ }
459727
+
459728
+ // ../cli/src/commands/_shared/scene-render.ts
459522
459729
  function qualityToCrf2(quality = "standard") {
459523
459730
  return quality === "draft" ? 28 : quality === "high" ? 18 : 23;
459524
459731
  }
@@ -459526,11 +459733,11 @@ function defaultOutputPath(opts) {
459526
459733
  const fmt = opts.format ?? "mp4";
459527
459734
  const now = opts.now ?? /* @__PURE__ */ new Date();
459528
459735
  const stamp = now.toISOString().replace(/[:T]/g, "-").replace(/\..+$/, "");
459529
- const name = (opts.projectName ?? basename16(resolve37(opts.projectDir))) || "scene";
459530
- return resolve37(opts.projectDir, "renders", `${name}-${stamp}.${fmt}`);
459736
+ const name = (opts.projectName ?? basename17(resolve39(opts.projectDir))) || "scene";
459737
+ return resolve39(opts.projectDir, "renders", `${name}-${stamp}.${fmt}`);
459531
459738
  }
459532
459739
  async function readProjectName(projectDir) {
459533
- const cfgPath = resolve37(projectDir, "vibe.project.yaml");
459740
+ const cfgPath = resolve39(projectDir, "vibe.project.yaml");
459534
459741
  if (!existsSync36(cfgPath)) return void 0;
459535
459742
  try {
459536
459743
  const raw2 = await (await import("node:fs/promises")).readFile(cfgPath, "utf-8");
@@ -459552,7 +459759,7 @@ function buildRenderConfig(opts) {
459552
459759
  };
459553
459760
  }
459554
459761
  async function executeSceneRender(opts = {}) {
459555
- const projectDir = resolve37(opts.projectDir ?? ".");
459762
+ const projectDir = resolve39(opts.projectDir ?? ".");
459556
459763
  const root2 = opts.root ?? "index.html";
459557
459764
  const projectStat = await safeStat(projectDir);
459558
459765
  if (!projectStat || !projectStat.isDirectory()) {
@@ -459561,7 +459768,7 @@ async function executeSceneRender(opts = {}) {
459561
459768
  if (!await rootExists(projectDir, root2)) {
459562
459769
  return {
459563
459770
  success: false,
459564
- error: `Root composition not found: ${resolve37(projectDir, root2)}. Run \`vibe scene init\` first.`
459771
+ error: `Root composition not found: ${resolve39(projectDir, root2)}. Run \`vibe scene init\` first.`
459565
459772
  };
459566
459773
  }
459567
459774
  const chrome2 = await preflightChrome();
@@ -459569,8 +459776,8 @@ async function executeSceneRender(opts = {}) {
459569
459776
  return { success: false, error: chrome2.reason };
459570
459777
  }
459571
459778
  const projectName = await readProjectName(projectDir);
459572
- const outputPath = opts.output ? resolve37(projectDir, opts.output) : defaultOutputPath({ projectDir, projectName, format: opts.format });
459573
- await mkdir18(dirname23(outputPath), { recursive: true });
459779
+ const outputPath = opts.output ? resolve39(projectDir, opts.output) : defaultOutputPath({ projectDir, projectName, format: opts.format });
459780
+ await mkdir18(dirname24(outputPath), { recursive: true });
459574
459781
  const config4 = buildRenderConfig({
459575
459782
  fps: opts.fps,
459576
459783
  quality: opts.quality,
@@ -459594,6 +459801,34 @@ async function executeSceneRender(opts = {}) {
459594
459801
  error: err instanceof Error ? err.message : String(err)
459595
459802
  };
459596
459803
  }
459804
+ let audioCount = 0;
459805
+ let audioMuxApplied = false;
459806
+ let audioMuxWarning;
459807
+ try {
459808
+ opts.onProgress?.(0.95, "Mixing audio");
459809
+ const rootHtml = await readFile23(resolve39(projectDir, root2), "utf-8");
459810
+ const audios = await scanSceneAudio({ projectDir, rootHtml });
459811
+ audioCount = audios.length;
459812
+ if (audios.length > 0) {
459813
+ const videoDuration = job.totalFrames && config4.fps ? job.totalFrames / config4.fps : void 0;
459814
+ const mux = await muxAudioIntoVideo({
459815
+ videoPath: outputPath,
459816
+ audios,
459817
+ format: config4.format ?? "mp4",
459818
+ videoDuration,
459819
+ onProgress: (line) => {
459820
+ if (line) opts.onProgress?.(0.97, line);
459821
+ }
459822
+ });
459823
+ if (mux.success) {
459824
+ audioMuxApplied = true;
459825
+ } else {
459826
+ audioMuxWarning = mux.error;
459827
+ }
459828
+ }
459829
+ } catch (err) {
459830
+ audioMuxWarning = err instanceof Error ? err.message : String(err);
459831
+ }
459597
459832
  return {
459598
459833
  success: true,
459599
459834
  outputPath: relative6(process.cwd(), outputPath) || outputPath,
@@ -459602,7 +459837,10 @@ async function executeSceneRender(opts = {}) {
459602
459837
  totalFrames: job.totalFrames,
459603
459838
  fps: config4.fps,
459604
459839
  quality: config4.quality,
459605
- format: config4.format
459840
+ format: config4.format,
459841
+ audioCount,
459842
+ audioMuxApplied,
459843
+ audioMuxWarning
459606
459844
  };
459607
459845
  }
459608
459846
  async function safeStat(p) {
@@ -459619,8 +459857,8 @@ init_source();
459619
459857
  init_ora();
459620
459858
  var import_yaml6 = __toESM(require_dist14(), 1);
459621
459859
  init_dist2();
459622
- import { basename as basename17, resolve as resolve38, relative as relative7, dirname as dirname24 } from "node:path";
459623
- import { mkdir as mkdir19, readFile as readFile22, writeFile as writeFile25, access as access5, copyFile as copyFile4 } from "node:fs/promises";
459860
+ import { basename as basename18, resolve as resolve40, relative as relative7, dirname as dirname25 } from "node:path";
459861
+ import { mkdir as mkdir19, readFile as readFile24, writeFile as writeFile25, access as access5, copyFile as copyFile4 } from "node:fs/promises";
459624
459862
  import { existsSync as existsSync37 } from "node:fs";
459625
459863
 
459626
459864
  // ../cli/src/commands/_shared/tts-resolve.ts
@@ -459723,7 +459961,7 @@ Run 'vibe schema scene.<command>' for structured parameter info.`);
459723
459961
  sceneCommand.command("init").description("Scaffold a new scene project (or safely augment an existing Hyperframes project)").argument("<dir>", "Project directory (created if it doesn't exist)").option("-n, --name <name>", "Project name (defaults to directory basename)").option("-r, --ratio <ratio>", "Aspect ratio: 16:9, 9:16, 1:1, 4:5", "16:9").option("-d, --duration <sec>", "Default root composition duration (seconds)", "10").option("--dry-run", "Preview parameters without writing files").action(async (dir, options) => {
459724
459962
  const aspect = validateAspect(options.ratio);
459725
459963
  const duration = validateDuration(options.duration);
459726
- const name = options.name ?? basename17(dir.replace(/\/+$/, ""));
459964
+ const name = options.name ?? basename18(dir.replace(/\/+$/, ""));
459727
459965
  if (options.dryRun) {
459728
459966
  outputResult({
459729
459967
  dryRun: true,
@@ -459874,16 +460112,16 @@ async function pathExists2(p) {
459874
460112
  }
459875
460113
  }
459876
460114
  async function loadVibeProjectConfig(projectDir) {
459877
- const cfgPath = resolve38(projectDir, "vibe.project.yaml");
460115
+ const cfgPath = resolve40(projectDir, "vibe.project.yaml");
459878
460116
  if (!await pathExists2(cfgPath)) return null;
459879
- const raw2 = await readFile22(cfgPath, "utf-8");
460117
+ const raw2 = await readFile24(cfgPath, "utf-8");
459880
460118
  return (0, import_yaml6.parse)(raw2);
459881
460119
  }
459882
460120
  async function resolveNarrationText(value) {
459883
460121
  if (!value) return void 0;
459884
460122
  const looksLikePath = /\.[a-z]{2,4}$/i.test(value) || value.includes("/") || value.includes("\\");
459885
460123
  if (looksLikePath && existsSync37(value)) {
459886
- return (await readFile22(value, "utf-8")).trim();
460124
+ return (await readFile24(value, "utf-8")).trim();
459887
460125
  }
459888
460126
  return value.trim();
459889
460127
  }
@@ -459899,12 +460137,12 @@ function aspectStringFromDims(width, height) {
459899
460137
  return width > height ? "16:9" : "9:16";
459900
460138
  }
459901
460139
  async function executeSceneAdd(opts) {
459902
- const projectDir = resolve38(opts.projectDir ?? ".");
460140
+ const projectDir = resolve40(opts.projectDir ?? ".");
459903
460141
  const rootRel = opts.insertInto ?? "index.html";
459904
- const rootPath = resolve38(projectDir, rootRel);
460142
+ const rootPath = resolve40(projectDir, rootRel);
459905
460143
  const id = slugifySceneName(opts.name);
459906
460144
  const sceneRel = `compositions/scene-${id}.html`;
459907
- const scenePath = resolve38(projectDir, sceneRel);
460145
+ const scenePath = resolve40(projectDir, sceneRel);
459908
460146
  const errResult = (error) => ({
459909
460147
  success: false,
459910
460148
  id,
@@ -459921,7 +460159,7 @@ async function executeSceneAdd(opts) {
459921
460159
  if (!opts.force && await pathExists2(scenePath)) {
459922
460160
  return errResult(`Scene already exists: ${sceneRel}. Re-run with --force to overwrite.`);
459923
460161
  }
459924
- const rootHtmlBefore = await readFile22(rootPath, "utf-8");
460162
+ const rootHtmlBefore = await readFile24(rootPath, "utf-8");
459925
460163
  let dims = readRootDims(rootHtmlBefore);
459926
460164
  if (!dims) {
459927
460165
  const cfg2 = await loadVibeProjectConfig(projectDir);
@@ -459935,7 +460173,7 @@ async function executeSceneAdd(opts) {
459935
460173
  let audioAbsPath;
459936
460174
  let narrationDuration;
459937
460175
  if (opts.narrationFile && !opts.skipAudio) {
459938
- const sourceAbs = resolve38(opts.narrationFile);
460176
+ const sourceAbs = resolve40(opts.narrationFile);
459939
460177
  if (!await pathExists2(sourceAbs)) {
459940
460178
  return errResult(`Narration file not found: ${sourceAbs}`);
459941
460179
  }
@@ -459944,8 +460182,8 @@ async function executeSceneAdd(opts) {
459944
460182
  return errResult(`Unsupported narration file extension: .${ext}. Use .wav or .mp3.`);
459945
460183
  }
459946
460184
  audioRelPath = `assets/narration-${id}.${ext}`;
459947
- audioAbsPath = resolve38(projectDir, audioRelPath);
459948
- await mkdir19(dirname24(audioAbsPath), { recursive: true });
460185
+ audioAbsPath = resolve40(projectDir, audioRelPath);
460186
+ await mkdir19(dirname25(audioAbsPath), { recursive: true });
459949
460187
  await copyFile4(sourceAbs, audioAbsPath);
459950
460188
  try {
459951
460189
  narrationDuration = await getAudioDuration(audioAbsPath);
@@ -459977,8 +460215,8 @@ async function executeSceneAdd(opts) {
459977
460215
  return errResult(`${resolution.provider} TTS failed: ${tts.error ?? "unknown error"}`);
459978
460216
  }
459979
460217
  audioRelPath = `assets/narration-${id}.${resolution.audioExtension}`;
459980
- audioAbsPath = resolve38(projectDir, audioRelPath);
459981
- await mkdir19(dirname24(audioAbsPath), { recursive: true });
460218
+ audioAbsPath = resolve40(projectDir, audioRelPath);
460219
+ await mkdir19(dirname25(audioAbsPath), { recursive: true });
459982
460220
  await writeFile25(audioAbsPath, tts.audioBuffer);
459983
460221
  try {
459984
460222
  narrationDuration = await getAudioDuration(audioAbsPath);
@@ -460000,7 +460238,7 @@ async function executeSceneAdd(opts) {
460000
460238
  try {
460001
460239
  const whisper = new WhisperProvider();
460002
460240
  await whisper.initialize({ apiKey: whisperKey });
460003
- const audioBytes = await readFile22(audioAbsPath);
460241
+ const audioBytes = await readFile24(audioAbsPath);
460004
460242
  const audioBlob = new Blob([new Uint8Array(audioBytes)]);
460005
460243
  const transcript = await whisper.transcribe(audioBlob, void 0, {
460006
460244
  granularity: "word",
@@ -460008,7 +460246,7 @@ async function executeSceneAdd(opts) {
460008
460246
  });
460009
460247
  if (transcript.status === "completed" && transcript.words?.length) {
460010
460248
  transcriptRelPath = `assets/transcript-${id}.json`;
460011
- const transcriptAbs = resolve38(projectDir, transcriptRelPath);
460249
+ const transcriptAbs = resolve40(projectDir, transcriptRelPath);
460012
460250
  await writeFile25(transcriptAbs, JSON.stringify(transcript.words, null, 2), "utf-8");
460013
460251
  transcriptWordCount = transcript.words.length;
460014
460252
  transcriptWords = transcript.words.map((w) => ({ text: w.text, start: w.start, end: w.end }));
@@ -460045,8 +460283,8 @@ async function executeSceneAdd(opts) {
460045
460283
  }
460046
460284
  const img = imageResult.images[0];
460047
460285
  imageRelPath = `assets/scene-${id}.png`;
460048
- imageAbsPath = resolve38(projectDir, imageRelPath);
460049
- await mkdir19(dirname24(imageAbsPath), { recursive: true });
460286
+ imageAbsPath = resolve40(projectDir, imageRelPath);
460287
+ await mkdir19(dirname25(imageAbsPath), { recursive: true });
460050
460288
  let buffer;
460051
460289
  if (img.base64) {
460052
460290
  buffer = Buffer.from(img.base64, "base64");
@@ -460070,8 +460308,8 @@ async function executeSceneAdd(opts) {
460070
460308
  return errResult(`Gemini image generation failed: ${imageResult.error ?? "unknown error"}`);
460071
460309
  }
460072
460310
  imageRelPath = `assets/scene-${id}.png`;
460073
- imageAbsPath = resolve38(projectDir, imageRelPath);
460074
- await mkdir19(dirname24(imageAbsPath), { recursive: true });
460311
+ imageAbsPath = resolve40(projectDir, imageRelPath);
460312
+ await mkdir19(dirname25(imageAbsPath), { recursive: true });
460075
460313
  const buffer = Buffer.from(imageResult.images[0].base64, "base64");
460076
460314
  await writeFile25(imageAbsPath, buffer);
460077
460315
  }
@@ -460093,13 +460331,13 @@ async function executeSceneAdd(opts) {
460093
460331
  audioPath: audioRelPath,
460094
460332
  transcript: transcriptWords
460095
460333
  });
460096
- await mkdir19(dirname24(scenePath), { recursive: true });
460334
+ await mkdir19(dirname25(scenePath), { recursive: true });
460097
460335
  await writeFile25(scenePath, sceneHtml, "utf-8");
460098
460336
  opts.onProgress?.("Updating root composition...");
460099
460337
  const start = nextSceneStart(rootHtmlBefore);
460100
460338
  const updated = insertClipIntoRoot(rootHtmlBefore, { id, start, duration });
460101
460339
  await writeFile25(rootPath, updated, "utf-8");
460102
- const transcriptAbsPath = transcriptRelPath ? resolve38(projectDir, transcriptRelPath) : void 0;
460340
+ const transcriptAbsPath = transcriptRelPath ? resolve40(projectDir, transcriptRelPath) : void 0;
460103
460341
  return {
460104
460342
  success: true,
460105
460343
  id,
@@ -460115,10 +460353,10 @@ async function executeSceneAdd(opts) {
460115
460353
  };
460116
460354
  }
460117
460355
  sceneCommand.command("lint").description("Validate scene HTML against Hyperframes rules (in-process, no Chrome required)").argument("[root]", "Root composition file relative to --project", "index.html").option("--project <dir>", "Project directory", ".").option("--fix", 'Apply mechanical auto-fixes (currently: missing class="clip")').action(async (root2, options) => {
460118
- const projectDir = resolve38(options.project);
460356
+ const projectDir = resolve40(options.project);
460119
460357
  if (!await rootExists(projectDir, root2)) {
460120
460358
  exitWithError(generalError(
460121
- `Root composition not found: ${resolve38(projectDir, root2)}`,
460359
+ `Root composition not found: ${resolve40(projectDir, root2)}`,
460122
460360
  "Run `vibe scene init` first, or pass --project <dir>."
460123
460361
  ));
460124
460362
  }
@@ -460211,7 +460449,7 @@ sceneCommand.command("render").description("Render a scene project to MP4/WebM/M
460211
460449
  const quality = validateQuality(options.quality);
460212
460450
  const format4 = validateFormat(options.format);
460213
460451
  const workers = validateWorkers(options.workers);
460214
- const projectDir = resolve38(options.project);
460452
+ const projectDir = resolve40(options.project);
460215
460453
  if (options.dryRun) {
460216
460454
  outputResult({
460217
460455
  dryRun: true,
@@ -460261,6 +460499,13 @@ sceneCommand.command("render").description("Render a scene project to MP4/WebM/M
460261
460499
  console.log(` duration ${((result.durationMs ?? 0) / 1e3).toFixed(1)}s`);
460262
460500
  console.log(` frames ${result.framesRendered ?? "?"}${result.totalFrames ? ` / ${result.totalFrames}` : ""}`);
460263
460501
  console.log(` config ${result.fps}fps \xB7 ${result.quality} \xB7 ${result.format}`);
460502
+ if (result.audioCount && result.audioCount > 0) {
460503
+ const muxStatus = result.audioMuxApplied ? source_default.green(`\u2713 ${result.audioCount} track${result.audioCount === 1 ? "" : "s"} muxed`) : source_default.yellow(`\u26A0 ${result.audioCount} track${result.audioCount === 1 ? "" : "s"} skipped`);
460504
+ console.log(` audio ${muxStatus}`);
460505
+ if (result.audioMuxWarning) {
460506
+ console.log(source_default.dim(` ${result.audioMuxWarning}`));
460507
+ }
460508
+ }
460264
460509
  });
460265
460510
 
460266
460511
  // src/tools/scene.ts
@@ -460357,7 +460602,7 @@ function summariseLint(result) {
460357
460602
  async function handleSceneToolCall(name, args) {
460358
460603
  switch (name) {
460359
460604
  case "scene_init": {
460360
- const dir = resolve39(process.cwd(), args.dir);
460605
+ const dir = resolve41(process.cwd(), args.dir);
460361
460606
  const result = await scaffoldSceneProject({
460362
460607
  dir,
460363
460608
  name: args.name,
@@ -460373,7 +460618,7 @@ async function handleSceneToolCall(name, args) {
460373
460618
  });
460374
460619
  }
460375
460620
  case "scene_add": {
460376
- const projectDir = args.projectDir ? resolve39(process.cwd(), args.projectDir) : process.cwd();
460621
+ const projectDir = args.projectDir ? resolve41(process.cwd(), args.projectDir) : process.cwd();
460377
460622
  const result = await executeSceneAdd({
460378
460623
  name: args.name,
460379
460624
  preset: args.preset ?? "simple",
@@ -460404,7 +460649,7 @@ async function handleSceneToolCall(name, args) {
460404
460649
  });
460405
460650
  }
460406
460651
  case "scene_lint": {
460407
- const projectDir = args.projectDir ? resolve39(process.cwd(), args.projectDir) : process.cwd();
460652
+ const projectDir = args.projectDir ? resolve41(process.cwd(), args.projectDir) : process.cwd();
460408
460653
  const result = await runProjectLint({
460409
460654
  projectDir,
460410
460655
  rootRel: args.root,
@@ -460413,7 +460658,7 @@ async function handleSceneToolCall(name, args) {
460413
460658
  return JSON.stringify(summariseLint(result));
460414
460659
  }
460415
460660
  case "scene_render": {
460416
- const projectDir = args.projectDir ? resolve39(process.cwd(), args.projectDir) : process.cwd();
460661
+ const projectDir = args.projectDir ? resolve41(process.cwd(), args.projectDir) : process.cwd();
460417
460662
  const result = await executeSceneRender({
460418
460663
  projectDir,
460419
460664
  root: args.root,
@@ -460507,8 +460752,8 @@ async function handleToolCall(name, args) {
460507
460752
 
460508
460753
  // src/resources/index.ts
460509
460754
  init_engine();
460510
- import { readFile as readFile23 } from "node:fs/promises";
460511
- import { resolve as resolve40 } from "node:path";
460755
+ import { readFile as readFile25 } from "node:fs/promises";
460756
+ import { resolve as resolve43 } from "node:path";
460512
460757
  var resources = [
460513
460758
  {
460514
460759
  uri: "vibe://project/current",
@@ -460543,8 +460788,8 @@ var resources = [
460543
460788
  ];
460544
460789
  var currentProjectPath = process.env.VIBE_PROJECT_PATH || null;
460545
460790
  async function loadProject2(projectPath) {
460546
- const absPath = resolve40(process.cwd(), projectPath);
460547
- const content = await readFile23(absPath, "utf-8");
460791
+ const absPath = resolve43(process.cwd(), projectPath);
460792
+ const content = await readFile25(absPath, "utf-8");
460548
460793
  const data = JSON.parse(content);
460549
460794
  return Project.fromJSON(data);
460550
460795
  }