@trydecember/cli 0.2.16 → 0.2.17

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 (3) hide show
  1. package/README.md +11 -19
  2. package/dist/december.js +983 -919
  3. package/package.json +1 -5
package/dist/december.js CHANGED
@@ -46,6 +46,66 @@ var __export = (target, all) => {
46
46
  };
47
47
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
48
48
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
49
+
50
+ // ../../node_modules/.bun/uuid@14.0.1/node_modules/uuid/dist-node/rng.js
51
+ function rng() {
52
+ return crypto.getRandomValues(rnds8);
53
+ }
54
+ var rnds8;
55
+ var init_rng = __esm(() => {
56
+ rnds8 = new Uint8Array(16);
57
+ });
58
+
59
+ // ../../node_modules/.bun/uuid@14.0.1/node_modules/uuid/dist-node/stringify.js
60
+ function unsafeStringify(arr, offset = 0) {
61
+ return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
62
+ }
63
+ var byteToHex;
64
+ var init_stringify = __esm(() => {
65
+ byteToHex = [];
66
+ for (let i = 0;i < 256; ++i) {
67
+ byteToHex.push((i + 256).toString(16).slice(1));
68
+ }
69
+ });
70
+
71
+ // ../../node_modules/.bun/uuid@14.0.1/node_modules/uuid/dist-node/v4.js
72
+ function v4(options, buf, offset) {
73
+ if (!buf && !options && crypto.randomUUID) {
74
+ return crypto.randomUUID();
75
+ }
76
+ return _v4(options, buf, offset);
77
+ }
78
+ function _v4(options, buf, offset) {
79
+ options = options || {};
80
+ const rnds = options.random ?? options.rng?.() ?? rng();
81
+ if (rnds.length < 16) {
82
+ throw new Error("Random bytes length must be >= 16");
83
+ }
84
+ rnds[6] = rnds[6] & 15 | 64;
85
+ rnds[8] = rnds[8] & 63 | 128;
86
+ if (buf) {
87
+ offset = offset || 0;
88
+ if (offset < 0 || offset + 16 > buf.length) {
89
+ throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
90
+ }
91
+ for (let i = 0;i < 16; ++i) {
92
+ buf[offset + i] = rnds[i];
93
+ }
94
+ return buf;
95
+ }
96
+ return unsafeStringify(rnds);
97
+ }
98
+ var v4_default;
99
+ var init_v4 = __esm(() => {
100
+ init_rng();
101
+ init_stringify();
102
+ v4_default = v4;
103
+ });
104
+
105
+ // ../../node_modules/.bun/uuid@14.0.1/node_modules/uuid/dist-node/index.js
106
+ var init_dist_node = __esm(() => {
107
+ init_v4();
108
+ });
49
109
  // ../../packages/providers/src/registry.ts
50
110
  var providers;
51
111
  var init_registry = __esm(() => {
@@ -795,7 +855,7 @@ function stringify(object, opts = {}) {
795
855
  var array_prefix_generators, push_to_array = function(arr, value_or_array) {
796
856
  Array.prototype.push.apply(arr, isArray(value_or_array) ? value_or_array : [value_or_array]);
797
857
  }, toISOString, defaults, sentinel;
798
- var init_stringify = __esm(() => {
858
+ var init_stringify2 = __esm(() => {
799
859
  init_utils();
800
860
  init_formats();
801
861
  init_values();
@@ -840,7 +900,7 @@ function stringifyQuery(query) {
840
900
  return stringify(query, { arrayFormat: "brackets" });
841
901
  }
842
902
  var init_query = __esm(() => {
843
- init_stringify();
903
+ init_stringify2();
844
904
  });
845
905
 
846
906
  // ../../node_modules/.bun/openai@6.48.0+842cab36901b74d2/node_modules/openai/internal/utils/bytes.mjs
@@ -9712,7 +9772,7 @@ function stringify2(object, opts = {}) {
9712
9772
  var array_prefix_generators2, push_to_array2 = function(arr, value_or_array) {
9713
9773
  Array.prototype.push.apply(arr, isArray2(value_or_array) ? value_or_array : [value_or_array]);
9714
9774
  }, toISOString2, defaults2, sentinel2;
9715
- var init_stringify2 = __esm(() => {
9775
+ var init_stringify3 = __esm(() => {
9716
9776
  init_utils3();
9717
9777
  init_formats2();
9718
9778
  init_values2();
@@ -9757,7 +9817,7 @@ function stringifyQuery2(query2) {
9757
9817
  return stringify2(query2, { arrayFormat: "brackets" });
9758
9818
  }
9759
9819
  var init_query2 = __esm(() => {
9760
- init_stringify2();
9820
+ init_stringify3();
9761
9821
  });
9762
9822
 
9763
9823
  // ../../node_modules/.bun/@anthropic-ai+sdk@0.112.3+68a1e3a0c4588df3/node_modules/@anthropic-ai/sdk/lib/credentials/types.mjs
@@ -97875,7 +97935,7 @@ var init_native = __esm(() => {
97875
97935
 
97876
97936
  // ../../node_modules/.bun/uuid@11.1.1/node_modules/uuid/dist/esm/rng.js
97877
97937
  import { randomFillSync } from "crypto";
97878
- function rng() {
97938
+ function rng2() {
97879
97939
  if (poolPtr > rnds8Pool.length - 16) {
97880
97940
  randomFillSync(rnds8Pool);
97881
97941
  poolPtr = 0;
@@ -97883,30 +97943,30 @@ function rng() {
97883
97943
  return rnds8Pool.slice(poolPtr, poolPtr += 16);
97884
97944
  }
97885
97945
  var rnds8Pool, poolPtr;
97886
- var init_rng = __esm(() => {
97946
+ var init_rng2 = __esm(() => {
97887
97947
  rnds8Pool = new Uint8Array(256);
97888
97948
  poolPtr = rnds8Pool.length;
97889
97949
  });
97890
97950
 
97891
97951
  // ../../node_modules/.bun/uuid@11.1.1/node_modules/uuid/dist/esm/stringify.js
97892
- function unsafeStringify(arr, offset = 0) {
97893
- return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
97952
+ function unsafeStringify2(arr, offset = 0) {
97953
+ return (byteToHex2[arr[offset + 0]] + byteToHex2[arr[offset + 1]] + byteToHex2[arr[offset + 2]] + byteToHex2[arr[offset + 3]] + "-" + byteToHex2[arr[offset + 4]] + byteToHex2[arr[offset + 5]] + "-" + byteToHex2[arr[offset + 6]] + byteToHex2[arr[offset + 7]] + "-" + byteToHex2[arr[offset + 8]] + byteToHex2[arr[offset + 9]] + "-" + byteToHex2[arr[offset + 10]] + byteToHex2[arr[offset + 11]] + byteToHex2[arr[offset + 12]] + byteToHex2[arr[offset + 13]] + byteToHex2[arr[offset + 14]] + byteToHex2[arr[offset + 15]]).toLowerCase();
97894
97954
  }
97895
- var byteToHex;
97896
- var init_stringify3 = __esm(() => {
97897
- byteToHex = [];
97955
+ var byteToHex2;
97956
+ var init_stringify4 = __esm(() => {
97957
+ byteToHex2 = [];
97898
97958
  for (let i2 = 0;i2 < 256; ++i2) {
97899
- byteToHex.push((i2 + 256).toString(16).slice(1));
97959
+ byteToHex2.push((i2 + 256).toString(16).slice(1));
97900
97960
  }
97901
97961
  });
97902
97962
 
97903
97963
  // ../../node_modules/.bun/uuid@11.1.1/node_modules/uuid/dist/esm/v4.js
97904
- function v4(options, buf, offset) {
97964
+ function v42(options, buf, offset) {
97905
97965
  if (native_default.randomUUID && !buf && !options) {
97906
97966
  return native_default.randomUUID();
97907
97967
  }
97908
97968
  options = options || {};
97909
- const rnds = options.random ?? options.rng?.() ?? rng();
97969
+ const rnds = options.random ?? options.rng?.() ?? rng2();
97910
97970
  if (rnds.length < 16) {
97911
97971
  throw new Error("Random bytes length must be >= 16");
97912
97972
  }
@@ -97922,19 +97982,19 @@ function v4(options, buf, offset) {
97922
97982
  }
97923
97983
  return buf;
97924
97984
  }
97925
- return unsafeStringify(rnds);
97985
+ return unsafeStringify2(rnds);
97926
97986
  }
97927
- var v4_default;
97928
- var init_v4 = __esm(() => {
97987
+ var v4_default2;
97988
+ var init_v42 = __esm(() => {
97929
97989
  init_native();
97930
- init_rng();
97931
- init_stringify3();
97932
- v4_default = v4;
97990
+ init_rng2();
97991
+ init_stringify4();
97992
+ v4_default2 = v42;
97933
97993
  });
97934
97994
 
97935
97995
  // ../../node_modules/.bun/uuid@11.1.1/node_modules/uuid/dist/esm/index.js
97936
97996
  var init_esm = __esm(() => {
97937
- init_v4();
97997
+ init_v42();
97938
97998
  });
97939
97999
 
97940
98000
  // ../../packages/providers/src/providers/gemini.ts
@@ -98100,7 +98160,7 @@ function geminiProvider(apiKey) {
98100
98160
  if (fc.id) {
98101
98161
  extraFields.id = fc.id;
98102
98162
  } else {
98103
- extraFields.id = v4_default();
98163
+ extraFields.id = v4_default2();
98104
98164
  }
98105
98165
  if (part.thoughtSignature) {
98106
98166
  extraFields.thoughtSignature = part.thoughtSignature;
@@ -98354,66 +98414,6 @@ var init_compaction = __esm(() => {
98354
98414
  init_src3();
98355
98415
  });
98356
98416
 
98357
- // ../../node_modules/.bun/uuid@14.0.1/node_modules/uuid/dist-node/rng.js
98358
- function rng2() {
98359
- return crypto.getRandomValues(rnds8);
98360
- }
98361
- var rnds8;
98362
- var init_rng2 = __esm(() => {
98363
- rnds8 = new Uint8Array(16);
98364
- });
98365
-
98366
- // ../../node_modules/.bun/uuid@14.0.1/node_modules/uuid/dist-node/stringify.js
98367
- function unsafeStringify2(arr, offset = 0) {
98368
- return (byteToHex2[arr[offset + 0]] + byteToHex2[arr[offset + 1]] + byteToHex2[arr[offset + 2]] + byteToHex2[arr[offset + 3]] + "-" + byteToHex2[arr[offset + 4]] + byteToHex2[arr[offset + 5]] + "-" + byteToHex2[arr[offset + 6]] + byteToHex2[arr[offset + 7]] + "-" + byteToHex2[arr[offset + 8]] + byteToHex2[arr[offset + 9]] + "-" + byteToHex2[arr[offset + 10]] + byteToHex2[arr[offset + 11]] + byteToHex2[arr[offset + 12]] + byteToHex2[arr[offset + 13]] + byteToHex2[arr[offset + 14]] + byteToHex2[arr[offset + 15]]).toLowerCase();
98369
- }
98370
- var byteToHex2;
98371
- var init_stringify4 = __esm(() => {
98372
- byteToHex2 = [];
98373
- for (let i2 = 0;i2 < 256; ++i2) {
98374
- byteToHex2.push((i2 + 256).toString(16).slice(1));
98375
- }
98376
- });
98377
-
98378
- // ../../node_modules/.bun/uuid@14.0.1/node_modules/uuid/dist-node/v4.js
98379
- function v42(options, buf, offset) {
98380
- if (!buf && !options && crypto.randomUUID) {
98381
- return crypto.randomUUID();
98382
- }
98383
- return _v4(options, buf, offset);
98384
- }
98385
- function _v4(options, buf, offset) {
98386
- options = options || {};
98387
- const rnds = options.random ?? options.rng?.() ?? rng2();
98388
- if (rnds.length < 16) {
98389
- throw new Error("Random bytes length must be >= 16");
98390
- }
98391
- rnds[6] = rnds[6] & 15 | 64;
98392
- rnds[8] = rnds[8] & 63 | 128;
98393
- if (buf) {
98394
- offset = offset || 0;
98395
- if (offset < 0 || offset + 16 > buf.length) {
98396
- throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
98397
- }
98398
- for (let i2 = 0;i2 < 16; ++i2) {
98399
- buf[offset + i2] = rnds[i2];
98400
- }
98401
- return buf;
98402
- }
98403
- return unsafeStringify2(rnds);
98404
- }
98405
- var v4_default2;
98406
- var init_v42 = __esm(() => {
98407
- init_rng2();
98408
- init_stringify4();
98409
- v4_default2 = v42;
98410
- });
98411
-
98412
- // ../../node_modules/.bun/uuid@14.0.1/node_modules/uuid/dist-node/index.js
98413
- var init_dist_node = __esm(() => {
98414
- init_v42();
98415
- });
98416
-
98417
98417
  // ../../packages/agent/src/conversation-manager.ts
98418
98418
  class ConversationManager {
98419
98419
  _messages = [];
@@ -98428,7 +98428,7 @@ class ConversationManager {
98428
98428
  }
98429
98429
  addMessage(msg) {
98430
98430
  if (!msg.id)
98431
- msg.id = v4_default2();
98431
+ msg.id = v4_default();
98432
98432
  if (msg.parentId === undefined) {
98433
98433
  const parent = this._messages[this._messages.length - 1];
98434
98434
  msg.parentId = parent ? parent.id : undefined;
@@ -98448,8 +98448,8 @@ class ConversationManager {
98448
98448
  }
98449
98449
  }
98450
98450
  var init_conversation_manager = __esm(() => {
98451
- init_compaction();
98452
98451
  init_dist_node();
98452
+ init_compaction();
98453
98453
  });
98454
98454
 
98455
98455
  // ../../packages/agent/src/agent.ts
@@ -98820,6 +98820,7 @@ var init_p_retry = __esm(() => {
98820
98820
  });
98821
98821
 
98822
98822
  // ../../packages/agent/src/agent-loop.ts
98823
+ import util from "util";
98823
98824
  function formatError(e2) {
98824
98825
  if (!e2)
98825
98826
  return "Unknown error";
@@ -98847,7 +98848,7 @@ function formatError(e2) {
98847
98848
  return json3;
98848
98849
  } catch {}
98849
98850
  try {
98850
- return __require("util").inspect(rawData, { depth: 4 });
98851
+ return util.inspect(rawData, { depth: 4 });
98851
98852
  } catch {}
98852
98853
  return String(e2);
98853
98854
  }
@@ -99100,7 +99101,7 @@ async function executeSingleTool(agent, toolCall, eventQueue, signal) {
99100
99101
  if (agent.sessionId.startsWith("subagent-")) {
99101
99102
  throw new Error("Depth limit reached: Subagents cannot spawn their own subagents.");
99102
99103
  }
99103
- const subagentId = `subagent-${v4_default2().slice(0, 8)}`;
99104
+ const subagentId = `subagent-${v4_default().slice(0, 8)}`;
99104
99105
  const readOnlyTools = Array.from(agent.tools.values()).filter((t2) => ["read_file", "list_dir", "find_files", "grep_search"].includes(t2.name));
99105
99106
  const subagent = new Agent({
99106
99107
  sessionId: subagentId,
@@ -99586,10 +99587,10 @@ function mergeDefs(...defs) {
99586
99587
  function cloneDef(schema) {
99587
99588
  return mergeDefs(schema._zod.def);
99588
99589
  }
99589
- function getElementAtPath(obj, path9) {
99590
- if (!path9)
99590
+ function getElementAtPath(obj, path8) {
99591
+ if (!path8)
99591
99592
  return obj;
99592
- return path9.reduce((acc, key) => acc?.[key], obj);
99593
+ return path8.reduce((acc, key) => acc?.[key], obj);
99593
99594
  }
99594
99595
  function promiseAllObject(promisesObj) {
99595
99596
  const keys = Object.keys(promisesObj);
@@ -99917,11 +99918,11 @@ function explicitlyAborted(x2, startIndex = 0) {
99917
99918
  }
99918
99919
  return false;
99919
99920
  }
99920
- function prefixIssues(path9, issues) {
99921
+ function prefixIssues(path8, issues) {
99921
99922
  return issues.map((iss) => {
99922
99923
  var _a6;
99923
99924
  (_a6 = iss).path ?? (_a6.path = []);
99924
- iss.path.unshift(path9);
99925
+ iss.path.unshift(path8);
99925
99926
  return iss;
99926
99927
  });
99927
99928
  }
@@ -100134,16 +100135,16 @@ function flattenError(error3, mapper = (issue2) => issue2.message) {
100134
100135
  }
100135
100136
  function formatError2(error3, mapper = (issue2) => issue2.message) {
100136
100137
  const fieldErrors = { _errors: [] };
100137
- const processError = (error4, path9 = []) => {
100138
+ const processError = (error4, path8 = []) => {
100138
100139
  for (const issue2 of error4.issues) {
100139
100140
  if (issue2.code === "invalid_union" && issue2.errors.length) {
100140
- issue2.errors.map((issues) => processError({ issues }, [...path9, ...issue2.path]));
100141
+ issue2.errors.map((issues) => processError({ issues }, [...path8, ...issue2.path]));
100141
100142
  } else if (issue2.code === "invalid_key") {
100142
- processError({ issues: issue2.issues }, [...path9, ...issue2.path]);
100143
+ processError({ issues: issue2.issues }, [...path8, ...issue2.path]);
100143
100144
  } else if (issue2.code === "invalid_element") {
100144
- processError({ issues: issue2.issues }, [...path9, ...issue2.path]);
100145
+ processError({ issues: issue2.issues }, [...path8, ...issue2.path]);
100145
100146
  } else {
100146
- const fullpath = [...path9, ...issue2.path];
100147
+ const fullpath = [...path8, ...issue2.path];
100147
100148
  if (fullpath.length === 0) {
100148
100149
  fieldErrors._errors.push(mapper(issue2));
100149
100150
  } else {
@@ -109710,8 +109711,8 @@ var require_utils4 = __commonJS((exports, module) => {
109710
109711
  }
109711
109712
  return ind;
109712
109713
  }
109713
- function removeDotSegments(path9) {
109714
- let input = path9;
109714
+ function removeDotSegments(path8) {
109715
+ let input = path8;
109715
109716
  const output = [];
109716
109717
  let nextSlash = -1;
109717
109718
  let len = 0;
@@ -109954,8 +109955,8 @@ var require_schemes = __commonJS((exports, module) => {
109954
109955
  wsComponent.secure = undefined;
109955
109956
  }
109956
109957
  if (wsComponent.resourceName) {
109957
- const [path9, query3] = wsComponent.resourceName.split("?");
109958
- wsComponent.path = path9 && path9 !== "/" ? path9 : undefined;
109958
+ const [path8, query3] = wsComponent.resourceName.split("?");
109959
+ wsComponent.path = path8 && path8 !== "/" ? path8 : undefined;
109959
109960
  wsComponent.query = query3;
109960
109961
  wsComponent.resourceName = undefined;
109961
109962
  }
@@ -113130,12 +113131,12 @@ var require_dist4 = __commonJS((exports, module) => {
113130
113131
  throw new Error(`Unknown format "${name}"`);
113131
113132
  return f3;
113132
113133
  };
113133
- function addFormats(ajv, list, fs8, exportName) {
113134
+ function addFormats(ajv, list, fs7, exportName) {
113134
113135
  var _a7;
113135
113136
  var _b;
113136
113137
  (_a7 = (_b = ajv.opts.code).formats) !== null && _a7 !== undefined || (_b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`);
113137
113138
  for (const f3 of list)
113138
- ajv.addFormat(f3, fs8[f3]);
113139
+ ajv.addFormat(f3, fs7[f3]);
113139
113140
  }
113140
113141
  module.exports = exports = formatsPlugin;
113141
113142
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -113772,8 +113773,8 @@ var init_client4 = __esm(() => {
113772
113773
  var require_windows = __commonJS((exports, module) => {
113773
113774
  module.exports = isexe;
113774
113775
  isexe.sync = sync;
113775
- var fs8 = __require("fs");
113776
- function checkPathExt(path9, options) {
113776
+ var fs7 = __require("fs");
113777
+ function checkPathExt(path8, options) {
113777
113778
  var pathext = options.pathExt !== undefined ? options.pathExt : process.env.PATHEXT;
113778
113779
  if (!pathext) {
113779
113780
  return true;
@@ -113784,25 +113785,25 @@ var require_windows = __commonJS((exports, module) => {
113784
113785
  }
113785
113786
  for (var i2 = 0;i2 < pathext.length; i2++) {
113786
113787
  var p = pathext[i2].toLowerCase();
113787
- if (p && path9.substr(-p.length).toLowerCase() === p) {
113788
+ if (p && path8.substr(-p.length).toLowerCase() === p) {
113788
113789
  return true;
113789
113790
  }
113790
113791
  }
113791
113792
  return false;
113792
113793
  }
113793
- function checkStat(stat4, path9, options) {
113794
+ function checkStat(stat4, path8, options) {
113794
113795
  if (!stat4.isSymbolicLink() && !stat4.isFile()) {
113795
113796
  return false;
113796
113797
  }
113797
- return checkPathExt(path9, options);
113798
+ return checkPathExt(path8, options);
113798
113799
  }
113799
- function isexe(path9, options, cb) {
113800
- fs8.stat(path9, function(er, stat4) {
113801
- cb(er, er ? false : checkStat(stat4, path9, options));
113800
+ function isexe(path8, options, cb) {
113801
+ fs7.stat(path8, function(er, stat4) {
113802
+ cb(er, er ? false : checkStat(stat4, path8, options));
113802
113803
  });
113803
113804
  }
113804
- function sync(path9, options) {
113805
- return checkStat(fs8.statSync(path9), path9, options);
113805
+ function sync(path8, options) {
113806
+ return checkStat(fs7.statSync(path8), path8, options);
113806
113807
  }
113807
113808
  });
113808
113809
 
@@ -113810,14 +113811,14 @@ var require_windows = __commonJS((exports, module) => {
113810
113811
  var require_mode = __commonJS((exports, module) => {
113811
113812
  module.exports = isexe;
113812
113813
  isexe.sync = sync;
113813
- var fs8 = __require("fs");
113814
- function isexe(path9, options, cb) {
113815
- fs8.stat(path9, function(er, stat4) {
113814
+ var fs7 = __require("fs");
113815
+ function isexe(path8, options, cb) {
113816
+ fs7.stat(path8, function(er, stat4) {
113816
113817
  cb(er, er ? false : checkStat(stat4, options));
113817
113818
  });
113818
113819
  }
113819
- function sync(path9, options) {
113820
- return checkStat(fs8.statSync(path9), options);
113820
+ function sync(path8, options) {
113821
+ return checkStat(fs7.statSync(path8), options);
113821
113822
  }
113822
113823
  function checkStat(stat4, options) {
113823
113824
  return stat4.isFile() && checkMode(stat4, options);
@@ -113839,7 +113840,7 @@ var require_mode = __commonJS((exports, module) => {
113839
113840
 
113840
113841
  // ../../node_modules/.bun/isexe@2.0.0/node_modules/isexe/index.js
113841
113842
  var require_isexe = __commonJS((exports, module) => {
113842
- var fs8 = __require("fs");
113843
+ var fs7 = __require("fs");
113843
113844
  var core2;
113844
113845
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
113845
113846
  core2 = require_windows();
@@ -113848,7 +113849,7 @@ var require_isexe = __commonJS((exports, module) => {
113848
113849
  }
113849
113850
  module.exports = isexe;
113850
113851
  isexe.sync = sync;
113851
- function isexe(path9, options, cb) {
113852
+ function isexe(path8, options, cb) {
113852
113853
  if (typeof options === "function") {
113853
113854
  cb = options;
113854
113855
  options = {};
@@ -113858,7 +113859,7 @@ var require_isexe = __commonJS((exports, module) => {
113858
113859
  throw new TypeError("callback not provided");
113859
113860
  }
113860
113861
  return new Promise(function(resolve4, reject) {
113861
- isexe(path9, options || {}, function(er, is) {
113862
+ isexe(path8, options || {}, function(er, is) {
113862
113863
  if (er) {
113863
113864
  reject(er);
113864
113865
  } else {
@@ -113867,7 +113868,7 @@ var require_isexe = __commonJS((exports, module) => {
113867
113868
  });
113868
113869
  });
113869
113870
  }
113870
- core2(path9, options || {}, function(er, is) {
113871
+ core2(path8, options || {}, function(er, is) {
113871
113872
  if (er) {
113872
113873
  if (er.code === "EACCES" || options && options.ignoreErrors) {
113873
113874
  er = null;
@@ -113877,9 +113878,9 @@ var require_isexe = __commonJS((exports, module) => {
113877
113878
  cb(er, is);
113878
113879
  });
113879
113880
  }
113880
- function sync(path9, options) {
113881
+ function sync(path8, options) {
113881
113882
  try {
113882
- return core2.sync(path9, options || {});
113883
+ return core2.sync(path8, options || {});
113883
113884
  } catch (er) {
113884
113885
  if (options && options.ignoreErrors || er.code === "EACCES") {
113885
113886
  return false;
@@ -113893,7 +113894,7 @@ var require_isexe = __commonJS((exports, module) => {
113893
113894
  // ../../node_modules/.bun/which@2.0.2/node_modules/which/which.js
113894
113895
  var require_which = __commonJS((exports, module) => {
113895
113896
  var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
113896
- var path9 = __require("path");
113897
+ var path8 = __require("path");
113897
113898
  var COLON2 = isWindows ? ";" : ":";
113898
113899
  var isexe = require_isexe();
113899
113900
  var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -113929,7 +113930,7 @@ var require_which = __commonJS((exports, module) => {
113929
113930
  return opt.all && found.length ? resolve4(found) : reject(getNotFoundError(cmd));
113930
113931
  const ppRaw = pathEnv[i2];
113931
113932
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
113932
- const pCmd = path9.join(pathPart, cmd);
113933
+ const pCmd = path8.join(pathPart, cmd);
113933
113934
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
113934
113935
  resolve4(subStep(p, i2, 0));
113935
113936
  });
@@ -113956,7 +113957,7 @@ var require_which = __commonJS((exports, module) => {
113956
113957
  for (let i2 = 0;i2 < pathEnv.length; i2++) {
113957
113958
  const ppRaw = pathEnv[i2];
113958
113959
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
113959
- const pCmd = path9.join(pathPart, cmd);
113960
+ const pCmd = path8.join(pathPart, cmd);
113960
113961
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
113961
113962
  for (let j = 0;j < pathExt.length; j++) {
113962
113963
  const cur = p + pathExt[j];
@@ -113997,7 +113998,7 @@ var require_path_key = __commonJS((exports, module) => {
113997
113998
 
113998
113999
  // ../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
113999
114000
  var require_resolveCommand = __commonJS((exports, module) => {
114000
- var path9 = __require("path");
114001
+ var path8 = __require("path");
114001
114002
  var which = require_which();
114002
114003
  var getPathKey = require_path_key();
114003
114004
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -114014,7 +114015,7 @@ var require_resolveCommand = __commonJS((exports, module) => {
114014
114015
  try {
114015
114016
  resolved = which.sync(parsed.command, {
114016
114017
  path: env4[getPathKey({ env: env4 })],
114017
- pathExt: withoutPathExt ? path9.delimiter : undefined
114018
+ pathExt: withoutPathExt ? path8.delimiter : undefined
114018
114019
  });
114019
114020
  } catch (e2) {} finally {
114020
114021
  if (shouldSwitchCwd) {
@@ -114022,7 +114023,7 @@ var require_resolveCommand = __commonJS((exports, module) => {
114022
114023
  }
114023
114024
  }
114024
114025
  if (resolved) {
114025
- resolved = path9.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
114026
+ resolved = path8.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
114026
114027
  }
114027
114028
  return resolved;
114028
114029
  }
@@ -114067,8 +114068,8 @@ var require_shebang_command = __commonJS((exports, module) => {
114067
114068
  if (!match2) {
114068
114069
  return null;
114069
114070
  }
114070
- const [path9, argument] = match2[0].replace(/#! ?/, "").split(" ");
114071
- const binary = path9.split("/").pop();
114071
+ const [path8, argument] = match2[0].replace(/#! ?/, "").split(" ");
114072
+ const binary = path8.split("/").pop();
114072
114073
  if (binary === "env") {
114073
114074
  return argument;
114074
114075
  }
@@ -114078,16 +114079,16 @@ var require_shebang_command = __commonJS((exports, module) => {
114078
114079
 
114079
114080
  // ../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
114080
114081
  var require_readShebang = __commonJS((exports, module) => {
114081
- var fs8 = __require("fs");
114082
+ var fs7 = __require("fs");
114082
114083
  var shebangCommand = require_shebang_command();
114083
114084
  function readShebang(command) {
114084
114085
  const size = 150;
114085
114086
  const buffer = Buffer.alloc(size);
114086
114087
  let fd;
114087
114088
  try {
114088
- fd = fs8.openSync(command, "r");
114089
- fs8.readSync(fd, buffer, 0, size, 0);
114090
- fs8.closeSync(fd);
114089
+ fd = fs7.openSync(command, "r");
114090
+ fs7.readSync(fd, buffer, 0, size, 0);
114091
+ fs7.closeSync(fd);
114091
114092
  } catch (e2) {}
114092
114093
  return shebangCommand(buffer.toString());
114093
114094
  }
@@ -114096,7 +114097,7 @@ var require_readShebang = __commonJS((exports, module) => {
114096
114097
 
114097
114098
  // ../../node_modules/.bun/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
114098
114099
  var require_parse3 = __commonJS((exports, module) => {
114099
- var path9 = __require("path");
114100
+ var path8 = __require("path");
114100
114101
  var resolveCommand = require_resolveCommand();
114101
114102
  var escape2 = require_escape();
114102
114103
  var readShebang = require_readShebang();
@@ -114121,7 +114122,7 @@ var require_parse3 = __commonJS((exports, module) => {
114121
114122
  const needsShell = !isExecutableRegExp.test(commandFile);
114122
114123
  if (parsed.options.forceShell || needsShell) {
114123
114124
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
114124
- parsed.command = path9.normalize(parsed.command);
114125
+ parsed.command = path8.normalize(parsed.command);
114125
114126
  parsed.command = escape2.command(parsed.command);
114126
114127
  parsed.args = parsed.args.map((arg) => escape2.argument(arg, needsDoubleEscapeMetaChars));
114127
114128
  const shellCommand = [parsed.command].concat(parsed.args).join(" ");
@@ -119762,14 +119763,14 @@ var require_util5 = __commonJS((exports, module) => {
119762
119763
  }
119763
119764
  const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80;
119764
119765
  let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`;
119765
- let path9 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`;
119766
+ let path8 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`;
119766
119767
  if (origin[origin.length - 1] === "/") {
119767
119768
  origin = origin.slice(0, origin.length - 1);
119768
119769
  }
119769
- if (path9 && path9[0] !== "/") {
119770
- path9 = `/${path9}`;
119770
+ if (path8 && path8[0] !== "/") {
119771
+ path8 = `/${path8}`;
119771
119772
  }
119772
- return new URL(`${origin}${path9}`);
119773
+ return new URL(`${origin}${path8}`);
119773
119774
  }
119774
119775
  if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) {
119775
119776
  throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`.");
@@ -120485,10 +120486,10 @@ var require_stats = __commonJS((exports, module) => {
120485
120486
  // ../../node_modules/.bun/undici@7.28.0/node_modules/undici/lib/core/diagnostics.js
120486
120487
  var require_diagnostics = __commonJS((exports, module) => {
120487
120488
  var diagnosticsChannel = __require("node:diagnostics_channel");
120488
- var util = __require("node:util");
120489
- var undiciDebugLog = util.debuglog("undici");
120490
- var fetchDebuglog = util.debuglog("fetch");
120491
- var websocketDebuglog = util.debuglog("websocket");
120489
+ var util2 = __require("node:util");
120490
+ var undiciDebugLog = util2.debuglog("undici");
120491
+ var fetchDebuglog = util2.debuglog("fetch");
120492
+ var websocketDebuglog = util2.debuglog("websocket");
120492
120493
  var channels = {
120493
120494
  beforeConnect: diagnosticsChannel.channel("undici:client:beforeConnect"),
120494
120495
  connected: diagnosticsChannel.channel("undici:client:connected"),
@@ -120539,9 +120540,9 @@ var require_diagnostics = __commonJS((exports, module) => {
120539
120540
  });
120540
120541
  diagnosticsChannel.subscribe("undici:client:sendHeaders", (evt) => {
120541
120542
  const {
120542
- request: { method, path: path9, origin }
120543
+ request: { method, path: path8, origin }
120543
120544
  } = evt;
120544
- debugLog("sending request to %s %s%s", method, origin, path9);
120545
+ debugLog("sending request to %s %s%s", method, origin, path8);
120545
120546
  });
120546
120547
  }
120547
120548
  var isTrackingRequestEvents = false;
@@ -120556,23 +120557,23 @@ var require_diagnostics = __commonJS((exports, module) => {
120556
120557
  isTrackingRequestEvents = true;
120557
120558
  diagnosticsChannel.subscribe("undici:request:headers", (evt) => {
120558
120559
  const {
120559
- request: { method, path: path9, origin },
120560
+ request: { method, path: path8, origin },
120560
120561
  response: { statusCode }
120561
120562
  } = evt;
120562
- debugLog("received response to %s %s%s - HTTP %d", method, origin, path9, statusCode);
120563
+ debugLog("received response to %s %s%s - HTTP %d", method, origin, path8, statusCode);
120563
120564
  });
120564
120565
  diagnosticsChannel.subscribe("undici:request:trailers", (evt) => {
120565
120566
  const {
120566
- request: { method, path: path9, origin }
120567
+ request: { method, path: path8, origin }
120567
120568
  } = evt;
120568
- debugLog("trailers received from %s %s%s", method, origin, path9);
120569
+ debugLog("trailers received from %s %s%s", method, origin, path8);
120569
120570
  });
120570
120571
  diagnosticsChannel.subscribe("undici:request:error", (evt) => {
120571
120572
  const {
120572
- request: { method, path: path9, origin },
120573
+ request: { method, path: path8, origin },
120573
120574
  error: error4
120574
120575
  } = evt;
120575
- debugLog("request to %s %s%s errored - %s", method, origin, path9, error4.message);
120576
+ debugLog("request to %s %s%s errored - %s", method, origin, path8, error4.message);
120576
120577
  });
120577
120578
  }
120578
120579
  var isTrackingWebSocketEvents = false;
@@ -120662,7 +120663,7 @@ var require_request = __commonJS((exports, module) => {
120662
120663
 
120663
120664
  class Request3 {
120664
120665
  constructor(origin, {
120665
- path: path9,
120666
+ path: path8,
120666
120667
  method,
120667
120668
  body,
120668
120669
  headers,
@@ -120679,11 +120680,11 @@ var require_request = __commonJS((exports, module) => {
120679
120680
  maxRedirections,
120680
120681
  typeOfService
120681
120682
  }, handler) {
120682
- if (typeof path9 !== "string") {
120683
+ if (typeof path8 !== "string") {
120683
120684
  throw new InvalidArgumentError("path must be a string");
120684
- } else if (path9[0] !== "/" && !(path9.startsWith("http://") || path9.startsWith("https://")) && method !== "CONNECT") {
120685
+ } else if (path8[0] !== "/" && !(path8.startsWith("http://") || path8.startsWith("https://")) && method !== "CONNECT") {
120685
120686
  throw new InvalidArgumentError("path must be an absolute URL or start with a slash");
120686
- } else if (invalidPathRegex.test(path9)) {
120687
+ } else if (invalidPathRegex.test(path8)) {
120687
120688
  throw new InvalidArgumentError("invalid request path");
120688
120689
  }
120689
120690
  if (typeof method !== "string") {
@@ -120758,7 +120759,7 @@ var require_request = __commonJS((exports, module) => {
120758
120759
  this.completed = false;
120759
120760
  this.aborted = false;
120760
120761
  this.upgrade = upgrade || null;
120761
- this.path = query3 ? serializePathWithQuery(path9, query3) : path9;
120762
+ this.path = query3 ? serializePathWithQuery(path8, query3) : path8;
120762
120763
  this.origin = origin;
120763
120764
  this.protocol = getProtocolFromUrlString(origin);
120764
120765
  this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
@@ -121335,7 +121336,7 @@ var require_dispatcher_base = __commonJS((exports, module) => {
121335
121336
  var require_connect = __commonJS((exports, module) => {
121336
121337
  var net = __require("node:net");
121337
121338
  var assert2 = __require("node:assert");
121338
- var util = require_util5();
121339
+ var util2 = require_util5();
121339
121340
  var { InvalidArgumentError } = require_errors4();
121340
121341
  var tls;
121341
121342
  var SessionCache = class WeakSessionCache {
@@ -121392,7 +121393,7 @@ var require_connect = __commonJS((exports, module) => {
121392
121393
  if (!tls) {
121393
121394
  tls = __require("node:tls");
121394
121395
  }
121395
- servername = servername || options.servername || util.getServerName(host) || null;
121396
+ servername = servername || options.servername || util2.getServerName(host) || null;
121396
121397
  const sessionKey = servername || hostname;
121397
121398
  assert2(sessionKey);
121398
121399
  const session = customSession || sessionCache.get(sessionKey) || null;
@@ -121429,7 +121430,7 @@ var require_connect = __commonJS((exports, module) => {
121429
121430
  const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60000 : options.keepAliveInitialDelay;
121430
121431
  socket.setKeepAlive(true, keepAliveInitialDelay);
121431
121432
  }
121432
- const clearConnectTimeout = util.setupConnectTimeout(new WeakRef(socket), { timeout, hostname, port });
121433
+ const clearConnectTimeout = util2.setupConnectTimeout(new WeakRef(socket), { timeout, hostname, port });
121433
121434
  socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() {
121434
121435
  queueMicrotask(clearConnectTimeout);
121435
121436
  if (callback) {
@@ -124430,7 +124431,7 @@ var require_promise = __commonJS((exports, module) => {
124430
124431
 
124431
124432
  // ../../node_modules/.bun/undici@7.28.0/node_modules/undici/lib/web/fetch/body.js
124432
124433
  var require_body = __commonJS((exports, module) => {
124433
- var util = require_util5();
124434
+ var util2 = require_util5();
124434
124435
  var {
124435
124436
  ReadableStreamFrom: ReadableStreamFrom3,
124436
124437
  readableStreamClose,
@@ -124548,7 +124549,7 @@ ${normalizeLinefeeds(value)}\r
124548
124549
  if (keepalive) {
124549
124550
  throw new TypeError("keepalive");
124550
124551
  }
124551
- if (util.isDisturbed(object4) || object4.locked) {
124552
+ if (util2.isDisturbed(object4) || object4.locked) {
124552
124553
  throw new TypeError("Response body object should not be disturbed or locked");
124553
124554
  }
124554
124555
  stream = webidl.is.ReadableStream(object4) ? object4 : ReadableStreamFrom3(object4);
@@ -124582,7 +124583,7 @@ ${normalizeLinefeeds(value)}\r
124582
124583
  }
124583
124584
  function safelyExtractBody(object4, keepalive = false) {
124584
124585
  if (webidl.is.ReadableStream(object4)) {
124585
- assert2(!util.isDisturbed(object4), "The body has already been consumed.");
124586
+ assert2(!util2.isDisturbed(object4), "The body has already been consumed.");
124586
124587
  assert2(!object4.locked, "The stream is locked.");
124587
124588
  }
124588
124589
  return extractBody(object4, keepalive);
@@ -124683,7 +124684,7 @@ ${normalizeLinefeeds(value)}\r
124683
124684
  }
124684
124685
  function bodyUnusable(object4) {
124685
124686
  const body = object4.body;
124686
- return body != null && (body.stream.locked || util.isDisturbed(body.stream));
124687
+ return body != null && (body.stream.locked || util2.isDisturbed(body.stream));
124687
124688
  }
124688
124689
  function bodyMimeType(requestOrResponse) {
124689
124690
  const headers = requestOrResponse.headersList;
@@ -124706,7 +124707,7 @@ ${normalizeLinefeeds(value)}\r
124706
124707
  // ../../node_modules/.bun/undici@7.28.0/node_modules/undici/lib/dispatcher/client-h1.js
124707
124708
  var require_client_h1 = __commonJS((exports, module) => {
124708
124709
  var assert2 = __require("node:assert");
124709
- var util = require_util5();
124710
+ var util2 = require_util5();
124710
124711
  var { channels } = require_diagnostics();
124711
124712
  var timers = require_timers();
124712
124713
  var {
@@ -124758,7 +124759,7 @@ var require_client_h1 = __commonJS((exports, module) => {
124758
124759
  var constants2 = require_constants4();
124759
124760
  var EMPTY_BUF = Buffer.alloc(0);
124760
124761
  var FastBuffer = Buffer[Symbol.species];
124761
- var removeAllListeners = util.removeAllListeners;
124762
+ var removeAllListeners = util2.removeAllListeners;
124762
124763
  var kIdleSocketValidation = Symbol("kIdleSocketValidation");
124763
124764
  var kIdleSocketValidationTimeout = Symbol("kIdleSocketValidationTimeout");
124764
124765
  var kSocketUsed = Symbol("kSocketUsed");
@@ -124939,7 +124940,7 @@ var require_client_h1 = __commonJS((exports, module) => {
124939
124940
  }
124940
124941
  }
124941
124942
  } catch (err) {
124942
- util.destroy(socket, err);
124943
+ util2.destroy(socket, err);
124943
124944
  }
124944
124945
  }
124945
124946
  finish() {
@@ -124997,7 +124998,7 @@ var require_client_h1 = __commonJS((exports, module) => {
124997
124998
  return -1;
124998
124999
  }
124999
125000
  if (client[kRunning] === 0) {
125000
- util.destroy(socket, new SocketError("bad response", util.getSocketInfo(socket)));
125001
+ util2.destroy(socket, new SocketError("bad response", util2.getSocketInfo(socket)));
125001
125002
  return -1;
125002
125003
  }
125003
125004
  const request = client[kQueue][client[kRunningIdx]];
@@ -125027,13 +125028,13 @@ var require_client_h1 = __commonJS((exports, module) => {
125027
125028
  }
125028
125029
  const key = this.headers[len - 2];
125029
125030
  if (key.length === 10) {
125030
- const headerName = util.bufferToLowerCasedHeaderName(key);
125031
+ const headerName = util2.bufferToLowerCasedHeaderName(key);
125031
125032
  if (headerName === "keep-alive") {
125032
125033
  this.keepAlive += buf.toString();
125033
125034
  } else if (headerName === "connection") {
125034
125035
  this.connection += buf.toString();
125035
125036
  }
125036
- } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === "content-length") {
125037
+ } else if (key.length === 14 && util2.bufferToLowerCasedHeaderName(key) === "content-length") {
125037
125038
  this.contentLength += buf.toString();
125038
125039
  }
125039
125040
  this.trackHeader(buf.length);
@@ -125042,7 +125043,7 @@ var require_client_h1 = __commonJS((exports, module) => {
125042
125043
  trackHeader(len) {
125043
125044
  this.headersSize += len;
125044
125045
  if (this.headersSize >= this.headersMaxSize) {
125045
- util.destroy(this.socket, new HeadersOverflowError);
125046
+ util2.destroy(this.socket, new HeadersOverflowError);
125046
125047
  }
125047
125048
  }
125048
125049
  onUpgrade(head) {
@@ -125073,7 +125074,7 @@ var require_client_h1 = __commonJS((exports, module) => {
125073
125074
  try {
125074
125075
  request.onUpgrade(statusCode, headers, socket);
125075
125076
  } catch (err) {
125076
- util.destroy(socket, err);
125077
+ util2.destroy(socket, err);
125077
125078
  }
125078
125079
  client[kResume]();
125079
125080
  }
@@ -125083,7 +125084,7 @@ var require_client_h1 = __commonJS((exports, module) => {
125083
125084
  return -1;
125084
125085
  }
125085
125086
  if (client[kRunning] === 0) {
125086
- util.destroy(socket, new SocketError("bad response", util.getSocketInfo(socket)));
125087
+ util2.destroy(socket, new SocketError("bad response", util2.getSocketInfo(socket)));
125087
125088
  return -1;
125088
125089
  }
125089
125090
  const request = client[kQueue][client[kRunningIdx]];
@@ -125093,11 +125094,11 @@ var require_client_h1 = __commonJS((exports, module) => {
125093
125094
  assert2(!this.upgrade);
125094
125095
  assert2(this.statusCode < 200);
125095
125096
  if (statusCode === 100) {
125096
- util.destroy(socket, new SocketError("bad response", util.getSocketInfo(socket)));
125097
+ util2.destroy(socket, new SocketError("bad response", util2.getSocketInfo(socket)));
125097
125098
  return -1;
125098
125099
  }
125099
125100
  if (upgrade && !request.upgrade) {
125100
- util.destroy(socket, new SocketError("bad upgrade", util.getSocketInfo(socket)));
125101
+ util2.destroy(socket, new SocketError("bad upgrade", util2.getSocketInfo(socket)));
125101
125102
  return -1;
125102
125103
  }
125103
125104
  assert2(this.timeoutType === TIMEOUT_HEADERS);
@@ -125125,7 +125126,7 @@ var require_client_h1 = __commonJS((exports, module) => {
125125
125126
  this.headers = [];
125126
125127
  this.headersSize = 0;
125127
125128
  if (this.shouldKeepAlive && client[kPipelining]) {
125128
- const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null;
125129
+ const keepAliveTimeout = this.keepAlive ? util2.parseKeepAliveTimeout(this.keepAlive) : null;
125129
125130
  if (keepAliveTimeout != null) {
125130
125131
  const timeout = Math.min(keepAliveTimeout - client[kKeepAliveTimeoutThreshold], client[kKeepAliveMaxTimeout]);
125131
125132
  if (timeout <= 0) {
@@ -125170,7 +125171,7 @@ var require_client_h1 = __commonJS((exports, module) => {
125170
125171
  }
125171
125172
  assert2(statusCode >= 200);
125172
125173
  if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) {
125173
- util.destroy(socket, new ResponseExceededMaxSizeError);
125174
+ util2.destroy(socket, new ResponseExceededMaxSizeError);
125174
125175
  return -1;
125175
125176
  }
125176
125177
  this.bytesRead += buf.length;
@@ -125203,7 +125204,7 @@ var require_client_h1 = __commonJS((exports, module) => {
125203
125204
  return 0;
125204
125205
  }
125205
125206
  if (request.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) {
125206
- util.destroy(socket, new ResponseContentLengthMismatchError);
125207
+ util2.destroy(socket, new ResponseContentLengthMismatchError);
125207
125208
  return -1;
125208
125209
  }
125209
125210
  request.onComplete(headers);
@@ -125211,13 +125212,13 @@ var require_client_h1 = __commonJS((exports, module) => {
125211
125212
  socket[kSocketUsed] = client[kPending] === 0;
125212
125213
  if (socket[kWriting]) {
125213
125214
  assert2(client[kRunning] === 0);
125214
- util.destroy(socket, new InformationalError("reset"));
125215
+ util2.destroy(socket, new InformationalError("reset"));
125215
125216
  return constants2.ERROR.PAUSED;
125216
125217
  } else if (!shouldKeepAlive) {
125217
- util.destroy(socket, new InformationalError("reset"));
125218
+ util2.destroy(socket, new InformationalError("reset"));
125218
125219
  return constants2.ERROR.PAUSED;
125219
125220
  } else if (socket[kReset] && client[kRunning] === 0) {
125220
- util.destroy(socket, new InformationalError("reset"));
125221
+ util2.destroy(socket, new InformationalError("reset"));
125221
125222
  return constants2.ERROR.PAUSED;
125222
125223
  } else if (client[kPipelining] == null || client[kPipelining] === 1) {
125223
125224
  setImmediate(client[kResume]);
@@ -125236,15 +125237,15 @@ var require_client_h1 = __commonJS((exports, module) => {
125236
125237
  if (timeoutType === TIMEOUT_HEADERS) {
125237
125238
  if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) {
125238
125239
  assert2(!paused, "cannot be paused while waiting for headers");
125239
- util.destroy(socket, new HeadersTimeoutError);
125240
+ util2.destroy(socket, new HeadersTimeoutError);
125240
125241
  }
125241
125242
  } else if (timeoutType === TIMEOUT_BODY) {
125242
125243
  if (!paused) {
125243
- util.destroy(socket, new BodyTimeoutError);
125244
+ util2.destroy(socket, new BodyTimeoutError);
125244
125245
  }
125245
125246
  } else if (timeoutType === TIMEOUT_KEEP_ALIVE) {
125246
125247
  assert2(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]);
125247
- util.destroy(socket, new InformationalError("socket idle timeout"));
125248
+ util2.destroy(socket, new InformationalError("socket idle timeout"));
125248
125249
  }
125249
125250
  }
125250
125251
  function connectH1(client, socket) {
@@ -125266,10 +125267,10 @@ var require_client_h1 = __commonJS((exports, module) => {
125266
125267
  socket[kIdleSocketValidationTimeout] = null;
125267
125268
  socket[kSocketUsed] = false;
125268
125269
  socket[kParser] = new Parser3(client, socket, llhttpInstance);
125269
- util.addListener(socket, "error", onHttpSocketError);
125270
- util.addListener(socket, "readable", onHttpSocketReadable);
125271
- util.addListener(socket, "end", onHttpSocketEnd);
125272
- util.addListener(socket, "close", onHttpSocketClose);
125270
+ util2.addListener(socket, "error", onHttpSocketError);
125271
+ util2.addListener(socket, "readable", onHttpSocketReadable);
125272
+ util2.addListener(socket, "end", onHttpSocketEnd);
125273
+ util2.addListener(socket, "close", onHttpSocketClose);
125273
125274
  socket[kClosed] = false;
125274
125275
  socket.on("close", onSocketClose);
125275
125276
  return {
@@ -125303,7 +125304,7 @@ var require_client_h1 = __commonJS((exports, module) => {
125303
125304
  if (client[kRunning] > 0 && (request.upgrade || request.method === "CONNECT")) {
125304
125305
  return true;
125305
125306
  }
125306
- if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) {
125307
+ if (client[kRunning] > 0 && util2.bodyLength(request.body) !== 0 && (util2.isStream(request.body) || util2.isAsyncIterable(request.body) || util2.isFormDataLike(request.body))) {
125307
125308
  return true;
125308
125309
  }
125309
125310
  }
@@ -125333,11 +125334,11 @@ var require_client_h1 = __commonJS((exports, module) => {
125333
125334
  if (parser.statusCode && !parser.shouldKeepAlive) {
125334
125335
  const parserErr = parser.finish();
125335
125336
  if (parserErr) {
125336
- util.destroy(this, parserErr);
125337
+ util2.destroy(this, parserErr);
125337
125338
  }
125338
125339
  return;
125339
125340
  }
125340
- util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this)));
125341
+ util2.destroy(this, new SocketError("other side closed", util2.getSocketInfo(this)));
125341
125342
  }
125342
125343
  function onHttpSocketClose() {
125343
125344
  const parser = this[kParser];
@@ -125349,7 +125350,7 @@ var require_client_h1 = __commonJS((exports, module) => {
125349
125350
  this[kParser].destroy();
125350
125351
  this[kParser] = null;
125351
125352
  }
125352
- const err = this[kError] || new SocketError("closed", util.getSocketInfo(this));
125353
+ const err = this[kError] || new SocketError("closed", util2.getSocketInfo(this));
125353
125354
  const client = this[kClient];
125354
125355
  client[kSocket] = null;
125355
125356
  client[kHTTPContext] = null;
@@ -125358,12 +125359,12 @@ var require_client_h1 = __commonJS((exports, module) => {
125358
125359
  const requests = client[kQueue].splice(client[kRunningIdx]);
125359
125360
  for (let i2 = 0;i2 < requests.length; i2++) {
125360
125361
  const request = requests[i2];
125361
- util.errorRequest(client, request, err);
125362
+ util2.errorRequest(client, request, err);
125362
125363
  }
125363
125364
  } else if (client[kRunning] > 0 && err.code !== "UND_ERR_INFO") {
125364
125365
  const request = client[kQueue][client[kRunningIdx]];
125365
125366
  client[kQueue][client[kRunningIdx]++] = null;
125366
- util.errorRequest(client, request, err);
125367
+ util2.errorRequest(client, request, err);
125367
125368
  }
125368
125369
  client[kPendingIdx] = client[kRunningIdx];
125369
125370
  assert2(client[kRunning] === 0);
@@ -125443,10 +125444,10 @@ var require_client_h1 = __commonJS((exports, module) => {
125443
125444
  return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT";
125444
125445
  }
125445
125446
  function writeH1(client, request) {
125446
- const { method, path: path9, host, upgrade, blocking, reset } = request;
125447
+ const { method, path: path8, host, upgrade, blocking, reset } = request;
125447
125448
  let { body, headers, contentLength } = request;
125448
125449
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH";
125449
- if (util.isFormDataLike(body)) {
125450
+ if (util2.isFormDataLike(body)) {
125450
125451
  if (!extractBody) {
125451
125452
  extractBody = require_body().extractBody;
125452
125453
  }
@@ -125456,13 +125457,13 @@ var require_client_h1 = __commonJS((exports, module) => {
125456
125457
  }
125457
125458
  body = bodyStream.stream;
125458
125459
  contentLength = bodyStream.length;
125459
- } else if (util.isBlobLike(body) && request.contentType == null && body.type) {
125460
+ } else if (util2.isBlobLike(body) && request.contentType == null && body.type) {
125460
125461
  headers.push("content-type", body.type);
125461
125462
  }
125462
125463
  if (body && typeof body.read === "function") {
125463
125464
  body.read(0);
125464
125465
  }
125465
- const bodyLength = util.bodyLength(body);
125466
+ const bodyLength = util2.bodyLength(body);
125466
125467
  contentLength = bodyLength ?? contentLength;
125467
125468
  if (contentLength === null) {
125468
125469
  contentLength = request.contentLength;
@@ -125472,7 +125473,7 @@ var require_client_h1 = __commonJS((exports, module) => {
125472
125473
  }
125473
125474
  if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) {
125474
125475
  if (client[kStrictContentLength]) {
125475
- util.errorRequest(client, request, new RequestContentLengthMismatchError);
125476
+ util2.errorRequest(client, request, new RequestContentLengthMismatchError);
125476
125477
  return false;
125477
125478
  }
125478
125479
  process.emitWarning(new RequestContentLengthMismatchError);
@@ -125483,14 +125484,14 @@ var require_client_h1 = __commonJS((exports, module) => {
125483
125484
  if (request.aborted || request.completed) {
125484
125485
  return;
125485
125486
  }
125486
- util.errorRequest(client, request, err || new RequestAbortedError2);
125487
- util.destroy(body);
125488
- util.destroy(socket, new InformationalError("aborted"));
125487
+ util2.errorRequest(client, request, err || new RequestAbortedError2);
125488
+ util2.destroy(body);
125489
+ util2.destroy(socket, new InformationalError("aborted"));
125489
125490
  };
125490
125491
  try {
125491
125492
  request.onConnect(abort);
125492
125493
  } catch (err) {
125493
- util.errorRequest(client, request, err);
125494
+ util2.errorRequest(client, request, err);
125494
125495
  }
125495
125496
  if (request.aborted) {
125496
125497
  return false;
@@ -125513,7 +125514,7 @@ var require_client_h1 = __commonJS((exports, module) => {
125513
125514
  if (socket.setTypeOfService) {
125514
125515
  socket.setTypeOfService(request.typeOfService);
125515
125516
  }
125516
- let header = `${method} ${path9} HTTP/1.1\r
125517
+ let header = `${method} ${path8} HTTP/1.1\r
125517
125518
  `;
125518
125519
  if (typeof host === "string") {
125519
125520
  header += `host: ${host}\r
@@ -125552,17 +125553,17 @@ upgrade: ${upgrade}\r
125552
125553
  }
125553
125554
  if (!body || bodyLength === 0) {
125554
125555
  writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload);
125555
- } else if (util.isBuffer(body)) {
125556
+ } else if (util2.isBuffer(body)) {
125556
125557
  writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload);
125557
- } else if (util.isBlobLike(body)) {
125558
+ } else if (util2.isBlobLike(body)) {
125558
125559
  if (typeof body.stream === "function") {
125559
125560
  writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload);
125560
125561
  } else {
125561
125562
  writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload);
125562
125563
  }
125563
- } else if (util.isStream(body)) {
125564
+ } else if (util2.isStream(body)) {
125564
125565
  writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload);
125565
- } else if (util.isIterable(body)) {
125566
+ } else if (util2.isIterable(body)) {
125566
125567
  writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload);
125567
125568
  } else {
125568
125569
  assert2(false);
@@ -125582,7 +125583,7 @@ upgrade: ${upgrade}\r
125582
125583
  this.pause();
125583
125584
  }
125584
125585
  } catch (err) {
125585
- util.destroy(this, err);
125586
+ util2.destroy(this, err);
125586
125587
  }
125587
125588
  };
125588
125589
  const onDrain = function() {
@@ -125619,9 +125620,9 @@ upgrade: ${upgrade}\r
125619
125620
  }
125620
125621
  writer.destroy(err);
125621
125622
  if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) {
125622
- util.destroy(body, err);
125623
+ util2.destroy(body, err);
125623
125624
  } else {
125624
- util.destroy(body);
125625
+ util2.destroy(body);
125625
125626
  }
125626
125627
  };
125627
125628
  body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onClose);
@@ -125650,7 +125651,7 @@ upgrade: ${upgrade}\r
125650
125651
  socket.write(`${header}\r
125651
125652
  `, "latin1");
125652
125653
  }
125653
- } else if (util.isBuffer(body)) {
125654
+ } else if (util2.isBuffer(body)) {
125654
125655
  assert2(contentLength === body.byteLength, "buffer body must have content length");
125655
125656
  socket.cork();
125656
125657
  socket.write(`${header}content-length: ${contentLength}\r
@@ -125846,7 +125847,7 @@ ${len.toString(16)}\r
125846
125847
  var require_client_h2 = __commonJS((exports, module) => {
125847
125848
  var assert2 = __require("node:assert");
125848
125849
  var { pipeline: pipeline4 } = __require("node:stream");
125849
- var util = require_util5();
125850
+ var util2 = require_util5();
125850
125851
  var {
125851
125852
  RequestContentLengthMismatchError,
125852
125853
  RequestAbortedError: RequestAbortedError2,
@@ -125942,20 +125943,20 @@ var require_client_h2 = __commonJS((exports, module) => {
125942
125943
  session[kEnableConnectProtocol] = false;
125943
125944
  session[kRemoteSettings] = false;
125944
125945
  if (http2ConnectionWindowSize) {
125945
- util.addListener(session, "connect", applyConnectionWindowSize.bind(session, http2ConnectionWindowSize));
125946
- }
125947
- util.addListener(session, "error", onHttp2SessionError);
125948
- util.addListener(session, "frameError", onHttp2FrameError);
125949
- util.addListener(session, "end", onHttp2SessionEnd);
125950
- util.addListener(session, "goaway", onHttp2SessionGoAway);
125951
- util.addListener(session, "close", onHttp2SessionClose);
125952
- util.addListener(session, "remoteSettings", onHttp2RemoteSettings);
125946
+ util2.addListener(session, "connect", applyConnectionWindowSize.bind(session, http2ConnectionWindowSize));
125947
+ }
125948
+ util2.addListener(session, "error", onHttp2SessionError);
125949
+ util2.addListener(session, "frameError", onHttp2FrameError);
125950
+ util2.addListener(session, "end", onHttp2SessionEnd);
125951
+ util2.addListener(session, "goaway", onHttp2SessionGoAway);
125952
+ util2.addListener(session, "close", onHttp2SessionClose);
125953
+ util2.addListener(session, "remoteSettings", onHttp2RemoteSettings);
125953
125954
  session.unref();
125954
125955
  client[kHTTP2Session] = session;
125955
125956
  socket[kHTTP2Session] = session;
125956
- util.addListener(socket, "error", onHttp2SocketError);
125957
- util.addListener(socket, "end", onHttp2SocketEnd);
125958
- util.addListener(socket, "close", onHttp2SocketClose);
125957
+ util2.addListener(socket, "error", onHttp2SocketError);
125958
+ util2.addListener(socket, "end", onHttp2SocketEnd);
125959
+ util2.addListener(socket, "close", onHttp2SocketClose);
125959
125960
  socket[kClosed] = false;
125960
125961
  socket.on("close", onSocketClose);
125961
125962
  return {
@@ -125984,7 +125985,7 @@ var require_client_h2 = __commonJS((exports, module) => {
125984
125985
  return true;
125985
125986
  if ((request.upgrade === "websocket" || request.method === "CONNECT") && session[kRemoteSettings] === false)
125986
125987
  return true;
125987
- if (util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body)))
125988
+ if (util2.bodyLength(request.body) !== 0 && (util2.isStream(request.body) || util2.isAsyncIterable(request.body) || util2.isFormDataLike(request.body)))
125988
125989
  return true;
125989
125990
  } else {
125990
125991
  return (request.upgrade === "websocket" || request.method === "CONNECT") && session[kRemoteSettings] === false;
@@ -126058,22 +126059,22 @@ var require_client_h2 = __commonJS((exports, module) => {
126058
126059
  }
126059
126060
  }
126060
126061
  function onHttp2SessionEnd() {
126061
- const err = new SocketError("other side closed", util.getSocketInfo(this[kSocket]));
126062
+ const err = new SocketError("other side closed", util2.getSocketInfo(this[kSocket]));
126062
126063
  this.destroy(err);
126063
- util.destroy(this[kSocket], err);
126064
+ util2.destroy(this[kSocket], err);
126064
126065
  }
126065
126066
  function onHttp2SessionGoAway(errorCode) {
126066
- const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${errorCode}`, util.getSocketInfo(this[kSocket]));
126067
+ const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${errorCode}`, util2.getSocketInfo(this[kSocket]));
126067
126068
  const client = this[kClient];
126068
126069
  client[kSocket] = null;
126069
126070
  client[kHTTPContext] = null;
126070
126071
  this.close();
126071
126072
  this[kHTTP2Session] = null;
126072
- util.destroy(this[kSocket], err);
126073
+ util2.destroy(this[kSocket], err);
126073
126074
  if (client[kRunningIdx] < client[kQueue].length) {
126074
126075
  const request = client[kQueue][client[kRunningIdx]];
126075
126076
  client[kQueue][client[kRunningIdx]++] = null;
126076
- util.errorRequest(client, request, err);
126077
+ util2.errorRequest(client, request, err);
126077
126078
  client[kPendingIdx] = client[kRunningIdx];
126078
126079
  }
126079
126080
  assert2(client[kRunning] === 0);
@@ -126084,7 +126085,7 @@ var require_client_h2 = __commonJS((exports, module) => {
126084
126085
  function onHttp2SessionClose() {
126085
126086
  const { [kClient]: client, [kHTTP2SessionState]: state } = this;
126086
126087
  const { [kSocket]: socket } = client;
126087
- const err = this[kSocket][kError] || this[kError] || new SocketError("closed", util.getSocketInfo(socket));
126088
+ const err = this[kSocket][kError] || this[kError] || new SocketError("closed", util2.getSocketInfo(socket));
126088
126089
  client[kSocket] = null;
126089
126090
  client[kHTTPContext] = null;
126090
126091
  if (state.ping.interval != null) {
@@ -126096,12 +126097,12 @@ var require_client_h2 = __commonJS((exports, module) => {
126096
126097
  const requests = client[kQueue].splice(client[kRunningIdx]);
126097
126098
  for (let i2 = 0;i2 < requests.length; i2++) {
126098
126099
  const request = requests[i2];
126099
- util.errorRequest(client, request, err);
126100
+ util2.errorRequest(client, request, err);
126100
126101
  }
126101
126102
  }
126102
126103
  }
126103
126104
  function onHttp2SocketClose() {
126104
- const err = this[kError] || new SocketError("closed", util.getSocketInfo(this));
126105
+ const err = this[kError] || new SocketError("closed", util2.getSocketInfo(this));
126105
126106
  const client = this[kHTTP2Session][kClient];
126106
126107
  client[kSocket] = null;
126107
126108
  client[kHTTPContext] = null;
@@ -126119,7 +126120,7 @@ var require_client_h2 = __commonJS((exports, module) => {
126119
126120
  this[kClient][kOnError](err);
126120
126121
  }
126121
126122
  function onHttp2SocketEnd() {
126122
- util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this)));
126123
+ util2.destroy(this, new SocketError("other side closed", util2.getSocketInfo(this)));
126123
126124
  }
126124
126125
  function onSocketClose() {
126125
126126
  this[kClosed] = true;
@@ -126130,10 +126131,10 @@ var require_client_h2 = __commonJS((exports, module) => {
126130
126131
  function writeH2(client, request) {
126131
126132
  const requestTimeout = request.bodyTimeout ?? client[kBodyTimeout];
126132
126133
  const session = client[kHTTP2Session];
126133
- const { method, path: path9, host, upgrade, expectContinue, signal, protocol, headers: reqHeaders } = request;
126134
+ const { method, path: path8, host, upgrade, expectContinue, signal, protocol, headers: reqHeaders } = request;
126134
126135
  let { body } = request;
126135
126136
  if (upgrade != null && upgrade !== "websocket") {
126136
- util.errorRequest(client, request, new InvalidArgumentError(`Custom upgrade "${upgrade}" not supported over HTTP/2`));
126137
+ util2.errorRequest(client, request, new InvalidArgumentError(`Custom upgrade "${upgrade}" not supported over HTTP/2`));
126137
126138
  return false;
126138
126139
  }
126139
126140
  const headers = {};
@@ -126171,19 +126172,19 @@ var require_client_h2 = __commonJS((exports, module) => {
126171
126172
  return;
126172
126173
  }
126173
126174
  err = err || new RequestAbortedError2;
126174
- util.errorRequest(client, request, err);
126175
+ util2.errorRequest(client, request, err);
126175
126176
  if (stream != null) {
126176
126177
  stream.removeAllListeners("data");
126177
126178
  stream.close();
126178
126179
  client[kOnError](err);
126179
126180
  client[kResume]();
126180
126181
  }
126181
- util.destroy(body, err);
126182
+ util2.destroy(body, err);
126182
126183
  };
126183
126184
  try {
126184
126185
  request.onConnect(abort);
126185
126186
  } catch (err) {
126186
- util.errorRequest(client, request, err);
126187
+ util2.errorRequest(client, request, err);
126187
126188
  }
126188
126189
  if (request.aborted) {
126189
126190
  return false;
@@ -126192,13 +126193,13 @@ var require_client_h2 = __commonJS((exports, module) => {
126192
126193
  session.ref();
126193
126194
  if (upgrade === "websocket") {
126194
126195
  if (session[kEnableConnectProtocol] === false) {
126195
- util.errorRequest(client, request, new InformationalError("HTTP/2: Extended CONNECT protocol not supported by server"));
126196
+ util2.errorRequest(client, request, new InformationalError("HTTP/2: Extended CONNECT protocol not supported by server"));
126196
126197
  session.unref();
126197
126198
  return false;
126198
126199
  }
126199
126200
  headers[HTTP2_HEADER_METHOD] = "CONNECT";
126200
126201
  headers[HTTP2_HEADER_PROTOCOL] = "websocket";
126201
- headers[HTTP2_HEADER_PATH] = path9;
126202
+ headers[HTTP2_HEADER_PATH] = path8;
126202
126203
  if (protocol === "ws:" || protocol === "wss:") {
126203
126204
  headers[HTTP2_HEADER_SCHEME] = protocol === "ws:" ? "http" : "https";
126204
126205
  } else {
@@ -126241,14 +126242,14 @@ var require_client_h2 = __commonJS((exports, module) => {
126241
126242
  stream.setTimeout(requestTimeout);
126242
126243
  return true;
126243
126244
  }
126244
- headers[HTTP2_HEADER_PATH] = path9;
126245
+ headers[HTTP2_HEADER_PATH] = path8;
126245
126246
  headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https";
126246
126247
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
126247
126248
  if (body && typeof body.read === "function") {
126248
126249
  body.read(0);
126249
126250
  }
126250
- let contentLength = util.bodyLength(body);
126251
- if (util.isFormDataLike(body)) {
126251
+ let contentLength = util2.bodyLength(body);
126252
+ if (util2.isFormDataLike(body)) {
126252
126253
  extractBody ??= require_body().extractBody;
126253
126254
  const [bodyStream, contentType] = extractBody(body);
126254
126255
  headers["content-type"] = contentType;
@@ -126263,7 +126264,7 @@ var require_client_h2 = __commonJS((exports, module) => {
126263
126264
  }
126264
126265
  if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) {
126265
126266
  if (client[kStrictContentLength]) {
126266
- util.errorRequest(client, request, new RequestContentLengthMismatchError);
126267
+ util2.errorRequest(client, request, new RequestContentLengthMismatchError);
126267
126268
  return false;
126268
126269
  }
126269
126270
  process.emitWarning(new RequestContentLengthMismatchError);
@@ -126371,17 +126372,17 @@ var require_client_h2 = __commonJS((exports, module) => {
126371
126372
  function writeBodyH2() {
126372
126373
  if (!body || contentLength === 0) {
126373
126374
  writeBuffer(abort, stream, null, client, request, client[kSocket], contentLength, expectsPayload);
126374
- } else if (util.isBuffer(body)) {
126375
+ } else if (util2.isBuffer(body)) {
126375
126376
  writeBuffer(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload);
126376
- } else if (util.isBlobLike(body)) {
126377
+ } else if (util2.isBlobLike(body)) {
126377
126378
  if (typeof body.stream === "function") {
126378
126379
  writeIterable(abort, stream, body.stream(), client, request, client[kSocket], contentLength, expectsPayload);
126379
126380
  } else {
126380
126381
  writeBlob(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload);
126381
126382
  }
126382
- } else if (util.isStream(body)) {
126383
+ } else if (util2.isStream(body)) {
126383
126384
  writeStream(abort, client[kSocket], expectsPayload, stream, body, client, request, contentLength);
126384
- } else if (util.isIterable(body)) {
126385
+ } else if (util2.isIterable(body)) {
126385
126386
  writeIterable(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload);
126386
126387
  } else {
126387
126388
  assert2(false);
@@ -126390,7 +126391,7 @@ var require_client_h2 = __commonJS((exports, module) => {
126390
126391
  }
126391
126392
  function writeBuffer(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) {
126392
126393
  try {
126393
- if (body != null && util.isBuffer(body)) {
126394
+ if (body != null && util2.isBuffer(body)) {
126394
126395
  assert2(contentLength === body.byteLength, "buffer body must have content length");
126395
126396
  h2stream.cork();
126396
126397
  h2stream.write(body);
@@ -126411,10 +126412,10 @@ var require_client_h2 = __commonJS((exports, module) => {
126411
126412
  assert2(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
126412
126413
  const pipe2 = pipeline4(body, h2stream, (err) => {
126413
126414
  if (err) {
126414
- util.destroy(pipe2, err);
126415
+ util2.destroy(pipe2, err);
126415
126416
  abort(err);
126416
126417
  } else {
126417
- util.removeAllListeners(pipe2);
126418
+ util2.removeAllListeners(pipe2);
126418
126419
  request.onRequestSent();
126419
126420
  if (!expectsPayload) {
126420
126421
  socket[kReset] = true;
@@ -126422,7 +126423,7 @@ var require_client_h2 = __commonJS((exports, module) => {
126422
126423
  client[kResume]();
126423
126424
  }
126424
126425
  });
126425
- util.addListener(pipe2, "data", onPipeData);
126426
+ util2.addListener(pipe2, "data", onPipeData);
126426
126427
  function onPipeData(chunk) {
126427
126428
  request.onBodySent(chunk);
126428
126429
  }
@@ -126498,7 +126499,7 @@ var require_client = __commonJS((exports, module) => {
126498
126499
  var assert2 = __require("node:assert");
126499
126500
  var net = __require("node:net");
126500
126501
  var http3 = __require("node:http");
126501
- var util = require_util5();
126502
+ var util2 = require_util5();
126502
126503
  var { ClientStats } = require_stats();
126503
126504
  var { channels } = require_diagnostics();
126504
126505
  var Request3 = require_request();
@@ -126692,7 +126693,7 @@ var require_client = __commonJS((exports, module) => {
126692
126693
  ...allowH2 != null ? { allowH2 } : null
126693
126694
  }, callback);
126694
126695
  }
126695
- this[kUrl] = util.parseOrigin(url);
126696
+ this[kUrl] = util2.parseOrigin(url);
126696
126697
  this[kConnector] = connect2;
126697
126698
  this[kPipelining] = pipelining != null ? pipelining : 1;
126698
126699
  this[kMaxHeadersSize] = maxHeaderSize;
@@ -126755,7 +126756,7 @@ var require_client = __commonJS((exports, module) => {
126755
126756
  [kDispatch](opts, handler) {
126756
126757
  const request = new Request3(this[kUrl].origin, opts, handler);
126757
126758
  this[kQueue].push(request);
126758
- if (this[kResuming]) {} else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) {
126759
+ if (this[kResuming]) {} else if (util2.bodyLength(request.body) == null && util2.isIterable(request.body)) {
126759
126760
  this[kResuming] = 1;
126760
126761
  queueMicrotask(() => resume(this));
126761
126762
  } else {
@@ -126780,7 +126781,7 @@ var require_client = __commonJS((exports, module) => {
126780
126781
  const requests = this[kQueue].splice(this[kPendingIdx]);
126781
126782
  for (let i2 = 0;i2 < requests.length; i2++) {
126782
126783
  const request = requests[i2];
126783
- util.errorRequest(this, request, err);
126784
+ util2.errorRequest(this, request, err);
126784
126785
  }
126785
126786
  const callback = () => {
126786
126787
  if (this[kClosedResolve]) {
@@ -126805,7 +126806,7 @@ var require_client = __commonJS((exports, module) => {
126805
126806
  const requests = client[kQueue].splice(client[kRunningIdx]);
126806
126807
  for (let i2 = 0;i2 < requests.length; i2++) {
126807
126808
  const request = requests[i2];
126808
- util.errorRequest(client, request, err);
126809
+ util2.errorRequest(client, request, err);
126809
126810
  }
126810
126811
  assert2(client[kSize] === 0);
126811
126812
  }
@@ -126851,7 +126852,7 @@ var require_client = __commonJS((exports, module) => {
126851
126852
  return;
126852
126853
  }
126853
126854
  if (client.destroyed) {
126854
- util.destroy(socket.on("error", noop4), new ClientDestroyedError);
126855
+ util2.destroy(socket.on("error", noop4), new ClientDestroyedError);
126855
126856
  client[kResume]();
126856
126857
  return;
126857
126858
  }
@@ -126916,7 +126917,7 @@ var require_client = __commonJS((exports, module) => {
126916
126917
  assert2(client[kRunning] === 0);
126917
126918
  while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) {
126918
126919
  const request = client[kQueue][client[kPendingIdx]++];
126919
- util.errorRequest(client, request, err);
126920
+ util2.errorRequest(client, request, err);
126920
126921
  }
126921
126922
  } else {
126922
126923
  onError(client, err);
@@ -127251,7 +127252,7 @@ var require_pool = __commonJS((exports, module) => {
127251
127252
  var {
127252
127253
  InvalidArgumentError
127253
127254
  } = require_errors4();
127254
- var util = require_util5();
127255
+ var util2 = require_util5();
127255
127256
  var { kUrl } = require_symbols();
127256
127257
  var buildConnector = require_connect();
127257
127258
  var kOptions = Symbol("options");
@@ -127298,8 +127299,8 @@ var require_pool = __commonJS((exports, module) => {
127298
127299
  }
127299
127300
  super(options);
127300
127301
  this[kConnections] = connections || null;
127301
- this[kUrl] = util.parseOrigin(origin);
127302
- this[kOptions] = { ...util.deepClone(options), connect, allowH2, clientTtl, socketPath };
127302
+ this[kUrl] = util2.parseOrigin(origin);
127303
+ this[kOptions] = { ...util2.deepClone(options), connect, allowH2, clientTtl, socketPath };
127303
127304
  this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : undefined;
127304
127305
  this[kFactory] = factory;
127305
127306
  this.on("connect", (origin2, targets) => {
@@ -127353,7 +127354,7 @@ var require_balanced_pool = __commonJS((exports, module) => {
127353
127354
  } = require_pool_base();
127354
127355
  var Pool = require_pool();
127355
127356
  var { kUrl } = require_symbols();
127356
- var util = require_util5();
127357
+ var util2 = require_util5();
127357
127358
  var kFactory = Symbol("factory");
127358
127359
  var kOptions = Symbol("options");
127359
127360
  var kGreatestCommonDivisor = Symbol("kGreatestCommonDivisor");
@@ -127382,7 +127383,7 @@ var require_balanced_pool = __commonJS((exports, module) => {
127382
127383
  throw new InvalidArgumentError("factory must be a function.");
127383
127384
  }
127384
127385
  super(opts);
127385
- this[kOptions] = { ...util.deepClone(opts) };
127386
+ this[kOptions] = { ...util2.deepClone(opts) };
127386
127387
  this[kOptions].interceptors = opts.interceptors ? { ...opts.interceptors } : undefined;
127387
127388
  this[kIndex] = -1;
127388
127389
  this[kCurrentWeight] = 0;
@@ -127398,7 +127399,7 @@ var require_balanced_pool = __commonJS((exports, module) => {
127398
127399
  this._updateBalancedPoolStats();
127399
127400
  }
127400
127401
  addUpstream(upstream) {
127401
- const upstreamOrigin = util.parseOrigin(upstream).origin;
127402
+ const upstreamOrigin = util2.parseOrigin(upstream).origin;
127402
127403
  if (this[kClients].find((pool2) => pool2[kUrl].origin === upstreamOrigin && pool2.closed !== true && pool2.destroyed !== true)) {
127403
127404
  return this;
127404
127405
  }
@@ -127432,7 +127433,7 @@ var require_balanced_pool = __commonJS((exports, module) => {
127432
127433
  this[kGreatestCommonDivisor] = result;
127433
127434
  }
127434
127435
  removeUpstream(upstream) {
127435
- const upstreamOrigin = util.parseOrigin(upstream).origin;
127436
+ const upstreamOrigin = util2.parseOrigin(upstream).origin;
127436
127437
  const pool = this[kClients].find((pool2) => pool2[kUrl].origin === upstreamOrigin && pool2.closed !== true && pool2.destroyed !== true);
127437
127438
  if (pool) {
127438
127439
  this[kRemoveClient](pool);
@@ -127440,7 +127441,7 @@ var require_balanced_pool = __commonJS((exports, module) => {
127440
127441
  return this;
127441
127442
  }
127442
127443
  getUpstream(upstream) {
127443
- const upstreamOrigin = util.parseOrigin(upstream).origin;
127444
+ const upstreamOrigin = util2.parseOrigin(upstream).origin;
127444
127445
  return this[kClients].find((pool) => pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true);
127445
127446
  }
127446
127447
  get upstreams() {
@@ -127498,7 +127499,7 @@ var require_round_robin_pool = __commonJS((exports, module) => {
127498
127499
  var {
127499
127500
  InvalidArgumentError
127500
127501
  } = require_errors4();
127501
- var util = require_util5();
127502
+ var util2 = require_util5();
127502
127503
  var { kUrl } = require_symbols();
127503
127504
  var buildConnector = require_connect();
127504
127505
  var kOptions = Symbol("options");
@@ -127546,8 +127547,8 @@ var require_round_robin_pool = __commonJS((exports, module) => {
127546
127547
  }
127547
127548
  super();
127548
127549
  this[kConnections] = connections || null;
127549
- this[kUrl] = util.parseOrigin(origin);
127550
- this[kOptions] = { ...util.deepClone(options), connect, allowH2, clientTtl, socketPath };
127550
+ this[kUrl] = util2.parseOrigin(origin);
127551
+ this[kOptions] = { ...util2.deepClone(options), connect, allowH2, clientTtl, socketPath };
127551
127552
  this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : undefined;
127552
127553
  this[kFactory] = factory;
127553
127554
  this[kIndex] = -1;
@@ -127606,7 +127607,7 @@ var require_agent = __commonJS((exports, module) => {
127606
127607
  var DispatcherBase = require_dispatcher_base();
127607
127608
  var Pool = require_pool();
127608
127609
  var Client2 = require_client();
127609
- var util = require_util5();
127610
+ var util2 = require_util5();
127610
127611
  var kOnConnect = Symbol("onConnect");
127611
127612
  var kOnDisconnect = Symbol("onDisconnect");
127612
127613
  var kOnConnectionError = Symbol("onConnectionError");
@@ -127633,7 +127634,7 @@ var require_agent = __commonJS((exports, module) => {
127633
127634
  if (connect && typeof connect !== "function") {
127634
127635
  connect = { ...connect };
127635
127636
  }
127636
- this[kOptions] = { ...util.deepClone(options), maxOrigins, connect };
127637
+ this[kOptions] = { ...util2.deepClone(options), maxOrigins, connect };
127637
127638
  this[kFactory] = factory;
127638
127639
  this[kClients] = new Map;
127639
127640
  this[kOrigins] = new Set;
@@ -128431,10 +128432,10 @@ var require_proxy_agent = __commonJS((exports, module) => {
128431
128432
  };
128432
128433
  const {
128433
128434
  origin,
128434
- path: path9 = "/",
128435
+ path: path8 = "/",
128435
128436
  headers = {}
128436
128437
  } = opts;
128437
- opts.path = origin + path9;
128438
+ opts.path = origin + path8;
128438
128439
  if (!("host" in headers) && !("Host" in headers)) {
128439
128440
  const { host } = new URL(origin);
128440
128441
  headers.host = host;
@@ -129091,7 +129092,7 @@ var require_readable = __commonJS((exports, module) => {
129091
129092
  var assert2 = __require("node:assert");
129092
129093
  var { Readable: Readable3 } = __require("node:stream");
129093
129094
  var { RequestAbortedError: RequestAbortedError2, NotSupportedError, InvalidArgumentError, AbortError: AbortError4 } = require_errors4();
129094
- var util = require_util5();
129095
+ var util2 = require_util5();
129095
129096
  var { ReadableStreamFrom: ReadableStreamFrom3 } = require_util5();
129096
129097
  var kConsume = Symbol("kConsume");
129097
129098
  var kReading = Symbol("kReading");
@@ -129188,7 +129189,7 @@ var require_readable = __commonJS((exports, module) => {
129188
129189
  throw new NotSupportedError;
129189
129190
  }
129190
129191
  get bodyUsed() {
129191
- return util.isDisturbed(this);
129192
+ return util2.isDisturbed(this);
129192
129193
  }
129193
129194
  get body() {
129194
129195
  if (!this[kBody]) {
@@ -129250,7 +129251,7 @@ var require_readable = __commonJS((exports, module) => {
129250
129251
  return bodyReadable[kBody]?.locked === true || bodyReadable[kConsume] !== null;
129251
129252
  }
129252
129253
  function isUnusable(bodyReadable) {
129253
- return util.isDisturbed(bodyReadable) || isLocked(bodyReadable);
129254
+ return util2.isDisturbed(bodyReadable) || isLocked(bodyReadable);
129254
129255
  }
129255
129256
  function consume(stream, type) {
129256
129257
  assert2(!stream[kConsume]);
@@ -129392,7 +129393,7 @@ var require_api_request = __commonJS((exports, module) => {
129392
129393
  var { AsyncResource } = __require("node:async_hooks");
129393
129394
  var { Readable: Readable3 } = require_readable();
129394
129395
  var { InvalidArgumentError, RequestAbortedError: RequestAbortedError2 } = require_errors4();
129395
- var util = require_util5();
129396
+ var util2 = require_util5();
129396
129397
  function noop4() {}
129397
129398
 
129398
129399
  class RequestHandler extends AsyncResource {
@@ -129419,8 +129420,8 @@ var require_api_request = __commonJS((exports, module) => {
129419
129420
  }
129420
129421
  super("UNDICI_REQUEST");
129421
129422
  } catch (err) {
129422
- if (util.isStream(body)) {
129423
- util.destroy(body.on("error", noop4), err);
129423
+ if (util2.isStream(body)) {
129424
+ util2.destroy(body.on("error", noop4), err);
129424
129425
  }
129425
129426
  throw err;
129426
129427
  }
@@ -129440,10 +129441,10 @@ var require_api_request = __commonJS((exports, module) => {
129440
129441
  if (signal?.aborted) {
129441
129442
  this.reason = signal.reason ?? new RequestAbortedError2;
129442
129443
  } else if (signal) {
129443
- this.removeAbortListener = util.addAbortListener(signal, () => {
129444
+ this.removeAbortListener = util2.addAbortListener(signal, () => {
129444
129445
  this.reason = signal.reason ?? new RequestAbortedError2;
129445
129446
  if (this.res) {
129446
- util.destroy(this.res.on("error", noop4), this.reason);
129447
+ util2.destroy(this.res.on("error", noop4), this.reason);
129447
129448
  } else if (this.abort) {
129448
129449
  this.abort(this.reason);
129449
129450
  }
@@ -129461,14 +129462,14 @@ var require_api_request = __commonJS((exports, module) => {
129461
129462
  }
129462
129463
  onHeaders(statusCode, rawHeaders, resume, statusMessage) {
129463
129464
  const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this;
129464
- const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
129465
+ const headers = responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders);
129465
129466
  if (statusCode < 200) {
129466
129467
  if (this.onInfo) {
129467
129468
  this.onInfo({ statusCode, headers });
129468
129469
  }
129469
129470
  return;
129470
129471
  }
129471
- const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers;
129472
+ const parsedHeaders = responseHeaders === "raw" ? util2.parseHeaders(rawHeaders) : headers;
129472
129473
  const contentType = parsedHeaders["content-type"];
129473
129474
  const contentLength = parsedHeaders["content-length"];
129474
129475
  const res = new Readable3({
@@ -129497,7 +129498,7 @@ var require_api_request = __commonJS((exports, module) => {
129497
129498
  });
129498
129499
  } catch (err) {
129499
129500
  this.res = null;
129500
- util.destroy(res.on("error", noop4), err);
129501
+ util2.destroy(res.on("error", noop4), err);
129501
129502
  queueMicrotask(() => {
129502
129503
  throw err;
129503
129504
  });
@@ -129508,7 +129509,7 @@ var require_api_request = __commonJS((exports, module) => {
129508
129509
  return this.res.push(chunk);
129509
129510
  }
129510
129511
  onComplete(trailers) {
129511
- util.parseHeaders(trailers, this.trailers);
129512
+ util2.parseHeaders(trailers, this.trailers);
129512
129513
  this.res.push(null);
129513
129514
  }
129514
129515
  onError(err) {
@@ -129522,14 +129523,14 @@ var require_api_request = __commonJS((exports, module) => {
129522
129523
  if (res) {
129523
129524
  this.res = null;
129524
129525
  queueMicrotask(() => {
129525
- util.destroy(res.on("error", noop4), err);
129526
+ util2.destroy(res.on("error", noop4), err);
129526
129527
  });
129527
129528
  }
129528
129529
  if (body) {
129529
129530
  this.body = null;
129530
- if (util.isStream(body)) {
129531
+ if (util2.isStream(body)) {
129531
129532
  body.on("error", noop4);
129532
- util.destroy(body, err);
129533
+ util2.destroy(body, err);
129533
129534
  }
129534
129535
  }
129535
129536
  if (this.removeAbortListener) {
@@ -129616,7 +129617,7 @@ var require_api_stream = __commonJS((exports, module) => {
129616
129617
  var { finished: finished2 } = __require("node:stream");
129617
129618
  var { AsyncResource } = __require("node:async_hooks");
129618
129619
  var { InvalidArgumentError, InvalidReturnValueError } = require_errors4();
129619
- var util = require_util5();
129620
+ var util2 = require_util5();
129620
129621
  var { addSignal, removeSignal } = require_abort_signal();
129621
129622
  function noop4() {}
129622
129623
 
@@ -129644,8 +129645,8 @@ var require_api_stream = __commonJS((exports, module) => {
129644
129645
  }
129645
129646
  super("UNDICI_STREAM");
129646
129647
  } catch (err) {
129647
- if (util.isStream(body)) {
129648
- util.destroy(body.on("error", noop4), err);
129648
+ if (util2.isStream(body)) {
129649
+ util2.destroy(body.on("error", noop4), err);
129649
129650
  }
129650
129651
  throw err;
129651
129652
  }
@@ -129659,7 +129660,7 @@ var require_api_stream = __commonJS((exports, module) => {
129659
129660
  this.trailers = null;
129660
129661
  this.body = body;
129661
129662
  this.onInfo = onInfo || null;
129662
- if (util.isStream(body)) {
129663
+ if (util2.isStream(body)) {
129663
129664
  body.on("error", (err) => {
129664
129665
  this.onError(err);
129665
129666
  });
@@ -129677,7 +129678,7 @@ var require_api_stream = __commonJS((exports, module) => {
129677
129678
  }
129678
129679
  onHeaders(statusCode, rawHeaders, resume, statusMessage) {
129679
129680
  const { factory, opaque, context, responseHeaders } = this;
129680
- const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
129681
+ const headers = responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders);
129681
129682
  if (statusCode < 200) {
129682
129683
  if (this.onInfo) {
129683
129684
  this.onInfo({ statusCode, headers });
@@ -129701,7 +129702,7 @@ var require_api_stream = __commonJS((exports, module) => {
129701
129702
  const { callback, res: res2, opaque: opaque2, trailers, abort } = this;
129702
129703
  this.res = null;
129703
129704
  if (err || !res2?.readable) {
129704
- util.destroy(res2, err);
129705
+ util2.destroy(res2, err);
129705
129706
  }
129706
129707
  this.callback = null;
129707
129708
  this.runInAsyncScope(callback, null, err || null, { opaque: opaque2, trailers });
@@ -129724,7 +129725,7 @@ var require_api_stream = __commonJS((exports, module) => {
129724
129725
  if (!res) {
129725
129726
  return;
129726
129727
  }
129727
- this.trailers = util.parseHeaders(trailers);
129728
+ this.trailers = util2.parseHeaders(trailers);
129728
129729
  res.end();
129729
129730
  }
129730
129731
  onError(err) {
@@ -129733,7 +129734,7 @@ var require_api_stream = __commonJS((exports, module) => {
129733
129734
  this.factory = null;
129734
129735
  if (res) {
129735
129736
  this.res = null;
129736
- util.destroy(res, err);
129737
+ util2.destroy(res, err);
129737
129738
  } else if (callback) {
129738
129739
  this.callback = null;
129739
129740
  queueMicrotask(() => {
@@ -129742,7 +129743,7 @@ var require_api_stream = __commonJS((exports, module) => {
129742
129743
  }
129743
129744
  if (body) {
129744
129745
  this.body = null;
129745
- util.destroy(body, err);
129746
+ util2.destroy(body, err);
129746
129747
  }
129747
129748
  }
129748
129749
  }
@@ -129782,7 +129783,7 @@ var require_api_pipeline = __commonJS((exports, module) => {
129782
129783
  InvalidReturnValueError,
129783
129784
  RequestAbortedError: RequestAbortedError2
129784
129785
  } = require_errors4();
129785
- var util = require_util5();
129786
+ var util2 = require_util5();
129786
129787
  var { addSignal, removeSignal } = require_abort_signal();
129787
129788
  function noop4() {}
129788
129789
  var kResume = Symbol("resume");
@@ -129872,9 +129873,9 @@ var require_api_pipeline = __commonJS((exports, module) => {
129872
129873
  if (abort && err) {
129873
129874
  abort();
129874
129875
  }
129875
- util.destroy(body, err);
129876
- util.destroy(req, err);
129877
- util.destroy(res, err);
129876
+ util2.destroy(body, err);
129877
+ util2.destroy(req, err);
129878
+ util2.destroy(res, err);
129878
129879
  removeSignal(this);
129879
129880
  callback(err);
129880
129881
  }
@@ -129899,7 +129900,7 @@ var require_api_pipeline = __commonJS((exports, module) => {
129899
129900
  const { opaque, handler, context } = this;
129900
129901
  if (statusCode < 200) {
129901
129902
  if (this.onInfo) {
129902
- const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
129903
+ const headers = this.responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders);
129903
129904
  this.onInfo({ statusCode, headers });
129904
129905
  }
129905
129906
  return;
@@ -129908,7 +129909,7 @@ var require_api_pipeline = __commonJS((exports, module) => {
129908
129909
  let body;
129909
129910
  try {
129910
129911
  this.handler = null;
129911
- const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
129912
+ const headers = this.responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders);
129912
129913
  body = this.runInAsyncScope(handler, null, {
129913
129914
  statusCode,
129914
129915
  headers,
@@ -129930,14 +129931,14 @@ var require_api_pipeline = __commonJS((exports, module) => {
129930
129931
  }
129931
129932
  }).on("error", (err) => {
129932
129933
  const { ret } = this;
129933
- util.destroy(ret, err);
129934
+ util2.destroy(ret, err);
129934
129935
  }).on("end", () => {
129935
129936
  const { ret } = this;
129936
129937
  ret.push(null);
129937
129938
  }).on("close", () => {
129938
129939
  const { ret } = this;
129939
129940
  if (!ret._readableState.ended) {
129940
- util.destroy(ret, new RequestAbortedError2);
129941
+ util2.destroy(ret, new RequestAbortedError2);
129941
129942
  }
129942
129943
  });
129943
129944
  this.body = body;
@@ -129953,7 +129954,7 @@ var require_api_pipeline = __commonJS((exports, module) => {
129953
129954
  onError(err) {
129954
129955
  const { ret } = this;
129955
129956
  this.handler = null;
129956
- util.destroy(ret, err);
129957
+ util2.destroy(ret, err);
129957
129958
  }
129958
129959
  }
129959
129960
  function pipeline4(opts, handler) {
@@ -129973,7 +129974,7 @@ var require_api_upgrade = __commonJS((exports, module) => {
129973
129974
  var { InvalidArgumentError, SocketError } = require_errors4();
129974
129975
  var { AsyncResource } = __require("node:async_hooks");
129975
129976
  var assert2 = __require("node:assert");
129976
- var util = require_util5();
129977
+ var util2 = require_util5();
129977
129978
  var { kHTTP2Stream } = require_symbols();
129978
129979
  var { addSignal, removeSignal } = require_abort_signal();
129979
129980
 
@@ -130014,7 +130015,7 @@ var require_api_upgrade = __commonJS((exports, module) => {
130014
130015
  const { callback, opaque, context } = this;
130015
130016
  removeSignal(this);
130016
130017
  this.callback = null;
130017
- const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
130018
+ const headers = this.responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders);
130018
130019
  this.runInAsyncScope(callback, null, null, {
130019
130020
  headers,
130020
130021
  socket,
@@ -130065,7 +130066,7 @@ var require_api_connect = __commonJS((exports, module) => {
130065
130066
  var assert2 = __require("node:assert");
130066
130067
  var { AsyncResource } = __require("node:async_hooks");
130067
130068
  var { InvalidArgumentError, SocketError } = require_errors4();
130068
- var util = require_util5();
130069
+ var util2 = require_util5();
130069
130070
  var { addSignal, removeSignal } = require_abort_signal();
130070
130071
 
130071
130072
  class ConnectHandler extends AsyncResource {
@@ -130105,7 +130106,7 @@ var require_api_connect = __commonJS((exports, module) => {
130105
130106
  this.callback = null;
130106
130107
  let headers = rawHeaders;
130107
130108
  if (headers != null) {
130108
- headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
130109
+ headers = this.responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders);
130109
130110
  }
130110
130111
  this.runInAsyncScope(callback, null, null, {
130111
130112
  statusCode,
@@ -130319,20 +130320,20 @@ var require_mock_utils = __commonJS((exports, module) => {
130319
130320
  }
130320
130321
  return normalizedQp;
130321
130322
  }
130322
- function safeUrl(path9) {
130323
- if (typeof path9 !== "string") {
130324
- return path9;
130323
+ function safeUrl(path8) {
130324
+ if (typeof path8 !== "string") {
130325
+ return path8;
130325
130326
  }
130326
- const pathSegments = path9.split("?", 3);
130327
+ const pathSegments = path8.split("?", 3);
130327
130328
  if (pathSegments.length !== 2) {
130328
- return path9;
130329
+ return path8;
130329
130330
  }
130330
130331
  const qp = new URLSearchParams(pathSegments.pop());
130331
130332
  qp.sort();
130332
130333
  return [...pathSegments, qp.toString()].join("?");
130333
130334
  }
130334
- function matchKey(mockDispatch2, { path: path9, method, body, headers }) {
130335
- const pathMatch = matchValue(mockDispatch2.path, path9);
130335
+ function matchKey(mockDispatch2, { path: path8, method, body, headers }) {
130336
+ const pathMatch = matchValue(mockDispatch2.path, path8);
130336
130337
  const methodMatch = matchValue(mockDispatch2.method, method);
130337
130338
  const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true;
130338
130339
  const headersMatch = matchHeaders(mockDispatch2, headers);
@@ -130357,8 +130358,8 @@ var require_mock_utils = __commonJS((exports, module) => {
130357
130358
  const basePath = key.query ? serializePathWithQuery(key.path, key.query) : key.path;
130358
130359
  const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath;
130359
130360
  const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath);
130360
- let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path9, ignoreTrailingSlash }) => {
130361
- return ignoreTrailingSlash ? matchValue(removeTrailingSlash(safeUrl(path9)), resolvedPathWithoutTrailingSlash) : matchValue(safeUrl(path9), resolvedPath);
130361
+ let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path8, ignoreTrailingSlash }) => {
130362
+ return ignoreTrailingSlash ? matchValue(removeTrailingSlash(safeUrl(path8)), resolvedPathWithoutTrailingSlash) : matchValue(safeUrl(path8), resolvedPath);
130362
130363
  });
130363
130364
  if (matchedMockDispatches.length === 0) {
130364
130365
  throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`);
@@ -130397,19 +130398,19 @@ var require_mock_utils = __commonJS((exports, module) => {
130397
130398
  mockDispatches.splice(index2, 1);
130398
130399
  }
130399
130400
  }
130400
- function removeTrailingSlash(path9) {
130401
- while (path9.endsWith("/")) {
130402
- path9 = path9.slice(0, -1);
130401
+ function removeTrailingSlash(path8) {
130402
+ while (path8.endsWith("/")) {
130403
+ path8 = path8.slice(0, -1);
130403
130404
  }
130404
- if (path9.length === 0) {
130405
- path9 = "/";
130405
+ if (path8.length === 0) {
130406
+ path8 = "/";
130406
130407
  }
130407
- return path9;
130408
+ return path8;
130408
130409
  }
130409
130410
  function buildKey(opts) {
130410
- const { path: path9, method, body, headers, query: query3 } = opts;
130411
+ const { path: path8, method, body, headers, query: query3 } = opts;
130411
130412
  return {
130412
- path: path9,
130413
+ path: path8,
130413
130414
  method,
130414
130415
  body,
130415
130416
  headers,
@@ -131050,10 +131051,10 @@ var require_pending_interceptors_formatter = __commonJS((exports, module) => {
131050
131051
  });
131051
131052
  }
131052
131053
  format(pendingInterceptors) {
131053
- const withPrettyHeaders = pendingInterceptors.map(({ method, path: path9, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
131054
+ const withPrettyHeaders = pendingInterceptors.map(({ method, path: path8, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
131054
131055
  Method: method,
131055
131056
  Origin: origin,
131056
- Path: path9,
131057
+ Path: path8,
131057
131058
  "Status code": statusCode,
131058
131059
  Persistent: persist ? PERSISTENT : NOT_PERSISTENT,
131059
131060
  Invocations: timesInvoked,
@@ -131132,9 +131133,9 @@ var require_mock_agent = __commonJS((exports, module) => {
131132
131133
  const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters];
131133
131134
  const dispatchOpts = { ...opts };
131134
131135
  if (acceptNonStandardSearchParameters && dispatchOpts.path) {
131135
- const [path9, searchParams] = dispatchOpts.path.split("?");
131136
+ const [path8, searchParams] = dispatchOpts.path.split("?");
131136
131137
  const normalizedSearchParams = normalizeSearchParams(searchParams, acceptNonStandardSearchParameters);
131137
- dispatchOpts.path = `${path9}?${normalizedSearchParams}`;
131138
+ dispatchOpts.path = `${path8}?${normalizedSearchParams}`;
131138
131139
  }
131139
131140
  return this[kAgent].dispatch(dispatchOpts, handler);
131140
131141
  }
@@ -131493,12 +131494,12 @@ var require_snapshot_recorder = __commonJS((exports, module) => {
131493
131494
  };
131494
131495
  }
131495
131496
  async loadSnapshots(filePath) {
131496
- const path9 = filePath || this.#snapshotPath;
131497
- if (!path9) {
131497
+ const path8 = filePath || this.#snapshotPath;
131498
+ if (!path8) {
131498
131499
  throw new InvalidArgumentError("Snapshot path is required");
131499
131500
  }
131500
131501
  try {
131501
- const data2 = await readFile2(resolve4(path9), "utf8");
131502
+ const data2 = await readFile2(resolve4(path8), "utf8");
131502
131503
  const parsed = JSON.parse(data2);
131503
131504
  if (Array.isArray(parsed)) {
131504
131505
  this.#snapshots.clear();
@@ -131512,16 +131513,16 @@ var require_snapshot_recorder = __commonJS((exports, module) => {
131512
131513
  if (error4.code === "ENOENT") {
131513
131514
  this.#snapshots.clear();
131514
131515
  } else {
131515
- throw new UndiciError(`Failed to load snapshots from ${path9}`, { cause: error4 });
131516
+ throw new UndiciError(`Failed to load snapshots from ${path8}`, { cause: error4 });
131516
131517
  }
131517
131518
  }
131518
131519
  }
131519
131520
  async saveSnapshots(filePath) {
131520
- const path9 = filePath || this.#snapshotPath;
131521
- if (!path9) {
131521
+ const path8 = filePath || this.#snapshotPath;
131522
+ if (!path8) {
131522
131523
  throw new InvalidArgumentError("Snapshot path is required");
131523
131524
  }
131524
- const resolvedPath = resolve4(path9);
131525
+ const resolvedPath = resolve4(path8);
131525
131526
  await mkdir3(dirname4(resolvedPath), { recursive: true });
131526
131527
  const data2 = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({
131527
131528
  hash,
@@ -131915,7 +131916,7 @@ var require_decorator_handler = __commonJS((exports, module) => {
131915
131916
 
131916
131917
  // ../../node_modules/.bun/undici@7.28.0/node_modules/undici/lib/handler/redirect-handler.js
131917
131918
  var require_redirect_handler = __commonJS((exports, module) => {
131918
- var util = require_util5();
131919
+ var util2 = require_util5();
131919
131920
  var { kBodyUsed } = require_symbols();
131920
131921
  var assert2 = __require("node:assert");
131921
131922
  var { InvalidArgumentError } = require_errors4();
@@ -131955,8 +131956,8 @@ var require_redirect_handler = __commonJS((exports, module) => {
131955
131956
  this.maxRedirections = maxRedirections;
131956
131957
  this.handler = handler;
131957
131958
  this.history = [];
131958
- if (util.isStream(this.opts.body)) {
131959
- if (util.bodyLength(this.opts.body) === 0) {
131959
+ if (util2.isStream(this.opts.body)) {
131960
+ if (util2.bodyLength(this.opts.body) === 0) {
131960
131961
  this.opts.body.on("data", function() {
131961
131962
  assert2(false);
131962
131963
  });
@@ -131969,7 +131970,7 @@ var require_redirect_handler = __commonJS((exports, module) => {
131969
131970
  }
131970
131971
  } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") {
131971
131972
  this.opts.body = new BodyAsyncIterable(this.opts.body);
131972
- } else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util.isIterable(this.opts.body) && !util.isFormDataLike(this.opts.body)) {
131973
+ } else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util2.isIterable(this.opts.body) && !util2.isFormDataLike(this.opts.body)) {
131973
131974
  this.opts.body = new BodyAsyncIterable(this.opts.body);
131974
131975
  }
131975
131976
  }
@@ -131985,19 +131986,19 @@ var require_redirect_handler = __commonJS((exports, module) => {
131985
131986
  }
131986
131987
  if ((statusCode === 301 || statusCode === 302) && this.opts.method === "POST") {
131987
131988
  this.opts.method = "GET";
131988
- if (util.isStream(this.opts.body)) {
131989
- util.destroy(this.opts.body.on("error", noop4));
131989
+ if (util2.isStream(this.opts.body)) {
131990
+ util2.destroy(this.opts.body.on("error", noop4));
131990
131991
  }
131991
131992
  this.opts.body = null;
131992
131993
  }
131993
131994
  if (statusCode === 303 && this.opts.method !== "HEAD") {
131994
131995
  this.opts.method = "GET";
131995
- if (util.isStream(this.opts.body)) {
131996
- util.destroy(this.opts.body.on("error", noop4));
131996
+ if (util2.isStream(this.opts.body)) {
131997
+ util2.destroy(this.opts.body.on("error", noop4));
131997
131998
  }
131998
131999
  this.opts.body = null;
131999
132000
  }
132000
- this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) || redirectableStatusCodes.indexOf(statusCode) === -1 ? null : headers.location;
132001
+ this.location = this.history.length >= this.maxRedirections || util2.isDisturbed(this.opts.body) || redirectableStatusCodes.indexOf(statusCode) === -1 ? null : headers.location;
132001
132002
  if (this.opts.origin) {
132002
132003
  this.history.push(new URL(this.opts.path, this.opts.origin));
132003
132004
  }
@@ -132005,16 +132006,16 @@ var require_redirect_handler = __commonJS((exports, module) => {
132005
132006
  this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage);
132006
132007
  return;
132007
132008
  }
132008
- const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
132009
- const path9 = search ? `${pathname}${search}` : pathname;
132010
- const redirectUrlString = `${origin}${path9}`;
132009
+ const { origin, pathname, search } = util2.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
132010
+ const path8 = search ? `${pathname}${search}` : pathname;
132011
+ const redirectUrlString = `${origin}${path8}`;
132011
132012
  for (const historyUrl of this.history) {
132012
132013
  if (historyUrl.toString() === redirectUrlString) {
132013
132014
  throw new InvalidArgumentError(`Redirect loop detected. Cannot redirect to ${origin}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`);
132014
132015
  }
132015
132016
  }
132016
132017
  this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
132017
- this.opts.path = path9;
132018
+ this.opts.path = path8;
132018
132019
  this.opts.origin = origin;
132019
132020
  this.opts.query = null;
132020
132021
  }
@@ -132036,13 +132037,13 @@ var require_redirect_handler = __commonJS((exports, module) => {
132036
132037
  }
132037
132038
  function shouldRemoveHeader(header, removeContent, unknownOrigin) {
132038
132039
  if (header.length === 4) {
132039
- return util.headerNameToString(header) === "host";
132040
+ return util2.headerNameToString(header) === "host";
132040
132041
  }
132041
- if (removeContent && util.headerNameToString(header).startsWith("content-")) {
132042
+ if (removeContent && util2.headerNameToString(header).startsWith("content-")) {
132042
132043
  return true;
132043
132044
  }
132044
132045
  if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) {
132045
- const name = util.headerNameToString(header);
132046
+ const name = util2.headerNameToString(header);
132046
132047
  return name === "authorization" || name === "cookie" || name === "proxy-authorization";
132047
132048
  }
132048
132049
  return false;
@@ -132056,7 +132057,7 @@ var require_redirect_handler = __commonJS((exports, module) => {
132056
132057
  }
132057
132058
  }
132058
132059
  } else if (headers && typeof headers === "object") {
132059
- const entries = util.hasSafeIterator(headers) ? headers : Object.entries(headers);
132060
+ const entries = util2.hasSafeIterator(headers) ? headers : Object.entries(headers);
132060
132061
  for (const [key, value] of entries) {
132061
132062
  if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) {
132062
132063
  ret.push(key, value);
@@ -133436,7 +133437,7 @@ var require_date2 = __commonJS((exports, module) => {
133436
133437
 
133437
133438
  // ../../node_modules/.bun/undici@7.28.0/node_modules/undici/lib/handler/cache-handler.js
133438
133439
  var require_cache_handler = __commonJS((exports, module) => {
133439
- var util = require_util5();
133440
+ var util2 = require_util5();
133440
133441
  var {
133441
133442
  parseCacheControlHeader,
133442
133443
  parseVaryHeader,
@@ -133488,7 +133489,7 @@ var require_cache_handler = __commonJS((exports, module) => {
133488
133489
  onResponseStart(controller, statusCode, resHeaders, statusMessage) {
133489
133490
  const downstreamOnHeaders = () => this.#handler.onResponseStart?.(controller, statusCode, resHeaders, statusMessage);
133490
133491
  const handler = this;
133491
- if (!util.safeHTTPMethods.includes(this.#cacheKey.method) && statusCode >= 200 && statusCode <= 399) {
133492
+ if (!util2.safeHTTPMethods.includes(this.#cacheKey.method) && statusCode >= 200 && statusCode <= 399) {
133492
133493
  try {
133493
133494
  this.#store.delete(this.#cacheKey)?.catch?.(noop4);
133494
133495
  } catch {}
@@ -133993,7 +133994,7 @@ var require_cache_revalidation_handler = __commonJS((exports, module) => {
133993
133994
  var require_cache2 = __commonJS((exports, module) => {
133994
133995
  var assert2 = __require("node:assert");
133995
133996
  var { Readable: Readable3 } = __require("node:stream");
133996
- var util = require_util5();
133997
+ var util2 = require_util5();
133997
133998
  var CacheHandler = require_cache_handler();
133998
133999
  var MemoryCacheStore = require_memory_cache_store();
133999
134000
  var CacheRevalidationHandler = require_cache_revalidation_handler();
@@ -134081,7 +134082,7 @@ var require_cache2 = __commonJS((exports, module) => {
134081
134082
  return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler));
134082
134083
  }
134083
134084
  function sendCachedValue(handler, opts, result, age, context, isStale2) {
134084
- const stream = util.isStream(result.body) ? result.body : Readable3.from(result.body ?? []);
134085
+ const stream = util2.isStream(result.body) ? result.body : Readable3.from(result.body ?? []);
134085
134086
  assert2(!stream.destroyed, "stream should not be destroyed");
134086
134087
  assert2(!stream.readableDidRead, "stream should not be readableDidRead");
134087
134088
  const controller = {
@@ -134149,7 +134150,7 @@ var require_cache2 = __commonJS((exports, module) => {
134149
134150
  const stale = isStale(result, reqCacheControl);
134150
134151
  const revalidate = needsRevalidation(result, reqCacheControl, opts);
134151
134152
  if (stale || revalidate) {
134152
- if (util.isStream(opts.body) && util.bodyLength(opts.body) !== 0) {
134153
+ if (util2.isStream(opts.body) && util2.bodyLength(opts.body) !== 0) {
134153
134154
  return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler));
134154
134155
  }
134155
134156
  if (!revalidate && withinStaleWhileRevalidateWindow(result)) {
@@ -134208,12 +134209,12 @@ var require_cache2 = __commonJS((exports, module) => {
134208
134209
  }, new CacheRevalidationHandler((success, context) => {
134209
134210
  if (success) {
134210
134211
  sendCachedValue(handler, opts, result, age, context, stale);
134211
- } else if (util.isStream(result.body)) {
134212
+ } else if (util2.isStream(result.body)) {
134212
134213
  result.body.on("error", nop).destroy();
134213
134214
  }
134214
134215
  }, new CacheHandler(globalOpts, cacheKey, handler), withinStaleIfErrorThreshold));
134215
134216
  }
134216
- if (util.isStream(opts.body)) {
134217
+ if (util2.isStream(opts.body)) {
134217
134218
  opts.body.on("error", nop).destroy();
134218
134219
  }
134219
134220
  sendCachedValue(handler, opts, result, age, null, false);
@@ -134244,7 +134245,7 @@ var require_cache2 = __commonJS((exports, module) => {
134244
134245
  cacheByDefault,
134245
134246
  type
134246
134247
  };
134247
- const safeMethodsToNotCache = util.safeHTTPMethods.filter((method) => methods.includes(method) === false);
134248
+ const safeMethodsToNotCache = util2.safeHTTPMethods.filter((method) => methods.includes(method) === false);
134248
134249
  return (dispatch) => {
134249
134250
  return (opts2, handler) => {
134250
134251
  if (!opts2.origin || safeMethodsToNotCache.includes(opts2.method)) {
@@ -134691,7 +134692,7 @@ var require_deduplication_handler = __commonJS((exports, module) => {
134691
134692
  // ../../node_modules/.bun/undici@7.28.0/node_modules/undici/lib/interceptor/deduplicate.js
134692
134693
  var require_deduplicate = __commonJS((exports, module) => {
134693
134694
  var diagnosticsChannel = __require("node:diagnostics_channel");
134694
- var util = require_util5();
134695
+ var util2 = require_util5();
134695
134696
  var DeduplicationHandler = require_deduplication_handler();
134696
134697
  var { normalizeHeaders, makeCacheKey, makeDeduplicationKey } = require_cache();
134697
134698
  var pendingRequestsChannel = diagnosticsChannel.channel("undici:request:pending-requests");
@@ -134709,7 +134710,7 @@ var require_deduplicate = __commonJS((exports, module) => {
134709
134710
  throw new TypeError(`expected opts.methods to be an array, got ${typeof methods}`);
134710
134711
  }
134711
134712
  for (const method of methods) {
134712
- if (!util.safeHTTPMethods.includes(method)) {
134713
+ if (!util2.safeHTTPMethods.includes(method)) {
134713
134714
  throw new TypeError(`expected opts.methods to only contain safe HTTP methods, got ${method}`);
134714
134715
  }
134715
134716
  }
@@ -135047,7 +135048,7 @@ var require_headers = __commonJS((exports, module) => {
135047
135048
  } = require_util6();
135048
135049
  var { webidl } = require_webidl();
135049
135050
  var assert2 = __require("node:assert");
135050
- var util = __require("node:util");
135051
+ var util2 = __require("node:util");
135051
135052
  function isHTTPWhiteSpaceCharCode(code) {
135052
135053
  return code === 10 || code === 13 || code === 9 || code === 32;
135053
135054
  }
@@ -135378,9 +135379,9 @@ var require_headers = __commonJS((exports, module) => {
135378
135379
  }
135379
135380
  return [];
135380
135381
  }
135381
- [util.inspect.custom](depth, options) {
135382
+ [util2.inspect.custom](depth, options) {
135382
135383
  options.depth ??= depth;
135383
- return `Headers ${util.formatWithOptions(options, this.#headersList.entries)}`;
135384
+ return `Headers ${util2.formatWithOptions(options, this.#headersList.entries)}`;
135384
135385
  }
135385
135386
  static getHeadersGuard(o) {
135386
135387
  return o.#guard;
@@ -135412,14 +135413,14 @@ var require_headers = __commonJS((exports, module) => {
135412
135413
  value: "Headers",
135413
135414
  configurable: true
135414
135415
  },
135415
- [util.inspect.custom]: {
135416
+ [util2.inspect.custom]: {
135416
135417
  enumerable: false
135417
135418
  }
135418
135419
  });
135419
135420
  webidl.converters.HeadersInit = function(V, prefix, argument) {
135420
135421
  if (webidl.util.Type(V) === webidl.util.Types.OBJECT) {
135421
135422
  const iterator = Reflect.get(V, Symbol.iterator);
135422
- if (!util.types.isProxy(V) && iterator === Headers3.prototype.entries) {
135423
+ if (!util2.types.isProxy(V) && iterator === Headers3.prototype.entries) {
135423
135424
  try {
135424
135425
  return getHeadersList(V).entriesList;
135425
135426
  } catch {}
@@ -135451,9 +135452,9 @@ var require_headers = __commonJS((exports, module) => {
135451
135452
  var require_response = __commonJS((exports, module) => {
135452
135453
  var { Headers: Headers3, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers();
135453
135454
  var { extractBody, cloneBody, mixinBody, streamRegistry, bodyUnusable } = require_body();
135454
- var util = require_util5();
135455
+ var util2 = require_util5();
135455
135456
  var nodeUtil = __require("node:util");
135456
- var { kEnumerableProperty } = util;
135457
+ var { kEnumerableProperty } = util2;
135457
135458
  var {
135458
135459
  isValidReasonPhrase,
135459
135460
  isCancelled,
@@ -135568,7 +135569,7 @@ var require_response = __commonJS((exports, module) => {
135568
135569
  }
135569
135570
  get bodyUsed() {
135570
135571
  webidl.brandCheck(this, Response3);
135571
- return !!this.#state.body && util.isDisturbed(this.#state.body.stream);
135572
+ return !!this.#state.body && util2.isDisturbed(this.#state.body.stream);
135572
135573
  }
135573
135574
  clone() {
135574
135575
  webidl.brandCheck(this, Response3);
@@ -135835,7 +135836,7 @@ var require_response = __commonJS((exports, module) => {
135835
135836
  var require_request2 = __commonJS((exports, module) => {
135836
135837
  var { extractBody, mixinBody, cloneBody, bodyUnusable } = require_body();
135837
135838
  var { Headers: Headers3, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers();
135838
- var util = require_util5();
135839
+ var util2 = require_util5();
135839
135840
  var nodeUtil = __require("node:util");
135840
135841
  var {
135841
135842
  isValidHTTPToken,
@@ -135852,7 +135853,7 @@ var require_request2 = __commonJS((exports, module) => {
135852
135853
  requestCache,
135853
135854
  requestDuplex
135854
135855
  } = require_constants5();
135855
- var { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util;
135856
+ var { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util2;
135856
135857
  var { webidl } = require_webidl();
135857
135858
  var { URLSerializer } = require_data_url();
135858
135859
  var { kConstruct } = require_symbols();
@@ -136069,7 +136070,7 @@ var require_request2 = __commonJS((exports, module) => {
136069
136070
  if (abortSignalHasEventHandlerLeakWarning && getMaxListeners(signal) === defaultMaxListeners) {
136070
136071
  setMaxListeners(1500, signal);
136071
136072
  }
136072
- util.addAbortListener(signal, abort);
136073
+ util2.addAbortListener(signal, abort);
136073
136074
  requestFinalizer.register(ac, { signal, abort }, abort);
136074
136075
  }
136075
136076
  }
@@ -136204,7 +136205,7 @@ var require_request2 = __commonJS((exports, module) => {
136204
136205
  }
136205
136206
  get bodyUsed() {
136206
136207
  webidl.brandCheck(this, Request3);
136207
- return !!this.#state.body && util.isDisturbed(this.#state.body.stream);
136208
+ return !!this.#state.body && util2.isDisturbed(this.#state.body.stream);
136208
136209
  }
136209
136210
  get duplex() {
136210
136211
  webidl.brandCheck(this, Request3);
@@ -136227,7 +136228,7 @@ var require_request2 = __commonJS((exports, module) => {
136227
136228
  }
136228
136229
  const acRef = new WeakRef(ac);
136229
136230
  list.add(acRef);
136230
- util.addAbortListener(ac.signal, buildAbort(acRef));
136231
+ util2.addAbortListener(ac.signal, buildAbort(acRef));
136231
136232
  }
136232
136233
  return fromInnerRequest(clonedRequest, this.#dispatcher, ac.signal, getHeadersGuard(this.#headers));
136233
136234
  }
@@ -137477,10 +137478,10 @@ var require_fetch = __commonJS((exports, module) => {
137477
137478
  function dispatch({ body }) {
137478
137479
  const url = requestCurrentURL(request);
137479
137480
  const agent2 = fetchParams.controller.dispatcher;
137480
- const path9 = url.pathname + url.search;
137481
+ const path8 = url.pathname + url.search;
137481
137482
  const hasTrailingQuestionMark = url.search.length === 0 && url.href[url.href.length - url.hash.length - 1] === "?";
137482
137483
  return new Promise((resolve4, reject) => agent2.dispatch({
137483
- path: hasTrailingQuestionMark ? `${path9}?` : path9,
137484
+ path: hasTrailingQuestionMark ? `${path8}?` : path8,
137484
137485
  origin: url.origin,
137485
137486
  method: request.method,
137486
137487
  body: agent2.isMockActive ? request.body && (request.body.source || request.body.stream) : body,
@@ -138318,9 +138319,9 @@ var require_util8 = __commonJS((exports, module) => {
138318
138319
  }
138319
138320
  }
138320
138321
  }
138321
- function validateCookiePath(path9) {
138322
- for (let i2 = 0;i2 < path9.length; ++i2) {
138323
- const code = path9.charCodeAt(i2);
138322
+ function validateCookiePath(path8) {
138323
+ for (let i2 = 0;i2 < path8.length; ++i2) {
138324
+ const code = path8.charCodeAt(i2);
138324
138325
  if (code < 32 || code === 127 || code === 59) {
138325
138326
  throw new Error("Invalid cookie path");
138326
138327
  }
@@ -142767,11 +142768,11 @@ var require_react_reconciler_development = __commonJS((exports, module) => {
142767
142768
  fiber = fiber.next, id--;
142768
142769
  return fiber;
142769
142770
  }
142770
- function copyWithSetImpl(obj, path9, index2, value) {
142771
- if (index2 >= path9.length)
142771
+ function copyWithSetImpl(obj, path8, index2, value) {
142772
+ if (index2 >= path8.length)
142772
142773
  return value;
142773
- var key = path9[index2], updated = isArrayImpl(obj) ? obj.slice() : assign2({}, obj);
142774
- updated[key] = copyWithSetImpl(obj[key], path9, index2 + 1, value);
142774
+ var key = path8[index2], updated = isArrayImpl(obj) ? obj.slice() : assign2({}, obj);
142775
+ updated[key] = copyWithSetImpl(obj[key], path8, index2 + 1, value);
142775
142776
  return updated;
142776
142777
  }
142777
142778
  function copyWithRename(obj, oldPath, newPath) {
@@ -142791,11 +142792,11 @@ var require_react_reconciler_development = __commonJS((exports, module) => {
142791
142792
  index2 + 1 === oldPath.length ? (updated[newPath[index2]] = updated[oldKey], isArrayImpl(updated) ? updated.splice(oldKey, 1) : delete updated[oldKey]) : updated[oldKey] = copyWithRenameImpl(obj[oldKey], oldPath, newPath, index2 + 1);
142792
142793
  return updated;
142793
142794
  }
142794
- function copyWithDeleteImpl(obj, path9, index2) {
142795
- var key = path9[index2], updated = isArrayImpl(obj) ? obj.slice() : assign2({}, obj);
142796
- if (index2 + 1 === path9.length)
142795
+ function copyWithDeleteImpl(obj, path8, index2) {
142796
+ var key = path8[index2], updated = isArrayImpl(obj) ? obj.slice() : assign2({}, obj);
142797
+ if (index2 + 1 === path8.length)
142797
142798
  return isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key], updated;
142798
- updated[key] = copyWithDeleteImpl(obj[key], path9, index2 + 1);
142799
+ updated[key] = copyWithDeleteImpl(obj[key], path8, index2 + 1);
142799
142800
  return updated;
142800
142801
  }
142801
142802
  function shouldSuspendImpl() {
@@ -152819,29 +152820,29 @@ Check the top-level render call using <` + componentName2 + ">.");
152819
152820
  var didWarnAboutNestedUpdates = false;
152820
152821
  var didWarnAboutFindNodeInStrictMode = {};
152821
152822
  var overrideHookState = null, overrideHookStateDeletePath = null, overrideHookStateRenamePath = null, overrideProps = null, overridePropsDeletePath = null, overridePropsRenamePath = null, scheduleUpdate = null, scheduleRetry = null, setErrorHandler = null, setSuspenseHandler = null;
152822
- overrideHookState = function(fiber, id, path9, value) {
152823
+ overrideHookState = function(fiber, id, path8, value) {
152823
152824
  id = findHook(fiber, id);
152824
- id !== null && (path9 = copyWithSetImpl(id.memoizedState, path9, 0, value), id.memoizedState = path9, id.baseState = path9, fiber.memoizedProps = assign2({}, fiber.memoizedProps), path9 = enqueueConcurrentRenderForLane(fiber, 2), path9 !== null && scheduleUpdateOnFiber(path9, fiber, 2));
152825
+ id !== null && (path8 = copyWithSetImpl(id.memoizedState, path8, 0, value), id.memoizedState = path8, id.baseState = path8, fiber.memoizedProps = assign2({}, fiber.memoizedProps), path8 = enqueueConcurrentRenderForLane(fiber, 2), path8 !== null && scheduleUpdateOnFiber(path8, fiber, 2));
152825
152826
  };
152826
- overrideHookStateDeletePath = function(fiber, id, path9) {
152827
+ overrideHookStateDeletePath = function(fiber, id, path8) {
152827
152828
  id = findHook(fiber, id);
152828
- id !== null && (path9 = copyWithDeleteImpl(id.memoizedState, path9, 0), id.memoizedState = path9, id.baseState = path9, fiber.memoizedProps = assign2({}, fiber.memoizedProps), path9 = enqueueConcurrentRenderForLane(fiber, 2), path9 !== null && scheduleUpdateOnFiber(path9, fiber, 2));
152829
+ id !== null && (path8 = copyWithDeleteImpl(id.memoizedState, path8, 0), id.memoizedState = path8, id.baseState = path8, fiber.memoizedProps = assign2({}, fiber.memoizedProps), path8 = enqueueConcurrentRenderForLane(fiber, 2), path8 !== null && scheduleUpdateOnFiber(path8, fiber, 2));
152829
152830
  };
152830
152831
  overrideHookStateRenamePath = function(fiber, id, oldPath, newPath) {
152831
152832
  id = findHook(fiber, id);
152832
152833
  id !== null && (oldPath = copyWithRename(id.memoizedState, oldPath, newPath), id.memoizedState = oldPath, id.baseState = oldPath, fiber.memoizedProps = assign2({}, fiber.memoizedProps), oldPath = enqueueConcurrentRenderForLane(fiber, 2), oldPath !== null && scheduleUpdateOnFiber(oldPath, fiber, 2));
152833
152834
  };
152834
- overrideProps = function(fiber, path9, value) {
152835
- fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps, path9, 0, value);
152835
+ overrideProps = function(fiber, path8, value) {
152836
+ fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps, path8, 0, value);
152836
152837
  fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
152837
- path9 = enqueueConcurrentRenderForLane(fiber, 2);
152838
- path9 !== null && scheduleUpdateOnFiber(path9, fiber, 2);
152838
+ path8 = enqueueConcurrentRenderForLane(fiber, 2);
152839
+ path8 !== null && scheduleUpdateOnFiber(path8, fiber, 2);
152839
152840
  };
152840
- overridePropsDeletePath = function(fiber, path9) {
152841
- fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps, path9, 0);
152841
+ overridePropsDeletePath = function(fiber, path8) {
152842
+ fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps, path8, 0);
152842
152843
  fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
152843
- path9 = enqueueConcurrentRenderForLane(fiber, 2);
152844
- path9 !== null && scheduleUpdateOnFiber(path9, fiber, 2);
152844
+ path8 = enqueueConcurrentRenderForLane(fiber, 2);
152845
+ path8 !== null && scheduleUpdateOnFiber(path8, fiber, 2);
152845
152846
  };
152846
152847
  overridePropsRenamePath = function(fiber, oldPath, newPath) {
152847
152848
  fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);
@@ -156896,8 +156897,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
156896
156897
  }
156897
156898
  return false;
156898
156899
  }
156899
- function utils_getInObject(object4, path9) {
156900
- return path9.reduce(function(reduced, attr2) {
156900
+ function utils_getInObject(object4, path8) {
156901
+ return path8.reduce(function(reduced, attr2) {
156901
156902
  if (reduced) {
156902
156903
  if (utils_hasOwnProperty.call(reduced, attr2)) {
156903
156904
  return reduced[attr2];
@@ -156909,11 +156910,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
156909
156910
  return null;
156910
156911
  }, object4);
156911
156912
  }
156912
- function deletePathInObject(object4, path9) {
156913
- var length = path9.length;
156914
- var last3 = path9[length - 1];
156913
+ function deletePathInObject(object4, path8) {
156914
+ var length = path8.length;
156915
+ var last3 = path8[length - 1];
156915
156916
  if (object4 != null) {
156916
- var parent2 = utils_getInObject(object4, path9.slice(0, length - 1));
156917
+ var parent2 = utils_getInObject(object4, path8.slice(0, length - 1));
156917
156918
  if (parent2) {
156918
156919
  if (src_isArray(parent2)) {
156919
156920
  parent2.splice(last3, 1);
@@ -156939,11 +156940,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
156939
156940
  }
156940
156941
  }
156941
156942
  }
156942
- function utils_setInObject(object4, path9, value) {
156943
- var length = path9.length;
156944
- var last3 = path9[length - 1];
156943
+ function utils_setInObject(object4, path8, value) {
156944
+ var length = path8.length;
156945
+ var last3 = path8[length - 1];
156945
156946
  if (object4 != null) {
156946
- var parent2 = utils_getInObject(object4, path9.slice(0, length - 1));
156947
+ var parent2 = utils_getInObject(object4, path8.slice(0, length - 1));
156947
156948
  if (parent2) {
156948
156949
  parent2[last3] = value;
156949
156950
  }
@@ -157474,8 +157475,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157474
157475
  unserializable: Symbol("unserializable")
157475
157476
  };
157476
157477
  var LEVEL_THRESHOLD = 2;
157477
- function createDehydrated(type, inspectable, data2, cleaned, path9) {
157478
- cleaned.push(path9);
157478
+ function createDehydrated(type, inspectable, data2, cleaned, path8) {
157479
+ cleaned.push(path8);
157479
157480
  var dehydrated = {
157480
157481
  inspectable,
157481
157482
  type,
@@ -157493,13 +157494,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157493
157494
  }
157494
157495
  return dehydrated;
157495
157496
  }
157496
- function dehydrate(data2, cleaned, unserializable, path9, isPathAllowed) {
157497
+ function dehydrate(data2, cleaned, unserializable, path8, isPathAllowed) {
157497
157498
  var level = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
157498
157499
  var type = getDataType(data2);
157499
157500
  var isPathAllowedCheck;
157500
157501
  switch (type) {
157501
157502
  case "html_element":
157502
- cleaned.push(path9);
157503
+ cleaned.push(path8);
157503
157504
  return {
157504
157505
  inspectable: false,
157505
157506
  preview_short: formatDataForPreview(data2, false),
@@ -157508,7 +157509,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157508
157509
  type
157509
157510
  };
157510
157511
  case "function":
157511
- cleaned.push(path9);
157512
+ cleaned.push(path8);
157512
157513
  return {
157513
157514
  inspectable: false,
157514
157515
  preview_short: formatDataForPreview(data2, false),
@@ -157517,14 +157518,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157517
157518
  type
157518
157519
  };
157519
157520
  case "string":
157520
- isPathAllowedCheck = isPathAllowed(path9);
157521
+ isPathAllowedCheck = isPathAllowed(path8);
157521
157522
  if (isPathAllowedCheck) {
157522
157523
  return data2;
157523
157524
  } else {
157524
157525
  return data2.length <= 500 ? data2 : data2.slice(0, 500) + "...";
157525
157526
  }
157526
157527
  case "bigint":
157527
- cleaned.push(path9);
157528
+ cleaned.push(path8);
157528
157529
  return {
157529
157530
  inspectable: false,
157530
157531
  preview_short: formatDataForPreview(data2, false),
@@ -157533,7 +157534,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157533
157534
  type
157534
157535
  };
157535
157536
  case "symbol":
157536
- cleaned.push(path9);
157537
+ cleaned.push(path8);
157537
157538
  return {
157538
157539
  inspectable: false,
157539
157540
  preview_short: formatDataForPreview(data2, false),
@@ -157542,9 +157543,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157542
157543
  type
157543
157544
  };
157544
157545
  case "react_element": {
157545
- isPathAllowedCheck = isPathAllowed(path9);
157546
+ isPathAllowedCheck = isPathAllowed(path8);
157546
157547
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
157547
- cleaned.push(path9);
157548
+ cleaned.push(path8);
157548
157549
  return {
157549
157550
  inspectable: true,
157550
157551
  preview_short: formatDataForPreview(data2, false),
@@ -157561,19 +157562,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157561
157562
  preview_long: formatDataForPreview(data2, true),
157562
157563
  name: getDisplayNameForReactElement(data2) || "Unknown"
157563
157564
  };
157564
- unserializableValue.key = dehydrate(data2.key, cleaned, unserializable, path9.concat(["key"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157565
+ unserializableValue.key = dehydrate(data2.key, cleaned, unserializable, path8.concat(["key"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157565
157566
  if (data2.$$typeof === REACT_LEGACY_ELEMENT_TYPE) {
157566
- unserializableValue.ref = dehydrate(data2.ref, cleaned, unserializable, path9.concat(["ref"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157567
+ unserializableValue.ref = dehydrate(data2.ref, cleaned, unserializable, path8.concat(["ref"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157567
157568
  }
157568
- unserializableValue.props = dehydrate(data2.props, cleaned, unserializable, path9.concat(["props"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157569
- unserializable.push(path9);
157569
+ unserializableValue.props = dehydrate(data2.props, cleaned, unserializable, path8.concat(["props"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157570
+ unserializable.push(path8);
157570
157571
  return unserializableValue;
157571
157572
  }
157572
157573
  case "react_lazy": {
157573
- isPathAllowedCheck = isPathAllowed(path9);
157574
+ isPathAllowedCheck = isPathAllowed(path8);
157574
157575
  var payload = data2._payload;
157575
157576
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
157576
- cleaned.push(path9);
157577
+ cleaned.push(path8);
157577
157578
  var inspectable = payload !== null && hydration_typeof(payload) === "object" && (payload._status === 1 || payload._status === 2 || payload.status === "fulfilled" || payload.status === "rejected");
157578
157579
  return {
157579
157580
  inspectable,
@@ -157590,13 +157591,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157590
157591
  preview_long: formatDataForPreview(data2, true),
157591
157592
  name: "lazy()"
157592
157593
  };
157593
- _unserializableValue._payload = dehydrate(payload, cleaned, unserializable, path9.concat(["_payload"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157594
- unserializable.push(path9);
157594
+ _unserializableValue._payload = dehydrate(payload, cleaned, unserializable, path8.concat(["_payload"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157595
+ unserializable.push(path8);
157595
157596
  return _unserializableValue;
157596
157597
  }
157597
157598
  case "array_buffer":
157598
157599
  case "data_view":
157599
- cleaned.push(path9);
157600
+ cleaned.push(path8);
157600
157601
  return {
157601
157602
  inspectable: false,
157602
157603
  preview_short: formatDataForPreview(data2, false),
@@ -157606,21 +157607,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157606
157607
  type
157607
157608
  };
157608
157609
  case "array":
157609
- isPathAllowedCheck = isPathAllowed(path9);
157610
+ isPathAllowedCheck = isPathAllowed(path8);
157610
157611
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
157611
- return createDehydrated(type, true, data2, cleaned, path9);
157612
+ return createDehydrated(type, true, data2, cleaned, path8);
157612
157613
  }
157613
157614
  var arr = [];
157614
157615
  for (var i2 = 0;i2 < data2.length; i2++) {
157615
- arr[i2] = dehydrateKey(data2, i2, cleaned, unserializable, path9.concat([i2]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157616
+ arr[i2] = dehydrateKey(data2, i2, cleaned, unserializable, path8.concat([i2]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157616
157617
  }
157617
157618
  return arr;
157618
157619
  case "html_all_collection":
157619
157620
  case "typed_array":
157620
157621
  case "iterator":
157621
- isPathAllowedCheck = isPathAllowed(path9);
157622
+ isPathAllowedCheck = isPathAllowed(path8);
157622
157623
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
157623
- return createDehydrated(type, true, data2, cleaned, path9);
157624
+ return createDehydrated(type, true, data2, cleaned, path8);
157624
157625
  } else {
157625
157626
  var _unserializableValue2 = {
157626
157627
  unserializable: true,
@@ -157632,13 +157633,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157632
157633
  name: typeof data2.constructor !== "function" || typeof data2.constructor.name !== "string" || data2.constructor.name === "Object" ? "" : data2.constructor.name
157633
157634
  };
157634
157635
  Array.from(data2).forEach(function(item, i3) {
157635
- return _unserializableValue2[i3] = dehydrate(item, cleaned, unserializable, path9.concat([i3]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157636
+ return _unserializableValue2[i3] = dehydrate(item, cleaned, unserializable, path8.concat([i3]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157636
157637
  });
157637
- unserializable.push(path9);
157638
+ unserializable.push(path8);
157638
157639
  return _unserializableValue2;
157639
157640
  }
157640
157641
  case "opaque_iterator":
157641
- cleaned.push(path9);
157642
+ cleaned.push(path8);
157642
157643
  return {
157643
157644
  inspectable: false,
157644
157645
  preview_short: formatDataForPreview(data2, false),
@@ -157647,7 +157648,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157647
157648
  type
157648
157649
  };
157649
157650
  case "date":
157650
- cleaned.push(path9);
157651
+ cleaned.push(path8);
157651
157652
  return {
157652
157653
  inspectable: false,
157653
157654
  preview_short: formatDataForPreview(data2, false),
@@ -157656,7 +157657,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157656
157657
  type
157657
157658
  };
157658
157659
  case "regexp":
157659
- cleaned.push(path9);
157660
+ cleaned.push(path8);
157660
157661
  return {
157661
157662
  inspectable: false,
157662
157663
  preview_short: formatDataForPreview(data2, false),
@@ -157665,9 +157666,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157665
157666
  type
157666
157667
  };
157667
157668
  case "thenable":
157668
- isPathAllowedCheck = isPathAllowed(path9);
157669
+ isPathAllowedCheck = isPathAllowed(path8);
157669
157670
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
157670
- cleaned.push(path9);
157671
+ cleaned.push(path8);
157671
157672
  return {
157672
157673
  inspectable: data2.status === "fulfilled" || data2.status === "rejected",
157673
157674
  preview_short: formatDataForPreview(data2, false),
@@ -157688,8 +157689,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157688
157689
  preview_long: formatDataForPreview(data2, true),
157689
157690
  name: "fulfilled Thenable"
157690
157691
  };
157691
- _unserializableValue3.value = dehydrate(data2.value, cleaned, unserializable, path9.concat(["value"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157692
- unserializable.push(path9);
157692
+ _unserializableValue3.value = dehydrate(data2.value, cleaned, unserializable, path8.concat(["value"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157693
+ unserializable.push(path8);
157693
157694
  return _unserializableValue3;
157694
157695
  }
157695
157696
  case "rejected": {
@@ -157700,12 +157701,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157700
157701
  preview_long: formatDataForPreview(data2, true),
157701
157702
  name: "rejected Thenable"
157702
157703
  };
157703
- _unserializableValue4.reason = dehydrate(data2.reason, cleaned, unserializable, path9.concat(["reason"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157704
- unserializable.push(path9);
157704
+ _unserializableValue4.reason = dehydrate(data2.reason, cleaned, unserializable, path8.concat(["reason"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157705
+ unserializable.push(path8);
157705
157706
  return _unserializableValue4;
157706
157707
  }
157707
157708
  default:
157708
- cleaned.push(path9);
157709
+ cleaned.push(path8);
157709
157710
  return {
157710
157711
  inspectable: false,
157711
157712
  preview_short: formatDataForPreview(data2, false),
@@ -157715,21 +157716,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157715
157716
  };
157716
157717
  }
157717
157718
  case "object":
157718
- isPathAllowedCheck = isPathAllowed(path9);
157719
+ isPathAllowedCheck = isPathAllowed(path8);
157719
157720
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
157720
- return createDehydrated(type, true, data2, cleaned, path9);
157721
+ return createDehydrated(type, true, data2, cleaned, path8);
157721
157722
  } else {
157722
157723
  var object4 = {};
157723
157724
  getAllEnumerableKeys(data2).forEach(function(key) {
157724
157725
  var name = key.toString();
157725
- object4[name] = dehydrateKey(data2, key, cleaned, unserializable, path9.concat([name]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157726
+ object4[name] = dehydrateKey(data2, key, cleaned, unserializable, path8.concat([name]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157726
157727
  });
157727
157728
  return object4;
157728
157729
  }
157729
157730
  case "class_instance": {
157730
- isPathAllowedCheck = isPathAllowed(path9);
157731
+ isPathAllowedCheck = isPathAllowed(path8);
157731
157732
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
157732
- return createDehydrated(type, true, data2, cleaned, path9);
157733
+ return createDehydrated(type, true, data2, cleaned, path8);
157733
157734
  }
157734
157735
  var value = {
157735
157736
  unserializable: true,
@@ -157741,15 +157742,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157741
157742
  };
157742
157743
  getAllEnumerableKeys(data2).forEach(function(key) {
157743
157744
  var keyAsString = key.toString();
157744
- value[keyAsString] = dehydrate(data2[key], cleaned, unserializable, path9.concat([keyAsString]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157745
+ value[keyAsString] = dehydrate(data2[key], cleaned, unserializable, path8.concat([keyAsString]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157745
157746
  });
157746
- unserializable.push(path9);
157747
+ unserializable.push(path8);
157747
157748
  return value;
157748
157749
  }
157749
157750
  case "error": {
157750
- isPathAllowedCheck = isPathAllowed(path9);
157751
+ isPathAllowedCheck = isPathAllowed(path8);
157751
157752
  if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
157752
- return createDehydrated(type, true, data2, cleaned, path9);
157753
+ return createDehydrated(type, true, data2, cleaned, path8);
157753
157754
  }
157754
157755
  var _value = {
157755
157756
  unserializable: true,
@@ -157759,22 +157760,22 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157759
157760
  preview_long: formatDataForPreview(data2, true),
157760
157761
  name: data2.name
157761
157762
  };
157762
- _value.message = dehydrate(data2.message, cleaned, unserializable, path9.concat(["message"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157763
- _value.stack = dehydrate(data2.stack, cleaned, unserializable, path9.concat(["stack"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157763
+ _value.message = dehydrate(data2.message, cleaned, unserializable, path8.concat(["message"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157764
+ _value.stack = dehydrate(data2.stack, cleaned, unserializable, path8.concat(["stack"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157764
157765
  if ("cause" in data2) {
157765
- _value.cause = dehydrate(data2.cause, cleaned, unserializable, path9.concat(["cause"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157766
+ _value.cause = dehydrate(data2.cause, cleaned, unserializable, path8.concat(["cause"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157766
157767
  }
157767
157768
  getAllEnumerableKeys(data2).forEach(function(key) {
157768
157769
  var keyAsString = key.toString();
157769
- _value[keyAsString] = dehydrate(data2[key], cleaned, unserializable, path9.concat([keyAsString]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157770
+ _value[keyAsString] = dehydrate(data2[key], cleaned, unserializable, path8.concat([keyAsString]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
157770
157771
  });
157771
- unserializable.push(path9);
157772
+ unserializable.push(path8);
157772
157773
  return _value;
157773
157774
  }
157774
157775
  case "infinity":
157775
157776
  case "nan":
157776
157777
  case "undefined":
157777
- cleaned.push(path9);
157778
+ cleaned.push(path8);
157778
157779
  return {
157779
157780
  type
157780
157781
  };
@@ -157782,10 +157783,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157782
157783
  return data2;
157783
157784
  }
157784
157785
  }
157785
- function dehydrateKey(parent2, key, cleaned, unserializable, path9, isPathAllowed) {
157786
+ function dehydrateKey(parent2, key, cleaned, unserializable, path8, isPathAllowed) {
157786
157787
  var level = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0;
157787
157788
  try {
157788
- return dehydrate(parent2[key], cleaned, unserializable, path9, isPathAllowed, level);
157789
+ return dehydrate(parent2[key], cleaned, unserializable, path8, isPathAllowed, level);
157789
157790
  } catch (error4) {
157790
157791
  var preview = "";
157791
157792
  if (hydration_typeof(error4) === "object" && error4 !== null && typeof error4.stack === "string") {
@@ -157793,7 +157794,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157793
157794
  } else if (typeof error4 === "string") {
157794
157795
  preview = error4;
157795
157796
  }
157796
- cleaned.push(path9);
157797
+ cleaned.push(path8);
157797
157798
  return {
157798
157799
  inspectable: false,
157799
157800
  preview_short: "[Exception]",
@@ -157803,8 +157804,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157803
157804
  };
157804
157805
  }
157805
157806
  }
157806
- function fillInPath(object4, data2, path9, value) {
157807
- var target = getInObject(object4, path9);
157807
+ function fillInPath(object4, data2, path8, value) {
157808
+ var target = getInObject(object4, path8);
157808
157809
  if (target != null) {
157809
157810
  if (!target[meta2.unserializable]) {
157810
157811
  delete target[meta2.inspectable];
@@ -157819,9 +157820,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157819
157820
  }
157820
157821
  if (value !== null && data2.unserializable.length > 0) {
157821
157822
  var unserializablePath = data2.unserializable[0];
157822
- var isMatch2 = unserializablePath.length === path9.length;
157823
- for (var i2 = 0;i2 < path9.length; i2++) {
157824
- if (path9[i2] !== unserializablePath[i2]) {
157823
+ var isMatch2 = unserializablePath.length === path8.length;
157824
+ for (var i2 = 0;i2 < path8.length; i2++) {
157825
+ if (path8[i2] !== unserializablePath[i2]) {
157825
157826
  isMatch2 = false;
157826
157827
  break;
157827
157828
  }
@@ -157830,13 +157831,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157830
157831
  upgradeUnserializable(value, value);
157831
157832
  }
157832
157833
  }
157833
- setInObject(object4, path9, value);
157834
+ setInObject(object4, path8, value);
157834
157835
  }
157835
157836
  function hydrate(object4, cleaned, unserializable) {
157836
- cleaned.forEach(function(path9) {
157837
- var length = path9.length;
157838
- var last3 = path9[length - 1];
157839
- var parent2 = getInObject(object4, path9.slice(0, length - 1));
157837
+ cleaned.forEach(function(path8) {
157838
+ var length = path8.length;
157839
+ var last3 = path8[length - 1];
157840
+ var parent2 = getInObject(object4, path8.slice(0, length - 1));
157840
157841
  if (!parent2 || !parent2.hasOwnProperty(last3)) {
157841
157842
  return;
157842
157843
  }
@@ -157862,10 +157863,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157862
157863
  parent2[last3] = replaced;
157863
157864
  }
157864
157865
  });
157865
- unserializable.forEach(function(path9) {
157866
- var length = path9.length;
157867
- var last3 = path9[length - 1];
157868
- var parent2 = getInObject(object4, path9.slice(0, length - 1));
157866
+ unserializable.forEach(function(path8) {
157867
+ var length = path8.length;
157868
+ var last3 = path8[length - 1];
157869
+ var parent2 = getInObject(object4, path8.slice(0, length - 1));
157869
157870
  if (!parent2 || !parent2.hasOwnProperty(last3)) {
157870
157871
  return;
157871
157872
  }
@@ -157986,11 +157987,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
157986
157987
  return gte2(version2, FIRST_DEVTOOLS_BACKEND_LOCKSTEP_VER);
157987
157988
  }
157988
157989
  function cleanForBridge(data2, isPathAllowed) {
157989
- var path9 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
157990
+ var path8 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
157990
157991
  if (data2 !== null) {
157991
157992
  var cleanedPaths = [];
157992
157993
  var unserializablePaths = [];
157993
- var cleanedData = dehydrate(data2, cleanedPaths, unserializablePaths, path9, isPathAllowed);
157994
+ var cleanedData = dehydrate(data2, cleanedPaths, unserializablePaths, path8, isPathAllowed);
157994
157995
  return {
157995
157996
  data: cleanedData,
157996
157997
  cleaned: cleanedPaths,
@@ -158000,18 +158001,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
158000
158001
  return null;
158001
158002
  }
158002
158003
  }
158003
- function copyWithDelete(obj, path9) {
158004
+ function copyWithDelete(obj, path8) {
158004
158005
  var index2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
158005
- var key = path9[index2];
158006
+ var key = path8[index2];
158006
158007
  var updated = shared_isArray(obj) ? obj.slice() : utils_objectSpread({}, obj);
158007
- if (index2 + 1 === path9.length) {
158008
+ if (index2 + 1 === path8.length) {
158008
158009
  if (shared_isArray(updated)) {
158009
158010
  updated.splice(key, 1);
158010
158011
  } else {
158011
158012
  delete updated[key];
158012
158013
  }
158013
158014
  } else {
158014
- updated[key] = copyWithDelete(obj[key], path9, index2 + 1);
158015
+ updated[key] = copyWithDelete(obj[key], path8, index2 + 1);
158015
158016
  }
158016
158017
  return updated;
158017
158018
  }
@@ -158032,14 +158033,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
158032
158033
  }
158033
158034
  return updated;
158034
158035
  }
158035
- function copyWithSet(obj, path9, value) {
158036
+ function copyWithSet(obj, path8, value) {
158036
158037
  var index2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
158037
- if (index2 >= path9.length) {
158038
+ if (index2 >= path8.length) {
158038
158039
  return value;
158039
158040
  }
158040
- var key = path9[index2];
158041
+ var key = path8[index2];
158041
158042
  var updated = shared_isArray(obj) ? obj.slice() : utils_objectSpread({}, obj);
158042
- updated[key] = copyWithSet(obj[key], path9, value, index2 + 1);
158043
+ updated[key] = copyWithSet(obj[key], path8, value, index2 + 1);
158043
158044
  return updated;
158044
158045
  }
158045
158046
  function getEffectDurations(root2) {
@@ -159367,12 +159368,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
159367
159368
  }
159368
159369
  });
159369
159370
  bridge_defineProperty(_this, "overrideValueAtPath", function(_ref) {
159370
- var { id, path: path9, rendererID, type, value } = _ref;
159371
+ var { id, path: path8, rendererID, type, value } = _ref;
159371
159372
  switch (type) {
159372
159373
  case "context":
159373
159374
  _this.send("overrideContext", {
159374
159375
  id,
159375
- path: path9,
159376
+ path: path8,
159376
159377
  rendererID,
159377
159378
  wasForwarded: true,
159378
159379
  value
@@ -159381,7 +159382,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
159381
159382
  case "hooks":
159382
159383
  _this.send("overrideHookState", {
159383
159384
  id,
159384
- path: path9,
159385
+ path: path8,
159385
159386
  rendererID,
159386
159387
  wasForwarded: true,
159387
159388
  value
@@ -159390,7 +159391,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
159390
159391
  case "props":
159391
159392
  _this.send("overrideProps", {
159392
159393
  id,
159393
- path: path9,
159394
+ path: path8,
159394
159395
  rendererID,
159395
159396
  wasForwarded: true,
159396
159397
  value
@@ -159399,7 +159400,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
159399
159400
  case "state":
159400
159401
  _this.send("overrideState", {
159401
159402
  id,
159402
- path: path9,
159403
+ path: path8,
159403
159404
  rendererID,
159404
159405
  wasForwarded: true,
159405
159406
  value
@@ -159733,12 +159734,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
159733
159734
  }
159734
159735
  });
159735
159736
  agent_defineProperty(_this, "copyElementPath", function(_ref5) {
159736
- var { id, path: path9, rendererID } = _ref5;
159737
+ var { id, path: path8, rendererID } = _ref5;
159737
159738
  var renderer = _this._rendererInterfaces[rendererID];
159738
159739
  if (renderer == null) {
159739
159740
  console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
159740
159741
  } else {
159741
- var value = renderer.getSerializedElementValueByPath(id, path9);
159742
+ var value = renderer.getSerializedElementValueByPath(id, path8);
159742
159743
  if (value != null) {
159743
159744
  _this._bridge.send("saveToClipboard", value);
159744
159745
  } else {
@@ -159747,12 +159748,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
159747
159748
  }
159748
159749
  });
159749
159750
  agent_defineProperty(_this, "deletePath", function(_ref6) {
159750
- var { hookID, id, path: path9, rendererID, type } = _ref6;
159751
+ var { hookID, id, path: path8, rendererID, type } = _ref6;
159751
159752
  var renderer = _this._rendererInterfaces[rendererID];
159752
159753
  if (renderer == null) {
159753
159754
  console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
159754
159755
  } else {
159755
- renderer.deletePath(type, id, hookID, path9);
159756
+ renderer.deletePath(type, id, hookID, path8);
159756
159757
  }
159757
159758
  });
159758
159759
  agent_defineProperty(_this, "getBackendVersion", function() {
@@ -159789,12 +159790,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
159789
159790
  }
159790
159791
  });
159791
159792
  agent_defineProperty(_this, "inspectElement", function(_ref9) {
159792
- var { forceFullData, id, path: path9, rendererID, requestID } = _ref9;
159793
+ var { forceFullData, id, path: path8, rendererID, requestID } = _ref9;
159793
159794
  var renderer = _this._rendererInterfaces[rendererID];
159794
159795
  if (renderer == null) {
159795
159796
  console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
159796
159797
  } else {
159797
- _this._bridge.send("inspectedElement", renderer.inspectElement(requestID, id, path9, forceFullData));
159798
+ _this._bridge.send("inspectedElement", renderer.inspectElement(requestID, id, path8, forceFullData));
159798
159799
  if (_this._persistedSelectionMatch === null || _this._persistedSelectionMatch.id !== id) {
159799
159800
  _this._persistedSelection = null;
159800
159801
  _this._persistedSelectionMatch = null;
@@ -159828,15 +159829,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
159828
159829
  }
159829
159830
  for (var rendererID in _this._rendererInterfaces) {
159830
159831
  var renderer = _this._rendererInterfaces[rendererID];
159831
- var path9 = null;
159832
+ var path8 = null;
159832
159833
  if (suspendedByPathIndex !== null && rendererPath !== null) {
159833
159834
  var suspendedByPathRendererIndex = suspendedByPathIndex - suspendedByOffset;
159834
159835
  var rendererHasRequestedSuspendedByPath = renderer.getElementAttributeByPath(id, ["suspendedBy", suspendedByPathRendererIndex]) !== undefined;
159835
159836
  if (rendererHasRequestedSuspendedByPath) {
159836
- path9 = ["suspendedBy", suspendedByPathRendererIndex].concat(rendererPath);
159837
+ path8 = ["suspendedBy", suspendedByPathRendererIndex].concat(rendererPath);
159837
159838
  }
159838
159839
  }
159839
- var inspectedRootsPayload = renderer.inspectElement(requestID, id, path9, forceFullData);
159840
+ var inspectedRootsPayload = renderer.inspectElement(requestID, id, path8, forceFullData);
159840
159841
  switch (inspectedRootsPayload.type) {
159841
159842
  case "hydrated-path":
159842
159843
  inspectedRootsPayload.path[1] += suspendedByOffset;
@@ -159930,20 +159931,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
159930
159931
  }
159931
159932
  });
159932
159933
  agent_defineProperty(_this, "overrideValueAtPath", function(_ref15) {
159933
- var { hookID, id, path: path9, rendererID, type, value } = _ref15;
159934
+ var { hookID, id, path: path8, rendererID, type, value } = _ref15;
159934
159935
  var renderer = _this._rendererInterfaces[rendererID];
159935
159936
  if (renderer == null) {
159936
159937
  console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
159937
159938
  } else {
159938
- renderer.overrideValueAtPath(type, id, hookID, path9, value);
159939
+ renderer.overrideValueAtPath(type, id, hookID, path8, value);
159939
159940
  }
159940
159941
  });
159941
159942
  agent_defineProperty(_this, "overrideContext", function(_ref16) {
159942
- var { id, path: path9, rendererID, wasForwarded, value } = _ref16;
159943
+ var { id, path: path8, rendererID, wasForwarded, value } = _ref16;
159943
159944
  if (!wasForwarded) {
159944
159945
  _this.overrideValueAtPath({
159945
159946
  id,
159946
- path: path9,
159947
+ path: path8,
159947
159948
  rendererID,
159948
159949
  type: "context",
159949
159950
  value
@@ -159951,11 +159952,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
159951
159952
  }
159952
159953
  });
159953
159954
  agent_defineProperty(_this, "overrideHookState", function(_ref17) {
159954
- var { id, hookID, path: path9, rendererID, wasForwarded, value } = _ref17;
159955
+ var { id, hookID, path: path8, rendererID, wasForwarded, value } = _ref17;
159955
159956
  if (!wasForwarded) {
159956
159957
  _this.overrideValueAtPath({
159957
159958
  id,
159958
- path: path9,
159959
+ path: path8,
159959
159960
  rendererID,
159960
159961
  type: "hooks",
159961
159962
  value
@@ -159963,11 +159964,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
159963
159964
  }
159964
159965
  });
159965
159966
  agent_defineProperty(_this, "overrideProps", function(_ref18) {
159966
- var { id, path: path9, rendererID, wasForwarded, value } = _ref18;
159967
+ var { id, path: path8, rendererID, wasForwarded, value } = _ref18;
159967
159968
  if (!wasForwarded) {
159968
159969
  _this.overrideValueAtPath({
159969
159970
  id,
159970
- path: path9,
159971
+ path: path8,
159971
159972
  rendererID,
159972
159973
  type: "props",
159973
159974
  value
@@ -159975,11 +159976,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
159975
159976
  }
159976
159977
  });
159977
159978
  agent_defineProperty(_this, "overrideState", function(_ref19) {
159978
- var { id, path: path9, rendererID, wasForwarded, value } = _ref19;
159979
+ var { id, path: path8, rendererID, wasForwarded, value } = _ref19;
159979
159980
  if (!wasForwarded) {
159980
159981
  _this.overrideValueAtPath({
159981
159982
  id,
159982
- path: path9,
159983
+ path: path8,
159983
159984
  rendererID,
159984
159985
  type: "state",
159985
159986
  value
@@ -160046,12 +160047,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
160046
160047
  _this._bridge.send("stopInspectingHost", selected);
160047
160048
  });
160048
160049
  agent_defineProperty(_this, "storeAsGlobal", function(_ref23) {
160049
- var { count, id, path: path9, rendererID } = _ref23;
160050
+ var { count, id, path: path8, rendererID } = _ref23;
160050
160051
  var renderer = _this._rendererInterfaces[rendererID];
160051
160052
  if (renderer == null) {
160052
160053
  console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
160053
160054
  } else {
160054
- renderer.storeAsGlobal(id, path9, count);
160055
+ renderer.storeAsGlobal(id, path8, count);
160055
160056
  }
160056
160057
  });
160057
160058
  agent_defineProperty(_this, "updateHookSettings", function(settings) {
@@ -160068,12 +160069,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
160068
160069
  var rendererID = +rendererIDString;
160069
160070
  var renderer = _this._rendererInterfaces[rendererID];
160070
160071
  if (_this._lastSelectedRendererID === rendererID) {
160071
- var path9 = renderer.getPathForElement(_this._lastSelectedElementID);
160072
- if (path9 !== null) {
160073
- renderer.setTrackedPath(path9);
160072
+ var path8 = renderer.getPathForElement(_this._lastSelectedElementID);
160073
+ if (path8 !== null) {
160074
+ renderer.setTrackedPath(path8);
160074
160075
  _this._persistedSelection = {
160075
160076
  rendererID,
160076
- path: path9
160077
+ path: path8
160077
160078
  };
160078
160079
  }
160079
160080
  }
@@ -160148,11 +160149,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
160148
160149
  var rendererID = _this._lastSelectedRendererID;
160149
160150
  var id = _this._lastSelectedElementID;
160150
160151
  var renderer = _this._rendererInterfaces[rendererID];
160151
- var path9 = renderer != null ? renderer.getPathForElement(id) : null;
160152
- if (path9 !== null) {
160152
+ var path8 = renderer != null ? renderer.getPathForElement(id) : null;
160153
+ if (path8 !== null) {
160153
160154
  storage_sessionStorageSetItem(SESSION_STORAGE_LAST_SELECTION_KEY, JSON.stringify({
160154
160155
  rendererID,
160155
- path: path9
160156
+ path: path8
160156
160157
  }));
160157
160158
  } else {
160158
160159
  storage_sessionStorageRemoveItem(SESSION_STORAGE_LAST_SELECTION_KEY);
@@ -160875,7 +160876,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
160875
160876
  hasElementWithId: function hasElementWithId() {
160876
160877
  return false;
160877
160878
  },
160878
- inspectElement: function inspectElement(requestID, id, path9) {
160879
+ inspectElement: function inspectElement(requestID, id, path8) {
160879
160880
  return {
160880
160881
  id,
160881
160882
  responseID: requestID,
@@ -166145,9 +166146,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
166145
166146
  }
166146
166147
  return null;
166147
166148
  }
166148
- function getElementAttributeByPath(id, path9) {
166149
+ function getElementAttributeByPath(id, path8) {
166149
166150
  if (isMostRecentlyInspectedElement(id)) {
166150
- return utils_getInObject(mostRecentlyInspectedElement, path9);
166151
+ return utils_getInObject(mostRecentlyInspectedElement, path8);
166151
166152
  }
166152
166153
  return;
166153
166154
  }
@@ -166850,9 +166851,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
166850
166851
  function isMostRecentlyInspectedElementCurrent(id) {
166851
166852
  return isMostRecentlyInspectedElement(id) && !hasElementUpdatedSinceLastInspected;
166852
166853
  }
166853
- function mergeInspectedPaths(path9) {
166854
+ function mergeInspectedPaths(path8) {
166854
166855
  var current = currentlyInspectedPaths;
166855
- path9.forEach(function(key) {
166856
+ path8.forEach(function(key) {
166856
166857
  if (!current[key]) {
166857
166858
  current[key] = {};
166858
166859
  }
@@ -166860,21 +166861,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
166860
166861
  });
166861
166862
  }
166862
166863
  function createIsPathAllowed(key, secondaryCategory) {
166863
- return function isPathAllowed(path9) {
166864
+ return function isPathAllowed(path8) {
166864
166865
  switch (secondaryCategory) {
166865
166866
  case "hooks":
166866
- if (path9.length === 1) {
166867
+ if (path8.length === 1) {
166867
166868
  return true;
166868
166869
  }
166869
- if (path9[path9.length - 2] === "hookSource" && path9[path9.length - 1] === "fileName") {
166870
+ if (path8[path8.length - 2] === "hookSource" && path8[path8.length - 1] === "fileName") {
166870
166871
  return true;
166871
166872
  }
166872
- if (path9[path9.length - 1] === "subHooks" || path9[path9.length - 2] === "subHooks") {
166873
+ if (path8[path8.length - 1] === "subHooks" || path8[path8.length - 2] === "subHooks") {
166873
166874
  return true;
166874
166875
  }
166875
166876
  break;
166876
166877
  case "suspendedBy":
166877
- if (path9.length < 5) {
166878
+ if (path8.length < 5) {
166878
166879
  return true;
166879
166880
  }
166880
166881
  break;
@@ -166885,8 +166886,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
166885
166886
  if (!current) {
166886
166887
  return false;
166887
166888
  }
166888
- for (var i2 = 0;i2 < path9.length; i2++) {
166889
- current = current[path9[i2]];
166889
+ for (var i2 = 0;i2 < path8.length; i2++) {
166890
+ current = current[path8[i2]];
166890
166891
  if (!current) {
166891
166892
  return false;
166892
166893
  }
@@ -166940,38 +166941,38 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
166940
166941
  break;
166941
166942
  }
166942
166943
  }
166943
- function storeAsGlobal(id, path9, count) {
166944
+ function storeAsGlobal(id, path8, count) {
166944
166945
  if (isMostRecentlyInspectedElement(id)) {
166945
- var value = utils_getInObject(mostRecentlyInspectedElement, path9);
166946
+ var value = utils_getInObject(mostRecentlyInspectedElement, path8);
166946
166947
  var key = "$reactTemp".concat(count);
166947
166948
  window[key] = value;
166948
166949
  console.log(key);
166949
166950
  console.log(value);
166950
166951
  }
166951
166952
  }
166952
- function getSerializedElementValueByPath(id, path9) {
166953
+ function getSerializedElementValueByPath(id, path8) {
166953
166954
  if (isMostRecentlyInspectedElement(id)) {
166954
- var valueToCopy = utils_getInObject(mostRecentlyInspectedElement, path9);
166955
+ var valueToCopy = utils_getInObject(mostRecentlyInspectedElement, path8);
166955
166956
  return serializeToString(valueToCopy);
166956
166957
  }
166957
166958
  }
166958
- function inspectElement(requestID, id, path9, forceFullData) {
166959
- if (path9 !== null) {
166960
- mergeInspectedPaths(path9);
166959
+ function inspectElement(requestID, id, path8, forceFullData) {
166960
+ if (path8 !== null) {
166961
+ mergeInspectedPaths(path8);
166961
166962
  }
166962
166963
  if (isMostRecentlyInspectedElement(id) && !forceFullData) {
166963
166964
  if (!hasElementUpdatedSinceLastInspected) {
166964
- if (path9 !== null) {
166965
+ if (path8 !== null) {
166965
166966
  var secondaryCategory = null;
166966
- if (path9[0] === "hooks" || path9[0] === "suspendedBy") {
166967
- secondaryCategory = path9[0];
166967
+ if (path8[0] === "hooks" || path8[0] === "suspendedBy") {
166968
+ secondaryCategory = path8[0];
166968
166969
  }
166969
166970
  return {
166970
166971
  id,
166971
166972
  responseID: requestID,
166972
166973
  type: "hydrated-path",
166973
- path: path9,
166974
- value: cleanForBridge(utils_getInObject(mostRecentlyInspectedElement, path9), createIsPathAllowed(null, secondaryCategory), path9)
166974
+ path: path8,
166975
+ value: cleanForBridge(utils_getInObject(mostRecentlyInspectedElement, path8), createIsPathAllowed(null, secondaryCategory), path8)
166975
166976
  };
166976
166977
  } else {
166977
166978
  return {
@@ -167167,7 +167168,7 @@ The error thrown in the component is:
167167
167168
  console.groupEnd();
167168
167169
  }
167169
167170
  }
167170
- function deletePath(type, id, hookID, path9) {
167171
+ function deletePath(type, id, hookID, path8) {
167171
167172
  var devtoolsInstance = idToDevToolsInstanceMap.get(id);
167172
167173
  if (devtoolsInstance === undefined) {
167173
167174
  console.warn('Could not find DevToolsInstance with id "'.concat(id, '"'));
@@ -167181,11 +167182,11 @@ The error thrown in the component is:
167181
167182
  var instance = fiber.stateNode;
167182
167183
  switch (type) {
167183
167184
  case "context":
167184
- path9 = path9.slice(1);
167185
+ path8 = path8.slice(1);
167185
167186
  switch (fiber.tag) {
167186
167187
  case ClassComponent:
167187
- if (path9.length === 0) {} else {
167188
- deletePathInObject(instance.context, path9);
167188
+ if (path8.length === 0) {} else {
167189
+ deletePathInObject(instance.context, path8);
167189
167190
  }
167190
167191
  instance.forceUpdate();
167191
167192
  break;
@@ -167195,21 +167196,21 @@ The error thrown in the component is:
167195
167196
  break;
167196
167197
  case "hooks":
167197
167198
  if (typeof overrideHookStateDeletePath === "function") {
167198
- overrideHookStateDeletePath(fiber, hookID, path9);
167199
+ overrideHookStateDeletePath(fiber, hookID, path8);
167199
167200
  }
167200
167201
  break;
167201
167202
  case "props":
167202
167203
  if (instance === null) {
167203
167204
  if (typeof overridePropsDeletePath === "function") {
167204
- overridePropsDeletePath(fiber, path9);
167205
+ overridePropsDeletePath(fiber, path8);
167205
167206
  }
167206
167207
  } else {
167207
- fiber.pendingProps = copyWithDelete(instance.props, path9);
167208
+ fiber.pendingProps = copyWithDelete(instance.props, path8);
167208
167209
  instance.forceUpdate();
167209
167210
  }
167210
167211
  break;
167211
167212
  case "state":
167212
- deletePathInObject(instance.state, path9);
167213
+ deletePathInObject(instance.state, path8);
167213
167214
  instance.forceUpdate();
167214
167215
  break;
167215
167216
  }
@@ -167264,7 +167265,7 @@ The error thrown in the component is:
167264
167265
  }
167265
167266
  }
167266
167267
  }
167267
- function overrideValueAtPath(type, id, hookID, path9, value) {
167268
+ function overrideValueAtPath(type, id, hookID, path8, value) {
167268
167269
  var devtoolsInstance = idToDevToolsInstanceMap.get(id);
167269
167270
  if (devtoolsInstance === undefined) {
167270
167271
  console.warn('Could not find DevToolsInstance with id "'.concat(id, '"'));
@@ -167278,13 +167279,13 @@ The error thrown in the component is:
167278
167279
  var instance = fiber.stateNode;
167279
167280
  switch (type) {
167280
167281
  case "context":
167281
- path9 = path9.slice(1);
167282
+ path8 = path8.slice(1);
167282
167283
  switch (fiber.tag) {
167283
167284
  case ClassComponent:
167284
- if (path9.length === 0) {
167285
+ if (path8.length === 0) {
167285
167286
  instance.context = value;
167286
167287
  } else {
167287
- utils_setInObject(instance.context, path9, value);
167288
+ utils_setInObject(instance.context, path8, value);
167288
167289
  }
167289
167290
  instance.forceUpdate();
167290
167291
  break;
@@ -167294,18 +167295,18 @@ The error thrown in the component is:
167294
167295
  break;
167295
167296
  case "hooks":
167296
167297
  if (typeof overrideHookState === "function") {
167297
- overrideHookState(fiber, hookID, path9, value);
167298
+ overrideHookState(fiber, hookID, path8, value);
167298
167299
  }
167299
167300
  break;
167300
167301
  case "props":
167301
167302
  switch (fiber.tag) {
167302
167303
  case ClassComponent:
167303
- fiber.pendingProps = copyWithSet(instance.props, path9, value);
167304
+ fiber.pendingProps = copyWithSet(instance.props, path8, value);
167304
167305
  instance.forceUpdate();
167305
167306
  break;
167306
167307
  default:
167307
167308
  if (typeof overrideProps === "function") {
167308
- overrideProps(fiber, path9, value);
167309
+ overrideProps(fiber, path8, value);
167309
167310
  }
167310
167311
  break;
167311
167312
  }
@@ -167313,7 +167314,7 @@ The error thrown in the component is:
167313
167314
  case "state":
167314
167315
  switch (fiber.tag) {
167315
167316
  case ClassComponent:
167316
- utils_setInObject(instance.state, path9, value);
167317
+ utils_setInObject(instance.state, path8, value);
167317
167318
  instance.forceUpdate();
167318
167319
  break;
167319
167320
  }
@@ -167599,14 +167600,14 @@ The error thrown in the component is:
167599
167600
  var trackedPathMatchInstance = null;
167600
167601
  var trackedPathMatchDepth = -1;
167601
167602
  var mightBeOnTrackedPath = false;
167602
- function setTrackedPath(path9) {
167603
- if (path9 === null) {
167603
+ function setTrackedPath(path8) {
167604
+ if (path8 === null) {
167604
167605
  trackedPathMatchFiber = null;
167605
167606
  trackedPathMatchInstance = null;
167606
167607
  trackedPathMatchDepth = -1;
167607
167608
  mightBeOnTrackedPath = false;
167608
167609
  }
167609
- trackedPath = path9;
167610
+ trackedPath = path8;
167610
167611
  }
167611
167612
  function updateTrackedPathStateBeforeMount(fiber, fiberInstance) {
167612
167613
  if (trackedPath === null || !mightBeOnTrackedPath) {
@@ -168370,9 +168371,9 @@ The error thrown in the component is:
168370
168371
  }
168371
168372
  var currentlyInspectedElementID = null;
168372
168373
  var currentlyInspectedPaths = {};
168373
- function mergeInspectedPaths(path9) {
168374
+ function mergeInspectedPaths(path8) {
168374
168375
  var current = currentlyInspectedPaths;
168375
- path9.forEach(function(key) {
168376
+ path8.forEach(function(key) {
168376
168377
  if (!current[key]) {
168377
168378
  current[key] = {};
168378
168379
  }
@@ -168380,13 +168381,13 @@ The error thrown in the component is:
168380
168381
  });
168381
168382
  }
168382
168383
  function createIsPathAllowed(key) {
168383
- return function isPathAllowed(path9) {
168384
+ return function isPathAllowed(path8) {
168384
168385
  var current = currentlyInspectedPaths[key];
168385
168386
  if (!current) {
168386
168387
  return false;
168387
168388
  }
168388
- for (var i2 = 0;i2 < path9.length; i2++) {
168389
- current = current[path9[i2]];
168389
+ for (var i2 = 0;i2 < path8.length; i2++) {
168390
+ current = current[path8[i2]];
168390
168391
  if (!current) {
168391
168392
  return false;
168392
168393
  }
@@ -168436,24 +168437,24 @@ The error thrown in the component is:
168436
168437
  break;
168437
168438
  }
168438
168439
  }
168439
- function storeAsGlobal(id, path9, count) {
168440
+ function storeAsGlobal(id, path8, count) {
168440
168441
  var inspectedElement = inspectElementRaw(id);
168441
168442
  if (inspectedElement !== null) {
168442
- var value = utils_getInObject(inspectedElement, path9);
168443
+ var value = utils_getInObject(inspectedElement, path8);
168443
168444
  var key = "$reactTemp".concat(count);
168444
168445
  window[key] = value;
168445
168446
  console.log(key);
168446
168447
  console.log(value);
168447
168448
  }
168448
168449
  }
168449
- function getSerializedElementValueByPath(id, path9) {
168450
+ function getSerializedElementValueByPath(id, path8) {
168450
168451
  var inspectedElement = inspectElementRaw(id);
168451
168452
  if (inspectedElement !== null) {
168452
- var valueToCopy = utils_getInObject(inspectedElement, path9);
168453
+ var valueToCopy = utils_getInObject(inspectedElement, path8);
168453
168454
  return serializeToString(valueToCopy);
168454
168455
  }
168455
168456
  }
168456
- function inspectElement(requestID, id, path9, forceFullData) {
168457
+ function inspectElement(requestID, id, path8, forceFullData) {
168457
168458
  if (forceFullData || currentlyInspectedElementID !== id) {
168458
168459
  currentlyInspectedElementID = id;
168459
168460
  currentlyInspectedPaths = {};
@@ -168466,8 +168467,8 @@ The error thrown in the component is:
168466
168467
  type: "not-found"
168467
168468
  };
168468
168469
  }
168469
- if (path9 !== null) {
168470
- mergeInspectedPaths(path9);
168470
+ if (path8 !== null) {
168471
+ mergeInspectedPaths(path8);
168471
168472
  }
168472
168473
  updateSelectedElement(id);
168473
168474
  inspectedElement.context = cleanForBridge(inspectedElement.context, createIsPathAllowed("context"));
@@ -168670,10 +168671,10 @@ The error thrown in the component is:
168670
168671
  console.groupEnd();
168671
168672
  }
168672
168673
  }
168673
- function getElementAttributeByPath(id, path9) {
168674
+ function getElementAttributeByPath(id, path8) {
168674
168675
  var inspectedElement = inspectElementRaw(id);
168675
168676
  if (inspectedElement !== null) {
168676
- return utils_getInObject(inspectedElement, path9);
168677
+ return utils_getInObject(inspectedElement, path8);
168677
168678
  }
168678
168679
  return;
168679
168680
  }
@@ -168690,14 +168691,14 @@ The error thrown in the component is:
168690
168691
  }
168691
168692
  return element.type;
168692
168693
  }
168693
- function deletePath(type, id, hookID, path9) {
168694
+ function deletePath(type, id, hookID, path8) {
168694
168695
  var internalInstance = idToInternalInstanceMap.get(id);
168695
168696
  if (internalInstance != null) {
168696
168697
  var publicInstance = internalInstance._instance;
168697
168698
  if (publicInstance != null) {
168698
168699
  switch (type) {
168699
168700
  case "context":
168700
- deletePathInObject(publicInstance.context, path9);
168701
+ deletePathInObject(publicInstance.context, path8);
168701
168702
  forceUpdate(publicInstance);
168702
168703
  break;
168703
168704
  case "hooks":
@@ -168705,12 +168706,12 @@ The error thrown in the component is:
168705
168706
  case "props":
168706
168707
  var element = internalInstance._currentElement;
168707
168708
  internalInstance._currentElement = legacy_renderer_objectSpread(legacy_renderer_objectSpread({}, element), {}, {
168708
- props: copyWithDelete(element.props, path9)
168709
+ props: copyWithDelete(element.props, path8)
168709
168710
  });
168710
168711
  forceUpdate(publicInstance);
168711
168712
  break;
168712
168713
  case "state":
168713
- deletePathInObject(publicInstance.state, path9);
168714
+ deletePathInObject(publicInstance.state, path8);
168714
168715
  forceUpdate(publicInstance);
168715
168716
  break;
168716
168717
  }
@@ -168744,14 +168745,14 @@ The error thrown in the component is:
168744
168745
  }
168745
168746
  }
168746
168747
  }
168747
- function overrideValueAtPath(type, id, hookID, path9, value) {
168748
+ function overrideValueAtPath(type, id, hookID, path8, value) {
168748
168749
  var internalInstance = idToInternalInstanceMap.get(id);
168749
168750
  if (internalInstance != null) {
168750
168751
  var publicInstance = internalInstance._instance;
168751
168752
  if (publicInstance != null) {
168752
168753
  switch (type) {
168753
168754
  case "context":
168754
- utils_setInObject(publicInstance.context, path9, value);
168755
+ utils_setInObject(publicInstance.context, path8, value);
168755
168756
  forceUpdate(publicInstance);
168756
168757
  break;
168757
168758
  case "hooks":
@@ -168759,12 +168760,12 @@ The error thrown in the component is:
168759
168760
  case "props":
168760
168761
  var element = internalInstance._currentElement;
168761
168762
  internalInstance._currentElement = legacy_renderer_objectSpread(legacy_renderer_objectSpread({}, element), {}, {
168762
- props: copyWithSet(element.props, path9, value)
168763
+ props: copyWithSet(element.props, path8, value)
168763
168764
  });
168764
168765
  forceUpdate(publicInstance);
168765
168766
  break;
168766
168767
  case "state":
168767
- utils_setInObject(publicInstance.state, path9, value);
168768
+ utils_setInObject(publicInstance.state, path8, value);
168768
168769
  forceUpdate(publicInstance);
168769
168770
  break;
168770
168771
  }
@@ -168805,7 +168806,7 @@ The error thrown in the component is:
168805
168806
  return [];
168806
168807
  }
168807
168808
  function setTraceUpdatesEnabled(enabled) {}
168808
- function setTrackedPath(path9) {}
168809
+ function setTrackedPath(path8) {}
168809
168810
  function getOwnersList(id) {
168810
168811
  return null;
168811
168812
  }
@@ -170617,10 +170618,10 @@ var require_jsx_dev_runtime = __commonJS((exports, module) => {
170617
170618
  });
170618
170619
 
170619
170620
  // ../../node_modules/.bun/is-docker@3.0.0/node_modules/is-docker/index.js
170620
- import fs10 from "node:fs";
170621
+ import fs9 from "node:fs";
170621
170622
  function hasDockerEnv() {
170622
170623
  try {
170623
- fs10.statSync("/.dockerenv");
170624
+ fs9.statSync("/.dockerenv");
170624
170625
  return true;
170625
170626
  } catch {
170626
170627
  return false;
@@ -170628,7 +170629,7 @@ function hasDockerEnv() {
170628
170629
  }
170629
170630
  function hasDockerCGroup() {
170630
170631
  try {
170631
- return fs10.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
170632
+ return fs9.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
170632
170633
  } catch {
170633
170634
  return false;
170634
170635
  }
@@ -170643,7 +170644,7 @@ var isDockerCached;
170643
170644
  var init_is_docker = () => {};
170644
170645
 
170645
170646
  // ../../node_modules/.bun/is-inside-container@1.0.0/node_modules/is-inside-container/index.js
170646
- import fs11 from "node:fs";
170647
+ import fs10 from "node:fs";
170647
170648
  function isInsideContainer() {
170648
170649
  if (cachedResult === undefined) {
170649
170650
  cachedResult = hasContainerEnv() || isDocker();
@@ -170652,7 +170653,7 @@ function isInsideContainer() {
170652
170653
  }
170653
170654
  var cachedResult, hasContainerEnv = () => {
170654
170655
  try {
170655
- fs11.statSync("/run/.containerenv");
170656
+ fs10.statSync("/run/.containerenv");
170656
170657
  return true;
170657
170658
  } catch {
170658
170659
  return false;
@@ -170664,24 +170665,24 @@ var init_is_inside_container = __esm(() => {
170664
170665
 
170665
170666
  // ../../node_modules/.bun/is-wsl@3.1.1/node_modules/is-wsl/index.js
170666
170667
  import process16 from "node:process";
170667
- import os4 from "node:os";
170668
- import fs12 from "node:fs";
170668
+ import os3 from "node:os";
170669
+ import fs11 from "node:fs";
170669
170670
  var isWsl = () => {
170670
170671
  if (process16.platform !== "linux") {
170671
170672
  return false;
170672
170673
  }
170673
- if (os4.release().toLowerCase().includes("microsoft")) {
170674
+ if (os3.release().toLowerCase().includes("microsoft")) {
170674
170675
  if (isInsideContainer()) {
170675
170676
  return false;
170676
170677
  }
170677
170678
  return true;
170678
170679
  }
170679
170680
  try {
170680
- if (fs12.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft")) {
170681
+ if (fs11.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft")) {
170681
170682
  return !isInsideContainer();
170682
170683
  }
170683
170684
  } catch {}
170684
- if (fs12.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop") || fs12.existsSync("/run/WSL")) {
170685
+ if (fs11.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop") || fs11.existsSync("/run/WSL")) {
170685
170686
  return !isInsideContainer();
170686
170687
  }
170687
170688
  return false;
@@ -170726,7 +170727,7 @@ var require_strip_final_newline = __commonJS((exports, module) => {
170726
170727
 
170727
170728
  // ../../node_modules/.bun/npm-run-path@4.0.1/node_modules/npm-run-path/index.js
170728
170729
  var require_npm_run_path = __commonJS((exports, module) => {
170729
- var path9 = __require("path");
170730
+ var path8 = __require("path");
170730
170731
  var pathKey = require_path_key();
170731
170732
  var npmRunPath = (options) => {
170732
170733
  options = {
@@ -170736,16 +170737,16 @@ var require_npm_run_path = __commonJS((exports, module) => {
170736
170737
  ...options
170737
170738
  };
170738
170739
  let previous;
170739
- let cwdPath = path9.resolve(options.cwd);
170740
+ let cwdPath = path8.resolve(options.cwd);
170740
170741
  const result2 = [];
170741
170742
  while (previous !== cwdPath) {
170742
- result2.push(path9.join(cwdPath, "node_modules/.bin"));
170743
+ result2.push(path8.join(cwdPath, "node_modules/.bin"));
170743
170744
  previous = cwdPath;
170744
- cwdPath = path9.resolve(cwdPath, "..");
170745
+ cwdPath = path8.resolve(cwdPath, "..");
170745
170746
  }
170746
- const execPathDir = path9.resolve(options.cwd, options.execPath, "..");
170747
+ const execPathDir = path8.resolve(options.cwd, options.execPath, "..");
170747
170748
  result2.push(execPathDir);
170748
- return result2.concat(options.path).join(path9.delimiter);
170749
+ return result2.concat(options.path).join(path8.delimiter);
170749
170750
  };
170750
170751
  module.exports = npmRunPath;
170751
170752
  module.exports.default = npmRunPath;
@@ -170755,9 +170756,9 @@ var require_npm_run_path = __commonJS((exports, module) => {
170755
170756
  ...options
170756
170757
  };
170757
170758
  const env6 = { ...options.env };
170758
- const path10 = pathKey({ env: env6 });
170759
- options.path = env6[path10];
170760
- env6[path10] = module.exports(options);
170759
+ const path9 = pathKey({ env: env6 });
170760
+ options.path = env6[path9];
170761
+ env6[path9] = module.exports(options);
170761
170762
  return env6;
170762
170763
  };
170763
170764
  });
@@ -171264,7 +171265,7 @@ var require_stdio = __commonJS((exports, module) => {
171264
171265
 
171265
171266
  // ../../node_modules/.bun/execa@5.1.1/node_modules/execa/lib/kill.js
171266
171267
  var require_kill = __commonJS((exports, module) => {
171267
- var os5 = __require("os");
171268
+ var os4 = __require("os");
171268
171269
  var onExit = require_signal_exit();
171269
171270
  var DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;
171270
171271
  var spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
@@ -171288,7 +171289,7 @@ var require_kill = __commonJS((exports, module) => {
171288
171289
  return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
171289
171290
  };
171290
171291
  var isSigterm = (signal) => {
171291
- return signal === os5.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
171292
+ return signal === os4.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
171292
171293
  };
171293
171294
  var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
171294
171295
  if (forceKillAfterTimeout === true) {
@@ -171646,7 +171647,7 @@ var require_command = __commonJS((exports, module) => {
171646
171647
 
171647
171648
  // ../../node_modules/.bun/execa@5.1.1/node_modules/execa/index.js
171648
171649
  var require_execa = __commonJS((exports, module) => {
171649
- var path9 = __require("path");
171650
+ var path8 = __require("path");
171650
171651
  var childProcess = __require("child_process");
171651
171652
  var crossSpawn = require_cross_spawn();
171652
171653
  var stripFinalNewline = require_strip_final_newline();
@@ -171688,7 +171689,7 @@ var require_execa = __commonJS((exports, module) => {
171688
171689
  };
171689
171690
  options.env = getEnv2(options);
171690
171691
  options.stdio = normalizeStdio(options);
171691
- if (process.platform === "win32" && path9.basename(file, ".exe") === "cmd") {
171692
+ if (process.platform === "win32" && path8.basename(file, ".exe") === "cmd") {
171692
171693
  args.unshift("/q");
171693
171694
  }
171694
171695
  return { file, args, options, parsed };
@@ -173946,13 +173947,13 @@ var require_semver4 = __commonJS((exports, module) => {
173946
173947
 
173947
173948
  // ../../node_modules/.bun/macos-version@6.0.0/node_modules/macos-version/index.js
173948
173949
  import process18 from "node:process";
173949
- import fs13 from "node:fs";
173950
+ import fs12 from "node:fs";
173950
173951
  function macOSVersion() {
173951
173952
  if (!isMacOS) {
173952
173953
  return;
173953
173954
  }
173954
173955
  if (!version2) {
173955
- const file = fs13.readFileSync("/System/Library/CoreServices/SystemVersion.plist", "utf8");
173956
+ const file = fs12.readFileSync("/System/Library/CoreServices/SystemVersion.plist", "utf8");
173956
173957
  const matches2 = parseVersion(file);
173957
173958
  if (!matches2) {
173958
173959
  return;
@@ -174120,7 +174121,7 @@ async function writeClipboardImages(filePaths) {
174120
174121
  if (process19.platform !== "darwin") {
174121
174122
  return;
174122
174123
  }
174123
- const paths = filePaths.map((path9) => path9 instanceof URL ? fileURLToPath(path9) : path9);
174124
+ const paths = filePaths.map((path8) => path8 instanceof URL ? fileURLToPath(path8) : path8);
174124
174125
  await runJxa((...paths2) => {
174125
174126
  ObjC.import("AppKit");
174126
174127
  ObjC.import("Foundation");
@@ -175016,7 +175017,7 @@ function pathKey(options = {}) {
175016
175017
  // ../../node_modules/.bun/unicorn-magic@0.3.0/node_modules/unicorn-magic/node.js
175017
175018
  import { promisify as promisify4 } from "node:util";
175018
175019
  import { execFile as execFileCallback, execFileSync as execFileSyncOriginal } from "node:child_process";
175019
- import path9 from "node:path";
175020
+ import path8 from "node:path";
175020
175021
  import { fileURLToPath as fileURLToPath3 } from "node:url";
175021
175022
  function toPath2(urlOrPath) {
175022
175023
  return urlOrPath instanceof URL ? fileURLToPath3(urlOrPath) : urlOrPath;
@@ -175024,12 +175025,12 @@ function toPath2(urlOrPath) {
175024
175025
  function traversePathUp(startPath) {
175025
175026
  return {
175026
175027
  *[Symbol.iterator]() {
175027
- let currentPath = path9.resolve(toPath2(startPath));
175028
+ let currentPath = path8.resolve(toPath2(startPath));
175028
175029
  let previousPath;
175029
175030
  while (previousPath !== currentPath) {
175030
175031
  yield currentPath;
175031
175032
  previousPath = currentPath;
175032
- currentPath = path9.resolve(currentPath, "..");
175033
+ currentPath = path8.resolve(currentPath, "..");
175033
175034
  }
175034
175035
  }
175035
175036
  };
@@ -175042,7 +175043,7 @@ var init_node3 = __esm(() => {
175042
175043
 
175043
175044
  // ../../node_modules/.bun/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
175044
175045
  import process22 from "node:process";
175045
- import path10 from "node:path";
175046
+ import path9 from "node:path";
175046
175047
  var npmRunPath = ({
175047
175048
  cwd: cwd2 = process22.cwd(),
175048
175049
  path: pathOption = process22.env[pathKey()],
@@ -175050,25 +175051,25 @@ var npmRunPath = ({
175050
175051
  execPath = process22.execPath,
175051
175052
  addExecPath = true
175052
175053
  } = {}) => {
175053
- const cwdPath = path10.resolve(toPath2(cwd2));
175054
+ const cwdPath = path9.resolve(toPath2(cwd2));
175054
175055
  const result2 = [];
175055
- const pathParts = pathOption.split(path10.delimiter);
175056
+ const pathParts = pathOption.split(path9.delimiter);
175056
175057
  if (preferLocal) {
175057
175058
  applyPreferLocal(result2, pathParts, cwdPath);
175058
175059
  }
175059
175060
  if (addExecPath) {
175060
175061
  applyExecPath(result2, pathParts, execPath, cwdPath);
175061
175062
  }
175062
- return pathOption === "" || pathOption === path10.delimiter ? `${result2.join(path10.delimiter)}${pathOption}` : [...result2, pathOption].join(path10.delimiter);
175063
+ return pathOption === "" || pathOption === path9.delimiter ? `${result2.join(path9.delimiter)}${pathOption}` : [...result2, pathOption].join(path9.delimiter);
175063
175064
  }, applyPreferLocal = (result2, pathParts, cwdPath) => {
175064
175065
  for (const directory of traversePathUp(cwdPath)) {
175065
- const pathPart = path10.join(directory, "node_modules/.bin");
175066
+ const pathPart = path9.join(directory, "node_modules/.bin");
175066
175067
  if (!pathParts.includes(pathPart)) {
175067
175068
  result2.push(pathPart);
175068
175069
  }
175069
175070
  }
175070
175071
  }, applyExecPath = (result2, pathParts, execPath, cwdPath) => {
175071
- const pathPart = path10.resolve(cwdPath, toPath2(execPath), "..");
175072
+ const pathPart = path9.resolve(cwdPath, toPath2(execPath), "..");
175072
175073
  if (!pathParts.includes(pathPart)) {
175073
175074
  result2.push(pathPart);
175074
175075
  }
@@ -176178,7 +176179,7 @@ var init_timeout = __esm(() => {
176178
176179
 
176179
176180
  // ../../node_modules/.bun/execa@9.6.1/node_modules/execa/lib/methods/node.js
176180
176181
  import { execPath, execArgv } from "node:process";
176181
- import path11 from "node:path";
176182
+ import path10 from "node:path";
176182
176183
  var mapNode = ({ options }) => {
176183
176184
  if (options.node === false) {
176184
176185
  throw new TypeError('The "node" option cannot be false with `execaNode()`.');
@@ -176196,7 +176197,7 @@ var mapNode = ({ options }) => {
176196
176197
  throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');
176197
176198
  }
176198
176199
  const normalizedNodePath = safeNormalizeFileUrl(nodePath, 'The "nodePath" option');
176199
- const resolvedNodePath = path11.resolve(cwd2, normalizedNodePath);
176200
+ const resolvedNodePath = path10.resolve(cwd2, normalizedNodePath);
176200
176201
  const newOptions = {
176201
176202
  ...options,
176202
176203
  nodePath: resolvedNodePath,
@@ -176206,7 +176207,7 @@ var mapNode = ({ options }) => {
176206
176207
  if (!shouldHandleNode) {
176207
176208
  return [file, commandArguments2, newOptions];
176208
176209
  }
176209
- if (path11.basename(file, ".exe") === "node") {
176210
+ if (path10.basename(file, ".exe") === "node") {
176210
176211
  throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');
176211
176212
  }
176212
176213
  return [
@@ -176297,11 +176298,11 @@ var init_encoding_option = __esm(() => {
176297
176298
 
176298
176299
  // ../../node_modules/.bun/execa@9.6.1/node_modules/execa/lib/arguments/cwd.js
176299
176300
  import { statSync as statSync2 } from "node:fs";
176300
- import path12 from "node:path";
176301
+ import path11 from "node:path";
176301
176302
  import process23 from "node:process";
176302
176303
  var normalizeCwd = (cwd2 = getDefaultCwd()) => {
176303
176304
  const cwdString = safeNormalizeFileUrl(cwd2, 'The "cwd" option');
176304
- return path12.resolve(cwdString);
176305
+ return path11.resolve(cwdString);
176305
176306
  }, getDefaultCwd = () => {
176306
176307
  try {
176307
176308
  return process23.cwd();
@@ -176333,7 +176334,7 @@ var init_cwd = __esm(() => {
176333
176334
  });
176334
176335
 
176335
176336
  // ../../node_modules/.bun/execa@9.6.1/node_modules/execa/lib/arguments/options.js
176336
- import path13 from "node:path";
176337
+ import path12 from "node:path";
176337
176338
  import process24 from "node:process";
176338
176339
  var import_cross_spawn2, normalizeOptions = (filePath, rawArguments, rawOptions) => {
176339
176340
  rawOptions.cwd = normalizeCwd(rawOptions.cwd);
@@ -176351,7 +176352,7 @@ var import_cross_spawn2, normalizeOptions = (filePath, rawArguments, rawOptions)
176351
176352
  options.killSignal = normalizeKillSignal(options.killSignal);
176352
176353
  options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
176353
176354
  options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
176354
- if (process24.platform === "win32" && path13.basename(file, ".exe") === "cmd") {
176355
+ if (process24.platform === "win32" && path12.basename(file, ".exe") === "cmd") {
176355
176356
  commandArguments2.unshift("/q");
176356
176357
  }
176357
176358
  return { file, commandArguments: commandArguments2, options };
@@ -178477,13 +178478,13 @@ var transformOutputSync = ({ fileDescriptors, syncResult: { output }, options, i
178477
178478
  state.error ??= error4;
178478
178479
  }
178479
178480
  }, writeToFiles = (serializedResult, stdioItems, outputFiles) => {
178480
- for (const { path: path14, append: append3 } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
178481
- const pathString = typeof path14 === "string" ? path14 : path14.toString();
178481
+ for (const { path: path13, append: append3 } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
178482
+ const pathString = typeof path13 === "string" ? path13 : path13.toString();
178482
178483
  if (append3 || outputFiles.has(pathString)) {
178483
- appendFileSync(path14, serializedResult);
178484
+ appendFileSync(path13, serializedResult);
178484
178485
  } else {
178485
178486
  outputFiles.add(pathString);
178486
- writeFileSync(path14, serializedResult);
178487
+ writeFileSync(path13, serializedResult);
178487
178488
  }
178488
178489
  }
178489
178490
  };
@@ -180927,8 +180928,8 @@ var init_termux = __esm(() => {
180927
180928
  });
180928
180929
 
180929
180930
  // ../../node_modules/.bun/clipboardy@5.3.1/node_modules/clipboardy/lib/linux.js
180930
- import fs14 from "node:fs";
180931
- import path14 from "node:path";
180931
+ import fs13 from "node:fs";
180932
+ import path13 from "node:path";
180932
180933
  import { fileURLToPath as fileURLToPath4 } from "node:url";
180933
180934
  var __dirname2, xsel = "xsel", xselFallbackPath, hasXselFallback, copyArguments, pasteArguments, isDisplayError = (error4) => /Can't open display|Inappropriate ioctl/i.test(error4.stderr ?? ""), makeError2 = (xselError, fallbackError) => {
180934
180935
  let message;
@@ -180981,9 +180982,9 @@ var __dirname2, xsel = "xsel", xselFallbackPath, hasXselFallback, copyArguments,
180981
180982
  }, clipboard2, linux_default;
180982
180983
  var init_linux = __esm(() => {
180983
180984
  init_execa();
180984
- __dirname2 = path14.dirname(fileURLToPath4(import.meta.url));
180985
- xselFallbackPath = path14.join(__dirname2, "../fallbacks/linux/xsel");
180986
- hasXselFallback = fs14.existsSync(xselFallbackPath);
180985
+ __dirname2 = path13.dirname(fileURLToPath4(import.meta.url));
180986
+ xselFallbackPath = path13.join(__dirname2, "../fallbacks/linux/xsel");
180987
+ hasXselFallback = fs13.existsSync(xselFallbackPath);
180987
180988
  copyArguments = ["--clipboard", "--input"];
180988
180989
  pasteArguments = ["--clipboard", "--output"];
180989
180990
  clipboard2 = {
@@ -181147,8 +181148,8 @@ var init_powershell_utils = __esm(() => {
181147
181148
  });
181148
181149
 
181149
181150
  // ../../node_modules/.bun/clipboardy@5.3.1/node_modules/clipboardy/lib/windows.js
181150
- import fs15 from "node:fs";
181151
- import path15 from "node:path";
181151
+ import fs14 from "node:fs";
181152
+ import path14 from "node:path";
181152
181153
  import { fileURLToPath as fileURLToPath5 } from "node:url";
181153
181154
  var __dirname3, binarySuffix, windowBinaryPath, hasWindowsBinaryFallback, psCopyScript, psPasteScript, executeWithFallback = async (primaryCommand, fallbackCommand) => {
181154
181155
  try {
@@ -181185,10 +181186,10 @@ var init_windows = __esm(() => {
181185
181186
  init_execa();
181186
181187
  init_is64bit();
181187
181188
  init_powershell_utils();
181188
- __dirname3 = path15.dirname(fileURLToPath5(import.meta.url));
181189
+ __dirname3 = path14.dirname(fileURLToPath5(import.meta.url));
181189
181190
  binarySuffix = process.arch === "arm64" ? "aarch64" : is64bitSync() ? "x86_64" : "i686";
181190
- windowBinaryPath = path15.join(__dirname3, `../fallbacks/windows/clipboard_${binarySuffix}.exe`);
181191
- hasWindowsBinaryFallback = fs15.existsSync(windowBinaryPath);
181191
+ windowBinaryPath = path14.join(__dirname3, `../fallbacks/windows/clipboard_${binarySuffix}.exe`);
181192
+ hasWindowsBinaryFallback = fs14.existsSync(windowBinaryPath);
181192
181193
  psCopyScript = `
181193
181194
  try {
181194
181195
  [Console]::InputEncoding = [System.Text.Encoding]::UTF8
@@ -221714,15 +221715,15 @@ var require_route = __commonJS((exports, module) => {
221714
221715
  };
221715
221716
  }
221716
221717
  function wrapConversion(toModel, graph) {
221717
- const path17 = [graph[toModel].parent, toModel];
221718
+ const path16 = [graph[toModel].parent, toModel];
221718
221719
  let fn = conversions[graph[toModel].parent][toModel];
221719
221720
  let cur = graph[toModel].parent;
221720
221721
  while (graph[cur].parent) {
221721
- path17.unshift(graph[cur].parent);
221722
+ path16.unshift(graph[cur].parent);
221722
221723
  fn = link2(conversions[graph[cur].parent][cur], fn);
221723
221724
  cur = graph[cur].parent;
221724
221725
  }
221725
- fn.conversion = path17;
221726
+ fn.conversion = path16;
221726
221727
  return fn;
221727
221728
  }
221728
221729
  module.exports = function(fromModel) {
@@ -224102,8 +224103,8 @@ var require_cli_spinners = __commonJS((exports, module) => {
224102
224103
 
224103
224104
  // ../../node_modules/.bun/dotenv@17.4.2/node_modules/dotenv/lib/main.js
224104
224105
  var require_main2 = __commonJS((exports, module) => {
224105
- var fs18 = __require("fs");
224106
- var path18 = __require("path");
224106
+ var fs17 = __require("fs");
224107
+ var path17 = __require("path");
224107
224108
  var os5 = __require("os");
224108
224109
  var crypto4 = __require("crypto");
224109
224110
  var TIPS = [
@@ -224236,7 +224237,7 @@ var require_main2 = __commonJS((exports, module) => {
224236
224237
  if (options && options.path && options.path.length > 0) {
224237
224238
  if (Array.isArray(options.path)) {
224238
224239
  for (const filepath of options.path) {
224239
- if (fs18.existsSync(filepath)) {
224240
+ if (fs17.existsSync(filepath)) {
224240
224241
  possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
224241
224242
  }
224242
224243
  }
@@ -224244,15 +224245,15 @@ var require_main2 = __commonJS((exports, module) => {
224244
224245
  possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
224245
224246
  }
224246
224247
  } else {
224247
- possibleVaultPath = path18.resolve(process.cwd(), ".env.vault");
224248
+ possibleVaultPath = path17.resolve(process.cwd(), ".env.vault");
224248
224249
  }
224249
- if (fs18.existsSync(possibleVaultPath)) {
224250
+ if (fs17.existsSync(possibleVaultPath)) {
224250
224251
  return possibleVaultPath;
224251
224252
  }
224252
224253
  return null;
224253
224254
  }
224254
224255
  function _resolveHome(envPath) {
224255
- return envPath[0] === "~" ? path18.join(os5.homedir(), envPath.slice(1)) : envPath;
224256
+ return envPath[0] === "~" ? path17.join(os5.homedir(), envPath.slice(1)) : envPath;
224256
224257
  }
224257
224258
  function _configVault(options) {
224258
224259
  const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
@@ -224269,7 +224270,7 @@ var require_main2 = __commonJS((exports, module) => {
224269
224270
  return { parsed };
224270
224271
  }
224271
224272
  function configDotenv(options) {
224272
- const dotenvPath = path18.resolve(process.cwd(), ".env");
224273
+ const dotenvPath = path17.resolve(process.cwd(), ".env");
224273
224274
  let encoding = "utf8";
224274
224275
  let processEnv = process.env;
224275
224276
  if (options && options.processEnv != null) {
@@ -224297,13 +224298,13 @@ var require_main2 = __commonJS((exports, module) => {
224297
224298
  }
224298
224299
  let lastError;
224299
224300
  const parsedAll = {};
224300
- for (const path19 of optionPaths) {
224301
+ for (const path18 of optionPaths) {
224301
224302
  try {
224302
- const parsed = DotenvModule.parse(fs18.readFileSync(path19, { encoding }));
224303
+ const parsed = DotenvModule.parse(fs17.readFileSync(path18, { encoding }));
224303
224304
  DotenvModule.populate(parsedAll, parsed, options);
224304
224305
  } catch (e2) {
224305
224306
  if (debug) {
224306
- _debug(`failed to load ${path19} ${e2.message}`);
224307
+ _debug(`failed to load ${path18} ${e2.message}`);
224307
224308
  }
224308
224309
  lastError = e2;
224309
224310
  }
@@ -224316,7 +224317,7 @@ var require_main2 = __commonJS((exports, module) => {
224316
224317
  const shortPaths = [];
224317
224318
  for (const filePath of optionPaths) {
224318
224319
  try {
224319
- const relative2 = path18.relative(process.cwd(), filePath);
224320
+ const relative2 = path17.relative(process.cwd(), filePath);
224320
224321
  shortPaths.push(relative2);
224321
224322
  } catch (e2) {
224322
224323
  if (debug) {
@@ -224427,9 +224428,9 @@ __export(exports_config, {
224427
224428
  getProviderConfig: () => getProviderConfig,
224428
224429
  getAuthStatus: () => getAuthStatus
224429
224430
  });
224430
- import fs20 from "node:fs/promises";
224431
+ import fs19 from "node:fs/promises";
224431
224432
  import os5 from "node:os";
224432
- import path19 from "node:path";
224433
+ import path18 from "node:path";
224433
224434
  function deepMergeSettings(base3, overrides) {
224434
224435
  const result2 = { ...base3 };
224435
224436
  for (const key of Object.keys(overrides)) {
@@ -224447,11 +224448,11 @@ function deepMergeSettings(base3, overrides) {
224447
224448
  }
224448
224449
  async function loadConfig() {
224449
224450
  try {
224450
- const data2 = await fs20.readFile(CONFIG_FILE, "utf-8");
224451
+ const data2 = await fs19.readFile(CONFIG_FILE, "utf-8");
224451
224452
  let config2 = JSON.parse(data2);
224452
224453
  try {
224453
- const workspacePath = path19.join(process.cwd(), ".december", "settings.json");
224454
- const wData = await fs20.readFile(workspacePath, "utf-8");
224454
+ const workspacePath = path18.join(process.cwd(), ".december", "settings.json");
224455
+ const wData = await fs19.readFile(workspacePath, "utf-8");
224455
224456
  const workspaceConfig = JSON.parse(wData);
224456
224457
  config2 = deepMergeSettings(config2, workspaceConfig);
224457
224458
  } catch {}
@@ -224464,13 +224465,13 @@ async function loadConfig() {
224464
224465
  }
224465
224466
  }
224466
224467
  async function saveConfig(config2) {
224467
- await fs20.mkdir(CONFIG_DIR, { recursive: true });
224468
- await fs20.writeFile(CONFIG_FILE, JSON.stringify(config2, null, 2), "utf-8");
224468
+ await fs19.mkdir(CONFIG_DIR, { recursive: true });
224469
+ await fs19.writeFile(CONFIG_FILE, JSON.stringify(config2, null, 2), "utf-8");
224469
224470
  }
224470
224471
  async function getProviderConfig() {
224471
224472
  const config2 = await loadConfig();
224472
224473
  const hasByokConfig = config2.activeProvider && config2.providers[config2.activeProvider];
224473
- const hasEnvVars = process.env.GEMINI_API_KEY || process.env.OPENAI_API_KEY || process.env.ANTHROPIC_API_KEY;
224474
+ const hasEnvVars = process.env.GEMINI_API_KEY || process.env.OPENAI_API_KEY || process.env.ANTHROPIC_API_KEY || process.env.OPENROUTER_API_KEY;
224474
224475
  const hasDecember = !!config2.decemberToken;
224475
224476
  if (config2.authPriority === "december" && hasDecember) {
224476
224477
  return { provider: "december_proxy", apiKey: config2.decemberToken, authMethod: "december" };
@@ -224492,6 +224493,9 @@ async function getProviderConfig() {
224492
224493
  if (process.env.ANTHROPIC_API_KEY) {
224493
224494
  return { provider: "anthropic", apiKey: process.env.ANTHROPIC_API_KEY, authMethod: "env" };
224494
224495
  }
224496
+ if (process.env.OPENROUTER_API_KEY) {
224497
+ return { provider: "openrouter", apiKey: process.env.OPENROUTER_API_KEY, authMethod: "env" };
224498
+ }
224495
224499
  if (hasDecember) {
224496
224500
  return {
224497
224501
  provider: "december_proxy",
@@ -224511,8 +224515,8 @@ async function getAuthStatus() {
224511
224515
  }
224512
224516
  var CONFIG_DIR, CONFIG_FILE;
224513
224517
  var init_config = __esm(() => {
224514
- CONFIG_DIR = path19.join(os5.homedir(), ".config", "december");
224515
- CONFIG_FILE = path19.join(CONFIG_DIR, "config.json");
224518
+ CONFIG_DIR = path18.join(os5.homedir(), ".config", "december");
224519
+ CONFIG_FILE = path18.join(CONFIG_DIR, "config.json");
224516
224520
  });
224517
224521
 
224518
224522
  // ../../node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/utils/array.js
@@ -224576,9 +224580,9 @@ var require_fs = __commonJS((exports) => {
224576
224580
  var require_path = __commonJS((exports) => {
224577
224581
  Object.defineProperty(exports, "__esModule", { value: true });
224578
224582
  exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = undefined;
224579
- var os6 = __require("os");
224583
+ var os7 = __require("os");
224580
224584
  var path20 = __require("path");
224581
- var IS_WINDOWS_PLATFORM = os6.platform() === "win32";
224585
+ var IS_WINDOWS_PLATFORM = os7.platform() === "win32";
224582
224586
  var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
224583
224587
  var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
224584
224588
  var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g;
@@ -225162,7 +225166,7 @@ var require_fill_range = __commonJS((exports, module) => {
225162
225166
  * Copyright (c) 2014-present, Jon Schlinkert.
225163
225167
  * Licensed under the MIT License.
225164
225168
  */
225165
- var util2 = __require("util");
225169
+ var util4 = __require("util");
225166
225170
  var toRegexRange = require_to_regex_range();
225167
225171
  var isObject4 = (val2) => val2 !== null && typeof val2 === "object" && !Array.isArray(val2);
225168
225172
  var transform3 = (toNumber2) => {
@@ -225253,7 +225257,7 @@ var require_fill_range = __commonJS((exports, module) => {
225253
225257
  return toRegexRange(start, end2, options);
225254
225258
  };
225255
225259
  var rangeError = (...args) => {
225256
- return new RangeError("Invalid range arguments: " + util2.inspect(...args));
225260
+ return new RangeError("Invalid range arguments: " + util4.inspect(...args));
225257
225261
  };
225258
225262
  var invalidRange = (start, end2, options) => {
225259
225263
  if (options.strictRanges === true)
@@ -227514,7 +227518,7 @@ var require_picomatch = __commonJS((exports, module) => {
227514
227518
 
227515
227519
  // ../../node_modules/.bun/micromatch@4.0.8/node_modules/micromatch/index.js
227516
227520
  var require_micromatch = __commonJS((exports, module) => {
227517
- var util2 = __require("util");
227521
+ var util4 = __require("util");
227518
227522
  var braces = require_braces();
227519
227523
  var picomatch = require_picomatch();
227520
227524
  var utils = require_utils8();
@@ -227589,7 +227593,7 @@ var require_micromatch = __commonJS((exports, module) => {
227589
227593
  };
227590
227594
  micromatch.contains = (str2, pattern, options) => {
227591
227595
  if (typeof str2 !== "string") {
227592
- throw new TypeError(`Expected a string: "${util2.inspect(str2)}"`);
227596
+ throw new TypeError(`Expected a string: "${util4.inspect(str2)}"`);
227593
227597
  }
227594
227598
  if (Array.isArray(pattern)) {
227595
227599
  return pattern.some((p) => micromatch.contains(str2, p, options));
@@ -227636,7 +227640,7 @@ var require_micromatch = __commonJS((exports, module) => {
227636
227640
  };
227637
227641
  micromatch.all = (str2, patterns, options) => {
227638
227642
  if (typeof str2 !== "string") {
227639
- throw new TypeError(`Expected a string: "${util2.inspect(str2)}"`);
227643
+ throw new TypeError(`Expected a string: "${util4.inspect(str2)}"`);
227640
227644
  }
227641
227645
  return [].concat(patterns).every((p) => picomatch(p, options)(str2));
227642
227646
  };
@@ -229864,8 +229868,8 @@ var require_settings4 = __commonJS((exports) => {
229864
229868
  Object.defineProperty(exports, "__esModule", { value: true });
229865
229869
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = undefined;
229866
229870
  var fs21 = __require("fs");
229867
- var os6 = __require("os");
229868
- var CPU_COUNT = Math.max(os6.cpus().length, 1);
229871
+ var os7 = __require("os");
229872
+ var CPU_COUNT = Math.max(os7.cpus().length, 1);
229869
229873
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
229870
229874
  lstat: fs21.lstat,
229871
229875
  lstatSync: fs21.lstatSync,
@@ -230017,122 +230021,9 @@ var require_out4 = __commonJS((exports, module) => {
230017
230021
 
230018
230022
  // src/index.ts
230019
230023
  init_src4();
230020
-
230021
- // src/file-session-repository.ts
230022
- import fs7 from "node:fs/promises";
230023
- import os from "node:os";
230024
- import path8 from "node:path";
230025
-
230026
- class FileSessionRepository {
230027
- sessionDir;
230028
- constructor(sessionDir) {
230029
- this.sessionDir = sessionDir || path8.join(os.homedir(), ".config", "december", "sessions");
230030
- }
230031
- async saveContext(sessionId, messages) {
230032
- await fs7.mkdir(this.sessionDir, { recursive: true });
230033
- const historyPath = path8.join(this.sessionDir, `${sessionId}.jsonl`);
230034
- const existing = {};
230035
- try {
230036
- const data = await fs7.readFile(historyPath, "utf-8");
230037
- const lines = data.split(`
230038
- `).filter((l) => l.trim().length > 0);
230039
- for (const l of lines) {
230040
- const msg = JSON.parse(l);
230041
- if (msg.id)
230042
- existing[msg.id] = msg;
230043
- }
230044
- } catch (e2) {}
230045
- for (const msg of messages) {
230046
- if (msg.id)
230047
- existing[msg.id] = msg;
230048
- }
230049
- const content = Object.values(existing).map((m2) => JSON.stringify(m2)).join(`
230050
- `);
230051
- await fs7.writeFile(historyPath, content, "utf-8");
230052
- }
230053
- async loadContext(sessionId) {
230054
- const historyPath = path8.join(this.sessionDir, `${sessionId}.jsonl`);
230055
- try {
230056
- const data = await fs7.readFile(historyPath, "utf-8");
230057
- const lines = data.split(`
230058
- `).filter((l) => l.trim().length > 0);
230059
- const msgs = lines.map((l) => JSON.parse(l));
230060
- if (msgs.length === 0)
230061
- return [];
230062
- let latestMsg = msgs[0];
230063
- for (const msg of msgs) {
230064
- if ((msg.timestamp || 0) >= (latestMsg.timestamp || 0)) {
230065
- latestMsg = msg;
230066
- }
230067
- }
230068
- const branch = [];
230069
- const msgMap = new Map(msgs.map((m2) => [m2.id, m2]));
230070
- let current = latestMsg;
230071
- while (current) {
230072
- branch.unshift(current);
230073
- if (!current.parentId)
230074
- break;
230075
- current = msgMap.get(current.parentId);
230076
- }
230077
- return branch;
230078
- } catch (e2) {
230079
- return [];
230080
- }
230081
- }
230082
- async listSessions() {
230083
- try {
230084
- await fs7.mkdir(this.sessionDir, { recursive: true });
230085
- const files = await fs7.readdir(this.sessionDir);
230086
- const sessions = [];
230087
- for (const file of files) {
230088
- if (!file.endsWith(".jsonl"))
230089
- continue;
230090
- const id = file.replace(".jsonl", "");
230091
- const filePath = path8.join(this.sessionDir, file);
230092
- try {
230093
- const stat4 = await fs7.stat(filePath);
230094
- const data = await fs7.readFile(filePath, "utf-8");
230095
- const lines = data.split(`
230096
- `).filter((l) => l.trim().length > 0);
230097
- let preview = "";
230098
- for (const line of lines) {
230099
- try {
230100
- const msg = JSON.parse(line);
230101
- if (msg.role === "user") {
230102
- preview = msg.content?.substring(0, 80) || "";
230103
- break;
230104
- }
230105
- } catch {}
230106
- }
230107
- sessions.push({
230108
- id,
230109
- updatedAt: stat4.mtime,
230110
- messageCount: lines.length,
230111
- preview
230112
- });
230113
- } catch {}
230114
- }
230115
- sessions.sort((a, b) => b.updatedAt.getTime() - a.updatedAt.getTime());
230116
- return sessions;
230117
- } catch {
230118
- return [];
230119
- }
230120
- }
230121
- async deleteSession(sessionId) {
230122
- const historyPath = path8.join(this.sessionDir, `${sessionId}.jsonl`);
230123
- try {
230124
- await fs7.unlink(historyPath);
230125
- } catch (e2) {}
230126
- }
230127
- async renameSession(oldSessionId, newSessionId) {
230128
- const oldPath = path8.join(this.sessionDir, `${oldSessionId}.jsonl`);
230129
- const newPath = path8.join(this.sessionDir, `${newSessionId}.jsonl`);
230130
- await fs7.rename(oldPath, newPath);
230131
- }
230132
- }
230133
-
230134
- // src/index.ts
230135
230024
  init_src3();
230025
+ import { execSync as execSync3 } from "child_process";
230026
+ import readline2 from "readline";
230136
230027
  import fs22 from "fs";
230137
230028
  import path21 from "path";
230138
230029
 
@@ -232820,9 +232711,9 @@ var ReadFileTool = {
232820
232711
  name: "read_file",
232821
232712
  description: "Reads the contents of a file. Automatically truncates massive files to protect context limits. Use noTruncate: true if you absolutely need the full file for AST rewriting, or use startLine/endLine for pagination.",
232822
232713
  inputSchema: readSchema,
232823
- execute: async ({ path: path9, startLine, endLine, noTruncate }, context) => {
232714
+ execute: async ({ path: path8, startLine, endLine, noTruncate }, context) => {
232824
232715
  try {
232825
- const content = await context.operations.fs.readFile(path9);
232716
+ const content = await context.operations.fs.readFile(path8);
232826
232717
  const lines = content.split(`
232827
232718
  `);
232828
232719
  const start = startLine ? Math.max(0, startLine - 1) : 0;
@@ -232888,15 +232779,15 @@ var EditFileTool = {
232888
232779
  name: "edit_file",
232889
232780
  description: "Edits an existing file by searching for a specific block of text (targetContent) and replacing it exactly with replacementContent. targetContent must match exactly.",
232890
232781
  inputSchema: editSchema,
232891
- execute: async ({ path: path9, targetContent, replacementContent }, context) => {
232782
+ execute: async ({ path: path8, targetContent, replacementContent }, context) => {
232892
232783
  try {
232893
- const content = await context.operations.fs.readFile(path9);
232784
+ const content = await context.operations.fs.readFile(path8);
232894
232785
  if (!content.includes(targetContent)) {
232895
232786
  return `Error: targetContent not found in file. Ensure exact whitespace and line breaks match.`;
232896
232787
  }
232897
232788
  const updated = content.replace(targetContent, replacementContent);
232898
- await context.operations.fs.writeFile(path9, updated);
232899
- return `Successfully edited file: ${path9}`;
232789
+ await context.operations.fs.writeFile(path8, updated);
232790
+ return `Successfully edited file: ${path8}`;
232900
232791
  } catch (error3) {
232901
232792
  return `Failed to edit file: ${error3.message}`;
232902
232793
  }
@@ -233464,21 +233355,21 @@ var EditDiffTool = {
233464
233355
  name: "edit_diff",
233465
233356
  description: "Edits an existing file by applying a unified diff patch. Use standard unified diff format. This is the preferred way to refactor files.",
233466
233357
  inputSchema: diffSchema,
233467
- execute: async ({ path: path9, diff }, context) => {
233358
+ execute: async ({ path: path8, diff }, context) => {
233468
233359
  try {
233469
- const content = await context.operations.fs.readFile(path9);
233360
+ const content = await context.operations.fs.readFile(path8);
233470
233361
  let formattedDiff = diff;
233471
233362
  if (!formattedDiff.startsWith("--- ")) {
233472
- formattedDiff = `--- a/${path9}
233473
- +++ b/${path9}
233363
+ formattedDiff = `--- a/${path8}
233364
+ +++ b/${path8}
233474
233365
  ` + formattedDiff;
233475
233366
  }
233476
233367
  const updated = applyPatch(content, formattedDiff);
233477
233368
  if (updated === false) {
233478
233369
  return `Error: Failed to apply unified diff patch. Ensure the context lines match the existing file exactly.`;
233479
233370
  }
233480
- await context.operations.fs.writeFile(path9, updated);
233481
- return `Successfully patched file: ${path9}`;
233371
+ await context.operations.fs.writeFile(path8, updated);
233372
+ return `Successfully patched file: ${path8}`;
233482
233373
  } catch (error3) {
233483
233374
  return `Failed to patch file: ${error3.message}`;
233484
233375
  }
@@ -246992,7 +246883,7 @@ var EnvHttpProxyAgent = require_env_http_proxy_agent();
246992
246883
  var RetryAgent = require_retry_agent();
246993
246884
  var H2CClient = require_h2c_client();
246994
246885
  var errors3 = require_errors4();
246995
- var util = require_util5();
246886
+ var util2 = require_util5();
246996
246887
  var { InvalidArgumentError } = errors3;
246997
246888
  var api2 = require_api();
246998
246889
  var buildConnector = require_connect();
@@ -247023,8 +246914,8 @@ var $cacheStores = {
247023
246914
  var SqliteCacheStore = require_sqlite_cache_store();
247024
246915
  $cacheStores.SqliteCacheStore = SqliteCacheStore;
247025
246916
  var $util = {
247026
- parseHeaders: util.parseHeaders,
247027
- headerNameToString: util.headerNameToString
246917
+ parseHeaders: util2.parseHeaders,
246918
+ headerNameToString: util2.headerNameToString
247028
246919
  };
247029
246920
  function makeDispatcher(fn) {
247030
246921
  return (url, opts, handler) => {
@@ -247042,16 +246933,16 @@ function makeDispatcher(fn) {
247042
246933
  if (typeof opts.path !== "string") {
247043
246934
  throw new InvalidArgumentError("invalid opts.path");
247044
246935
  }
247045
- let path9 = opts.path;
246936
+ let path8 = opts.path;
247046
246937
  if (!opts.path.startsWith("/")) {
247047
- path9 = `/${path9}`;
246938
+ path8 = `/${path8}`;
247048
246939
  }
247049
- url = new URL(util.parseOrigin(url).origin + path9);
246940
+ url = new URL(util2.parseOrigin(url).origin + path8);
247050
246941
  } else {
247051
246942
  if (!opts) {
247052
246943
  opts = typeof url === "object" ? url : {};
247053
246944
  }
247054
- url = util.parseURL(url);
246945
+ url = util2.parseURL(url);
247055
246946
  }
247056
246947
  const { agent: agent2, dispatcher = getGlobalDispatcher() } = opts;
247057
246948
  if (agent2) {
@@ -247361,7 +247252,7 @@ __export(exports_base, {
247361
247252
  ConEmu: () => ConEmu
247362
247253
  });
247363
247254
  import process4 from "node:process";
247364
- import os2 from "node:os";
247255
+ import os from "node:os";
247365
247256
 
247366
247257
  // ../../node_modules/.bun/environment@1.1.0/node_modules/environment/index.js
247367
247258
  var isBrowser = globalThis.window?.document !== undefined;
@@ -247460,7 +247351,7 @@ var isOldWindows = () => {
247460
247351
  if (isBrowser || !isWindows2) {
247461
247352
  return false;
247462
247353
  }
247463
- const parts = os2.release().split(".");
247354
+ const parts = os.release().split(".");
247464
247355
  const major = Number(parts[0]);
247465
247356
  const build = Number(parts[2] ?? 0);
247466
247357
  if (major < 10) {
@@ -249984,7 +249875,7 @@ function wrapAnsi(string4, columns, options) {
249984
249875
  // ../../node_modules/.bun/terminal-size@4.0.1/node_modules/terminal-size/index.js
249985
249876
  import process5 from "node:process";
249986
249877
  import { execFileSync } from "node:child_process";
249987
- import fs8 from "node:fs";
249878
+ import fs7 from "node:fs";
249988
249879
  import tty from "node:tty";
249989
249880
  var defaultColumns = 80;
249990
249881
  var defaultRows = 24;
@@ -250014,7 +249905,7 @@ var isForegroundProcess = () => {
250014
249905
  return true;
250015
249906
  }
250016
249907
  try {
250017
- const statContents = fs8.readFileSync("/proc/self/stat", "utf8");
249908
+ const statContents = fs7.readFileSync("/proc/self/stat", "utf8");
250018
249909
  const closingParenthesisIndex = statContents.lastIndexOf(") ");
250019
249910
  if (closingParenthesisIndex === -1) {
250020
249911
  return false;
@@ -250058,8 +249949,8 @@ function terminalSize() {
250058
249949
  }
250059
249950
  var devTty = () => {
250060
249951
  try {
250061
- const flags = process5.platform === "darwin" ? fs8.constants.O_EVTONLY | fs8.constants.O_NONBLOCK : fs8.constants.O_NONBLOCK;
250062
- const { columns, rows } = tty.WriteStream(fs8.openSync("/dev/tty", flags));
249952
+ const flags = process5.platform === "darwin" ? fs7.constants.O_EVTONLY | fs7.constants.O_NONBLOCK : fs7.constants.O_NONBLOCK;
249953
+ const { columns, rows } = tty.WriteStream(fs7.openSync("/dev/tty", flags));
250063
249954
  return { columns, rows };
250064
249955
  } catch {}
250065
249956
  };
@@ -251948,8 +251839,8 @@ var cleanupYogaNode = (node2) => {
251948
251839
  var currentUpdatePriority = import_constants3.NoEventPriority;
251949
251840
  var currentRootNode;
251950
251841
  async function loadPackageJson() {
251951
- const fs9 = await import("node:fs");
251952
- const content = fs9.readFileSync(new URL("../package.json", import.meta.url), "utf8");
251842
+ const fs8 = await import("node:fs");
251843
+ const content = fs8.readFileSync(new URL("../package.json", import.meta.url), "utf8");
251953
251844
  const parsedContent = JSON.parse(content);
251954
251845
  return {
251955
251846
  name: parsedContent?.name,
@@ -252470,7 +252361,7 @@ var ansi_styles_default2 = ansiStyles2;
252470
252361
 
252471
252362
  // ../../node_modules/.bun/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
252472
252363
  import process7 from "node:process";
252473
- import os3 from "node:os";
252364
+ import os2 from "node:os";
252474
252365
  import tty2 from "node:tty";
252475
252366
  function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process7.argv) {
252476
252367
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
@@ -252535,7 +252426,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
252535
252426
  return min2;
252536
252427
  }
252537
252428
  if (process7.platform === "win32") {
252538
- const osRelease = os3.release().split(".");
252429
+ const osRelease = os2.release().split(".");
252539
252430
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
252540
252431
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
252541
252432
  }
@@ -254180,7 +254071,7 @@ var import_react14 = __toESM(require_react(), 1);
254180
254071
  // ../../node_modules/.bun/ink@7.1.0+90ffd46201e3176f/node_modules/ink/build/components/ErrorOverview.js
254181
254072
  var import_react13 = __toESM(require_react(), 1);
254182
254073
  var import_stack_utils = __toESM(require_stack_utils(), 1);
254183
- import * as fs9 from "node:fs";
254074
+ import * as fs8 from "node:fs";
254184
254075
  import { cwd } from "node:process";
254185
254076
 
254186
254077
  // ../../node_modules/.bun/convert-to-spaces@2.0.1/node_modules/convert-to-spaces/dist/index.js
@@ -254300,8 +254191,8 @@ function Text3({ color, backgroundColor, dimColor = false, bold = false, italic
254300
254191
  }
254301
254192
 
254302
254193
  // ../../node_modules/.bun/ink@7.1.0+90ffd46201e3176f/node_modules/ink/build/components/ErrorOverview.js
254303
- var cleanupPath = (path9) => {
254304
- return path9?.replace(`file://${cwd()}/`, "");
254194
+ var cleanupPath = (path8) => {
254195
+ return path8?.replace(`file://${cwd()}/`, "");
254305
254196
  };
254306
254197
  var stackUtils = new import_stack_utils.default({
254307
254198
  cwd: cwd(),
@@ -254315,8 +254206,8 @@ function ErrorOverview({ error: error4 }) {
254315
254206
  let excerpt;
254316
254207
  let lineWidth = 0;
254317
254208
  const stackLineCounts = new Map;
254318
- if (filePath && origin?.line && fs9.existsSync(filePath)) {
254319
- const sourceCode = fs9.readFileSync(filePath, "utf8");
254209
+ if (filePath && origin?.line && fs8.existsSync(filePath)) {
254210
+ const sourceCode = fs8.readFileSync(filePath, "utf8");
254320
254211
  excerpt = dist_default4(sourceCode, origin.line);
254321
254212
  if (excerpt) {
254322
254213
  for (const { line } of excerpt) {
@@ -256465,9 +256356,10 @@ function ToastProvider({ children: children2 }) {
256465
256356
 
256466
256357
  // ../../packages/tui/src/components/command-menu/commands.tsx
256467
256358
  init_clipboardy();
256468
- import { exec as exec3 } from "child_process";
256469
- import fs16 from "node:fs";
256470
- import path16 from "node:path";
256359
+ import { execSync, exec as exec3 } from "child_process";
256360
+ import fs15 from "node:fs";
256361
+ import os4 from "node:os";
256362
+ import path15 from "node:path";
256471
256363
  var COMMANDS = [
256472
256364
  {
256473
256365
  name: "context",
@@ -256535,15 +256427,30 @@ var COMMANDS = [
256535
256427
  value: "/handoff",
256536
256428
  action: async (ctx) => {
256537
256429
  try {
256430
+ const configPath = path15.join(os4.homedir(), ".config", "december", "config.json");
256431
+ let config2 = {};
256432
+ try {
256433
+ if (fs15.existsSync(configPath)) {
256434
+ config2 = JSON.parse(fs15.readFileSync(configPath, "utf8"));
256435
+ }
256436
+ } catch (e2) {}
256437
+ if (!config2.decemberToken) {
256438
+ ctx.toast.show({
256439
+ variant: "error",
256440
+ message: "You must be logged in to use handoff."
256441
+ });
256442
+ return;
256443
+ }
256538
256444
  ctx.toast.show({ variant: "info", message: "Zipping workspace..." });
256539
- const { execSync } = __require("child_process");
256540
- const fs17 = __require("fs");
256541
- const path17 = __require("path");
256542
256445
  const archivePath = ".december-handoff.tar.gz";
256543
- const excludes = ["--exclude=node_modules", "--exclude=.git"];
256446
+ const excludes = [
256447
+ "--exclude=node_modules",
256448
+ "--exclude=.git",
256449
+ `--exclude=${archivePath}`
256450
+ ];
256544
256451
  try {
256545
- if (fs17.existsSync(".gitignore")) {
256546
- const lines = fs17.readFileSync(".gitignore", "utf8").split(`
256452
+ if (fs15.existsSync(".gitignore")) {
256453
+ const lines = fs15.readFileSync(".gitignore", "utf8").split(`
256547
256454
  `);
256548
256455
  for (const line of lines) {
256549
256456
  const t2 = line.trim();
@@ -256551,8 +256458,8 @@ var COMMANDS = [
256551
256458
  excludes.push(`--exclude=${t2.endsWith("/") ? t2.slice(0, -1) : t2}`);
256552
256459
  }
256553
256460
  }
256554
- if (fs17.existsSync(".decemberignore")) {
256555
- const lines = fs17.readFileSync(".decemberignore", "utf8").split(`
256461
+ if (fs15.existsSync(".decemberignore")) {
256462
+ const lines = fs15.readFileSync(".decemberignore", "utf8").split(`
256556
256463
  `);
256557
256464
  for (const line of lines) {
256558
256465
  const t2 = line.trim();
@@ -256562,19 +256469,15 @@ var COMMANDS = [
256562
256469
  }
256563
256470
  } catch (e2) {}
256564
256471
  const excludeArgs = excludes.join(" ");
256565
- execSync(`tar -czf ${archivePath} ${excludeArgs} .`, { stdio: "ignore" });
256566
- ctx.toast.show({ variant: "info", message: "Requesting upload URL..." });
256567
- const configMod = await Promise.resolve().then(() => (init_src4(), exports_src2));
256568
- const config2 = await configMod.loadConfig();
256569
- if (!config2.decemberToken) {
256570
- ctx.toast.show({
256571
- variant: "error",
256572
- message: "You must be logged in to use handoff."
256573
- });
256574
- fs17.unlinkSync(archivePath);
256575
- return;
256472
+ try {
256473
+ execSync(`tar -czf ${archivePath} ${excludeArgs} .`, { stdio: "ignore" });
256474
+ } catch (e2) {
256475
+ if (e2.status !== 1)
256476
+ throw e2;
256576
256477
  }
256577
- const proxyUrl = process.env.DECEMBER_SERVER_URL || "http://localhost:3000/api/v1";
256478
+ ctx.toast.show({ variant: "info", message: "Requesting upload URL..." });
256479
+ const serverUrl = process.env.DECEMBER_SERVER_URL || "https://api.trydecember.com";
256480
+ const proxyUrl = `${serverUrl}/api/v1`;
256578
256481
  const urlRes = await fetch(`${proxyUrl}/cli/handoff/upload-url`, {
256579
256482
  headers: { Authorization: `Bearer ${config2.decemberToken}` }
256580
256483
  });
@@ -256582,7 +256485,7 @@ var COMMANDS = [
256582
256485
  throw new Error(await urlRes.text());
256583
256486
  const { uploadUrl, objectKey } = await urlRes.json();
256584
256487
  ctx.toast.show({ variant: "info", message: "Uploading to MinIO..." });
256585
- const fileData = fs17.readFileSync(archivePath);
256488
+ const fileData = fs15.readFileSync(archivePath);
256586
256489
  const uploadRes = await fetch(uploadUrl, {
256587
256490
  method: "PUT",
256588
256491
  body: fileData
@@ -256604,7 +256507,7 @@ var COMMANDS = [
256604
256507
  });
256605
256508
  if (!sessionRes.ok)
256606
256509
  throw new Error(await sessionRes.text());
256607
- fs17.unlinkSync(archivePath);
256510
+ fs15.unlinkSync(archivePath);
256608
256511
  ctx.toast.show({ variant: "success", message: "Handoff complete! Exiting in 3s." });
256609
256512
  setTimeout(() => ctx.exit(), 3000);
256610
256513
  } catch (e2) {
@@ -256619,22 +256522,22 @@ var COMMANDS = [
256619
256522
  action: (ctx) => {
256620
256523
  try {
256621
256524
  const rootDir = process.cwd();
256622
- const decDir = path16.join(rootDir, ".december");
256623
- if (fs16.existsSync(decDir)) {
256525
+ const decDir = path15.join(rootDir, ".december");
256526
+ if (fs15.existsSync(decDir)) {
256624
256527
  ctx.toast.show({ message: "December workspace is already initialized." });
256625
256528
  return;
256626
256529
  }
256627
- fs16.mkdirSync(decDir);
256628
- const agentsFile = path16.join(decDir, "AGENTS.md");
256629
- const rulesDir = path16.join(decDir, "rules");
256630
- const rulesReadme = path16.join(rulesDir, "README.md");
256631
- const skillsDir = path16.join(decDir, "skills");
256632
- const skillsReadme = path16.join(skillsDir, "README.md");
256633
- fs16.writeFileSync(agentsFile, "");
256634
- fs16.mkdirSync(rulesDir);
256635
- fs16.writeFileSync(rulesReadme, "# Rules\n\nDrop Markdown files here (e.g., `database.md` or `styling.md`) with specific instructions. December will automatically read these modular rules when working on related files.\n");
256636
- fs16.mkdirSync(skillsDir);
256637
- fs16.writeFileSync(skillsReadme, `# Skills
256530
+ fs15.mkdirSync(decDir);
256531
+ const agentsFile = path15.join(decDir, "AGENTS.md");
256532
+ const rulesDir = path15.join(decDir, "rules");
256533
+ const rulesReadme = path15.join(rulesDir, "README.md");
256534
+ const skillsDir = path15.join(decDir, "skills");
256535
+ const skillsReadme = path15.join(skillsDir, "README.md");
256536
+ fs15.writeFileSync(agentsFile, "");
256537
+ fs15.mkdirSync(rulesDir);
256538
+ fs15.writeFileSync(rulesReadme, "# Rules\n\nDrop Markdown files here (e.g., `database.md` or `styling.md`) with specific instructions. December will automatically read these modular rules when working on related files.\n");
256539
+ fs15.mkdirSync(skillsDir);
256540
+ fs15.writeFileSync(skillsReadme, `# Skills
256638
256541
 
256639
256542
  Add executable scripts or custom tool definitions here. December will be able to run these skills as custom tools to perform specific actions in your workspace.
256640
256543
  `);
@@ -259177,7 +259080,7 @@ function ToolArgumentsDisplay({ toolName: toolName2, inputObj }) {
259177
259080
  if (!inputObj || typeof inputObj !== "object")
259178
259081
  return null;
259179
259082
  if (toolName2 === "multi_replace_file_content" || toolName2 === "replace_file_content") {
259180
- const path17 = inputObj.TargetFile || inputObj.path || "";
259083
+ const path16 = inputObj.TargetFile || inputObj.path || "";
259181
259084
  const chunks = toolName2 === "multi_replace_file_content" ? inputObj.ReplacementChunks : inputObj.TargetContent ? [inputObj] : [];
259182
259085
  return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Box_default, {
259183
259086
  flexDirection: "column",
@@ -259195,7 +259098,7 @@ function ToolArgumentsDisplay({ toolName: toolName2, inputObj }) {
259195
259098
  }, undefined, false, undefined, this),
259196
259099
  /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(Text3, {
259197
259100
  color: "white",
259198
- children: path17
259101
+ children: path16
259199
259102
  }, undefined, false, undefined, this)
259200
259103
  ]
259201
259104
  }, undefined, true, undefined, this),
@@ -259506,7 +259409,7 @@ function BotMessage({ blocks, usage }) {
259506
259409
  }, idx, false, undefined, this);
259507
259410
  }
259508
259411
  if (block.toolName === "edit_file" || block.toolName === "edit_diff" || block.toolName === "write_file" || block.toolName === "write_to_file" || block.toolName === "multi_replace_file_content" || block.toolName === "replace_file_content") {
259509
- const path17 = parsedInput.path || parsedInput.filePath || parsedInput.TargetFile || "";
259412
+ const path16 = parsedInput.path || parsedInput.filePath || parsedInput.TargetFile || "";
259510
259413
  const diffStr = block.toolName === "write_file" || block.toolName === "write_to_file" ? parsedInput.content || parsedInput.CodeContent : parsedInput.diff;
259511
259414
  const isWrite = block.toolName === "write_file" || block.toolName === "write_to_file";
259512
259415
  const lines = diffStr ? diffStr.replace(/\r?\n$/, "").split(/\r?\n/) : [];
@@ -259518,7 +259421,7 @@ function BotMessage({ blocks, usage }) {
259518
259421
  alignItems: "center",
259519
259422
  children: [
259520
259423
  /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(StyledCommand, {
259521
- command: `${isWrite ? "Create" : "Edit"}(${path17})`
259424
+ command: `${isWrite ? "Create" : "Edit"}(${path16})`
259522
259425
  }, undefined, false, undefined, this),
259523
259426
  isSuccess && isWrite && /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(Text3, {
259524
259427
  color: "cyan",
@@ -259744,12 +259647,12 @@ function BotMessage({ blocks, usage }) {
259744
259647
  }, undefined, true, undefined, this);
259745
259648
  }
259746
259649
  // ../../packages/tui/src/components/header.tsx
259747
- import { execSync } from "node:child_process";
259650
+ import { execSync as execSync2 } from "node:child_process";
259748
259651
  import { homedir } from "node:os";
259749
259652
  var jsx_dev_runtime14 = __toESM(require_jsx_dev_runtime(), 1);
259750
259653
  function getGitBranch() {
259751
259654
  try {
259752
- return execSync("git rev-parse --abbrev-ref HEAD", { stdio: "pipe" }).toString().trim();
259655
+ return execSync2("git rev-parse --abbrev-ref HEAD", { stdio: "pipe" }).toString().trim();
259753
259656
  } catch {
259754
259657
  return null;
259755
259658
  }
@@ -262082,18 +261985,18 @@ function AskQuestionMenu({ questions, onComplete }) {
262082
261985
  }, undefined, true, undefined, this);
262083
261986
  }
262084
261987
  // ../../packages/tui/src/components/task-hud.tsx
262085
- import fs17 from "fs";
262086
- import path17 from "path";
261988
+ import fs16 from "fs";
261989
+ import path16 from "path";
262087
261990
  var import_react50 = __toESM(require_react(), 1);
262088
261991
  var jsx_dev_runtime37 = __toESM(require_jsx_dev_runtime(), 1);
262089
261992
  function TaskHUD({ cwd: cwd2 }) {
262090
261993
  const [taskLines, setTaskLines] = import_react50.useState([]);
262091
261994
  import_react50.useEffect(() => {
262092
- const taskPath = path17.join(cwd2, "task.md");
261995
+ const taskPath = path16.join(cwd2, "task.md");
262093
261996
  const updateTasks = () => {
262094
- if (fs17.existsSync(taskPath)) {
261997
+ if (fs16.existsSync(taskPath)) {
262095
261998
  try {
262096
- const content = fs17.readFileSync(taskPath, "utf8");
261999
+ const content = fs16.readFileSync(taskPath, "utf8");
262097
262000
  const lines = content.split(`
262098
262001
  `).filter((l3) => l3.trim().match(/^- \[( |x|\/|-)\]/));
262099
262002
  setTaskLines(lines.slice(0, 8));
@@ -262356,14 +262259,10 @@ var package_default = {
262356
262259
  module: "src/index.ts",
262357
262260
  type: "module",
262358
262261
  private: false,
262359
- version: "0.2.16",
262262
+ version: "0.2.17",
262360
262263
  description: "Turn ideas into reality.",
262361
262264
  author: "Chaitanya Sonawane",
262362
262265
  license: "Apache-2.0",
262363
- keywords: [
262364
- "december",
262365
- "terminal agent"
262366
- ],
262367
262266
  engines: {
262368
262267
  node: ">=18.0.0"
262369
262268
  },
@@ -262409,16 +262308,16 @@ import http3 from "node:http";
262409
262308
 
262410
262309
  // ../../node_modules/.bun/open@11.0.0/node_modules/open/index.js
262411
262310
  import process36 from "node:process";
262412
- import path18 from "node:path";
262311
+ import path17 from "node:path";
262413
262312
  import { fileURLToPath as fileURLToPath6 } from "node:url";
262414
262313
  import childProcess5 from "node:child_process";
262415
- import fs19, { constants as fsConstants2 } from "node:fs/promises";
262314
+ import fs18, { constants as fsConstants2 } from "node:fs/promises";
262416
262315
 
262417
262316
  // ../../node_modules/.bun/wsl-utils@0.3.1/node_modules/wsl-utils/index.js
262418
262317
  init_is_wsl();
262419
262318
  import { promisify as promisify9 } from "node:util";
262420
262319
  import childProcess4 from "node:child_process";
262421
- import fs18, { constants as fsConstants } from "node:fs/promises";
262320
+ import fs17, { constants as fsConstants } from "node:fs/promises";
262422
262321
 
262423
262322
  // ../../node_modules/.bun/powershell-utils@0.1.0/node_modules/powershell-utils/index.js
262424
262323
  import process31 from "node:process";
@@ -262479,13 +262378,13 @@ var wslDrivesMountPoint = (() => {
262479
262378
  const configFilePath = "/etc/wsl.conf";
262480
262379
  let isConfigFileExists = false;
262481
262380
  try {
262482
- await fs18.access(configFilePath, fsConstants.F_OK);
262381
+ await fs17.access(configFilePath, fsConstants.F_OK);
262483
262382
  isConfigFileExists = true;
262484
262383
  } catch {}
262485
262384
  if (!isConfigFileExists) {
262486
262385
  return defaultMountPoint;
262487
262386
  }
262488
- const configContent = await fs18.readFile(configFilePath, { encoding: "utf8" });
262387
+ const configContent = await fs17.readFile(configFilePath, { encoding: "utf8" });
262489
262388
  const parsedMountPoint = parseMountPointFromConfig(configContent);
262490
262389
  if (parsedMountPoint === undefined) {
262491
262390
  return defaultMountPoint;
@@ -262505,7 +262404,7 @@ var canAccessPowerShell = async () => {
262505
262404
  canAccessPowerShellPromise ??= (async () => {
262506
262405
  try {
262507
262406
  const psPath = await powerShellPath3();
262508
- await fs18.access(psPath, fsConstants.X_OK);
262407
+ await fs17.access(psPath, fsConstants.X_OK);
262509
262408
  return true;
262510
262409
  } catch {
262511
262410
  return false;
@@ -262519,15 +262418,15 @@ var wslDefaultBrowser = async () => {
262519
262418
  const { stdout } = await executePowerShell2(command, { powerShellPath: psPath });
262520
262419
  return stdout.trim();
262521
262420
  };
262522
- var convertWslPathToWindows = async (path18) => {
262523
- if (/^[a-z]+:\/\//i.test(path18)) {
262524
- return path18;
262421
+ var convertWslPathToWindows = async (path17) => {
262422
+ if (/^[a-z]+:\/\//i.test(path17)) {
262423
+ return path17;
262525
262424
  }
262526
262425
  try {
262527
- const { stdout } = await execFile4("wslpath", ["-aw", path18], { encoding: "utf8" });
262426
+ const { stdout } = await execFile4("wslpath", ["-aw", path17], { encoding: "utf8" });
262528
262427
  return stdout.trim();
262529
262428
  } catch {
262530
- return path18;
262429
+ return path17;
262531
262430
  }
262532
262431
  };
262533
262432
 
@@ -262672,8 +262571,8 @@ var is_in_ssh_default = isInSsh;
262672
262571
 
262673
262572
  // ../../node_modules/.bun/open@11.0.0/node_modules/open/index.js
262674
262573
  var fallbackAttemptSymbol = Symbol("fallbackAttempt");
262675
- var __dirname4 = import.meta.url ? path18.dirname(fileURLToPath6(import.meta.url)) : "";
262676
- var localXdgOpenPath = path18.join(__dirname4, "xdg-open");
262574
+ var __dirname4 = import.meta.url ? path17.dirname(fileURLToPath6(import.meta.url)) : "";
262575
+ var localXdgOpenPath = path17.join(__dirname4, "xdg-open");
262677
262576
  var { platform: platform3, arch } = process36;
262678
262577
  var tryEachApp = async (apps, opener) => {
262679
262578
  if (apps.length === 0) {
@@ -262820,7 +262719,7 @@ var baseOpen = async (options) => {
262820
262719
  const isBundled = !__dirname4 || __dirname4 === "/";
262821
262720
  let exeLocalXdgOpen = false;
262822
262721
  try {
262823
- await fs19.access(localXdgOpenPath, fsConstants2.X_OK);
262722
+ await fs18.access(localXdgOpenPath, fsConstants2.X_OK);
262824
262723
  exeLocalXdgOpen = true;
262825
262724
  } catch {}
262826
262725
  const useSystemXdgOpen = process36.versions.electron ?? (platform3 === "android" || isBundled || !exeLocalXdgOpen);
@@ -262950,7 +262849,7 @@ defineLazyProperty(apps, "safari", () => detectPlatformBinary({
262950
262849
  var open_default = open4;
262951
262850
 
262952
262851
  // src/auth/browser.ts
262953
- async function loginViaBrowser(baseUrl = "http://localhost:3000/cli/login") {
262852
+ async function loginViaBrowser(baseUrl = process.env.DECEMBER_WEB_URL ? `${process.env.DECEMBER_WEB_URL}/cli/login` : "https://trydecember.com/cli/login") {
262954
262853
  return new Promise((resolve4, reject2) => {
262955
262854
  const server = http3.createServer((req, res) => {
262956
262855
  const url = new URL(req.url || "", `http://${req.headers.host}`);
@@ -263069,7 +262968,7 @@ async function loginViaBrowser(baseUrl = "http://localhost:3000/cli/login") {
263069
262968
  });
263070
262969
  }
263071
262970
  // src/auth/device.ts
263072
- async function loginViaDeviceCode(baseUrl = "http://localhost:4000", onCodeGenerated) {
262971
+ async function loginViaDeviceCode(baseUrl = process.env.DECEMBER_SERVER_URL || "https://api.trydecember.com", onCodeGenerated) {
263073
262972
  return new Promise(async (resolve4, reject2) => {
263074
262973
  try {
263075
262974
  const genRes = await fetch(`${baseUrl}/api/v1/auth/device/code`, {
@@ -263124,6 +263023,150 @@ async function loginViaDeviceCode(baseUrl = "http://localhost:4000", onCodeGener
263124
263023
  // src/index.ts
263125
263024
  init_config();
263126
263025
 
263026
+ // src/file-session-repository.ts
263027
+ import fs20 from "node:fs/promises";
263028
+ import os6 from "node:os";
263029
+ import path19 from "node:path";
263030
+
263031
+ class FileSessionRepository {
263032
+ sessionDir;
263033
+ sessionCache = {};
263034
+ constructor(sessionDir) {
263035
+ this.sessionDir = sessionDir || path19.join(os6.homedir(), ".config", "december", "sessions");
263036
+ }
263037
+ async saveContext(sessionId, messages) {
263038
+ await fs20.mkdir(this.sessionDir, { recursive: true });
263039
+ const historyPath = path19.join(this.sessionDir, `${sessionId}.jsonl`);
263040
+ let existing = this.sessionCache[sessionId];
263041
+ if (!existing) {
263042
+ existing = {};
263043
+ this.sessionCache[sessionId] = existing;
263044
+ try {
263045
+ const data2 = await fs20.readFile(historyPath, "utf-8");
263046
+ const lines = data2.split(`
263047
+ `).filter((l3) => l3.trim().length > 0);
263048
+ for (const l3 of lines) {
263049
+ try {
263050
+ const msg = JSON.parse(l3);
263051
+ if (msg.id)
263052
+ existing[msg.id] = msg;
263053
+ } catch {}
263054
+ }
263055
+ } catch (e2) {}
263056
+ }
263057
+ let appendContent = "";
263058
+ for (const msg of messages) {
263059
+ if (msg.id) {
263060
+ const cached2 = existing[msg.id];
263061
+ if (!cached2 || JSON.stringify(cached2) !== JSON.stringify(msg)) {
263062
+ existing[msg.id] = { ...msg };
263063
+ appendContent += JSON.stringify(msg) + `
263064
+ `;
263065
+ }
263066
+ }
263067
+ }
263068
+ if (appendContent) {
263069
+ await fs20.appendFile(historyPath, appendContent, "utf-8");
263070
+ }
263071
+ }
263072
+ async loadContext(sessionId) {
263073
+ const historyPath = path19.join(this.sessionDir, `${sessionId}.jsonl`);
263074
+ try {
263075
+ const data2 = await fs20.readFile(historyPath, "utf-8");
263076
+ const lines = data2.split(`
263077
+ `).filter((l3) => l3.trim().length > 0);
263078
+ const msgMap = new Map;
263079
+ for (const l3 of lines) {
263080
+ try {
263081
+ const msg = JSON.parse(l3);
263082
+ if (msg.id)
263083
+ msgMap.set(msg.id, msg);
263084
+ } catch {}
263085
+ }
263086
+ const msgs = Array.from(msgMap.values());
263087
+ if (msgs.length === 0)
263088
+ return [];
263089
+ let latestMsg = msgs[0];
263090
+ for (const msg of msgs) {
263091
+ if ((msg.timestamp || 0) >= (latestMsg.timestamp || 0)) {
263092
+ latestMsg = msg;
263093
+ }
263094
+ }
263095
+ const branch = [];
263096
+ let current = latestMsg;
263097
+ while (current) {
263098
+ branch.unshift(current);
263099
+ if (!current.parentId)
263100
+ break;
263101
+ current = msgMap.get(current.parentId);
263102
+ }
263103
+ if (msgs.length < lines.length) {
263104
+ const compacted = msgs.map((m3) => JSON.stringify(m3)).join(`
263105
+ `);
263106
+ await fs20.writeFile(historyPath, compacted, "utf-8").catch(() => {});
263107
+ }
263108
+ const cacheObj = {};
263109
+ for (const msg of msgs) {
263110
+ cacheObj[msg.id] = { ...msg };
263111
+ }
263112
+ this.sessionCache[sessionId] = cacheObj;
263113
+ return branch;
263114
+ } catch (e2) {
263115
+ return [];
263116
+ }
263117
+ }
263118
+ async listSessions() {
263119
+ try {
263120
+ await fs20.mkdir(this.sessionDir, { recursive: true });
263121
+ const files = await fs20.readdir(this.sessionDir);
263122
+ const sessions = [];
263123
+ for (const file of files) {
263124
+ if (!file.endsWith(".jsonl"))
263125
+ continue;
263126
+ const id = file.replace(".jsonl", "");
263127
+ const filePath = path19.join(this.sessionDir, file);
263128
+ try {
263129
+ const stat4 = await fs20.stat(filePath);
263130
+ const data2 = await fs20.readFile(filePath, "utf-8");
263131
+ const lines = data2.split(`
263132
+ `).filter((l3) => l3.trim().length > 0);
263133
+ let preview = "";
263134
+ for (const line of lines) {
263135
+ try {
263136
+ const msg = JSON.parse(line);
263137
+ if (msg.role === "user") {
263138
+ preview = msg.content?.substring(0, 80) || "";
263139
+ break;
263140
+ }
263141
+ } catch {}
263142
+ }
263143
+ sessions.push({
263144
+ id,
263145
+ updatedAt: stat4.mtime,
263146
+ messageCount: lines.length,
263147
+ preview
263148
+ });
263149
+ } catch {}
263150
+ }
263151
+ sessions.sort((a2, b2) => b2.updatedAt.getTime() - a2.updatedAt.getTime());
263152
+ return sessions;
263153
+ } catch {
263154
+ return [];
263155
+ }
263156
+ }
263157
+ async deleteSession(sessionId) {
263158
+ const historyPath = path19.join(this.sessionDir, `${sessionId}.jsonl`);
263159
+ try {
263160
+ await fs20.unlink(historyPath);
263161
+ } catch (e2) {}
263162
+ }
263163
+ async renameSession(oldSessionId, newSessionId) {
263164
+ const oldPath = path19.join(this.sessionDir, `${oldSessionId}.jsonl`);
263165
+ const newPath = path19.join(this.sessionDir, `${newSessionId}.jsonl`);
263166
+ await fs20.rename(oldPath, newPath);
263167
+ }
263168
+ }
263169
+
263127
263170
  // src/hooks/use-agent-session.ts
263128
263171
  init_src4();
263129
263172
  init_config();
@@ -263355,6 +263398,8 @@ class TaskManager {
263355
263398
  const task = this.getTask(id);
263356
263399
  if (task && task.status === "running") {
263357
263400
  task.status = exitCode === 0 ? "completed" : "failed";
263401
+ delete task.childProcess;
263402
+ this.cleanupHistory();
263358
263403
  }
263359
263404
  }
263360
263405
  killTask(id) {
@@ -263374,6 +263419,8 @@ class TaskManager {
263374
263419
  }
263375
263420
  }
263376
263421
  task.status = "killed";
263422
+ delete task.childProcess;
263423
+ this.cleanupHistory();
263377
263424
  return true;
263378
263425
  }
263379
263426
  return false;
@@ -263381,6 +263428,14 @@ class TaskManager {
263381
263428
  removeTask(id) {
263382
263429
  this.tasks = this.tasks.filter((t2) => t2.id !== id);
263383
263430
  }
263431
+ cleanupHistory() {
263432
+ const completed = this.tasks.filter((t2) => t2.status !== "running");
263433
+ if (completed.length > 50) {
263434
+ const toRemove = completed.slice(0, completed.length - 50);
263435
+ const removeIds = new Set(toRemove.map((t2) => t2.id));
263436
+ this.tasks = this.tasks.filter((t2) => !removeIds.has(t2.id));
263437
+ }
263438
+ }
263384
263439
  }
263385
263440
  var globalSymbols = global;
263386
263441
  if (!globalSymbols.__taskManager) {
@@ -263389,6 +263444,7 @@ if (!globalSymbols.__taskManager) {
263389
263444
  var taskManager = globalSymbols.__taskManager;
263390
263445
 
263391
263446
  // src/utils/error-parser.ts
263447
+ import util3 from "util";
263392
263448
  function parseErrorMessage(err) {
263393
263449
  let errMsg = "";
263394
263450
  try {
@@ -263450,7 +263506,7 @@ function parseErrorMessage(err) {
263450
263506
  return extracted;
263451
263507
  if (errMsg === "[object Object]" && err && typeof err === "object") {
263452
263508
  try {
263453
- return __require("util").inspect(err);
263509
+ return util3.inspect(err);
263454
263510
  } catch {}
263455
263511
  }
263456
263512
  return errMsg.replace(/^\[.*?Error\]:\s*/, "").trim();
@@ -265133,7 +265189,8 @@ async function main() {
265133
265189
  llm = openaiProvider("https://api.zai.ai/v1", providerConfig.apiKey);
265134
265190
  break;
265135
265191
  default:
265136
- const proxyUrl = `http://localhost:${process.env.DECEMBER_SERVER_PORT || 3000}/api/v1`;
265192
+ const serverUrl = process.env.DECEMBER_SERVER_URL || "https://api.trydecember.com";
265193
+ const proxyUrl = `${serverUrl}/api/v1/cli`;
265137
265194
  llm = openaiProvider(proxyUrl, providerConfig.apiKey);
265138
265195
  break;
265139
265196
  }
@@ -265212,14 +265269,16 @@ Guidelines:
265212
265269
  process.exit(1);
265213
265270
  }
265214
265271
  try {
265215
- const { execSync: execSync2 } = __require("child_process");
265216
- const fs23 = __require("fs");
265217
265272
  console.log("Zipping workspace state...");
265218
265273
  const archivePath = ".december-handoff.tar.gz";
265219
- const excludes = ["--exclude=node_modules", "--exclude=.git"];
265274
+ const excludes = [
265275
+ "--exclude=node_modules",
265276
+ "--exclude=.git",
265277
+ `--exclude=${archivePath}`
265278
+ ];
265220
265279
  try {
265221
- if (fs23.existsSync(".gitignore")) {
265222
- const lines = fs23.readFileSync(".gitignore", "utf8").split(`
265280
+ if (fs22.existsSync(".gitignore")) {
265281
+ const lines = fs22.readFileSync(".gitignore", "utf8").split(`
265223
265282
  `);
265224
265283
  for (const line of lines) {
265225
265284
  const t2 = line.trim();
@@ -265227,8 +265286,8 @@ Guidelines:
265227
265286
  excludes.push(`--exclude=${t2.endsWith("/") ? t2.slice(0, -1) : t2}`);
265228
265287
  }
265229
265288
  }
265230
- if (fs23.existsSync(".decemberignore")) {
265231
- const lines = fs23.readFileSync(".decemberignore", "utf8").split(`
265289
+ if (fs22.existsSync(".decemberignore")) {
265290
+ const lines = fs22.readFileSync(".decemberignore", "utf8").split(`
265232
265291
  `);
265233
265292
  for (const line of lines) {
265234
265293
  const t2 = line.trim();
@@ -265238,11 +265297,17 @@ Guidelines:
265238
265297
  }
265239
265298
  } catch (e2) {}
265240
265299
  const excludeArgs = excludes.join(" ");
265241
- execSync2(`tar -czf ${archivePath} ${excludeArgs} .`, {
265242
- stdio: "inherit"
265243
- });
265300
+ try {
265301
+ execSync3(`tar -czf ${archivePath} ${excludeArgs} .`, {
265302
+ stdio: "inherit"
265303
+ });
265304
+ } catch (e2) {
265305
+ if (e2.status !== 1)
265306
+ throw e2;
265307
+ }
265244
265308
  console.log("Requesting pre-signed URL from server...");
265245
- const proxyUrl = process.env.DECEMBER_SERVER_URL || "http://localhost:3000/api/v1";
265309
+ const serverUrl = process.env.DECEMBER_SERVER_URL || "https://api.trydecember.com";
265310
+ const proxyUrl = `${serverUrl}/api/v1`;
265246
265311
  const urlRes = await fetch(`${proxyUrl}/cli/handoff/upload-url`, {
265247
265312
  headers: { Authorization: `Bearer ${config2.decemberToken}` }
265248
265313
  });
@@ -265250,7 +265315,7 @@ Guidelines:
265250
265315
  throw new Error(await urlRes.text());
265251
265316
  const { uploadUrl, objectKey } = await urlRes.json();
265252
265317
  console.log("Uploading to MinIO...");
265253
- const fileData = fs23.readFileSync(archivePath);
265318
+ const fileData = fs22.readFileSync(archivePath);
265254
265319
  let uploadSuccess = false;
265255
265320
  let attempts = 0;
265256
265321
  while (!uploadSuccess && attempts < 3) {
@@ -265287,7 +265352,7 @@ Guidelines:
265287
265352
  });
265288
265353
  if (!sessionRes.ok)
265289
265354
  throw new Error(await sessionRes.text());
265290
- fs23.unlinkSync(archivePath);
265355
+ fs22.unlinkSync(archivePath);
265291
265356
  console.log("Handoff complete! You can now resume this session on December Cloud.");
265292
265357
  } catch (e2) {
265293
265358
  console.error("Handoff failed:", e2.message);
@@ -265305,7 +265370,6 @@ Guidelines:
265305
265370
  Executing Headless Task: "${prompt}"
265306
265371
  `);
265307
265372
  const { runAgentLoop: runAgentLoop2 } = await Promise.resolve().then(() => (init_src4(), exports_src2));
265308
- const readline2 = __require("readline");
265309
265373
  const rl = readline2.createInterface({
265310
265374
  input: process.stdin,
265311
265375
  output: process.stdout
@@ -265401,8 +265465,8 @@ Headless task complete.`);
265401
265465
  cliVersion: package_default.version,
265402
265466
  userEmail,
265403
265467
  sessionRepository,
265404
- onLogin: loginViaBrowser,
265405
- onLoginHeadless: (onCode) => loginViaDeviceCode("http://localhost:4000", onCode)
265468
+ onLogin: () => loginViaBrowser(),
265469
+ onLoginHeadless: (onCode) => loginViaDeviceCode(undefined, onCode)
265406
265470
  })), { exitOnCtrlC: false });
265407
265471
  }
265408
265472
  main().catch(originalConsoleError);