@uipath/project-packager 1.197.0 → 1.198.0-preview.101

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.
package/dist/node.js CHANGED
@@ -6,7 +6,7 @@ var de_default = {
6
6
  projectLoader: {
7
7
  errors: {
8
8
  pathRequired: "Project directory path is required",
9
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
9
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
10
10
  readFailed: "Failed to read project file: {path}",
11
11
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
12
12
  }
@@ -89,7 +89,7 @@ var en = {
89
89
  projectLoader: {
90
90
  errors: {
91
91
  pathRequired: "Project directory path is required",
92
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
92
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
93
93
  readFailed: "Failed to read project file: {path}",
94
94
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
95
95
  }
@@ -171,7 +171,7 @@ var es_default = {
171
171
  projectLoader: {
172
172
  errors: {
173
173
  pathRequired: "Project directory path is required",
174
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
174
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
175
175
  readFailed: "Failed to read project file: {path}",
176
176
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
177
177
  }
@@ -253,7 +253,7 @@ var es_MX_default = {
253
253
  projectLoader: {
254
254
  errors: {
255
255
  pathRequired: "Project directory path is required",
256
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
256
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
257
257
  readFailed: "Failed to read project file: {path}",
258
258
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
259
259
  }
@@ -335,7 +335,7 @@ var fr_default = {
335
335
  projectLoader: {
336
336
  errors: {
337
337
  pathRequired: "Project directory path is required",
338
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
338
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
339
339
  readFailed: "Failed to read project file: {path}",
340
340
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
341
341
  }
@@ -417,7 +417,7 @@ var ja_default = {
417
417
  projectLoader: {
418
418
  errors: {
419
419
  pathRequired: "Project directory path is required",
420
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
420
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
421
421
  readFailed: "Failed to read project file: {path}",
422
422
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
423
423
  }
@@ -499,7 +499,7 @@ var ko_default = {
499
499
  projectLoader: {
500
500
  errors: {
501
501
  pathRequired: "Project directory path is required",
502
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
502
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
503
503
  readFailed: "Failed to read project file: {path}",
504
504
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
505
505
  }
@@ -581,7 +581,7 @@ var pt_default = {
581
581
  projectLoader: {
582
582
  errors: {
583
583
  pathRequired: "Project directory path is required",
584
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
584
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
585
585
  readFailed: "Failed to read project file: {path}",
586
586
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
587
587
  }
@@ -663,7 +663,7 @@ var pt_BR_default = {
663
663
  projectLoader: {
664
664
  errors: {
665
665
  pathRequired: "Project directory path is required",
666
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
666
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
667
667
  readFailed: "Failed to read project file: {path}",
668
668
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
669
669
  }
@@ -745,7 +745,7 @@ var ro_default = {
745
745
  projectLoader: {
746
746
  errors: {
747
747
  pathRequired: "Project directory path is required",
748
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
748
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
749
749
  readFailed: "Failed to read project file: {path}",
750
750
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
751
751
  }
@@ -827,7 +827,7 @@ var ru_default = {
827
827
  projectLoader: {
828
828
  errors: {
829
829
  pathRequired: "Project directory path is required",
830
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
830
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
831
831
  readFailed: "Failed to read project file: {path}",
832
832
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
833
833
  }
@@ -909,7 +909,7 @@ var tr_default = {
909
909
  projectLoader: {
910
910
  errors: {
911
911
  pathRequired: "Project directory path is required",
912
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
912
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
913
913
  readFailed: "Failed to read project file: {path}",
914
914
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
915
915
  }
@@ -991,7 +991,7 @@ var zh_CN_default = {
991
991
  projectLoader: {
992
992
  errors: {
993
993
  pathRequired: "Project directory path is required",
994
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
994
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
995
995
  readFailed: "Failed to read project file: {path}",
996
996
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
997
997
  }
@@ -1073,7 +1073,7 @@ var zh_TW_default = {
1073
1073
  projectLoader: {
1074
1074
  errors: {
1075
1075
  pathRequired: "Project directory path is required",
1076
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
1076
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
1077
1077
  readFailed: "Failed to read project file: {path}",
1078
1078
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
1079
1079
  }
@@ -1155,7 +1155,7 @@ var zu_default = {
1155
1155
  projectLoader: {
1156
1156
  errors: {
1157
1157
  pathRequired: "Project directory path is required",
1158
- noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
1158
+ noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
1159
1159
  readFailed: "Failed to read project file: {path}",
1160
1160
  invalidProject: "Invalid project file: {path}. Missing ProjectType field."
1161
1161
  }
@@ -6246,31 +6246,17 @@ function search(data, expression, options) {
6246
6246
  const nodeTree = Parser_default.parse(expression, options);
6247
6247
  return TreeInterpreter_default.search(nodeTree, data);
6248
6248
  }
6249
- /*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT */
6250
- var __create2 = Object.create;
6251
- var __defProp2 = Object.defineProperty;
6252
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6253
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
6254
- var __getProtoOf2 = Object.getPrototypeOf;
6255
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
6256
- var __commonJSMin = (cb, mod2) => () => (mod2 || (cb((mod2 = { exports: {} }).exports, mod2), cb = null), mod2.exports);
6257
- var __copyProps = (to, from, except, desc) => {
6258
- if (from && typeof from === "object" || typeof from === "function")
6259
- for (var keys = __getOwnPropNames2(from), i = 0, n = keys.length, key;i < n; i++) {
6260
- key = keys[i];
6261
- if (!__hasOwnProp2.call(to, key) && key !== except)
6262
- __defProp2(to, key, {
6263
- get: ((k) => from[k]).bind(null, key),
6264
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
6265
- });
6266
- }
6267
- return to;
6268
- };
6269
- var __toESM2 = (mod2, isNodeMode, target) => (target = mod2 != null ? __create2(__getProtoOf2(mod2)) : {}, __copyProps(isNodeMode || !mod2 || !mod2.__esModule ? __defProp2(target, "default", {
6270
- value: mod2,
6271
- enumerable: true
6272
- }) : target, mod2));
6273
- var require_common = /* @__PURE__ */ __commonJSMin((exports, module) => {
6249
+ function getDefaultExportFromCjs(x) {
6250
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
6251
+ }
6252
+ var jsYaml = {};
6253
+ var loader = {};
6254
+ var common = {};
6255
+ var hasRequiredCommon;
6256
+ function requireCommon() {
6257
+ if (hasRequiredCommon)
6258
+ return common;
6259
+ hasRequiredCommon = 1;
6274
6260
  function isNothing(subject) {
6275
6261
  return typeof subject === "undefined" || subject === null;
6276
6262
  }
@@ -6296,55 +6282,71 @@ var require_common = /* @__PURE__ */ __commonJSMin((exports, module) => {
6296
6282
  }
6297
6283
  function repeat(string, count) {
6298
6284
  let result = "";
6299
- for (let cycle = 0;cycle < count; cycle += 1)
6285
+ for (let cycle = 0;cycle < count; cycle += 1) {
6300
6286
  result += string;
6287
+ }
6301
6288
  return result;
6302
6289
  }
6303
6290
  function isNegativeZero(number) {
6304
6291
  return number === 0 && Number.NEGATIVE_INFINITY === 1 / number;
6305
6292
  }
6306
- module.exports.isNothing = isNothing;
6307
- module.exports.isObject = isObject2;
6308
- module.exports.toArray = toArray;
6309
- module.exports.repeat = repeat;
6310
- module.exports.isNegativeZero = isNegativeZero;
6311
- module.exports.extend = extend;
6312
- });
6313
- var require_exception = /* @__PURE__ */ __commonJSMin((exports, module) => {
6314
- function formatError(exception, compact) {
6293
+ common.isNothing = isNothing;
6294
+ common.isObject = isObject2;
6295
+ common.toArray = toArray;
6296
+ common.repeat = repeat;
6297
+ common.isNegativeZero = isNegativeZero;
6298
+ common.extend = extend;
6299
+ return common;
6300
+ }
6301
+ var exception;
6302
+ var hasRequiredException;
6303
+ function requireException() {
6304
+ if (hasRequiredException)
6305
+ return exception;
6306
+ hasRequiredException = 1;
6307
+ function formatError(exception2, compact) {
6315
6308
  let where = "";
6316
- const message = exception.reason || "(unknown reason)";
6317
- if (!exception.mark)
6309
+ const message = exception2.reason || "(unknown reason)";
6310
+ if (!exception2.mark)
6318
6311
  return message;
6319
- if (exception.mark.name)
6320
- where += 'in "' + exception.mark.name + '" ';
6321
- where += "(" + (exception.mark.line + 1) + ":" + (exception.mark.column + 1) + ")";
6322
- if (!compact && exception.mark.snippet)
6312
+ if (exception2.mark.name) {
6313
+ where += 'in "' + exception2.mark.name + '" ';
6314
+ }
6315
+ where += "(" + (exception2.mark.line + 1) + ":" + (exception2.mark.column + 1) + ")";
6316
+ if (!compact && exception2.mark.snippet) {
6323
6317
  where += `
6324
6318
 
6325
- ` + exception.mark.snippet;
6319
+ ` + exception2.mark.snippet;
6320
+ }
6326
6321
  return message + " " + where;
6327
6322
  }
6328
- function YAMLException(reason, mark) {
6323
+ function YAMLException2(reason, mark) {
6329
6324
  Error.call(this);
6330
6325
  this.name = "YAMLException";
6331
6326
  this.reason = reason;
6332
6327
  this.mark = mark;
6333
6328
  this.message = formatError(this, false);
6334
- if (Error.captureStackTrace)
6329
+ if (Error.captureStackTrace) {
6335
6330
  Error.captureStackTrace(this, this.constructor);
6336
- else
6337
- this.stack = (/* @__PURE__ */ new Error()).stack || "";
6331
+ } else {
6332
+ this.stack = new Error().stack || "";
6333
+ }
6338
6334
  }
6339
- YAMLException.prototype = Object.create(Error.prototype);
6340
- YAMLException.prototype.constructor = YAMLException;
6341
- YAMLException.prototype.toString = function toString(compact) {
6335
+ YAMLException2.prototype = Object.create(Error.prototype);
6336
+ YAMLException2.prototype.constructor = YAMLException2;
6337
+ YAMLException2.prototype.toString = function toString(compact) {
6342
6338
  return this.name + ": " + formatError(this, compact);
6343
6339
  };
6344
- module.exports = YAMLException;
6345
- });
6346
- var require_snippet = /* @__PURE__ */ __commonJSMin((exports, module) => {
6347
- var common = require_common();
6340
+ exception = YAMLException2;
6341
+ return exception;
6342
+ }
6343
+ var snippet;
6344
+ var hasRequiredSnippet;
6345
+ function requireSnippet() {
6346
+ if (hasRequiredSnippet)
6347
+ return snippet;
6348
+ hasRequiredSnippet = 1;
6349
+ const common2 = requireCommon();
6348
6350
  function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
6349
6351
  let head = "";
6350
6352
  let tail = "";
@@ -6363,7 +6365,7 @@ var require_snippet = /* @__PURE__ */ __commonJSMin((exports, module) => {
6363
6365
  };
6364
6366
  }
6365
6367
  function padStart(string, max) {
6366
- return common.repeat(" ", max - string.length) + string;
6368
+ return common2.repeat(" ", max - string.length) + string;
6367
6369
  }
6368
6370
  function makeSnippet(mark, options) {
6369
6371
  options = Object.create(options || null);
@@ -6385,8 +6387,9 @@ var require_snippet = /* @__PURE__ */ __commonJSMin((exports, module) => {
6385
6387
  while (match = re.exec(mark.buffer)) {
6386
6388
  lineEnds.push(match.index);
6387
6389
  lineStarts.push(match.index + match[0].length);
6388
- if (mark.position <= match.index && foundLineNo < 0)
6390
+ if (mark.position <= match.index && foundLineNo < 0) {
6389
6391
  foundLineNo = lineStarts.length - 2;
6392
+ }
6390
6393
  }
6391
6394
  if (foundLineNo < 0)
6392
6395
  foundLineNo = lineStarts.length - 1;
@@ -6397,28 +6400,34 @@ var require_snippet = /* @__PURE__ */ __commonJSMin((exports, module) => {
6397
6400
  if (foundLineNo - i < 0)
6398
6401
  break;
6399
6402
  const line2 = getLine(mark.buffer, lineStarts[foundLineNo - i], lineEnds[foundLineNo - i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), maxLineLength);
6400
- result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line2.str + `
6403
+ result = common2.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line2.str + `
6401
6404
  ` + result;
6402
6405
  }
6403
6406
  const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
6404
- result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + `
6407
+ result += common2.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + `
6405
6408
  `;
6406
- result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + `^
6409
+ result += common2.repeat("-", options.indent + lineNoLength + 3 + line.pos) + `^
6407
6410
  `;
6408
6411
  for (let i = 1;i <= options.linesAfter; i++) {
6409
6412
  if (foundLineNo + i >= lineEnds.length)
6410
6413
  break;
6411
6414
  const line2 = getLine(mark.buffer, lineStarts[foundLineNo + i], lineEnds[foundLineNo + i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), maxLineLength);
6412
- result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line2.str + `
6415
+ result += common2.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line2.str + `
6413
6416
  `;
6414
6417
  }
6415
6418
  return result.replace(/\n$/, "");
6416
6419
  }
6417
- module.exports = makeSnippet;
6418
- });
6419
- var require_type = /* @__PURE__ */ __commonJSMin((exports, module) => {
6420
- var YAMLException = require_exception();
6421
- var TYPE_CONSTRUCTOR_OPTIONS = [
6420
+ snippet = makeSnippet;
6421
+ return snippet;
6422
+ }
6423
+ var type;
6424
+ var hasRequiredType;
6425
+ function requireType() {
6426
+ if (hasRequiredType)
6427
+ return type;
6428
+ hasRequiredType = 1;
6429
+ const YAMLException2 = requireException();
6430
+ const TYPE_CONSTRUCTOR_OPTIONS = [
6422
6431
  "kind",
6423
6432
  "multi",
6424
6433
  "resolve",
@@ -6430,26 +6439,28 @@ var require_type = /* @__PURE__ */ __commonJSMin((exports, module) => {
6430
6439
  "defaultStyle",
6431
6440
  "styleAliases"
6432
6441
  ];
6433
- var YAML_NODE_KINDS = [
6442
+ const YAML_NODE_KINDS = [
6434
6443
  "scalar",
6435
6444
  "sequence",
6436
6445
  "mapping"
6437
6446
  ];
6438
- function compileStyleAliases(map) {
6447
+ function compileStyleAliases(map2) {
6439
6448
  const result = {};
6440
- if (map !== null)
6441
- Object.keys(map).forEach(function(style) {
6442
- map[style].forEach(function(alias) {
6449
+ if (map2 !== null) {
6450
+ Object.keys(map2).forEach(function(style) {
6451
+ map2[style].forEach(function(alias) {
6443
6452
  result[String(alias)] = style;
6444
6453
  });
6445
6454
  });
6455
+ }
6446
6456
  return result;
6447
6457
  }
6448
- function Type(tag, options) {
6458
+ function Type2(tag, options) {
6449
6459
  options = options || {};
6450
6460
  Object.keys(options).forEach(function(name) {
6451
- if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1)
6452
- throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
6461
+ if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
6462
+ throw new YAMLException2('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
6463
+ }
6453
6464
  });
6454
6465
  this.options = options;
6455
6466
  this.tag = tag;
@@ -6467,21 +6478,29 @@ var require_type = /* @__PURE__ */ __commonJSMin((exports, module) => {
6467
6478
  this.defaultStyle = options["defaultStyle"] || null;
6468
6479
  this.multi = options["multi"] || false;
6469
6480
  this.styleAliases = compileStyleAliases(options["styleAliases"] || null);
6470
- if (YAML_NODE_KINDS.indexOf(this.kind) === -1)
6471
- throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
6472
- }
6473
- module.exports = Type;
6474
- });
6475
- var require_schema = /* @__PURE__ */ __commonJSMin((exports, module) => {
6476
- var YAMLException = require_exception();
6477
- var Type = require_type();
6478
- function compileList(schema, name) {
6481
+ if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
6482
+ throw new YAMLException2('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
6483
+ }
6484
+ }
6485
+ type = Type2;
6486
+ return type;
6487
+ }
6488
+ var schema;
6489
+ var hasRequiredSchema;
6490
+ function requireSchema() {
6491
+ if (hasRequiredSchema)
6492
+ return schema;
6493
+ hasRequiredSchema = 1;
6494
+ const YAMLException2 = requireException();
6495
+ const Type2 = requireType();
6496
+ function compileList(schema2, name) {
6479
6497
  const result = [];
6480
- schema[name].forEach(function(currentType) {
6498
+ schema2[name].forEach(function(currentType) {
6481
6499
  let newIndex = result.length;
6482
6500
  result.forEach(function(previousType, previousIndex) {
6483
- if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi)
6501
+ if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) {
6484
6502
  newIndex = previousIndex;
6503
+ }
6485
6504
  });
6486
6505
  result[newIndex] = currentType;
6487
6506
  });
@@ -6500,47 +6519,54 @@ var require_schema = /* @__PURE__ */ __commonJSMin((exports, module) => {
6500
6519
  fallback: []
6501
6520
  }
6502
6521
  };
6503
- function collectType(type) {
6504
- if (type.multi) {
6505
- result.multi[type.kind].push(type);
6506
- result.multi["fallback"].push(type);
6507
- } else
6508
- result[type.kind][type.tag] = result["fallback"][type.tag] = type;
6509
- }
6510
- for (let index = 0, length = arguments.length;index < length; index += 1)
6522
+ function collectType(type2) {
6523
+ if (type2.multi) {
6524
+ result.multi[type2.kind].push(type2);
6525
+ result.multi["fallback"].push(type2);
6526
+ } else {
6527
+ result[type2.kind][type2.tag] = result["fallback"][type2.tag] = type2;
6528
+ }
6529
+ }
6530
+ for (let index = 0, length = arguments.length;index < length; index += 1) {
6511
6531
  arguments[index].forEach(collectType);
6532
+ }
6512
6533
  return result;
6513
6534
  }
6514
- function Schema(definition) {
6535
+ function Schema2(definition) {
6515
6536
  return this.extend(definition);
6516
6537
  }
6517
- Schema.prototype.extend = function extend(definition) {
6538
+ Schema2.prototype.extend = function extend(definition) {
6518
6539
  let implicit = [];
6519
6540
  let explicit = [];
6520
- if (definition instanceof Type)
6541
+ if (definition instanceof Type2) {
6521
6542
  explicit.push(definition);
6522
- else if (Array.isArray(definition))
6543
+ } else if (Array.isArray(definition)) {
6523
6544
  explicit = explicit.concat(definition);
6524
- else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
6545
+ } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
6525
6546
  if (definition.implicit)
6526
6547
  implicit = implicit.concat(definition.implicit);
6527
6548
  if (definition.explicit)
6528
6549
  explicit = explicit.concat(definition.explicit);
6529
- } else
6530
- throw new YAMLException("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
6531
- implicit.forEach(function(type) {
6532
- if (!(type instanceof Type))
6533
- throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");
6534
- if (type.loadKind && type.loadKind !== "scalar")
6535
- throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
6536
- if (type.multi)
6537
- throw new YAMLException("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
6550
+ } else {
6551
+ throw new YAMLException2("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
6552
+ }
6553
+ implicit.forEach(function(type2) {
6554
+ if (!(type2 instanceof Type2)) {
6555
+ throw new YAMLException2("Specified list of YAML types (or a single Type object) contains a non-Type object.");
6556
+ }
6557
+ if (type2.loadKind && type2.loadKind !== "scalar") {
6558
+ throw new YAMLException2("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
6559
+ }
6560
+ if (type2.multi) {
6561
+ throw new YAMLException2("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
6562
+ }
6538
6563
  });
6539
- explicit.forEach(function(type) {
6540
- if (!(type instanceof Type))
6541
- throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");
6564
+ explicit.forEach(function(type2) {
6565
+ if (!(type2 instanceof Type2)) {
6566
+ throw new YAMLException2("Specified list of YAML types (or a single Type object) contains a non-Type object.");
6567
+ }
6542
6568
  });
6543
- const result = Object.create(Schema.prototype);
6569
+ const result = Object.create(Schema2.prototype);
6544
6570
  result.implicit = (this.implicit || []).concat(implicit);
6545
6571
  result.explicit = (this.explicit || []).concat(explicit);
6546
6572
  result.compiledImplicit = compileList(result, "implicit");
@@ -6548,41 +6574,77 @@ var require_schema = /* @__PURE__ */ __commonJSMin((exports, module) => {
6548
6574
  result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);
6549
6575
  return result;
6550
6576
  };
6551
- module.exports = Schema;
6552
- });
6553
- var require_str = /* @__PURE__ */ __commonJSMin((exports, module) => {
6554
- module.exports = new (require_type())("tag:yaml.org,2002:str", {
6577
+ schema = Schema2;
6578
+ return schema;
6579
+ }
6580
+ var str;
6581
+ var hasRequiredStr;
6582
+ function requireStr() {
6583
+ if (hasRequiredStr)
6584
+ return str;
6585
+ hasRequiredStr = 1;
6586
+ const Type2 = requireType();
6587
+ str = new Type2("tag:yaml.org,2002:str", {
6555
6588
  kind: "scalar",
6556
6589
  construct: function(data) {
6557
6590
  return data !== null ? data : "";
6558
6591
  }
6559
6592
  });
6560
- });
6561
- var require_seq = /* @__PURE__ */ __commonJSMin((exports, module) => {
6562
- module.exports = new (require_type())("tag:yaml.org,2002:seq", {
6593
+ return str;
6594
+ }
6595
+ var seq;
6596
+ var hasRequiredSeq;
6597
+ function requireSeq() {
6598
+ if (hasRequiredSeq)
6599
+ return seq;
6600
+ hasRequiredSeq = 1;
6601
+ const Type2 = requireType();
6602
+ seq = new Type2("tag:yaml.org,2002:seq", {
6563
6603
  kind: "sequence",
6564
6604
  construct: function(data) {
6565
6605
  return data !== null ? data : [];
6566
6606
  }
6567
6607
  });
6568
- });
6569
- var require_map = /* @__PURE__ */ __commonJSMin((exports, module) => {
6570
- module.exports = new (require_type())("tag:yaml.org,2002:map", {
6608
+ return seq;
6609
+ }
6610
+ var map;
6611
+ var hasRequiredMap;
6612
+ function requireMap() {
6613
+ if (hasRequiredMap)
6614
+ return map;
6615
+ hasRequiredMap = 1;
6616
+ const Type2 = requireType();
6617
+ map = new Type2("tag:yaml.org,2002:map", {
6571
6618
  kind: "mapping",
6572
6619
  construct: function(data) {
6573
6620
  return data !== null ? data : {};
6574
6621
  }
6575
6622
  });
6576
- });
6577
- var require_failsafe = /* @__PURE__ */ __commonJSMin((exports, module) => {
6578
- module.exports = new (require_schema())({ explicit: [
6579
- require_str(),
6580
- require_seq(),
6581
- require_map()
6582
- ] });
6583
- });
6584
- var require_null = /* @__PURE__ */ __commonJSMin((exports, module) => {
6585
- var Type = require_type();
6623
+ return map;
6624
+ }
6625
+ var failsafe;
6626
+ var hasRequiredFailsafe;
6627
+ function requireFailsafe() {
6628
+ if (hasRequiredFailsafe)
6629
+ return failsafe;
6630
+ hasRequiredFailsafe = 1;
6631
+ const Schema2 = requireSchema();
6632
+ failsafe = new Schema2({
6633
+ explicit: [
6634
+ requireStr(),
6635
+ requireSeq(),
6636
+ requireMap()
6637
+ ]
6638
+ });
6639
+ return failsafe;
6640
+ }
6641
+ var _null;
6642
+ var hasRequired_null;
6643
+ function require_null() {
6644
+ if (hasRequired_null)
6645
+ return _null;
6646
+ hasRequired_null = 1;
6647
+ const Type2 = requireType();
6586
6648
  function resolveYamlNull(data) {
6587
6649
  if (data === null)
6588
6650
  return true;
@@ -6595,7 +6657,7 @@ var require_null = /* @__PURE__ */ __commonJSMin((exports, module) => {
6595
6657
  function isNull(object) {
6596
6658
  return object === null;
6597
6659
  }
6598
- module.exports = new Type("tag:yaml.org,2002:null", {
6660
+ _null = new Type2("tag:yaml.org,2002:null", {
6599
6661
  kind: "scalar",
6600
6662
  resolve: resolveYamlNull,
6601
6663
  construct: constructYamlNull,
@@ -6619,9 +6681,15 @@ var require_null = /* @__PURE__ */ __commonJSMin((exports, module) => {
6619
6681
  },
6620
6682
  defaultStyle: "lowercase"
6621
6683
  });
6622
- });
6623
- var require_bool = /* @__PURE__ */ __commonJSMin((exports, module) => {
6624
- var Type = require_type();
6684
+ return _null;
6685
+ }
6686
+ var bool;
6687
+ var hasRequiredBool;
6688
+ function requireBool() {
6689
+ if (hasRequiredBool)
6690
+ return bool;
6691
+ hasRequiredBool = 1;
6692
+ const Type2 = requireType();
6625
6693
  function resolveYamlBoolean(data) {
6626
6694
  if (data === null)
6627
6695
  return false;
@@ -6634,7 +6702,7 @@ var require_bool = /* @__PURE__ */ __commonJSMin((exports, module) => {
6634
6702
  function isBoolean(object) {
6635
6703
  return Object.prototype.toString.call(object) === "[object Boolean]";
6636
6704
  }
6637
- module.exports = new Type("tag:yaml.org,2002:bool", {
6705
+ bool = new Type2("tag:yaml.org,2002:bool", {
6638
6706
  kind: "scalar",
6639
6707
  resolve: resolveYamlBoolean,
6640
6708
  construct: constructYamlBoolean,
@@ -6652,10 +6720,16 @@ var require_bool = /* @__PURE__ */ __commonJSMin((exports, module) => {
6652
6720
  },
6653
6721
  defaultStyle: "lowercase"
6654
6722
  });
6655
- });
6656
- var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
6657
- var common = require_common();
6658
- var Type = require_type();
6723
+ return bool;
6724
+ }
6725
+ var int;
6726
+ var hasRequiredInt;
6727
+ function requireInt() {
6728
+ if (hasRequiredInt)
6729
+ return int;
6730
+ hasRequiredInt = 1;
6731
+ const common2 = requireCommon();
6732
+ const Type2 = requireType();
6659
6733
  function isHexCode(c) {
6660
6734
  return c >= 48 && c <= 57 || c >= 65 && c <= 70 || c >= 97 && c <= 102;
6661
6735
  }
@@ -6674,8 +6748,9 @@ var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
6674
6748
  if (!max)
6675
6749
  return false;
6676
6750
  let ch = data[index];
6677
- if (ch === "-" || ch === "+")
6751
+ if (ch === "-" || ch === "+") {
6678
6752
  ch = data[++index];
6753
+ }
6679
6754
  if (ch === "0") {
6680
6755
  if (index + 1 === max)
6681
6756
  return true;
@@ -6688,7 +6763,7 @@ var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
6688
6763
  return false;
6689
6764
  hasDigits = true;
6690
6765
  }
6691
- return hasDigits && Number.isFinite(parseYamlInteger(data));
6766
+ return hasDigits && isFinite(parseYamlInteger(data));
6692
6767
  }
6693
6768
  if (ch === "x") {
6694
6769
  index++;
@@ -6697,7 +6772,7 @@ var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
6697
6772
  return false;
6698
6773
  hasDigits = true;
6699
6774
  }
6700
- return hasDigits && Number.isFinite(parseYamlInteger(data));
6775
+ return hasDigits && isFinite(parseYamlInteger(data));
6701
6776
  }
6702
6777
  if (ch === "o") {
6703
6778
  index++;
@@ -6706,17 +6781,18 @@ var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
6706
6781
  return false;
6707
6782
  hasDigits = true;
6708
6783
  }
6709
- return hasDigits && Number.isFinite(parseYamlInteger(data));
6784
+ return hasDigits && isFinite(parseYamlInteger(data));
6710
6785
  }
6711
6786
  }
6712
6787
  for (;index < max; index++) {
6713
- if (!isDecCode(data.charCodeAt(index)))
6788
+ if (!isDecCode(data.charCodeAt(index))) {
6714
6789
  return false;
6790
+ }
6715
6791
  hasDigits = true;
6716
6792
  }
6717
6793
  if (!hasDigits)
6718
6794
  return false;
6719
- return Number.isFinite(parseYamlInteger(data));
6795
+ return isFinite(parseYamlInteger(data));
6720
6796
  }
6721
6797
  function parseYamlInteger(data) {
6722
6798
  let value = data;
@@ -6744,9 +6820,9 @@ var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
6744
6820
  return parseYamlInteger(data);
6745
6821
  }
6746
6822
  function isInteger(object) {
6747
- return Object.prototype.toString.call(object) === "[object Number]" && object % 1 === 0 && !common.isNegativeZero(object);
6823
+ return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common2.isNegativeZero(object));
6748
6824
  }
6749
- module.exports = new Type("tag:yaml.org,2002:int", {
6825
+ int = new Type2("tag:yaml.org,2002:int", {
6750
6826
  kind: "scalar",
6751
6827
  resolve: resolveYamlInteger,
6752
6828
  construct: constructYamlInteger,
@@ -6773,35 +6849,45 @@ var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
6773
6849
  hexadecimal: [16, "hex"]
6774
6850
  }
6775
6851
  });
6776
- });
6777
- var require_float = /* @__PURE__ */ __commonJSMin((exports, module) => {
6778
- var common = require_common();
6779
- var Type = require_type();
6780
- var YAML_FLOAT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
6781
- var YAML_FLOAT_SPECIAL_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
6852
+ return int;
6853
+ }
6854
+ var float;
6855
+ var hasRequiredFloat;
6856
+ function requireFloat() {
6857
+ if (hasRequiredFloat)
6858
+ return float;
6859
+ hasRequiredFloat = 1;
6860
+ const common2 = requireCommon();
6861
+ const Type2 = requireType();
6862
+ const YAML_FLOAT_PATTERN = new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
6863
+ const YAML_FLOAT_SPECIAL_PATTERN = new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
6782
6864
  function resolveYamlFloat(data) {
6783
6865
  if (data === null)
6784
6866
  return false;
6785
- if (!YAML_FLOAT_PATTERN.test(data))
6867
+ if (!YAML_FLOAT_PATTERN.test(data)) {
6786
6868
  return false;
6787
- if (Number.isFinite(parseFloat(data, 10)))
6869
+ }
6870
+ if (isFinite(parseFloat(data, 10))) {
6788
6871
  return true;
6872
+ }
6789
6873
  return YAML_FLOAT_SPECIAL_PATTERN.test(data);
6790
6874
  }
6791
6875
  function constructYamlFloat(data) {
6792
6876
  let value = data.toLowerCase();
6793
6877
  const sign = value[0] === "-" ? -1 : 1;
6794
- if ("+-".indexOf(value[0]) >= 0)
6878
+ if ("+-".indexOf(value[0]) >= 0) {
6795
6879
  value = value.slice(1);
6796
- if (value === ".inf")
6880
+ }
6881
+ if (value === ".inf") {
6797
6882
  return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
6798
- else if (value === ".nan")
6883
+ } else if (value === ".nan") {
6799
6884
  return NaN;
6885
+ }
6800
6886
  return sign * parseFloat(value, 10);
6801
6887
  }
6802
- var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
6888
+ const SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
6803
6889
  function representYamlFloat(object, style) {
6804
- if (isNaN(object))
6890
+ if (isNaN(object)) {
6805
6891
  switch (style) {
6806
6892
  case "lowercase":
6807
6893
  return ".nan";
@@ -6810,7 +6896,7 @@ var require_float = /* @__PURE__ */ __commonJSMin((exports, module) => {
6810
6896
  case "camelcase":
6811
6897
  return ".NaN";
6812
6898
  }
6813
- else if (Number.POSITIVE_INFINITY === object)
6899
+ } else if (Number.POSITIVE_INFINITY === object) {
6814
6900
  switch (style) {
6815
6901
  case "lowercase":
6816
6902
  return ".inf";
@@ -6819,7 +6905,7 @@ var require_float = /* @__PURE__ */ __commonJSMin((exports, module) => {
6819
6905
  case "camelcase":
6820
6906
  return ".Inf";
6821
6907
  }
6822
- else if (Number.NEGATIVE_INFINITY === object)
6908
+ } else if (Number.NEGATIVE_INFINITY === object) {
6823
6909
  switch (style) {
6824
6910
  case "lowercase":
6825
6911
  return "-.inf";
@@ -6828,15 +6914,16 @@ var require_float = /* @__PURE__ */ __commonJSMin((exports, module) => {
6828
6914
  case "camelcase":
6829
6915
  return "-.Inf";
6830
6916
  }
6831
- else if (common.isNegativeZero(object))
6917
+ } else if (common2.isNegativeZero(object)) {
6832
6918
  return "-0.0";
6919
+ }
6833
6920
  const res = object.toString(10);
6834
6921
  return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res;
6835
6922
  }
6836
6923
  function isFloat(object) {
6837
- return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object));
6924
+ return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common2.isNegativeZero(object));
6838
6925
  }
6839
- module.exports = new Type("tag:yaml.org,2002:float", {
6926
+ float = new Type2("tag:yaml.org,2002:float", {
6840
6927
  kind: "scalar",
6841
6928
  resolve: resolveYamlFloat,
6842
6929
  construct: constructYamlFloat,
@@ -6844,22 +6931,42 @@ var require_float = /* @__PURE__ */ __commonJSMin((exports, module) => {
6844
6931
  represent: representYamlFloat,
6845
6932
  defaultStyle: "lowercase"
6846
6933
  });
6847
- });
6848
- var require_json = /* @__PURE__ */ __commonJSMin((exports, module) => {
6849
- module.exports = require_failsafe().extend({ implicit: [
6850
- require_null(),
6851
- require_bool(),
6852
- require_int(),
6853
- require_float()
6854
- ] });
6855
- });
6856
- var require_core = /* @__PURE__ */ __commonJSMin((exports, module) => {
6857
- module.exports = require_json();
6858
- });
6859
- var require_timestamp = /* @__PURE__ */ __commonJSMin((exports, module) => {
6860
- var Type = require_type();
6861
- var YAML_DATE_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$");
6862
- var YAML_TIMESTAMP_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
6934
+ return float;
6935
+ }
6936
+ var json;
6937
+ var hasRequiredJson;
6938
+ function requireJson() {
6939
+ if (hasRequiredJson)
6940
+ return json;
6941
+ hasRequiredJson = 1;
6942
+ json = requireFailsafe().extend({
6943
+ implicit: [
6944
+ require_null(),
6945
+ requireBool(),
6946
+ requireInt(),
6947
+ requireFloat()
6948
+ ]
6949
+ });
6950
+ return json;
6951
+ }
6952
+ var core;
6953
+ var hasRequiredCore;
6954
+ function requireCore() {
6955
+ if (hasRequiredCore)
6956
+ return core;
6957
+ hasRequiredCore = 1;
6958
+ core = requireJson();
6959
+ return core;
6960
+ }
6961
+ var timestamp;
6962
+ var hasRequiredTimestamp;
6963
+ function requireTimestamp() {
6964
+ if (hasRequiredTimestamp)
6965
+ return timestamp;
6966
+ hasRequiredTimestamp = 1;
6967
+ const Type2 = requireType();
6968
+ const YAML_DATE_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$");
6969
+ const YAML_TIMESTAMP_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
6863
6970
  function resolveYamlTimestamp(data) {
6864
6971
  if (data === null)
6865
6972
  return false;
@@ -6880,15 +6987,17 @@ var require_timestamp = /* @__PURE__ */ __commonJSMin((exports, module) => {
6880
6987
  const year = +match[1];
6881
6988
  const month = +match[2] - 1;
6882
6989
  const day = +match[3];
6883
- if (!match[4])
6990
+ if (!match[4]) {
6884
6991
  return new Date(Date.UTC(year, month, day));
6992
+ }
6885
6993
  const hour = +match[4];
6886
6994
  const minute = +match[5];
6887
6995
  const second = +match[6];
6888
6996
  if (match[7]) {
6889
6997
  fraction = match[7].slice(0, 3);
6890
- while (fraction.length < 3)
6998
+ while (fraction.length < 3) {
6891
6999
  fraction += "0";
7000
+ }
6892
7001
  fraction = +fraction;
6893
7002
  }
6894
7003
  if (match[9]) {
@@ -6906,36 +7015,48 @@ var require_timestamp = /* @__PURE__ */ __commonJSMin((exports, module) => {
6906
7015
  function representYamlTimestamp(object) {
6907
7016
  return object.toISOString();
6908
7017
  }
6909
- module.exports = new Type("tag:yaml.org,2002:timestamp", {
7018
+ timestamp = new Type2("tag:yaml.org,2002:timestamp", {
6910
7019
  kind: "scalar",
6911
7020
  resolve: resolveYamlTimestamp,
6912
7021
  construct: constructYamlTimestamp,
6913
7022
  instanceOf: Date,
6914
7023
  represent: representYamlTimestamp
6915
7024
  });
6916
- });
6917
- var require_merge = /* @__PURE__ */ __commonJSMin((exports, module) => {
6918
- var Type = require_type();
7025
+ return timestamp;
7026
+ }
7027
+ var merge;
7028
+ var hasRequiredMerge;
7029
+ function requireMerge() {
7030
+ if (hasRequiredMerge)
7031
+ return merge;
7032
+ hasRequiredMerge = 1;
7033
+ const Type2 = requireType();
6919
7034
  function resolveYamlMerge(data) {
6920
7035
  return data === "<<" || data === null;
6921
7036
  }
6922
- module.exports = new Type("tag:yaml.org,2002:merge", {
7037
+ merge = new Type2("tag:yaml.org,2002:merge", {
6923
7038
  kind: "scalar",
6924
7039
  resolve: resolveYamlMerge
6925
7040
  });
6926
- });
6927
- var require_binary = /* @__PURE__ */ __commonJSMin((exports, module) => {
6928
- var Type = require_type();
6929
- var BASE64_MAP = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
7041
+ return merge;
7042
+ }
7043
+ var binary;
7044
+ var hasRequiredBinary;
7045
+ function requireBinary() {
7046
+ if (hasRequiredBinary)
7047
+ return binary;
7048
+ hasRequiredBinary = 1;
7049
+ const Type2 = requireType();
7050
+ const BASE64_MAP = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
6930
7051
  \r`;
6931
7052
  function resolveYamlBinary(data) {
6932
7053
  if (data === null)
6933
7054
  return false;
6934
7055
  let bitlen = 0;
6935
7056
  const max = data.length;
6936
- const map = BASE64_MAP;
7057
+ const map2 = BASE64_MAP;
6937
7058
  for (let idx = 0;idx < max; idx++) {
6938
- const code = map.indexOf(data.charAt(idx));
7059
+ const code = map2.indexOf(data.charAt(idx));
6939
7060
  if (code > 64)
6940
7061
  continue;
6941
7062
  if (code < 0)
@@ -6947,7 +7068,7 @@ var require_binary = /* @__PURE__ */ __commonJSMin((exports, module) => {
6947
7068
  function constructYamlBinary(data) {
6948
7069
  const input = data.replace(/[\r\n=]/g, "");
6949
7070
  const max = input.length;
6950
- const map = BASE64_MAP;
7071
+ const map2 = BASE64_MAP;
6951
7072
  let bits = 0;
6952
7073
  const result = [];
6953
7074
  for (let idx = 0;idx < max; idx++) {
@@ -6956,7 +7077,7 @@ var require_binary = /* @__PURE__ */ __commonJSMin((exports, module) => {
6956
7077
  result.push(bits >> 8 & 255);
6957
7078
  result.push(bits & 255);
6958
7079
  }
6959
- bits = bits << 6 | map.indexOf(input.charAt(idx));
7080
+ bits = bits << 6 | map2.indexOf(input.charAt(idx));
6960
7081
  }
6961
7082
  const tailbits = max % 4 * 6;
6962
7083
  if (tailbits === 0) {
@@ -6966,58 +7087,65 @@ var require_binary = /* @__PURE__ */ __commonJSMin((exports, module) => {
6966
7087
  } else if (tailbits === 18) {
6967
7088
  result.push(bits >> 10 & 255);
6968
7089
  result.push(bits >> 2 & 255);
6969
- } else if (tailbits === 12)
7090
+ } else if (tailbits === 12) {
6970
7091
  result.push(bits >> 4 & 255);
7092
+ }
6971
7093
  return new Uint8Array(result);
6972
7094
  }
6973
7095
  function representYamlBinary(object) {
6974
7096
  let result = "";
6975
7097
  let bits = 0;
6976
7098
  const max = object.length;
6977
- const map = BASE64_MAP;
7099
+ const map2 = BASE64_MAP;
6978
7100
  for (let idx = 0;idx < max; idx++) {
6979
7101
  if (idx % 3 === 0 && idx) {
6980
- result += map[bits >> 18 & 63];
6981
- result += map[bits >> 12 & 63];
6982
- result += map[bits >> 6 & 63];
6983
- result += map[bits & 63];
7102
+ result += map2[bits >> 18 & 63];
7103
+ result += map2[bits >> 12 & 63];
7104
+ result += map2[bits >> 6 & 63];
7105
+ result += map2[bits & 63];
6984
7106
  }
6985
7107
  bits = (bits << 8) + object[idx];
6986
7108
  }
6987
7109
  const tail = max % 3;
6988
7110
  if (tail === 0) {
6989
- result += map[bits >> 18 & 63];
6990
- result += map[bits >> 12 & 63];
6991
- result += map[bits >> 6 & 63];
6992
- result += map[bits & 63];
7111
+ result += map2[bits >> 18 & 63];
7112
+ result += map2[bits >> 12 & 63];
7113
+ result += map2[bits >> 6 & 63];
7114
+ result += map2[bits & 63];
6993
7115
  } else if (tail === 2) {
6994
- result += map[bits >> 10 & 63];
6995
- result += map[bits >> 4 & 63];
6996
- result += map[bits << 2 & 63];
6997
- result += map[64];
7116
+ result += map2[bits >> 10 & 63];
7117
+ result += map2[bits >> 4 & 63];
7118
+ result += map2[bits << 2 & 63];
7119
+ result += map2[64];
6998
7120
  } else if (tail === 1) {
6999
- result += map[bits >> 2 & 63];
7000
- result += map[bits << 4 & 63];
7001
- result += map[64];
7002
- result += map[64];
7121
+ result += map2[bits >> 2 & 63];
7122
+ result += map2[bits << 4 & 63];
7123
+ result += map2[64];
7124
+ result += map2[64];
7003
7125
  }
7004
7126
  return result;
7005
7127
  }
7006
7128
  function isBinary(obj) {
7007
7129
  return Object.prototype.toString.call(obj) === "[object Uint8Array]";
7008
7130
  }
7009
- module.exports = new Type("tag:yaml.org,2002:binary", {
7131
+ binary = new Type2("tag:yaml.org,2002:binary", {
7010
7132
  kind: "scalar",
7011
7133
  resolve: resolveYamlBinary,
7012
7134
  construct: constructYamlBinary,
7013
7135
  predicate: isBinary,
7014
7136
  represent: representYamlBinary
7015
7137
  });
7016
- });
7017
- var require_omap = /* @__PURE__ */ __commonJSMin((exports, module) => {
7018
- var Type = require_type();
7019
- var _hasOwnProperty = Object.prototype.hasOwnProperty;
7020
- var _toString = Object.prototype.toString;
7138
+ return binary;
7139
+ }
7140
+ var omap;
7141
+ var hasRequiredOmap;
7142
+ function requireOmap() {
7143
+ if (hasRequiredOmap)
7144
+ return omap;
7145
+ hasRequiredOmap = 1;
7146
+ const Type2 = requireType();
7147
+ const _hasOwnProperty = Object.prototype.hasOwnProperty;
7148
+ const _toString = Object.prototype.toString;
7021
7149
  function resolveYamlOmap(data) {
7022
7150
  if (data === null)
7023
7151
  return true;
@@ -7029,12 +7157,14 @@ var require_omap = /* @__PURE__ */ __commonJSMin((exports, module) => {
7029
7157
  if (_toString.call(pair) !== "[object Object]")
7030
7158
  return false;
7031
7159
  let pairKey;
7032
- for (pairKey in pair)
7033
- if (_hasOwnProperty.call(pair, pairKey))
7160
+ for (pairKey in pair) {
7161
+ if (_hasOwnProperty.call(pair, pairKey)) {
7034
7162
  if (!pairHasKey)
7035
7163
  pairHasKey = true;
7036
7164
  else
7037
7165
  return false;
7166
+ }
7167
+ }
7038
7168
  if (!pairHasKey)
7039
7169
  return false;
7040
7170
  if (objectKeys.indexOf(pairKey) === -1)
@@ -7047,15 +7177,21 @@ var require_omap = /* @__PURE__ */ __commonJSMin((exports, module) => {
7047
7177
  function constructYamlOmap(data) {
7048
7178
  return data !== null ? data : [];
7049
7179
  }
7050
- module.exports = new Type("tag:yaml.org,2002:omap", {
7180
+ omap = new Type2("tag:yaml.org,2002:omap", {
7051
7181
  kind: "sequence",
7052
7182
  resolve: resolveYamlOmap,
7053
7183
  construct: constructYamlOmap
7054
7184
  });
7055
- });
7056
- var require_pairs = /* @__PURE__ */ __commonJSMin((exports, module) => {
7057
- var Type = require_type();
7058
- var _toString = Object.prototype.toString;
7185
+ return omap;
7186
+ }
7187
+ var pairs;
7188
+ var hasRequiredPairs;
7189
+ function requirePairs() {
7190
+ if (hasRequiredPairs)
7191
+ return pairs;
7192
+ hasRequiredPairs = 1;
7193
+ const Type2 = requireType();
7194
+ const _toString = Object.prototype.toString;
7059
7195
  function resolveYamlPairs(data) {
7060
7196
  if (data === null)
7061
7197
  return true;
@@ -7084,64 +7220,85 @@ var require_pairs = /* @__PURE__ */ __commonJSMin((exports, module) => {
7084
7220
  }
7085
7221
  return result;
7086
7222
  }
7087
- module.exports = new Type("tag:yaml.org,2002:pairs", {
7223
+ pairs = new Type2("tag:yaml.org,2002:pairs", {
7088
7224
  kind: "sequence",
7089
7225
  resolve: resolveYamlPairs,
7090
7226
  construct: constructYamlPairs
7091
7227
  });
7092
- });
7093
- var require_set = /* @__PURE__ */ __commonJSMin((exports, module) => {
7094
- var Type = require_type();
7095
- var _hasOwnProperty = Object.prototype.hasOwnProperty;
7228
+ return pairs;
7229
+ }
7230
+ var set;
7231
+ var hasRequiredSet;
7232
+ function requireSet() {
7233
+ if (hasRequiredSet)
7234
+ return set;
7235
+ hasRequiredSet = 1;
7236
+ const Type2 = requireType();
7237
+ const _hasOwnProperty = Object.prototype.hasOwnProperty;
7096
7238
  function resolveYamlSet(data) {
7097
7239
  if (data === null)
7098
7240
  return true;
7099
7241
  const object = data;
7100
- for (const key in object)
7242
+ for (const key in object) {
7101
7243
  if (_hasOwnProperty.call(object, key)) {
7102
7244
  if (object[key] !== null)
7103
7245
  return false;
7104
7246
  }
7247
+ }
7105
7248
  return true;
7106
7249
  }
7107
7250
  function constructYamlSet(data) {
7108
7251
  return data !== null ? data : {};
7109
7252
  }
7110
- module.exports = new Type("tag:yaml.org,2002:set", {
7253
+ set = new Type2("tag:yaml.org,2002:set", {
7111
7254
  kind: "mapping",
7112
7255
  resolve: resolveYamlSet,
7113
7256
  construct: constructYamlSet
7114
7257
  });
7115
- });
7116
- var require_default = /* @__PURE__ */ __commonJSMin((exports, module) => {
7117
- module.exports = require_core().extend({
7118
- implicit: [require_timestamp(), require_merge()],
7258
+ return set;
7259
+ }
7260
+ var _default;
7261
+ var hasRequired_default;
7262
+ function require_default() {
7263
+ if (hasRequired_default)
7264
+ return _default;
7265
+ hasRequired_default = 1;
7266
+ _default = requireCore().extend({
7267
+ implicit: [
7268
+ requireTimestamp(),
7269
+ requireMerge()
7270
+ ],
7119
7271
  explicit: [
7120
- require_binary(),
7121
- require_omap(),
7122
- require_pairs(),
7123
- require_set()
7272
+ requireBinary(),
7273
+ requireOmap(),
7274
+ requirePairs(),
7275
+ requireSet()
7124
7276
  ]
7125
7277
  });
7126
- });
7127
- var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7128
- var common = require_common();
7129
- var YAMLException = require_exception();
7130
- var makeSnippet = require_snippet();
7131
- var DEFAULT_SCHEMA = require_default();
7132
- var _hasOwnProperty = Object.prototype.hasOwnProperty;
7133
- var CONTEXT_FLOW_IN = 1;
7134
- var CONTEXT_FLOW_OUT = 2;
7135
- var CONTEXT_BLOCK_IN = 3;
7136
- var CONTEXT_BLOCK_OUT = 4;
7137
- var CHOMPING_CLIP = 1;
7138
- var CHOMPING_STRIP = 2;
7139
- var CHOMPING_KEEP = 3;
7140
- var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
7141
- var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
7142
- var PATTERN_FLOW_INDICATORS = /[,\[\]{}]/;
7143
- var PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/;
7144
- var PATTERN_TAG_URI = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;
7278
+ return _default;
7279
+ }
7280
+ var hasRequiredLoader;
7281
+ function requireLoader() {
7282
+ if (hasRequiredLoader)
7283
+ return loader;
7284
+ hasRequiredLoader = 1;
7285
+ const common2 = requireCommon();
7286
+ const YAMLException2 = requireException();
7287
+ const makeSnippet = requireSnippet();
7288
+ const DEFAULT_SCHEMA2 = require_default();
7289
+ const _hasOwnProperty = Object.prototype.hasOwnProperty;
7290
+ const CONTEXT_FLOW_IN = 1;
7291
+ const CONTEXT_FLOW_OUT = 2;
7292
+ const CONTEXT_BLOCK_IN = 3;
7293
+ const CONTEXT_BLOCK_OUT = 4;
7294
+ const CHOMPING_CLIP = 1;
7295
+ const CHOMPING_STRIP = 2;
7296
+ const CHOMPING_KEEP = 3;
7297
+ const PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
7298
+ const PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
7299
+ const PATTERN_FLOW_INDICATORS = /[,\[\]{}]/;
7300
+ const PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/;
7301
+ const PATTERN_TAG_URI = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;
7145
7302
  function _class(obj) {
7146
7303
  return Object.prototype.toString.call(obj);
7147
7304
  }
@@ -7158,25 +7315,31 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7158
7315
  return c === 44 || c === 91 || c === 93 || c === 123 || c === 125;
7159
7316
  }
7160
7317
  function fromHexCode(c) {
7161
- if (c >= 48 && c <= 57)
7318
+ if (c >= 48 && c <= 57) {
7162
7319
  return c - 48;
7320
+ }
7163
7321
  const lc = c | 32;
7164
- if (lc >= 97 && lc <= 102)
7322
+ if (lc >= 97 && lc <= 102) {
7165
7323
  return lc - 97 + 10;
7324
+ }
7166
7325
  return -1;
7167
7326
  }
7168
7327
  function escapedHexLen(c) {
7169
- if (c === 120)
7328
+ if (c === 120) {
7170
7329
  return 2;
7171
- if (c === 117)
7330
+ }
7331
+ if (c === 117) {
7172
7332
  return 4;
7173
- if (c === 85)
7333
+ }
7334
+ if (c === 85) {
7174
7335
  return 8;
7336
+ }
7175
7337
  return 0;
7176
7338
  }
7177
7339
  function fromDecimalCode(c) {
7178
- if (c >= 48 && c <= 57)
7340
+ if (c >= 48 && c <= 57) {
7179
7341
  return c - 48;
7342
+ }
7180
7343
  return -1;
7181
7344
  }
7182
7345
  function simpleEscapeSequence(c) {
@@ -7223,23 +7386,25 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7223
7386
  }
7224
7387
  }
7225
7388
  function charFromCodepoint(c) {
7226
- if (c <= 65535)
7389
+ if (c <= 65535) {
7227
7390
  return String.fromCharCode(c);
7391
+ }
7228
7392
  return String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320);
7229
7393
  }
7230
7394
  function setProperty(object, key, value) {
7231
- if (key === "__proto__")
7395
+ if (key === "__proto__") {
7232
7396
  Object.defineProperty(object, key, {
7233
7397
  configurable: true,
7234
7398
  enumerable: true,
7235
7399
  writable: true,
7236
7400
  value
7237
7401
  });
7238
- else
7402
+ } else {
7239
7403
  object[key] = value;
7404
+ }
7240
7405
  }
7241
- var simpleEscapeCheck = new Array(256);
7242
- var simpleEscapeMap = new Array(256);
7406
+ const simpleEscapeCheck = new Array(256);
7407
+ const simpleEscapeMap = new Array(256);
7243
7408
  for (let i = 0;i < 256; i++) {
7244
7409
  simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;
7245
7410
  simpleEscapeMap[i] = simpleEscapeSequence(i);
@@ -7247,13 +7412,13 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7247
7412
  function State(input, options) {
7248
7413
  this.input = input;
7249
7414
  this.filename = options["filename"] || null;
7250
- this.schema = options["schema"] || DEFAULT_SCHEMA;
7415
+ this.schema = options["schema"] || DEFAULT_SCHEMA2;
7251
7416
  this.onWarning = options["onWarning"] || null;
7252
7417
  this.legacy = options["legacy"] || false;
7253
7418
  this.json = options["json"] || false;
7254
7419
  this.listener = options["listener"] || null;
7255
7420
  this.maxDepth = typeof options["maxDepth"] === "number" ? options["maxDepth"] : 100;
7256
- this.maxMergeSeqLength = typeof options["maxMergeSeqLength"] === "number" ? options["maxMergeSeqLength"] : 20;
7421
+ this.maxTotalMergeKeys = typeof options["maxTotalMergeKeys"] === "number" ? options["maxTotalMergeKeys"] : 1e4;
7257
7422
  this.implicitTypes = this.schema.compiledImplicit;
7258
7423
  this.typeMap = this.schema.compiledTypeMap;
7259
7424
  this.length = input.length;
@@ -7262,6 +7427,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7262
7427
  this.lineStart = 0;
7263
7428
  this.lineIndent = 0;
7264
7429
  this.depth = 0;
7430
+ this.totalMergeKeys = 0;
7265
7431
  this.firstTabInLine = -1;
7266
7432
  this.documents = [];
7267
7433
  this.anchorMapTransactions = [];
@@ -7275,29 +7441,31 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7275
7441
  column: state.position - state.lineStart
7276
7442
  };
7277
7443
  mark.snippet = makeSnippet(mark);
7278
- return new YAMLException(message, mark);
7444
+ return new YAMLException2(message, mark);
7279
7445
  }
7280
7446
  function throwError(state, message) {
7281
7447
  throw generateError(state, message);
7282
7448
  }
7283
7449
  function throwWarning(state, message) {
7284
- if (state.onWarning)
7450
+ if (state.onWarning) {
7285
7451
  state.onWarning.call(null, generateError(state, message));
7452
+ }
7286
7453
  }
7287
7454
  function storeAnchor(state, name, value) {
7288
7455
  const transactions = state.anchorMapTransactions;
7289
7456
  if (transactions.length !== 0) {
7290
7457
  const transaction = transactions[transactions.length - 1];
7291
- if (!_hasOwnProperty.call(transaction, name))
7458
+ if (!_hasOwnProperty.call(transaction, name)) {
7292
7459
  transaction[name] = {
7293
7460
  existed: _hasOwnProperty.call(state.anchorMap, name),
7294
7461
  value: state.anchorMap[name]
7295
7462
  };
7463
+ }
7296
7464
  }
7297
7465
  state.anchorMap[name] = value;
7298
7466
  }
7299
7467
  function beginAnchorTransaction(state) {
7300
- state.anchorMapTransactions.push(Object.create(null));
7468
+ state.anchorMapTransactions.push(/* @__PURE__ */ Object.create(null));
7301
7469
  }
7302
7470
  function commitAnchorTransaction(state) {
7303
7471
  const transaction = state.anchorMapTransactions.pop();
@@ -7308,8 +7476,9 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7308
7476
  const names = Object.keys(transaction);
7309
7477
  for (let index = 0, length = names.length;index < length; index += 1) {
7310
7478
  const name = names[index];
7311
- if (!_hasOwnProperty.call(parent, name))
7479
+ if (!_hasOwnProperty.call(parent, name)) {
7312
7480
  parent[name] = transaction[name];
7481
+ }
7313
7482
  }
7314
7483
  }
7315
7484
  function rollbackAnchorTransaction(state) {
@@ -7317,10 +7486,11 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7317
7486
  const names = Object.keys(transaction);
7318
7487
  for (let index = names.length - 1;index >= 0; index -= 1) {
7319
7488
  const entry = transaction[names[index]];
7320
- if (entry.existed)
7489
+ if (entry.existed) {
7321
7490
  state.anchorMap[names[index]] = entry.value;
7322
- else
7491
+ } else {
7323
7492
  delete state.anchorMap[names[index]];
7493
+ }
7324
7494
  }
7325
7495
  }
7326
7496
  function snapshotState(state) {
@@ -7347,36 +7517,45 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7347
7517
  state.kind = snapshot.kind;
7348
7518
  state.result = snapshot.result;
7349
7519
  }
7350
- var directiveHandlers = {
7520
+ const directiveHandlers = {
7351
7521
  YAML: function handleYamlDirective(state, name, args) {
7352
- if (state.version !== null)
7522
+ if (state.version !== null) {
7353
7523
  throwError(state, "duplication of %YAML directive");
7354
- if (args.length !== 1)
7524
+ }
7525
+ if (args.length !== 1) {
7355
7526
  throwError(state, "YAML directive accepts exactly one argument");
7527
+ }
7356
7528
  const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
7357
- if (match === null)
7529
+ if (match === null) {
7358
7530
  throwError(state, "ill-formed argument of the YAML directive");
7531
+ }
7359
7532
  const major = parseInt(match[1], 10);
7360
7533
  const minor = parseInt(match[2], 10);
7361
- if (major !== 1)
7534
+ if (major !== 1) {
7362
7535
  throwError(state, "unacceptable YAML version of the document");
7536
+ }
7363
7537
  state.version = args[0];
7364
7538
  state.checkLineBreaks = minor < 2;
7365
- if (minor !== 1 && minor !== 2)
7539
+ if (minor !== 1 && minor !== 2) {
7366
7540
  throwWarning(state, "unsupported YAML version of the document");
7541
+ }
7367
7542
  },
7368
7543
  TAG: function handleTagDirective(state, name, args) {
7369
7544
  let prefix;
7370
- if (args.length !== 2)
7545
+ if (args.length !== 2) {
7371
7546
  throwError(state, "TAG directive accepts exactly two arguments");
7547
+ }
7372
7548
  const handle = args[0];
7373
7549
  prefix = args[1];
7374
- if (!PATTERN_TAG_HANDLE.test(handle))
7550
+ if (!PATTERN_TAG_HANDLE.test(handle)) {
7375
7551
  throwError(state, "ill-formed tag handle (first argument) of the TAG directive");
7376
- if (_hasOwnProperty.call(state.tagMap, handle))
7552
+ }
7553
+ if (_hasOwnProperty.call(state.tagMap, handle)) {
7377
7554
  throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle');
7378
- if (!PATTERN_TAG_URI.test(prefix))
7555
+ }
7556
+ if (!PATTERN_TAG_URI.test(prefix)) {
7379
7557
  throwError(state, "ill-formed tag prefix (second argument) of the TAG directive");
7558
+ }
7380
7559
  try {
7381
7560
  prefix = decodeURIComponent(prefix);
7382
7561
  } catch (err) {
@@ -7388,23 +7567,29 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7388
7567
  function captureSegment(state, start, end, checkJson) {
7389
7568
  if (start < end) {
7390
7569
  const _result = state.input.slice(start, end);
7391
- if (checkJson)
7570
+ if (checkJson) {
7392
7571
  for (let _position = 0, _length = _result.length;_position < _length; _position += 1) {
7393
7572
  const _character = _result.charCodeAt(_position);
7394
- if (!(_character === 9 || _character >= 32 && _character <= 1114111))
7573
+ if (!(_character === 9 || _character >= 32 && _character <= 1114111)) {
7395
7574
  throwError(state, "expected valid JSON character");
7575
+ }
7396
7576
  }
7397
- else if (PATTERN_NON_PRINTABLE.test(_result))
7577
+ } else if (PATTERN_NON_PRINTABLE.test(_result)) {
7398
7578
  throwError(state, "the stream contains non-printable characters");
7579
+ }
7399
7580
  state.result += _result;
7400
7581
  }
7401
7582
  }
7402
7583
  function mergeMappings(state, destination, source, overridableKeys) {
7403
- if (!common.isObject(source))
7584
+ if (!common2.isObject(source)) {
7404
7585
  throwError(state, "cannot merge mappings; the provided source object is unacceptable");
7586
+ }
7405
7587
  const sourceKeys = Object.keys(source);
7406
7588
  for (let index = 0, quantity = sourceKeys.length;index < quantity; index += 1) {
7407
7589
  const key = sourceKeys[index];
7590
+ if (state.maxTotalMergeKeys !== -1 && ++state.totalMergeKeys > state.maxTotalMergeKeys) {
7591
+ throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")");
7592
+ }
7408
7593
  if (!_hasOwnProperty.call(destination, key)) {
7409
7594
  setProperty(destination, key, source[key]);
7410
7595
  overridableKeys[key] = true;
@@ -7415,32 +7600,30 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7415
7600
  if (Array.isArray(keyNode)) {
7416
7601
  keyNode = Array.prototype.slice.call(keyNode);
7417
7602
  for (let index = 0, quantity = keyNode.length;index < quantity; index += 1) {
7418
- if (Array.isArray(keyNode[index]))
7603
+ if (Array.isArray(keyNode[index])) {
7419
7604
  throwError(state, "nested arrays are not supported inside keys");
7420
- if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]")
7605
+ }
7606
+ if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") {
7421
7607
  keyNode[index] = "[object Object]";
7608
+ }
7422
7609
  }
7423
7610
  }
7424
- if (typeof keyNode === "object" && _class(keyNode) === "[object Object]")
7611
+ if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") {
7425
7612
  keyNode = "[object Object]";
7613
+ }
7426
7614
  keyNode = String(keyNode);
7427
- if (_result === null)
7615
+ if (_result === null) {
7428
7616
  _result = {};
7429
- if (keyTag === "tag:yaml.org,2002:merge")
7617
+ }
7618
+ if (keyTag === "tag:yaml.org,2002:merge") {
7430
7619
  if (Array.isArray(valueNode)) {
7431
- if (valueNode.length > state.maxMergeSeqLength)
7432
- throwError(state, "merge sequence length exceeded maxMergeSeqLength (" + state.maxMergeSeqLength + ")");
7433
- const seen = /* @__PURE__ */ new Set;
7434
7620
  for (let index = 0, quantity = valueNode.length;index < quantity; index += 1) {
7435
- const src = valueNode[index];
7436
- if (seen.has(src))
7437
- continue;
7438
- seen.add(src);
7439
- mergeMappings(state, _result, src, overridableKeys);
7621
+ mergeMappings(state, _result, valueNode[index], overridableKeys);
7440
7622
  }
7441
- } else
7623
+ } else {
7442
7624
  mergeMappings(state, _result, valueNode, overridableKeys);
7443
- else {
7625
+ }
7626
+ } else {
7444
7627
  if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) {
7445
7628
  state.line = startLine || state.line;
7446
7629
  state.lineStart = startLineStart || state.lineStart;
@@ -7454,14 +7637,16 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7454
7637
  }
7455
7638
  function readLineBreak(state) {
7456
7639
  const ch = state.input.charCodeAt(state.position);
7457
- if (ch === 10)
7640
+ if (ch === 10) {
7458
7641
  state.position++;
7459
- else if (ch === 13) {
7642
+ } else if (ch === 13) {
7460
7643
  state.position++;
7461
- if (state.input.charCodeAt(state.position) === 10)
7644
+ if (state.input.charCodeAt(state.position) === 10) {
7462
7645
  state.position++;
7463
- } else
7646
+ }
7647
+ } else {
7464
7648
  throwError(state, "a line break is expected");
7649
+ }
7465
7650
  state.line += 1;
7466
7651
  state.lineStart = state.position;
7467
7652
  state.firstTabInLine = -1;
@@ -7471,14 +7656,16 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7471
7656
  let ch = state.input.charCodeAt(state.position);
7472
7657
  while (ch !== 0) {
7473
7658
  while (isWhiteSpace(ch)) {
7474
- if (ch === 9 && state.firstTabInLine === -1)
7659
+ if (ch === 9 && state.firstTabInLine === -1) {
7475
7660
  state.firstTabInLine = state.position;
7661
+ }
7476
7662
  ch = state.input.charCodeAt(++state.position);
7477
7663
  }
7478
- if (allowComments && ch === 35)
7479
- do
7664
+ if (allowComments && ch === 35) {
7665
+ do {
7480
7666
  ch = state.input.charCodeAt(++state.position);
7481
- while (ch !== 10 && ch !== 13 && ch !== 0);
7667
+ } while (ch !== 10 && ch !== 13 && ch !== 0);
7668
+ }
7482
7669
  if (isEol(ch)) {
7483
7670
  readLineBreak(state);
7484
7671
  ch = state.input.charCodeAt(state.position);
@@ -7488,11 +7675,13 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7488
7675
  state.lineIndent++;
7489
7676
  ch = state.input.charCodeAt(++state.position);
7490
7677
  }
7491
- } else
7678
+ } else {
7492
7679
  break;
7680
+ }
7493
7681
  }
7494
- if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent)
7682
+ if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {
7495
7683
  throwWarning(state, "deficient indentation");
7684
+ }
7496
7685
  return lineBreaks;
7497
7686
  }
7498
7687
  function testDocumentSeparator(state) {
@@ -7501,17 +7690,19 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7501
7690
  if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) {
7502
7691
  _position += 3;
7503
7692
  ch = state.input.charCodeAt(_position);
7504
- if (ch === 0 || isWsOrEol(ch))
7693
+ if (ch === 0 || isWsOrEol(ch)) {
7505
7694
  return true;
7695
+ }
7506
7696
  }
7507
7697
  return false;
7508
7698
  }
7509
7699
  function writeFoldedLines(state, count) {
7510
- if (count === 1)
7700
+ if (count === 1) {
7511
7701
  state.result += " ";
7512
- else if (count > 1)
7513
- state.result += common.repeat(`
7702
+ } else if (count > 1) {
7703
+ state.result += common2.repeat(`
7514
7704
  `, count - 1);
7705
+ }
7515
7706
  }
7516
7707
  function readPlainScalar(state, nodeIndent, withinFlowCollection) {
7517
7708
  let captureStart;
@@ -7523,12 +7714,14 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7523
7714
  const _kind = state.kind;
7524
7715
  const _result = state.result;
7525
7716
  let ch = state.input.charCodeAt(state.position);
7526
- if (isWsOrEol(ch) || isFlowIndicator(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96)
7717
+ if (isWsOrEol(ch) || isFlowIndicator(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) {
7527
7718
  return false;
7719
+ }
7528
7720
  if (ch === 63 || ch === 45) {
7529
7721
  const following = state.input.charCodeAt(state.position + 1);
7530
- if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following))
7722
+ if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) {
7531
7723
  return false;
7724
+ }
7532
7725
  }
7533
7726
  state.kind = "scalar";
7534
7727
  state.result = "";
@@ -7537,14 +7730,17 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7537
7730
  while (ch !== 0) {
7538
7731
  if (ch === 58) {
7539
7732
  const following = state.input.charCodeAt(state.position + 1);
7540
- if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following))
7733
+ if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) {
7541
7734
  break;
7735
+ }
7542
7736
  } else if (ch === 35) {
7543
- if (isWsOrEol(state.input.charCodeAt(state.position - 1)))
7737
+ const preceding = state.input.charCodeAt(state.position - 1);
7738
+ if (isWsOrEol(preceding)) {
7544
7739
  break;
7545
- } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && isFlowIndicator(ch))
7740
+ }
7741
+ } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && isFlowIndicator(ch)) {
7546
7742
  break;
7547
- else if (isEol(ch)) {
7743
+ } else if (isEol(ch)) {
7548
7744
  _line = state.line;
7549
7745
  _lineStart = state.lineStart;
7550
7746
  _lineIndent = state.lineIndent;
@@ -7567,13 +7763,15 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7567
7763
  captureStart = captureEnd = state.position;
7568
7764
  hasPendingContent = false;
7569
7765
  }
7570
- if (!isWhiteSpace(ch))
7766
+ if (!isWhiteSpace(ch)) {
7571
7767
  captureEnd = state.position + 1;
7768
+ }
7572
7769
  ch = state.input.charCodeAt(++state.position);
7573
7770
  }
7574
7771
  captureSegment(state, captureStart, captureEnd, false);
7575
- if (state.result)
7772
+ if (state.result) {
7576
7773
  return true;
7774
+ }
7577
7775
  state.kind = _kind;
7578
7776
  state.result = _result;
7579
7777
  return false;
@@ -7582,13 +7780,14 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7582
7780
  let captureStart;
7583
7781
  let captureEnd;
7584
7782
  let ch = state.input.charCodeAt(state.position);
7585
- if (ch !== 39)
7783
+ if (ch !== 39) {
7586
7784
  return false;
7785
+ }
7587
7786
  state.kind = "scalar";
7588
7787
  state.result = "";
7589
7788
  state.position++;
7590
7789
  captureStart = captureEnd = state.position;
7591
- while ((ch = state.input.charCodeAt(state.position)) !== 0)
7790
+ while ((ch = state.input.charCodeAt(state.position)) !== 0) {
7592
7791
  if (ch === 39) {
7593
7792
  captureSegment(state, captureStart, state.position, true);
7594
7793
  ch = state.input.charCodeAt(++state.position);
@@ -7596,19 +7795,22 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7596
7795
  captureStart = state.position;
7597
7796
  state.position++;
7598
7797
  captureEnd = state.position;
7599
- } else
7798
+ } else {
7600
7799
  return true;
7800
+ }
7601
7801
  } else if (isEol(ch)) {
7602
7802
  captureSegment(state, captureStart, captureEnd, true);
7603
7803
  writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
7604
7804
  captureStart = captureEnd = state.position;
7605
- } else if (state.position === state.lineStart && testDocumentSeparator(state))
7805
+ } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
7606
7806
  throwError(state, "unexpected end of the document within a single quoted scalar");
7607
- else {
7807
+ } else {
7608
7808
  state.position++;
7609
- if (!isWhiteSpace(ch))
7809
+ if (!isWhiteSpace(ch)) {
7610
7810
  captureEnd = state.position;
7811
+ }
7611
7812
  }
7813
+ }
7612
7814
  throwError(state, "unexpected end of the stream within a single quoted scalar");
7613
7815
  }
7614
7816
  function readDoubleQuotedScalar(state, nodeIndent) {
@@ -7616,13 +7818,14 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7616
7818
  let captureEnd;
7617
7819
  let tmp;
7618
7820
  let ch = state.input.charCodeAt(state.position);
7619
- if (ch !== 34)
7821
+ if (ch !== 34) {
7620
7822
  return false;
7823
+ }
7621
7824
  state.kind = "scalar";
7622
7825
  state.result = "";
7623
7826
  state.position++;
7624
7827
  captureStart = captureEnd = state.position;
7625
- while ((ch = state.input.charCodeAt(state.position)) !== 0)
7828
+ while ((ch = state.input.charCodeAt(state.position)) !== 0) {
7626
7829
  if (ch === 34) {
7627
7830
  captureSegment(state, captureStart, state.position, true);
7628
7831
  state.position++;
@@ -7630,9 +7833,9 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7630
7833
  } else if (ch === 92) {
7631
7834
  captureSegment(state, captureStart, state.position, true);
7632
7835
  ch = state.input.charCodeAt(++state.position);
7633
- if (isEol(ch))
7836
+ if (isEol(ch)) {
7634
7837
  skipSeparationSpace(state, false, nodeIndent);
7635
- else if (ch < 256 && simpleEscapeCheck[ch]) {
7838
+ } else if (ch < 256 && simpleEscapeCheck[ch]) {
7636
7839
  state.result += simpleEscapeMap[ch];
7637
7840
  state.position++;
7638
7841
  } else if ((tmp = escapedHexLen(ch)) > 0) {
@@ -7640,27 +7843,31 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7640
7843
  let hexResult = 0;
7641
7844
  for (;hexLength > 0; hexLength--) {
7642
7845
  ch = state.input.charCodeAt(++state.position);
7643
- if ((tmp = fromHexCode(ch)) >= 0)
7846
+ if ((tmp = fromHexCode(ch)) >= 0) {
7644
7847
  hexResult = (hexResult << 4) + tmp;
7645
- else
7848
+ } else {
7646
7849
  throwError(state, "expected hexadecimal character");
7850
+ }
7647
7851
  }
7648
7852
  state.result += charFromCodepoint(hexResult);
7649
7853
  state.position++;
7650
- } else
7854
+ } else {
7651
7855
  throwError(state, "unknown escape sequence");
7856
+ }
7652
7857
  captureStart = captureEnd = state.position;
7653
7858
  } else if (isEol(ch)) {
7654
7859
  captureSegment(state, captureStart, captureEnd, true);
7655
7860
  writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
7656
7861
  captureStart = captureEnd = state.position;
7657
- } else if (state.position === state.lineStart && testDocumentSeparator(state))
7862
+ } else if (state.position === state.lineStart && testDocumentSeparator(state)) {
7658
7863
  throwError(state, "unexpected end of the document within a double quoted scalar");
7659
- else {
7864
+ } else {
7660
7865
  state.position++;
7661
- if (!isWhiteSpace(ch))
7866
+ if (!isWhiteSpace(ch)) {
7662
7867
  captureEnd = state.position;
7868
+ }
7663
7869
  }
7870
+ }
7664
7871
  throwError(state, "unexpected end of the stream within a double quoted scalar");
7665
7872
  }
7666
7873
  function readFlowCollection(state, nodeIndent) {
@@ -7675,7 +7882,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7675
7882
  let isPair;
7676
7883
  let isExplicitPair;
7677
7884
  let isMapping;
7678
- const overridableKeys = Object.create(null);
7885
+ const overridableKeys = /* @__PURE__ */ Object.create(null);
7679
7886
  let keyNode;
7680
7887
  let keyTag;
7681
7888
  let valueNode;
@@ -7688,10 +7895,12 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7688
7895
  terminator = 125;
7689
7896
  isMapping = true;
7690
7897
  _result = {};
7691
- } else
7898
+ } else {
7692
7899
  return false;
7693
- if (state.anchor !== null)
7900
+ }
7901
+ if (state.anchor !== null) {
7694
7902
  storeAnchor(state, state.anchor, _result);
7903
+ }
7695
7904
  ch = state.input.charCodeAt(++state.position);
7696
7905
  while (ch !== 0) {
7697
7906
  skipSeparationSpace(state, true, nodeIndent);
@@ -7703,14 +7912,16 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7703
7912
  state.kind = isMapping ? "mapping" : "sequence";
7704
7913
  state.result = _result;
7705
7914
  return true;
7706
- } else if (!readNext)
7915
+ } else if (!readNext) {
7707
7916
  throwError(state, "missed comma between flow collection entries");
7708
- else if (ch === 44)
7917
+ } else if (ch === 44) {
7709
7918
  throwError(state, "expected the node content, but found ','");
7919
+ }
7710
7920
  keyTag = keyNode = valueNode = null;
7711
7921
  isPair = isExplicitPair = false;
7712
7922
  if (ch === 63) {
7713
- if (isWsOrEol(state.input.charCodeAt(state.position + 1))) {
7923
+ const following = state.input.charCodeAt(state.position + 1);
7924
+ if (isWsOrEol(following)) {
7714
7925
  isPair = isExplicitPair = true;
7715
7926
  state.position++;
7716
7927
  skipSeparationSpace(state, true, nodeIndent);
@@ -7731,19 +7942,21 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7731
7942
  composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
7732
7943
  valueNode = state.result;
7733
7944
  }
7734
- if (isMapping)
7945
+ if (isMapping) {
7735
7946
  storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);
7736
- else if (isPair)
7947
+ } else if (isPair) {
7737
7948
  _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));
7738
- else
7949
+ } else {
7739
7950
  _result.push(keyNode);
7951
+ }
7740
7952
  skipSeparationSpace(state, true, nodeIndent);
7741
7953
  ch = state.input.charCodeAt(state.position);
7742
7954
  if (ch === 44) {
7743
7955
  readNext = true;
7744
7956
  ch = state.input.charCodeAt(++state.position);
7745
- } else
7957
+ } else {
7746
7958
  readNext = false;
7959
+ }
7747
7960
  }
7748
7961
  throwError(state, "unexpected end of the stream within a flow collection");
7749
7962
  }
@@ -7757,40 +7970,45 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7757
7970
  let atMoreIndented = false;
7758
7971
  let tmp;
7759
7972
  let ch = state.input.charCodeAt(state.position);
7760
- if (ch === 124)
7973
+ if (ch === 124) {
7761
7974
  folding = false;
7762
- else if (ch === 62)
7975
+ } else if (ch === 62) {
7763
7976
  folding = true;
7764
- else
7977
+ } else {
7765
7978
  return false;
7979
+ }
7766
7980
  state.kind = "scalar";
7767
7981
  state.result = "";
7768
7982
  while (ch !== 0) {
7769
7983
  ch = state.input.charCodeAt(++state.position);
7770
- if (ch === 43 || ch === 45)
7771
- if (CHOMPING_CLIP === chomping)
7984
+ if (ch === 43 || ch === 45) {
7985
+ if (CHOMPING_CLIP === chomping) {
7772
7986
  chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP;
7773
- else
7987
+ } else {
7774
7988
  throwError(state, "repeat of a chomping mode identifier");
7775
- else if ((tmp = fromDecimalCode(ch)) >= 0)
7776
- if (tmp === 0)
7989
+ }
7990
+ } else if ((tmp = fromDecimalCode(ch)) >= 0) {
7991
+ if (tmp === 0) {
7777
7992
  throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
7778
- else if (!detectedIndent) {
7993
+ } else if (!detectedIndent) {
7779
7994
  textIndent = nodeIndent + tmp - 1;
7780
7995
  detectedIndent = true;
7781
- } else
7996
+ } else {
7782
7997
  throwError(state, "repeat of an indentation width identifier");
7783
- else
7998
+ }
7999
+ } else {
7784
8000
  break;
8001
+ }
7785
8002
  }
7786
8003
  if (isWhiteSpace(ch)) {
7787
- do
8004
+ do {
7788
8005
  ch = state.input.charCodeAt(++state.position);
7789
- while (isWhiteSpace(ch));
7790
- if (ch === 35)
7791
- do
8006
+ } while (isWhiteSpace(ch));
8007
+ if (ch === 35) {
8008
+ do {
7792
8009
  ch = state.input.charCodeAt(++state.position);
7793
- while (!isEol(ch) && ch !== 0);
8010
+ } while (!isEol(ch) && ch !== 0);
8011
+ }
7794
8012
  }
7795
8013
  while (ch !== 0) {
7796
8014
  readLineBreak(state);
@@ -7800,49 +8018,56 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7800
8018
  state.lineIndent++;
7801
8019
  ch = state.input.charCodeAt(++state.position);
7802
8020
  }
7803
- if (!detectedIndent && state.lineIndent > textIndent)
8021
+ if (!detectedIndent && state.lineIndent > textIndent) {
7804
8022
  textIndent = state.lineIndent;
8023
+ }
7805
8024
  if (isEol(ch)) {
7806
8025
  emptyLines++;
7807
8026
  continue;
7808
8027
  }
7809
- if (!detectedIndent && textIndent === 0)
8028
+ if (!detectedIndent && textIndent === 0) {
7810
8029
  throwError(state, "missing indentation for block scalar");
8030
+ }
7811
8031
  if (state.lineIndent < textIndent) {
7812
- if (chomping === CHOMPING_KEEP)
7813
- state.result += common.repeat(`
8032
+ if (chomping === CHOMPING_KEEP) {
8033
+ state.result += common2.repeat(`
7814
8034
  `, didReadContent ? 1 + emptyLines : emptyLines);
7815
- else if (chomping === CHOMPING_CLIP) {
7816
- if (didReadContent)
8035
+ } else if (chomping === CHOMPING_CLIP) {
8036
+ if (didReadContent) {
7817
8037
  state.result += `
7818
8038
  `;
8039
+ }
7819
8040
  }
7820
8041
  break;
7821
8042
  }
7822
- if (folding)
8043
+ if (folding) {
7823
8044
  if (isWhiteSpace(ch)) {
7824
8045
  atMoreIndented = true;
7825
- state.result += common.repeat(`
8046
+ state.result += common2.repeat(`
7826
8047
  `, didReadContent ? 1 + emptyLines : emptyLines);
7827
8048
  } else if (atMoreIndented) {
7828
8049
  atMoreIndented = false;
7829
- state.result += common.repeat(`
8050
+ state.result += common2.repeat(`
7830
8051
  `, emptyLines + 1);
7831
8052
  } else if (emptyLines === 0) {
7832
- if (didReadContent)
8053
+ if (didReadContent) {
7833
8054
  state.result += " ";
7834
- } else
7835
- state.result += common.repeat(`
8055
+ }
8056
+ } else {
8057
+ state.result += common2.repeat(`
7836
8058
  `, emptyLines);
7837
- else
7838
- state.result += common.repeat(`
8059
+ }
8060
+ } else {
8061
+ state.result += common2.repeat(`
7839
8062
  `, didReadContent ? 1 + emptyLines : emptyLines);
8063
+ }
7840
8064
  didReadContent = true;
7841
8065
  detectedIndent = true;
7842
8066
  emptyLines = 0;
7843
8067
  const captureStart = state.position;
7844
- while (!isEol(ch) && ch !== 0)
8068
+ while (!isEol(ch) && ch !== 0) {
7845
8069
  ch = state.input.charCodeAt(++state.position);
8070
+ }
7846
8071
  captureSegment(state, captureStart, state.position, false);
7847
8072
  }
7848
8073
  return true;
@@ -7854,18 +8079,22 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7854
8079
  let detected = false;
7855
8080
  if (state.firstTabInLine !== -1)
7856
8081
  return false;
7857
- if (state.anchor !== null)
8082
+ if (state.anchor !== null) {
7858
8083
  storeAnchor(state, state.anchor, _result);
8084
+ }
7859
8085
  let ch = state.input.charCodeAt(state.position);
7860
8086
  while (ch !== 0) {
7861
8087
  if (state.firstTabInLine !== -1) {
7862
8088
  state.position = state.firstTabInLine;
7863
8089
  throwError(state, "tab characters must not be used in indentation");
7864
8090
  }
7865
- if (ch !== 45)
8091
+ if (ch !== 45) {
7866
8092
  break;
7867
- if (!isWsOrEol(state.input.charCodeAt(state.position + 1)))
8093
+ }
8094
+ const following = state.input.charCodeAt(state.position + 1);
8095
+ if (!isWsOrEol(following)) {
7868
8096
  break;
8097
+ }
7869
8098
  detected = true;
7870
8099
  state.position++;
7871
8100
  if (skipSeparationSpace(state, true, -1)) {
@@ -7880,10 +8109,11 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7880
8109
  _result.push(state.result);
7881
8110
  skipSeparationSpace(state, true, -1);
7882
8111
  ch = state.input.charCodeAt(state.position);
7883
- if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0)
8112
+ if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {
7884
8113
  throwError(state, "bad indentation of a sequence entry");
7885
- else if (state.lineIndent < nodeIndent)
8114
+ } else if (state.lineIndent < nodeIndent) {
7886
8115
  break;
8116
+ }
7887
8117
  }
7888
8118
  if (detected) {
7889
8119
  state.tag = _tag;
@@ -7902,7 +8132,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7902
8132
  const _tag = state.tag;
7903
8133
  const _anchor = state.anchor;
7904
8134
  const _result = {};
7905
- const overridableKeys = Object.create(null);
8135
+ const overridableKeys = /* @__PURE__ */ Object.create(null);
7906
8136
  let keyTag = null;
7907
8137
  let keyNode = null;
7908
8138
  let valueNode = null;
@@ -7910,8 +8140,9 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7910
8140
  let detected = false;
7911
8141
  if (state.firstTabInLine !== -1)
7912
8142
  return false;
7913
- if (state.anchor !== null)
8143
+ if (state.anchor !== null) {
7914
8144
  storeAnchor(state, state.anchor, _result);
8145
+ }
7915
8146
  let ch = state.input.charCodeAt(state.position);
7916
8147
  while (ch !== 0) {
7917
8148
  if (!atExplicitKey && state.firstTabInLine !== -1) {
@@ -7932,24 +8163,28 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7932
8163
  } else if (atExplicitKey) {
7933
8164
  atExplicitKey = false;
7934
8165
  allowCompact = true;
7935
- } else
8166
+ } else {
7936
8167
  throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");
8168
+ }
7937
8169
  state.position += 1;
7938
8170
  ch = following;
7939
8171
  } else {
7940
8172
  _keyLine = state.line;
7941
8173
  _keyLineStart = state.lineStart;
7942
8174
  _keyPos = state.position;
7943
- if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true))
8175
+ if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {
7944
8176
  break;
8177
+ }
7945
8178
  if (state.line === _line) {
7946
8179
  ch = state.input.charCodeAt(state.position);
7947
- while (isWhiteSpace(ch))
8180
+ while (isWhiteSpace(ch)) {
7948
8181
  ch = state.input.charCodeAt(++state.position);
8182
+ }
7949
8183
  if (ch === 58) {
7950
8184
  ch = state.input.charCodeAt(++state.position);
7951
- if (!isWsOrEol(ch))
8185
+ if (!isWsOrEol(ch)) {
7952
8186
  throwError(state, "a whitespace character is expected after the key-value separator within a block mapping");
8187
+ }
7953
8188
  if (atExplicitKey) {
7954
8189
  storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
7955
8190
  keyTag = keyNode = valueNode = null;
@@ -7959,16 +8194,16 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7959
8194
  allowCompact = false;
7960
8195
  keyTag = state.tag;
7961
8196
  keyNode = state.result;
7962
- } else if (detected)
8197
+ } else if (detected) {
7963
8198
  throwError(state, "can not read an implicit mapping pair; a colon is missed");
7964
- else {
8199
+ } else {
7965
8200
  state.tag = _tag;
7966
8201
  state.anchor = _anchor;
7967
8202
  return true;
7968
8203
  }
7969
- } else if (detected)
8204
+ } else if (detected) {
7970
8205
  throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key");
7971
- else {
8206
+ } else {
7972
8207
  state.tag = _tag;
7973
8208
  state.anchor = _anchor;
7974
8209
  return true;
@@ -7980,11 +8215,13 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7980
8215
  _keyLineStart = state.lineStart;
7981
8216
  _keyPos = state.position;
7982
8217
  }
7983
- if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact))
7984
- if (atExplicitKey)
8218
+ if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {
8219
+ if (atExplicitKey) {
7985
8220
  keyNode = state.result;
7986
- else
8221
+ } else {
7987
8222
  valueNode = state.result;
8223
+ }
8224
+ }
7988
8225
  if (!atExplicitKey) {
7989
8226
  storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);
7990
8227
  keyTag = keyNode = valueNode = null;
@@ -7992,13 +8229,15 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
7992
8229
  skipSeparationSpace(state, true, -1);
7993
8230
  ch = state.input.charCodeAt(state.position);
7994
8231
  }
7995
- if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0)
8232
+ if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {
7996
8233
  throwError(state, "bad indentation of a mapping entry");
7997
- else if (state.lineIndent < nodeIndent)
8234
+ } else if (state.lineIndent < nodeIndent) {
7998
8235
  break;
8236
+ }
7999
8237
  }
8000
- if (atExplicitKey)
8238
+ if (atExplicitKey) {
8001
8239
  storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
8240
+ }
8002
8241
  if (detected) {
8003
8242
  state.tag = _tag;
8004
8243
  state.anchor = _anchor;
@@ -8015,8 +8254,9 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
8015
8254
  let ch = state.input.charCodeAt(state.position);
8016
8255
  if (ch !== 33)
8017
8256
  return false;
8018
- if (state.tag !== null)
8257
+ if (state.tag !== null) {
8019
8258
  throwError(state, "duplication of a tag property");
8259
+ }
8020
8260
  ch = state.input.charCodeAt(++state.position);
8021
8261
  if (ch === 60) {
8022
8262
  isVerbatim = true;
@@ -8025,66 +8265,77 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
8025
8265
  isNamed = true;
8026
8266
  tagHandle = "!!";
8027
8267
  ch = state.input.charCodeAt(++state.position);
8028
- } else
8268
+ } else {
8029
8269
  tagHandle = "!";
8270
+ }
8030
8271
  let _position = state.position;
8031
8272
  if (isVerbatim) {
8032
- do
8273
+ do {
8033
8274
  ch = state.input.charCodeAt(++state.position);
8034
- while (ch !== 0 && ch !== 62);
8275
+ } while (ch !== 0 && ch !== 62);
8035
8276
  if (state.position < state.length) {
8036
8277
  tagName = state.input.slice(_position, state.position);
8037
8278
  ch = state.input.charCodeAt(++state.position);
8038
- } else
8279
+ } else {
8039
8280
  throwError(state, "unexpected end of the stream within a verbatim tag");
8281
+ }
8040
8282
  } else {
8041
8283
  while (ch !== 0 && !isWsOrEol(ch)) {
8042
- if (ch === 33)
8284
+ if (ch === 33) {
8043
8285
  if (!isNamed) {
8044
8286
  tagHandle = state.input.slice(_position - 1, state.position + 1);
8045
- if (!PATTERN_TAG_HANDLE.test(tagHandle))
8287
+ if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
8046
8288
  throwError(state, "named tag handle cannot contain such characters");
8289
+ }
8047
8290
  isNamed = true;
8048
8291
  _position = state.position + 1;
8049
- } else
8292
+ } else {
8050
8293
  throwError(state, "tag suffix cannot contain exclamation marks");
8294
+ }
8295
+ }
8051
8296
  ch = state.input.charCodeAt(++state.position);
8052
8297
  }
8053
8298
  tagName = state.input.slice(_position, state.position);
8054
- if (PATTERN_FLOW_INDICATORS.test(tagName))
8299
+ if (PATTERN_FLOW_INDICATORS.test(tagName)) {
8055
8300
  throwError(state, "tag suffix cannot contain flow indicator characters");
8301
+ }
8056
8302
  }
8057
- if (tagName && !PATTERN_TAG_URI.test(tagName))
8303
+ if (tagName && !PATTERN_TAG_URI.test(tagName)) {
8058
8304
  throwError(state, "tag name cannot contain such characters: " + tagName);
8305
+ }
8059
8306
  try {
8060
8307
  tagName = decodeURIComponent(tagName);
8061
8308
  } catch (err) {
8062
8309
  throwError(state, "tag name is malformed: " + tagName);
8063
8310
  }
8064
- if (isVerbatim)
8311
+ if (isVerbatim) {
8065
8312
  state.tag = tagName;
8066
- else if (_hasOwnProperty.call(state.tagMap, tagHandle))
8313
+ } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {
8067
8314
  state.tag = state.tagMap[tagHandle] + tagName;
8068
- else if (tagHandle === "!")
8315
+ } else if (tagHandle === "!") {
8069
8316
  state.tag = "!" + tagName;
8070
- else if (tagHandle === "!!")
8317
+ } else if (tagHandle === "!!") {
8071
8318
  state.tag = "tag:yaml.org,2002:" + tagName;
8072
- else
8319
+ } else {
8073
8320
  throwError(state, 'undeclared tag handle "' + tagHandle + '"');
8321
+ }
8074
8322
  return true;
8075
8323
  }
8076
8324
  function readAnchorProperty(state) {
8077
8325
  let ch = state.input.charCodeAt(state.position);
8078
8326
  if (ch !== 38)
8079
8327
  return false;
8080
- if (state.anchor !== null)
8328
+ if (state.anchor !== null) {
8081
8329
  throwError(state, "duplication of an anchor property");
8330
+ }
8082
8331
  ch = state.input.charCodeAt(++state.position);
8083
8332
  const _position = state.position;
8084
- while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch))
8333
+ while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) {
8085
8334
  ch = state.input.charCodeAt(++state.position);
8086
- if (state.position === _position)
8335
+ }
8336
+ if (state.position === _position) {
8087
8337
  throwError(state, "name of an anchor node must contain at least one character");
8338
+ }
8088
8339
  state.anchor = state.input.slice(_position, state.position);
8089
8340
  return true;
8090
8341
  }
@@ -8094,13 +8345,16 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
8094
8345
  return false;
8095
8346
  ch = state.input.charCodeAt(++state.position);
8096
8347
  const _position = state.position;
8097
- while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch))
8348
+ while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) {
8098
8349
  ch = state.input.charCodeAt(++state.position);
8099
- if (state.position === _position)
8350
+ }
8351
+ if (state.position === _position) {
8100
8352
  throwError(state, "name of an alias node must contain at least one character");
8353
+ }
8101
8354
  const alias = state.input.slice(_position, state.position);
8102
- if (!_hasOwnProperty.call(state.anchorMap, alias))
8355
+ if (!_hasOwnProperty.call(state.anchorMap, alias)) {
8103
8356
  throwError(state, 'unidentified alias "' + alias + '"');
8357
+ }
8104
8358
  state.result = state.anchorMap[alias];
8105
8359
  skipSeparationSpace(state, true, -1);
8106
8360
  return true;
@@ -8128,14 +8382,16 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
8128
8382
  let atNewLine = false;
8129
8383
  let hasContent = false;
8130
8384
  let propertyStart = null;
8131
- let type;
8385
+ let type2;
8132
8386
  let flowIndent;
8133
8387
  let blockIndent;
8134
- if (state.depth >= state.maxDepth)
8388
+ if (state.depth >= state.maxDepth) {
8135
8389
  throwError(state, "nesting exceeded maxDepth (" + state.maxDepth + ")");
8390
+ }
8136
8391
  state.depth += 1;
8137
- if (state.listener !== null)
8392
+ if (state.listener !== null) {
8138
8393
  state.listener("open", state);
8394
+ }
8139
8395
  state.tag = null;
8140
8396
  state.anchor = null;
8141
8397
  state.kind = null;
@@ -8144,110 +8400,131 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
8144
8400
  if (allowToSeek) {
8145
8401
  if (skipSeparationSpace(state, true, -1)) {
8146
8402
  atNewLine = true;
8147
- if (state.lineIndent > parentIndent)
8403
+ if (state.lineIndent > parentIndent) {
8148
8404
  indentStatus = 1;
8149
- else if (state.lineIndent === parentIndent)
8405
+ } else if (state.lineIndent === parentIndent) {
8150
8406
  indentStatus = 0;
8151
- else if (state.lineIndent < parentIndent)
8407
+ } else if (state.lineIndent < parentIndent) {
8152
8408
  indentStatus = -1;
8409
+ }
8153
8410
  }
8154
8411
  }
8155
- if (indentStatus === 1)
8412
+ if (indentStatus === 1) {
8156
8413
  while (true) {
8157
8414
  const ch = state.input.charCodeAt(state.position);
8158
8415
  const propertyState = snapshotState(state);
8159
- if (atNewLine && (ch === 33 && state.tag !== null || ch === 38 && state.anchor !== null))
8416
+ if (atNewLine && (ch === 33 && state.tag !== null || ch === 38 && state.anchor !== null)) {
8160
8417
  break;
8161
- if (!readTagProperty(state) && !readAnchorProperty(state))
8418
+ }
8419
+ if (!readTagProperty(state) && !readAnchorProperty(state)) {
8162
8420
  break;
8163
- if (propertyStart === null)
8421
+ }
8422
+ if (propertyStart === null) {
8164
8423
  propertyStart = propertyState;
8424
+ }
8165
8425
  if (skipSeparationSpace(state, true, -1)) {
8166
8426
  atNewLine = true;
8167
8427
  allowBlockCollections = allowBlockStyles;
8168
- if (state.lineIndent > parentIndent)
8428
+ if (state.lineIndent > parentIndent) {
8169
8429
  indentStatus = 1;
8170
- else if (state.lineIndent === parentIndent)
8430
+ } else if (state.lineIndent === parentIndent) {
8171
8431
  indentStatus = 0;
8172
- else if (state.lineIndent < parentIndent)
8432
+ } else if (state.lineIndent < parentIndent) {
8173
8433
  indentStatus = -1;
8174
- } else
8434
+ }
8435
+ } else {
8175
8436
  allowBlockCollections = false;
8437
+ }
8176
8438
  }
8177
- if (allowBlockCollections)
8439
+ }
8440
+ if (allowBlockCollections) {
8178
8441
  allowBlockCollections = atNewLine || allowCompact;
8442
+ }
8179
8443
  if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
8180
- if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext)
8444
+ if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
8181
8445
  flowIndent = parentIndent;
8182
- else
8446
+ } else {
8183
8447
  flowIndent = parentIndent + 1;
8448
+ }
8184
8449
  blockIndent = state.position - state.lineStart;
8185
- if (indentStatus === 1)
8186
- if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent))
8450
+ if (indentStatus === 1) {
8451
+ if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) {
8187
8452
  hasContent = true;
8188
- else {
8453
+ } else {
8189
8454
  const ch = state.input.charCodeAt(state.position);
8190
- if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62 && tryReadBlockMappingFromProperty(state, propertyStart, propertyStart.position - propertyStart.lineStart, flowIndent))
8455
+ if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62 && tryReadBlockMappingFromProperty(state, propertyStart, propertyStart.position - propertyStart.lineStart, flowIndent)) {
8191
8456
  hasContent = true;
8192
- else if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent))
8457
+ } else if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) {
8193
8458
  hasContent = true;
8194
- else if (readAlias(state)) {
8459
+ } else if (readAlias(state)) {
8195
8460
  hasContent = true;
8196
- if (state.tag !== null || state.anchor !== null)
8461
+ if (state.tag !== null || state.anchor !== null) {
8197
8462
  throwError(state, "alias node should not have any properties");
8463
+ }
8198
8464
  } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
8199
8465
  hasContent = true;
8200
- if (state.tag === null)
8466
+ if (state.tag === null) {
8201
8467
  state.tag = "?";
8468
+ }
8202
8469
  }
8203
- if (state.anchor !== null)
8470
+ if (state.anchor !== null) {
8204
8471
  storeAnchor(state, state.anchor, state.result);
8472
+ }
8205
8473
  }
8206
- else if (indentStatus === 0)
8474
+ } else if (indentStatus === 0) {
8207
8475
  hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
8476
+ }
8208
8477
  }
8209
8478
  if (state.tag === null) {
8210
- if (state.anchor !== null)
8479
+ if (state.anchor !== null) {
8211
8480
  storeAnchor(state, state.anchor, state.result);
8481
+ }
8212
8482
  } else if (state.tag === "?") {
8213
- if (state.result !== null && state.kind !== "scalar")
8483
+ if (state.result !== null && state.kind !== "scalar") {
8214
8484
  throwError(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"');
8485
+ }
8215
8486
  for (let typeIndex = 0, typeQuantity = state.implicitTypes.length;typeIndex < typeQuantity; typeIndex += 1) {
8216
- type = state.implicitTypes[typeIndex];
8217
- if (type.resolve(state.result)) {
8218
- state.result = type.construct(state.result);
8219
- state.tag = type.tag;
8220
- if (state.anchor !== null)
8487
+ type2 = state.implicitTypes[typeIndex];
8488
+ if (type2.resolve(state.result)) {
8489
+ state.result = type2.construct(state.result);
8490
+ state.tag = type2.tag;
8491
+ if (state.anchor !== null) {
8221
8492
  storeAnchor(state, state.anchor, state.result);
8493
+ }
8222
8494
  break;
8223
8495
  }
8224
8496
  }
8225
8497
  } else if (state.tag !== "!") {
8226
- if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag))
8227
- type = state.typeMap[state.kind || "fallback"][state.tag];
8228
- else {
8229
- type = null;
8498
+ if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) {
8499
+ type2 = state.typeMap[state.kind || "fallback"][state.tag];
8500
+ } else {
8501
+ type2 = null;
8230
8502
  const typeList = state.typeMap.multi[state.kind || "fallback"];
8231
- for (let typeIndex = 0, typeQuantity = typeList.length;typeIndex < typeQuantity; typeIndex += 1)
8503
+ for (let typeIndex = 0, typeQuantity = typeList.length;typeIndex < typeQuantity; typeIndex += 1) {
8232
8504
  if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {
8233
- type = typeList[typeIndex];
8505
+ type2 = typeList[typeIndex];
8234
8506
  break;
8235
8507
  }
8508
+ }
8236
8509
  }
8237
- if (!type)
8510
+ if (!type2) {
8238
8511
  throwError(state, "unknown tag !<" + state.tag + ">");
8239
- if (state.result !== null && type.kind !== state.kind)
8240
- throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"');
8241
- if (!type.resolve(state.result, state.tag))
8512
+ }
8513
+ if (state.result !== null && type2.kind !== state.kind) {
8514
+ throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type2.kind + '", not "' + state.kind + '"');
8515
+ }
8516
+ if (!type2.resolve(state.result, state.tag)) {
8242
8517
  throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag");
8243
- else {
8244
- state.result = type.construct(state.result, state.tag);
8245
- if (state.anchor !== null)
8518
+ } else {
8519
+ state.result = type2.construct(state.result, state.tag);
8520
+ if (state.anchor !== null) {
8246
8521
  storeAnchor(state, state.anchor, state.result);
8522
+ }
8247
8523
  }
8248
8524
  }
8249
- if (state.listener !== null)
8525
+ if (state.listener !== null) {
8250
8526
  state.listener("close", state);
8527
+ }
8251
8528
  state.depth -= 1;
8252
8529
  return state.tag !== null || state.anchor !== null || hasContent;
8253
8530
  }
@@ -8257,55 +8534,63 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
8257
8534
  let ch;
8258
8535
  state.version = null;
8259
8536
  state.checkLineBreaks = state.legacy;
8260
- state.tagMap = Object.create(null);
8261
- state.anchorMap = Object.create(null);
8537
+ state.tagMap = /* @__PURE__ */ Object.create(null);
8538
+ state.anchorMap = /* @__PURE__ */ Object.create(null);
8262
8539
  while ((ch = state.input.charCodeAt(state.position)) !== 0) {
8263
8540
  skipSeparationSpace(state, true, -1);
8264
8541
  ch = state.input.charCodeAt(state.position);
8265
- if (state.lineIndent > 0 || ch !== 37)
8542
+ if (state.lineIndent > 0 || ch !== 37) {
8266
8543
  break;
8544
+ }
8267
8545
  hasDirectives = true;
8268
8546
  ch = state.input.charCodeAt(++state.position);
8269
8547
  let _position = state.position;
8270
- while (ch !== 0 && !isWsOrEol(ch))
8548
+ while (ch !== 0 && !isWsOrEol(ch)) {
8271
8549
  ch = state.input.charCodeAt(++state.position);
8550
+ }
8272
8551
  const directiveName = state.input.slice(_position, state.position);
8273
8552
  const directiveArgs = [];
8274
- if (directiveName.length < 1)
8553
+ if (directiveName.length < 1) {
8275
8554
  throwError(state, "directive name must not be less than one character in length");
8555
+ }
8276
8556
  while (ch !== 0) {
8277
- while (isWhiteSpace(ch))
8557
+ while (isWhiteSpace(ch)) {
8278
8558
  ch = state.input.charCodeAt(++state.position);
8559
+ }
8279
8560
  if (ch === 35) {
8280
- do
8561
+ do {
8281
8562
  ch = state.input.charCodeAt(++state.position);
8282
- while (ch !== 0 && !isEol(ch));
8563
+ } while (ch !== 0 && !isEol(ch));
8283
8564
  break;
8284
8565
  }
8285
8566
  if (isEol(ch))
8286
8567
  break;
8287
8568
  _position = state.position;
8288
- while (ch !== 0 && !isWsOrEol(ch))
8569
+ while (ch !== 0 && !isWsOrEol(ch)) {
8289
8570
  ch = state.input.charCodeAt(++state.position);
8571
+ }
8290
8572
  directiveArgs.push(state.input.slice(_position, state.position));
8291
8573
  }
8292
8574
  if (ch !== 0)
8293
8575
  readLineBreak(state);
8294
- if (_hasOwnProperty.call(directiveHandlers, directiveName))
8576
+ if (_hasOwnProperty.call(directiveHandlers, directiveName)) {
8295
8577
  directiveHandlers[directiveName](state, directiveName, directiveArgs);
8296
- else
8578
+ } else {
8297
8579
  throwWarning(state, 'unknown document directive "' + directiveName + '"');
8580
+ }
8298
8581
  }
8299
8582
  skipSeparationSpace(state, true, -1);
8300
8583
  if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) {
8301
8584
  state.position += 3;
8302
8585
  skipSeparationSpace(state, true, -1);
8303
- } else if (hasDirectives)
8586
+ } else if (hasDirectives) {
8304
8587
  throwError(state, "directives end mark is expected");
8588
+ }
8305
8589
  composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
8306
8590
  skipSeparationSpace(state, true, -1);
8307
- if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position)))
8591
+ if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {
8308
8592
  throwWarning(state, "non-ASCII line breaks are interpreted as content");
8593
+ }
8309
8594
  state.documents.push(state.result);
8310
8595
  if (state.position === state.lineStart && testDocumentSeparator(state)) {
8311
8596
  if (state.input.charCodeAt(state.position) === 46) {
@@ -8314,18 +8599,21 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
8314
8599
  }
8315
8600
  return;
8316
8601
  }
8317
- if (state.position < state.length - 1)
8602
+ if (state.position < state.length - 1) {
8318
8603
  throwError(state, "end of the stream or a document separator is expected");
8604
+ }
8319
8605
  }
8320
8606
  function loadDocuments(input, options) {
8321
8607
  input = String(input);
8322
8608
  options = options || {};
8323
8609
  if (input.length !== 0) {
8324
- if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13)
8610
+ if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) {
8325
8611
  input += `
8326
8612
  `;
8327
- if (input.charCodeAt(0) === 65279)
8613
+ }
8614
+ if (input.charCodeAt(0) === 65279) {
8328
8615
  input = input.slice(1);
8616
+ }
8329
8617
  }
8330
8618
  const state = new State(input, options);
8331
8619
  const nullpos = input.indexOf("\x00");
@@ -8338,64 +8626,74 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
8338
8626
  state.lineIndent += 1;
8339
8627
  state.position += 1;
8340
8628
  }
8341
- while (state.position < state.length - 1)
8629
+ while (state.position < state.length - 1) {
8342
8630
  readDocument(state);
8631
+ }
8343
8632
  return state.documents;
8344
8633
  }
8345
- function loadAll(input, iterator, options) {
8634
+ function loadAll2(input, iterator, options) {
8346
8635
  if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") {
8347
8636
  options = iterator;
8348
8637
  iterator = null;
8349
8638
  }
8350
8639
  const documents = loadDocuments(input, options);
8351
- if (typeof iterator !== "function")
8640
+ if (typeof iterator !== "function") {
8352
8641
  return documents;
8353
- for (let index = 0, length = documents.length;index < length; index += 1)
8642
+ }
8643
+ for (let index = 0, length = documents.length;index < length; index += 1) {
8354
8644
  iterator(documents[index]);
8645
+ }
8355
8646
  }
8356
- function load(input, options) {
8647
+ function load2(input, options) {
8357
8648
  const documents = loadDocuments(input, options);
8358
- if (documents.length === 0)
8649
+ if (documents.length === 0) {
8359
8650
  return;
8360
- else if (documents.length === 1)
8651
+ } else if (documents.length === 1) {
8361
8652
  return documents[0];
8362
- throw new YAMLException("expected a single document in the stream, but found more");
8363
- }
8364
- module.exports.loadAll = loadAll;
8365
- module.exports.load = load;
8366
- });
8367
- var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8368
- var common = require_common();
8369
- var YAMLException = require_exception();
8370
- var DEFAULT_SCHEMA = require_default();
8371
- var _toString = Object.prototype.toString;
8372
- var _hasOwnProperty = Object.prototype.hasOwnProperty;
8373
- var CHAR_BOM = 65279;
8374
- var CHAR_TAB = 9;
8375
- var CHAR_LINE_FEED = 10;
8376
- var CHAR_CARRIAGE_RETURN = 13;
8377
- var CHAR_SPACE = 32;
8378
- var CHAR_EXCLAMATION = 33;
8379
- var CHAR_DOUBLE_QUOTE = 34;
8380
- var CHAR_SHARP = 35;
8381
- var CHAR_PERCENT = 37;
8382
- var CHAR_AMPERSAND = 38;
8383
- var CHAR_SINGLE_QUOTE = 39;
8384
- var CHAR_ASTERISK = 42;
8385
- var CHAR_COMMA = 44;
8386
- var CHAR_MINUS = 45;
8387
- var CHAR_COLON = 58;
8388
- var CHAR_EQUALS = 61;
8389
- var CHAR_GREATER_THAN = 62;
8390
- var CHAR_QUESTION = 63;
8391
- var CHAR_COMMERCIAL_AT = 64;
8392
- var CHAR_LEFT_SQUARE_BRACKET = 91;
8393
- var CHAR_RIGHT_SQUARE_BRACKET = 93;
8394
- var CHAR_GRAVE_ACCENT = 96;
8395
- var CHAR_LEFT_CURLY_BRACKET = 123;
8396
- var CHAR_VERTICAL_LINE = 124;
8397
- var CHAR_RIGHT_CURLY_BRACKET = 125;
8398
- var ESCAPE_SEQUENCES = {};
8653
+ }
8654
+ throw new YAMLException2("expected a single document in the stream, but found more");
8655
+ }
8656
+ loader.loadAll = loadAll2;
8657
+ loader.load = load2;
8658
+ return loader;
8659
+ }
8660
+ var dumper = {};
8661
+ var hasRequiredDumper;
8662
+ function requireDumper() {
8663
+ if (hasRequiredDumper)
8664
+ return dumper;
8665
+ hasRequiredDumper = 1;
8666
+ const common2 = requireCommon();
8667
+ const YAMLException2 = requireException();
8668
+ const DEFAULT_SCHEMA2 = require_default();
8669
+ const _toString = Object.prototype.toString;
8670
+ const _hasOwnProperty = Object.prototype.hasOwnProperty;
8671
+ const CHAR_BOM = 65279;
8672
+ const CHAR_TAB = 9;
8673
+ const CHAR_LINE_FEED = 10;
8674
+ const CHAR_CARRIAGE_RETURN = 13;
8675
+ const CHAR_SPACE = 32;
8676
+ const CHAR_EXCLAMATION = 33;
8677
+ const CHAR_DOUBLE_QUOTE = 34;
8678
+ const CHAR_SHARP = 35;
8679
+ const CHAR_PERCENT = 37;
8680
+ const CHAR_AMPERSAND = 38;
8681
+ const CHAR_SINGLE_QUOTE = 39;
8682
+ const CHAR_ASTERISK = 42;
8683
+ const CHAR_COMMA = 44;
8684
+ const CHAR_MINUS = 45;
8685
+ const CHAR_COLON = 58;
8686
+ const CHAR_EQUALS = 61;
8687
+ const CHAR_GREATER_THAN = 62;
8688
+ const CHAR_QUESTION = 63;
8689
+ const CHAR_COMMERCIAL_AT = 64;
8690
+ const CHAR_LEFT_SQUARE_BRACKET = 91;
8691
+ const CHAR_RIGHT_SQUARE_BRACKET = 93;
8692
+ const CHAR_GRAVE_ACCENT = 96;
8693
+ const CHAR_LEFT_CURLY_BRACKET = 123;
8694
+ const CHAR_VERTICAL_LINE = 124;
8695
+ const CHAR_RIGHT_CURLY_BRACKET = 125;
8696
+ const ESCAPE_SEQUENCES = {};
8399
8697
  ESCAPE_SEQUENCES[0] = "\\0";
8400
8698
  ESCAPE_SEQUENCES[7] = "\\a";
8401
8699
  ESCAPE_SEQUENCES[8] = "\\b";
@@ -8411,7 +8709,7 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8411
8709
  ESCAPE_SEQUENCES[160] = "\\_";
8412
8710
  ESCAPE_SEQUENCES[8232] = "\\L";
8413
8711
  ESCAPE_SEQUENCES[8233] = "\\P";
8414
- var DEPRECATED_BOOLEANS_SYNTAX = [
8712
+ const DEPRECATED_BOOLEANS_SYNTAX = [
8415
8713
  "y",
8416
8714
  "Y",
8417
8715
  "yes",
@@ -8429,20 +8727,22 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8429
8727
  "Off",
8430
8728
  "OFF"
8431
8729
  ];
8432
- var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
8433
- function compileStyleMap(schema, map) {
8434
- if (map === null)
8730
+ const DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
8731
+ function compileStyleMap(schema2, map2) {
8732
+ if (map2 === null)
8435
8733
  return {};
8436
8734
  const result = {};
8437
- const keys = Object.keys(map);
8735
+ const keys = Object.keys(map2);
8438
8736
  for (let index = 0, length = keys.length;index < length; index += 1) {
8439
8737
  let tag = keys[index];
8440
- let style = String(map[tag]);
8441
- if (tag.slice(0, 2) === "!!")
8738
+ let style = String(map2[tag]);
8739
+ if (tag.slice(0, 2) === "!!") {
8442
8740
  tag = "tag:yaml.org,2002:" + tag.slice(2);
8443
- const type = schema.compiledTypeMap["fallback"][tag];
8444
- if (type && _hasOwnProperty.call(type.styleAliases, style))
8445
- style = type.styleAliases[style];
8741
+ }
8742
+ const type2 = schema2.compiledTypeMap["fallback"][tag];
8743
+ if (type2 && _hasOwnProperty.call(type2.styleAliases, style)) {
8744
+ style = type2.styleAliases[style];
8745
+ }
8446
8746
  result[tag] = style;
8447
8747
  }
8448
8748
  return result;
@@ -8460,18 +8760,19 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8460
8760
  } else if (character <= 4294967295) {
8461
8761
  handle = "U";
8462
8762
  length = 8;
8463
- } else
8464
- throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF");
8465
- return "\\" + handle + common.repeat("0", length - string.length) + string;
8763
+ } else {
8764
+ throw new YAMLException2("code point within a string may not be greater than 0xFFFFFFFF");
8765
+ }
8766
+ return "\\" + handle + common2.repeat("0", length - string.length) + string;
8466
8767
  }
8467
- var QUOTING_TYPE_SINGLE = 1;
8468
- var QUOTING_TYPE_DOUBLE = 2;
8768
+ const QUOTING_TYPE_SINGLE = 1;
8769
+ const QUOTING_TYPE_DOUBLE = 2;
8469
8770
  function State(options) {
8470
- this.schema = options["schema"] || DEFAULT_SCHEMA;
8771
+ this.schema = options["schema"] || DEFAULT_SCHEMA2;
8471
8772
  this.indent = Math.max(1, options["indent"] || 2);
8472
8773
  this.noArrayIndent = options["noArrayIndent"] || false;
8473
8774
  this.skipInvalid = options["skipInvalid"] || false;
8474
- this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"];
8775
+ this.flowLevel = common2.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"];
8475
8776
  this.styleMap = compileStyleMap(this.schema, options["styles"] || null);
8476
8777
  this.sortKeys = options["sortKeys"] || false;
8477
8778
  this.lineWidth = options["lineWidth"] || 80;
@@ -8489,7 +8790,7 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8489
8790
  this.usedDuplicates = null;
8490
8791
  }
8491
8792
  function indentString(string, spaces) {
8492
- const ind = common.repeat(" ", spaces);
8793
+ const ind = common2.repeat(" ", spaces);
8493
8794
  let position = 0;
8494
8795
  let result = "";
8495
8796
  const length = string.length;
@@ -8513,12 +8814,15 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8513
8814
  }
8514
8815
  function generateNextLine(state, level) {
8515
8816
  return `
8516
- ` + common.repeat(" ", state.indent * level);
8817
+ ` + common2.repeat(" ", state.indent * level);
8517
8818
  }
8518
- function testImplicitResolving(state, str) {
8519
- for (let index = 0, length = state.implicitTypes.length;index < length; index += 1)
8520
- if (state.implicitTypes[index].resolve(str))
8819
+ function testImplicitResolving(state, str2) {
8820
+ for (let index = 0, length = state.implicitTypes.length;index < length; index += 1) {
8821
+ const type2 = state.implicitTypes[index];
8822
+ if (type2.resolve(str2)) {
8521
8823
  return true;
8824
+ }
8825
+ }
8522
8826
  return false;
8523
8827
  }
8524
8828
  function isWhitespace(c) {
@@ -8546,19 +8850,21 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8546
8850
  let second;
8547
8851
  if (first >= 55296 && first <= 56319 && pos + 1 < string.length) {
8548
8852
  second = string.charCodeAt(pos + 1);
8549
- if (second >= 56320 && second <= 57343)
8853
+ if (second >= 56320 && second <= 57343) {
8550
8854
  return (first - 55296) * 1024 + second - 56320 + 65536;
8855
+ }
8551
8856
  }
8552
8857
  return first;
8553
8858
  }
8554
8859
  function needIndentIndicator(string) {
8555
- return /^\n* /.test(string);
8556
- }
8557
- var STYLE_PLAIN = 1;
8558
- var STYLE_SINGLE = 2;
8559
- var STYLE_LITERAL = 3;
8560
- var STYLE_FOLDED = 4;
8561
- var STYLE_DOUBLE = 5;
8860
+ const leadingSpaceRe = /^\n* /;
8861
+ return leadingSpaceRe.test(string);
8862
+ }
8863
+ const STYLE_PLAIN = 1;
8864
+ const STYLE_SINGLE = 2;
8865
+ const STYLE_LITERAL = 3;
8866
+ const STYLE_FOLDED = 4;
8867
+ const STYLE_DOUBLE = 5;
8562
8868
  function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) {
8563
8869
  let i;
8564
8870
  let char = 0;
@@ -8568,15 +8874,16 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8568
8874
  const shouldTrackWidth = lineWidth !== -1;
8569
8875
  let previousLineBreak = -1;
8570
8876
  let plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1));
8571
- if (singleLineOnly || forceQuotes)
8877
+ if (singleLineOnly || forceQuotes) {
8572
8878
  for (i = 0;i < string.length; char >= 65536 ? i += 2 : i++) {
8573
8879
  char = codePointAt(string, i);
8574
- if (!isPrintable(char))
8880
+ if (!isPrintable(char)) {
8575
8881
  return STYLE_DOUBLE;
8882
+ }
8576
8883
  plain = plain && isPlainSafe(char, prevChar, inblock);
8577
8884
  prevChar = char;
8578
8885
  }
8579
- else {
8886
+ } else {
8580
8887
  for (i = 0;i < string.length; char >= 65536 ? i += 2 : i++) {
8581
8888
  char = codePointAt(string, i);
8582
8889
  if (char === CHAR_LINE_FEED) {
@@ -8585,31 +8892,37 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8585
8892
  hasFoldableLine = hasFoldableLine || i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ";
8586
8893
  previousLineBreak = i;
8587
8894
  }
8588
- } else if (!isPrintable(char))
8895
+ } else if (!isPrintable(char)) {
8589
8896
  return STYLE_DOUBLE;
8897
+ }
8590
8898
  plain = plain && isPlainSafe(char, prevChar, inblock);
8591
8899
  prevChar = char;
8592
8900
  }
8593
- hasFoldableLine = hasFoldableLine || shouldTrackWidth && i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ";
8901
+ hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ");
8594
8902
  }
8595
8903
  if (!hasLineBreak && !hasFoldableLine) {
8596
- if (plain && !forceQuotes && !testAmbiguousType(string))
8904
+ if (plain && !forceQuotes && !testAmbiguousType(string)) {
8597
8905
  return STYLE_PLAIN;
8906
+ }
8598
8907
  return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
8599
8908
  }
8600
- if (indentPerLevel > 9 && needIndentIndicator(string))
8909
+ if (indentPerLevel > 9 && needIndentIndicator(string)) {
8601
8910
  return STYLE_DOUBLE;
8602
- if (!forceQuotes)
8911
+ }
8912
+ if (!forceQuotes) {
8603
8913
  return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;
8914
+ }
8604
8915
  return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
8605
8916
  }
8606
8917
  function writeScalar(state, string, level, iskey, inblock) {
8607
8918
  state.dump = function() {
8608
- if (string.length === 0)
8919
+ if (string.length === 0) {
8609
8920
  return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''";
8921
+ }
8610
8922
  if (!state.noCompatMode) {
8611
- if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string))
8923
+ if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {
8612
8924
  return state.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'";
8925
+ }
8613
8926
  }
8614
8927
  const indent = state.indent * Math.max(1, level);
8615
8928
  const lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
@@ -8627,9 +8940,9 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8627
8940
  case STYLE_FOLDED:
8628
8941
  return ">" + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent));
8629
8942
  case STYLE_DOUBLE:
8630
- return '"' + escapeString(string, lineWidth) + '"';
8943
+ return '"' + escapeString(string) + '"';
8631
8944
  default:
8632
- throw new YAMLException("impossible error: invalid scalar style");
8945
+ throw new YAMLException2("impossible error: invalid scalar style");
8633
8946
  }
8634
8947
  }();
8635
8948
  }
@@ -8637,9 +8950,11 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8637
8950
  const indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : "";
8638
8951
  const clip = string[string.length - 1] === `
8639
8952
  `;
8640
- return indentIndicator + (clip && (string[string.length - 2] === `
8953
+ const keep = clip && (string[string.length - 2] === `
8641
8954
  ` || string === `
8642
- `) ? "+" : clip ? "" : "-") + `
8955
+ `);
8956
+ const chomp = keep ? "+" : clip ? "" : "-";
8957
+ return indentIndicator + chomp + `
8643
8958
  `;
8644
8959
  }
8645
8960
  function dropEndingNewline(string) {
@@ -8691,11 +9006,12 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8691
9006
  }
8692
9007
  result += `
8693
9008
  `;
8694
- if (line.length - start > width && curr > start)
9009
+ if (line.length - start > width && curr > start) {
8695
9010
  result += line.slice(start, curr) + `
8696
9011
  ` + line.slice(curr + 1);
8697
- else
9012
+ } else {
8698
9013
  result += line.slice(start);
9014
+ }
8699
9015
  return result.slice(1);
8700
9016
  }
8701
9017
  function escapeString(string) {
@@ -8708,8 +9024,9 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8708
9024
  result += string[i];
8709
9025
  if (char >= 65536)
8710
9026
  result += string[i + 1];
8711
- } else
9027
+ } else {
8712
9028
  result += escapeSeq || encodeHex(char);
9029
+ }
8713
9030
  }
8714
9031
  return result;
8715
9032
  }
@@ -8718,8 +9035,9 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8718
9035
  const _tag = state.tag;
8719
9036
  for (let index = 0, length = object.length;index < length; index += 1) {
8720
9037
  let value = object[index];
8721
- if (state.replacer)
9038
+ if (state.replacer) {
8722
9039
  value = state.replacer.call(object, String(index), value);
9040
+ }
8723
9041
  if (writeNode(state, level, value, false, false) || typeof value === "undefined" && writeNode(state, level, null, false, false)) {
8724
9042
  if (_result !== "")
8725
9043
  _result += "," + (!state.condenseFlow ? " " : "");
@@ -8734,15 +9052,18 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8734
9052
  const _tag = state.tag;
8735
9053
  for (let index = 0, length = object.length;index < length; index += 1) {
8736
9054
  let value = object[index];
8737
- if (state.replacer)
9055
+ if (state.replacer) {
8738
9056
  value = state.replacer.call(object, String(index), value);
9057
+ }
8739
9058
  if (writeNode(state, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state, level + 1, null, true, true, false, true)) {
8740
- if (!compact || _result !== "")
9059
+ if (!compact || _result !== "") {
8741
9060
  _result += generateNextLine(state, level);
8742
- if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0))
9061
+ }
9062
+ if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
8743
9063
  _result += "-";
8744
- else
9064
+ } else {
8745
9065
  _result += "- ";
9066
+ }
8746
9067
  _result += state.dump;
8747
9068
  }
8748
9069
  }
@@ -8761,15 +9082,18 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8761
9082
  pairBuffer += '"';
8762
9083
  const objectKey = objectKeyList[index];
8763
9084
  let objectValue = object[objectKey];
8764
- if (state.replacer)
9085
+ if (state.replacer) {
8765
9086
  objectValue = state.replacer.call(object, objectKey, objectValue);
8766
- if (!writeNode(state, level, objectKey, false, false))
9087
+ }
9088
+ if (!writeNode(state, level, objectKey, false, false)) {
8767
9089
  continue;
9090
+ }
8768
9091
  if (state.dump.length > 1024)
8769
9092
  pairBuffer += "? ";
8770
9093
  pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " ");
8771
- if (!writeNode(state, level, objectValue, false, false))
9094
+ if (!writeNode(state, level, objectValue, false, false)) {
8772
9095
  continue;
9096
+ }
8773
9097
  pairBuffer += state.dump;
8774
9098
  _result += pairBuffer;
8775
9099
  }
@@ -8780,37 +9104,46 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8780
9104
  let _result = "";
8781
9105
  const _tag = state.tag;
8782
9106
  const objectKeyList = Object.keys(object);
8783
- if (state.sortKeys === true)
9107
+ if (state.sortKeys === true) {
8784
9108
  objectKeyList.sort();
8785
- else if (typeof state.sortKeys === "function")
9109
+ } else if (typeof state.sortKeys === "function") {
8786
9110
  objectKeyList.sort(state.sortKeys);
8787
- else if (state.sortKeys)
8788
- throw new YAMLException("sortKeys must be a boolean or a function");
9111
+ } else if (state.sortKeys) {
9112
+ throw new YAMLException2("sortKeys must be a boolean or a function");
9113
+ }
8789
9114
  for (let index = 0, length = objectKeyList.length;index < length; index += 1) {
8790
9115
  let pairBuffer = "";
8791
- if (!compact || _result !== "")
9116
+ if (!compact || _result !== "") {
8792
9117
  pairBuffer += generateNextLine(state, level);
9118
+ }
8793
9119
  const objectKey = objectKeyList[index];
8794
9120
  let objectValue = object[objectKey];
8795
- if (state.replacer)
9121
+ if (state.replacer) {
8796
9122
  objectValue = state.replacer.call(object, objectKey, objectValue);
8797
- if (!writeNode(state, level + 1, objectKey, true, true, true))
9123
+ }
9124
+ if (!writeNode(state, level + 1, objectKey, true, true, true)) {
8798
9125
  continue;
9126
+ }
8799
9127
  const explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
8800
- if (explicitPair)
8801
- if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0))
9128
+ if (explicitPair) {
9129
+ if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
8802
9130
  pairBuffer += "?";
8803
- else
9131
+ } else {
8804
9132
  pairBuffer += "? ";
9133
+ }
9134
+ }
8805
9135
  pairBuffer += state.dump;
8806
- if (explicitPair)
9136
+ if (explicitPair) {
8807
9137
  pairBuffer += generateNextLine(state, level);
8808
- if (!writeNode(state, level + 1, objectValue, true, explicitPair))
9138
+ }
9139
+ if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {
8809
9140
  continue;
8810
- if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0))
9141
+ }
9142
+ if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
8811
9143
  pairBuffer += ":";
8812
- else
9144
+ } else {
8813
9145
  pairBuffer += ": ";
9146
+ }
8814
9147
  pairBuffer += state.dump;
8815
9148
  _result += pairBuffer;
8816
9149
  }
@@ -8820,24 +9153,27 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8820
9153
  function detectType(state, object, explicit) {
8821
9154
  const typeList = explicit ? state.explicitTypes : state.implicitTypes;
8822
9155
  for (let index = 0, length = typeList.length;index < length; index += 1) {
8823
- const type = typeList[index];
8824
- if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) {
8825
- if (explicit)
8826
- if (type.multi && type.representName)
8827
- state.tag = type.representName(object);
8828
- else
8829
- state.tag = type.tag;
8830
- else
9156
+ const type2 = typeList[index];
9157
+ if ((type2.instanceOf || type2.predicate) && (!type2.instanceOf || typeof object === "object" && object instanceof type2.instanceOf) && (!type2.predicate || type2.predicate(object))) {
9158
+ if (explicit) {
9159
+ if (type2.multi && type2.representName) {
9160
+ state.tag = type2.representName(object);
9161
+ } else {
9162
+ state.tag = type2.tag;
9163
+ }
9164
+ } else {
8831
9165
  state.tag = "?";
8832
- if (type.represent) {
8833
- const style = state.styleMap[type.tag] || type.defaultStyle;
9166
+ }
9167
+ if (type2.represent) {
9168
+ const style = state.styleMap[type2.tag] || type2.defaultStyle;
8834
9169
  let _result;
8835
- if (_toString.call(type.represent) === "[object Function]")
8836
- _result = type.represent(object, style);
8837
- else if (_hasOwnProperty.call(type.represent, style))
8838
- _result = type.represent[style](object, style);
8839
- else
8840
- throw new YAMLException("!<" + type.tag + '> tag resolver accepts not "' + style + '" style');
9170
+ if (_toString.call(type2.represent) === "[object Function]") {
9171
+ _result = type2.represent(object, style);
9172
+ } else if (_hasOwnProperty.call(type2.represent, style)) {
9173
+ _result = type2.represent[style](object, style);
9174
+ } else {
9175
+ throw new YAMLException2("!<" + type2.tag + '> tag resolver accepts not "' + style + '" style');
9176
+ }
8841
9177
  state.dump = _result;
8842
9178
  }
8843
9179
  return true;
@@ -8848,67 +9184,78 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8848
9184
  function writeNode(state, level, object, block, compact, iskey, isblockseq) {
8849
9185
  state.tag = null;
8850
9186
  state.dump = object;
8851
- if (!detectType(state, object, false))
9187
+ if (!detectType(state, object, false)) {
8852
9188
  detectType(state, object, true);
8853
- const type = _toString.call(state.dump);
9189
+ }
9190
+ const type2 = _toString.call(state.dump);
8854
9191
  const inblock = block;
8855
- if (block)
9192
+ if (block) {
8856
9193
  block = state.flowLevel < 0 || state.flowLevel > level;
8857
- const objectOrArray = type === "[object Object]" || type === "[object Array]";
9194
+ }
9195
+ const objectOrArray = type2 === "[object Object]" || type2 === "[object Array]";
8858
9196
  let duplicateIndex;
8859
9197
  let duplicate;
8860
9198
  if (objectOrArray) {
8861
9199
  duplicateIndex = state.duplicates.indexOf(object);
8862
9200
  duplicate = duplicateIndex !== -1;
8863
9201
  }
8864
- if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0)
9202
+ if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) {
8865
9203
  compact = false;
8866
- if (duplicate && state.usedDuplicates[duplicateIndex])
9204
+ }
9205
+ if (duplicate && state.usedDuplicates[duplicateIndex]) {
8867
9206
  state.dump = "*ref_" + duplicateIndex;
8868
- else {
8869
- if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex])
9207
+ } else {
9208
+ if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
8870
9209
  state.usedDuplicates[duplicateIndex] = true;
8871
- if (type === "[object Object]")
9210
+ }
9211
+ if (type2 === "[object Object]") {
8872
9212
  if (block && Object.keys(state.dump).length !== 0) {
8873
9213
  writeBlockMapping(state, level, state.dump, compact);
8874
- if (duplicate)
9214
+ if (duplicate) {
8875
9215
  state.dump = "&ref_" + duplicateIndex + state.dump;
9216
+ }
8876
9217
  } else {
8877
9218
  writeFlowMapping(state, level, state.dump);
8878
- if (duplicate)
9219
+ if (duplicate) {
8879
9220
  state.dump = "&ref_" + duplicateIndex + " " + state.dump;
9221
+ }
8880
9222
  }
8881
- else if (type === "[object Array]")
9223
+ } else if (type2 === "[object Array]") {
8882
9224
  if (block && state.dump.length !== 0) {
8883
- if (state.noArrayIndent && !isblockseq && level > 0)
9225
+ if (state.noArrayIndent && !isblockseq && level > 0) {
8884
9226
  writeBlockSequence(state, level - 1, state.dump, compact);
8885
- else
9227
+ } else {
8886
9228
  writeBlockSequence(state, level, state.dump, compact);
8887
- if (duplicate)
9229
+ }
9230
+ if (duplicate) {
8888
9231
  state.dump = "&ref_" + duplicateIndex + state.dump;
9232
+ }
8889
9233
  } else {
8890
9234
  writeFlowSequence(state, level, state.dump);
8891
- if (duplicate)
9235
+ if (duplicate) {
8892
9236
  state.dump = "&ref_" + duplicateIndex + " " + state.dump;
9237
+ }
8893
9238
  }
8894
- else if (type === "[object String]") {
8895
- if (state.tag !== "?")
9239
+ } else if (type2 === "[object String]") {
9240
+ if (state.tag !== "?") {
8896
9241
  writeScalar(state, state.dump, level, iskey, inblock);
8897
- } else if (type === "[object Undefined]")
9242
+ }
9243
+ } else if (type2 === "[object Undefined]") {
8898
9244
  return false;
8899
- else {
9245
+ } else {
8900
9246
  if (state.skipInvalid)
8901
9247
  return false;
8902
- throw new YAMLException("unacceptable kind of an object to dump " + type);
9248
+ throw new YAMLException2("unacceptable kind of an object to dump " + type2);
8903
9249
  }
8904
9250
  if (state.tag !== null && state.tag !== "?") {
8905
9251
  let tagStr = encodeURI(state.tag[0] === "!" ? state.tag.slice(1) : state.tag).replace(/!/g, "%21");
8906
- if (state.tag[0] === "!")
9252
+ if (state.tag[0] === "!") {
8907
9253
  tagStr = "!" + tagStr;
8908
- else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:")
9254
+ } else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") {
8909
9255
  tagStr = "!!" + tagStr.slice(18);
8910
- else
9256
+ } else {
8911
9257
  tagStr = "!<" + tagStr + ">";
9258
+ }
8912
9259
  state.dump = tagStr + " " + state.dump;
8913
9260
  }
8914
9261
  }
@@ -8919,83 +9266,110 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
8919
9266
  const duplicatesIndexes = [];
8920
9267
  inspectNode(object, objects, duplicatesIndexes);
8921
9268
  const length = duplicatesIndexes.length;
8922
- for (let index = 0;index < length; index += 1)
9269
+ for (let index = 0;index < length; index += 1) {
8923
9270
  state.duplicates.push(objects[duplicatesIndexes[index]]);
9271
+ }
8924
9272
  state.usedDuplicates = new Array(length);
8925
9273
  }
8926
9274
  function inspectNode(object, objects, duplicatesIndexes) {
8927
9275
  if (object !== null && typeof object === "object") {
8928
9276
  const index = objects.indexOf(object);
8929
9277
  if (index !== -1) {
8930
- if (duplicatesIndexes.indexOf(index) === -1)
9278
+ if (duplicatesIndexes.indexOf(index) === -1) {
8931
9279
  duplicatesIndexes.push(index);
9280
+ }
8932
9281
  } else {
8933
9282
  objects.push(object);
8934
- if (Array.isArray(object))
8935
- for (let i = 0, length = object.length;i < length; i += 1)
9283
+ if (Array.isArray(object)) {
9284
+ for (let i = 0, length = object.length;i < length; i += 1) {
8936
9285
  inspectNode(object[i], objects, duplicatesIndexes);
8937
- else {
9286
+ }
9287
+ } else {
8938
9288
  const objectKeyList = Object.keys(object);
8939
- for (let i = 0, length = objectKeyList.length;i < length; i += 1)
9289
+ for (let i = 0, length = objectKeyList.length;i < length; i += 1) {
8940
9290
  inspectNode(object[objectKeyList[i]], objects, duplicatesIndexes);
9291
+ }
8941
9292
  }
8942
9293
  }
8943
9294
  }
8944
9295
  }
8945
- function dump(input, options) {
9296
+ function dump2(input, options) {
8946
9297
  options = options || {};
8947
9298
  const state = new State(options);
8948
9299
  if (!state.noRefs)
8949
9300
  getDuplicateReferences(input, state);
8950
9301
  let value = input;
8951
- if (state.replacer)
9302
+ if (state.replacer) {
8952
9303
  value = state.replacer.call({ "": value }, "", value);
9304
+ }
8953
9305
  if (writeNode(state, 0, value, true, true))
8954
9306
  return state.dump + `
8955
9307
  `;
8956
9308
  return "";
8957
9309
  }
8958
- module.exports.dump = dump;
8959
- });
8960
- var import_js_yaml = /* @__PURE__ */ __toESM2((/* @__PURE__ */ __commonJSMin((exports, module) => {
8961
- var loader = require_loader();
8962
- var dumper = require_dumper();
9310
+ dumper.dump = dump2;
9311
+ return dumper;
9312
+ }
9313
+ var hasRequiredJsYaml;
9314
+ function requireJsYaml() {
9315
+ if (hasRequiredJsYaml)
9316
+ return jsYaml;
9317
+ hasRequiredJsYaml = 1;
9318
+ const loader2 = requireLoader();
9319
+ const dumper2 = requireDumper();
8963
9320
  function renamed(from, to) {
8964
9321
  return function() {
8965
9322
  throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default.");
8966
9323
  };
8967
9324
  }
8968
- module.exports.Type = require_type();
8969
- module.exports.Schema = require_schema();
8970
- module.exports.FAILSAFE_SCHEMA = require_failsafe();
8971
- module.exports.JSON_SCHEMA = require_json();
8972
- module.exports.CORE_SCHEMA = require_core();
8973
- module.exports.DEFAULT_SCHEMA = require_default();
8974
- module.exports.load = loader.load;
8975
- module.exports.loadAll = loader.loadAll;
8976
- module.exports.dump = dumper.dump;
8977
- module.exports.YAMLException = require_exception();
8978
- module.exports.types = {
8979
- binary: require_binary(),
8980
- float: require_float(),
8981
- map: require_map(),
9325
+ jsYaml.Type = requireType();
9326
+ jsYaml.Schema = requireSchema();
9327
+ jsYaml.FAILSAFE_SCHEMA = requireFailsafe();
9328
+ jsYaml.JSON_SCHEMA = requireJson();
9329
+ jsYaml.CORE_SCHEMA = requireCore();
9330
+ jsYaml.DEFAULT_SCHEMA = require_default();
9331
+ jsYaml.load = loader2.load;
9332
+ jsYaml.loadAll = loader2.loadAll;
9333
+ jsYaml.dump = dumper2.dump;
9334
+ jsYaml.YAMLException = requireException();
9335
+ jsYaml.types = {
9336
+ binary: requireBinary(),
9337
+ float: requireFloat(),
9338
+ map: requireMap(),
8982
9339
  null: require_null(),
8983
- pairs: require_pairs(),
8984
- set: require_set(),
8985
- timestamp: require_timestamp(),
8986
- bool: require_bool(),
8987
- int: require_int(),
8988
- merge: require_merge(),
8989
- omap: require_omap(),
8990
- seq: require_seq(),
8991
- str: require_str()
9340
+ pairs: requirePairs(),
9341
+ set: requireSet(),
9342
+ timestamp: requireTimestamp(),
9343
+ bool: requireBool(),
9344
+ int: requireInt(),
9345
+ merge: requireMerge(),
9346
+ omap: requireOmap(),
9347
+ seq: requireSeq(),
9348
+ str: requireStr()
8992
9349
  };
8993
- module.exports.safeLoad = renamed("safeLoad", "load");
8994
- module.exports.safeLoadAll = renamed("safeLoadAll", "loadAll");
8995
- module.exports.safeDump = renamed("safeDump", "dump");
8996
- }))(), 1);
8997
- var { Type, Schema, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, load, loadAll, dump, YAMLException, types, safeLoad, safeLoadAll, safeDump } = import_js_yaml.default;
8998
- var index_vite_proxy_tmp_default = import_js_yaml.default;
9350
+ jsYaml.safeLoad = renamed("safeLoad", "load");
9351
+ jsYaml.safeLoadAll = renamed("safeLoadAll", "loadAll");
9352
+ jsYaml.safeDump = renamed("safeDump", "dump");
9353
+ return jsYaml;
9354
+ }
9355
+ var jsYamlExports = requireJsYaml();
9356
+ var yaml = /* @__PURE__ */ getDefaultExportFromCjs(jsYamlExports);
9357
+ var {
9358
+ Type,
9359
+ Schema,
9360
+ FAILSAFE_SCHEMA,
9361
+ JSON_SCHEMA,
9362
+ CORE_SCHEMA,
9363
+ DEFAULT_SCHEMA,
9364
+ load,
9365
+ loadAll,
9366
+ dump,
9367
+ YAMLException,
9368
+ types,
9369
+ safeLoad,
9370
+ safeLoadAll,
9371
+ safeDump
9372
+ } = yaml;
8999
9373
  var logFilePathSlot = singleton("logFilePath");
9000
9374
  function setGlobalLogFilePath(path3) {
9001
9375
  logFilePathSlot.set(path3);
@@ -9076,11 +9450,11 @@ class SimpleLogger {
9076
9450
  const path3 = this.logFilePath || getGlobalLogFilePath();
9077
9451
  if (!path3)
9078
9452
  return;
9079
- const timestamp = new Date().toISOString();
9453
+ const timestamp2 = new Date().toISOString();
9080
9454
  this.pendingWrites = Promise.all([
9081
9455
  this.pendingWrites,
9082
9456
  this.pendingInit
9083
- ]).then(() => getFileSystem().appendFile(path3, `${timestamp} ${formatted}`).catch(() => {}));
9457
+ ]).then(() => getFileSystem().appendFile(path3, `${timestamp2} ${formatted}`).catch(() => {}));
9084
9458
  }
9085
9459
  debug(message, ...args) {
9086
9460
  if (this.level > 0)
@@ -9194,6 +9568,7 @@ function getLogFilePath() {
9194
9568
  }
9195
9569
  var formatSlot = singleton("OutputFormat");
9196
9570
  var formatExplicitSlot = singleton("OutputFormatExplicit");
9571
+ var helpRequestedSlot = singleton("HelpRequested");
9197
9572
  var filterSlot = singleton("OutputFilter");
9198
9573
  function getOutputFormat() {
9199
9574
  return formatSlot.get("json");
@@ -9463,10 +9838,10 @@ class LoggerTelemetryProvider {
9463
9838
  success
9464
9839
  })));
9465
9840
  }
9466
- async trackDependency(name, type, duration, success, properties) {
9841
+ async trackDependency(name, type2, duration, success, properties) {
9467
9842
  logger.debug(formatMessage("Dependency", name, this.enrich({
9468
9843
  ...properties,
9469
- type,
9844
+ type: type2,
9470
9845
  duration: `${duration}ms`,
9471
9846
  success
9472
9847
  })));
@@ -9493,8 +9868,8 @@ class DebugTelemetryProvider {
9493
9868
  async trackRequest(name, duration, success, _properties) {
9494
9869
  logger.debug(`[Telemetry] Request: ${name} (${duration}ms, ${success ? "ok" : "fail"})`);
9495
9870
  }
9496
- async trackDependency(name, type, duration, success, _properties) {
9497
- logger.debug(`[Telemetry] Dependency: ${name} [${type}] (${duration}ms, ${success ? "ok" : "fail"})`);
9871
+ async trackDependency(name, type2, duration, success, _properties) {
9872
+ logger.debug(`[Telemetry] Dependency: ${name} [${type2}] (${duration}ms, ${success ? "ok" : "fail"})`);
9498
9873
  }
9499
9874
  }
9500
9875
  var KNOWN_AGENTS = [
@@ -9634,10 +10009,33 @@ class NodeContextStorage {
9634
10009
  return this.storage.getStore();
9635
10010
  }
9636
10011
  }
10012
+ var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
10013
+ var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
10014
+ function getProcessEnv() {
10015
+ return globalThis.process?.env;
10016
+ }
10017
+ function parseInboundTraceparent(value) {
10018
+ if (!value) {
10019
+ return;
10020
+ }
10021
+ const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
10022
+ if (!match) {
10023
+ return;
10024
+ }
10025
+ const [, traceId, parentSpanId] = match;
10026
+ if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
10027
+ return;
10028
+ }
10029
+ return { traceId, parentSpanId };
10030
+ }
10031
+ function getInboundTraceContext() {
10032
+ return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
10033
+ }
9637
10034
  var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
9638
10035
  var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
9639
10036
  var telemetrySessionIdSlot = singleton("TelemetrySessionId");
9640
- function getProcessEnv() {
10037
+ var telemetryOperationIdSlot = singleton("TelemetryOperationId");
10038
+ function getProcessEnv2() {
9641
10039
  return globalThis.process?.env;
9642
10040
  }
9643
10041
  function normalizeSessionId(value) {
@@ -9648,15 +10046,159 @@ function normalizeSessionId(value) {
9648
10046
  return trimmed || undefined;
9649
10047
  }
9650
10048
  function getConfiguredTelemetrySessionId() {
9651
- return normalizeSessionId(getProcessEnv()?.[TELEMETRY_SESSION_ID_ENV]);
10049
+ return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
9652
10050
  }
9653
10051
  function resolveTelemetrySessionId(existingSessionId) {
9654
10052
  return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
9655
10053
  }
9656
- var telemetryPropsSlot = singleton("TelemetryDefaultProps");
9657
- function getGlobalTelemetryProperties() {
9658
- return telemetryPropsSlot.get();
10054
+ function getTelemetryOperationId() {
10055
+ const existing = telemetryOperationIdSlot.get();
10056
+ if (existing) {
10057
+ return existing;
10058
+ }
10059
+ const inboundTraceId = getInboundTraceContext()?.traceId;
10060
+ const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
10061
+ telemetryOperationIdSlot.set(generated);
10062
+ return generated;
10063
+ }
10064
+ var telemetryPropsSlot = singleton("TelemetryDefaultProps");
10065
+ function getGlobalTelemetryProperties() {
10066
+ return telemetryPropsSlot.get();
10067
+ }
10068
+ var REDACTED = "[REDACTED]";
10069
+ var MAX_VALUE_LENGTH = 200;
10070
+ var SENSITIVE_NAME_TOKENS = new Set([
10071
+ "token",
10072
+ "tokens",
10073
+ "secret",
10074
+ "secrets",
10075
+ "password",
10076
+ "passwords",
10077
+ "pwd",
10078
+ "credential",
10079
+ "credentials",
10080
+ "auth",
10081
+ "authentication",
10082
+ "authorization",
10083
+ "authority",
10084
+ "cert",
10085
+ "certificate",
10086
+ "certificates"
10087
+ ]);
10088
+ var SENSITIVE_KEY_PREFIXES = new Set([
10089
+ "api",
10090
+ "access",
10091
+ "client",
10092
+ "private",
10093
+ "public",
10094
+ "signing",
10095
+ "encryption",
10096
+ "session",
10097
+ "master",
10098
+ "shared",
10099
+ "root",
10100
+ "ssh",
10101
+ "rsa",
10102
+ "aes",
10103
+ "hmac",
10104
+ "oauth"
10105
+ ]);
10106
+ var UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
10107
+ var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
10108
+ var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
10109
+ var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
10110
+ var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
10111
+ var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
10112
+ var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
10113
+ function shortHash(input) {
10114
+ let hash = 2166136261;
10115
+ for (let i = 0;i < input.length; i++) {
10116
+ hash ^= input.charCodeAt(i);
10117
+ hash = Math.imul(hash, 16777619);
10118
+ }
10119
+ return (hash >>> 0).toString(16).padStart(8, "0");
10120
+ }
10121
+ function redactUrl(raw) {
10122
+ try {
10123
+ const url = new URL(raw);
10124
+ return `${url.protocol}//${url.host}`;
10125
+ } catch {
10126
+ return `url#${shortHash(raw)}`;
10127
+ }
10128
+ }
10129
+ function redactValueDetectors(value) {
10130
+ let out = value;
10131
+ out = out.replace(JWT_PATTERN, () => REDACTED);
10132
+ out = out.replace(URL_PATTERN, (match) => {
10133
+ const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
10134
+ const core2 = trailing ? match.slice(0, -trailing.length) : match;
10135
+ return `${redactUrl(core2)}${trailing}`;
10136
+ });
10137
+ out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
10138
+ out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
10139
+ out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
10140
+ out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
10141
+ if (out.length > MAX_VALUE_LENGTH) {
10142
+ out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
10143
+ }
10144
+ return out;
10145
+ }
10146
+ function redactValue(value) {
10147
+ return redactValueDetectors(value);
10148
+ }
10149
+ function redactError(error) {
10150
+ const safe = new Error(redactValueDetectors(error.message ?? ""));
10151
+ safe.name = error.name;
10152
+ safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
10153
+ return safe;
10154
+ }
10155
+ function nameTokens(name) {
10156
+ return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s._-]+/).map((t) => t.toLowerCase()).filter(Boolean);
10157
+ }
10158
+ function isSensitiveName(name) {
10159
+ const tokens = nameTokens(name);
10160
+ for (let i = 0;i < tokens.length; i++) {
10161
+ const token = tokens[i];
10162
+ if (SENSITIVE_NAME_TOKENS.has(token)) {
10163
+ return true;
10164
+ }
10165
+ if (token === "key" || token === "keys") {
10166
+ const prev = tokens[i - 1];
10167
+ if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
10168
+ return true;
10169
+ }
10170
+ }
10171
+ }
10172
+ return false;
10173
+ }
10174
+ function redactProperty(name, value) {
10175
+ if (value === undefined || value === null) {
10176
+ return;
10177
+ }
10178
+ if (isSensitiveName(name)) {
10179
+ return REDACTED;
10180
+ }
10181
+ if (typeof value === "boolean" || typeof value === "number") {
10182
+ return value;
10183
+ }
10184
+ if (typeof value !== "string") {
10185
+ return "[OBJECT]";
10186
+ }
10187
+ return redactValueDetectors(value);
10188
+ }
10189
+ function redactProperties(properties) {
10190
+ const out = {};
10191
+ for (const [name, value] of Object.entries(properties)) {
10192
+ const redacted = redactProperty(name, value);
10193
+ if (redacted !== undefined) {
10194
+ out[name] = redacted;
10195
+ }
10196
+ }
10197
+ return out;
9659
10198
  }
10199
+ var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
10200
+ var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
10201
+ var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
9660
10202
 
9661
10203
  class TelemetryService {
9662
10204
  telemetryProvider;
@@ -9684,11 +10226,15 @@ class TelemetryService {
9684
10226
  trackException(error, properties) {
9685
10227
  const context = this.getCurrentContext();
9686
10228
  const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
9687
- this.telemetryProvider.trackException(error, enrichedProperties);
10229
+ this.telemetryProvider.trackException(redactError(error), enrichedProperties);
9688
10230
  }
9689
10231
  async trackRequest(name, fn, properties) {
10232
+ const parentContext = this.getCurrentContext();
10233
+ const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
10234
+ const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
9690
10235
  const context = {
9691
- operationId: this.operationId ?? this.generateId(),
10236
+ operationId,
10237
+ ...parentId !== undefined ? { parentId } : {},
9692
10238
  id: this.generateId()
9693
10239
  };
9694
10240
  const startTime = performance.now();
@@ -9706,7 +10252,46 @@ class TelemetryService {
9706
10252
  throw error;
9707
10253
  }
9708
10254
  }
9709
- async trackDependencyOperation(name, type, fn, properties) {
10255
+ trackRequestResult(name, durationMs, success, properties, context) {
10256
+ const requestContext = context ?? {
10257
+ operationId: this.operationId ?? getTelemetryOperationId(),
10258
+ id: this.generateId()
10259
+ };
10260
+ const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
10261
+ this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
10262
+ }
10263
+ createRequestContext() {
10264
+ const operationId = this.operationId ?? getTelemetryOperationId();
10265
+ const parentId = this.inboundParentIdFor(operationId);
10266
+ return {
10267
+ operationId,
10268
+ ...parentId !== undefined ? { parentId } : {},
10269
+ id: this.generateId()
10270
+ };
10271
+ }
10272
+ inboundParentIdFor(operationId) {
10273
+ const inbound = getInboundTraceContext();
10274
+ return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
10275
+ }
10276
+ runWithContext(context, fn) {
10277
+ return this.contextStorage.run(context, fn);
10278
+ }
10279
+ createDependencyContext() {
10280
+ const parentContext = this.getCurrentContext();
10281
+ if (!parentContext) {
10282
+ return;
10283
+ }
10284
+ return {
10285
+ operationId: parentContext.operationId,
10286
+ parentId: parentContext.id,
10287
+ id: this.generateId()
10288
+ };
10289
+ }
10290
+ trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
10291
+ const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
10292
+ this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
10293
+ }
10294
+ async trackDependencyOperation(name, type2, fn, properties) {
9710
10295
  const parentContext = this.getCurrentContext();
9711
10296
  if (!parentContext) {
9712
10297
  throw new Error("trackDependencyOperation must be called within a trackRequest block.");
@@ -9721,13 +10306,13 @@ class TelemetryService {
9721
10306
  const result = await this.contextStorage.run(childContext, fn);
9722
10307
  const durationMs = performance.now() - startTime;
9723
10308
  const enrichedProperties = this.enrichPropertiesWithContext(properties, childContext);
9724
- await this.telemetryProvider.trackDependency(name, type, durationMs, true, enrichedProperties);
10309
+ await this.telemetryProvider.trackDependency(name, type2, durationMs, true, enrichedProperties);
9725
10310
  return result;
9726
10311
  } catch (error) {
9727
10312
  const durationMs = performance.now() - startTime;
9728
10313
  const err = error instanceof Error ? error : new Error(String(error));
9729
10314
  const enrichedProperties = this.enrichPropertiesWithContext({ ...properties, errorMessage: err.message }, childContext);
9730
- await this.telemetryProvider.trackDependency(name, type, durationMs, false, enrichedProperties);
10315
+ await this.telemetryProvider.trackDependency(name, type2, durationMs, false, enrichedProperties);
9731
10316
  throw error;
9732
10317
  }
9733
10318
  }
@@ -9742,8 +10327,12 @@ class TelemetryService {
9742
10327
  ...getExecutionContextTelemetryProperties(),
9743
10328
  ...globalProperties,
9744
10329
  ...this.defaultProperties,
9745
- ...properties,
9746
- ...context
10330
+ ...redactProperties(properties ?? {}),
10331
+ ...context ? {
10332
+ [TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
10333
+ ...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
10334
+ [TELEMETRY_SPAN_ID_PROPERTY]: context.id
10335
+ } : {}
9747
10336
  };
9748
10337
  if (sessionId === undefined) {
9749
10338
  delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
@@ -9753,7 +10342,16 @@ class TelemetryService {
9753
10342
  return enriched;
9754
10343
  }
9755
10344
  generateId() {
9756
- return crypto.randomUUID().replaceAll("-", "");
10345
+ const bytes = new Uint8Array(8);
10346
+ let hex = "";
10347
+ do {
10348
+ crypto.getRandomValues(bytes);
10349
+ hex = "";
10350
+ for (const byte of bytes) {
10351
+ hex += byte.toString(16).padStart(2, "0");
10352
+ }
10353
+ } while (/^0+$/.test(hex));
10354
+ return hex;
9757
10355
  }
9758
10356
  }
9759
10357
  var providerSlot = singleton("TelemetryProvider");
@@ -9929,8 +10527,8 @@ function printOutput(data, format = "json", logFn, asciiSafe = false) {
9929
10527
  }
9930
10528
  switch (format) {
9931
10529
  case "json": {
9932
- const json = JSON.stringify(data, null, 2);
9933
- logFn(asciiSafe ? escapeNonAscii(json) : json);
10530
+ const json2 = JSON.stringify(data, null, 2);
10531
+ logFn(asciiSafe ? escapeNonAscii(json2) : json2);
9934
10532
  break;
9935
10533
  }
9936
10534
  case "yaml":
@@ -10255,6 +10853,9 @@ var OutputFormatter;
10255
10853
  if (opts?.warning) {
10256
10854
  data.Warning = opts.warning;
10257
10855
  }
10856
+ if (opts?.pagination) {
10857
+ data.Pagination = opts.pagination;
10858
+ }
10258
10859
  success(data);
10259
10860
  }
10260
10861
  OutputFormatter2.emitList = emitList;
@@ -10263,8 +10864,8 @@ var OutputFormatter;
10263
10864
  const sink = getOutputSink();
10264
10865
  const normalized = toPascalCaseData(data);
10265
10866
  if (format === "json") {
10266
- const json = JSON.stringify(normalized);
10267
- const safe = needsAsciiSafeJson(sink) ? escapeNonAscii(json) : json;
10867
+ const json2 = JSON.stringify(normalized);
10868
+ const safe = needsAsciiSafeJson(sink) ? escapeNonAscii(json2) : json2;
10268
10869
  sink.writeErr(`${safe}
10269
10870
  `);
10270
10871
  } else {
@@ -10444,149 +11045,24 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
10444
11045
  ...getCommandProductModeAttribution(commandPath)
10445
11046
  };
10446
11047
  }
10447
- var REDACTED = "[REDACTED]";
10448
- var MAX_VALUE_LENGTH = 200;
10449
- var SENSITIVE_NAME_TOKENS = new Set([
10450
- "token",
10451
- "tokens",
10452
- "secret",
10453
- "secrets",
10454
- "password",
10455
- "passwords",
10456
- "pwd",
10457
- "credential",
10458
- "credentials",
10459
- "auth",
10460
- "authentication",
10461
- "authorization",
10462
- "authority",
10463
- "cert",
10464
- "certificate",
10465
- "certificates"
10466
- ]);
10467
- var SENSITIVE_KEY_PREFIXES = new Set([
10468
- "api",
10469
- "access",
10470
- "client",
10471
- "private",
10472
- "public",
10473
- "signing",
10474
- "encryption",
10475
- "session",
10476
- "master",
10477
- "shared",
10478
- "root",
10479
- "ssh",
10480
- "rsa",
10481
- "aes",
10482
- "hmac",
10483
- "oauth"
10484
- ]);
10485
- var UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
10486
- var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
10487
- var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
10488
- var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
10489
- var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
10490
- var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
10491
- var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
10492
- function shortHash(input) {
10493
- let hash = 2166136261;
10494
- for (let i = 0;i < input.length; i++) {
10495
- hash ^= input.charCodeAt(i);
10496
- hash = Math.imul(hash, 16777619);
10497
- }
10498
- return (hash >>> 0).toString(16).padStart(8, "0");
10499
- }
10500
- function redactUrl(raw) {
10501
- try {
10502
- const url = new URL(raw);
10503
- return `${url.protocol}//${url.host}`;
10504
- } catch {
10505
- return `url#${shortHash(raw)}`;
10506
- }
10507
- }
10508
- function redactValueDetectors(value) {
10509
- let out = value;
10510
- out = out.replace(JWT_PATTERN, () => REDACTED);
10511
- out = out.replace(URL_PATTERN, (match) => {
10512
- const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
10513
- const core = trailing ? match.slice(0, -trailing.length) : match;
10514
- return `${redactUrl(core)}${trailing}`;
10515
- });
10516
- out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
10517
- out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
10518
- out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
10519
- out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
10520
- if (out.length > MAX_VALUE_LENGTH) {
10521
- out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
10522
- }
10523
- return out;
10524
- }
10525
- function nameTokens(name) {
10526
- return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s_-]+/).map((t) => t.toLowerCase()).filter(Boolean);
10527
- }
10528
- function isSensitiveName(name) {
10529
- const tokens = nameTokens(name);
10530
- for (let i = 0;i < tokens.length; i++) {
10531
- const token = tokens[i];
10532
- if (SENSITIVE_NAME_TOKENS.has(token)) {
10533
- return true;
10534
- }
10535
- if (token === "key" || token === "keys") {
10536
- const prev = tokens[i - 1];
10537
- if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
10538
- return true;
10539
- }
10540
- }
10541
- }
10542
- return false;
10543
- }
10544
- function redactProperty(name, value) {
10545
- if (value === undefined || value === null) {
10546
- return;
10547
- }
10548
- if (isSensitiveName(name)) {
10549
- return REDACTED;
10550
- }
10551
- if (typeof value === "boolean" || typeof value === "number") {
10552
- return value;
10553
- }
10554
- if (typeof value !== "string") {
10555
- return "[OBJECT]";
10556
- }
10557
- return redactValueDetectors(value);
10558
- }
10559
- function redactProperties(properties) {
10560
- const out = {};
10561
- for (const [name, value] of Object.entries(properties)) {
10562
- const redacted = redactProperty(name, value);
10563
- if (redacted !== undefined) {
10564
- out[name] = redacted;
10565
- }
10566
- }
10567
- return out;
10568
- }
10569
11048
  var pollSignalSlot = singleton("PollSignal");
10570
11049
  var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
10571
11050
  var retryHintValues = new Set(RETRY_HINTS);
11051
+ var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
10572
11052
  function extractCommandParams(cmd) {
10573
11053
  const params = {};
11054
+ const add2 = (name, value) => {
11055
+ if (name && value !== undefined) {
11056
+ params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
11057
+ }
11058
+ };
10574
11059
  const registered = cmd.registeredArguments ?? [];
10575
11060
  const processed = cmd.processedArgs ?? [];
10576
11061
  for (let i = 0;i < registered.length; i++) {
10577
- const value = processed[i];
10578
- if (value === undefined) {
10579
- continue;
10580
- }
10581
- const name = registered[i].name();
10582
- if (name) {
10583
- params[name] = value;
10584
- }
11062
+ add2(registered[i].name(), processed[i]);
10585
11063
  }
10586
11064
  for (const [key, value] of Object.entries(cmd.opts())) {
10587
- if (value !== undefined) {
10588
- params[key] = value;
10589
- }
11065
+ add2(key, value);
10590
11066
  }
10591
11067
  return params;
10592
11068
  }
@@ -10629,11 +11105,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
10629
11105
  return this.action(async (...args) => {
10630
11106
  const telemetryName = deriveCommandPath(command);
10631
11107
  const props = typeof properties === "function" ? properties(...args) : properties;
11108
+ const requestContext = telemetry.createRequestContext();
10632
11109
  const startTime = performance.now();
10633
11110
  let errorMessage;
10634
11111
  let fallbackExitCode = EXIT_CODES.Success;
10635
11112
  clearRecordedCommandFailureTelemetry();
10636
- const [error] = await catchError(fn(...args));
11113
+ const [error] = await catchError(telemetry.runWithContext(requestContext, () => fn(...args)));
10637
11114
  if (error) {
10638
11115
  errorMessage = error instanceof Error ? error.message : String(error);
10639
11116
  logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
@@ -10669,22 +11146,28 @@ Command.prototype.trackedAction = function(context, fn, properties) {
10669
11146
  recordedFailure,
10670
11147
  pollSignal: context.pollSignal
10671
11148
  });
10672
- telemetry.trackEvent(telemetryName, redactProperties({
10673
- ...extractCommandParams(command),
11149
+ const commandParams = extractCommandParams(command);
11150
+ if (props) {
11151
+ for (const key of Object.keys(props)) {
11152
+ delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
11153
+ }
11154
+ }
11155
+ const baseProperties = redactProperties({
11156
+ ...commandParams,
10674
11157
  ...props,
10675
11158
  ...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
10676
11159
  command: "true",
10677
- duration: String(durationMs),
10678
- success: String(success),
10679
11160
  ...terminalTelemetry,
10680
11161
  ...errorMessage ? { errorMessage } : {}
10681
- }));
11162
+ });
11163
+ telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
10682
11164
  });
10683
11165
  };
10684
11166
  var guardInstalledSlot = singleton("ConsoleGuardInstalled");
10685
11167
  var savedOriginalsSlot = singleton("ConsoleGuardOriginals");
10686
11168
  var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
10687
11169
  var modeSlot = singleton("InteractivityMode");
11170
+ var interactiveFlagSlot = singleton("InteractiveFlag");
10688
11171
  var PollOutcome = {
10689
11172
  Completed: "completed",
10690
11173
  Timeout: "timeout",
@@ -10733,34 +11216,7 @@ var ScreenLogger;
10733
11216
  }
10734
11217
  ScreenLogger2.progress = progress;
10735
11218
  })(ScreenLogger ||= {});
10736
- var USER_AGENT_HEADER = "User-Agent";
10737
11219
  var sdkUserAgentHostToken = singleton("SdkUserAgentHostToken");
10738
- function splitUserAgentTokens(value) {
10739
- return value?.trim().split(/\s+/).filter(Boolean) ?? [];
10740
- }
10741
- function appendUserAgentToken(value, userAgent) {
10742
- const tokens = splitUserAgentTokens(value);
10743
- const seen = new Set(tokens);
10744
- for (const token of splitUserAgentTokens(userAgent)) {
10745
- if (!seen.has(token)) {
10746
- tokens.push(token);
10747
- seen.add(token);
10748
- }
10749
- }
10750
- return tokens.join(" ");
10751
- }
10752
- function getEffectiveUserAgent(userAgent) {
10753
- return appendUserAgentToken(sdkUserAgentHostToken.get(), userAgent);
10754
- }
10755
- function getHeaderName(headers, headerName) {
10756
- return Object.keys(headers).find((key) => key.toLowerCase() === headerName.toLowerCase());
10757
- }
10758
- function addSdkUserAgentHeader(headers, userAgent) {
10759
- const result = { ...headers ?? {} };
10760
- const headerName = getHeaderName(result, USER_AGENT_HEADER);
10761
- result[headerName ?? USER_AGENT_HEADER] = appendUserAgentToken(headerName ? result[headerName] : undefined, getEffectiveUserAgent(userAgent));
10762
- return result;
10763
- }
10764
11220
  class ConsoleTelemetryProvider {
10765
11221
  async trackEvent(eventName, _properties) {
10766
11222
  console.debug(`[Telemetry] Event: ${eventName}`);
@@ -10771,8 +11227,8 @@ class ConsoleTelemetryProvider {
10771
11227
  async trackRequest(name, duration, success, _properties) {
10772
11228
  console.debug(`[Telemetry] Request: ${name} (${duration}ms, ${success ? "ok" : "fail"})`);
10773
11229
  }
10774
- async trackDependency(name, type, duration, success, _properties) {
10775
- console.debug(`[Telemetry] Dependency: ${name} [${type}] (${duration}ms, ${success ? "ok" : "fail"})`);
11230
+ async trackDependency(name, type2, duration, success, _properties) {
11231
+ console.debug(`[Telemetry] Dependency: ${name} [${type2}] (${duration}ms, ${success ? "ok" : "fail"})`);
10776
11232
  }
10777
11233
  }
10778
11234
  var shippedKeysSlot = singleton("ShipSucceededDedupeKeys");
@@ -10918,6 +11374,7 @@ var RulesConfigFileType;
10918
11374
  class PackagerParameters {
10919
11375
  inputPath;
10920
11376
  downloadUrl;
11377
+ projectId;
10921
11378
  logLevel = LogLevel3.Warn;
10922
11379
  outputPath;
10923
11380
  targetFramework;
@@ -10944,6 +11401,11 @@ class ProjectValidateOptions extends ProjectRestoreOptions {
10944
11401
  class ProjectBuildOptions extends ProjectValidateOptions {
10945
11402
  outputType;
10946
11403
  }
11404
+ // src/models/project-cleanup-options.ts
11405
+ class ProjectCleanupOptions extends PackagerParameters {
11406
+ dryRun = false;
11407
+ skipImports = false;
11408
+ }
10947
11409
  // src/models/project-pack-options.ts
10948
11410
  class ProjectPackOptions extends ProjectBuildOptions {
10949
11411
  destinationPath;
@@ -11066,10 +11528,12 @@ var TelemetryNames;
11066
11528
  TelemetryNames2["ProjectToolRestore"] = "ProjectPackager.Tool.Restore";
11067
11529
  TelemetryNames2["ProjectToolValidate"] = "ProjectPackager.Tool.Validate";
11068
11530
  TelemetryNames2["ProjectToolBuild"] = "ProjectPackager.Tool.Build";
11531
+ TelemetryNames2["ProjectToolCleanup"] = "ProjectPackager.Tool.Cleanup";
11069
11532
  TelemetryNames2["ProjectPackagerPack"] = "ProjectPackager.Pack";
11070
11533
  TelemetryNames2["ProjectPackagerRestore"] = "ProjectPackager.Restore";
11071
11534
  TelemetryNames2["ProjectPackagerValidate"] = "ProjectPackager.Validate";
11072
11535
  TelemetryNames2["ProjectPackagerBuild"] = "ProjectPackager.Build";
11536
+ TelemetryNames2["ProjectPackagerCleanup"] = "ProjectPackager.Cleanup";
11073
11537
  TelemetryNames2["ProjectPackagerProjectLoaded"] = "ProjectPackager.ProjectLoaded";
11074
11538
  })(TelemetryNames ||= {});
11075
11539
 
@@ -11366,6 +11830,7 @@ import {
11366
11830
  class ProjectLoader {
11367
11831
  fileSystem;
11368
11832
  static WebAppManifestFileName = "webAppManifest.json";
11833
+ static ProjectJsonFileName = "project.json";
11369
11834
  constructor(fileSystem) {
11370
11835
  this.fileSystem = fileSystem;
11371
11836
  }
@@ -11378,6 +11843,10 @@ class ProjectLoader {
11378
11843
  if (projectFileExists) {
11379
11844
  return await this.loadFromProjectFile(projectPath, projectFilePath);
11380
11845
  }
11846
+ const projectJsonPath = Path2.join(projectPath, ProjectLoader.ProjectJsonFileName);
11847
+ if (await this.fileSystem.exists(projectJsonPath)) {
11848
+ return await this.loadFromProjectFile(projectPath, projectJsonPath, true);
11849
+ }
11381
11850
  const webAppManifestPath = Path2.join(projectPath, ProjectLoader.WebAppManifestFileName);
11382
11851
  const webAppManifestExists = await this.fileSystem.exists(webAppManifestPath);
11383
11852
  if (webAppManifestExists) {
@@ -11385,20 +11854,22 @@ class ProjectLoader {
11385
11854
  }
11386
11855
  throw new Error(translate5.t("solutionpackager.projectLoader.errors.noProjectFile", {
11387
11856
  projectFile: ProjectTool.ProjectFileName,
11857
+ projectJsonFile: ProjectLoader.ProjectJsonFileName,
11388
11858
  manifestFile: ProjectLoader.WebAppManifestFileName,
11389
11859
  path: projectPath
11390
11860
  }));
11391
11861
  }
11392
- async loadFromProjectFile(projectPath, projectFilePath) {
11862
+ async loadFromProjectFile(projectPath, projectFilePath, useProjectJson = false) {
11393
11863
  const fileContent = await this.fileSystem.readFile(projectFilePath);
11394
11864
  if (!fileContent) {
11395
11865
  throw new Error(translate5.t("solutionpackager.projectLoader.errors.readFailed", {
11396
11866
  path: projectFilePath
11397
11867
  }));
11398
11868
  }
11399
- const json = typeof fileContent === "string" ? fileContent : new TextDecoder("utf-8").decode(fileContent);
11400
- const projectData = JSON.parse(json);
11401
- const projectType = projectData?.ProjectType || projectData?.type;
11869
+ const json2 = typeof fileContent === "string" ? fileContent : new TextDecoder("utf-8").decode(fileContent);
11870
+ const projectData = JSON.parse(json2);
11871
+ const outputType = useProjectJson ? projectData.designOptions?.outputType : undefined;
11872
+ const projectType = outputType ?? (projectData?.ProjectType || projectData?.type);
11402
11873
  if (!projectData || !projectType) {
11403
11874
  throw new Error(translate5.t("solutionpackager.projectLoader.errors.invalidProject", {
11404
11875
  path: projectFilePath
@@ -11508,6 +11979,12 @@ class ProjectToolExecutor {
11508
11979
  projectType: project.Type
11509
11980
  }));
11510
11981
  }
11982
+ async cleanupAsync(options, project, context, cancellationToken) {
11983
+ return await this.executeToolOperationAsync(project, context, (tool) => this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Cleanup" /* ProjectToolCleanup */, project.Type, async () => tool.cleanupAsync(options, cancellationToken), {
11984
+ projectId: project.Id,
11985
+ projectType: project.Type
11986
+ }));
11987
+ }
11511
11988
  async executeToolOperationAsync(project, context, operation) {
11512
11989
  try {
11513
11990
  const tool = await this.toolsFactory.createProjectToolAsync(project, context);
@@ -11627,7 +12104,8 @@ class ProjectPackager {
11627
12104
  logLevel: options.logLevel,
11628
12105
  outputPath: options.outputPath
11629
12106
  };
11630
- return await this.projectExecutor.restoreAsync(restoreOptions, uiPathProject, undefined, cancellationToken);
12107
+ const context = this.createOperationContext(options, uiPathProject);
12108
+ return await this.projectExecutor.restoreAsync(restoreOptions, uiPathProject, context, cancellationToken);
11631
12109
  }, cancellationToken);
11632
12110
  }
11633
12111
  async validateProjectAsync(options, cancellationToken) {
@@ -11725,6 +12203,20 @@ class ProjectPackager {
11725
12203
  }
11726
12204
  });
11727
12205
  }
12206
+ async cleanupProjectAsync(options, cancellationToken) {
12207
+ return await this.executeProjectOperationAsync(options, "Cleanup", "ProjectPackager.Cleanup" /* ProjectPackagerCleanup */, async (uiPathProject, loadedProject) => {
12208
+ const cleanupOptions = {
12209
+ projectPath: loadedProject.projectPath,
12210
+ excludeConfiguredSources: options.excludeConfiguredSources ?? false,
12211
+ nuGetSourcesConfigPath: options.nuGetSourcesConfigPath,
12212
+ logLevel: options.logLevel,
12213
+ dryRun: options.dryRun ?? false,
12214
+ skipImports: options.skipImports ?? false
12215
+ };
12216
+ const context = this.createOperationContext(options, uiPathProject);
12217
+ return await this.projectExecutor.cleanupAsync(cleanupOptions, uiPathProject, context, cancellationToken);
12218
+ }, cancellationToken);
12219
+ }
11728
12220
  async getPackageStreamsAsync(result) {
11729
12221
  if (!result.isSuccess) {
11730
12222
  throw new Error(translate6.t("solutionpackager.packager.errors.failedToGetStreams", {
@@ -11779,6 +12271,7 @@ class ProjectPackager {
11779
12271
  id: crypto.randomUUID(),
11780
12272
  projects: [uiPathProject],
11781
12273
  downloadUrl: options.downloadUrl,
12274
+ projectId: options.projectId,
11782
12275
  targetFramework: options.targetFramework ?? TargetFramework.Portable,
11783
12276
  connection: options.connection,
11784
12277
  logger: this.logger,
@@ -12035,13 +12528,72 @@ var ExtendedFolderDtoFeedTypeEnum = {
12035
12528
  FolderHierarchy: "FolderHierarchy"
12036
12529
  };
12037
12530
 
12531
+ // ../../common/dist/sdk-user-agent.js
12532
+ var PREFIX2 = "@uipath/common/";
12533
+ var _g2 = globalThis;
12534
+ function singleton2(ctorOrName) {
12535
+ const name = typeof ctorOrName === "string" ? ctorOrName : ctorOrName.name;
12536
+ const key = Symbol.for(PREFIX2 + name);
12537
+ return {
12538
+ get(fallback) {
12539
+ return _g2[key] ?? fallback;
12540
+ },
12541
+ set(value) {
12542
+ _g2[key] = value;
12543
+ },
12544
+ clear() {
12545
+ delete _g2[key];
12546
+ },
12547
+ getOrInit(factory, guard) {
12548
+ const existing = _g2[key];
12549
+ if (existing != null && typeof existing === "object") {
12550
+ if (!guard || guard(existing)) {
12551
+ return existing;
12552
+ }
12553
+ }
12554
+ const instance = factory();
12555
+ _g2[key] = instance;
12556
+ return instance;
12557
+ }
12558
+ };
12559
+ }
12560
+ var telemetryPropsSlot2 = singleton2("TelemetryDefaultProps");
12561
+ var USER_AGENT_HEADER = "User-Agent";
12562
+ var sdkUserAgentHostToken2 = singleton2("SdkUserAgentHostToken");
12563
+ function splitUserAgentTokens(value) {
12564
+ return value?.trim().split(/\s+/).filter(Boolean) ?? [];
12565
+ }
12566
+ function appendUserAgentToken(value, userAgent) {
12567
+ const tokens = splitUserAgentTokens(value);
12568
+ const seen = new Set(tokens);
12569
+ for (const token of splitUserAgentTokens(userAgent)) {
12570
+ if (!seen.has(token)) {
12571
+ tokens.push(token);
12572
+ seen.add(token);
12573
+ }
12574
+ }
12575
+ return tokens.join(" ");
12576
+ }
12577
+ function getEffectiveUserAgent(userAgent) {
12578
+ return appendUserAgentToken(sdkUserAgentHostToken2.get(), userAgent);
12579
+ }
12580
+ function getHeaderName(headers, headerName) {
12581
+ return Object.keys(headers).find((key) => key.toLowerCase() === headerName.toLowerCase());
12582
+ }
12583
+ function addSdkUserAgentHeader(headers, userAgent) {
12584
+ const result = { ...headers ?? {} };
12585
+ const headerName = getHeaderName(result, USER_AGENT_HEADER);
12586
+ result[headerName ?? USER_AGENT_HEADER] = appendUserAgentToken(headerName ? result[headerName] : undefined, getEffectiveUserAgent(userAgent));
12587
+ return result;
12588
+ }
12589
+
12038
12590
  // src/publish/services/orchestrator-feeds-service.ts
12039
12591
  import { translate as translate9 } from "@uipath/solutionpackager-tool-core";
12040
12592
  // package.json
12041
12593
  var package_default = {
12042
12594
  name: "@uipath/project-packager",
12043
12595
  license: "MIT",
12044
- version: "1.197.0",
12596
+ version: "1.198.0-preview.101",
12045
12597
  description: "UiPath Project Packager - core library for packing individual UiPath projects",
12046
12598
  type: "module",
12047
12599
  main: "./dist/index.js",
@@ -12126,8 +12678,8 @@ class OrchestratorFeedsService {
12126
12678
  this.ensureOrchestratorUrl(connection);
12127
12679
  this.logger.info(`Fetching accessible feeds from ${connection.orchestratorUrl}`);
12128
12680
  try {
12129
- const json = await orchestratorGet(connection, FEEDS_PATH);
12130
- return Array.isArray(json) ? json : [];
12681
+ const json2 = await orchestratorGet(connection, FEEDS_PATH);
12682
+ return Array.isArray(json2) ? json2 : [];
12131
12683
  } catch (error) {
12132
12684
  const { status, statusText, body } = await describeResponseError(error);
12133
12685
  throw new Error(translate9.t("solutionpackager.publish.errors.getAccessibleFeedsFailed", { status, statusText, body }));
@@ -12137,8 +12689,8 @@ class OrchestratorFeedsService {
12137
12689
  this.ensureOrchestratorUrl(connection);
12138
12690
  this.logger.info(`Fetching folders from ${connection.orchestratorUrl}`);
12139
12691
  try {
12140
- const json = await orchestratorGet(connection, FOLDERS_PATH);
12141
- return Array.isArray(json) ? json.map(mapExtendedFolder) : [];
12692
+ const json2 = await orchestratorGet(connection, FOLDERS_PATH);
12693
+ return Array.isArray(json2) ? json2.map(mapExtendedFolder) : [];
12142
12694
  } catch (error) {
12143
12695
  const { status, statusText, body } = await describeResponseError(error);
12144
12696
  throw new Error(translate9.t("solutionpackager.publish.errors.getFoldersForCurrentUserFailed", { status, statusText, body }));
@@ -12150,23 +12702,23 @@ class OrchestratorFeedsService {
12150
12702
  }
12151
12703
  }
12152
12704
  }
12153
- function mapExtendedFolder(json) {
12705
+ function mapExtendedFolder(json2) {
12154
12706
  return {
12155
- isSelectable: json.IsSelectable,
12156
- hasChildren: json.HasChildren,
12157
- level: json.Level,
12158
- key: json.Key,
12159
- displayName: json.DisplayName,
12160
- fullyQualifiedName: json.FullyQualifiedName,
12161
- description: json.Description,
12162
- folderType: json.FolderType,
12163
- isPersonal: json.IsPersonal,
12164
- provisionType: json.ProvisionType,
12165
- permissionModel: json.PermissionModel,
12166
- parentId: json.ParentId,
12167
- parentKey: json.ParentKey,
12168
- feedType: json.FeedType,
12169
- id: json.Id
12707
+ isSelectable: json2.IsSelectable,
12708
+ hasChildren: json2.HasChildren,
12709
+ level: json2.Level,
12710
+ key: json2.Key,
12711
+ displayName: json2.DisplayName,
12712
+ fullyQualifiedName: json2.FullyQualifiedName,
12713
+ description: json2.Description,
12714
+ folderType: json2.FolderType,
12715
+ isPersonal: json2.IsPersonal,
12716
+ provisionType: json2.ProvisionType,
12717
+ permissionModel: json2.PermissionModel,
12718
+ parentId: json2.ParentId,
12719
+ parentKey: json2.ParentKey,
12720
+ feedType: json2.FeedType,
12721
+ id: json2.Id
12170
12722
  };
12171
12723
  }
12172
12724
 
@@ -12483,6 +13035,7 @@ export {
12483
13035
  ProjectPackager,
12484
13036
  ProjectPackOptions,
12485
13037
  ProjectLoader,
13038
+ ProjectCleanupOptions,
12486
13039
  ProjectBuildOptionsValidator,
12487
13040
  ProjectBuildOptions,
12488
13041
  PackagerParametersValidator,
@@ -12497,4 +13050,4 @@ export {
12497
13050
  BaseNodePackagerFactory
12498
13051
  };
12499
13052
 
12500
- //# debugId=EA38FEAAA70063E764756E2164756E21
13053
+ //# debugId=BBE724DBD039E48B64756E2164756E21