repoburg 1.3.300 → 1.3.302

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.
@@ -53,9 +53,9 @@ var require_reusify = __commonJS({
53
53
  current.next = null;
54
54
  return current;
55
55
  }
56
- function release(obj) {
57
- tail.next = obj;
58
- tail = obj;
56
+ function release(obj2) {
57
+ tail.next = obj2;
58
+ tail = obj2;
59
59
  }
60
60
  return {
61
61
  get,
@@ -80,7 +80,7 @@ var require_queue = __commonJS({
80
80
  if (!(_concurrency >= 1)) {
81
81
  throw new Error("fastqueue concurrency must be equal to or greater than 1");
82
82
  }
83
- var cache3 = reusify(Task);
83
+ var cache4 = reusify(Task);
84
84
  var queueHead = null;
85
85
  var queueTail = null;
86
86
  var _running = 0;
@@ -159,7 +159,7 @@ var require_queue = __commonJS({
159
159
  return _running === 0 && self.length() === 0;
160
160
  }
161
161
  function push(value, done) {
162
- var current = cache3.get();
162
+ var current = cache4.get();
163
163
  current.context = context;
164
164
  current.release = release;
165
165
  current.value = value;
@@ -180,7 +180,7 @@ var require_queue = __commonJS({
180
180
  }
181
181
  }
182
182
  function unshift(value, done) {
183
- var current = cache3.get();
183
+ var current = cache4.get();
184
184
  current.context = context;
185
185
  current.release = release;
186
186
  current.value = value;
@@ -202,7 +202,7 @@ var require_queue = __commonJS({
202
202
  }
203
203
  function release(holder) {
204
204
  if (holder) {
205
- cache3.release(holder);
205
+ cache4.release(holder);
206
206
  }
207
207
  var next = queueHead;
208
208
  if (next && _running <= _concurrency) {
@@ -635,14 +635,14 @@ var require_time_tree = __commonJS({
635
635
  return prettyPrintTimeTree(this.toJSON());
636
636
  }
637
637
  };
638
- function prettyPrintTimeTree(obj, prefix = "") {
638
+ function prettyPrintTimeTree(obj2, prefix = "") {
639
639
  let result = prefix;
640
- const nodesCount = obj.nodes.length;
640
+ const nodesCount = obj2.nodes.length;
641
641
  const lastIndex = nodesCount - 1;
642
- result += `${obj.label} ${obj.diff} ms
642
+ result += `${obj2.label} ${obj2.diff} ms
643
643
  `;
644
644
  for (let i = 0; i < nodesCount; ++i) {
645
- const node = obj.nodes[i];
645
+ const node = obj2.nodes[i];
646
646
  const prefix_ = prefix + (i === lastIndex ? " " : "\u2502 ");
647
647
  result += prefix;
648
648
  result += i === lastIndex ? "\u2514\u2500" : "\u251C\u2500";
@@ -674,16 +674,16 @@ var require_create_promise = __commonJS({
674
674
  "node_modules/avvio/lib/create-promise.js"(exports, module) {
675
675
  "use strict";
676
676
  function createPromise() {
677
- const obj = {
677
+ const obj2 = {
678
678
  resolve: null,
679
679
  reject: null,
680
680
  promise: null
681
681
  };
682
- obj.promise = new Promise((resolve, reject) => {
683
- obj.resolve = resolve;
684
- obj.reject = reject;
682
+ obj2.promise = new Promise((resolve, reject) => {
683
+ obj2.resolve = resolve;
684
+ obj2.reject = reject;
685
685
  });
686
- return obj;
686
+ return obj2;
687
687
  }
688
688
  module.exports = {
689
689
  createPromise
@@ -3989,7 +3989,7 @@ var require_content_type = __commonJS({
3989
3989
  var quotedPairReg = /\\([\t\u0020-\u00ff])/gu;
3990
3990
  var typeNameReg = /^[\w!#$%&'*+.^`|~-]+$/;
3991
3991
  var subtypeNameReg = /^[\w!#$%&'*+.^`|~-]+\s*$/;
3992
- var cache3 = new Lru(100);
3992
+ var cache4 = new Lru(100);
3993
3993
  var ContentType = class _ContentType {
3994
3994
  #valid = false;
3995
3995
  #empty = true;
@@ -4003,7 +4003,7 @@ var require_content_type = __commonJS({
4003
4003
  * @type {Lru<ContentType>}
4004
4004
  */
4005
4005
  static get cache() {
4006
- return cache3;
4006
+ return cache4;
4007
4007
  }
4008
4008
  /**
4009
4009
  * Create a ContentType instance from a header value. If the value has been
@@ -4012,10 +4012,10 @@ var require_content_type = __commonJS({
4012
4012
  * @returns {ContentType | undefined}
4013
4013
  */
4014
4014
  static from(headerValue) {
4015
- let contentType = cache3.get(headerValue);
4015
+ let contentType = cache4.get(headerValue);
4016
4016
  if (contentType !== void 0) return contentType;
4017
4017
  contentType = new _ContentType(headerValue);
4018
- cache3.set(headerValue, contentType);
4018
+ cache4.set(headerValue, contentType);
4019
4019
  return contentType;
4020
4020
  }
4021
4021
  constructor(headerValue) {
@@ -6269,30 +6269,30 @@ var require_caller = __commonJS({
6269
6269
  var require_redact = __commonJS({
6270
6270
  "node_modules/@pinojs/redact/index.js"(exports, module) {
6271
6271
  "use strict";
6272
- function deepClone(obj) {
6273
- if (obj === null || typeof obj !== "object") {
6274
- return obj;
6272
+ function deepClone(obj2) {
6273
+ if (obj2 === null || typeof obj2 !== "object") {
6274
+ return obj2;
6275
6275
  }
6276
- if (obj instanceof Date) {
6277
- return new Date(obj.getTime());
6276
+ if (obj2 instanceof Date) {
6277
+ return new Date(obj2.getTime());
6278
6278
  }
6279
- if (obj instanceof Array) {
6279
+ if (obj2 instanceof Array) {
6280
6280
  const cloned = [];
6281
- for (let i = 0; i < obj.length; i++) {
6282
- cloned[i] = deepClone(obj[i]);
6281
+ for (let i = 0; i < obj2.length; i++) {
6282
+ cloned[i] = deepClone(obj2[i]);
6283
6283
  }
6284
6284
  return cloned;
6285
6285
  }
6286
- if (typeof obj === "object") {
6287
- const cloned = Object.create(Object.getPrototypeOf(obj));
6288
- for (const key in obj) {
6289
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
6290
- cloned[key] = deepClone(obj[key]);
6286
+ if (typeof obj2 === "object") {
6287
+ const cloned = Object.create(Object.getPrototypeOf(obj2));
6288
+ for (const key in obj2) {
6289
+ if (Object.prototype.hasOwnProperty.call(obj2, key)) {
6290
+ cloned[key] = deepClone(obj2[key]);
6291
6291
  }
6292
6292
  }
6293
6293
  return cloned;
6294
6294
  }
6295
- return obj;
6295
+ return obj2;
6296
6296
  }
6297
6297
  function parsePath(path13) {
6298
6298
  const parts = [];
@@ -6337,8 +6337,8 @@ var require_redact = __commonJS({
6337
6337
  }
6338
6338
  return parts;
6339
6339
  }
6340
- function setValue(obj, parts, value) {
6341
- let current = obj;
6340
+ function setValue(obj2, parts, value) {
6341
+ let current = obj2;
6342
6342
  for (let i = 0; i < parts.length - 1; i++) {
6343
6343
  const key = parts[i];
6344
6344
  if (typeof current !== "object" || current === null || !(key in current)) {
@@ -6369,8 +6369,8 @@ var require_redact = __commonJS({
6369
6369
  }
6370
6370
  return true;
6371
6371
  }
6372
- function removeKey(obj, parts) {
6373
- let current = obj;
6372
+ function removeKey(obj2, parts) {
6373
+ let current = obj2;
6374
6374
  for (let i = 0; i < parts.length - 1; i++) {
6375
6375
  const key = parts[i];
6376
6376
  if (typeof current !== "object" || current === null || !(key in current)) {
@@ -6402,8 +6402,8 @@ var require_redact = __commonJS({
6402
6402
  return true;
6403
6403
  }
6404
6404
  var PATH_NOT_FOUND = Symbol("PATH_NOT_FOUND");
6405
- function getValueIfExists(obj, parts) {
6406
- let current = obj;
6405
+ function getValueIfExists(obj2, parts) {
6406
+ let current = obj2;
6407
6407
  for (const part of parts) {
6408
6408
  if (current === null || current === void 0) {
6409
6409
  return PATH_NOT_FOUND;
@@ -6418,8 +6418,8 @@ var require_redact = __commonJS({
6418
6418
  }
6419
6419
  return current;
6420
6420
  }
6421
- function getValue(obj, parts) {
6422
- let current = obj;
6421
+ function getValue(obj2, parts) {
6422
+ let current = obj2;
6423
6423
  for (const part of parts) {
6424
6424
  if (current === null || current === void 0) {
6425
6425
  return void 0;
@@ -6431,30 +6431,30 @@ var require_redact = __commonJS({
6431
6431
  }
6432
6432
  return current;
6433
6433
  }
6434
- function redactPaths(obj, paths, censor, remove = false) {
6434
+ function redactPaths(obj2, paths, censor, remove = false) {
6435
6435
  for (const path13 of paths) {
6436
6436
  const parts = parsePath(path13);
6437
6437
  if (parts.includes("*")) {
6438
- redactWildcardPath(obj, parts, censor, path13, remove);
6438
+ redactWildcardPath(obj2, parts, censor, path13, remove);
6439
6439
  } else {
6440
6440
  if (remove) {
6441
- removeKey(obj, parts);
6441
+ removeKey(obj2, parts);
6442
6442
  } else {
6443
- const value = getValueIfExists(obj, parts);
6443
+ const value = getValueIfExists(obj2, parts);
6444
6444
  if (value === PATH_NOT_FOUND) {
6445
6445
  continue;
6446
6446
  }
6447
6447
  const actualCensor = typeof censor === "function" ? censor(value, parts) : censor;
6448
- setValue(obj, parts, actualCensor);
6448
+ setValue(obj2, parts, actualCensor);
6449
6449
  }
6450
6450
  }
6451
6451
  }
6452
6452
  }
6453
- function redactWildcardPath(obj, parts, censor, originalPath, remove = false) {
6453
+ function redactWildcardPath(obj2, parts, censor, originalPath, remove = false) {
6454
6454
  const wildcardIndex = parts.indexOf("*");
6455
6455
  if (wildcardIndex === parts.length - 1) {
6456
6456
  const parentParts = parts.slice(0, -1);
6457
- let current = obj;
6457
+ let current = obj2;
6458
6458
  for (const part of parentParts) {
6459
6459
  if (current === null || current === void 0) return;
6460
6460
  if (typeof current !== "object" || current === null) return;
@@ -6492,10 +6492,10 @@ var require_redact = __commonJS({
6492
6492
  }
6493
6493
  }
6494
6494
  } else {
6495
- redactIntermediateWildcard(obj, parts, censor, wildcardIndex, originalPath, remove);
6495
+ redactIntermediateWildcard(obj2, parts, censor, wildcardIndex, originalPath, remove);
6496
6496
  }
6497
6497
  }
6498
- function redactIntermediateWildcard(obj, parts, censor, wildcardIndex, originalPath, remove = false) {
6498
+ function redactIntermediateWildcard(obj2, parts, censor, wildcardIndex, originalPath, remove = false) {
6499
6499
  const beforeWildcard = parts.slice(0, wildcardIndex);
6500
6500
  const afterWildcard = parts.slice(wildcardIndex + 1);
6501
6501
  const pathArray = [];
@@ -6536,9 +6536,9 @@ var require_redact = __commonJS({
6536
6536
  }
6537
6537
  }
6538
6538
  if (beforeWildcard.length === 0) {
6539
- traverse(obj, 0);
6539
+ traverse(obj2, 0);
6540
6540
  } else {
6541
- let current = obj;
6541
+ let current = obj2;
6542
6542
  for (let i = 0; i < beforeWildcard.length; i++) {
6543
6543
  const part = beforeWildcard[i];
6544
6544
  if (current === null || current === void 0) return;
@@ -6569,9 +6569,9 @@ var require_redact = __commonJS({
6569
6569
  }
6570
6570
  return pathStructure;
6571
6571
  }
6572
- function selectiveClone(obj, pathStructure) {
6572
+ function selectiveClone(obj2, pathStructure) {
6573
6573
  if (!pathStructure) {
6574
- return obj;
6574
+ return obj2;
6575
6575
  }
6576
6576
  function cloneSelectively(source, pathMap, depth = 0) {
6577
6577
  if (!pathMap || pathMap.size === 0) {
@@ -6607,7 +6607,7 @@ var require_redact = __commonJS({
6607
6607
  }
6608
6608
  return cloned;
6609
6609
  }
6610
- return cloneSelectively(obj, pathStructure);
6610
+ return cloneSelectively(obj2, pathStructure);
6611
6611
  }
6612
6612
  function validatePath(path13) {
6613
6613
  if (typeof path13 !== "string") {
@@ -6666,17 +6666,17 @@ var require_redact = __commonJS({
6666
6666
  } = options;
6667
6667
  validatePaths(paths);
6668
6668
  const pathStructure = buildPathStructure(paths);
6669
- return function redact(obj) {
6670
- if (strict && (obj === null || typeof obj !== "object")) {
6671
- if (obj === null || obj === void 0) {
6672
- return serialize ? serialize(obj) : obj;
6669
+ return function redact(obj2) {
6670
+ if (strict && (obj2 === null || typeof obj2 !== "object")) {
6671
+ if (obj2 === null || obj2 === void 0) {
6672
+ return serialize ? serialize(obj2) : obj2;
6673
6673
  }
6674
- if (typeof obj !== "object") {
6675
- return serialize ? serialize(obj) : obj;
6674
+ if (typeof obj2 !== "object") {
6675
+ return serialize ? serialize(obj2) : obj2;
6676
6676
  }
6677
6677
  }
6678
- const cloned = selectiveClone(obj, pathStructure);
6679
- const original = obj;
6678
+ const cloned = selectiveClone(obj2, pathStructure);
6679
+ const original = obj2;
6680
6680
  let actualCensor = censor;
6681
6681
  if (typeof censor === "function") {
6682
6682
  actualCensor = censor;
@@ -6780,10 +6780,10 @@ var require_redaction = __commonJS({
6780
6780
  var strict = false;
6781
6781
  function redaction(opts, serialize) {
6782
6782
  const { paths, censor, remove } = handle(opts);
6783
- const shape = paths.reduce((o, str) => {
6783
+ const shape = paths.reduce((o, str2) => {
6784
6784
  rx.lastIndex = 0;
6785
- const first = rx.exec(str);
6786
- const next = rx.exec(str);
6785
+ const first = rx.exec(str2);
6786
+ const next = rx.exec(str2);
6787
6787
  let ns = first[1] !== void 0 ? first[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/, "$1") : first[0];
6788
6788
  if (ns === "*") {
6789
6789
  ns = wildcardFirstSym;
@@ -6796,7 +6796,7 @@ var require_redaction = __commonJS({
6796
6796
  return o;
6797
6797
  }
6798
6798
  const { index } = next;
6799
- const nextPath = `${str.substr(index, str.length - 1)}`;
6799
+ const nextPath = `${str2.substr(index, str2.length - 1)}`;
6800
6800
  o[ns] = o[ns] || [];
6801
6801
  if (ns !== wildcardFirstSym && o[ns].length === 0) {
6802
6802
  o[ns].push(...o[wildcardFirstSym] || []);
@@ -6912,7 +6912,7 @@ var require_quick_format_unescaped = __commonJS({
6912
6912
  }
6913
6913
  var argLen = args.length;
6914
6914
  if (argLen === 0) return f;
6915
- var str = "";
6915
+ var str2 = "";
6916
6916
  var a = 1 - offset;
6917
6917
  var lastPos = -1;
6918
6918
  var flen = f && f.length || 0;
@@ -6927,8 +6927,8 @@ var require_quick_format_unescaped = __commonJS({
6927
6927
  break;
6928
6928
  if (args[a] == null) break;
6929
6929
  if (lastPos < i)
6930
- str += f.slice(lastPos, i);
6931
- str += Number(args[a]);
6930
+ str2 += f.slice(lastPos, i);
6931
+ str2 += Number(args[a]);
6932
6932
  lastPos = i + 2;
6933
6933
  i++;
6934
6934
  break;
@@ -6937,8 +6937,8 @@ var require_quick_format_unescaped = __commonJS({
6937
6937
  break;
6938
6938
  if (args[a] == null) break;
6939
6939
  if (lastPos < i)
6940
- str += f.slice(lastPos, i);
6941
- str += Math.floor(Number(args[a]));
6940
+ str2 += f.slice(lastPos, i);
6941
+ str2 += Math.floor(Number(args[a]));
6942
6942
  lastPos = i + 2;
6943
6943
  i++;
6944
6944
  break;
@@ -6951,21 +6951,21 @@ var require_quick_format_unescaped = __commonJS({
6951
6951
  break;
6952
6952
  if (args[a] === void 0) break;
6953
6953
  if (lastPos < i)
6954
- str += f.slice(lastPos, i);
6954
+ str2 += f.slice(lastPos, i);
6955
6955
  var type = typeof args[a];
6956
6956
  if (type === "string") {
6957
- str += "'" + args[a] + "'";
6957
+ str2 += "'" + args[a] + "'";
6958
6958
  lastPos = i + 2;
6959
6959
  i++;
6960
6960
  break;
6961
6961
  }
6962
6962
  if (type === "function") {
6963
- str += args[a].name || "<anonymous>";
6963
+ str2 += args[a].name || "<anonymous>";
6964
6964
  lastPos = i + 2;
6965
6965
  i++;
6966
6966
  break;
6967
6967
  }
6968
- str += ss(args[a]);
6968
+ str2 += ss(args[a]);
6969
6969
  lastPos = i + 2;
6970
6970
  i++;
6971
6971
  break;
@@ -6973,15 +6973,15 @@ var require_quick_format_unescaped = __commonJS({
6973
6973
  if (a >= argLen)
6974
6974
  break;
6975
6975
  if (lastPos < i)
6976
- str += f.slice(lastPos, i);
6977
- str += String(args[a]);
6976
+ str2 += f.slice(lastPos, i);
6977
+ str2 += String(args[a]);
6978
6978
  lastPos = i + 2;
6979
6979
  i++;
6980
6980
  break;
6981
6981
  case 37:
6982
6982
  if (lastPos < i)
6983
- str += f.slice(lastPos, i);
6984
- str += "%";
6983
+ str2 += f.slice(lastPos, i);
6984
+ str2 += "%";
6985
6985
  lastPos = i + 2;
6986
6986
  i++;
6987
6987
  a--;
@@ -6994,9 +6994,9 @@ var require_quick_format_unescaped = __commonJS({
6994
6994
  if (lastPos === -1)
6995
6995
  return f;
6996
6996
  else if (lastPos < flen) {
6997
- str += f.slice(lastPos);
6997
+ str2 += f.slice(lastPos);
6998
6998
  }
6999
- return str;
6999
+ return str2;
7000
7000
  }
7001
7001
  }
7002
7002
  });
@@ -7664,10 +7664,10 @@ var require_on_exit_leak_free = __commonJS({
7664
7664
  }
7665
7665
  function callRefs(event) {
7666
7666
  for (const ref of refs[event]) {
7667
- const obj = ref.deref();
7667
+ const obj2 = ref.deref();
7668
7668
  const fn = ref.fn;
7669
- if (obj !== void 0) {
7670
- fn(obj, event);
7669
+ if (obj2 !== void 0) {
7670
+ fn(obj2, event);
7671
7671
  }
7672
7672
  }
7673
7673
  refs[event] = [];
@@ -7679,32 +7679,32 @@ var require_on_exit_leak_free = __commonJS({
7679
7679
  uninstall(event);
7680
7680
  }
7681
7681
  }
7682
- function _register(event, obj, fn) {
7683
- if (obj === void 0) {
7682
+ function _register(event, obj2, fn) {
7683
+ if (obj2 === void 0) {
7684
7684
  throw new Error("the object can't be undefined");
7685
7685
  }
7686
7686
  install(event);
7687
- const ref = new WeakRef(obj);
7687
+ const ref = new WeakRef(obj2);
7688
7688
  ref.fn = fn;
7689
7689
  ensureRegistry();
7690
- registry2.register(obj, ref);
7690
+ registry2.register(obj2, ref);
7691
7691
  refs[event].push(ref);
7692
7692
  }
7693
- function register(obj, fn) {
7694
- _register("exit", obj, fn);
7693
+ function register(obj2, fn) {
7694
+ _register("exit", obj2, fn);
7695
7695
  }
7696
- function registerBeforeExit(obj, fn) {
7697
- _register("beforeExit", obj, fn);
7696
+ function registerBeforeExit(obj2, fn) {
7697
+ _register("beforeExit", obj2, fn);
7698
7698
  }
7699
- function unregister(obj) {
7699
+ function unregister(obj2) {
7700
7700
  if (registry2 === void 0) {
7701
7701
  return;
7702
7702
  }
7703
- registry2.unregister(obj);
7703
+ registry2.unregister(obj2);
7704
7704
  for (const event of ["exit", "beforeExit"]) {
7705
7705
  refs[event] = refs[event].filter((ref) => {
7706
7706
  const _obj = ref.deref();
7707
- return _obj && _obj !== obj;
7707
+ return _obj && _obj !== obj2;
7708
7708
  });
7709
7709
  uninstall(event);
7710
7710
  }
@@ -7854,7 +7854,7 @@ var require_thread_stream = __commonJS({
7854
7854
  var { version: version2 } = require_package();
7855
7855
  var { EventEmitter: EventEmitter2 } = __require("events");
7856
7856
  var { Worker } = __require("worker_threads");
7857
- var { join: join5 } = __require("path");
7857
+ var { join: join6 } = __require("path");
7858
7858
  var { pathToFileURL } = __require("url");
7859
7859
  var { wait } = require_wait();
7860
7860
  var {
@@ -7905,7 +7905,7 @@ var require_thread_stream = __commonJS({
7905
7905
  function createWorker(stream, opts) {
7906
7906
  const { filename, workerData } = opts;
7907
7907
  const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {};
7908
- const toExecute = bundlerOverrides["thread-stream-worker"] || join5(__dirname, "lib", "worker.js");
7908
+ const toExecute = bundlerOverrides["thread-stream-worker"] || join6(__dirname, "lib", "worker.js");
7909
7909
  const worker = new Worker(toExecute, {
7910
7910
  ...opts.workerOpts,
7911
7911
  name: opts.workerOpts?.name || "thread-stream",
@@ -8373,7 +8373,7 @@ var require_transport = __commonJS({
8373
8373
  var { createRequire } = __require("module");
8374
8374
  var { existsSync: existsSync3 } = __require("node:fs");
8375
8375
  var getCallers = require_caller();
8376
- var { join: join5, isAbsolute, sep } = __require("node:path");
8376
+ var { join: join6, isAbsolute, sep } = __require("node:path");
8377
8377
  var { fileURLToPath: fileURLToPath3 } = __require("node:url");
8378
8378
  var sleep = require_atomic_sleep();
8379
8379
  var onExit = require_on_exit_leak_free();
@@ -8399,16 +8399,16 @@ var require_transport = __commonJS({
8399
8399
  return false;
8400
8400
  }
8401
8401
  function sanitizeNodeOptions(nodeOptions) {
8402
- const tokens = nodeOptions.match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g);
8403
- if (!tokens) {
8402
+ const tokens2 = nodeOptions.match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g);
8403
+ if (!tokens2) {
8404
8404
  return nodeOptions;
8405
8405
  }
8406
8406
  const sanitized = [];
8407
8407
  let changed = false;
8408
- for (let i = 0; i < tokens.length; i++) {
8409
- const token = tokens[i];
8408
+ for (let i = 0; i < tokens2.length; i++) {
8409
+ const token = tokens2[i];
8410
8410
  if (token === "--require" || token === "-r" || token === "--import") {
8411
- const next = tokens[i + 1];
8411
+ const next = tokens2[i + 1];
8412
8412
  if (next && shouldDropPreload(next)) {
8413
8413
  changed = true;
8414
8414
  i++;
@@ -8526,7 +8526,7 @@ var require_transport = __commonJS({
8526
8526
  throw new Error("only one of target or targets can be specified");
8527
8527
  }
8528
8528
  if (targets) {
8529
- target = bundlerOverrides["pino-worker"] || join5(__dirname, "worker.js");
8529
+ target = bundlerOverrides["pino-worker"] || join6(__dirname, "worker.js");
8530
8530
  options.targets = targets.filter((dest) => dest.target).map((dest) => {
8531
8531
  return {
8532
8532
  ...dest,
@@ -8544,7 +8544,7 @@ var require_transport = __commonJS({
8544
8544
  });
8545
8545
  });
8546
8546
  } else if (pipeline) {
8547
- target = bundlerOverrides["pino-worker"] || join5(__dirname, "worker.js");
8547
+ target = bundlerOverrides["pino-worker"] || join6(__dirname, "worker.js");
8548
8548
  options.pipelines = [pipeline.map((dest) => {
8549
8549
  return {
8550
8550
  ...dest,
@@ -8567,7 +8567,7 @@ var require_transport = __commonJS({
8567
8567
  return origin;
8568
8568
  }
8569
8569
  if (origin === "pino/file") {
8570
- return join5(__dirname, "..", "file.js");
8570
+ return join6(__dirname, "..", "file.js");
8571
8571
  }
8572
8572
  let fixTarget2;
8573
8573
  for (const filePath of callers) {
@@ -8620,7 +8620,7 @@ var require_tools = __commonJS({
8620
8620
  var transport = require_transport();
8621
8621
  var [nodeMajor] = process.versions.node.split(".").map((v) => Number(v));
8622
8622
  var asJsonChan = diagChan.tracingChannel("pino_asJson");
8623
- var asString = nodeMajor >= 25 ? (str) => JSON.stringify(str) : _asString;
8623
+ var asString = nodeMajor >= 25 ? (str2) => JSON.stringify(str2) : _asString;
8624
8624
  function noop() {
8625
8625
  }
8626
8626
  function genLog(level, hook) {
@@ -8658,38 +8658,38 @@ var require_tools = __commonJS({
8658
8658
  }
8659
8659
  }
8660
8660
  }
8661
- function _asString(str) {
8661
+ function _asString(str2) {
8662
8662
  let result = "";
8663
8663
  let last = 0;
8664
8664
  let found = false;
8665
8665
  let point = 255;
8666
- const l = str.length;
8666
+ const l = str2.length;
8667
8667
  if (l > 100) {
8668
- return JSON.stringify(str);
8668
+ return JSON.stringify(str2);
8669
8669
  }
8670
8670
  for (var i = 0; i < l && point >= 32; i++) {
8671
- point = str.charCodeAt(i);
8671
+ point = str2.charCodeAt(i);
8672
8672
  if (point === 34 || point === 92) {
8673
- result += str.slice(last, i) + "\\";
8673
+ result += str2.slice(last, i) + "\\";
8674
8674
  last = i;
8675
8675
  found = true;
8676
8676
  }
8677
8677
  }
8678
8678
  if (!found) {
8679
- result = str;
8679
+ result = str2;
8680
8680
  } else {
8681
- result += str.slice(last);
8681
+ result += str2.slice(last);
8682
8682
  }
8683
- return point < 32 ? JSON.stringify(str) : '"' + result + '"';
8683
+ return point < 32 ? JSON.stringify(str2) : '"' + result + '"';
8684
8684
  }
8685
- function asJson(obj, msg, num2, time3) {
8685
+ function asJson(obj2, msg, num3, time3) {
8686
8686
  if (asJsonChan.hasSubscribers === false) {
8687
- return _asJson.call(this, obj, msg, num2, time3);
8687
+ return _asJson.call(this, obj2, msg, num3, time3);
8688
8688
  }
8689
8689
  const store = { instance: this, arguments };
8690
- return asJsonChan.traceSync(_asJson, store, this, obj, msg, num2, time3);
8690
+ return asJsonChan.traceSync(_asJson, store, this, obj2, msg, num3, time3);
8691
8691
  }
8692
- function _asJson(obj, msg, num2, time3) {
8692
+ function _asJson(obj2, msg, num3, time3) {
8693
8693
  const stringify2 = this[stringifySym];
8694
8694
  const stringifySafe = this[stringifySafeSym];
8695
8695
  const stringifiers = this[stringifiersSym];
@@ -8699,17 +8699,17 @@ var require_tools = __commonJS({
8699
8699
  const formatters = this[formattersSym];
8700
8700
  const messageKey = this[messageKeySym];
8701
8701
  const errorKey = this[errorKeySym];
8702
- let data = this[lsCacheSym][num2] + time3;
8702
+ let data = this[lsCacheSym][num3] + time3;
8703
8703
  data = data + chindings;
8704
8704
  let value;
8705
8705
  if (formatters.log) {
8706
- obj = formatters.log(obj);
8706
+ obj2 = formatters.log(obj2);
8707
8707
  }
8708
8708
  const wildcardStringifier = stringifiers[wildcardFirstSym];
8709
8709
  let propStr = "";
8710
- for (const key in obj) {
8711
- value = obj[key];
8712
- if (Object.prototype.hasOwnProperty.call(obj, key) && value !== void 0) {
8710
+ for (const key in obj2) {
8711
+ value = obj2[key];
8712
+ if (Object.prototype.hasOwnProperty.call(obj2, key) && value !== void 0) {
8713
8713
  if (serializers[key]) {
8714
8714
  value = serializers[key](value);
8715
8715
  } else if (key === errorKey && serializers.err) {
@@ -8875,13 +8875,13 @@ var require_tools = __commonJS({
8875
8875
  return { opts, stream };
8876
8876
  };
8877
8877
  }
8878
- function stringify(obj, stringifySafeFn) {
8878
+ function stringify(obj2, stringifySafeFn) {
8879
8879
  try {
8880
- return JSON.stringify(obj);
8880
+ return JSON.stringify(obj2);
8881
8881
  } catch (_) {
8882
8882
  try {
8883
8883
  const stringify2 = stringifySafeFn || this[stringifySafeSym];
8884
- return stringify2(obj);
8884
+ return stringify2(obj2);
8885
8885
  } catch (_2) {
8886
8886
  return '"[unable to serialize, circular reference is too complex to analyze]"';
8887
8887
  }
@@ -8986,12 +8986,12 @@ var require_levels = __commonJS({
8986
8986
  function genLsCache(instance2) {
8987
8987
  const formatter = instance2[formattersSym].level;
8988
8988
  const { labels } = instance2.levels;
8989
- const cache3 = {};
8989
+ const cache4 = {};
8990
8990
  for (const label in labels) {
8991
8991
  const level = formatter(labels[label], Number(label));
8992
- cache3[label] = JSON.stringify(level).slice(0, -1);
8992
+ cache4[label] = JSON.stringify(level).slice(0, -1);
8993
8993
  }
8994
- instance2[lsCacheSym] = cache3;
8994
+ instance2[lsCacheSym] = cache4;
8995
8995
  return instance2;
8996
8996
  }
8997
8997
  function isStandardLevel(level, useOnlyCustomLevels) {
@@ -9324,35 +9324,35 @@ var require_proto = __commonJS({
9324
9324
  function defaultMixinMergeStrategy(mergeObject, mixinObject) {
9325
9325
  return Object.assign(mixinObject, mergeObject);
9326
9326
  }
9327
- function write(_obj, msg, num2) {
9327
+ function write(_obj, msg, num3) {
9328
9328
  const t = this[timeSym]();
9329
9329
  const mixin = this[mixinSym];
9330
9330
  const errorKey = this[errorKeySym];
9331
9331
  const messageKey = this[messageKeySym];
9332
9332
  const mixinMergeStrategy = this[mixinMergeStrategySym] || defaultMixinMergeStrategy;
9333
- let obj;
9333
+ let obj2;
9334
9334
  const streamWriteHook = this[hooksSym].streamWrite;
9335
9335
  if (_obj === void 0 || _obj === null) {
9336
- obj = {};
9336
+ obj2 = {};
9337
9337
  } else if (_obj instanceof Error) {
9338
- obj = { [errorKey]: _obj };
9338
+ obj2 = { [errorKey]: _obj };
9339
9339
  if (msg === void 0) {
9340
9340
  msg = _obj.message;
9341
9341
  }
9342
9342
  } else {
9343
- obj = _obj;
9343
+ obj2 = _obj;
9344
9344
  if (msg === void 0 && _obj[messageKey] === void 0 && _obj[errorKey]) {
9345
9345
  msg = _obj[errorKey].message;
9346
9346
  }
9347
9347
  }
9348
9348
  if (mixin) {
9349
- obj = mixinMergeStrategy(obj, mixin(obj, num2, this));
9349
+ obj2 = mixinMergeStrategy(obj2, mixin(obj2, num3, this));
9350
9350
  }
9351
- const s = this[asJsonSym](obj, msg, num2, t);
9351
+ const s = this[asJsonSym](obj2, msg, num3, t);
9352
9352
  const stream = this[streamSym];
9353
9353
  if (stream[needsMetadataGsym] === true) {
9354
- stream.lastLevel = num2;
9355
- stream.lastObj = obj;
9354
+ stream.lastLevel = num3;
9355
+ stream.lastObj = obj2;
9356
9356
  stream.lastMsg = msg;
9357
9357
  stream.lastTime = t.slice(this[timeSliceIndexSym]);
9358
9358
  stream.lastLogger = this;
@@ -9384,11 +9384,11 @@ var require_safe_stable_stringify = __commonJS({
9384
9384
  exports.configure = configure;
9385
9385
  module.exports = stringify;
9386
9386
  var strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;
9387
- function strEscape(str) {
9388
- if (str.length < 5e3 && !strEscapeSequencesRegExp.test(str)) {
9389
- return `"${str}"`;
9387
+ function strEscape(str2) {
9388
+ if (str2.length < 5e3 && !strEscapeSequencesRegExp.test(str2)) {
9389
+ return `"${str2}"`;
9390
9390
  }
9391
- return JSON.stringify(str);
9391
+ return JSON.stringify(str2);
9392
9392
  }
9393
9393
  function sort(array2, comparator) {
9394
9394
  if (array2.length > 200 || comparator) {
@@ -9547,7 +9547,7 @@ var require_safe_stable_stringify = __commonJS({
9547
9547
  return circularValue;
9548
9548
  }
9549
9549
  let res = "";
9550
- let join5 = ",";
9550
+ let join6 = ",";
9551
9551
  const originalIndentation = indentation;
9552
9552
  if (Array.isArray(value)) {
9553
9553
  if (value.length === 0) {
@@ -9561,7 +9561,7 @@ var require_safe_stable_stringify = __commonJS({
9561
9561
  indentation += spacer;
9562
9562
  res += `
9563
9563
  ${indentation}`;
9564
- join5 = `,
9564
+ join6 = `,
9565
9565
  ${indentation}`;
9566
9566
  }
9567
9567
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
@@ -9569,13 +9569,13 @@ ${indentation}`;
9569
9569
  for (; i < maximumValuesToStringify - 1; i++) {
9570
9570
  const tmp2 = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
9571
9571
  res += tmp2 !== void 0 ? tmp2 : "null";
9572
- res += join5;
9572
+ res += join6;
9573
9573
  }
9574
9574
  const tmp = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
9575
9575
  res += tmp !== void 0 ? tmp : "null";
9576
9576
  if (value.length - 1 > maximumBreadth) {
9577
9577
  const removedKeys = value.length - maximumBreadth - 1;
9578
- res += `${join5}"... ${getItemCount(removedKeys)} not stringified"`;
9578
+ res += `${join6}"... ${getItemCount(removedKeys)} not stringified"`;
9579
9579
  }
9580
9580
  if (spacer !== "") {
9581
9581
  res += `
@@ -9596,7 +9596,7 @@ ${originalIndentation}`;
9596
9596
  let separator = "";
9597
9597
  if (spacer !== "") {
9598
9598
  indentation += spacer;
9599
- join5 = `,
9599
+ join6 = `,
9600
9600
  ${indentation}`;
9601
9601
  whitespace = " ";
9602
9602
  }
@@ -9610,13 +9610,13 @@ ${indentation}`;
9610
9610
  const tmp = stringifyFnReplacer(key2, value, stack, replacer, spacer, indentation);
9611
9611
  if (tmp !== void 0) {
9612
9612
  res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
9613
- separator = join5;
9613
+ separator = join6;
9614
9614
  }
9615
9615
  }
9616
9616
  if (keyLength > maximumBreadth) {
9617
9617
  const removedKeys = keyLength - maximumBreadth;
9618
9618
  res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`;
9619
- separator = join5;
9619
+ separator = join6;
9620
9620
  }
9621
9621
  if (spacer !== "" && separator.length > 1) {
9622
9622
  res = `
@@ -9657,7 +9657,7 @@ ${originalIndentation}`;
9657
9657
  }
9658
9658
  const originalIndentation = indentation;
9659
9659
  let res = "";
9660
- let join5 = ",";
9660
+ let join6 = ",";
9661
9661
  if (Array.isArray(value)) {
9662
9662
  if (value.length === 0) {
9663
9663
  return "[]";
@@ -9670,7 +9670,7 @@ ${originalIndentation}`;
9670
9670
  indentation += spacer;
9671
9671
  res += `
9672
9672
  ${indentation}`;
9673
- join5 = `,
9673
+ join6 = `,
9674
9674
  ${indentation}`;
9675
9675
  }
9676
9676
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
@@ -9678,13 +9678,13 @@ ${indentation}`;
9678
9678
  for (; i < maximumValuesToStringify - 1; i++) {
9679
9679
  const tmp2 = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
9680
9680
  res += tmp2 !== void 0 ? tmp2 : "null";
9681
- res += join5;
9681
+ res += join6;
9682
9682
  }
9683
9683
  const tmp = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
9684
9684
  res += tmp !== void 0 ? tmp : "null";
9685
9685
  if (value.length - 1 > maximumBreadth) {
9686
9686
  const removedKeys = value.length - maximumBreadth - 1;
9687
- res += `${join5}"... ${getItemCount(removedKeys)} not stringified"`;
9687
+ res += `${join6}"... ${getItemCount(removedKeys)} not stringified"`;
9688
9688
  }
9689
9689
  if (spacer !== "") {
9690
9690
  res += `
@@ -9697,7 +9697,7 @@ ${originalIndentation}`;
9697
9697
  let whitespace = "";
9698
9698
  if (spacer !== "") {
9699
9699
  indentation += spacer;
9700
- join5 = `,
9700
+ join6 = `,
9701
9701
  ${indentation}`;
9702
9702
  whitespace = " ";
9703
9703
  }
@@ -9706,7 +9706,7 @@ ${indentation}`;
9706
9706
  const tmp = stringifyArrayReplacer(key2, value[key2], stack, replacer, spacer, indentation);
9707
9707
  if (tmp !== void 0) {
9708
9708
  res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
9709
- separator = join5;
9709
+ separator = join6;
9710
9710
  }
9711
9711
  }
9712
9712
  if (spacer !== "" && separator.length > 1) {
@@ -9764,20 +9764,20 @@ ${originalIndentation}`;
9764
9764
  indentation += spacer;
9765
9765
  let res2 = `
9766
9766
  ${indentation}`;
9767
- const join6 = `,
9767
+ const join7 = `,
9768
9768
  ${indentation}`;
9769
9769
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
9770
9770
  let i = 0;
9771
9771
  for (; i < maximumValuesToStringify - 1; i++) {
9772
9772
  const tmp2 = stringifyIndent(String(i), value[i], stack, spacer, indentation);
9773
9773
  res2 += tmp2 !== void 0 ? tmp2 : "null";
9774
- res2 += join6;
9774
+ res2 += join7;
9775
9775
  }
9776
9776
  const tmp = stringifyIndent(String(i), value[i], stack, spacer, indentation);
9777
9777
  res2 += tmp !== void 0 ? tmp : "null";
9778
9778
  if (value.length - 1 > maximumBreadth) {
9779
9779
  const removedKeys = value.length - maximumBreadth - 1;
9780
- res2 += `${join6}"... ${getItemCount(removedKeys)} not stringified"`;
9780
+ res2 += `${join7}"... ${getItemCount(removedKeys)} not stringified"`;
9781
9781
  }
9782
9782
  res2 += `
9783
9783
  ${originalIndentation}`;
@@ -9793,16 +9793,16 @@ ${originalIndentation}`;
9793
9793
  return '"[Object]"';
9794
9794
  }
9795
9795
  indentation += spacer;
9796
- const join5 = `,
9796
+ const join6 = `,
9797
9797
  ${indentation}`;
9798
9798
  let res = "";
9799
9799
  let separator = "";
9800
9800
  let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
9801
9801
  if (isTypedArrayWithEntries(value)) {
9802
- res += stringifyTypedArray(value, join5, maximumBreadth);
9802
+ res += stringifyTypedArray(value, join6, maximumBreadth);
9803
9803
  keys = keys.slice(value.length);
9804
9804
  maximumPropertiesToStringify -= value.length;
9805
- separator = join5;
9805
+ separator = join6;
9806
9806
  }
9807
9807
  if (deterministic) {
9808
9808
  keys = sort(keys, comparator);
@@ -9813,13 +9813,13 @@ ${indentation}`;
9813
9813
  const tmp = stringifyIndent(key2, value[key2], stack, spacer, indentation);
9814
9814
  if (tmp !== void 0) {
9815
9815
  res += `${separator}${strEscape(key2)}: ${tmp}`;
9816
- separator = join5;
9816
+ separator = join6;
9817
9817
  }
9818
9818
  }
9819
9819
  if (keyLength > maximumBreadth) {
9820
9820
  const removedKeys = keyLength - maximumBreadth;
9821
9821
  res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`;
9822
- separator = join5;
9822
+ separator = join6;
9823
9823
  }
9824
9824
  if (separator !== "") {
9825
9825
  res = `
@@ -10713,13 +10713,13 @@ var require_serializer = __commonJS({
10713
10713
  return "" + integer2;
10714
10714
  }
10715
10715
  asNumber(i) {
10716
- const num2 = Number(i);
10717
- if (num2 !== num2) {
10716
+ const num3 = Number(i);
10717
+ if (num3 !== num3) {
10718
10718
  throw new Error(`The value "${i}" cannot be converted to a number.`);
10719
- } else if (num2 === Infinity || num2 === -Infinity) {
10719
+ } else if (num3 === Infinity || num3 === -Infinity) {
10720
10720
  return "null";
10721
10721
  } else {
10722
- return "" + num2;
10722
+ return "" + num3;
10723
10723
  }
10724
10724
  }
10725
10725
  asBoolean(bool) {
@@ -10755,8 +10755,8 @@ var require_serializer = __commonJS({
10755
10755
  }
10756
10756
  throw new Error(`The value "${date5}" cannot be converted to a time.`);
10757
10757
  }
10758
- asString(str) {
10759
- const len = str.length;
10758
+ asString(str2) {
10759
+ const len = str2.length;
10760
10760
  if (len === 0) {
10761
10761
  return '""';
10762
10762
  } else if (len < 42) {
@@ -10764,25 +10764,25 @@ var require_serializer = __commonJS({
10764
10764
  let last = -1;
10765
10765
  let point = 255;
10766
10766
  for (let i = 0; i < len; i++) {
10767
- point = str.charCodeAt(i);
10767
+ point = str2.charCodeAt(i);
10768
10768
  if (point === 34 || // '"'
10769
10769
  point === 92) {
10770
10770
  last === -1 && (last = 0);
10771
- result += str.slice(last, i) + "\\";
10771
+ result += str2.slice(last, i) + "\\";
10772
10772
  last = i;
10773
10773
  } else if (point < 32 || point >= 55296 && point <= 57343) {
10774
- return JSON.stringify(str);
10774
+ return JSON.stringify(str2);
10775
10775
  }
10776
10776
  }
10777
- return last === -1 && '"' + str + '"' || '"' + result + str.slice(last) + '"';
10778
- } else if (len < 5e3 && STR_ESCAPE.test(str) === false) {
10779
- return '"' + str + '"';
10777
+ return last === -1 && '"' + str2 + '"' || '"' + result + str2.slice(last) + '"';
10778
+ } else if (len < 5e3 && STR_ESCAPE.test(str2) === false) {
10779
+ return '"' + str2 + '"';
10780
10780
  } else {
10781
- return JSON.stringify(str);
10781
+ return JSON.stringify(str2);
10782
10782
  }
10783
10783
  }
10784
- asUnsafeString(str) {
10785
- return '"' + str + '"';
10784
+ asUnsafeString(str2) {
10785
+ return '"' + str2 + '"';
10786
10786
  }
10787
10787
  getState() {
10788
10788
  return this._options;
@@ -10825,18 +10825,18 @@ var require_error_serializer = __commonJS({
10825
10825
  const JSON_STR_EMPTY_STRING = JSON_STR_QUOTE + JSON_STR_QUOTE;
10826
10826
  const JSON_STR_NULL = "null";
10827
10827
  function anonymous0(input) {
10828
- const obj = input && typeof input.toJSON === "function" ? input.toJSON() : input;
10829
- if (obj === null) return JSON_STR_EMPTY_OBJECT;
10828
+ const obj2 = input && typeof input.toJSON === "function" ? input.toJSON() : input;
10829
+ if (obj2 === null) return JSON_STR_EMPTY_OBJECT;
10830
10830
  let json2 = "";
10831
10831
  json2 += JSON_STR_BEGIN_OBJECT;
10832
10832
  let addComma_0 = false;
10833
- const value_statusCode_1 = obj["statusCode"];
10833
+ const value_statusCode_1 = obj2["statusCode"];
10834
10834
  if (value_statusCode_1 !== void 0) {
10835
10835
  !addComma_0 && (addComma_0 = true) || (json2 += JSON_STR_COMMA);
10836
10836
  json2 += '"statusCode":';
10837
10837
  json2 += asNumber(value_statusCode_1);
10838
10838
  }
10839
- const value_code_2 = obj["code"];
10839
+ const value_code_2 = obj2["code"];
10840
10840
  if (value_code_2 !== void 0) {
10841
10841
  !addComma_0 && (addComma_0 = true) || (json2 += JSON_STR_COMMA);
10842
10842
  json2 += '"code":';
@@ -10854,7 +10854,7 @@ var require_error_serializer = __commonJS({
10854
10854
  json2 += asString(value_code_2);
10855
10855
  }
10856
10856
  }
10857
- const value_error_3 = obj["error"];
10857
+ const value_error_3 = obj2["error"];
10858
10858
  if (value_error_3 !== void 0) {
10859
10859
  !addComma_0 && (addComma_0 = true) || (json2 += JSON_STR_COMMA);
10860
10860
  json2 += '"error":';
@@ -10872,7 +10872,7 @@ var require_error_serializer = __commonJS({
10872
10872
  json2 += asString(value_error_3);
10873
10873
  }
10874
10874
  }
10875
- const value_message_4 = obj["message"];
10875
+ const value_message_4 = obj2["message"];
10876
10876
  if (value_message_4 !== void 0) {
10877
10877
  !addComma_0 && (addComma_0 = true) || (json2 += JSON_STR_COMMA);
10878
10878
  json2 += '"message":';
@@ -12939,10 +12939,10 @@ var require_proxy_addr = __commonJS({
12939
12939
  }
12940
12940
  return compileTrust(compileRangeSubnets(trust));
12941
12941
  }
12942
- function compileRangeSubnets(arr) {
12943
- const rangeSubnets = new Array(arr.length);
12944
- for (let i = 0; i < arr.length; i++) {
12945
- rangeSubnets[i] = parseipNotation(arr[i]);
12942
+ function compileRangeSubnets(arr2) {
12943
+ const rangeSubnets = new Array(arr2.length);
12944
+ for (let i = 0; i < arr2.length; i++) {
12945
+ rangeSubnets[i] = parseipNotation(arr2[i]);
12946
12946
  }
12947
12947
  return rangeSubnets;
12948
12948
  }
@@ -12952,11 +12952,11 @@ var require_proxy_addr = __commonJS({
12952
12952
  }
12953
12953
  function parseipNotation(note) {
12954
12954
  const pos = note.lastIndexOf("/");
12955
- const str = pos !== -1 ? note.substring(0, pos) : note;
12956
- if (!isip(str)) {
12957
- throw new TypeError("invalid IP address: " + str);
12955
+ const str2 = pos !== -1 ? note.substring(0, pos) : note;
12956
+ if (!isip(str2)) {
12957
+ throw new TypeError("invalid IP address: " + str2);
12958
12958
  }
12959
- let ip = parseip(str);
12959
+ let ip = parseip(str2);
12960
12960
  if (pos === -1 && ip.kind() === "ipv6" && ip.isIPv4MappedAddress()) {
12961
12961
  ip = ip.toIPv4Address();
12962
12962
  }
@@ -13492,32 +13492,32 @@ var require_secure_json_parse = __commonJS({
13492
13492
  if (text2 && text2.charCodeAt(0) === 65279) {
13493
13493
  text2 = text2.slice(1);
13494
13494
  }
13495
- const obj = JSON.parse(text2, reviver);
13496
- if (obj === null || typeof obj !== "object") {
13497
- return obj;
13495
+ const obj2 = JSON.parse(text2, reviver);
13496
+ if (obj2 === null || typeof obj2 !== "object") {
13497
+ return obj2;
13498
13498
  }
13499
13499
  const protoAction = options && options.protoAction || "error";
13500
13500
  const constructorAction = options && options.constructorAction || "error";
13501
13501
  if (protoAction === "ignore" && constructorAction === "ignore") {
13502
- return obj;
13502
+ return obj2;
13503
13503
  }
13504
13504
  if (protoAction !== "ignore" && constructorAction !== "ignore") {
13505
13505
  if (suspectProtoRx.test(text2) === false && suspectConstructorRx.test(text2) === false) {
13506
- return obj;
13506
+ return obj2;
13507
13507
  }
13508
13508
  } else if (protoAction !== "ignore" && constructorAction === "ignore") {
13509
13509
  if (suspectProtoRx.test(text2) === false) {
13510
- return obj;
13510
+ return obj2;
13511
13511
  }
13512
13512
  } else {
13513
13513
  if (suspectConstructorRx.test(text2) === false) {
13514
- return obj;
13514
+ return obj2;
13515
13515
  }
13516
13516
  }
13517
- return filter(obj, { protoAction, constructorAction, safe: options && options.safe });
13517
+ return filter(obj2, { protoAction, constructorAction, safe: options && options.safe });
13518
13518
  }
13519
- function filter(obj, { protoAction = "error", constructorAction = "error", safe } = {}) {
13520
- let next = [obj];
13519
+ function filter(obj2, { protoAction = "error", constructorAction = "error", safe } = {}) {
13520
+ let next = [obj2];
13521
13521
  while (next.length) {
13522
13522
  const nodes = next;
13523
13523
  next = [];
@@ -13546,7 +13546,7 @@ var require_secure_json_parse = __commonJS({
13546
13546
  }
13547
13547
  }
13548
13548
  }
13549
- return obj;
13549
+ return obj2;
13550
13550
  }
13551
13551
  function parse3(text2, reviver, options) {
13552
13552
  const { stackTraceLimit } = Error;
@@ -13993,7 +13993,7 @@ var require_code = __commonJS({
13993
13993
  }
13994
13994
  exports._ = _;
13995
13995
  var plus = new _Code("+");
13996
- function str(strs, ...args) {
13996
+ function str2(strs, ...args) {
13997
13997
  const expr = [safeStringify(strs[0])];
13998
13998
  let i = 0;
13999
13999
  while (i < args.length) {
@@ -14004,7 +14004,7 @@ var require_code = __commonJS({
14004
14004
  optimize(expr);
14005
14005
  return new _Code(expr);
14006
14006
  }
14007
- exports.str = str;
14007
+ exports.str = str2;
14008
14008
  function addCodeArg(code, arg) {
14009
14009
  if (arg instanceof _Code)
14010
14010
  code.push(...arg._items);
@@ -14047,7 +14047,7 @@ var require_code = __commonJS({
14047
14047
  return;
14048
14048
  }
14049
14049
  function strConcat(c1, c2) {
14050
- return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`;
14050
+ return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str2`${c1}${c2}`;
14051
14051
  }
14052
14052
  exports.strConcat = strConcat;
14053
14053
  function interpolate(x) {
@@ -14751,9 +14751,9 @@ var require_codegen = __commonJS({
14751
14751
  forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) {
14752
14752
  const name = this._scope.toName(nameOrPrefix);
14753
14753
  if (this.opts.es5) {
14754
- const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable);
14755
- return this.forRange("_i", 0, (0, code_1._)`${arr}.length`, (i) => {
14756
- this.var(name, (0, code_1._)`${arr}[${i}]`);
14754
+ const arr2 = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable);
14755
+ return this.forRange("_i", 0, (0, code_1._)`${arr2}.length`, (i) => {
14756
+ this.var(name, (0, code_1._)`${arr2}[${i}]`);
14757
14757
  forBody(name);
14758
14758
  });
14759
14759
  }
@@ -14761,12 +14761,12 @@ var require_codegen = __commonJS({
14761
14761
  }
14762
14762
  // `for-in` statement.
14763
14763
  // With option `ownProperties` replaced with a `for-of` loop for object keys
14764
- forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) {
14764
+ forIn(nameOrPrefix, obj2, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) {
14765
14765
  if (this.opts.ownProperties) {
14766
- return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj})`, forBody);
14766
+ return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj2})`, forBody);
14767
14767
  }
14768
14768
  const name = this._scope.toName(nameOrPrefix);
14769
- return this._for(new ForIter("in", varKind, name, obj), () => forBody(name));
14769
+ return this._for(new ForIter("in", varKind, name, obj2), () => forBody(name));
14770
14770
  }
14771
14771
  // end `for` loop
14772
14772
  endFor() {
@@ -14952,9 +14952,9 @@ var require_util = __commonJS({
14952
14952
  exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0;
14953
14953
  var codegen_1 = require_codegen();
14954
14954
  var code_1 = require_code();
14955
- function toHash(arr) {
14955
+ function toHash(arr2) {
14956
14956
  const hash2 = {};
14957
- for (const item of arr)
14957
+ for (const item of arr2)
14958
14958
  hash2[item] = true;
14959
14959
  return hash2;
14960
14960
  }
@@ -15009,22 +15009,22 @@ var require_util = __commonJS({
15009
15009
  return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;
15010
15010
  }
15011
15011
  exports.schemaRefOrVal = schemaRefOrVal;
15012
- function unescapeFragment(str) {
15013
- return unescapeJsonPointer(decodeURIComponent(str));
15012
+ function unescapeFragment(str2) {
15013
+ return unescapeJsonPointer(decodeURIComponent(str2));
15014
15014
  }
15015
15015
  exports.unescapeFragment = unescapeFragment;
15016
- function escapeFragment(str) {
15017
- return encodeURIComponent(escapeJsonPointer(str));
15016
+ function escapeFragment(str2) {
15017
+ return encodeURIComponent(escapeJsonPointer(str2));
15018
15018
  }
15019
15019
  exports.escapeFragment = escapeFragment;
15020
- function escapeJsonPointer(str) {
15021
- if (typeof str == "number")
15022
- return `${str}`;
15023
- return str.replace(/~/g, "~0").replace(/\//g, "~1");
15020
+ function escapeJsonPointer(str2) {
15021
+ if (typeof str2 == "number")
15022
+ return `${str2}`;
15023
+ return str2.replace(/~/g, "~0").replace(/\//g, "~1");
15024
15024
  }
15025
15025
  exports.escapeJsonPointer = escapeJsonPointer;
15026
- function unescapeJsonPointer(str) {
15027
- return str.replace(/~1/g, "/").replace(/~0/g, "~");
15026
+ function unescapeJsonPointer(str2) {
15027
+ return str2.replace(/~1/g, "/").replace(/~0/g, "~");
15028
15028
  }
15029
15029
  exports.unescapeJsonPointer = unescapeJsonPointer;
15030
15030
  function eachItem(xs, f) {
@@ -16049,8 +16049,8 @@ var require_json_schema_traverse = __commonJS({
16049
16049
  post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
16050
16050
  }
16051
16051
  }
16052
- function escapeJsonPtr(str) {
16053
- return str.replace(/~/g, "~0").replace(/\//g, "~1");
16052
+ function escapeJsonPtr(str2) {
16053
+ return str2.replace(/~/g, "~0").replace(/\//g, "~1");
16054
16054
  }
16055
16055
  }
16056
16056
  });
@@ -16586,11 +16586,11 @@ var require_validate = __commonJS({
16586
16586
  if (!this.allErrors)
16587
16587
  this.gen.if(cond);
16588
16588
  }
16589
- setParams(obj, assign) {
16589
+ setParams(obj2, assign) {
16590
16590
  if (assign)
16591
- Object.assign(this.params, obj);
16591
+ Object.assign(this.params, obj2);
16592
16592
  else
16593
- this.params = obj;
16593
+ this.params = obj2;
16594
16594
  }
16595
16595
  block$data(valid, codeBlock, $dataValid = codegen_1.nil) {
16596
16596
  this.gen.block(() => {
@@ -17114,10 +17114,10 @@ var require_utils = __commonJS({
17114
17114
  return { host, isIPV6: false };
17115
17115
  }
17116
17116
  }
17117
- function findToken(str, token) {
17117
+ function findToken(str2, token) {
17118
17118
  let ind = 0;
17119
- for (let i = 0; i < str.length; i++) {
17120
- if (str[i] === token) ind++;
17119
+ for (let i = 0; i < str2.length; i++) {
17120
+ if (str2[i] === token) ind++;
17121
17121
  }
17122
17122
  return ind;
17123
17123
  }
@@ -17880,7 +17880,7 @@ var require_core = __commonJS({
17880
17880
  var util_1 = require_util();
17881
17881
  var $dataRefSchema = require_data();
17882
17882
  var uri_1 = require_uri();
17883
- var defaultRegExp = (str, flags) => new RegExp(str, flags);
17883
+ var defaultRegExp = (str2, flags) => new RegExp(str2, flags);
17884
17884
  defaultRegExp.code = "new RegExp";
17885
17885
  var META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"];
17886
17886
  var EXT_SCOPE_NAMES = /* @__PURE__ */ new Set([
@@ -18675,16 +18675,16 @@ var require_ucs2length = __commonJS({
18675
18675
  "node_modules/ajv/dist/runtime/ucs2length.js"(exports) {
18676
18676
  "use strict";
18677
18677
  Object.defineProperty(exports, "__esModule", { value: true });
18678
- function ucs2length(str) {
18679
- const len = str.length;
18678
+ function ucs2length(str2) {
18679
+ const len = str2.length;
18680
18680
  let length = 0;
18681
18681
  let pos = 0;
18682
18682
  let value;
18683
18683
  while (pos < len) {
18684
18684
  length++;
18685
- value = str.charCodeAt(pos++);
18685
+ value = str2.charCodeAt(pos++);
18686
18686
  if (value >= 55296 && value <= 56319 && pos < len) {
18687
- value = str.charCodeAt(pos);
18687
+ value = str2.charCodeAt(pos);
18688
18688
  if ((value & 64512) === 56320)
18689
18689
  pos++;
18690
18690
  }
@@ -20600,13 +20600,13 @@ var require_timestamp = __commonJS({
20600
20600
  var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
20601
20601
  var TIME = /^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i;
20602
20602
  var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
20603
- function validTimestamp(str, allowDate) {
20604
- const dt = str.split(DT_SEPARATOR);
20603
+ function validTimestamp(str2, allowDate) {
20604
+ const dt = str2.split(DT_SEPARATOR);
20605
20605
  return dt.length === 2 && validDate(dt[0]) && validTime(dt[1]) || allowDate && dt.length === 1 && validDate(dt[0]);
20606
20606
  }
20607
20607
  exports.default = validTimestamp;
20608
- function validDate(str) {
20609
- const matches = DATE.exec(str);
20608
+ function validDate(str2) {
20609
+ const matches = DATE.exec(str2);
20610
20610
  if (!matches)
20611
20611
  return false;
20612
20612
  const y = +matches[1];
@@ -20615,8 +20615,8 @@ var require_timestamp = __commonJS({
20615
20615
  return m >= 1 && m <= 12 && d >= 1 && (d <= DAYS[m] || // leap year: https://tools.ietf.org/html/rfc3339#appendix-C
20616
20616
  m === 2 && d === 29 && (y % 100 === 0 ? y % 400 === 0 : y % 4 === 0));
20617
20617
  }
20618
- function validTime(str) {
20619
- const matches = TIME.exec(str);
20618
+ function validTime(str2) {
20619
+ const matches = TIME.exec(str2);
20620
20620
  if (!matches)
20621
20621
  return false;
20622
20622
  const hr = +matches[1];
@@ -21679,7 +21679,7 @@ var require_parseJson = __commonJS({
21679
21679
  var CODE_A = "a".charCodeAt(0);
21680
21680
  var CODE_0 = "0".charCodeAt(0);
21681
21681
  function parseJsonString(s, pos) {
21682
- let str = "";
21682
+ let str2 = "";
21683
21683
  let c;
21684
21684
  parseJsonString.message = void 0;
21685
21685
  while (true) {
@@ -21689,7 +21689,7 @@ var require_parseJson = __commonJS({
21689
21689
  if (c === "\\") {
21690
21690
  c = s[pos];
21691
21691
  if (c in escapedChars) {
21692
- str += escapedChars[c];
21692
+ str2 += escapedChars[c];
21693
21693
  pos++;
21694
21694
  } else if (c === "u") {
21695
21695
  pos++;
@@ -21713,7 +21713,7 @@ var require_parseJson = __commonJS({
21713
21713
  }
21714
21714
  pos++;
21715
21715
  }
21716
- str += String.fromCharCode(code);
21716
+ str2 += String.fromCharCode(code);
21717
21717
  } else {
21718
21718
  errorMessage(`unexpected token ${c}`);
21719
21719
  return void 0;
@@ -21723,7 +21723,7 @@ var require_parseJson = __commonJS({
21723
21723
  return void 0;
21724
21724
  } else {
21725
21725
  if (c.charCodeAt(0) >= 32) {
21726
- str += c;
21726
+ str2 += c;
21727
21727
  } else {
21728
21728
  errorMessage(`unexpected token ${c}`);
21729
21729
  return void 0;
@@ -21731,7 +21731,7 @@ var require_parseJson = __commonJS({
21731
21731
  }
21732
21732
  }
21733
21733
  parseJsonString.position = pos;
21734
- return str;
21734
+ return str2;
21735
21735
  function errorMessage(msg) {
21736
21736
  parseJsonString.position = pos;
21737
21737
  parseJsonString.message = msg;
@@ -22305,10 +22305,10 @@ var require_utils2 = __commonJS({
22305
22305
  return { host, isIPV6: false };
22306
22306
  }
22307
22307
  }
22308
- function findToken(str, token) {
22308
+ function findToken(str2, token) {
22309
22309
  let ind = 0;
22310
- for (let i = 0; i < str.length; i++) {
22311
- if (str[i] === token) ind++;
22310
+ for (let i = 0; i < str2.length; i++) {
22311
+ if (str2[i] === token) ind++;
22312
22312
  }
22313
22313
  return ind;
22314
22314
  }
@@ -23208,8 +23208,8 @@ var require_formats = __commonJS({
23208
23208
  }
23209
23209
  var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
23210
23210
  var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
23211
- function date5(str) {
23212
- const matches = DATE.exec(str);
23211
+ function date5(str2) {
23212
+ const matches = DATE.exec(str2);
23213
23213
  if (!matches)
23214
23214
  return false;
23215
23215
  const year = +matches[1];
@@ -23228,8 +23228,8 @@ var require_formats = __commonJS({
23228
23228
  }
23229
23229
  var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
23230
23230
  function getTime(strictTimeZone) {
23231
- return function time3(str) {
23232
- const matches = TIME.exec(str);
23231
+ return function time3(str2) {
23232
+ const matches = TIME.exec(str2);
23233
23233
  if (!matches)
23234
23234
  return false;
23235
23235
  const hr = +matches[1];
@@ -23275,8 +23275,8 @@ var require_formats = __commonJS({
23275
23275
  var DATE_TIME_SEPARATOR = /t|\s/i;
23276
23276
  function getDateTime(strictTimeZone) {
23277
23277
  const time3 = getTime(strictTimeZone);
23278
- return function date_time(str) {
23279
- const dateTime = str.split(DATE_TIME_SEPARATOR);
23278
+ return function date_time(str2) {
23279
+ const dateTime = str2.split(DATE_TIME_SEPARATOR);
23280
23280
  return dateTime.length === 2 && date5(dateTime[0]) && time3(dateTime[1]);
23281
23281
  };
23282
23282
  }
@@ -23301,13 +23301,13 @@ var require_formats = __commonJS({
23301
23301
  }
23302
23302
  var NOT_URI_FRAGMENT = /\/|:/;
23303
23303
  var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
23304
- function uri(str) {
23305
- return NOT_URI_FRAGMENT.test(str) && URI.test(str);
23304
+ function uri(str2) {
23305
+ return NOT_URI_FRAGMENT.test(str2) && URI.test(str2);
23306
23306
  }
23307
23307
  var BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
23308
- function byte(str) {
23308
+ function byte(str2) {
23309
23309
  BYTE.lastIndex = 0;
23310
- return BYTE.test(str);
23310
+ return BYTE.test(str2);
23311
23311
  }
23312
23312
  var MIN_INT32 = -(2 ** 31);
23313
23313
  var MAX_INT32 = 2 ** 31 - 1;
@@ -23321,11 +23321,11 @@ var require_formats = __commonJS({
23321
23321
  return true;
23322
23322
  }
23323
23323
  var Z_ANCHOR = /[^\\]\\Z/;
23324
- function regex(str) {
23325
- if (Z_ANCHOR.test(str))
23324
+ function regex(str2) {
23325
+ if (Z_ANCHOR.test(str2))
23326
23326
  return false;
23327
23327
  try {
23328
- new RegExp(str);
23328
+ new RegExp(str2);
23329
23329
  return true;
23330
23330
  } catch (e) {
23331
23331
  return false;
@@ -24136,10 +24136,10 @@ var require_utils3 = __commonJS({
24136
24136
  return { host, isIPV6: false };
24137
24137
  }
24138
24138
  }
24139
- function findToken(str, token) {
24139
+ function findToken(str2, token) {
24140
24140
  let ind = 0;
24141
- for (let i = 0; i < str.length; i++) {
24142
- if (str[i] === token) ind++;
24141
+ for (let i = 0; i < str2.length; i++) {
24142
+ if (str2[i] === token) ind++;
24143
24143
  }
24144
24144
  return ind;
24145
24145
  }
@@ -28130,9 +28130,9 @@ var require_semver = __commonJS({
28130
28130
  } else {
28131
28131
  this.prerelease = m[4].split(".").map((id) => {
28132
28132
  if (/^[0-9]+$/.test(id)) {
28133
- const num2 = +id;
28134
- if (num2 >= 0 && num2 < MAX_SAFE_INTEGER) {
28135
- return num2;
28133
+ const num3 = +id;
28134
+ if (num3 >= 0 && num3 < MAX_SAFE_INTEGER) {
28135
+ return num3;
28136
28136
  }
28137
28137
  }
28138
28138
  return id;
@@ -28889,7 +28889,7 @@ var require_range = __commonJS({
28889
28889
  range = range.replace(BUILDSTRIPRE, "");
28890
28890
  const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
28891
28891
  const memoKey = memoOpts + ":" + range;
28892
- const cached2 = cache3.get(memoKey);
28892
+ const cached2 = cache4.get(memoKey);
28893
28893
  if (cached2) {
28894
28894
  return cached2;
28895
28895
  }
@@ -28923,7 +28923,7 @@ var require_range = __commonJS({
28923
28923
  rangeMap.delete("");
28924
28924
  }
28925
28925
  const result = [...rangeMap.values()];
28926
- cache3.set(memoKey, result);
28926
+ cache4.set(memoKey, result);
28927
28927
  return result;
28928
28928
  }
28929
28929
  intersects(range, options) {
@@ -28962,7 +28962,7 @@ var require_range = __commonJS({
28962
28962
  };
28963
28963
  module.exports = Range;
28964
28964
  var LRU = require_lrucache();
28965
- var cache3 = new LRU();
28965
+ var cache4 = new LRU();
28966
28966
  var parseOptions = require_parse_options();
28967
28967
  var Comparator = require_comparator();
28968
28968
  var debug = require_debug2();
@@ -29912,12 +29912,12 @@ var require_plugin_utils = __commonJS({
29912
29912
  if (display) {
29913
29913
  return display;
29914
29914
  }
29915
- const cache3 = __require.cache;
29916
- if (cache3) {
29917
- const keys = Object.keys(cache3);
29915
+ const cache4 = __require.cache;
29916
+ if (cache4) {
29917
+ const keys = Object.keys(cache4);
29918
29918
  for (let i = 0; i < keys.length; i++) {
29919
29919
  const key = keys[i];
29920
- if (cache3[key].exports === func) {
29920
+ if (cache4[key].exports === func) {
29921
29921
  return key;
29922
29922
  }
29923
29923
  }
@@ -30749,24 +30749,24 @@ var require_querystring = __commonJS({
30749
30749
  0
30750
30750
  // 112 - 127
30751
30751
  ]);
30752
- function encodeString(str) {
30753
- const len = str.length;
30752
+ function encodeString(str2) {
30753
+ const len = str2.length;
30754
30754
  if (len === 0) return "";
30755
30755
  let out = "";
30756
30756
  let lastPos = 0;
30757
30757
  let i = 0;
30758
30758
  outer: for (; i < len; i++) {
30759
- let c = str.charCodeAt(i);
30759
+ let c = str2.charCodeAt(i);
30760
30760
  while (c < 128) {
30761
30761
  if (noEscape[c] !== 1) {
30762
- if (lastPos < i) out += str.slice(lastPos, i);
30762
+ if (lastPos < i) out += str2.slice(lastPos, i);
30763
30763
  lastPos = i + 1;
30764
30764
  out += hexTable[c];
30765
30765
  }
30766
30766
  if (++i === len) break outer;
30767
- c = str.charCodeAt(i);
30767
+ c = str2.charCodeAt(i);
30768
30768
  }
30769
- if (lastPos < i) out += str.slice(lastPos, i);
30769
+ if (lastPos < i) out += str2.slice(lastPos, i);
30770
30770
  if (c < 2048) {
30771
30771
  lastPos = i + 1;
30772
30772
  out += hexTable[192 | c >> 6] + hexTable[128 | c & 63];
@@ -30781,13 +30781,13 @@ var require_querystring = __commonJS({
30781
30781
  if (i >= len) {
30782
30782
  throw new Error("URI malformed");
30783
30783
  }
30784
- const c2 = str.charCodeAt(i) & 1023;
30784
+ const c2 = str2.charCodeAt(i) & 1023;
30785
30785
  lastPos = i + 1;
30786
30786
  c = 65536 + ((c & 1023) << 10 | c2);
30787
30787
  out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
30788
30788
  }
30789
- if (lastPos === 0) return str;
30790
- if (lastPos < len) return out + str.slice(lastPos);
30789
+ if (lastPos === 0) return str2;
30790
+ if (lastPos < len) return out + str2.slice(lastPos);
30791
30791
  return out;
30792
30792
  }
30793
30793
  module.exports = { encodeString };
@@ -31003,9 +31003,9 @@ var require_util2 = __commonJS({
31003
31003
  var types_1 = require_types4();
31004
31004
  var sets = __importStar(require_sets());
31005
31005
  var CTRL = "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?";
31006
- exports.strToChars = (str) => {
31006
+ exports.strToChars = (str2) => {
31007
31007
  const charsRegex = /(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;
31008
- return str.replace(charsRegex, (s, b, lbs, a16, b16, dctrl, eslsh) => {
31008
+ return str2.replace(charsRegex, (s, b, lbs, a16, b16, dctrl, eslsh) => {
31009
31009
  if (lbs) {
31010
31010
  return s;
31011
31011
  }
@@ -31021,20 +31021,20 @@ var require_util2 = __commonJS({
31021
31021
  return /[[\]{}^$.|?*+()]/.test(c) ? `\\${c}` : c;
31022
31022
  });
31023
31023
  };
31024
- exports.tokenizeClass = (str, regexpStr) => {
31024
+ exports.tokenizeClass = (str2, regexpStr) => {
31025
31025
  var _a3, _b, _c, _d, _e, _f, _g;
31026
- let tokens = [], rs, c;
31026
+ let tokens2 = [], rs, c;
31027
31027
  const regexp = /\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(((?:\\)])|(((?:\\)?([^\]])))))|(\])|(?:\\)?([^])/g;
31028
- while ((rs = regexp.exec(str)) !== null) {
31028
+ while ((rs = regexp.exec(str2)) !== null) {
31029
31029
  const p = (_g = (_f = (_e = (_d = (_c = (_b = (_a3 = rs[1] && sets.words()) !== null && _a3 !== void 0 ? _a3 : rs[2] && sets.ints()) !== null && _b !== void 0 ? _b : rs[3] && sets.whitespace()) !== null && _c !== void 0 ? _c : rs[4] && sets.notWords()) !== null && _d !== void 0 ? _d : rs[5] && sets.notInts()) !== null && _e !== void 0 ? _e : rs[6] && sets.notWhitespace()) !== null && _f !== void 0 ? _f : rs[7] && {
31030
31030
  type: types_1.types.RANGE,
31031
31031
  from: (rs[8] || rs[9]).charCodeAt(0),
31032
31032
  to: (c = rs[10]).charCodeAt(c.length - 1)
31033
31033
  }) !== null && _g !== void 0 ? _g : (c = rs[16]) && { type: types_1.types.CHAR, value: c.charCodeAt(0) };
31034
31034
  if (p) {
31035
- tokens.push(p);
31035
+ tokens2.push(p);
31036
31036
  } else {
31037
- return [tokens, regexp.lastIndex];
31037
+ return [tokens2, regexp.lastIndex];
31038
31038
  }
31039
31039
  }
31040
31040
  throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Unterminated character class`);
@@ -31088,15 +31088,15 @@ var require_tokenizer = __commonJS({
31088
31088
  const repeatErr = (col) => {
31089
31089
  throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Nothing to repeat at column ${col - 1}`);
31090
31090
  };
31091
- let str = util.strToChars(regexpStr);
31092
- while (i < str.length) {
31093
- switch (c = str[i++]) {
31091
+ let str2 = util.strToChars(regexpStr);
31092
+ while (i < str2.length) {
31093
+ switch (c = str2[i++]) {
31094
31094
  // Handle escaped characters, inclues a few sets.
31095
31095
  case "\\":
31096
- if (i === str.length) {
31096
+ if (i === str2.length) {
31097
31097
  throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: \\ at end of pattern`);
31098
31098
  }
31099
- switch (c = str[i++]) {
31099
+ switch (c = str2[i++]) {
31100
31100
  case "b":
31101
31101
  last.push({ type: types_1.types.POSITION, value: "b" });
31102
31102
  break;
@@ -31124,8 +31124,8 @@ var require_tokenizer = __commonJS({
31124
31124
  default:
31125
31125
  if (digit.test(c)) {
31126
31126
  let digits = c;
31127
- while (i < str.length && digit.test(str[i])) {
31128
- digits += str[i++];
31127
+ while (i < str2.length && digit.test(str2[i])) {
31128
+ digits += str2[i++];
31129
31129
  }
31130
31130
  let value = parseInt(digits, 10);
31131
31131
  const reference = { type: types_1.types.REFERENCE, value };
@@ -31146,13 +31146,13 @@ var require_tokenizer = __commonJS({
31146
31146
  // Handle custom sets.
31147
31147
  case "[": {
31148
31148
  let not;
31149
- if (str[i] === "^") {
31149
+ if (str2[i] === "^") {
31150
31150
  not = true;
31151
31151
  i++;
31152
31152
  } else {
31153
31153
  not = false;
31154
31154
  }
31155
- let classTokens = util.tokenizeClass(str.slice(i), regexpStr);
31155
+ let classTokens = util.tokenizeClass(str2.slice(i), regexpStr);
31156
31156
  i += classTokens[1];
31157
31157
  last.push({
31158
31158
  type: types_1.types.SET,
@@ -31172,8 +31172,8 @@ var require_tokenizer = __commonJS({
31172
31172
  stack: [],
31173
31173
  remember: true
31174
31174
  };
31175
- if (str[i] === "?") {
31176
- c = str[i + 1];
31175
+ if (str2[i] === "?") {
31176
+ c = str2[i + 1];
31177
31177
  i += 2;
31178
31178
  if (c === "=") {
31179
31179
  group.followedBy = true;
@@ -31183,21 +31183,21 @@ var require_tokenizer = __commonJS({
31183
31183
  group.remember = false;
31184
31184
  } else if (c === "<") {
31185
31185
  let name = "";
31186
- if (captureGroupFirstChar.test(str[i])) {
31187
- name += str[i];
31186
+ if (captureGroupFirstChar.test(str2[i])) {
31187
+ name += str2[i];
31188
31188
  i++;
31189
31189
  } else {
31190
- throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Invalid capture group name, character '${str[i]}' after '<' at column ${i + 1}`);
31190
+ throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Invalid capture group name, character '${str2[i]}' after '<' at column ${i + 1}`);
31191
31191
  }
31192
- while (i < str.length && captureGroupChars.test(str[i])) {
31193
- name += str[i];
31192
+ while (i < str2.length && captureGroupChars.test(str2[i])) {
31193
+ name += str2[i];
31194
31194
  i++;
31195
31195
  }
31196
31196
  if (!name) {
31197
- throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Invalid capture group name, character '${str[i]}' after '<' at column ${i + 1}`);
31197
+ throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Invalid capture group name, character '${str2[i]}' after '<' at column ${i + 1}`);
31198
31198
  }
31199
- if (str[i] !== ">") {
31200
- throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Unclosed capture group name, expected '>', found '${str[i]}' at column ${i + 1}`);
31199
+ if (str2[i] !== ">") {
31200
+ throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Unclosed capture group name, expected '>', found '${str2[i]}' at column ${i + 1}`);
31201
31201
  }
31202
31202
  group.name = name;
31203
31203
  i++;
@@ -31240,7 +31240,7 @@ var require_tokenizer = __commonJS({
31240
31240
  // This design is chosen because there could be more than
31241
31241
  // one repetition symbols in a regex i.e. `a?+{2,3}`.
31242
31242
  case "{": {
31243
- let rs = /^(\d+)(,(\d+)?)?\}/.exec(str.slice(i)), min, max;
31243
+ let rs = /^(\d+)(,(\d+)?)?\}/.exec(str2.slice(i)), min, max;
31244
31244
  if (rs !== null) {
31245
31245
  if (last.length === 0) {
31246
31246
  repeatErr(i);
@@ -31374,10 +31374,10 @@ var require_sets_lookup = __commonJS({
31374
31374
  exports.NOTANYCHAR = exports.WHITESPACE = exports.WORDS = exports.INTS = void 0;
31375
31375
  var Sets = __importStar(require_sets());
31376
31376
  var types_1 = require_types4();
31377
- function setToLookup(tokens) {
31377
+ function setToLookup(tokens2) {
31378
31378
  let lookup = {};
31379
31379
  let len = 0;
31380
- for (const token of tokens) {
31380
+ for (const token of tokens2) {
31381
31381
  if (token.type === types_1.types.CHAR) {
31382
31382
  lookup[token.value] = true;
31383
31383
  }
@@ -31669,12 +31669,12 @@ var require_pretty_print = __commonJS({
31669
31669
  var deepEqual = require_fast_deep_equal();
31670
31670
  var httpMethodStrategy = require_http_method();
31671
31671
  var treeDataSymbol = Symbol("treeData");
31672
- function printObjectTree(obj, parentPrefix = "") {
31672
+ function printObjectTree(obj2, parentPrefix = "") {
31673
31673
  let tree = "";
31674
- const keys = Object.keys(obj);
31674
+ const keys = Object.keys(obj2);
31675
31675
  for (let i = 0; i < keys.length; i++) {
31676
31676
  const key = keys[i];
31677
- const value = obj[key];
31677
+ const value = obj2[key];
31678
31678
  const isLast = i === keys.length - 1;
31679
31679
  const nodePrefix = isLast ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 ";
31680
31680
  const childPrefix = isLast ? " " : "\u2502 ";
@@ -34146,29 +34146,29 @@ var require_dist4 = __commonJS({
34146
34146
  C.prototype = /* @__PURE__ */ Object.create(null);
34147
34147
  return C;
34148
34148
  })();
34149
- function parseCookie(str, options) {
34150
- const obj = new NullObject();
34151
- const len = str.length;
34149
+ function parseCookie(str2, options) {
34150
+ const obj2 = new NullObject();
34151
+ const len = str2.length;
34152
34152
  if (len < 2)
34153
- return obj;
34153
+ return obj2;
34154
34154
  const dec = options?.decode || decode3;
34155
34155
  let index = 0;
34156
34156
  do {
34157
- const eqIdx = eqIndex(str, index, len);
34157
+ const eqIdx = eqIndex(str2, index, len);
34158
34158
  if (eqIdx === -1)
34159
34159
  break;
34160
- const endIdx = endIndex(str, index, len);
34160
+ const endIdx = endIndex(str2, index, len);
34161
34161
  if (eqIdx > endIdx) {
34162
- index = str.lastIndexOf(";", eqIdx - 1) + 1;
34162
+ index = str2.lastIndexOf(";", eqIdx - 1) + 1;
34163
34163
  continue;
34164
34164
  }
34165
- const key = valueSlice(str, index, eqIdx);
34166
- if (obj[key] === void 0) {
34167
- obj[key] = dec(valueSlice(str, eqIdx + 1, endIdx));
34165
+ const key = valueSlice(str2, index, eqIdx);
34166
+ if (obj2[key] === void 0) {
34167
+ obj2[key] = dec(valueSlice(str2, eqIdx + 1, endIdx));
34168
34168
  }
34169
34169
  index = endIdx + 1;
34170
34170
  } while (index < len);
34171
- return obj;
34171
+ return obj2;
34172
34172
  }
34173
34173
  function stringifyCookie(cookie, options) {
34174
34174
  const enc = options?.encode || encodeURIComponent;
@@ -34199,51 +34199,51 @@ var require_dist4 = __commonJS({
34199
34199
  if (!cookieValueRegExp.test(value)) {
34200
34200
  throw new TypeError(`argument val is invalid: ${cookie.value}`);
34201
34201
  }
34202
- let str = cookie.name + "=" + value;
34202
+ let str2 = cookie.name + "=" + value;
34203
34203
  if (cookie.maxAge !== void 0) {
34204
34204
  if (!Number.isInteger(cookie.maxAge)) {
34205
34205
  throw new TypeError(`option maxAge is invalid: ${cookie.maxAge}`);
34206
34206
  }
34207
- str += "; Max-Age=" + cookie.maxAge;
34207
+ str2 += "; Max-Age=" + cookie.maxAge;
34208
34208
  }
34209
34209
  if (cookie.domain) {
34210
34210
  if (!domainValueRegExp.test(cookie.domain)) {
34211
34211
  throw new TypeError(`option domain is invalid: ${cookie.domain}`);
34212
34212
  }
34213
- str += "; Domain=" + cookie.domain;
34213
+ str2 += "; Domain=" + cookie.domain;
34214
34214
  }
34215
34215
  if (cookie.path) {
34216
34216
  if (!pathValueRegExp.test(cookie.path)) {
34217
34217
  throw new TypeError(`option path is invalid: ${cookie.path}`);
34218
34218
  }
34219
- str += "; Path=" + cookie.path;
34219
+ str2 += "; Path=" + cookie.path;
34220
34220
  }
34221
34221
  if (cookie.expires) {
34222
34222
  if (!isDate(cookie.expires) || !Number.isFinite(cookie.expires.valueOf())) {
34223
34223
  throw new TypeError(`option expires is invalid: ${cookie.expires}`);
34224
34224
  }
34225
- str += "; Expires=" + cookie.expires.toUTCString();
34225
+ str2 += "; Expires=" + cookie.expires.toUTCString();
34226
34226
  }
34227
34227
  if (cookie.httpOnly) {
34228
- str += "; HttpOnly";
34228
+ str2 += "; HttpOnly";
34229
34229
  }
34230
34230
  if (cookie.secure) {
34231
- str += "; Secure";
34231
+ str2 += "; Secure";
34232
34232
  }
34233
34233
  if (cookie.partitioned) {
34234
- str += "; Partitioned";
34234
+ str2 += "; Partitioned";
34235
34235
  }
34236
34236
  if (cookie.priority) {
34237
34237
  const priority = typeof cookie.priority === "string" ? cookie.priority.toLowerCase() : void 0;
34238
34238
  switch (priority) {
34239
34239
  case "low":
34240
- str += "; Priority=Low";
34240
+ str2 += "; Priority=Low";
34241
34241
  break;
34242
34242
  case "medium":
34243
- str += "; Priority=Medium";
34243
+ str2 += "; Priority=Medium";
34244
34244
  break;
34245
34245
  case "high":
34246
- str += "; Priority=High";
34246
+ str2 += "; Priority=High";
34247
34247
  break;
34248
34248
  default:
34249
34249
  throw new TypeError(`option priority is invalid: ${cookie.priority}`);
@@ -34254,35 +34254,35 @@ var require_dist4 = __commonJS({
34254
34254
  switch (sameSite) {
34255
34255
  case true:
34256
34256
  case "strict":
34257
- str += "; SameSite=Strict";
34257
+ str2 += "; SameSite=Strict";
34258
34258
  break;
34259
34259
  case "lax":
34260
- str += "; SameSite=Lax";
34260
+ str2 += "; SameSite=Lax";
34261
34261
  break;
34262
34262
  case "none":
34263
- str += "; SameSite=None";
34263
+ str2 += "; SameSite=None";
34264
34264
  break;
34265
34265
  default:
34266
34266
  throw new TypeError(`option sameSite is invalid: ${cookie.sameSite}`);
34267
34267
  }
34268
34268
  }
34269
- return str;
34269
+ return str2;
34270
34270
  }
34271
- function parseSetCookie(str, options) {
34271
+ function parseSetCookie(str2, options) {
34272
34272
  const dec = options?.decode || decode3;
34273
- const len = str.length;
34274
- const endIdx = endIndex(str, 0, len);
34275
- const eqIdx = eqIndex(str, 0, endIdx);
34276
- const setCookie = eqIdx === -1 ? { name: "", value: dec(valueSlice(str, 0, endIdx)) } : {
34277
- name: valueSlice(str, 0, eqIdx),
34278
- value: dec(valueSlice(str, eqIdx + 1, endIdx))
34273
+ const len = str2.length;
34274
+ const endIdx = endIndex(str2, 0, len);
34275
+ const eqIdx = eqIndex(str2, 0, endIdx);
34276
+ const setCookie = eqIdx === -1 ? { name: "", value: dec(valueSlice(str2, 0, endIdx)) } : {
34277
+ name: valueSlice(str2, 0, eqIdx),
34278
+ value: dec(valueSlice(str2, eqIdx + 1, endIdx))
34279
34279
  };
34280
34280
  let index = endIdx + 1;
34281
34281
  while (index < len) {
34282
- const endIdx2 = endIndex(str, index, len);
34283
- const eqIdx2 = eqIndex(str, index, endIdx2);
34284
- const attr = eqIdx2 === -1 ? valueSlice(str, index, endIdx2) : valueSlice(str, index, eqIdx2);
34285
- const val = eqIdx2 === -1 ? void 0 : valueSlice(str, eqIdx2 + 1, endIdx2);
34282
+ const endIdx2 = endIndex(str2, index, len);
34283
+ const eqIdx2 = eqIndex(str2, index, endIdx2);
34284
+ const attr = eqIdx2 === -1 ? valueSlice(str2, index, endIdx2) : valueSlice(str2, index, eqIdx2);
34285
+ const val = eqIdx2 === -1 ? void 0 : valueSlice(str2, eqIdx2 + 1, endIdx2);
34286
34286
  switch (attr.toLowerCase()) {
34287
34287
  case "httponly":
34288
34288
  setCookie.httpOnly = true;
@@ -34331,37 +34331,37 @@ var require_dist4 = __commonJS({
34331
34331
  }
34332
34332
  return setCookie;
34333
34333
  }
34334
- function endIndex(str, min, len) {
34335
- const index = str.indexOf(";", min);
34334
+ function endIndex(str2, min, len) {
34335
+ const index = str2.indexOf(";", min);
34336
34336
  return index === -1 ? len : index;
34337
34337
  }
34338
- function eqIndex(str, min, max) {
34339
- const index = str.indexOf("=", min);
34338
+ function eqIndex(str2, min, max) {
34339
+ const index = str2.indexOf("=", min);
34340
34340
  return index < max ? index : -1;
34341
34341
  }
34342
- function valueSlice(str, min, max) {
34342
+ function valueSlice(str2, min, max) {
34343
34343
  let start = min;
34344
34344
  let end = max;
34345
34345
  do {
34346
- const code = str.charCodeAt(start);
34346
+ const code = str2.charCodeAt(start);
34347
34347
  if (code !== 32 && code !== 9)
34348
34348
  break;
34349
34349
  } while (++start < end);
34350
34350
  while (end > start) {
34351
- const code = str.charCodeAt(end - 1);
34351
+ const code = str2.charCodeAt(end - 1);
34352
34352
  if (code !== 32 && code !== 9)
34353
34353
  break;
34354
34354
  end--;
34355
34355
  }
34356
- return str.slice(start, end);
34356
+ return str2.slice(start, end);
34357
34357
  }
34358
- function decode3(str) {
34359
- if (str.indexOf("%") === -1)
34360
- return str;
34358
+ function decode3(str2) {
34359
+ if (str2.indexOf("%") === -1)
34360
+ return str2;
34361
34361
  try {
34362
- return decodeURIComponent(str);
34362
+ return decodeURIComponent(str2);
34363
34363
  } catch (e) {
34364
- return str;
34364
+ return str2;
34365
34365
  }
34366
34366
  }
34367
34367
  function isDate(val) {
@@ -34481,7 +34481,7 @@ var require_form_data = __commonJS({
34481
34481
  const boundary = `----formdata-${randomUUID2()}`;
34482
34482
  const prefix = `--${boundary}\r
34483
34483
  Content-Disposition: form-data`;
34484
- const escape2 = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22");
34484
+ const escape2 = (str2) => str2.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22");
34485
34485
  const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n");
34486
34486
  const linebreak = new Uint8Array([13, 10]);
34487
34487
  async function* asyncIterator() {
@@ -34549,12 +34549,12 @@ var require_request2 = __commonJS({
34549
34549
  };
34550
34550
  function CustomRequest(options) {
34551
34551
  return new _CustomLMRRequest(this);
34552
- function _CustomLMRRequest(obj) {
34553
- Request.call(obj, {
34552
+ function _CustomLMRRequest(obj2) {
34553
+ Request.call(obj2, {
34554
34554
  ...options,
34555
34555
  Request: void 0
34556
34556
  });
34557
- Object.assign(this, obj);
34557
+ Object.assign(this, obj2);
34558
34558
  for (const fn of Object.keys(Request.prototype)) {
34559
34559
  this.constructor.prototype[fn] = Request.prototype[fn];
34560
34560
  }
@@ -34727,8 +34727,8 @@ var require_set_cookie = __commonJS({
34727
34727
  function createNullObj() {
34728
34728
  return /* @__PURE__ */ Object.create(null);
34729
34729
  }
34730
- function isNonEmptyString(str) {
34731
- return typeof str === "string" && !!str.trim();
34730
+ function isNonEmptyString(str2) {
34731
+ return typeof str2 === "string" && !!str2.trim();
34732
34732
  }
34733
34733
  function parseString(setCookieValue, options) {
34734
34734
  var parts = setCookieValue.split(";").filter(isNonEmptyString);
@@ -34819,13 +34819,13 @@ var require_set_cookie = __commonJS({
34819
34819
  input = [input];
34820
34820
  }
34821
34821
  if (!options.map) {
34822
- return input.filter(isNonEmptyString).map(function(str) {
34823
- return parseString(str, options);
34822
+ return input.filter(isNonEmptyString).map(function(str2) {
34823
+ return parseString(str2, options);
34824
34824
  }).filter(Boolean);
34825
34825
  } else {
34826
34826
  var cookies = createNullObj();
34827
- return input.filter(isNonEmptyString).reduce(function(cookies2, str) {
34828
- var cookie = parseString(str, options);
34827
+ return input.filter(isNonEmptyString).reduce(function(cookies2, str2) {
34828
+ var cookie = parseString(str2, options);
34829
34829
  if (cookie && !isForbiddenKey(cookie.name)) {
34830
34830
  cookies2[cookie.name] = cookie;
34831
34831
  }
@@ -36066,8 +36066,8 @@ var require_light_my_request = __commonJS({
36066
36066
  return this._promise[method](...args);
36067
36067
  };
36068
36068
  });
36069
- function isInjection(obj) {
36070
- return obj instanceof Request || obj instanceof Response || obj?.constructor?.name === "_CustomLMRRequest";
36069
+ function isInjection(obj2) {
36070
+ return obj2 instanceof Request || obj2 instanceof Response || obj2?.constructor?.name === "_CustomLMRRequest";
36071
36071
  }
36072
36072
  module.exports = inject;
36073
36073
  module.exports.default = inject;
@@ -37669,26 +37669,26 @@ var require_permessage_deflate = __commonJS({
37669
37669
  value = value[0];
37670
37670
  if (key === "client_max_window_bits") {
37671
37671
  if (value !== true) {
37672
- const num2 = +value;
37673
- if (!Number.isInteger(num2) || num2 < 8 || num2 > 15) {
37672
+ const num3 = +value;
37673
+ if (!Number.isInteger(num3) || num3 < 8 || num3 > 15) {
37674
37674
  throw new TypeError(
37675
37675
  `Invalid value for parameter "${key}": ${value}`
37676
37676
  );
37677
37677
  }
37678
- value = num2;
37678
+ value = num3;
37679
37679
  } else if (!this._isServer) {
37680
37680
  throw new TypeError(
37681
37681
  `Invalid value for parameter "${key}": ${value}`
37682
37682
  );
37683
37683
  }
37684
37684
  } else if (key === "server_max_window_bits") {
37685
- const num2 = +value;
37686
- if (!Number.isInteger(num2) || num2 < 8 || num2 > 15) {
37685
+ const num3 = +value;
37686
+ if (!Number.isInteger(num3) || num3 < 8 || num3 > 15) {
37687
37687
  throw new TypeError(
37688
37688
  `Invalid value for parameter "${key}": ${value}`
37689
37689
  );
37690
37690
  }
37691
- value = num2;
37691
+ value = num3;
37692
37692
  } else if (key === "client_no_context_takeover" || key === "server_no_context_takeover") {
37693
37693
  if (value !== true) {
37694
37694
  throw new TypeError(
@@ -38402,8 +38402,8 @@ var require_receiver = __commonJS({
38402
38402
  return;
38403
38403
  }
38404
38404
  const buf = this.consume(8);
38405
- const num2 = buf.readUInt32BE(0);
38406
- if (num2 > Math.pow(2, 53 - 32) - 1) {
38405
+ const num3 = buf.readUInt32BE(0);
38406
+ if (num3 > Math.pow(2, 53 - 32) - 1) {
38407
38407
  const error51 = this.createError(
38408
38408
  RangeError,
38409
38409
  "Unsupported WebSocket frame: payload length > 2^53 - 1",
@@ -38414,7 +38414,7 @@ var require_receiver = __commonJS({
38414
38414
  cb(error51);
38415
38415
  return;
38416
38416
  }
38417
- this._payloadLength = num2 * Math.pow(2, 32) + buf.readUInt32BE(4);
38417
+ this._payloadLength = num3 * Math.pow(2, 32) + buf.readUInt32BE(4);
38418
38418
  this.haveLength(cb);
38419
38419
  }
38420
38420
  /**
@@ -41608,8 +41608,8 @@ var byteToHex = [];
41608
41608
  for (let i = 0; i < 256; ++i) {
41609
41609
  byteToHex.push((i + 256).toString(16).slice(1));
41610
41610
  }
41611
- function unsafeStringify(arr, offset = 0) {
41612
- 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();
41611
+ function unsafeStringify(arr2, offset = 0) {
41612
+ return (byteToHex[arr2[offset + 0]] + byteToHex[arr2[offset + 1]] + byteToHex[arr2[offset + 2]] + byteToHex[arr2[offset + 3]] + "-" + byteToHex[arr2[offset + 4]] + byteToHex[arr2[offset + 5]] + "-" + byteToHex[arr2[offset + 6]] + byteToHex[arr2[offset + 7]] + "-" + byteToHex[arr2[offset + 8]] + byteToHex[arr2[offset + 9]] + "-" + byteToHex[arr2[offset + 10]] + byteToHex[arr2[offset + 11]] + byteToHex[arr2[offset + 12]] + byteToHex[arr2[offset + 13]] + byteToHex[arr2[offset + 14]] + byteToHex[arr2[offset + 15]]).toLowerCase();
41613
41613
  }
41614
41614
 
41615
41615
  // node_modules/uuid/dist/esm/rng.js
@@ -99558,8 +99558,8 @@ function saveAppFile(appId, upload) {
99558
99558
  function appFileRefId(appId, ref) {
99559
99559
  let value = ref;
99560
99560
  if (value && typeof value === "object") {
99561
- const obj = value;
99562
- value = typeof obj.id === "string" ? obj.id : obj.url;
99561
+ const obj2 = value;
99562
+ value = typeof obj2.id === "string" ? obj2.id : obj2.url;
99563
99563
  }
99564
99564
  if (typeof value !== "string") return null;
99565
99565
  const s = value.trim();
@@ -101200,10 +101200,169 @@ async function registerSidecarRoutes(fastify) {
101200
101200
  );
101201
101201
  }
101202
101202
 
101203
- // src/usage/usage-service.ts
101204
- import { readdirSync as readdirSync2, readFileSync as readFileSync2 } from "node:fs";
101203
+ // src/usage/usage-report.ts
101204
+ import { readdirSync as readdirSync2, readFileSync as readFileSync3 } from "node:fs";
101205
+ import { homedir as homedir5 } from "node:os";
101206
+ import { join as join4 } from "node:path";
101207
+
101208
+ // src/usage/ccusage.ts
101209
+ import { spawn as spawn3 } from "node:child_process";
101210
+ import { readFileSync as readFileSync2 } from "node:fs";
101211
+ import { createRequire as createNodeRequire2 } from "node:module";
101205
101212
  import { homedir as homedir4 } from "node:os";
101206
- import { join as join3 } from "node:path";
101213
+ import { dirname as dirname2, join as join3 } from "node:path";
101214
+ var RUN_TIMEOUT_MS = 18e4;
101215
+ var MAX_OUTPUT_BYTES = 256 * 1024 * 1024;
101216
+ var nodeRequire2 = createNodeRequire2(import.meta.url);
101217
+ function ccusagePackage() {
101218
+ try {
101219
+ const pkgPath = nodeRequire2.resolve("ccusage/package.json");
101220
+ const pkg = JSON.parse(readFileSync2(pkgPath, "utf8"));
101221
+ const bin = typeof pkg.bin === "string" ? pkg.bin : pkg.bin?.ccusage ?? "src/cli.js";
101222
+ return { dir: dirname2(pkgPath), version: pkg.version ?? "unknown", bin };
101223
+ } catch {
101224
+ return null;
101225
+ }
101226
+ }
101227
+ function ccusageVersion() {
101228
+ if (process.env.AGENT_PANE_CCUSAGE_BIN) return "test";
101229
+ return ccusagePackage()?.version ?? null;
101230
+ }
101231
+ function ccusageCommand() {
101232
+ const override = process.env.AGENT_PANE_CCUSAGE_BIN;
101233
+ if (override) return { command: override, args: [] };
101234
+ const pkg = ccusagePackage();
101235
+ if (!pkg) throw new Error('ccusage is not installed (npm package "ccusage")');
101236
+ return { command: process.execPath, args: [join3(pkg.dir, pkg.bin)] };
101237
+ }
101238
+ function runCcusage(args) {
101239
+ const { command, args: prefix } = ccusageCommand();
101240
+ return new Promise((resolve, reject) => {
101241
+ const child = spawn3(command, [...prefix, ...args], {
101242
+ cwd: homedir4(),
101243
+ env: { ...process.env, NO_COLOR: "1" },
101244
+ stdio: ["ignore", "pipe", "pipe"]
101245
+ });
101246
+ const chunks = [];
101247
+ let size2 = 0;
101248
+ let stderr = "";
101249
+ let failure = null;
101250
+ const stop = (reason) => {
101251
+ failure ??= reason;
101252
+ child.kill("SIGTERM");
101253
+ };
101254
+ const timer2 = setTimeout(() => stop(`ccusage did not finish in ${RUN_TIMEOUT_MS / 1e3}s`), RUN_TIMEOUT_MS);
101255
+ child.stdout.on("data", (chunk) => {
101256
+ size2 += chunk.length;
101257
+ if (size2 > MAX_OUTPUT_BYTES) stop("ccusage output is too large");
101258
+ else chunks.push(chunk);
101259
+ });
101260
+ child.stderr.on("data", (chunk) => {
101261
+ if (stderr.length < 16384) stderr += chunk.toString("utf8");
101262
+ });
101263
+ child.on("error", (err) => {
101264
+ clearTimeout(timer2);
101265
+ reject(new Error(`ccusage could not start: ${err.message}`));
101266
+ });
101267
+ child.on("close", (code, signal) => {
101268
+ clearTimeout(timer2);
101269
+ if (failure) return reject(new Error(failure));
101270
+ if (code !== 0) {
101271
+ const detail = stderr.trim().split("\n").slice(-3).join(" ").slice(0, 500);
101272
+ return reject(new Error(`ccusage exited with ${code ?? signal}${detail ? `: ${detail}` : ""}`));
101273
+ }
101274
+ resolve(Buffer.concat(chunks).toString("utf8"));
101275
+ });
101276
+ });
101277
+ }
101278
+ var num = (v) => typeof v === "number" && Number.isFinite(v) ? v : 0;
101279
+ var str = (v) => typeof v === "string" && v !== "" ? v : null;
101280
+ var arr = (v) => Array.isArray(v) ? v : [];
101281
+ var obj = (v) => v && typeof v === "object" && !Array.isArray(v) ? v : {};
101282
+ function parseBreakdown(raw) {
101283
+ const b = obj(raw);
101284
+ const modelName = str(b.modelName);
101285
+ if (!modelName) return null;
101286
+ return {
101287
+ modelName,
101288
+ inputTokens: num(b.inputTokens),
101289
+ outputTokens: num(b.outputTokens),
101290
+ cacheCreationTokens: num(b.cacheCreationTokens),
101291
+ cacheReadTokens: num(b.cacheReadTokens),
101292
+ cost: num(b.cost)
101293
+ };
101294
+ }
101295
+ function parseAgentRow(raw, agent) {
101296
+ const input = num(raw.inputTokens);
101297
+ const output = num(raw.outputTokens);
101298
+ const create = num(raw.cacheCreationTokens);
101299
+ const read = num(raw.cacheReadTokens);
101300
+ return {
101301
+ agent,
101302
+ inputTokens: input,
101303
+ outputTokens: output,
101304
+ cacheCreationTokens: create,
101305
+ cacheReadTokens: read,
101306
+ totalTokens: typeof raw.totalTokens === "number" ? num(raw.totalTokens) : input + output + create + read,
101307
+ totalCost: num(raw.totalCost),
101308
+ modelBreakdowns: arr(raw.modelBreakdowns).map(parseBreakdown).filter((b) => b !== null)
101309
+ };
101310
+ }
101311
+ function parseRow(raw) {
101312
+ const r = obj(raw);
101313
+ const period = str(r.period);
101314
+ if (!period) return null;
101315
+ const metadata = obj(r.metadata);
101316
+ const metaAgents = arr(metadata.agents).filter((a) => typeof a === "string");
101317
+ const ownAgent = str(r.agent) && r.agent !== "all" ? r.agent : metaAgents[0] ?? "unknown";
101318
+ const row = parseAgentRow(r, ownAgent);
101319
+ const agents = arr(r.agents).map((a) => obj(a)).filter((a) => str(a.agent)).map((a) => parseAgentRow(a, a.agent));
101320
+ return {
101321
+ ...row,
101322
+ period,
101323
+ agents: agents.length > 0 ? agents : [row],
101324
+ lastActivity: str(metadata.lastActivity)
101325
+ };
101326
+ }
101327
+ function parseCcusageJson(text2) {
101328
+ let parsed;
101329
+ try {
101330
+ parsed = JSON.parse(text2);
101331
+ } catch {
101332
+ throw new Error("ccusage printed no valid JSON");
101333
+ }
101334
+ const root = obj(parsed);
101335
+ const rows = (v) => arr(v).map(parseRow).filter((r) => r !== null);
101336
+ return { daily: rows(root.daily), session: rows(root.session) };
101337
+ }
101338
+ async function loadFresh(timezone) {
101339
+ const stdout = await runCcusage([
101340
+ "daily",
101341
+ "--json",
101342
+ "--by-agent",
101343
+ "--sections",
101344
+ "daily,session",
101345
+ "--timezone",
101346
+ timezone
101347
+ ]);
101348
+ return { data: parseCcusageJson(stdout), generatedAt: Date.now() };
101349
+ }
101350
+ var cache2 = /* @__PURE__ */ new Map();
101351
+ var inflight = /* @__PURE__ */ new Map();
101352
+ function loadCcusage(timezone, fresh) {
101353
+ const cached2 = cache2.get(timezone);
101354
+ if (cached2 && !fresh) return Promise.resolve(cached2);
101355
+ let run = inflight.get(timezone);
101356
+ if (!run) {
101357
+ run = loadFresh(timezone).then((result) => {
101358
+ if (cache2.size >= 4) cache2.clear();
101359
+ cache2.set(timezone, result);
101360
+ return result;
101361
+ }).finally(() => inflight.delete(timezone));
101362
+ inflight.set(timezone, run);
101363
+ }
101364
+ return run;
101365
+ }
101207
101366
 
101208
101367
  // src/usage/usage-pricing.ts
101209
101368
  var PRICES = {
@@ -101265,135 +101424,23 @@ function computeCost(modelId, usage, inputIncludesCached) {
101265
101424
  return (uncached * pricing.input + cachedInputTokens * pricing.cachedInput + cacheWriteInputTokens * pricing.cacheWrite + outputTokens * pricing.output) / m;
101266
101425
  }
101267
101426
 
101268
- // src/usage/usage-service.ts
101427
+ // src/usage/usage-report.ts
101269
101428
  function usageFilesDir() {
101270
- return process.env.AGENT_PANE_USAGE_DIR ?? join3(homedir4(), ".repoburg", "usage");
101271
- }
101272
- function emptyBucket() {
101273
- return { calls: 0, errors: 0, input: 0, cached: 0, cacheWrite: 0, output: 0, cost: 0 };
101274
- }
101275
- function newAggregator() {
101276
- return {
101277
- totals: emptyBucket(),
101278
- unpricedModels: /* @__PURE__ */ new Set(),
101279
- byRuntime: /* @__PURE__ */ new Map(),
101280
- byModel: /* @__PURE__ */ new Map(),
101281
- byDay: /* @__PURE__ */ new Map()
101282
- };
101283
- }
101284
- var num = (v) => typeof v === "number" && Number.isFinite(v) ? v : 0;
101285
- function addEvent(agg, event) {
101286
- const { runtimeType, provider, model, effort, day, isError, usage, inputIncludesCached } = event;
101287
- const cost = usage ? computeCost(model, usage, inputIncludesCached) : null;
101288
- if (usage && cost === null) agg.unpricedModels.add(model);
101289
- const bump = (b) => {
101290
- b.calls += 1;
101291
- if (isError) b.errors += 1;
101292
- if (usage) {
101293
- b.input += usage.inputTokens;
101294
- b.cached += usage.cachedInputTokens;
101295
- b.cacheWrite += usage.cacheWriteInputTokens;
101296
- b.output += usage.outputTokens;
101297
- b.cost += cost ?? 0;
101298
- }
101299
- };
101300
- bump(agg.totals);
101301
- const runtimeBucket = agg.byRuntime.get(runtimeType) ?? emptyBucket();
101302
- bump(runtimeBucket);
101303
- agg.byRuntime.set(runtimeType, runtimeBucket);
101304
- const dayBucket = agg.byDay.get(day) ?? emptyBucket();
101305
- bump(dayBucket);
101306
- agg.byDay.set(day, dayBucket);
101307
- const key = `${runtimeType}|${provider ?? ""}|${model}|${effort ?? ""}`;
101308
- const row = agg.byModel.get(key);
101309
- if (row) {
101310
- row.calls += 1;
101311
- if (isError) row.errors += 1;
101312
- if (usage) {
101313
- row.input_tokens += usage.inputTokens;
101314
- row.cached_input_tokens += usage.cachedInputTokens;
101315
- row.cache_write_input_tokens += usage.cacheWriteInputTokens;
101316
- row.output_tokens += usage.outputTokens;
101317
- if (cost !== null) row.cost_usd = (row.cost_usd ?? 0) + cost;
101318
- }
101319
- } else {
101320
- agg.byModel.set(key, {
101321
- runtime_type: runtimeType,
101322
- provider,
101323
- model,
101324
- reasoning_effort: effort,
101325
- calls: 1,
101326
- errors: isError ? 1 : 0,
101327
- input_tokens: usage?.inputTokens ?? 0,
101328
- cached_input_tokens: usage?.cachedInputTokens ?? 0,
101329
- cache_write_input_tokens: usage?.cacheWriteInputTokens ?? 0,
101330
- output_tokens: usage?.outputTokens ?? 0,
101331
- cost_usd: cost,
101332
- priced: cost !== null
101333
- });
101334
- }
101335
- }
101336
- function parseTokenUsage(raw) {
101337
- if (!raw) return null;
101338
- try {
101339
- const parsed = JSON.parse(raw);
101340
- if (!parsed || typeof parsed !== "object") return null;
101341
- return {
101342
- inputTokens: num(parsed.input_tokens),
101343
- cachedInputTokens: num(parsed.cached_input_tokens),
101344
- cacheWriteInputTokens: num(parsed.cache_write_input_tokens),
101345
- outputTokens: num(parsed.output_tokens)
101346
- };
101347
- } catch {
101348
- return null;
101349
- }
101350
- }
101351
- function addPaneTurns(agg, sinceIso, untilIso) {
101352
- const params = [];
101353
- let where = "s.runtime_type IN ('claude','codex') AND t.status IN ('completed','failed','aborted')";
101354
- if (sinceIso) {
101355
- params.push(sinceIso);
101356
- where += " AND t.created_at >= ?";
101357
- }
101358
- if (untilIso) {
101359
- params.push(untilIso);
101360
- where += " AND t.created_at < ?";
101361
- }
101362
- const rows = getDb().prepare(
101363
- `SELECT s.runtime_type, s.model, s.model_reasoning_effort, t.token_usage, t.status, t.created_at
101364
- FROM turns t JOIN sessions s ON s.id = t.session_id WHERE ${where}`
101365
- ).all(...params);
101366
- for (const row of rows) {
101367
- const day = row.created_at.slice(0, 10);
101368
- addEvent(agg, {
101369
- runtimeType: row.runtime_type,
101370
- provider: null,
101371
- model: row.model ?? "(default)",
101372
- effort: row.model_reasoning_effort ?? null,
101373
- day,
101374
- isError: row.status === "failed",
101375
- usage: parseTokenUsage(row.token_usage),
101376
- // Anthropic reports input/cache-read/cache-write as disjoint buckets.
101377
- inputIncludesCached: row.runtime_type !== "claude"
101378
- });
101379
- }
101429
+ return process.env.AGENT_PANE_USAGE_DIR ?? join4(homedir5(), ".repoburg", "usage");
101380
101430
  }
101381
- function addRepoburgExport(agg, sinceIso, untilIso) {
101431
+ var num2 = (v) => typeof v === "number" && Number.isFinite(v) ? v : 0;
101432
+ function readRepoburgCalls() {
101382
101433
  let files;
101383
101434
  try {
101384
- files = readdirSync2(usageFilesDir()).filter((f) => /^usage-\d{4}-\d{2}-\d{2}\.jsonl$/.test(f)).sort();
101435
+ files = readdirSync2(usageFilesDir()).filter((f) => /^usage-\d{4}-\d{2}-\d{2}\.jsonl$/.test(f));
101385
101436
  } catch {
101386
- return;
101437
+ return [];
101387
101438
  }
101388
- const sinceDay = sinceIso?.slice(0, 10) ?? null;
101389
- const untilDay = untilIso ? untilIso.slice(0, 10) : null;
101390
- for (const file2 of files) {
101391
- const day = file2.slice("usage-".length, file2.length - ".jsonl".length);
101392
- if (sinceDay && day < sinceDay) continue;
101393
- if (untilDay && day > untilDay) continue;
101439
+ const calls = [];
101440
+ for (const file2 of files.sort()) {
101394
101441
  let content;
101395
101442
  try {
101396
- content = readFileSync2(join3(usageFilesDir(), file2), "utf-8");
101443
+ content = readFileSync3(join4(usageFilesDir(), file2), "utf-8");
101397
101444
  } catch {
101398
101445
  continue;
101399
101446
  }
@@ -101406,112 +101453,301 @@ function addRepoburgExport(agg, sinceIso, untilIso) {
101406
101453
  } catch {
101407
101454
  continue;
101408
101455
  }
101409
- if (sinceIso && record2.ts < sinceIso) continue;
101410
- if (untilIso && record2.ts >= untilIso) continue;
101411
- const status = record2.status_code;
101412
- addEvent(agg, {
101413
- runtimeType: "repoburg",
101414
- provider: record2.provider ?? null,
101415
- model: record2.model_id ?? "(unknown)",
101416
- effort: record2.reasoning_effort ?? null,
101417
- day: record2.ts.slice(0, 10),
101418
- isError: status === null || status < 200 || status >= 300,
101419
- usage: {
101420
- inputTokens: num(record2.input_tokens),
101421
- cachedInputTokens: num(record2.cached_tokens),
101422
- cacheWriteInputTokens: 0,
101423
- outputTokens: num(record2.output_tokens)
101424
- },
101425
- // OpenAI-compatible providers report cached tokens inside input.
101426
- inputIncludesCached: true
101456
+ if (typeof record2.ts !== "string" || Number.isNaN(Date.parse(record2.ts))) continue;
101457
+ const model = typeof record2.model_id === "string" && record2.model_id ? record2.model_id : "(unknown)";
101458
+ const inputTokens = num2(record2.input_tokens);
101459
+ const cachedTokens = num2(record2.cached_tokens);
101460
+ const outputTokens = num2(record2.output_tokens);
101461
+ calls.push({
101462
+ ts: record2.ts,
101463
+ model,
101464
+ // OpenAI-compatible providers count cached tokens inside input.
101465
+ input: Math.max(0, inputTokens - cachedTokens),
101466
+ cacheRead: cachedTokens,
101467
+ output: outputTokens,
101468
+ cost: computeCost(
101469
+ model,
101470
+ { inputTokens, cachedInputTokens: cachedTokens, cacheWriteInputTokens: 0, outputTokens },
101471
+ true
101472
+ )
101427
101473
  });
101428
101474
  }
101429
101475
  }
101476
+ return calls;
101477
+ }
101478
+ function readPaneSessions() {
101479
+ const db2 = getDb();
101480
+ const map2 = /* @__PURE__ */ new Map();
101481
+ const sessions = db2.prepare("SELECT id, title, external_thread_id, pre_rewind_thread_id, import_source_id FROM sessions").all();
101482
+ for (const column of ["external_thread_id", "pre_rewind_thread_id", "import_source_id"]) {
101483
+ for (const s of sessions) {
101484
+ const threadId = s[column];
101485
+ if (threadId && !map2.has(threadId)) map2.set(threadId, { id: s.id, title: s.title, kind: "session" });
101486
+ }
101487
+ }
101488
+ const threads = db2.prepare(
101489
+ `SELECT d.external_thread_id, s.id, s.title FROM discussion_threads d
101490
+ JOIN sessions s ON s.id = d.session_id WHERE d.external_thread_id IS NOT NULL`
101491
+ ).all();
101492
+ for (const t of threads) {
101493
+ if (!map2.has(t.external_thread_id)) {
101494
+ map2.set(t.external_thread_id, { id: t.id, title: t.title, kind: "discussion" });
101495
+ }
101496
+ }
101497
+ return map2;
101498
+ }
101499
+ var dayFormatters = /* @__PURE__ */ new Map();
101500
+ function localDay(date5, timezone) {
101501
+ let fmt = dayFormatters.get(timezone);
101502
+ if (!fmt) {
101503
+ fmt = new Intl.DateTimeFormat("en-CA", { timeZone: timezone, year: "numeric", month: "2-digit", day: "2-digit" });
101504
+ dayFormatters.set(timezone, fmt);
101505
+ }
101506
+ return fmt.format(date5);
101430
101507
  }
101431
- function getUsageSummary(sinceIso, untilIso) {
101432
- const agg = newAggregator();
101433
- addPaneTurns(agg, sinceIso, untilIso);
101434
- addRepoburgExport(agg, sinceIso, untilIso);
101435
- const byRuntime = [...agg.byRuntime.entries()].map(([runtimeType, b]) => ({
101436
- runtime_type: runtimeType,
101437
- calls: b.calls,
101438
- errors: b.errors,
101439
- input_tokens: b.input,
101440
- cached_input_tokens: b.cached,
101441
- cache_write_input_tokens: b.cacheWrite,
101442
- output_tokens: b.output,
101443
- cost_usd: b.cost
101444
- })).sort((a, b) => a.runtime_type.localeCompare(b.runtime_type));
101445
- const byModel = [...agg.byModel.values()].map((row) => ({
101446
- runtime_type: row.runtime_type,
101447
- provider: row.provider,
101448
- model: row.model,
101449
- reasoning_effort: row.reasoning_effort,
101450
- calls: row.calls,
101451
- errors: row.errors,
101452
- input_tokens: row.input_tokens,
101453
- cached_input_tokens: row.cached_input_tokens,
101454
- cache_write_input_tokens: row.cache_write_input_tokens,
101455
- output_tokens: row.output_tokens,
101456
- // Unpriced models stay null; a priced row that also saw zero-token
101457
- // error events keeps its exact sum.
101458
- cost_usd: row.priced ? row.cost_usd ?? 0 : null
101459
- })).sort((a, b) => (b.cost_usd ?? 0) - (a.cost_usd ?? 0) || b.calls - a.calls);
101460
- const daily = [...agg.byDay.entries()].map(([date5, b]) => ({
101461
- date: date5,
101462
- calls: b.calls,
101463
- input_tokens: b.input,
101464
- cached_input_tokens: b.cached,
101465
- cache_write_input_tokens: b.cacheWrite,
101466
- output_tokens: b.output,
101467
- cost_usd: b.cost
101468
- })).sort((a, b) => a.date.localeCompare(b.date));
101508
+ function isValidTimezone(timezone) {
101509
+ if (!/^[A-Za-z0-9_+\-/]{1,64}$/.test(timezone)) return false;
101510
+ try {
101511
+ new Intl.DateTimeFormat("en-US", { timeZone: timezone });
101512
+ return true;
101513
+ } catch {
101514
+ return false;
101515
+ }
101516
+ }
101517
+ function weekStart(day) {
101518
+ const d = /* @__PURE__ */ new Date(`${day}T00:00:00Z`);
101519
+ d.setUTCDate(d.getUTCDate() - (d.getUTCDay() + 6) % 7);
101520
+ return d.toISOString().slice(0, 10);
101521
+ }
101522
+ var zero = () => ({ input: 0, output: 0, create: 0, read: 0, cost: 0 });
101523
+ function addTo(t, o) {
101524
+ t.input += o.input;
101525
+ t.output += o.output;
101526
+ t.create += o.create;
101527
+ t.read += o.read;
101528
+ t.cost += o.cost;
101529
+ }
101530
+ function tokens(t) {
101469
101531
  return {
101470
- window: { since: sinceIso, until: untilIso },
101471
- totals: {
101472
- calls: agg.totals.calls,
101473
- errors: agg.totals.errors,
101474
- input_tokens: agg.totals.input,
101475
- cached_input_tokens: agg.totals.cached,
101476
- cache_write_input_tokens: agg.totals.cacheWrite,
101477
- output_tokens: agg.totals.output,
101478
- total_tokens: agg.totals.input + agg.totals.cached + agg.totals.cacheWrite + agg.totals.output,
101479
- cost_usd: agg.totals.cost,
101480
- unpriced_models: [...agg.unpricedModels].sort()
101481
- },
101482
- by_runtime: byRuntime,
101483
- by_model: byModel,
101484
- daily
101532
+ input_tokens: t.input,
101533
+ output_tokens: t.output,
101534
+ cache_creation_tokens: t.create,
101535
+ cache_read_tokens: t.read,
101536
+ total_tokens: t.input + t.output + t.create + t.read,
101537
+ cost_usd: t.cost
101538
+ };
101539
+ }
101540
+ var RowAcc = class {
101541
+ constructor(period) {
101542
+ this.period = period;
101543
+ }
101544
+ agents = /* @__PURE__ */ new Map();
101545
+ models = /* @__PURE__ */ new Map();
101546
+ add(agent, model, t) {
101547
+ const agentTotals = this.agents.get(agent) ?? zero();
101548
+ addTo(agentTotals, t);
101549
+ this.agents.set(agent, agentTotals);
101550
+ if (model === null) return;
101551
+ const key = `${agent}\0${model}`;
101552
+ const line = this.models.get(key) ?? { agent, model, totals: zero() };
101553
+ addTo(line.totals, t);
101554
+ this.models.set(key, line);
101555
+ }
101556
+ /** Add the per-agent totals of a ccusage row, and its model lines. */
101557
+ addCcusage(row) {
101558
+ for (const a of row.agents) {
101559
+ const agentTotals = this.agents.get(a.agent) ?? zero();
101560
+ addTo(agentTotals, {
101561
+ input: a.inputTokens,
101562
+ output: a.outputTokens,
101563
+ create: a.cacheCreationTokens,
101564
+ read: a.cacheReadTokens,
101565
+ cost: a.totalCost
101566
+ });
101567
+ this.agents.set(a.agent, agentTotals);
101568
+ for (const b of a.modelBreakdowns) {
101569
+ const key = `${a.agent}\0${b.modelName}`;
101570
+ const line = this.models.get(key) ?? { agent: a.agent, model: b.modelName, totals: zero() };
101571
+ addTo(line.totals, {
101572
+ input: b.inputTokens,
101573
+ output: b.outputTokens,
101574
+ create: b.cacheCreationTokens,
101575
+ read: b.cacheReadTokens,
101576
+ cost: b.cost
101577
+ });
101578
+ this.models.set(key, line);
101579
+ }
101580
+ }
101581
+ }
101582
+ /** Add every agent and model line of another row (weeks and months sum days). */
101583
+ merge(other) {
101584
+ for (const [agent, t] of other.agents) {
101585
+ const agentTotals = this.agents.get(agent) ?? zero();
101586
+ addTo(agentTotals, t);
101587
+ this.agents.set(agent, agentTotals);
101588
+ }
101589
+ for (const [key, line] of other.models) {
101590
+ const mine = this.models.get(key) ?? { agent: line.agent, model: line.model, totals: zero() };
101591
+ addTo(mine.totals, line.totals);
101592
+ this.models.set(key, mine);
101593
+ }
101594
+ }
101595
+ totals() {
101596
+ const t = zero();
101597
+ for (const a of this.agents.values()) addTo(t, a);
101598
+ return t;
101599
+ }
101600
+ toRow() {
101601
+ const breakdown = [...this.models.values()].map((line) => ({ agent: line.agent, model: line.model, ...tokens(line.totals) })).sort((a, b) => b.cost_usd - a.cost_usd || b.total_tokens - a.total_tokens);
101602
+ const agents = [...this.agents.entries()].sort((a, b) => b[1].cost - a[1].cost).map(([agent]) => agent);
101603
+ return {
101604
+ period: this.period,
101605
+ agents,
101606
+ models: [...new Set(breakdown.map((b) => b.model))],
101607
+ ...tokens(this.totals()),
101608
+ breakdown
101609
+ };
101610
+ }
101611
+ };
101612
+ var UUID_TAIL = /([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/i;
101613
+ function runtimeSessionId(period) {
101614
+ return UUID_TAIL.exec(period)?.[1] ?? period;
101615
+ }
101616
+ function buildUsageReport(input) {
101617
+ const { ccusage, repoburg, timezone, since, until, today } = input;
101618
+ const inWindow = (day) => (!since || day >= since) && (!until || day <= until);
101619
+ const days = /* @__PURE__ */ new Map();
101620
+ const dayAcc = (day) => {
101621
+ let acc = days.get(day);
101622
+ if (!acc) {
101623
+ acc = new RowAcc(day);
101624
+ days.set(day, acc);
101625
+ }
101626
+ return acc;
101627
+ };
101628
+ for (const row of ccusage?.data.daily ?? []) dayAcc(row.period).addCcusage(row);
101629
+ const unpriced = /* @__PURE__ */ new Set();
101630
+ for (const call of repoburg) {
101631
+ if (call.cost === null) unpriced.add(call.model);
101632
+ dayAcc(localDay(new Date(call.ts), timezone)).add("repoburg", call.model, {
101633
+ input: call.input,
101634
+ output: call.output,
101635
+ create: 0,
101636
+ read: call.cacheRead,
101637
+ cost: call.cost ?? 0
101638
+ });
101639
+ }
101640
+ const modelCost = /* @__PURE__ */ new Map();
101641
+ for (const acc of days.values()) {
101642
+ for (const line of acc.models.values()) {
101643
+ modelCost.set(line.model, (modelCost.get(line.model) ?? 0) + line.totals.cost);
101644
+ }
101645
+ }
101646
+ const modelOrder = [...modelCost.entries()].sort((a, b) => b[1] - a[1]).map(([model]) => model);
101647
+ const month = today.slice(0, 7);
101648
+ let monthToDate = 0;
101649
+ for (const acc of days.values()) {
101650
+ if (acc.period.startsWith(month) && acc.period <= today) monthToDate += acc.totals().cost;
101651
+ }
101652
+ const windowDays = [...days.values()].filter((d) => inWindow(d.period)).sort((a, b) => a.period.localeCompare(b.period));
101653
+ const group = (key) => {
101654
+ const groups = /* @__PURE__ */ new Map();
101655
+ for (const d of windowDays) {
101656
+ const k = key(d.period);
101657
+ const acc = groups.get(k) ?? new RowAcc(k);
101658
+ acc.merge(d);
101659
+ groups.set(k, acc);
101660
+ }
101661
+ return [...groups.values()].sort((a, b) => a.period.localeCompare(b.period)).map((g) => g.toRow());
101662
+ };
101663
+ const total = new RowAcc("total");
101664
+ for (const d of windowDays) total.merge(d);
101665
+ const byAgent = [...total.agents.entries()].map(([agent, t]) => ({ agent, ...tokens(t) })).sort((a, b) => b.cost_usd - a.cost_usd);
101666
+ const sessions = (ccusage?.data.session ?? []).filter((s) => {
101667
+ if (!since && !until) return true;
101668
+ return s.lastActivity !== null && inWindow(localDay(new Date(s.lastActivity), timezone));
101669
+ }).map((s) => {
101670
+ const acc = new RowAcc(s.period);
101671
+ acc.addCcusage(s);
101672
+ return {
101673
+ ...acc.toRow(),
101674
+ agent: s.agent,
101675
+ last_activity: s.lastActivity,
101676
+ pane_session: input.paneSessions.get(runtimeSessionId(s.period)) ?? null
101677
+ };
101678
+ }).sort((a, b) => b.cost_usd - a.cost_usd);
101679
+ return {
101680
+ generated_at: ccusage ? new Date(ccusage.generatedAt).toISOString() : null,
101681
+ timezone,
101682
+ window: { since, until },
101683
+ totals: tokens(total.totals()),
101684
+ by_agent: byAgent,
101685
+ month_to_date_cost_usd: monthToDate,
101686
+ daily: windowDays.map((d) => d.toRow()),
101687
+ weekly: group(weekStart),
101688
+ monthly: group((day) => day.slice(0, 7)),
101689
+ sessions,
101690
+ model_order: modelOrder,
101691
+ unpriced_models: [...unpriced].sort(),
101692
+ source: { ccusage_version: ccusageVersion(), ccusage_error: input.ccusageError }
101485
101693
  };
101486
101694
  }
101695
+ async function getUsageReport(options) {
101696
+ const { since, until, timezone, fresh } = options;
101697
+ let ccusage = null;
101698
+ let ccusageError = null;
101699
+ try {
101700
+ ccusage = await loadCcusage(timezone, fresh);
101701
+ } catch (err) {
101702
+ ccusageError = err.message;
101703
+ }
101704
+ return buildUsageReport({
101705
+ ccusage,
101706
+ ccusageError,
101707
+ repoburg: readRepoburgCalls(),
101708
+ paneSessions: readPaneSessions(),
101709
+ timezone,
101710
+ since,
101711
+ until,
101712
+ today: localDay(options.now ?? /* @__PURE__ */ new Date(), timezone)
101713
+ });
101714
+ }
101487
101715
 
101488
101716
  // src/routes/usage.ts
101489
- function parseTimeParam(value) {
101717
+ function badRequest(message) {
101718
+ return Object.assign(new Error(message), { statusCode: 400 });
101719
+ }
101720
+ function parseDayParam(name, value) {
101490
101721
  if (typeof value !== "string" || value === "") return null;
101491
- if (Number.isNaN(Date.parse(value))) {
101492
- throw Object.assign(new Error(`Invalid timestamp: ${value}`), { statusCode: 400 });
101722
+ if (!/^\d{4}-\d{2}-\d{2}$/.test(value) || Number.isNaN(Date.parse(`${value}T00:00:00Z`))) {
101723
+ throw badRequest(`Invalid ${name}: ${value} (expected YYYY-MM-DD)`);
101493
101724
  }
101494
101725
  return value;
101495
101726
  }
101496
101727
  async function registerUsageRoutes(fastify) {
101497
101728
  fastify.get(
101498
- "/api/usage/summary",
101729
+ "/api/usage/report",
101499
101730
  {
101500
101731
  schema: {
101501
101732
  querystring: {
101502
101733
  type: "object",
101503
101734
  properties: {
101504
101735
  since: { type: "string" },
101505
- until: { type: "string" }
101736
+ until: { type: "string" },
101737
+ tz: { type: "string" },
101738
+ fresh: { type: "string" }
101506
101739
  }
101507
101740
  }
101508
101741
  }
101509
101742
  },
101510
101743
  async (request, reply) => {
101511
101744
  try {
101512
- const since = parseTimeParam(request.query?.since);
101513
- const until = parseTimeParam(request.query?.until);
101514
- return getUsageSummary(since, until);
101745
+ const query2 = request.query ?? {};
101746
+ const since = parseDayParam("since", query2.since);
101747
+ const until = parseDayParam("until", query2.until);
101748
+ const timezone = query2.tz || Intl.DateTimeFormat().resolvedOptions().timeZone;
101749
+ if (!isValidTimezone(timezone)) throw badRequest(`Invalid time zone: ${timezone}`);
101750
+ return await getUsageReport({ since, until, timezone, fresh: query2.fresh === "1" });
101515
101751
  } catch (err) {
101516
101752
  const e = err;
101517
101753
  if (e.statusCode === 400) {
@@ -102275,8 +102511,8 @@ function defineLazy(object2, key, getter) {
102275
102511
  configurable: true
102276
102512
  });
102277
102513
  }
102278
- function objectClone(obj) {
102279
- return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
102514
+ function objectClone(obj2) {
102515
+ return Object.create(Object.getPrototypeOf(obj2), Object.getOwnPropertyDescriptors(obj2));
102280
102516
  }
102281
102517
  function assignProp(target, prop, value) {
102282
102518
  Object.defineProperty(target, prop, {
@@ -102297,10 +102533,10 @@ function mergeDefs(...defs) {
102297
102533
  function cloneDef(schema) {
102298
102534
  return mergeDefs(schema._zod.def);
102299
102535
  }
102300
- function getElementAtPath(obj, path13) {
102536
+ function getElementAtPath(obj2, path13) {
102301
102537
  if (!path13)
102302
- return obj;
102303
- return path13.reduce((acc, key) => acc?.[key], obj);
102538
+ return obj2;
102539
+ return path13.reduce((acc, key) => acc?.[key], obj2);
102304
102540
  }
102305
102541
  function promiseAllObject(promisesObj) {
102306
102542
  const keys = Object.keys(promisesObj);
@@ -102315,14 +102551,14 @@ function promiseAllObject(promisesObj) {
102315
102551
  }
102316
102552
  function randomString(length = 10) {
102317
102553
  const chars = "abcdefghijklmnopqrstuvwxyz";
102318
- let str = "";
102554
+ let str2 = "";
102319
102555
  for (let i = 0; i < length; i++) {
102320
- str += chars[Math.floor(Math.random() * chars.length)];
102556
+ str2 += chars[Math.floor(Math.random() * chars.length)];
102321
102557
  }
102322
- return str;
102558
+ return str2;
102323
102559
  }
102324
- function esc(str) {
102325
- return JSON.stringify(str);
102560
+ function esc(str2) {
102561
+ return JSON.stringify(str2);
102326
102562
  }
102327
102563
  function slugify(input) {
102328
102564
  return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
@@ -102436,8 +102672,8 @@ var primitiveTypes = /* @__PURE__ */ new Set([
102436
102672
  "symbol",
102437
102673
  "undefined"
102438
102674
  ]);
102439
- function escapeRegex(str) {
102440
- return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
102675
+ function escapeRegex(str2) {
102676
+ return str2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
102441
102677
  }
102442
102678
  function clone(inst, def, params) {
102443
102679
  const cl = new inst._zod.constr(def ?? inst._zod.def);
@@ -102759,9 +102995,9 @@ function parsedType(data) {
102759
102995
  if (Array.isArray(data)) {
102760
102996
  return "array";
102761
102997
  }
102762
- const obj = data;
102763
- if (obj && Object.getPrototypeOf(obj) !== Object.prototype && "constructor" in obj && obj.constructor) {
102764
- return obj.constructor.name;
102998
+ const obj2 = data;
102999
+ if (obj2 && Object.getPrototypeOf(obj2) !== Object.prototype && "constructor" in obj2 && obj2.constructor) {
103000
+ return obj2.constructor.name;
102765
103001
  }
102766
103002
  }
102767
103003
  }
@@ -102779,8 +103015,8 @@ function issue(...args) {
102779
103015
  }
102780
103016
  return { ...iss };
102781
103017
  }
102782
- function cleanEnum(obj) {
102783
- return Object.entries(obj).filter(([k, _]) => {
103018
+ function cleanEnum(obj2) {
103019
+ return Object.entries(obj2).filter(([k, _]) => {
102784
103020
  return Number.isNaN(Number.parseInt(k, 10));
102785
103021
  }).map((el) => el[1]);
102786
103022
  }
@@ -117808,9 +118044,9 @@ var codexProvider = {
117808
118044
 
117809
118045
  // src/claude/claude-provider.ts
117810
118046
  import { query, forkSession as sdkForkSession } from "@anthropic-ai/claude-agent-sdk";
117811
- import { readFileSync as readFileSync3 } from "fs";
118047
+ import { readFileSync as readFileSync4 } from "fs";
117812
118048
  import { tmpdir } from "os";
117813
- import { join as join4 } from "path";
118049
+ import { join as join5 } from "path";
117814
118050
 
117815
118051
  // src/claude/claude-types.ts
117816
118052
  var EFFORT_LABELS2 = {
@@ -118053,13 +118289,13 @@ function publish(entry, sessionId, db2) {
118053
118289
  }
118054
118290
  function recordApiUsage(entry, sessionId, db2, apiMessageId, usage) {
118055
118291
  if (entry.threadId) return;
118056
- const tokens = contextTokensFromUsage(usage);
118057
- if (tokens === null) return;
118292
+ const tokens2 = contextTokensFromUsage(usage);
118293
+ if (tokens2 === null) return;
118058
118294
  const ctx = counterOf(entry);
118059
118295
  const id = apiMessageId ?? ctx.apiMessageId;
118060
- if (ctx.measured && id !== null && id === ctx.apiMessageId && ctx.tokens !== null && tokens <= ctx.tokens) return;
118296
+ if (ctx.measured && id !== null && id === ctx.apiMessageId && ctx.tokens !== null && tokens2 <= ctx.tokens) return;
118061
118297
  ctx.apiMessageId = id;
118062
- ctx.tokens = tokens;
118298
+ ctx.tokens = tokens2;
118063
118299
  ctx.measured = true;
118064
118300
  ctx.seq++;
118065
118301
  publish(entry, sessionId, db2);
@@ -118822,7 +119058,7 @@ function constructMonitorOutputPath(entry, taskId) {
118822
119058
  if (!entry.sessionId) return "";
118823
119059
  const uid = typeof process.getuid === "function" ? process.getuid() : 0;
118824
119060
  const encodedCwd = entry.cwd.replace(/\//g, "-");
118825
- return join4(tmpdir(), `claude-${uid}`, encodedCwd, entry.sessionId, "tasks", `${taskId}.output`);
119061
+ return join5(tmpdir(), `claude-${uid}`, encodedCwd, entry.sessionId, "tasks", `${taskId}.output`);
118826
119062
  }
118827
119063
  function handleTaskStarted(message, sessionId, turnId, entry, db2) {
118828
119064
  const m = message;
@@ -118886,7 +119122,7 @@ function handleTaskProgress(message, sessionId, entry, db2) {
118886
119122
  const outputPath = existing.output_file || constructMonitorOutputPath(entry, m.task_id);
118887
119123
  if (outputPath) {
118888
119124
  try {
118889
- output = readFileSync3(outputPath, "utf-8");
119125
+ output = readFileSync4(outputPath, "utf-8");
118890
119126
  } catch {
118891
119127
  }
118892
119128
  }
@@ -118939,7 +119175,7 @@ function handleTaskNotification(message, sessionId, entry, db2) {
118939
119175
  let output = "";
118940
119176
  if (outputPath) {
118941
119177
  try {
118942
- output = readFileSync3(outputPath, "utf-8");
119178
+ output = readFileSync4(outputPath, "utf-8");
118943
119179
  } catch {
118944
119180
  }
118945
119181
  }
@@ -119692,7 +119928,7 @@ async function startService(daemon, projectPath) {
119692
119928
  throw new Error(`Daemon failed to start backend for ${projectPath}: ${daemonErrorMessage(err)}`);
119693
119929
  }
119694
119930
  }
119695
- function cache2(absPath, service) {
119931
+ function cache3(absPath, service) {
119696
119932
  const resolved = {
119697
119933
  baseUrl: serviceBaseUrl(service),
119698
119934
  port: service.port,
@@ -119725,22 +119961,22 @@ async function resolveBackendUrl(projectPath, opts = {}) {
119725
119961
  const match = coveringService(services, absPath);
119726
119962
  if (match && match.status === "running") {
119727
119963
  if (await backendHealthy(serviceBaseUrl(match), match.path)) {
119728
- return cache2(absPath, match);
119964
+ return cache3(absPath, match);
119729
119965
  }
119730
119966
  if (!autoStart) return null;
119731
119967
  await restartService(daemon, match.name);
119732
119968
  await waitForHealthy(serviceBaseUrl(match), match.name, match.path);
119733
- return cache2(absPath, match);
119969
+ return cache3(absPath, match);
119734
119970
  }
119735
119971
  if (!autoStart) return null;
119736
119972
  if (match) {
119737
119973
  await restartService(daemon, match.name);
119738
119974
  await waitForHealthy(serviceBaseUrl(match), match.name, match.path);
119739
- return cache2(absPath, match);
119975
+ return cache3(absPath, match);
119740
119976
  }
119741
119977
  const service = await startService(daemon, absPath);
119742
119978
  await waitForHealthy(serviceBaseUrl(service), service.name, absPath);
119743
- return cache2(absPath, service);
119979
+ return cache3(absPath, service);
119744
119980
  }
119745
119981
 
119746
119982
  // src/repoburg/action-mapping.ts
@@ -119764,12 +120000,12 @@ function parseSelectionGroups(raw) {
119764
120000
  if (!Array.isArray(parsed)) return [];
119765
120001
  return parsed.map((item) => {
119766
120002
  if (item && typeof item === "object" && !Array.isArray(item)) {
119767
- const obj = item;
119768
- if (Array.isArray(obj.selections)) {
119769
- const opts = obj.selections.filter((s) => typeof s === "string");
120003
+ const obj2 = item;
120004
+ if (Array.isArray(obj2.selections)) {
120005
+ const opts = obj2.selections.filter((s) => typeof s === "string");
119770
120006
  if (opts.length > 0) {
119771
120007
  return {
119772
- question: typeof obj.question === "string" ? obj.question : "",
120008
+ question: typeof obj2.question === "string" ? obj2.question : "",
119773
120009
  selections: opts
119774
120010
  };
119775
120011
  }