@floless/app 0.76.0 → 0.77.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4415,10 +4415,10 @@ var require_redaction = __commonJS({
4415
4415
  var strict = false;
4416
4416
  function redaction(opts, serialize) {
4417
4417
  const { paths, censor, remove } = handle(opts);
4418
- const shape = paths.reduce((o, str) => {
4418
+ const shape = paths.reduce((o, str2) => {
4419
4419
  rx.lastIndex = 0;
4420
- const first = rx.exec(str);
4421
- const next = rx.exec(str);
4420
+ const first = rx.exec(str2);
4421
+ const next = rx.exec(str2);
4422
4422
  let ns = first[1] !== void 0 ? first[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/, "$1") : first[0];
4423
4423
  if (ns === "*") {
4424
4424
  ns = wildcardFirstSym;
@@ -4431,7 +4431,7 @@ var require_redaction = __commonJS({
4431
4431
  return o;
4432
4432
  }
4433
4433
  const { index } = next;
4434
- const nextPath = `${str.substr(index, str.length - 1)}`;
4434
+ const nextPath = `${str2.substr(index, str2.length - 1)}`;
4435
4435
  o[ns] = o[ns] || [];
4436
4436
  if (ns !== wildcardFirstSym && o[ns].length === 0) {
4437
4437
  o[ns].push(...o[wildcardFirstSym] || []);
@@ -4547,7 +4547,7 @@ var require_quick_format_unescaped = __commonJS({
4547
4547
  }
4548
4548
  var argLen = args.length;
4549
4549
  if (argLen === 0) return f;
4550
- var str = "";
4550
+ var str2 = "";
4551
4551
  var a = 1 - offset;
4552
4552
  var lastPos = -1;
4553
4553
  var flen = f && f.length || 0;
@@ -4562,8 +4562,8 @@ var require_quick_format_unescaped = __commonJS({
4562
4562
  break;
4563
4563
  if (args[a] == null) break;
4564
4564
  if (lastPos < i)
4565
- str += f.slice(lastPos, i);
4566
- str += Number(args[a]);
4565
+ str2 += f.slice(lastPos, i);
4566
+ str2 += Number(args[a]);
4567
4567
  lastPos = i + 2;
4568
4568
  i++;
4569
4569
  break;
@@ -4572,8 +4572,8 @@ var require_quick_format_unescaped = __commonJS({
4572
4572
  break;
4573
4573
  if (args[a] == null) break;
4574
4574
  if (lastPos < i)
4575
- str += f.slice(lastPos, i);
4576
- str += Math.floor(Number(args[a]));
4575
+ str2 += f.slice(lastPos, i);
4576
+ str2 += Math.floor(Number(args[a]));
4577
4577
  lastPos = i + 2;
4578
4578
  i++;
4579
4579
  break;
@@ -4586,21 +4586,21 @@ var require_quick_format_unescaped = __commonJS({
4586
4586
  break;
4587
4587
  if (args[a] === void 0) break;
4588
4588
  if (lastPos < i)
4589
- str += f.slice(lastPos, i);
4589
+ str2 += f.slice(lastPos, i);
4590
4590
  var type = typeof args[a];
4591
4591
  if (type === "string") {
4592
- str += "'" + args[a] + "'";
4592
+ str2 += "'" + args[a] + "'";
4593
4593
  lastPos = i + 2;
4594
4594
  i++;
4595
4595
  break;
4596
4596
  }
4597
4597
  if (type === "function") {
4598
- str += args[a].name || "<anonymous>";
4598
+ str2 += args[a].name || "<anonymous>";
4599
4599
  lastPos = i + 2;
4600
4600
  i++;
4601
4601
  break;
4602
4602
  }
4603
- str += ss(args[a]);
4603
+ str2 += ss(args[a]);
4604
4604
  lastPos = i + 2;
4605
4605
  i++;
4606
4606
  break;
@@ -4608,15 +4608,15 @@ var require_quick_format_unescaped = __commonJS({
4608
4608
  if (a >= argLen)
4609
4609
  break;
4610
4610
  if (lastPos < i)
4611
- str += f.slice(lastPos, i);
4612
- str += String(args[a]);
4611
+ str2 += f.slice(lastPos, i);
4612
+ str2 += String(args[a]);
4613
4613
  lastPos = i + 2;
4614
4614
  i++;
4615
4615
  break;
4616
4616
  case 37:
4617
4617
  if (lastPos < i)
4618
- str += f.slice(lastPos, i);
4619
- str += "%";
4618
+ str2 += f.slice(lastPos, i);
4619
+ str2 += "%";
4620
4620
  lastPos = i + 2;
4621
4621
  i++;
4622
4622
  a--;
@@ -4629,9 +4629,9 @@ var require_quick_format_unescaped = __commonJS({
4629
4629
  if (lastPos === -1)
4630
4630
  return f;
4631
4631
  else if (lastPos < flen) {
4632
- str += f.slice(lastPos);
4632
+ str2 += f.slice(lastPos);
4633
4633
  }
4634
- return str;
4634
+ return str2;
4635
4635
  }
4636
4636
  }
4637
4637
  });
@@ -6255,7 +6255,7 @@ var require_tools = __commonJS({
6255
6255
  var transport = require_transport();
6256
6256
  var [nodeMajor] = process.versions.node.split(".").map((v) => Number(v));
6257
6257
  var asJsonChan = diagChan.tracingChannel("pino_asJson");
6258
- var asString = nodeMajor >= 25 ? (str) => JSON.stringify(str) : _asString;
6258
+ var asString = nodeMajor >= 25 ? (str2) => JSON.stringify(str2) : _asString;
6259
6259
  function noop() {
6260
6260
  }
6261
6261
  function genLog(level, hook) {
@@ -6293,38 +6293,38 @@ var require_tools = __commonJS({
6293
6293
  }
6294
6294
  }
6295
6295
  }
6296
- function _asString(str) {
6296
+ function _asString(str2) {
6297
6297
  let result = "";
6298
6298
  let last = 0;
6299
6299
  let found = false;
6300
6300
  let point = 255;
6301
- const l = str.length;
6301
+ const l = str2.length;
6302
6302
  if (l > 100) {
6303
- return JSON.stringify(str);
6303
+ return JSON.stringify(str2);
6304
6304
  }
6305
6305
  for (var i = 0; i < l && point >= 32; i++) {
6306
- point = str.charCodeAt(i);
6306
+ point = str2.charCodeAt(i);
6307
6307
  if (point === 34 || point === 92) {
6308
- result += str.slice(last, i) + "\\";
6308
+ result += str2.slice(last, i) + "\\";
6309
6309
  last = i;
6310
6310
  found = true;
6311
6311
  }
6312
6312
  }
6313
6313
  if (!found) {
6314
- result = str;
6314
+ result = str2;
6315
6315
  } else {
6316
- result += str.slice(last);
6316
+ result += str2.slice(last);
6317
6317
  }
6318
- return point < 32 ? JSON.stringify(str) : '"' + result + '"';
6318
+ return point < 32 ? JSON.stringify(str2) : '"' + result + '"';
6319
6319
  }
6320
- function asJson(obj, msg, num2, time) {
6320
+ function asJson(obj, msg, num3, time) {
6321
6321
  if (asJsonChan.hasSubscribers === false) {
6322
- return _asJson.call(this, obj, msg, num2, time);
6322
+ return _asJson.call(this, obj, msg, num3, time);
6323
6323
  }
6324
6324
  const store = { instance: this, arguments };
6325
- return asJsonChan.traceSync(_asJson, store, this, obj, msg, num2, time);
6325
+ return asJsonChan.traceSync(_asJson, store, this, obj, msg, num3, time);
6326
6326
  }
6327
- function _asJson(obj, msg, num2, time) {
6327
+ function _asJson(obj, msg, num3, time) {
6328
6328
  const stringify2 = this[stringifySym];
6329
6329
  const stringifySafe = this[stringifySafeSym];
6330
6330
  const stringifiers = this[stringifiersSym];
@@ -6334,7 +6334,7 @@ var require_tools = __commonJS({
6334
6334
  const formatters = this[formattersSym];
6335
6335
  const messageKey = this[messageKeySym];
6336
6336
  const errorKey = this[errorKeySym];
6337
- let data = this[lsCacheSym][num2] + time;
6337
+ let data = this[lsCacheSym][num3] + time;
6338
6338
  data = data + chindings;
6339
6339
  let value;
6340
6340
  if (formatters.log) {
@@ -6959,7 +6959,7 @@ var require_proto = __commonJS({
6959
6959
  function defaultMixinMergeStrategy(mergeObject, mixinObject) {
6960
6960
  return Object.assign(mixinObject, mergeObject);
6961
6961
  }
6962
- function write(_obj, msg, num2) {
6962
+ function write(_obj, msg, num3) {
6963
6963
  const t = this[timeSym]();
6964
6964
  const mixin = this[mixinSym];
6965
6965
  const errorKey = this[errorKeySym];
@@ -6981,12 +6981,12 @@ var require_proto = __commonJS({
6981
6981
  }
6982
6982
  }
6983
6983
  if (mixin) {
6984
- obj = mixinMergeStrategy(obj, mixin(obj, num2, this));
6984
+ obj = mixinMergeStrategy(obj, mixin(obj, num3, this));
6985
6985
  }
6986
- const s = this[asJsonSym](obj, msg, num2, t);
6986
+ const s = this[asJsonSym](obj, msg, num3, t);
6987
6987
  const stream = this[streamSym];
6988
6988
  if (stream[needsMetadataGsym] === true) {
6989
- stream.lastLevel = num2;
6989
+ stream.lastLevel = num3;
6990
6990
  stream.lastObj = obj;
6991
6991
  stream.lastMsg = msg;
6992
6992
  stream.lastTime = t.slice(this[timeSliceIndexSym]);
@@ -7019,11 +7019,11 @@ var require_safe_stable_stringify = __commonJS({
7019
7019
  exports2.configure = configure;
7020
7020
  module2.exports = stringify;
7021
7021
  var strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;
7022
- function strEscape(str) {
7023
- if (str.length < 5e3 && !strEscapeSequencesRegExp.test(str)) {
7024
- return `"${str}"`;
7022
+ function strEscape(str2) {
7023
+ if (str2.length < 5e3 && !strEscapeSequencesRegExp.test(str2)) {
7024
+ return `"${str2}"`;
7025
7025
  }
7026
- return JSON.stringify(str);
7026
+ return JSON.stringify(str2);
7027
7027
  }
7028
7028
  function sort(array, comparator) {
7029
7029
  if (array.length > 200 || comparator) {
@@ -8513,13 +8513,13 @@ var require_serializer = __commonJS({
8513
8513
  return "" + integer;
8514
8514
  }
8515
8515
  asNumber(i) {
8516
- const num2 = Number(i);
8517
- if (num2 !== num2) {
8516
+ const num3 = Number(i);
8517
+ if (num3 !== num3) {
8518
8518
  throw new Error(`The value "${i}" cannot be converted to a number.`);
8519
- } else if (num2 === Infinity || num2 === -Infinity) {
8519
+ } else if (num3 === Infinity || num3 === -Infinity) {
8520
8520
  return "null";
8521
8521
  } else {
8522
- return "" + num2;
8522
+ return "" + num3;
8523
8523
  }
8524
8524
  }
8525
8525
  asBoolean(bool) {
@@ -8555,8 +8555,8 @@ var require_serializer = __commonJS({
8555
8555
  }
8556
8556
  throw new Error(`The value "${date}" cannot be converted to a time.`);
8557
8557
  }
8558
- asString(str) {
8559
- const len2 = str.length;
8558
+ asString(str2) {
8559
+ const len2 = str2.length;
8560
8560
  if (len2 === 0) {
8561
8561
  return '""';
8562
8562
  } else if (len2 < 42) {
@@ -8564,25 +8564,25 @@ var require_serializer = __commonJS({
8564
8564
  let last = -1;
8565
8565
  let point = 255;
8566
8566
  for (let i = 0; i < len2; i++) {
8567
- point = str.charCodeAt(i);
8567
+ point = str2.charCodeAt(i);
8568
8568
  if (point === 34 || // '"'
8569
8569
  point === 92) {
8570
8570
  last === -1 && (last = 0);
8571
- result += str.slice(last, i) + "\\";
8571
+ result += str2.slice(last, i) + "\\";
8572
8572
  last = i;
8573
8573
  } else if (point < 32 || point >= 55296 && point <= 57343) {
8574
- return JSON.stringify(str);
8574
+ return JSON.stringify(str2);
8575
8575
  }
8576
8576
  }
8577
- return last === -1 && '"' + str + '"' || '"' + result + str.slice(last) + '"';
8578
- } else if (len2 < 5e3 && STR_ESCAPE.test(str) === false) {
8579
- return '"' + str + '"';
8577
+ return last === -1 && '"' + str2 + '"' || '"' + result + str2.slice(last) + '"';
8578
+ } else if (len2 < 5e3 && STR_ESCAPE.test(str2) === false) {
8579
+ return '"' + str2 + '"';
8580
8580
  } else {
8581
- return JSON.stringify(str);
8581
+ return JSON.stringify(str2);
8582
8582
  }
8583
8583
  }
8584
- asUnsafeString(str) {
8585
- return '"' + str + '"';
8584
+ asUnsafeString(str2) {
8585
+ return '"' + str2 + '"';
8586
8586
  }
8587
8587
  getState() {
8588
8588
  return this._options;
@@ -10712,11 +10712,11 @@ var require_proxy_addr = __commonJS({
10712
10712
  }
10713
10713
  function parseipNotation(note) {
10714
10714
  const pos2 = note.lastIndexOf("/");
10715
- const str = pos2 !== -1 ? note.substring(0, pos2) : note;
10716
- if (!isip(str)) {
10717
- throw new TypeError("invalid IP address: " + str);
10715
+ const str2 = pos2 !== -1 ? note.substring(0, pos2) : note;
10716
+ if (!isip(str2)) {
10717
+ throw new TypeError("invalid IP address: " + str2);
10718
10718
  }
10719
- let ip = parseip(str);
10719
+ let ip = parseip(str2);
10720
10720
  if (pos2 === -1 && ip.kind() === "ipv6" && ip.isIPv4MappedAddress()) {
10721
10721
  ip = ip.toIPv4Address();
10722
10722
  }
@@ -12426,7 +12426,7 @@ var require_code = __commonJS({
12426
12426
  }
12427
12427
  exports2._ = _;
12428
12428
  var plus = new _Code("+");
12429
- function str(strs, ...args) {
12429
+ function str2(strs, ...args) {
12430
12430
  const expr = [safeStringify(strs[0])];
12431
12431
  let i = 0;
12432
12432
  while (i < args.length) {
@@ -12437,7 +12437,7 @@ var require_code = __commonJS({
12437
12437
  optimize(expr);
12438
12438
  return new _Code(expr);
12439
12439
  }
12440
- exports2.str = str;
12440
+ exports2.str = str2;
12441
12441
  function addCodeArg(code, arg) {
12442
12442
  if (arg instanceof _Code)
12443
12443
  code.push(...arg._items);
@@ -12480,7 +12480,7 @@ var require_code = __commonJS({
12480
12480
  return;
12481
12481
  }
12482
12482
  function strConcat(c1, c2) {
12483
- return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`;
12483
+ return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str2`${c1}${c2}`;
12484
12484
  }
12485
12485
  exports2.strConcat = strConcat;
12486
12486
  function interpolate(x) {
@@ -13442,22 +13442,22 @@ var require_util = __commonJS({
13442
13442
  return (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;
13443
13443
  }
13444
13444
  exports2.schemaRefOrVal = schemaRefOrVal;
13445
- function unescapeFragment(str) {
13446
- return unescapeJsonPointer(decodeURIComponent(str));
13445
+ function unescapeFragment(str2) {
13446
+ return unescapeJsonPointer(decodeURIComponent(str2));
13447
13447
  }
13448
13448
  exports2.unescapeFragment = unescapeFragment;
13449
- function escapeFragment(str) {
13450
- return encodeURIComponent(escapeJsonPointer(str));
13449
+ function escapeFragment(str2) {
13450
+ return encodeURIComponent(escapeJsonPointer(str2));
13451
13451
  }
13452
13452
  exports2.escapeFragment = escapeFragment;
13453
- function escapeJsonPointer(str) {
13454
- if (typeof str == "number")
13455
- return `${str}`;
13456
- return str.replace(/~/g, "~0").replace(/\//g, "~1");
13453
+ function escapeJsonPointer(str2) {
13454
+ if (typeof str2 == "number")
13455
+ return `${str2}`;
13456
+ return str2.replace(/~/g, "~0").replace(/\//g, "~1");
13457
13457
  }
13458
13458
  exports2.escapeJsonPointer = escapeJsonPointer;
13459
- function unescapeJsonPointer(str) {
13460
- return str.replace(/~1/g, "/").replace(/~0/g, "~");
13459
+ function unescapeJsonPointer(str2) {
13460
+ return str2.replace(/~1/g, "/").replace(/~0/g, "~");
13461
13461
  }
13462
13462
  exports2.unescapeJsonPointer = unescapeJsonPointer;
13463
13463
  function eachItem(xs, f) {
@@ -14482,8 +14482,8 @@ var require_json_schema_traverse = __commonJS({
14482
14482
  post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
14483
14483
  }
14484
14484
  }
14485
- function escapeJsonPtr(str) {
14486
- return str.replace(/~/g, "~0").replace(/\//g, "~1");
14485
+ function escapeJsonPtr(str2) {
14486
+ return str2.replace(/~/g, "~0").replace(/\//g, "~1");
14487
14487
  }
14488
14488
  }
14489
14489
  });
@@ -15547,10 +15547,10 @@ var require_utils = __commonJS({
15547
15547
  return { host, isIPV6: false };
15548
15548
  }
15549
15549
  }
15550
- function findToken(str, token) {
15550
+ function findToken(str2, token) {
15551
15551
  let ind = 0;
15552
- for (let i = 0; i < str.length; i++) {
15553
- if (str[i] === token) ind++;
15552
+ for (let i = 0; i < str2.length; i++) {
15553
+ if (str2[i] === token) ind++;
15554
15554
  }
15555
15555
  return ind;
15556
15556
  }
@@ -16287,7 +16287,7 @@ var require_core = __commonJS({
16287
16287
  var util_1 = require_util();
16288
16288
  var $dataRefSchema = require_data();
16289
16289
  var uri_1 = require_uri();
16290
- var defaultRegExp = (str, flags) => new RegExp(str, flags);
16290
+ var defaultRegExp = (str2, flags) => new RegExp(str2, flags);
16291
16291
  defaultRegExp.code = "new RegExp";
16292
16292
  var META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"];
16293
16293
  var EXT_SCOPE_NAMES = /* @__PURE__ */ new Set([
@@ -17082,16 +17082,16 @@ var require_ucs2length = __commonJS({
17082
17082
  "node_modules/ajv/dist/runtime/ucs2length.js"(exports2) {
17083
17083
  "use strict";
17084
17084
  Object.defineProperty(exports2, "__esModule", { value: true });
17085
- function ucs2length(str) {
17086
- const len2 = str.length;
17085
+ function ucs2length(str2) {
17086
+ const len2 = str2.length;
17087
17087
  let length = 0;
17088
17088
  let pos2 = 0;
17089
17089
  let value;
17090
17090
  while (pos2 < len2) {
17091
17091
  length++;
17092
- value = str.charCodeAt(pos2++);
17092
+ value = str2.charCodeAt(pos2++);
17093
17093
  if (value >= 55296 && value <= 56319 && pos2 < len2) {
17094
- value = str.charCodeAt(pos2);
17094
+ value = str2.charCodeAt(pos2);
17095
17095
  if ((value & 64512) === 56320)
17096
17096
  pos2++;
17097
17097
  }
@@ -19007,13 +19007,13 @@ var require_timestamp = __commonJS({
19007
19007
  var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
19008
19008
  var TIME = /^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i;
19009
19009
  var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
19010
- function validTimestamp(str, allowDate) {
19011
- const dt = str.split(DT_SEPARATOR);
19010
+ function validTimestamp(str2, allowDate) {
19011
+ const dt = str2.split(DT_SEPARATOR);
19012
19012
  return dt.length === 2 && validDate(dt[0]) && validTime(dt[1]) || allowDate && dt.length === 1 && validDate(dt[0]);
19013
19013
  }
19014
19014
  exports2.default = validTimestamp;
19015
- function validDate(str) {
19016
- const matches = DATE.exec(str);
19015
+ function validDate(str2) {
19016
+ const matches = DATE.exec(str2);
19017
19017
  if (!matches)
19018
19018
  return false;
19019
19019
  const y = +matches[1];
@@ -19022,8 +19022,8 @@ var require_timestamp = __commonJS({
19022
19022
  return m >= 1 && m <= 12 && d >= 1 && (d <= DAYS[m] || // leap year: https://tools.ietf.org/html/rfc3339#appendix-C
19023
19023
  m === 2 && d === 29 && (y % 100 === 0 ? y % 400 === 0 : y % 4 === 0));
19024
19024
  }
19025
- function validTime(str) {
19026
- const matches = TIME.exec(str);
19025
+ function validTime(str2) {
19026
+ const matches = TIME.exec(str2);
19027
19027
  if (!matches)
19028
19028
  return false;
19029
19029
  const hr = +matches[1];
@@ -20086,7 +20086,7 @@ var require_parseJson = __commonJS({
20086
20086
  var CODE_A = "a".charCodeAt(0);
20087
20087
  var CODE_0 = "0".charCodeAt(0);
20088
20088
  function parseJsonString(s, pos2) {
20089
- let str = "";
20089
+ let str2 = "";
20090
20090
  let c;
20091
20091
  parseJsonString.message = void 0;
20092
20092
  while (true) {
@@ -20096,7 +20096,7 @@ var require_parseJson = __commonJS({
20096
20096
  if (c === "\\") {
20097
20097
  c = s[pos2];
20098
20098
  if (c in escapedChars) {
20099
- str += escapedChars[c];
20099
+ str2 += escapedChars[c];
20100
20100
  pos2++;
20101
20101
  } else if (c === "u") {
20102
20102
  pos2++;
@@ -20120,7 +20120,7 @@ var require_parseJson = __commonJS({
20120
20120
  }
20121
20121
  pos2++;
20122
20122
  }
20123
- str += String.fromCharCode(code);
20123
+ str2 += String.fromCharCode(code);
20124
20124
  } else {
20125
20125
  errorMessage(`unexpected token ${c}`);
20126
20126
  return void 0;
@@ -20130,7 +20130,7 @@ var require_parseJson = __commonJS({
20130
20130
  return void 0;
20131
20131
  } else {
20132
20132
  if (c.charCodeAt(0) >= 32) {
20133
- str += c;
20133
+ str2 += c;
20134
20134
  } else {
20135
20135
  errorMessage(`unexpected token ${c}`);
20136
20136
  return void 0;
@@ -20138,7 +20138,7 @@ var require_parseJson = __commonJS({
20138
20138
  }
20139
20139
  }
20140
20140
  parseJsonString.position = pos2;
20141
- return str;
20141
+ return str2;
20142
20142
  function errorMessage(msg) {
20143
20143
  parseJsonString.position = pos2;
20144
20144
  parseJsonString.message = msg;
@@ -20687,8 +20687,8 @@ var require_formats = __commonJS({
20687
20687
  }
20688
20688
  var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
20689
20689
  var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
20690
- function date(str) {
20691
- const matches = DATE.exec(str);
20690
+ function date(str2) {
20691
+ const matches = DATE.exec(str2);
20692
20692
  if (!matches)
20693
20693
  return false;
20694
20694
  const year = +matches[1];
@@ -20707,8 +20707,8 @@ var require_formats = __commonJS({
20707
20707
  }
20708
20708
  var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
20709
20709
  function getTime(strictTimeZone) {
20710
- return function time(str) {
20711
- const matches = TIME.exec(str);
20710
+ return function time(str2) {
20711
+ const matches = TIME.exec(str2);
20712
20712
  if (!matches)
20713
20713
  return false;
20714
20714
  const hr = +matches[1];
@@ -20754,8 +20754,8 @@ var require_formats = __commonJS({
20754
20754
  var DATE_TIME_SEPARATOR = /t|\s/i;
20755
20755
  function getDateTime(strictTimeZone) {
20756
20756
  const time = getTime(strictTimeZone);
20757
- return function date_time(str) {
20758
- const dateTime = str.split(DATE_TIME_SEPARATOR);
20757
+ return function date_time(str2) {
20758
+ const dateTime = str2.split(DATE_TIME_SEPARATOR);
20759
20759
  return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1]);
20760
20760
  };
20761
20761
  }
@@ -20780,13 +20780,13 @@ var require_formats = __commonJS({
20780
20780
  }
20781
20781
  var NOT_URI_FRAGMENT = /\/|:/;
20782
20782
  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;
20783
- function uri(str) {
20784
- return NOT_URI_FRAGMENT.test(str) && URI.test(str);
20783
+ function uri(str2) {
20784
+ return NOT_URI_FRAGMENT.test(str2) && URI.test(str2);
20785
20785
  }
20786
20786
  var BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
20787
- function byte(str) {
20787
+ function byte(str2) {
20788
20788
  BYTE.lastIndex = 0;
20789
- return BYTE.test(str);
20789
+ return BYTE.test(str2);
20790
20790
  }
20791
20791
  var MIN_INT32 = -(2 ** 31);
20792
20792
  var MAX_INT32 = 2 ** 31 - 1;
@@ -20800,11 +20800,11 @@ var require_formats = __commonJS({
20800
20800
  return true;
20801
20801
  }
20802
20802
  var Z_ANCHOR = /[^\\]\\Z/;
20803
- function regex(str) {
20804
- if (Z_ANCHOR.test(str))
20803
+ function regex(str2) {
20804
+ if (Z_ANCHOR.test(str2))
20805
20805
  return false;
20806
20806
  try {
20807
- new RegExp(str);
20807
+ new RegExp(str2);
20808
20808
  return true;
20809
20809
  } catch (e) {
20810
20810
  return false;
@@ -24673,9 +24673,9 @@ var require_semver = __commonJS({
24673
24673
  } else {
24674
24674
  this.prerelease = m[4].split(".").map((id) => {
24675
24675
  if (/^[0-9]+$/.test(id)) {
24676
- const num2 = +id;
24677
- if (num2 >= 0 && num2 < MAX_SAFE_INTEGER) {
24678
- return num2;
24676
+ const num3 = +id;
24677
+ if (num3 >= 0 && num3 < MAX_SAFE_INTEGER) {
24678
+ return num3;
24679
24679
  }
24680
24680
  }
24681
24681
  return id;
@@ -27282,24 +27282,24 @@ var require_querystring = __commonJS({
27282
27282
  0
27283
27283
  // 112 - 127
27284
27284
  ]);
27285
- function encodeString(str) {
27286
- const len2 = str.length;
27285
+ function encodeString(str2) {
27286
+ const len2 = str2.length;
27287
27287
  if (len2 === 0) return "";
27288
27288
  let out = "";
27289
27289
  let lastPos = 0;
27290
27290
  let i = 0;
27291
27291
  outer: for (; i < len2; i++) {
27292
- let c = str.charCodeAt(i);
27292
+ let c = str2.charCodeAt(i);
27293
27293
  while (c < 128) {
27294
27294
  if (noEscape[c] !== 1) {
27295
- if (lastPos < i) out += str.slice(lastPos, i);
27295
+ if (lastPos < i) out += str2.slice(lastPos, i);
27296
27296
  lastPos = i + 1;
27297
27297
  out += hexTable[c];
27298
27298
  }
27299
27299
  if (++i === len2) break outer;
27300
- c = str.charCodeAt(i);
27300
+ c = str2.charCodeAt(i);
27301
27301
  }
27302
- if (lastPos < i) out += str.slice(lastPos, i);
27302
+ if (lastPos < i) out += str2.slice(lastPos, i);
27303
27303
  if (c < 2048) {
27304
27304
  lastPos = i + 1;
27305
27305
  out += hexTable[192 | c >> 6] + hexTable[128 | c & 63];
@@ -27314,13 +27314,13 @@ var require_querystring = __commonJS({
27314
27314
  if (i >= len2) {
27315
27315
  throw new Error("URI malformed");
27316
27316
  }
27317
- const c2 = str.charCodeAt(i) & 1023;
27317
+ const c2 = str2.charCodeAt(i) & 1023;
27318
27318
  lastPos = i + 1;
27319
27319
  c = 65536 + ((c & 1023) << 10 | c2);
27320
27320
  out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
27321
27321
  }
27322
- if (lastPos === 0) return str;
27323
- if (lastPos < len2) return out + str.slice(lastPos);
27322
+ if (lastPos === 0) return str2;
27323
+ if (lastPos < len2) return out + str2.slice(lastPos);
27324
27324
  return out;
27325
27325
  }
27326
27326
  module2.exports = { encodeString };
@@ -27536,9 +27536,9 @@ var require_util2 = __commonJS({
27536
27536
  var types_1 = require_types4();
27537
27537
  var sets = __importStar(require_sets());
27538
27538
  var CTRL = "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?";
27539
- exports2.strToChars = (str) => {
27539
+ exports2.strToChars = (str2) => {
27540
27540
  const charsRegex = /(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;
27541
- return str.replace(charsRegex, (s, b, lbs, a16, b16, dctrl, eslsh) => {
27541
+ return str2.replace(charsRegex, (s, b, lbs, a16, b16, dctrl, eslsh) => {
27542
27542
  if (lbs) {
27543
27543
  return s;
27544
27544
  }
@@ -27554,11 +27554,11 @@ var require_util2 = __commonJS({
27554
27554
  return /[[\]{}^$.|?*+()]/.test(c) ? `\\${c}` : c;
27555
27555
  });
27556
27556
  };
27557
- exports2.tokenizeClass = (str, regexpStr) => {
27557
+ exports2.tokenizeClass = (str2, regexpStr) => {
27558
27558
  var _a2, _b2, _c, _d, _e, _f, _g;
27559
27559
  let tokens = [], rs, c;
27560
27560
  const regexp = /\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(((?:\\)])|(((?:\\)?([^\]])))))|(\])|(?:\\)?([^])/g;
27561
- while ((rs = regexp.exec(str)) !== null) {
27561
+ while ((rs = regexp.exec(str2)) !== null) {
27562
27562
  const p = (_g = (_f = (_e = (_d = (_c = (_b2 = (_a2 = rs[1] && sets.words()) !== null && _a2 !== void 0 ? _a2 : rs[2] && sets.ints()) !== null && _b2 !== void 0 ? _b2 : 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] && {
27563
27563
  type: types_1.types.RANGE,
27564
27564
  from: (rs[8] || rs[9]).charCodeAt(0),
@@ -27621,15 +27621,15 @@ var require_tokenizer = __commonJS({
27621
27621
  const repeatErr = (col) => {
27622
27622
  throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Nothing to repeat at column ${col - 1}`);
27623
27623
  };
27624
- let str = util.strToChars(regexpStr);
27625
- while (i < str.length) {
27626
- switch (c = str[i++]) {
27624
+ let str2 = util.strToChars(regexpStr);
27625
+ while (i < str2.length) {
27626
+ switch (c = str2[i++]) {
27627
27627
  // Handle escaped characters, inclues a few sets.
27628
27628
  case "\\":
27629
- if (i === str.length) {
27629
+ if (i === str2.length) {
27630
27630
  throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: \\ at end of pattern`);
27631
27631
  }
27632
- switch (c = str[i++]) {
27632
+ switch (c = str2[i++]) {
27633
27633
  case "b":
27634
27634
  last.push({ type: types_1.types.POSITION, value: "b" });
27635
27635
  break;
@@ -27657,8 +27657,8 @@ var require_tokenizer = __commonJS({
27657
27657
  default:
27658
27658
  if (digit.test(c)) {
27659
27659
  let digits = c;
27660
- while (i < str.length && digit.test(str[i])) {
27661
- digits += str[i++];
27660
+ while (i < str2.length && digit.test(str2[i])) {
27661
+ digits += str2[i++];
27662
27662
  }
27663
27663
  let value = parseInt(digits, 10);
27664
27664
  const reference = { type: types_1.types.REFERENCE, value };
@@ -27679,13 +27679,13 @@ var require_tokenizer = __commonJS({
27679
27679
  // Handle custom sets.
27680
27680
  case "[": {
27681
27681
  let not;
27682
- if (str[i] === "^") {
27682
+ if (str2[i] === "^") {
27683
27683
  not = true;
27684
27684
  i++;
27685
27685
  } else {
27686
27686
  not = false;
27687
27687
  }
27688
- let classTokens = util.tokenizeClass(str.slice(i), regexpStr);
27688
+ let classTokens = util.tokenizeClass(str2.slice(i), regexpStr);
27689
27689
  i += classTokens[1];
27690
27690
  last.push({
27691
27691
  type: types_1.types.SET,
@@ -27705,8 +27705,8 @@ var require_tokenizer = __commonJS({
27705
27705
  stack: [],
27706
27706
  remember: true
27707
27707
  };
27708
- if (str[i] === "?") {
27709
- c = str[i + 1];
27708
+ if (str2[i] === "?") {
27709
+ c = str2[i + 1];
27710
27710
  i += 2;
27711
27711
  if (c === "=") {
27712
27712
  group.followedBy = true;
@@ -27716,21 +27716,21 @@ var require_tokenizer = __commonJS({
27716
27716
  group.remember = false;
27717
27717
  } else if (c === "<") {
27718
27718
  let name = "";
27719
- if (captureGroupFirstChar.test(str[i])) {
27720
- name += str[i];
27719
+ if (captureGroupFirstChar.test(str2[i])) {
27720
+ name += str2[i];
27721
27721
  i++;
27722
27722
  } else {
27723
- throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Invalid capture group name, character '${str[i]}' after '<' at column ${i + 1}`);
27723
+ throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Invalid capture group name, character '${str2[i]}' after '<' at column ${i + 1}`);
27724
27724
  }
27725
- while (i < str.length && captureGroupChars.test(str[i])) {
27726
- name += str[i];
27725
+ while (i < str2.length && captureGroupChars.test(str2[i])) {
27726
+ name += str2[i];
27727
27727
  i++;
27728
27728
  }
27729
27729
  if (!name) {
27730
- throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Invalid capture group name, character '${str[i]}' after '<' at column ${i + 1}`);
27730
+ throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Invalid capture group name, character '${str2[i]}' after '<' at column ${i + 1}`);
27731
27731
  }
27732
- if (str[i] !== ">") {
27733
- throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Unclosed capture group name, expected '>', found '${str[i]}' at column ${i + 1}`);
27732
+ if (str2[i] !== ">") {
27733
+ throw new SyntaxError(`Invalid regular expression: /${regexpStr}/: Unclosed capture group name, expected '>', found '${str2[i]}' at column ${i + 1}`);
27734
27734
  }
27735
27735
  group.name = name;
27736
27736
  i++;
@@ -27773,7 +27773,7 @@ var require_tokenizer = __commonJS({
27773
27773
  // This design is chosen because there could be more than
27774
27774
  // one repetition symbols in a regex i.e. `a?+{2,3}`.
27775
27775
  case "{": {
27776
- let rs = /^(\d+)(,(\d+)?)?\}/.exec(str.slice(i)), min, max;
27776
+ let rs = /^(\d+)(,(\d+)?)?\}/.exec(str2.slice(i)), min, max;
27777
27777
  if (rs !== null) {
27778
27778
  if (last.length === 0) {
27779
27779
  repeatErr(i);
@@ -31737,25 +31737,25 @@ var require_dist4 = __commonJS({
31737
31737
  C.prototype = /* @__PURE__ */ Object.create(null);
31738
31738
  return C;
31739
31739
  })();
31740
- function parseCookie(str, options) {
31740
+ function parseCookie(str2, options) {
31741
31741
  const obj = new NullObject();
31742
- const len2 = str.length;
31742
+ const len2 = str2.length;
31743
31743
  if (len2 < 2)
31744
31744
  return obj;
31745
31745
  const dec = options?.decode || decode;
31746
31746
  let index = 0;
31747
31747
  do {
31748
- const eqIdx = eqIndex(str, index, len2);
31748
+ const eqIdx = eqIndex(str2, index, len2);
31749
31749
  if (eqIdx === -1)
31750
31750
  break;
31751
- const endIdx = endIndex(str, index, len2);
31751
+ const endIdx = endIndex(str2, index, len2);
31752
31752
  if (eqIdx > endIdx) {
31753
- index = str.lastIndexOf(";", eqIdx - 1) + 1;
31753
+ index = str2.lastIndexOf(";", eqIdx - 1) + 1;
31754
31754
  continue;
31755
31755
  }
31756
- const key = valueSlice(str, index, eqIdx);
31756
+ const key = valueSlice(str2, index, eqIdx);
31757
31757
  if (obj[key] === void 0) {
31758
- obj[key] = dec(valueSlice(str, eqIdx + 1, endIdx));
31758
+ obj[key] = dec(valueSlice(str2, eqIdx + 1, endIdx));
31759
31759
  }
31760
31760
  index = endIdx + 1;
31761
31761
  } while (index < len2);
@@ -31790,51 +31790,51 @@ var require_dist4 = __commonJS({
31790
31790
  if (!cookieValueRegExp.test(value)) {
31791
31791
  throw new TypeError(`argument val is invalid: ${cookie.value}`);
31792
31792
  }
31793
- let str = cookie.name + "=" + value;
31793
+ let str2 = cookie.name + "=" + value;
31794
31794
  if (cookie.maxAge !== void 0) {
31795
31795
  if (!Number.isInteger(cookie.maxAge)) {
31796
31796
  throw new TypeError(`option maxAge is invalid: ${cookie.maxAge}`);
31797
31797
  }
31798
- str += "; Max-Age=" + cookie.maxAge;
31798
+ str2 += "; Max-Age=" + cookie.maxAge;
31799
31799
  }
31800
31800
  if (cookie.domain) {
31801
31801
  if (!domainValueRegExp.test(cookie.domain)) {
31802
31802
  throw new TypeError(`option domain is invalid: ${cookie.domain}`);
31803
31803
  }
31804
- str += "; Domain=" + cookie.domain;
31804
+ str2 += "; Domain=" + cookie.domain;
31805
31805
  }
31806
31806
  if (cookie.path) {
31807
31807
  if (!pathValueRegExp.test(cookie.path)) {
31808
31808
  throw new TypeError(`option path is invalid: ${cookie.path}`);
31809
31809
  }
31810
- str += "; Path=" + cookie.path;
31810
+ str2 += "; Path=" + cookie.path;
31811
31811
  }
31812
31812
  if (cookie.expires) {
31813
31813
  if (!isDate(cookie.expires) || !Number.isFinite(cookie.expires.valueOf())) {
31814
31814
  throw new TypeError(`option expires is invalid: ${cookie.expires}`);
31815
31815
  }
31816
- str += "; Expires=" + cookie.expires.toUTCString();
31816
+ str2 += "; Expires=" + cookie.expires.toUTCString();
31817
31817
  }
31818
31818
  if (cookie.httpOnly) {
31819
- str += "; HttpOnly";
31819
+ str2 += "; HttpOnly";
31820
31820
  }
31821
31821
  if (cookie.secure) {
31822
- str += "; Secure";
31822
+ str2 += "; Secure";
31823
31823
  }
31824
31824
  if (cookie.partitioned) {
31825
- str += "; Partitioned";
31825
+ str2 += "; Partitioned";
31826
31826
  }
31827
31827
  if (cookie.priority) {
31828
31828
  const priority = typeof cookie.priority === "string" ? cookie.priority.toLowerCase() : void 0;
31829
31829
  switch (priority) {
31830
31830
  case "low":
31831
- str += "; Priority=Low";
31831
+ str2 += "; Priority=Low";
31832
31832
  break;
31833
31833
  case "medium":
31834
- str += "; Priority=Medium";
31834
+ str2 += "; Priority=Medium";
31835
31835
  break;
31836
31836
  case "high":
31837
- str += "; Priority=High";
31837
+ str2 += "; Priority=High";
31838
31838
  break;
31839
31839
  default:
31840
31840
  throw new TypeError(`option priority is invalid: ${cookie.priority}`);
@@ -31845,35 +31845,35 @@ var require_dist4 = __commonJS({
31845
31845
  switch (sameSite) {
31846
31846
  case true:
31847
31847
  case "strict":
31848
- str += "; SameSite=Strict";
31848
+ str2 += "; SameSite=Strict";
31849
31849
  break;
31850
31850
  case "lax":
31851
- str += "; SameSite=Lax";
31851
+ str2 += "; SameSite=Lax";
31852
31852
  break;
31853
31853
  case "none":
31854
- str += "; SameSite=None";
31854
+ str2 += "; SameSite=None";
31855
31855
  break;
31856
31856
  default:
31857
31857
  throw new TypeError(`option sameSite is invalid: ${cookie.sameSite}`);
31858
31858
  }
31859
31859
  }
31860
- return str;
31860
+ return str2;
31861
31861
  }
31862
- function parseSetCookie(str, options) {
31862
+ function parseSetCookie(str2, options) {
31863
31863
  const dec = options?.decode || decode;
31864
- const len2 = str.length;
31865
- const endIdx = endIndex(str, 0, len2);
31866
- const eqIdx = eqIndex(str, 0, endIdx);
31867
- const setCookie = eqIdx === -1 ? { name: "", value: dec(valueSlice(str, 0, endIdx)) } : {
31868
- name: valueSlice(str, 0, eqIdx),
31869
- value: dec(valueSlice(str, eqIdx + 1, endIdx))
31864
+ const len2 = str2.length;
31865
+ const endIdx = endIndex(str2, 0, len2);
31866
+ const eqIdx = eqIndex(str2, 0, endIdx);
31867
+ const setCookie = eqIdx === -1 ? { name: "", value: dec(valueSlice(str2, 0, endIdx)) } : {
31868
+ name: valueSlice(str2, 0, eqIdx),
31869
+ value: dec(valueSlice(str2, eqIdx + 1, endIdx))
31870
31870
  };
31871
31871
  let index = endIdx + 1;
31872
31872
  while (index < len2) {
31873
- const endIdx2 = endIndex(str, index, len2);
31874
- const eqIdx2 = eqIndex(str, index, endIdx2);
31875
- const attr = eqIdx2 === -1 ? valueSlice(str, index, endIdx2) : valueSlice(str, index, eqIdx2);
31876
- const val = eqIdx2 === -1 ? void 0 : valueSlice(str, eqIdx2 + 1, endIdx2);
31873
+ const endIdx2 = endIndex(str2, index, len2);
31874
+ const eqIdx2 = eqIndex(str2, index, endIdx2);
31875
+ const attr = eqIdx2 === -1 ? valueSlice(str2, index, endIdx2) : valueSlice(str2, index, eqIdx2);
31876
+ const val = eqIdx2 === -1 ? void 0 : valueSlice(str2, eqIdx2 + 1, endIdx2);
31877
31877
  switch (attr.toLowerCase()) {
31878
31878
  case "httponly":
31879
31879
  setCookie.httpOnly = true;
@@ -31922,37 +31922,37 @@ var require_dist4 = __commonJS({
31922
31922
  }
31923
31923
  return setCookie;
31924
31924
  }
31925
- function endIndex(str, min, len2) {
31926
- const index = str.indexOf(";", min);
31925
+ function endIndex(str2, min, len2) {
31926
+ const index = str2.indexOf(";", min);
31927
31927
  return index === -1 ? len2 : index;
31928
31928
  }
31929
- function eqIndex(str, min, max) {
31930
- const index = str.indexOf("=", min);
31929
+ function eqIndex(str2, min, max) {
31930
+ const index = str2.indexOf("=", min);
31931
31931
  return index < max ? index : -1;
31932
31932
  }
31933
- function valueSlice(str, min, max) {
31933
+ function valueSlice(str2, min, max) {
31934
31934
  let start = min;
31935
31935
  let end = max;
31936
31936
  do {
31937
- const code = str.charCodeAt(start);
31937
+ const code = str2.charCodeAt(start);
31938
31938
  if (code !== 32 && code !== 9)
31939
31939
  break;
31940
31940
  } while (++start < end);
31941
31941
  while (end > start) {
31942
- const code = str.charCodeAt(end - 1);
31942
+ const code = str2.charCodeAt(end - 1);
31943
31943
  if (code !== 32 && code !== 9)
31944
31944
  break;
31945
31945
  end--;
31946
31946
  }
31947
- return str.slice(start, end);
31947
+ return str2.slice(start, end);
31948
31948
  }
31949
- function decode(str) {
31950
- if (str.indexOf("%") === -1)
31951
- return str;
31949
+ function decode(str2) {
31950
+ if (str2.indexOf("%") === -1)
31951
+ return str2;
31952
31952
  try {
31953
- return decodeURIComponent(str);
31953
+ return decodeURIComponent(str2);
31954
31954
  } catch (e) {
31955
- return str;
31955
+ return str2;
31956
31956
  }
31957
31957
  }
31958
31958
  function isDate(val) {
@@ -32072,7 +32072,7 @@ var require_form_data = __commonJS({
32072
32072
  const boundary = `----formdata-${randomUUID5()}`;
32073
32073
  const prefix = `--${boundary}\r
32074
32074
  Content-Disposition: form-data`;
32075
- const escape2 = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22");
32075
+ const escape2 = (str2) => str2.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22");
32076
32076
  const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n");
32077
32077
  const linebreak = new Uint8Array([13, 10]);
32078
32078
  async function* asyncIterator() {
@@ -32318,8 +32318,8 @@ var require_set_cookie = __commonJS({
32318
32318
  function createNullObj() {
32319
32319
  return /* @__PURE__ */ Object.create(null);
32320
32320
  }
32321
- function isNonEmptyString(str) {
32322
- return typeof str === "string" && !!str.trim();
32321
+ function isNonEmptyString(str2) {
32322
+ return typeof str2 === "string" && !!str2.trim();
32323
32323
  }
32324
32324
  function parseString(setCookieValue, options) {
32325
32325
  var parts = setCookieValue.split(";").filter(isNonEmptyString);
@@ -32410,13 +32410,13 @@ var require_set_cookie = __commonJS({
32410
32410
  input = [input];
32411
32411
  }
32412
32412
  if (!options.map) {
32413
- return input.filter(isNonEmptyString).map(function(str) {
32414
- return parseString(str, options);
32413
+ return input.filter(isNonEmptyString).map(function(str2) {
32414
+ return parseString(str2, options);
32415
32415
  }).filter(Boolean);
32416
32416
  } else {
32417
32417
  var cookies = createNullObj();
32418
- return input.filter(isNonEmptyString).reduce(function(cookies2, str) {
32419
- var cookie = parseString(str, options);
32418
+ return input.filter(isNonEmptyString).reduce(function(cookies2, str2) {
32419
+ var cookie = parseString(str2, options);
32420
32420
  if (cookie && !isForbiddenKey(cookie.name)) {
32421
32421
  cookies2[cookie.name] = cookie;
32422
32422
  }
@@ -34476,38 +34476,38 @@ var require_commonjs = __commonJS({
34476
34476
  "use strict";
34477
34477
  Object.defineProperty(exports2, "__esModule", { value: true });
34478
34478
  exports2.range = exports2.balanced = void 0;
34479
- var balanced = (a, b, str) => {
34480
- const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
34481
- const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
34482
- const r = ma !== null && mb != null && (0, exports2.range)(ma, mb, str);
34479
+ var balanced = (a, b, str2) => {
34480
+ const ma = a instanceof RegExp ? maybeMatch(a, str2) : a;
34481
+ const mb = b instanceof RegExp ? maybeMatch(b, str2) : b;
34482
+ const r = ma !== null && mb != null && (0, exports2.range)(ma, mb, str2);
34483
34483
  return r && {
34484
34484
  start: r[0],
34485
34485
  end: r[1],
34486
- pre: str.slice(0, r[0]),
34487
- body: str.slice(r[0] + ma.length, r[1]),
34488
- post: str.slice(r[1] + mb.length)
34486
+ pre: str2.slice(0, r[0]),
34487
+ body: str2.slice(r[0] + ma.length, r[1]),
34488
+ post: str2.slice(r[1] + mb.length)
34489
34489
  };
34490
34490
  };
34491
34491
  exports2.balanced = balanced;
34492
- var maybeMatch = (reg2, str) => {
34493
- const m = str.match(reg2);
34492
+ var maybeMatch = (reg2, str2) => {
34493
+ const m = str2.match(reg2);
34494
34494
  return m ? m[0] : null;
34495
34495
  };
34496
- var range = (a, b, str) => {
34496
+ var range = (a, b, str2) => {
34497
34497
  let begs, beg, left, right = void 0, result;
34498
- let ai = str.indexOf(a);
34499
- let bi = str.indexOf(b, ai + 1);
34498
+ let ai = str2.indexOf(a);
34499
+ let bi = str2.indexOf(b, ai + 1);
34500
34500
  let i = ai;
34501
34501
  if (ai >= 0 && bi > 0) {
34502
34502
  if (a === b) {
34503
34503
  return [ai, bi];
34504
34504
  }
34505
34505
  begs = [];
34506
- left = str.length;
34506
+ left = str2.length;
34507
34507
  while (i >= 0 && !result) {
34508
34508
  if (i === ai) {
34509
34509
  begs.push(i);
34510
- ai = str.indexOf(a, i + 1);
34510
+ ai = str2.indexOf(a, i + 1);
34511
34511
  } else if (begs.length === 1) {
34512
34512
  const r = begs.pop();
34513
34513
  if (r !== void 0)
@@ -34518,7 +34518,7 @@ var require_commonjs = __commonJS({
34518
34518
  left = beg;
34519
34519
  right = bi;
34520
34520
  }
34521
- bi = str.indexOf(b, i + 1);
34521
+ bi = str2.indexOf(b, i + 1);
34522
34522
  }
34523
34523
  i = ai < bi && ai >= 0 ? ai : bi;
34524
34524
  }
@@ -34556,23 +34556,23 @@ var require_commonjs2 = __commonJS({
34556
34556
  var commaPattern = /\\,/g;
34557
34557
  var periodPattern = /\\\./g;
34558
34558
  exports2.EXPANSION_MAX = 1e5;
34559
- function numeric(str) {
34560
- return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
34559
+ function numeric(str2) {
34560
+ return !isNaN(str2) ? parseInt(str2, 10) : str2.charCodeAt(0);
34561
34561
  }
34562
- function escapeBraces(str) {
34563
- return str.replace(slashPattern, escSlash).replace(openPattern, escOpen).replace(closePattern, escClose).replace(commaPattern, escComma).replace(periodPattern, escPeriod);
34562
+ function escapeBraces(str2) {
34563
+ return str2.replace(slashPattern, escSlash).replace(openPattern, escOpen).replace(closePattern, escClose).replace(commaPattern, escComma).replace(periodPattern, escPeriod);
34564
34564
  }
34565
- function unescapeBraces(str) {
34566
- return str.replace(escSlashPattern, "\\").replace(escOpenPattern, "{").replace(escClosePattern, "}").replace(escCommaPattern, ",").replace(escPeriodPattern, ".");
34565
+ function unescapeBraces(str2) {
34566
+ return str2.replace(escSlashPattern, "\\").replace(escOpenPattern, "{").replace(escClosePattern, "}").replace(escCommaPattern, ",").replace(escPeriodPattern, ".");
34567
34567
  }
34568
- function parseCommaParts(str) {
34569
- if (!str) {
34568
+ function parseCommaParts(str2) {
34569
+ if (!str2) {
34570
34570
  return [""];
34571
34571
  }
34572
34572
  const parts = [];
34573
- const m = (0, balanced_match_1.balanced)("{", "}", str);
34573
+ const m = (0, balanced_match_1.balanced)("{", "}", str2);
34574
34574
  if (!m) {
34575
- return str.split(",");
34575
+ return str2.split(",");
34576
34576
  }
34577
34577
  const { pre, body, post } = m;
34578
34578
  const p = pre.split(",");
@@ -34586,18 +34586,18 @@ var require_commonjs2 = __commonJS({
34586
34586
  parts.push.apply(parts, p);
34587
34587
  return parts;
34588
34588
  }
34589
- function expand(str, options = {}) {
34590
- if (!str) {
34589
+ function expand(str2, options = {}) {
34590
+ if (!str2) {
34591
34591
  return [];
34592
34592
  }
34593
34593
  const { max = exports2.EXPANSION_MAX } = options;
34594
- if (str.slice(0, 2) === "{}") {
34595
- str = "\\{\\}" + str.slice(2);
34594
+ if (str2.slice(0, 2) === "{}") {
34595
+ str2 = "\\{\\}" + str2.slice(2);
34596
34596
  }
34597
- return expand_(escapeBraces(str), max, true).map(unescapeBraces);
34597
+ return expand_(escapeBraces(str2), max, true).map(unescapeBraces);
34598
34598
  }
34599
- function embrace(str) {
34600
- return "{" + str + "}";
34599
+ function embrace(str2) {
34600
+ return "{" + str2 + "}";
34601
34601
  }
34602
34602
  function isPadded(el) {
34603
34603
  return /^-?0\d/.test(el);
@@ -34608,11 +34608,11 @@ var require_commonjs2 = __commonJS({
34608
34608
  function gte(i, y) {
34609
34609
  return i >= y;
34610
34610
  }
34611
- function expand_(str, max, isTop) {
34611
+ function expand_(str2, max, isTop) {
34612
34612
  const expansions = [];
34613
- const m = (0, balanced_match_1.balanced)("{", "}", str);
34613
+ const m = (0, balanced_match_1.balanced)("{", "}", str2);
34614
34614
  if (!m)
34615
- return [str];
34615
+ return [str2];
34616
34616
  const pre = m.pre;
34617
34617
  const post = m.post.length ? expand_(m.post, max, false) : [""];
34618
34618
  if (/\$$/.test(m.pre)) {
@@ -34627,10 +34627,10 @@ var require_commonjs2 = __commonJS({
34627
34627
  const isOptions = m.body.indexOf(",") >= 0;
34628
34628
  if (!isSequence && !isOptions) {
34629
34629
  if (m.post.match(/,(?!,).*\}/)) {
34630
- str = m.pre + "{" + m.body + escClose + m.post;
34631
- return expand_(str, max, true);
34630
+ str2 = m.pre + "{" + m.body + escClose + m.post;
34631
+ return expand_(str2, max, true);
34632
34632
  }
34633
- return [str];
34633
+ return [str2];
34634
34634
  }
34635
34635
  let n;
34636
34636
  if (isSequence) {
@@ -35067,7 +35067,7 @@ var require_ast = __commonJS({
35067
35067
  }
35068
35068
  return c;
35069
35069
  }
35070
- static #parseAST(str, ast, pos2, opt, extDepth) {
35070
+ static #parseAST(str2, ast, pos2, opt, extDepth) {
35071
35071
  const maxDepth = opt.maxExtglobRecursion ?? 2;
35072
35072
  let escaping = false;
35073
35073
  let inBrace = false;
@@ -35076,8 +35076,8 @@ var require_ast = __commonJS({
35076
35076
  if (ast.type === null) {
35077
35077
  let i2 = pos2;
35078
35078
  let acc2 = "";
35079
- while (i2 < str.length) {
35080
- const c = str.charAt(i2++);
35079
+ while (i2 < str2.length) {
35080
+ const c = str2.charAt(i2++);
35081
35081
  if (escaping || c === "\\") {
35082
35082
  escaping = !escaping;
35083
35083
  acc2 += c;
@@ -35100,12 +35100,12 @@ var require_ast = __commonJS({
35100
35100
  acc2 += c;
35101
35101
  continue;
35102
35102
  }
35103
- const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i2) === "(" && extDepth <= maxDepth;
35103
+ const doRecurse = !opt.noext && isExtglobType(c) && str2.charAt(i2) === "(" && extDepth <= maxDepth;
35104
35104
  if (doRecurse) {
35105
35105
  ast.push(acc2);
35106
35106
  acc2 = "";
35107
35107
  const ext = new _a2(c, ast);
35108
- i2 = _a2.#parseAST(str, ext, i2, opt, extDepth + 1);
35108
+ i2 = _a2.#parseAST(str2, ext, i2, opt, extDepth + 1);
35109
35109
  ast.push(ext);
35110
35110
  continue;
35111
35111
  }
@@ -35118,8 +35118,8 @@ var require_ast = __commonJS({
35118
35118
  let part = new _a2(null, ast);
35119
35119
  const parts = [];
35120
35120
  let acc = "";
35121
- while (i < str.length) {
35122
- const c = str.charAt(i++);
35121
+ while (i < str2.length) {
35122
+ const c = str2.charAt(i++);
35123
35123
  if (escaping || c === "\\") {
35124
35124
  escaping = !escaping;
35125
35125
  acc += c;
@@ -35142,7 +35142,7 @@ var require_ast = __commonJS({
35142
35142
  acc += c;
35143
35143
  continue;
35144
35144
  }
35145
- const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i) === "(" && /* c8 ignore start - the maxDepth is sufficient here */
35145
+ const doRecurse = !opt.noext && isExtglobType(c) && str2.charAt(i) === "(" && /* c8 ignore start - the maxDepth is sufficient here */
35146
35146
  (extDepth <= maxDepth || ast && ast.#canAdoptType(c));
35147
35147
  if (doRecurse) {
35148
35148
  const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1;
@@ -35150,7 +35150,7 @@ var require_ast = __commonJS({
35150
35150
  acc = "";
35151
35151
  const ext = new _a2(c, part);
35152
35152
  part.push(ext);
35153
- i = _a2.#parseAST(str, ext, i, opt, extDepth + depthAdd);
35153
+ i = _a2.#parseAST(str2, ext, i, opt, extDepth + depthAdd);
35154
35154
  continue;
35155
35155
  }
35156
35156
  if (c === "|") {
@@ -35173,7 +35173,7 @@ var require_ast = __commonJS({
35173
35173
  }
35174
35174
  ast.type = null;
35175
35175
  ast.#hasMagic = void 0;
35176
- ast.#parts = [str.substring(pos2 - 1)];
35176
+ ast.#parts = [str2.substring(pos2 - 1)];
35177
35177
  return i;
35178
35178
  }
35179
35179
  #canAdoptWithSpace(child) {
@@ -40986,17 +40986,17 @@ var require_escape_html = __commonJS({
40986
40986
  var matchHtmlRegExp = /["'&<>]/;
40987
40987
  module2.exports = escapeHtml;
40988
40988
  function escapeHtml(string) {
40989
- var str = "" + string;
40990
- var match = matchHtmlRegExp.exec(str);
40989
+ var str2 = "" + string;
40990
+ var match = matchHtmlRegExp.exec(str2);
40991
40991
  if (!match) {
40992
- return str;
40992
+ return str2;
40993
40993
  }
40994
40994
  var escape2;
40995
40995
  var html = "";
40996
40996
  var index = 0;
40997
40997
  var lastIndex = 0;
40998
- for (index = match.index; index < str.length; index++) {
40999
- switch (str.charCodeAt(index)) {
40998
+ for (index = match.index; index < str2.length; index++) {
40999
+ switch (str2.charCodeAt(index)) {
41000
41000
  case 34:
41001
41001
  escape2 = "&quot;";
41002
41002
  break;
@@ -41016,12 +41016,12 @@ var require_escape_html = __commonJS({
41016
41016
  continue;
41017
41017
  }
41018
41018
  if (lastIndex !== index) {
41019
- html += str.substring(lastIndex, index);
41019
+ html += str2.substring(lastIndex, index);
41020
41020
  }
41021
41021
  lastIndex = index + 1;
41022
41022
  html += escape2;
41023
41023
  }
41024
- return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
41024
+ return lastIndex !== index ? html + str2.substring(lastIndex, index) : html;
41025
41025
  }
41026
41026
  }
41027
41027
  });
@@ -41036,24 +41036,24 @@ var require_dist5 = __commonJS({
41036
41036
  var DAY = HOUR * 24;
41037
41037
  var YEAR = DAY * 365.25;
41038
41038
  function parse(val) {
41039
- var num2, arr = val.toLowerCase().match(RGX);
41040
- if (arr != null && (num2 = parseFloat(arr[1]))) {
41041
- if (arr[3] != null) return num2 * SEC;
41042
- if (arr[4] != null) return num2 * MIN;
41043
- if (arr[5] != null) return num2 * HOUR;
41044
- if (arr[6] != null) return num2 * DAY;
41045
- if (arr[7] != null) return num2 * DAY * 7;
41046
- if (arr[8] != null) return num2 * YEAR;
41047
- return num2;
41048
- }
41049
- }
41050
- function fmt(val, pfx, str, long) {
41051
- var num2 = (val | 0) === val ? val : ~~(val + 0.5);
41052
- return pfx + num2 + (long ? " " + str + (num2 != 1 ? "s" : "") : str[0]);
41053
- }
41054
- function format(num2, long) {
41055
- var pfx = num2 < 0 ? "-" : "", abs = num2 < 0 ? -num2 : num2;
41056
- if (abs < SEC) return num2 + (long ? " ms" : "ms");
41039
+ var num3, arr = val.toLowerCase().match(RGX);
41040
+ if (arr != null && (num3 = parseFloat(arr[1]))) {
41041
+ if (arr[3] != null) return num3 * SEC;
41042
+ if (arr[4] != null) return num3 * MIN;
41043
+ if (arr[5] != null) return num3 * HOUR;
41044
+ if (arr[6] != null) return num3 * DAY;
41045
+ if (arr[7] != null) return num3 * DAY * 7;
41046
+ if (arr[8] != null) return num3 * YEAR;
41047
+ return num3;
41048
+ }
41049
+ }
41050
+ function fmt(val, pfx, str2, long) {
41051
+ var num3 = (val | 0) === val ? val : ~~(val + 0.5);
41052
+ return pfx + num3 + (long ? " " + str2 + (num3 != 1 ? "s" : "") : str2[0]);
41053
+ }
41054
+ function format(num3, long) {
41055
+ var pfx = num3 < 0 ? "-" : "", abs = num3 < 0 ? -num3 : num3;
41056
+ if (abs < SEC) return num3 + (long ? " ms" : "ms");
41057
41057
  if (abs < MIN) return fmt(abs / SEC, pfx, "second", long);
41058
41058
  if (abs < HOUR) return fmt(abs / MIN, pfx, "minute", long);
41059
41059
  if (abs < DAY) return fmt(abs / HOUR, pfx, "hour", long);
@@ -41069,13 +41069,13 @@ var require_dist5 = __commonJS({
41069
41069
  var require_collapseLeadingSlashes = __commonJS({
41070
41070
  "node_modules/@fastify/send/lib/collapseLeadingSlashes.js"(exports2, module2) {
41071
41071
  "use strict";
41072
- function collapseLeadingSlashes(str) {
41073
- if (str[0] !== "/" || str[1] !== "/") {
41074
- return str;
41072
+ function collapseLeadingSlashes(str2) {
41073
+ if (str2[0] !== "/" || str2[1] !== "/") {
41074
+ return str2;
41075
41075
  }
41076
- for (let i = 2, il = str.length; i < il; ++i) {
41077
- if (str[i] !== "/") {
41078
- return str.slice(i - 1);
41076
+ for (let i = 2, il = str2.length; i < il; ++i) {
41077
+ if (str2[i] !== "/") {
41078
+ return str2.slice(i - 1);
41079
41079
  }
41080
41080
  }
41081
41081
  }
@@ -41150,8 +41150,8 @@ var require_normalizeList = __commonJS({
41150
41150
  var require_parseBytesRange = __commonJS({
41151
41151
  "node_modules/@fastify/send/lib/parseBytesRange.js"(exports2, module2) {
41152
41152
  "use strict";
41153
- function parseBytesRange(size, str) {
41154
- const values = str.slice(str.indexOf("=") + 1);
41153
+ function parseBytesRange(size, str2) {
41154
+ const values = str2.slice(str2.indexOf("=") + 1);
41155
41155
  const ranges = [];
41156
41156
  const len2 = values.length;
41157
41157
  let i = 0;
@@ -41230,12 +41230,12 @@ var require_parseTokenList = __commonJS({
41230
41230
  "node_modules/@fastify/send/lib/parseTokenList.js"(exports2, module2) {
41231
41231
  "use strict";
41232
41232
  var slice = String.prototype.slice;
41233
- function parseTokenList(str, cb) {
41233
+ function parseTokenList(str2, cb) {
41234
41234
  let end = 0;
41235
41235
  let start = 0;
41236
41236
  let result;
41237
- for (let i = 0, len2 = str.length; i < len2; i++) {
41238
- switch (str.charCodeAt(i)) {
41237
+ for (let i = 0, len2 = str2.length; i < len2; i++) {
41238
+ switch (str2.charCodeAt(i)) {
41239
41239
  case 32:
41240
41240
  if (start === end) {
41241
41241
  start = end = i + 1;
@@ -41243,7 +41243,7 @@ var require_parseTokenList = __commonJS({
41243
41243
  break;
41244
41244
  case 44:
41245
41245
  if (start !== end) {
41246
- result = cb(slice.call(str, start, end));
41246
+ result = cb(slice.call(str2, start, end));
41247
41247
  if (result !== void 0) {
41248
41248
  return result;
41249
41249
  }
@@ -41256,7 +41256,7 @@ var require_parseTokenList = __commonJS({
41256
41256
  }
41257
41257
  }
41258
41258
  if (start !== end) {
41259
- return cb(slice.call(str, start, end));
41259
+ return cb(slice.call(str2, start, end));
41260
41260
  }
41261
41261
  }
41262
41262
  module2.exports.parseTokenList = parseTokenList;
@@ -41269,8 +41269,8 @@ var require_depd = __commonJS({
41269
41269
  var relative3 = require("path").relative;
41270
41270
  module2.exports = depd;
41271
41271
  var basePath = process.cwd();
41272
- function containsNamespace(str, namespace) {
41273
- var vals = str.split(/[ ,]+/);
41272
+ function containsNamespace(str2, namespace) {
41273
+ var vals = str2.split(/[ ,]+/);
41274
41274
  var ns = String(namespace).toLowerCase();
41275
41275
  for (var i = 0; i < vals.length; i++) {
41276
41276
  var val = vals[i];
@@ -41297,21 +41297,21 @@ var require_depd = __commonJS({
41297
41297
  return descriptor;
41298
41298
  }
41299
41299
  function createArgumentsString(arity) {
41300
- var str = "";
41300
+ var str2 = "";
41301
41301
  for (var i = 0; i < arity; i++) {
41302
- str += ", arg" + i;
41302
+ str2 += ", arg" + i;
41303
41303
  }
41304
- return str.substr(2);
41304
+ return str2.substr(2);
41305
41305
  }
41306
41306
  function createStackString(stack) {
41307
- var str = this.name + ": " + this.namespace;
41307
+ var str2 = this.name + ": " + this.namespace;
41308
41308
  if (this.message) {
41309
- str += " deprecated " + this.message;
41309
+ str2 += " deprecated " + this.message;
41310
41310
  }
41311
41311
  for (var i = 0; i < stack.length; i++) {
41312
- str += "\n at " + stack[i].toString();
41312
+ str2 += "\n at " + stack[i].toString();
41313
41313
  }
41314
- return str;
41314
+ return str2;
41315
41315
  }
41316
41316
  function depd(namespace) {
41317
41317
  if (!namespace) {
@@ -41340,15 +41340,15 @@ var require_depd = __commonJS({
41340
41340
  if (process.noDeprecation) {
41341
41341
  return true;
41342
41342
  }
41343
- var str = process.env.NO_DEPRECATION || "";
41344
- return containsNamespace(str, namespace);
41343
+ var str2 = process.env.NO_DEPRECATION || "";
41344
+ return containsNamespace(str2, namespace);
41345
41345
  }
41346
41346
  function istraced(namespace) {
41347
41347
  if (process.traceDeprecation) {
41348
41348
  return true;
41349
41349
  }
41350
- var str = process.env.TRACE_DEPRECATION || "";
41351
- return containsNamespace(str, namespace);
41350
+ var str2 = process.env.TRACE_DEPRECATION || "";
41351
+ return containsNamespace(str2, namespace);
41352
41352
  }
41353
41353
  function log2(message, site) {
41354
41354
  var haslisteners = eehaslisteners(process, "deprecation");
@@ -41782,8 +41782,8 @@ var require_toidentifier = __commonJS({
41782
41782
  "node_modules/toidentifier/index.js"(exports2, module2) {
41783
41783
  "use strict";
41784
41784
  module2.exports = toIdentifier;
41785
- function toIdentifier(str) {
41786
- return str.split(" ").map(function(token) {
41785
+ function toIdentifier(str2) {
41786
+ return str2.split(" ").map(function(token) {
41787
41787
  return token.slice(0, 1).toUpperCase() + token.slice(1);
41788
41788
  }).join("").replace(/[^ _0-9a-z]/gi, "");
41789
41789
  }
@@ -42521,7 +42521,7 @@ var require_accept_negotiator = __commonJS({
42521
42521
  var QUALITY = 2;
42522
42522
  var END = 3;
42523
42523
  function parse(header, processMatch) {
42524
- let str = "";
42524
+ let str2 = "";
42525
42525
  let quality;
42526
42526
  let state2 = BEGIN;
42527
42527
  for (let i = 0, il = header.length; i < il; ++i) {
@@ -42536,19 +42536,19 @@ var require_accept_negotiator = __commonJS({
42536
42536
  continue;
42537
42537
  } else if (char === ",") {
42538
42538
  if (state2 === TOKEN) {
42539
- if (processMatch(str, 1)) {
42539
+ if (processMatch(str2, 1)) {
42540
42540
  state2 = END;
42541
42541
  break;
42542
42542
  }
42543
42543
  state2 = BEGIN;
42544
- str = "";
42544
+ str2 = "";
42545
42545
  } else if (state2 === QUALITY) {
42546
- if (processMatch(str, parseFloat(quality) || 0)) {
42546
+ if (processMatch(str2, parseFloat(quality) || 0)) {
42547
42547
  state2 = END;
42548
42548
  break;
42549
42549
  }
42550
42550
  state2 = BEGIN;
42551
- str = "";
42551
+ str2 = "";
42552
42552
  quality = "";
42553
42553
  }
42554
42554
  continue;
@@ -42561,29 +42561,29 @@ var require_accept_negotiator = __commonJS({
42561
42561
  }
42562
42562
  } else if (state2 === BEGIN) {
42563
42563
  state2 = TOKEN;
42564
- str += char;
42564
+ str2 += char;
42565
42565
  continue;
42566
42566
  }
42567
42567
  if (state2 === TOKEN) {
42568
42568
  const prevChar = header[i - 1];
42569
42569
  if (prevChar === " " || prevChar === " ") {
42570
- str = "";
42570
+ str2 = "";
42571
42571
  }
42572
- str += char;
42572
+ str2 += char;
42573
42573
  continue;
42574
42574
  }
42575
- if (processMatch(str, parseFloat(quality) || 0)) {
42575
+ if (processMatch(str2, parseFloat(quality) || 0)) {
42576
42576
  state2 = END;
42577
42577
  break;
42578
42578
  }
42579
42579
  state2 = BEGIN;
42580
- str = char;
42580
+ str2 = char;
42581
42581
  quality = "";
42582
42582
  }
42583
42583
  if (state2 === TOKEN) {
42584
- processMatch(str, 1);
42584
+ processMatch(str2, 1);
42585
42585
  } else if (state2 === QUALITY) {
42586
- processMatch(str, parseFloat(quality) || 0);
42586
+ processMatch(str2, parseFloat(quality) || 0);
42587
42587
  }
42588
42588
  }
42589
42589
  module2.exports = negotiate;
@@ -42723,8 +42723,8 @@ var require_content_disposition = __commonJS({
42723
42723
  }
42724
42724
  return string;
42725
42725
  }
42726
- function decodefield(str) {
42727
- var match = EXT_VALUE_REGEXP.exec(str);
42726
+ function decodefield(str2) {
42727
+ var match = EXT_VALUE_REGEXP.exec(str2);
42728
42728
  if (!match) {
42729
42729
  throw new TypeError("invalid extended field value");
42730
42730
  }
@@ -42792,19 +42792,19 @@ var require_content_disposition = __commonJS({
42792
42792
  }
42793
42793
  return new ContentDisposition(type, params);
42794
42794
  }
42795
- function pdecode(str, hex) {
42795
+ function pdecode(str2, hex) {
42796
42796
  return String.fromCharCode(parseInt(hex, 16));
42797
42797
  }
42798
42798
  function pencode(char) {
42799
42799
  return "%" + String(char).charCodeAt(0).toString(16).toUpperCase();
42800
42800
  }
42801
42801
  function qstring(val) {
42802
- var str = String(val);
42803
- return '"' + str.replace(QUOTE_REGEXP, "\\$1") + '"';
42802
+ var str2 = String(val);
42803
+ return '"' + str2.replace(QUOTE_REGEXP, "\\$1") + '"';
42804
42804
  }
42805
42805
  function ustring(val) {
42806
- var str = String(val);
42807
- var encoded = encodeURIComponent(str).replace(ENCODE_URL_ATTR_CHAR_REGEXP, pencode);
42806
+ var str2 = String(val);
42807
+ var encoded = encodeURIComponent(str2).replace(ENCODE_URL_ATTR_CHAR_REGEXP, pencode);
42808
42808
  return "UTF-8''" + encoded;
42809
42809
  }
42810
42810
  function ContentDisposition(type, parameters) {
@@ -44386,13 +44386,13 @@ var require_Collection = __commonJS({
44386
44386
  var require_stringifyComment = __commonJS({
44387
44387
  "node_modules/yaml/dist/stringify/stringifyComment.js"(exports2) {
44388
44388
  "use strict";
44389
- var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
44389
+ var stringifyComment = (str2) => str2.replace(/^(?!$)(?: $)?/gm, "#");
44390
44390
  function indentComment(comment, indent) {
44391
44391
  if (/^\n+$/.test(comment))
44392
44392
  return comment.substring(1);
44393
44393
  return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;
44394
44394
  }
44395
- var lineComment = (str, indent, comment) => str.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str.endsWith(" ") ? "" : " ") + comment;
44395
+ var lineComment = (str2, indent, comment) => str2.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str2.endsWith(" ") ? "" : " ") + comment;
44396
44396
  exports2.indentComment = indentComment;
44397
44397
  exports2.lineComment = lineComment;
44398
44398
  exports2.stringifyComment = stringifyComment;
@@ -44546,16 +44546,16 @@ var require_stringifyString = __commonJS({
44546
44546
  lineWidth: ctx.options.lineWidth,
44547
44547
  minContentWidth: ctx.options.minContentWidth
44548
44548
  });
44549
- var containsDocumentMarker = (str) => /^(%|---|\.\.\.)/m.test(str);
44550
- function lineLengthOverLimit(str, lineWidth, indentLength) {
44549
+ var containsDocumentMarker = (str2) => /^(%|---|\.\.\.)/m.test(str2);
44550
+ function lineLengthOverLimit(str2, lineWidth, indentLength) {
44551
44551
  if (!lineWidth || lineWidth < 0)
44552
44552
  return false;
44553
44553
  const limit = lineWidth - indentLength;
44554
- const strLen = str.length;
44554
+ const strLen = str2.length;
44555
44555
  if (strLen <= limit)
44556
44556
  return false;
44557
44557
  for (let i = 0, start = 0; i < strLen; ++i) {
44558
- if (str[i] === "\n") {
44558
+ if (str2[i] === "\n") {
44559
44559
  if (i - start > limit)
44560
44560
  return true;
44561
44561
  start = i + 1;
@@ -44572,11 +44572,11 @@ var require_stringifyString = __commonJS({
44572
44572
  const { implicitKey } = ctx;
44573
44573
  const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;
44574
44574
  const indent = ctx.indent || (containsDocumentMarker(value) ? " " : "");
44575
- let str = "";
44575
+ let str2 = "";
44576
44576
  let start = 0;
44577
44577
  for (let i = 0, ch2 = json[i]; ch2; ch2 = json[++i]) {
44578
44578
  if (ch2 === " " && json[i + 1] === "\\" && json[i + 2] === "n") {
44579
- str += json.slice(start, i) + "\\ ";
44579
+ str2 += json.slice(start, i) + "\\ ";
44580
44580
  i += 1;
44581
44581
  start = i;
44582
44582
  ch2 = "\\";
@@ -44585,38 +44585,38 @@ var require_stringifyString = __commonJS({
44585
44585
  switch (json[i + 1]) {
44586
44586
  case "u":
44587
44587
  {
44588
- str += json.slice(start, i);
44588
+ str2 += json.slice(start, i);
44589
44589
  const code = json.substr(i + 2, 4);
44590
44590
  switch (code) {
44591
44591
  case "0000":
44592
- str += "\\0";
44592
+ str2 += "\\0";
44593
44593
  break;
44594
44594
  case "0007":
44595
- str += "\\a";
44595
+ str2 += "\\a";
44596
44596
  break;
44597
44597
  case "000b":
44598
- str += "\\v";
44598
+ str2 += "\\v";
44599
44599
  break;
44600
44600
  case "001b":
44601
- str += "\\e";
44601
+ str2 += "\\e";
44602
44602
  break;
44603
44603
  case "0085":
44604
- str += "\\N";
44604
+ str2 += "\\N";
44605
44605
  break;
44606
44606
  case "00a0":
44607
- str += "\\_";
44607
+ str2 += "\\_";
44608
44608
  break;
44609
44609
  case "2028":
44610
- str += "\\L";
44610
+ str2 += "\\L";
44611
44611
  break;
44612
44612
  case "2029":
44613
- str += "\\P";
44613
+ str2 += "\\P";
44614
44614
  break;
44615
44615
  default:
44616
44616
  if (code.substr(0, 2) === "00")
44617
- str += "\\x" + code.substr(2);
44617
+ str2 += "\\x" + code.substr(2);
44618
44618
  else
44619
- str += json.substr(i, 6);
44619
+ str2 += json.substr(i, 6);
44620
44620
  }
44621
44621
  i += 5;
44622
44622
  start = i + 1;
@@ -44626,14 +44626,14 @@ var require_stringifyString = __commonJS({
44626
44626
  if (implicitKey || json[i + 2] === '"' || json.length < minMultiLineLength) {
44627
44627
  i += 1;
44628
44628
  } else {
44629
- str += json.slice(start, i) + "\n\n";
44629
+ str2 += json.slice(start, i) + "\n\n";
44630
44630
  while (json[i + 2] === "\\" && json[i + 3] === "n" && json[i + 4] !== '"') {
44631
- str += "\n";
44631
+ str2 += "\n";
44632
44632
  i += 2;
44633
44633
  }
44634
- str += indent;
44634
+ str2 += indent;
44635
44635
  if (json[i + 2] === " ")
44636
- str += "\\";
44636
+ str2 += "\\";
44637
44637
  i += 1;
44638
44638
  start = i + 1;
44639
44639
  }
@@ -44642,8 +44642,8 @@ var require_stringifyString = __commonJS({
44642
44642
  i += 1;
44643
44643
  }
44644
44644
  }
44645
- str = start ? str + json.slice(start) : json;
44646
- return implicitKey ? str : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false));
44645
+ str2 = start ? str2 + json.slice(start) : json;
44646
+ return implicitKey ? str2 : foldFlowLines.foldFlowLines(str2, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false));
44647
44647
  }
44648
44648
  function singleQuotedString(value, ctx) {
44649
44649
  if (ctx.options.singleQuote === false || ctx.implicitKey && value.includes("\n") || /[ \t]\n|\n[ \t]/.test(value))
@@ -44771,15 +44771,15 @@ ${indent}${start}${value}${end}`;
44771
44771
  return quotedString(value, ctx);
44772
44772
  }
44773
44773
  }
44774
- const str = value.replace(/\n+/g, `$&
44774
+ const str2 = value.replace(/\n+/g, `$&
44775
44775
  ${indent}`);
44776
44776
  if (actualString) {
44777
- const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(str);
44777
+ const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(str2);
44778
44778
  const { compat, tags } = ctx.doc.schema;
44779
44779
  if (tags.some(test) || compat?.some(test))
44780
44780
  return quotedString(value, ctx);
44781
44781
  }
44782
- return implicitKey ? str : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false));
44782
+ return implicitKey ? str2 : foldFlowLines.foldFlowLines(str2, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false));
44783
44783
  }
44784
44784
  function stringifyString(item, ctx, onComment, onChompKeep) {
44785
44785
  const { implicitKey, inFlow } = ctx;
@@ -44931,11 +44931,11 @@ var require_stringify2 = __commonJS({
44931
44931
  const props = stringifyProps(node, tagObj, ctx);
44932
44932
  if (props.length > 0)
44933
44933
  ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
44934
- const str = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : identity.isScalar(node) ? stringifyString.stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep);
44934
+ const str2 = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : identity.isScalar(node) ? stringifyString.stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep);
44935
44935
  if (!props)
44936
- return str;
44937
- return identity.isScalar(node) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props}
44938
- ${ctx.indent}${str}`;
44936
+ return str2;
44937
+ return identity.isScalar(node) || str2[0] === "{" || str2[0] === "[" ? `${props} ${str2}` : `${props}
44938
+ ${ctx.indent}${str2}`;
44939
44939
  }
44940
44940
  exports2.createStringifyContext = createStringifyContext;
44941
44941
  exports2.stringify = stringify;
@@ -44970,8 +44970,8 @@ var require_stringifyPair = __commonJS({
44970
44970
  });
44971
44971
  let keyCommentDone = false;
44972
44972
  let chompKeep = false;
44973
- let str = stringify.stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true);
44974
- if (!explicitKey && !ctx.inFlow && str.length > 1024) {
44973
+ let str2 = stringify.stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true);
44974
+ if (!explicitKey && !ctx.inFlow && str2.length > 1024) {
44975
44975
  if (simpleKeys)
44976
44976
  throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
44977
44977
  explicitKey = true;
@@ -44980,27 +44980,27 @@ var require_stringifyPair = __commonJS({
44980
44980
  if (allNullValues || value == null) {
44981
44981
  if (keyCommentDone && onComment)
44982
44982
  onComment();
44983
- return str === "" ? "?" : explicitKey ? `? ${str}` : str;
44983
+ return str2 === "" ? "?" : explicitKey ? `? ${str2}` : str2;
44984
44984
  }
44985
44985
  } else if (allNullValues && !simpleKeys || value == null && explicitKey) {
44986
- str = `? ${str}`;
44986
+ str2 = `? ${str2}`;
44987
44987
  if (keyComment && !keyCommentDone) {
44988
- str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));
44988
+ str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment));
44989
44989
  } else if (chompKeep && onChompKeep)
44990
44990
  onChompKeep();
44991
- return str;
44991
+ return str2;
44992
44992
  }
44993
44993
  if (keyCommentDone)
44994
44994
  keyComment = null;
44995
44995
  if (explicitKey) {
44996
44996
  if (keyComment)
44997
- str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));
44998
- str = `? ${str}
44997
+ str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment));
44998
+ str2 = `? ${str2}
44999
44999
  ${indent}:`;
45000
45000
  } else {
45001
- str = `${str}:`;
45001
+ str2 = `${str2}:`;
45002
45002
  if (keyComment)
45003
- str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));
45003
+ str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment));
45004
45004
  }
45005
45005
  let vsb, vcb, valueComment;
45006
45006
  if (identity.isNode(value)) {
@@ -45016,7 +45016,7 @@ ${indent}:`;
45016
45016
  }
45017
45017
  ctx.implicitKey = false;
45018
45018
  if (!explicitKey && !keyComment && identity.isScalar(value))
45019
- ctx.indentAtStart = str.length + 1;
45019
+ ctx.indentAtStart = str2.length + 1;
45020
45020
  chompKeep = false;
45021
45021
  if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && identity.isSeq(value) && !value.flow && !value.tag && !value.anchor) {
45022
45022
  ctx.indent = ctx.indent.substring(2);
@@ -45060,16 +45060,16 @@ ${ctx.indent}`;
45060
45060
  } else if (valueStr === "" || valueStr[0] === "\n") {
45061
45061
  ws = "";
45062
45062
  }
45063
- str += ws + valueStr;
45063
+ str2 += ws + valueStr;
45064
45064
  if (ctx.inFlow) {
45065
45065
  if (valueCommentDone && onComment)
45066
45066
  onComment();
45067
45067
  } else if (valueComment && !valueCommentDone) {
45068
- str += stringifyComment.lineComment(str, ctx.indent, commentString(valueComment));
45068
+ str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(valueComment));
45069
45069
  } else if (chompKeep && onChompKeep) {
45070
45070
  onChompKeep();
45071
45071
  }
45072
- return str;
45072
+ return str2;
45073
45073
  }
45074
45074
  exports2.stringifyPair = stringifyPair;
45075
45075
  }
@@ -45296,31 +45296,31 @@ var require_stringifyCollection = __commonJS({
45296
45296
  }
45297
45297
  }
45298
45298
  chompKeep = false;
45299
- let str2 = stringify.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);
45299
+ let str3 = stringify.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);
45300
45300
  if (comment2)
45301
- str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment2));
45301
+ str3 += stringifyComment.lineComment(str3, itemIndent, commentString(comment2));
45302
45302
  if (chompKeep && comment2)
45303
45303
  chompKeep = false;
45304
- lines.push(blockItemPrefix + str2);
45304
+ lines.push(blockItemPrefix + str3);
45305
45305
  }
45306
- let str;
45306
+ let str2;
45307
45307
  if (lines.length === 0) {
45308
- str = flowChars.start + flowChars.end;
45308
+ str2 = flowChars.start + flowChars.end;
45309
45309
  } else {
45310
- str = lines[0];
45310
+ str2 = lines[0];
45311
45311
  for (let i = 1; i < lines.length; ++i) {
45312
45312
  const line = lines[i];
45313
- str += line ? `
45313
+ str2 += line ? `
45314
45314
  ${indent}${line}` : "\n";
45315
45315
  }
45316
45316
  }
45317
45317
  if (comment) {
45318
- str += "\n" + stringifyComment.indentComment(commentString(comment), indent);
45318
+ str2 += "\n" + stringifyComment.indentComment(commentString(comment), indent);
45319
45319
  if (onComment)
45320
45320
  onComment();
45321
45321
  } else if (chompKeep && onChompKeep)
45322
45322
  onChompKeep();
45323
- return str;
45323
+ return str2;
45324
45324
  }
45325
45325
  function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
45326
45326
  const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;
@@ -45363,21 +45363,21 @@ ${indent}${line}` : "\n";
45363
45363
  }
45364
45364
  if (comment)
45365
45365
  reqNewline = true;
45366
- let str = stringify.stringify(item, itemCtx, () => comment = null);
45367
- reqNewline || (reqNewline = lines.length > linesAtValue || str.includes("\n"));
45366
+ let str2 = stringify.stringify(item, itemCtx, () => comment = null);
45367
+ reqNewline || (reqNewline = lines.length > linesAtValue || str2.includes("\n"));
45368
45368
  if (i < items.length - 1) {
45369
- str += ",";
45369
+ str2 += ",";
45370
45370
  } else if (ctx.options.trailingComma) {
45371
45371
  if (ctx.options.lineWidth > 0) {
45372
- reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str.length + 2) > ctx.options.lineWidth);
45372
+ reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str2.length + 2) > ctx.options.lineWidth);
45373
45373
  }
45374
45374
  if (reqNewline) {
45375
- str += ",";
45375
+ str2 += ",";
45376
45376
  }
45377
45377
  }
45378
45378
  if (comment)
45379
- str += stringifyComment.lineComment(str, itemIndent, commentString(comment));
45380
- lines.push(str);
45379
+ str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment));
45380
+ lines.push(str2);
45381
45381
  linesAtValue = lines.length;
45382
45382
  }
45383
45383
  const { start, end } = flowChars;
@@ -45389,11 +45389,11 @@ ${indent}${line}` : "\n";
45389
45389
  reqNewline = ctx.options.lineWidth > 0 && len2 > ctx.options.lineWidth;
45390
45390
  }
45391
45391
  if (reqNewline) {
45392
- let str = start;
45392
+ let str2 = start;
45393
45393
  for (const line of lines)
45394
- str += line ? `
45394
+ str2 += line ? `
45395
45395
  ${indentStep}${indent}${line}` : "\n";
45396
- return `${str}
45396
+ return `${str2}
45397
45397
  ${indent}${end}`;
45398
45398
  } else {
45399
45399
  return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`;
@@ -45725,7 +45725,7 @@ var require_string = __commonJS({
45725
45725
  identify: (value) => typeof value === "string",
45726
45726
  default: true,
45727
45727
  tag: "tag:yaml.org,2002:str",
45728
- resolve: (str) => str,
45728
+ resolve: (str2) => str2,
45729
45729
  stringify(item, ctx, onComment, onChompKeep) {
45730
45730
  ctx = Object.assign({ actualString: true }, ctx);
45731
45731
  return stringifyString.stringifyString(item, ctx, onComment, onChompKeep);
@@ -45763,7 +45763,7 @@ var require_bool = __commonJS({
45763
45763
  default: true,
45764
45764
  tag: "tag:yaml.org,2002:bool",
45765
45765
  test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
45766
- resolve: (str) => new Scalar.Scalar(str[0] === "t" || str[0] === "T"),
45766
+ resolve: (str2) => new Scalar.Scalar(str2[0] === "t" || str2[0] === "T"),
45767
45767
  stringify({ source, value }, ctx) {
45768
45768
  if (source && boolTag.test.test(source)) {
45769
45769
  const sv = source[0] === "t" || source[0] === "T";
@@ -45784,9 +45784,9 @@ var require_stringifyNumber = __commonJS({
45784
45784
  function stringifyNumber({ format, minFractionDigits, tag, value }) {
45785
45785
  if (typeof value === "bigint")
45786
45786
  return String(value);
45787
- const num2 = typeof value === "number" ? value : Number(value);
45788
- if (!isFinite(num2))
45789
- return isNaN(num2) ? ".nan" : num2 < 0 ? "-.inf" : ".inf";
45787
+ const num3 = typeof value === "number" ? value : Number(value);
45788
+ if (!isFinite(num3))
45789
+ return isNaN(num3) ? ".nan" : num3 < 0 ? "-.inf" : ".inf";
45790
45790
  let n = Object.is(value, -0) ? "-0" : JSON.stringify(value);
45791
45791
  if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^-?\d/.test(n) && !n.includes("e")) {
45792
45792
  let i = n.indexOf(".");
@@ -45815,7 +45815,7 @@ var require_float = __commonJS({
45815
45815
  default: true,
45816
45816
  tag: "tag:yaml.org,2002:float",
45817
45817
  test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
45818
- resolve: (str) => str.slice(-3).toLowerCase() === "nan" ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
45818
+ resolve: (str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
45819
45819
  stringify: stringifyNumber.stringifyNumber
45820
45820
  };
45821
45821
  var floatExp = {
@@ -45824,10 +45824,10 @@ var require_float = __commonJS({
45824
45824
  tag: "tag:yaml.org,2002:float",
45825
45825
  format: "EXP",
45826
45826
  test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
45827
- resolve: (str) => parseFloat(str),
45827
+ resolve: (str2) => parseFloat(str2),
45828
45828
  stringify(node) {
45829
- const num2 = Number(node.value);
45830
- return isFinite(num2) ? num2.toExponential() : stringifyNumber.stringifyNumber(node);
45829
+ const num3 = Number(node.value);
45830
+ return isFinite(num3) ? num3.toExponential() : stringifyNumber.stringifyNumber(node);
45831
45831
  }
45832
45832
  };
45833
45833
  var float = {
@@ -45835,11 +45835,11 @@ var require_float = __commonJS({
45835
45835
  default: true,
45836
45836
  tag: "tag:yaml.org,2002:float",
45837
45837
  test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
45838
- resolve(str) {
45839
- const node = new Scalar.Scalar(parseFloat(str));
45840
- const dot = str.indexOf(".");
45841
- if (dot !== -1 && str[str.length - 1] === "0")
45842
- node.minFractionDigits = str.length - dot - 1;
45838
+ resolve(str2) {
45839
+ const node = new Scalar.Scalar(parseFloat(str2));
45840
+ const dot = str2.indexOf(".");
45841
+ if (dot !== -1 && str2[str2.length - 1] === "0")
45842
+ node.minFractionDigits = str2.length - dot - 1;
45843
45843
  return node;
45844
45844
  },
45845
45845
  stringify: stringifyNumber.stringifyNumber
@@ -45856,7 +45856,7 @@ var require_int = __commonJS({
45856
45856
  "use strict";
45857
45857
  var stringifyNumber = require_stringifyNumber();
45858
45858
  var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
45859
- var intResolve = (str, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix);
45859
+ var intResolve = (str2, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2.substring(offset), radix);
45860
45860
  function intStringify(node, radix, prefix) {
45861
45861
  const { value } = node;
45862
45862
  if (intIdentify(value) && value >= 0)
@@ -45869,7 +45869,7 @@ var require_int = __commonJS({
45869
45869
  tag: "tag:yaml.org,2002:int",
45870
45870
  format: "OCT",
45871
45871
  test: /^0o[0-7]+$/,
45872
- resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt),
45872
+ resolve: (str2, _onError, opt) => intResolve(str2, 2, 8, opt),
45873
45873
  stringify: (node) => intStringify(node, 8, "0o")
45874
45874
  };
45875
45875
  var int = {
@@ -45877,7 +45877,7 @@ var require_int = __commonJS({
45877
45877
  default: true,
45878
45878
  tag: "tag:yaml.org,2002:int",
45879
45879
  test: /^[-+]?[0-9]+$/,
45880
- resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),
45880
+ resolve: (str2, _onError, opt) => intResolve(str2, 0, 10, opt),
45881
45881
  stringify: stringifyNumber.stringifyNumber
45882
45882
  };
45883
45883
  var intHex = {
@@ -45886,7 +45886,7 @@ var require_int = __commonJS({
45886
45886
  tag: "tag:yaml.org,2002:int",
45887
45887
  format: "HEX",
45888
45888
  test: /^0x[0-9a-fA-F]+$/,
45889
- resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),
45889
+ resolve: (str2, _onError, opt) => intResolve(str2, 2, 16, opt),
45890
45890
  stringify: (node) => intStringify(node, 16, "0x")
45891
45891
  };
45892
45892
  exports2.int = int;
@@ -45939,7 +45939,7 @@ var require_schema2 = __commonJS({
45939
45939
  identify: (value) => typeof value === "string",
45940
45940
  default: true,
45941
45941
  tag: "tag:yaml.org,2002:str",
45942
- resolve: (str) => str,
45942
+ resolve: (str2) => str2,
45943
45943
  stringify: stringifyJSON
45944
45944
  },
45945
45945
  {
@@ -45956,7 +45956,7 @@ var require_schema2 = __commonJS({
45956
45956
  default: true,
45957
45957
  tag: "tag:yaml.org,2002:bool",
45958
45958
  test: /^true$|^false$/,
45959
- resolve: (str) => str === "true",
45959
+ resolve: (str2) => str2 === "true",
45960
45960
  stringify: stringifyJSON
45961
45961
  },
45962
45962
  {
@@ -45964,7 +45964,7 @@ var require_schema2 = __commonJS({
45964
45964
  default: true,
45965
45965
  tag: "tag:yaml.org,2002:int",
45966
45966
  test: /^-?(?:0|[1-9][0-9]*)$/,
45967
- resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10),
45967
+ resolve: (str2, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2, 10),
45968
45968
  stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)
45969
45969
  },
45970
45970
  {
@@ -45972,7 +45972,7 @@ var require_schema2 = __commonJS({
45972
45972
  default: true,
45973
45973
  tag: "tag:yaml.org,2002:float",
45974
45974
  test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
45975
- resolve: (str) => parseFloat(str),
45975
+ resolve: (str2) => parseFloat(str2),
45976
45976
  stringify: stringifyJSON
45977
45977
  }
45978
45978
  ];
@@ -45980,9 +45980,9 @@ var require_schema2 = __commonJS({
45980
45980
  default: true,
45981
45981
  tag: "",
45982
45982
  test: /^/,
45983
- resolve(str, onError) {
45984
- onError(`Unresolved plain scalar ${JSON.stringify(str)}`);
45985
- return str;
45983
+ resolve(str2, onError) {
45984
+ onError(`Unresolved plain scalar ${JSON.stringify(str2)}`);
45985
+ return str2;
45986
45986
  }
45987
45987
  };
45988
45988
  var schema = [map.map, seq.seq].concat(jsonScalars, jsonError);
@@ -46014,10 +46014,10 @@ var require_binary = __commonJS({
46014
46014
  if (typeof node_buffer.Buffer === "function") {
46015
46015
  return node_buffer.Buffer.from(src, "base64");
46016
46016
  } else if (typeof atob === "function") {
46017
- const str = atob(src.replace(/[\n\r]/g, ""));
46018
- const buffer = new Uint8Array(str.length);
46019
- for (let i = 0; i < str.length; ++i)
46020
- buffer[i] = str.charCodeAt(i);
46017
+ const str2 = atob(src.replace(/[\n\r]/g, ""));
46018
+ const buffer = new Uint8Array(str2.length);
46019
+ for (let i = 0; i < str2.length; ++i)
46020
+ buffer[i] = str2.charCodeAt(i);
46021
46021
  return buffer;
46022
46022
  } else {
46023
46023
  onError("This environment does not support reading binary tags; either Buffer or atob is required");
@@ -46028,28 +46028,28 @@ var require_binary = __commonJS({
46028
46028
  if (!value)
46029
46029
  return "";
46030
46030
  const buf = value;
46031
- let str;
46031
+ let str2;
46032
46032
  if (typeof node_buffer.Buffer === "function") {
46033
- str = buf instanceof node_buffer.Buffer ? buf.toString("base64") : node_buffer.Buffer.from(buf.buffer).toString("base64");
46033
+ str2 = buf instanceof node_buffer.Buffer ? buf.toString("base64") : node_buffer.Buffer.from(buf.buffer).toString("base64");
46034
46034
  } else if (typeof btoa === "function") {
46035
46035
  let s = "";
46036
46036
  for (let i = 0; i < buf.length; ++i)
46037
46037
  s += String.fromCharCode(buf[i]);
46038
- str = btoa(s);
46038
+ str2 = btoa(s);
46039
46039
  } else {
46040
46040
  throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
46041
46041
  }
46042
46042
  type ?? (type = Scalar.Scalar.BLOCK_LITERAL);
46043
46043
  if (type !== Scalar.Scalar.QUOTE_DOUBLE) {
46044
46044
  const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
46045
- const n = Math.ceil(str.length / lineWidth);
46045
+ const n = Math.ceil(str2.length / lineWidth);
46046
46046
  const lines = new Array(n);
46047
46047
  for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {
46048
- lines[i] = str.substr(o, lineWidth);
46048
+ lines[i] = str2.substr(o, lineWidth);
46049
46049
  }
46050
- str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " ");
46050
+ str2 = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " ");
46051
46051
  }
46052
- return stringifyString.stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep);
46052
+ return stringifyString.stringifyString({ comment, type, value: str2 }, ctx, onComment, onChompKeep);
46053
46053
  }
46054
46054
  };
46055
46055
  exports2.binary = binary;
@@ -46255,7 +46255,7 @@ var require_float2 = __commonJS({
46255
46255
  default: true,
46256
46256
  tag: "tag:yaml.org,2002:float",
46257
46257
  test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
46258
- resolve: (str) => str.slice(-3).toLowerCase() === "nan" ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
46258
+ resolve: (str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
46259
46259
  stringify: stringifyNumber.stringifyNumber
46260
46260
  };
46261
46261
  var floatExp = {
@@ -46264,10 +46264,10 @@ var require_float2 = __commonJS({
46264
46264
  tag: "tag:yaml.org,2002:float",
46265
46265
  format: "EXP",
46266
46266
  test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,
46267
- resolve: (str) => parseFloat(str.replace(/_/g, "")),
46267
+ resolve: (str2) => parseFloat(str2.replace(/_/g, "")),
46268
46268
  stringify(node) {
46269
- const num2 = Number(node.value);
46270
- return isFinite(num2) ? num2.toExponential() : stringifyNumber.stringifyNumber(node);
46269
+ const num3 = Number(node.value);
46270
+ return isFinite(num3) ? num3.toExponential() : stringifyNumber.stringifyNumber(node);
46271
46271
  }
46272
46272
  };
46273
46273
  var float = {
@@ -46275,11 +46275,11 @@ var require_float2 = __commonJS({
46275
46275
  default: true,
46276
46276
  tag: "tag:yaml.org,2002:float",
46277
46277
  test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
46278
- resolve(str) {
46279
- const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, "")));
46280
- const dot = str.indexOf(".");
46278
+ resolve(str2) {
46279
+ const node = new Scalar.Scalar(parseFloat(str2.replace(/_/g, "")));
46280
+ const dot = str2.indexOf(".");
46281
46281
  if (dot !== -1) {
46282
- const f = str.substring(dot + 1).replace(/_/g, "");
46282
+ const f = str2.substring(dot + 1).replace(/_/g, "");
46283
46283
  if (f[f.length - 1] === "0")
46284
46284
  node.minFractionDigits = f.length;
46285
46285
  }
@@ -46299,34 +46299,34 @@ var require_int2 = __commonJS({
46299
46299
  "use strict";
46300
46300
  var stringifyNumber = require_stringifyNumber();
46301
46301
  var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
46302
- function intResolve(str, offset, radix, { intAsBigInt }) {
46303
- const sign = str[0];
46302
+ function intResolve(str2, offset, radix, { intAsBigInt }) {
46303
+ const sign = str2[0];
46304
46304
  if (sign === "-" || sign === "+")
46305
46305
  offset += 1;
46306
- str = str.substring(offset).replace(/_/g, "");
46306
+ str2 = str2.substring(offset).replace(/_/g, "");
46307
46307
  if (intAsBigInt) {
46308
46308
  switch (radix) {
46309
46309
  case 2:
46310
- str = `0b${str}`;
46310
+ str2 = `0b${str2}`;
46311
46311
  break;
46312
46312
  case 8:
46313
- str = `0o${str}`;
46313
+ str2 = `0o${str2}`;
46314
46314
  break;
46315
46315
  case 16:
46316
- str = `0x${str}`;
46316
+ str2 = `0x${str2}`;
46317
46317
  break;
46318
46318
  }
46319
- const n2 = BigInt(str);
46319
+ const n2 = BigInt(str2);
46320
46320
  return sign === "-" ? BigInt(-1) * n2 : n2;
46321
46321
  }
46322
- const n = parseInt(str, radix);
46322
+ const n = parseInt(str2, radix);
46323
46323
  return sign === "-" ? -1 * n : n;
46324
46324
  }
46325
46325
  function intStringify(node, radix, prefix) {
46326
46326
  const { value } = node;
46327
46327
  if (intIdentify(value)) {
46328
- const str = value.toString(radix);
46329
- return value < 0 ? "-" + prefix + str.substr(1) : prefix + str;
46328
+ const str2 = value.toString(radix);
46329
+ return value < 0 ? "-" + prefix + str2.substr(1) : prefix + str2;
46330
46330
  }
46331
46331
  return stringifyNumber.stringifyNumber(node);
46332
46332
  }
@@ -46336,7 +46336,7 @@ var require_int2 = __commonJS({
46336
46336
  tag: "tag:yaml.org,2002:int",
46337
46337
  format: "BIN",
46338
46338
  test: /^[-+]?0b[0-1_]+$/,
46339
- resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt),
46339
+ resolve: (str2, _onError, opt) => intResolve(str2, 2, 2, opt),
46340
46340
  stringify: (node) => intStringify(node, 2, "0b")
46341
46341
  };
46342
46342
  var intOct = {
@@ -46345,7 +46345,7 @@ var require_int2 = __commonJS({
46345
46345
  tag: "tag:yaml.org,2002:int",
46346
46346
  format: "OCT",
46347
46347
  test: /^[-+]?0[0-7_]+$/,
46348
- resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt),
46348
+ resolve: (str2, _onError, opt) => intResolve(str2, 1, 8, opt),
46349
46349
  stringify: (node) => intStringify(node, 8, "0")
46350
46350
  };
46351
46351
  var int = {
@@ -46353,7 +46353,7 @@ var require_int2 = __commonJS({
46353
46353
  default: true,
46354
46354
  tag: "tag:yaml.org,2002:int",
46355
46355
  test: /^[-+]?[0-9][0-9_]*$/,
46356
- resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),
46356
+ resolve: (str2, _onError, opt) => intResolve(str2, 0, 10, opt),
46357
46357
  stringify: stringifyNumber.stringifyNumber
46358
46358
  };
46359
46359
  var intHex = {
@@ -46362,7 +46362,7 @@ var require_int2 = __commonJS({
46362
46362
  tag: "tag:yaml.org,2002:int",
46363
46363
  format: "HEX",
46364
46364
  test: /^[-+]?0x[0-9a-fA-F_]+$/,
46365
- resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),
46365
+ resolve: (str2, _onError, opt) => intResolve(str2, 2, 16, opt),
46366
46366
  stringify: (node) => intStringify(node, 16, "0x")
46367
46367
  };
46368
46368
  exports2.int = int;
@@ -46466,26 +46466,26 @@ var require_timestamp2 = __commonJS({
46466
46466
  "node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports2) {
46467
46467
  "use strict";
46468
46468
  var stringifyNumber = require_stringifyNumber();
46469
- function parseSexagesimal(str, asBigInt) {
46470
- const sign = str[0];
46471
- const parts = sign === "-" || sign === "+" ? str.substring(1) : str;
46472
- const num2 = (n) => asBigInt ? BigInt(n) : Number(n);
46473
- const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num2(60) + num2(p), num2(0));
46474
- return sign === "-" ? num2(-1) * res : res;
46469
+ function parseSexagesimal(str2, asBigInt) {
46470
+ const sign = str2[0];
46471
+ const parts = sign === "-" || sign === "+" ? str2.substring(1) : str2;
46472
+ const num3 = (n) => asBigInt ? BigInt(n) : Number(n);
46473
+ const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num3(60) + num3(p), num3(0));
46474
+ return sign === "-" ? num3(-1) * res : res;
46475
46475
  }
46476
46476
  function stringifySexagesimal(node) {
46477
46477
  let { value } = node;
46478
- let num2 = (n) => n;
46478
+ let num3 = (n) => n;
46479
46479
  if (typeof value === "bigint")
46480
- num2 = (n) => BigInt(n);
46480
+ num3 = (n) => BigInt(n);
46481
46481
  else if (isNaN(value) || !isFinite(value))
46482
46482
  return stringifyNumber.stringifyNumber(node);
46483
46483
  let sign = "";
46484
46484
  if (value < 0) {
46485
46485
  sign = "-";
46486
- value *= num2(-1);
46486
+ value *= num3(-1);
46487
46487
  }
46488
- const _60 = num2(60);
46488
+ const _60 = num3(60);
46489
46489
  const parts = [value % _60];
46490
46490
  if (value < 60) {
46491
46491
  parts.unshift(0);
@@ -46505,7 +46505,7 @@ var require_timestamp2 = __commonJS({
46505
46505
  tag: "tag:yaml.org,2002:int",
46506
46506
  format: "TIME",
46507
46507
  test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
46508
- resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt),
46508
+ resolve: (str2, _onError, { intAsBigInt }) => parseSexagesimal(str2, intAsBigInt),
46509
46509
  stringify: stringifySexagesimal
46510
46510
  };
46511
46511
  var floatTime = {
@@ -46514,7 +46514,7 @@ var require_timestamp2 = __commonJS({
46514
46514
  tag: "tag:yaml.org,2002:float",
46515
46515
  format: "TIME",
46516
46516
  test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
46517
- resolve: (str) => parseSexagesimal(str, false),
46517
+ resolve: (str2) => parseSexagesimal(str2, false),
46518
46518
  stringify: stringifySexagesimal
46519
46519
  };
46520
46520
  var timestamp = {
@@ -46525,8 +46525,8 @@ var require_timestamp2 = __commonJS({
46525
46525
  // may be omitted altogether, resulting in a date format. In such a case, the time part is
46526
46526
  // assumed to be 00:00:00Z (start of day, UTC).
46527
46527
  test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
46528
- resolve(str) {
46529
- const match = str.match(timestamp.test);
46528
+ resolve(str2) {
46529
+ const match = str2.match(timestamp.test);
46530
46530
  if (!match)
46531
46531
  throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
46532
46532
  const [, year, month, day2, hour2, minute, second] = match.map(Number);
@@ -53093,7 +53093,7 @@ function appVersion() {
53093
53093
  return resolveVersion({
53094
53094
  isSea: isSea2(),
53095
53095
  sqVersionXml: readSqVersionXml(),
53096
- define: true ? "0.76.0" : void 0,
53096
+ define: true ? "0.77.0" : void 0,
53097
53097
  pkgVersion: readPkgVersion()
53098
53098
  });
53099
53099
  }
@@ -53103,7 +53103,7 @@ function resolveChannel(s) {
53103
53103
  return "dev";
53104
53104
  }
53105
53105
  function appChannel() {
53106
- return resolveChannel({ isSea: isSea2(), define: true ? "0.76.0" : void 0 });
53106
+ return resolveChannel({ isSea: isSea2(), define: true ? "0.77.0" : void 0 });
53107
53107
  }
53108
53108
 
53109
53109
  // workflow-update.ts
@@ -53994,21 +53994,21 @@ function sanitizeRecipe(raw) {
53994
53994
  if (!raw || typeof raw !== "object") return void 0;
53995
53995
  const r = raw;
53996
53996
  if (typeof r.kind !== "string" || !r.kind || !r.params || typeof r.params !== "object") return void 0;
53997
- const num2 = {};
53997
+ const num3 = {};
53998
53998
  for (const [k, v] of Object.entries(r.params)) {
53999
- if (typeof v === "number" && isFinite(v)) num2[k] = v;
53999
+ if (typeof v === "number" && isFinite(v)) num3[k] = v;
54000
54000
  }
54001
54001
  if (r.kind === "base-plate") {
54002
54002
  const params = {};
54003
54003
  for (const [k, [lo, hi]] of Object.entries(BASE_PLATE_PARAMS)) {
54004
- if (k in num2) {
54005
- if (!(num2[k] >= lo && num2[k] <= hi)) return void 0;
54006
- params[k] = num2[k];
54004
+ if (k in num3) {
54005
+ if (!(num3[k] >= lo && num3[k] <= hi)) return void 0;
54006
+ params[k] = num3[k];
54007
54007
  }
54008
54008
  }
54009
54009
  return Object.keys(params).length ? { kind: r.kind, params } : void 0;
54010
54010
  }
54011
- return Object.keys(num2).length ? { kind: r.kind, params: num2 } : void 0;
54011
+ return Object.keys(num3).length ? { kind: r.kind, params: num3 } : void 0;
54012
54012
  }
54013
54013
  async function extractConnection(companionId, ifcPath, id) {
54014
54014
  await ensureConnectionReader();
@@ -54437,6 +54437,318 @@ function readVersion(id, n) {
54437
54437
  return null;
54438
54438
  }
54439
54439
  }
54440
+ function readVersionSkeleton(id, n) {
54441
+ try {
54442
+ const snap = JSON.parse((0, import_node_fs21.readFileSync)((0, import_node_path19.join)(versionsDir(id), `${n}.json`), "utf8"));
54443
+ return snap.contract;
54444
+ } catch {
54445
+ return null;
54446
+ }
54447
+ }
54448
+
54449
+ // bom-format.ts
54450
+ var round1 = (n) => Math.round(n * 10) / 10;
54451
+ function contractToBom(contractInput) {
54452
+ const c = contractInput ?? {};
54453
+ const weights = c.weights ?? {};
54454
+ const agg = /* @__PURE__ */ new Map();
54455
+ for (const plan of c.plans ?? []) {
54456
+ const ptPerFt = typeof plan.pt_per_ft === "number" && plan.pt_per_ft > 0 ? plan.pt_per_ft : 12;
54457
+ for (const m of plan.members ?? []) {
54458
+ const profile = m.profile;
54459
+ if (!profile) continue;
54460
+ const plf = weights[profile];
54461
+ if (plf == null) continue;
54462
+ let lenFt;
54463
+ if (m.role === "column") {
54464
+ const tos = m.col?.tos;
54465
+ const bos = m.col?.bos;
54466
+ if (tos == null || bos == null) continue;
54467
+ lenFt = Math.abs(tos - bos) / 12;
54468
+ } else {
54469
+ const wp = m.wp;
54470
+ if (!Array.isArray(wp) || wp.length < 2) continue;
54471
+ const a = wp[0];
54472
+ const b = wp[1];
54473
+ if (!a || !b) continue;
54474
+ lenFt = Math.hypot(a[0] - b[0], a[1] - b[1]) / ptPerFt;
54475
+ }
54476
+ const g = agg.get(profile) ?? { qty: 0, lenFt: 0, plf };
54477
+ g.qty += 1;
54478
+ g.lenFt += lenFt;
54479
+ agg.set(profile, g);
54480
+ }
54481
+ }
54482
+ const rows = [...agg.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([profile, g]) => ({
54483
+ Profile: profile,
54484
+ Qty: g.qty,
54485
+ "Length (ft)": round1(g.lenFt),
54486
+ "lb/ft": g.plf,
54487
+ "Weight (lb)": Math.round(g.lenFt * g.plf)
54488
+ }));
54489
+ const totalLb = rows.reduce((t, r) => t + r["Weight (lb)"], 0);
54490
+ const totalQty = rows.reduce((t, r) => t + r.Qty, 0);
54491
+ const totalLenFt = round1(rows.reduce((t, r) => t + r["Length (ft)"], 0));
54492
+ const totalTons = round1(totalLb / 2e3);
54493
+ rows.push({
54494
+ Profile: "TOTAL",
54495
+ Qty: totalQty,
54496
+ "Length (ft)": totalLenFt,
54497
+ "lb/ft": "",
54498
+ "Weight (lb)": totalLb
54499
+ });
54500
+ return {
54501
+ title: `Bill of Materials \u2014 ${totalTons} tons (${totalLb.toLocaleString("en-US")} lb)`,
54502
+ columns: ["Profile", "Qty", "Length (ft)", "lb/ft", "Weight (lb)"],
54503
+ rows,
54504
+ totalLb,
54505
+ totalTons
54506
+ };
54507
+ }
54508
+
54509
+ // steel-diff.ts
54510
+ var NUL = String.fromCharCode(0);
54511
+ var asArray = (v) => Array.isArray(v) ? v : [];
54512
+ var str = (v) => typeof v === "string" ? v : "";
54513
+ var normProfile = (v) => str(v).trim().toUpperCase().replace(/\s+/g, "");
54514
+ var num = (v) => typeof v === "number" && isFinite(v) ? v : null;
54515
+ var MOVE_TOL_FT = 0.5;
54516
+ function collect(contract) {
54517
+ const byKey = /* @__PURE__ */ new Map();
54518
+ const dup = /* @__PURE__ */ new Set();
54519
+ const idSheets = /* @__PURE__ */ new Map();
54520
+ const c = contract ?? {};
54521
+ for (const plan of asArray(c.plans)) {
54522
+ const sheet = str(plan?.sheet);
54523
+ const rawPpf = plan?.pt_per_ft;
54524
+ const hasScale = typeof rawPpf === "number" && rawPpf > 0;
54525
+ const ptPerFt = hasScale ? rawPpf : 12;
54526
+ for (const m of asArray(plan?.members)) {
54527
+ const id = str(m?.id);
54528
+ if (!id) continue;
54529
+ const key = sheet + NUL + id;
54530
+ (idSheets.get(id) ?? idSheets.set(id, /* @__PURE__ */ new Set()).get(id)).add(sheet);
54531
+ if (byKey.has(key)) {
54532
+ dup.add(key);
54533
+ continue;
54534
+ }
54535
+ byKey.set(key, {
54536
+ key,
54537
+ id,
54538
+ sheet,
54539
+ mark: str(m?.mark) || void 0,
54540
+ profile: str(m?.profile),
54541
+ role: str(m?.role) || "beam",
54542
+ ptPerFt,
54543
+ hasScale,
54544
+ wp: asArray(m?.wp).map((p) => asArray(p).map((x) => fin(x))),
54545
+ // finite-guarded (no NaN) — consistent with num() elsewhere
54546
+ ends: asArray(m?.ends),
54547
+ col: m?.col ?? {},
54548
+ material: str(m?.material)
54549
+ });
54550
+ }
54551
+ }
54552
+ return { byKey, dupKeys: [...dup], idSheets };
54553
+ }
54554
+ var refOf = (m) => ({ key: m.key, id: m.id, sheet: m.sheet, ...m.mark ? { mark: m.mark } : {}, profile: m.profile, role: m.role });
54555
+ var fin = (v) => {
54556
+ const n = Number(v);
54557
+ return isFinite(n) ? n : 0;
54558
+ };
54559
+ var dist = (p, q) => Math.hypot((p[0] ?? 0) - (q[0] ?? 0), (p[1] ?? 0) - (q[1] ?? 0));
54560
+ var ftPt = (p, ppf) => [fin(p?.[0]) / ppf, fin(p?.[1]) / ppf];
54561
+ function beamMoveFeet(a, b) {
54562
+ const af0 = ftPt(a.wp[0], a.ptPerFt), af1 = ftPt(a.wp[1] ?? a.wp[0], a.ptPerFt);
54563
+ const bf0 = ftPt(b.wp[0], b.ptPerFt), bf1 = ftPt(b.wp[1] ?? b.wp[0], b.ptPerFt);
54564
+ const aligned = Math.max(dist(af0, bf0), dist(af1, bf1));
54565
+ const flipped = Math.max(dist(af0, bf1), dist(af1, bf0));
54566
+ return flipped < aligned ? { feet: flipped, flipped: true } : { feet: aligned, flipped: false };
54567
+ }
54568
+ function elevMoveFeet(a, b) {
54569
+ let ft = 0;
54570
+ const at = num(a.col?.tos), bt = num(b.col?.tos);
54571
+ if (at != null && bt != null) ft = Math.max(ft, Math.abs(at - bt) / 12);
54572
+ const ab = num(a.col?.bos), bb = num(b.col?.bos);
54573
+ if (ab != null && bb != null) ft = Math.max(ft, Math.abs(ab - bb) / 12);
54574
+ for (let i = 0; i < 2; i++) {
54575
+ const ea = num(a.ends?.[i]?.tos), eb = num(b.ends?.[i]?.tos);
54576
+ if (ea != null && eb != null) ft = Math.max(ft, Math.abs(ea - eb) / 12);
54577
+ }
54578
+ return ft;
54579
+ }
54580
+ var stable = (o) => {
54581
+ if (Array.isArray(o)) return "[" + o.map(stable).join(",") + "]";
54582
+ if (o && typeof o === "object") return "{" + Object.keys(o).sort().map((k) => k + ":" + stable(o[k])).join(",") + "}";
54583
+ return JSON.stringify(o) ?? "null";
54584
+ };
54585
+ function connIdentity(ref, lib) {
54586
+ const conn = str(ref?.conn).trim();
54587
+ if (conn && lib.has(conn)) {
54588
+ const r = lib.get(conn);
54589
+ return `${str(r?.type)}/${str(r?.detail)}`;
54590
+ }
54591
+ return str(ref?.detail).trim() || str(ref?.note).trim() || "";
54592
+ }
54593
+ function jointsSummary(a, b) {
54594
+ const kind = (sig) => sig.split("@")[0] ?? "";
54595
+ const setA = new Set(a), setB = new Set(b);
54596
+ const gone = a.filter((x) => !setB.has(x));
54597
+ const got = b.filter((x) => !setA.has(x));
54598
+ const gk = gone.length ? kind(gone[0] ?? "") : "";
54599
+ const tk = got.length ? kind(got[0] ?? "") : "";
54600
+ if (gone.length && got.length && gk === tk) return `${tk || "connection"} params changed`;
54601
+ if (got.length) return `${tk || "connection"} added`;
54602
+ if (gone.length) return `${gk || "connection"} removed`;
54603
+ return "connection changed";
54604
+ }
54605
+ function indexJoints(contract, lib) {
54606
+ const idx = /* @__PURE__ */ new Map();
54607
+ for (const j of asArray(contract?.joints)) {
54608
+ const sig = `${str(j?.kind)}@${str(j?.at)}:${connIdentity(j, lib)}:${stable(j?.params)}:${stable(asArray(j?.secondaries).map(str).sort())}:${stable(j?.place)}`;
54609
+ for (const ref of [str(j?.main), ...asArray(j?.secondaries).map(str)].filter(Boolean)) {
54610
+ const arr = idx.get(ref);
54611
+ if (arr) arr.push(sig);
54612
+ else idx.set(ref, [sig]);
54613
+ }
54614
+ }
54615
+ for (const sigs of idx.values()) sigs.sort();
54616
+ return idx;
54617
+ }
54618
+ function diffContracts(from, to) {
54619
+ const A = collect(from);
54620
+ const B = collect(to);
54621
+ const dupKeys = [.../* @__PURE__ */ new Set([...A.dupKeys, ...B.dupKeys])];
54622
+ const ambiguous = new Set(dupKeys);
54623
+ const libA = new Map(asArray(from?.connections).map((r) => [str(r?.id), r]));
54624
+ const libB = new Map(asArray(to?.connections).map((r) => [str(r?.id), r]));
54625
+ const jointsA = indexJoints(from, libA);
54626
+ const jointsB = indexJoints(to, libB);
54627
+ const ambiguousJoints = /* @__PURE__ */ new Set();
54628
+ const flagAmbiguousJoints = (contract, idSheets) => {
54629
+ for (const j of asArray(contract?.joints)) {
54630
+ const refs = [str(j?.main), ...asArray(j?.secondaries).map(str)].filter(Boolean);
54631
+ if (refs.some((r) => (idSheets.get(r)?.size ?? 0) > 1)) ambiguousJoints.add(str(j?.id));
54632
+ }
54633
+ };
54634
+ flagAmbiguousJoints(from, A.idSheets);
54635
+ flagAmbiguousJoints(to, B.idSheets);
54636
+ const added = [];
54637
+ const removed = [];
54638
+ for (const [key, b] of B.byKey) if (!A.byKey.has(key)) added.push(refOf(b));
54639
+ for (const [key, a] of A.byKey) if (!B.byKey.has(key)) removed.push(refOf(a));
54640
+ const resized = [];
54641
+ const material = [];
54642
+ const moved = [];
54643
+ const connections = [];
54644
+ let unchanged = 0;
54645
+ let anyScaleUnknown = false;
54646
+ for (const [key, a] of A.byKey) {
54647
+ const b = B.byKey.get(key);
54648
+ if (!b || ambiguous.has(key)) continue;
54649
+ let changed = false;
54650
+ if (normProfile(a.profile) !== normProfile(b.profile)) {
54651
+ resized.push({ ref: refOf(b), from: a.profile, to: b.profile });
54652
+ changed = true;
54653
+ }
54654
+ if (a.material.trim().toUpperCase() !== b.material.trim().toUpperCase() && (a.material || b.material)) {
54655
+ material.push({ ref: refOf(b), from: a.material, to: b.material });
54656
+ changed = true;
54657
+ }
54658
+ const planMove = a.wp.length && b.wp.length ? beamMoveFeet(a, b) : { feet: 0, flipped: false };
54659
+ const feet = Math.max(planMove.feet, elevMoveFeet(a, b));
54660
+ if (feet > MOVE_TOL_FT) {
54661
+ const scaleUnknown = !a.hasScale || !b.hasScale;
54662
+ moved.push({ ref: refOf(b), feet: Math.round(feet * 10) / 10, ...scaleUnknown ? { scaleUnknown: true } : {} });
54663
+ if (scaleUnknown) anyScaleUnknown = true;
54664
+ changed = true;
54665
+ }
54666
+ const eA = [connIdentity(a.ends?.[0], libA), connIdentity(a.ends?.[1], libA)];
54667
+ const eB = [connIdentity(b.ends?.[0], libB), connIdentity(b.ends?.[1], libB)];
54668
+ const [eB0, eB1] = planMove.flipped ? [eB[1], eB[0]] : [eB[0], eB[1]];
54669
+ const parts = [];
54670
+ if (eA[0] !== eB0) parts.push(`end 1: ${eA[0] || "none"} \u2192 ${eB0 || "none"}`);
54671
+ if (eA[1] !== eB1) parts.push(`end 2: ${eA[1] || "none"} \u2192 ${eB1 || "none"}`);
54672
+ const cA = connIdentity(a.col, libA), cB = connIdentity(b.col, libB);
54673
+ if (cA !== cB) parts.push(`column: ${cA || "none"} \u2192 ${cB || "none"}`);
54674
+ if (!((A.idSheets.get(a.id)?.size ?? 0) > 1 || (B.idSheets.get(b.id)?.size ?? 0) > 1)) {
54675
+ const jA = jointsA.get(a.id) ?? [];
54676
+ const jB = jointsB.get(b.id) ?? [];
54677
+ if (stable(jA) !== stable(jB)) parts.push(jointsSummary(jA, jB));
54678
+ }
54679
+ if (parts.length) {
54680
+ connections.push({ ref: refOf(b), summary: parts.join("; ") });
54681
+ changed = true;
54682
+ }
54683
+ if (!changed) unchanged++;
54684
+ }
54685
+ const keysA = A.byKey.size;
54686
+ const keysB = B.byKey.size;
54687
+ let shared = 0;
54688
+ for (const k of A.byKey.keys()) if (B.byKey.has(k)) shared++;
54689
+ const smaller = Math.min(keysA, keysB);
54690
+ const identityNotPreserved = keysA >= 5 && keysB >= 5 && smaller > 0 && shared / smaller < 0.1;
54691
+ const bom = (x) => {
54692
+ try {
54693
+ return contractToBom(x);
54694
+ } catch {
54695
+ return { totalLb: 0, totalTons: 0 };
54696
+ }
54697
+ };
54698
+ const fromBom = bom(from);
54699
+ const toBom = bom(to);
54700
+ const netLb = toBom.totalLb - fromBom.totalLb;
54701
+ const warnings = {
54702
+ ...identityNotPreserved ? { identityNotPreserved: true } : {},
54703
+ ...dupKeys.length ? { duplicateKeys: dupKeys } : {},
54704
+ ...ambiguousJoints.size ? { ambiguousJoints: [...ambiguousJoints] } : {},
54705
+ ...anyScaleUnknown ? { scaleUnknown: true } : {}
54706
+ };
54707
+ return {
54708
+ from: 0,
54709
+ to: 0,
54710
+ tonnage: {
54711
+ fromLb: fromBom.totalLb,
54712
+ toLb: toBom.totalLb,
54713
+ netLb,
54714
+ fromTons: fromBom.totalTons,
54715
+ toTons: toBom.totalTons,
54716
+ netTons: Math.round(netLb / 2e3 * 10) / 10
54717
+ },
54718
+ added,
54719
+ removed,
54720
+ resized,
54721
+ moved,
54722
+ material,
54723
+ connections,
54724
+ unchanged,
54725
+ warnings
54726
+ };
54727
+ }
54728
+
54729
+ // version-diff.ts
54730
+ function computeVersionDiff(id, n, base) {
54731
+ if (!Number.isInteger(n) || n < 1) return { code: 400, body: { ok: false, error: "n must be a positive integer version number" } };
54732
+ const head = listVersions(id)[0]?.n ?? 0;
54733
+ if (head === 0) return { code: 404, body: { ok: false, error: "no versions for this project" } };
54734
+ const to = readVersionSkeleton(id, n);
54735
+ if (to == null) return { code: 404, body: { ok: false, error: `version v${n} not found` } };
54736
+ if (n === 1) {
54737
+ const empty = diffContracts({}, to);
54738
+ return {
54739
+ code: 200,
54740
+ body: { ok: true, diff: { ...empty, from: 0, to: 1, firstVersion: true, added: [], tonnage: { fromLb: 0, toLb: 0, netLb: 0, fromTons: 0, toTons: 0, netTons: 0 } } }
54741
+ };
54742
+ }
54743
+ const b = base ?? n - 1;
54744
+ if (!Number.isInteger(b) || b < 1 || b >= n) return { code: 400, body: { ok: false, error: `base must be an integer in 1..${n - 1}` } };
54745
+ const from = readVersionSkeleton(id, b);
54746
+ if (from == null) return { code: 404, body: { ok: false, error: `base version v${b} not found` } };
54747
+ const diff = diffContracts(from, to);
54748
+ diff.from = b;
54749
+ diff.to = n;
54750
+ return { code: 200, body: { ok: true, diff } };
54751
+ }
54440
54752
 
54441
54753
  // project-sources-store.ts
54442
54754
  var import_node_crypto8 = require("node:crypto");
@@ -54843,16 +55155,16 @@ var GROUPS = {
54843
55155
  custom: { key: "custom", label: "Imported connections", color: "#8a97a8" }
54844
55156
  };
54845
55157
  var EMBED = 1;
54846
- function num(params, key, def) {
55158
+ function num2(params, key, def) {
54847
55159
  const v = params?.[key];
54848
55160
  return typeof v === "number" && isFinite(v) ? v : def;
54849
55161
  }
54850
55162
  function pos(params, key, def) {
54851
- const v = num(params, key, def);
55163
+ const v = num2(params, key, def);
54852
55164
  return v > 0 ? v : def;
54853
55165
  }
54854
55166
  function intMin1(params, key, def) {
54855
- return Math.max(1, Math.round(num(params, key, def)));
55167
+ return Math.max(1, Math.round(num2(params, key, def)));
54856
55168
  }
54857
55169
  function finite3(a) {
54858
55170
  return Array.isArray(a) && a.length >= 3 && a.every((n) => typeof n === "number" && isFinite(n));
@@ -54907,18 +55219,18 @@ function expandBasePlate(joint, col) {
54907
55219
  const [bx, by, bz] = base;
54908
55220
  const { w, d } = col.dims;
54909
55221
  const thickness = pos(p, "thickness", 25);
54910
- const margin = Math.max(0, num(p, "margin", 75));
55222
+ const margin = Math.max(0, num2(p, "margin", 75));
54911
55223
  const width = pos(p, "plateWidth", Math.max(w, d) + 2 * margin);
54912
55224
  const depth = pos(p, "plateDepth", Math.max(w, d) + 2 * margin);
54913
55225
  const boltDia = pos(p, "boltDia", 24);
54914
- const clearance = num(p, "holeClearance", 6);
54915
- const edge = num(p, "edgeDist", Math.max(1.5 * boltDia, 40));
55226
+ const clearance = num2(p, "holeClearance", 6);
55227
+ const edge = num2(p, "edgeDist", Math.max(1.5 * boltDia, 40));
54916
55228
  const cols = intMin1(p, "boltCols", 2);
54917
55229
  const rows = intMin1(p, "boltRows", 2);
54918
- const weldLeg = num(p, "weldLeg", 8);
54919
- const projBelow = num(p, "projBelow", 75);
54920
- const embedment = Math.max(0, num(p, "embedment", 0));
54921
- const grout = Math.max(0, num(p, "grout", 0));
55230
+ const weldLeg = num2(p, "weldLeg", 8);
55231
+ const projBelow = num2(p, "projBelow", 75);
55232
+ const embedment = Math.max(0, num2(p, "embedment", 0));
55233
+ const grout = Math.max(0, num2(p, "grout", 0));
54922
55234
  const rodBelow = embedment > 0 ? grout + embedment : projBelow;
54923
55235
  const nutH = pos(p, "nutHeight", 0.8 * boltDia);
54924
55236
  const nutAF = pos(p, "nutAcrossFlats", 1.6 * boltDia);
@@ -55028,14 +55340,14 @@ function beamCopes(beam, support, at, params) {
55028
55340
  if (!finite3(beam.from) || !finite3(beam.to) || !beam.dims || !(beam.dims.d > 0) || !(beam.dims.w > 0)) return {};
55029
55341
  if (profileKind(support.profile) !== "I") return {};
55030
55342
  const endPt = at === "end1" ? beam.to : beam.from;
55031
- const gap = Math.max(0, num(params, "clearance", 12.7));
55343
+ const gap = Math.max(0, num2(params, "clearance", 12.7));
55032
55344
  const beamMidZ = endPt[2] + (typeof beam.posOffset === "number" && isFinite(beam.posOffset) ? beam.posOffset : 0);
55033
55345
  const beamTopZ = beamMidZ + beam.dims.d / 2, beamBotZ = beamMidZ - beam.dims.d / 2;
55034
55346
  const supMidZ = supportWorkZAt(support, endPt) + (typeof support.posOffset === "number" && isFinite(support.posOffset) ? support.posOffset : 0);
55035
55347
  const supTopZ = supMidZ + support.dims.d / 2, supBotZ = supMidZ - support.dims.d / 2;
55036
55348
  const tfS = flangeThk(support.profile, support.dims.d);
55037
- const kClear = Math.max(0, num(params, "copeKClear", 12.7));
55038
- const minLen = Math.max(0, num(params, "copeMinLength", 31.75));
55349
+ const kClear = Math.max(0, num2(params, "copeKClear", 12.7));
55350
+ const minLen = Math.max(0, num2(params, "copeMinLength", 31.75));
55039
55351
  const kBand = tfS + kClear;
55040
55352
  const webLo = supBotZ + kBand, webHi = supTopZ - kBand;
55041
55353
  if (!(webLo < webHi && beamTopZ > webLo && beamBotZ < webHi)) return {};
@@ -55078,14 +55390,14 @@ function expandShearPlate(joint, beam, support) {
55078
55390
  const cols = intMin1(p, "boltCols", 1);
55079
55391
  const rows = intMin1(p, "boltRows", 3);
55080
55392
  const pitch = pos(p, "boltPitch", 70);
55081
- const holeClr = num(p, "holeClearance", 2);
55082
- const edge = Math.max(0, num(p, "edgeDist", Math.max(1.5 * boltDia, 30)));
55083
- const weldLeg = num(p, "weldLeg", 6);
55084
- const clearance = Math.max(0, num(p, "clearance", 12.7));
55393
+ const holeClr = num2(p, "holeClearance", 2);
55394
+ const edge = Math.max(0, num2(p, "edgeDist", Math.max(1.5 * boltDia, 30)));
55395
+ const weldLeg = num2(p, "weldLeg", 6);
55396
+ const clearance = Math.max(0, num2(p, "clearance", 12.7));
55085
55397
  const stiffener = p?.["stiffener"] === true;
55086
55398
  const height = pos(p, "plateHeight", (rows - 1) * pitch + 2 * edge);
55087
55399
  const twHalf = webHalfThk(beam.profile, beam.dims.w);
55088
- const webSide = num(p, "webSide", 1) >= 0 ? 1 : -1;
55400
+ const webSide = num2(p, "webSide", 1) >= 0 ? 1 : -1;
55089
55401
  const pOff = webSide * (twHalf + thickness / 2);
55090
55402
  const u0 = support ? webHalfThk(support.profile, support.dims.w) : 0;
55091
55403
  const edgeV = Math.min(edge, height * 0.4);
@@ -55416,66 +55728,6 @@ function contractToScene(contractInput) {
55416
55728
  };
55417
55729
  }
55418
55730
 
55419
- // bom-format.ts
55420
- var round1 = (n) => Math.round(n * 10) / 10;
55421
- function contractToBom(contractInput) {
55422
- const c = contractInput ?? {};
55423
- const weights = c.weights ?? {};
55424
- const agg = /* @__PURE__ */ new Map();
55425
- for (const plan of c.plans ?? []) {
55426
- const ptPerFt = typeof plan.pt_per_ft === "number" && plan.pt_per_ft > 0 ? plan.pt_per_ft : 12;
55427
- for (const m of plan.members ?? []) {
55428
- const profile = m.profile;
55429
- if (!profile) continue;
55430
- const plf = weights[profile];
55431
- if (plf == null) continue;
55432
- let lenFt;
55433
- if (m.role === "column") {
55434
- const tos = m.col?.tos;
55435
- const bos = m.col?.bos;
55436
- if (tos == null || bos == null) continue;
55437
- lenFt = Math.abs(tos - bos) / 12;
55438
- } else {
55439
- const wp = m.wp;
55440
- if (!Array.isArray(wp) || wp.length < 2) continue;
55441
- const a = wp[0];
55442
- const b = wp[1];
55443
- if (!a || !b) continue;
55444
- lenFt = Math.hypot(a[0] - b[0], a[1] - b[1]) / ptPerFt;
55445
- }
55446
- const g = agg.get(profile) ?? { qty: 0, lenFt: 0, plf };
55447
- g.qty += 1;
55448
- g.lenFt += lenFt;
55449
- agg.set(profile, g);
55450
- }
55451
- }
55452
- const rows = [...agg.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([profile, g]) => ({
55453
- Profile: profile,
55454
- Qty: g.qty,
55455
- "Length (ft)": round1(g.lenFt),
55456
- "lb/ft": g.plf,
55457
- "Weight (lb)": Math.round(g.lenFt * g.plf)
55458
- }));
55459
- const totalLb = rows.reduce((t, r) => t + r["Weight (lb)"], 0);
55460
- const totalQty = rows.reduce((t, r) => t + r.Qty, 0);
55461
- const totalLenFt = round1(rows.reduce((t, r) => t + r["Length (ft)"], 0));
55462
- const totalTons = round1(totalLb / 2e3);
55463
- rows.push({
55464
- Profile: "TOTAL",
55465
- Qty: totalQty,
55466
- "Length (ft)": totalLenFt,
55467
- "lb/ft": "",
55468
- "Weight (lb)": totalLb
55469
- });
55470
- return {
55471
- title: `Bill of Materials \u2014 ${totalTons} tons (${totalLb.toLocaleString("en-US")} lb)`,
55472
- columns: ["Profile", "Qty", "Length (ft)", "lb/ft", "Weight (lb)"],
55473
- rows,
55474
- totalLb,
55475
- totalTons
55476
- };
55477
- }
55478
-
55479
55731
  // bom-export.ts
55480
55732
  var import_node_os14 = require("node:os");
55481
55733
  var import_node_path21 = require("node:path");
@@ -59236,17 +59488,17 @@ try {
59236
59488
  tds = 1;
59237
59489
  } catch (e) {
59238
59490
  }
59239
- function strToU8(str, latin1) {
59491
+ function strToU8(str2, latin1) {
59240
59492
  if (latin1) {
59241
- var ar_1 = new u8(str.length);
59242
- for (var i = 0; i < str.length; ++i)
59243
- ar_1[i] = str.charCodeAt(i);
59493
+ var ar_1 = new u8(str2.length);
59494
+ for (var i = 0; i < str2.length; ++i)
59495
+ ar_1[i] = str2.charCodeAt(i);
59244
59496
  return ar_1;
59245
59497
  }
59246
59498
  if (te)
59247
- return te.encode(str);
59248
- var l = str.length;
59249
- var ar = new u8(str.length + (str.length >> 1));
59499
+ return te.encode(str2);
59500
+ var l = str2.length;
59501
+ var ar = new u8(str2.length + (str2.length >> 1));
59250
59502
  var ai = 0;
59251
59503
  var w = function(v) {
59252
59504
  ar[ai++] = v;
@@ -59257,13 +59509,13 @@ function strToU8(str, latin1) {
59257
59509
  n.set(ar);
59258
59510
  ar = n;
59259
59511
  }
59260
- var c = str.charCodeAt(i);
59512
+ var c = str2.charCodeAt(i);
59261
59513
  if (c < 128 || latin1)
59262
59514
  w(c);
59263
59515
  else if (c < 2048)
59264
59516
  w(192 | c >> 6), w(128 | c & 63);
59265
59517
  else if (c > 55295 && c < 57344)
59266
- c = 65536 + (c & 1023 << 10) | str.charCodeAt(++i) & 1023, w(240 | c >> 18), w(128 | c >> 12 & 63), w(128 | c >> 6 & 63), w(128 | c & 63);
59518
+ c = 65536 + (c & 1023 << 10) | str2.charCodeAt(++i) & 1023, w(240 | c >> 18), w(128 | c >> 12 & 63), w(128 | c >> 6 & 63), w(128 | c & 63);
59267
59519
  else
59268
59520
  w(224 | c >> 12), w(128 | c >> 6 & 63), w(128 | c & 63);
59269
59521
  }
@@ -60005,16 +60257,16 @@ function memberTons(contract, m) {
60005
60257
  }
60006
60258
  function rollup(members, countWeighted = false) {
60007
60259
  const counts = emptyCounts();
60008
- let num2 = 0, den = 0, tons = 0;
60260
+ let num3 = 0, den = 0, tons = 0;
60009
60261
  for (const m of members) {
60010
60262
  counts[m.band]++;
60011
60263
  if (m.band === "rfi") continue;
60012
60264
  const w = countWeighted ? 1 : m.tons;
60013
- num2 += w * BAND_WEIGHT[m.band];
60265
+ num3 += w * BAND_WEIGHT[m.band];
60014
60266
  den += w;
60015
60267
  tons += m.tons;
60016
60268
  }
60017
- return { score: den > 0 ? Math.round(num2 / den * 100) : null, tons, counts };
60269
+ return { score: den > 0 ? Math.round(num3 / den * 100) : null, tons, counts };
60018
60270
  }
60019
60271
  function bandEnd(end, rows) {
60020
60272
  const row = end.conn ? rows.get(end.conn) : void 0;
@@ -60050,14 +60302,14 @@ function scoreConnections(contractInput) {
60050
60302
  }
60051
60303
  });
60052
60304
  const counts = emptyCounts();
60053
- let num2 = 0, den = 0;
60305
+ let num3 = 0, den = 0;
60054
60306
  for (const e of byEnd) {
60055
60307
  counts[e.band]++;
60056
60308
  if (e.band === "rfi") continue;
60057
- num2 += BAND_WEIGHT[e.band];
60309
+ num3 += BAND_WEIGHT[e.band];
60058
60310
  den += 1;
60059
60311
  }
60060
- const category = { score: den > 0 ? Math.round(num2 / den * 100) : null, tons: 0, counts };
60312
+ const category = { score: den > 0 ? Math.round(num3 / den * 100) : null, tons: 0, counts };
60061
60313
  return { byEnd, category };
60062
60314
  }
60063
60315
  function scoreContract(contractInput) {
@@ -60104,7 +60356,7 @@ function scoreContract(contractInput) {
60104
60356
  const columns = rollup(byMember.filter((m) => m.role === "column"));
60105
60357
  const details = rollupDetails(byDetail);
60106
60358
  const scored = byMember.filter((m) => m.band !== "rfi");
60107
- const num2 = scored.reduce((s, m) => s + m.tons * BAND_WEIGHT[m.band], 0);
60359
+ const num3 = scored.reduce((s, m) => s + m.tons * BAND_WEIGHT[m.band], 0);
60108
60360
  const den = scored.reduce((s, m) => s + m.tons, 0);
60109
60361
  return {
60110
60362
  byMember,
@@ -60122,7 +60374,7 @@ function scoreContract(contractInput) {
60122
60374
  note: "Approximate in v1 \u2014 precise per-segment binding is Slice 2."
60123
60375
  },
60124
60376
  overall: {
60125
- score: den > 0 ? Math.round(num2 / den * 100) : null,
60377
+ score: den > 0 ? Math.round(num3 / den * 100) : null,
60126
60378
  tons: den,
60127
60379
  rfiCount: byMember.filter((m) => m.band === "rfi").length
60128
60380
  }
@@ -60134,13 +60386,13 @@ function detailSheet(text) {
60134
60386
  }
60135
60387
  function rollupDetails(details) {
60136
60388
  const counts = emptyCounts();
60137
- let num2 = 0, den = 0;
60389
+ let num3 = 0, den = 0;
60138
60390
  for (const d of details) {
60139
60391
  counts[d.band]++;
60140
- num2 += BAND_WEIGHT[d.band];
60392
+ num3 += BAND_WEIGHT[d.band];
60141
60393
  den += 1;
60142
60394
  }
60143
- return { score: den > 0 ? Math.round(num2 / den * 100) : null, tons: 0, counts };
60395
+ return { score: den > 0 ? Math.round(num3 / den * 100) : null, tons: 0, counts };
60144
60396
  }
60145
60397
 
60146
60398
  // contract-score.ts
@@ -63425,18 +63677,18 @@ var unifyPaths = (paths_) => {
63425
63677
  return paths.map(normalizePathToUnix);
63426
63678
  };
63427
63679
  var toUnix = (string) => {
63428
- let str = string.replace(BACK_SLASH_RE, SLASH);
63680
+ let str2 = string.replace(BACK_SLASH_RE, SLASH);
63429
63681
  let prepend = false;
63430
- if (str.startsWith(SLASH_SLASH)) {
63682
+ if (str2.startsWith(SLASH_SLASH)) {
63431
63683
  prepend = true;
63432
63684
  }
63433
- while (str.match(DOUBLE_SLASH_RE)) {
63434
- str = str.replace(DOUBLE_SLASH_RE, SLASH);
63685
+ while (str2.match(DOUBLE_SLASH_RE)) {
63686
+ str2 = str2.replace(DOUBLE_SLASH_RE, SLASH);
63435
63687
  }
63436
63688
  if (prepend) {
63437
- str = SLASH + str;
63689
+ str2 = SLASH + str2;
63438
63690
  }
63439
- return str;
63691
+ return str2;
63440
63692
  };
63441
63693
  var normalizePathToUnix = (path) => toUnix(sysPath2.normalize(toUnix(path)));
63442
63694
  var normalizeIgnored = (cwd = "") => (path) => {
@@ -64675,6 +64927,17 @@ async function startServer() {
64675
64927
  if (!p) return reply.status(404).send({ ok: false, error: `unknown project: ${req.params.id}` });
64676
64928
  return { ok: true, versions: listVersions(req.params.id), approvedAt: p.approvedAt ?? null };
64677
64929
  });
64930
+ app.get(
64931
+ "/api/projects/:id/versions/:n/diff",
64932
+ async (req, reply) => {
64933
+ const project = getProject(req.params.id);
64934
+ if (!project) return reply.status(404).send({ ok: false, error: `unknown project: ${req.params.id}` });
64935
+ const n = Number(req.params.n);
64936
+ const base = req.query.base !== void 0 && req.query.base !== "" ? Number(req.query.base) : void 0;
64937
+ const { code, body } = computeVersionDiff(project.id, n, base);
64938
+ return reply.status(code).send(body);
64939
+ }
64940
+ );
64678
64941
  app.post("/api/projects/:id/versions/:n/rollback", async (req, reply) => {
64679
64942
  const project = getProject(req.params.id);
64680
64943
  if (!project) return reply.status(404).send({ ok: false, error: `unknown project: ${req.params.id}` });