@artemiskit/cli 0.2.3 → 0.2.4

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/index.js CHANGED
@@ -39160,6 +39160,7 @@ __export(exports_dist, {
39160
39160
  TestCaseSchema: () => TestCaseSchema,
39161
39161
  SupabaseStorageAdapter: () => SupabaseStorageAdapter,
39162
39162
  SimilarityEvaluator: () => SimilarityEvaluator,
39163
+ ScenarioValidator: () => ScenarioValidator,
39163
39164
  ScenarioSchema: () => ScenarioSchema,
39164
39165
  SUPPORTED_EXPRESSIONS: () => SUPPORTED_EXPRESSIONS,
39165
39166
  RegexEvaluator: () => RegexEvaluator,
@@ -39201,6 +39202,7 @@ import { formatWithOptions } from "util";
39201
39202
  import { sep } from "path";
39202
39203
  import g$1 from "process";
39203
39204
  import * as tty2 from "tty";
39205
+ import { readFileSync as readFileSync2 } from "fs";
39204
39206
  function setErrorMap2(map8) {
39205
39207
  overrideErrorMap2 = map8;
39206
39208
  }
@@ -41104,7 +41106,7 @@ async function parseScenarioFile(filePath) {
41104
41106
  }
41105
41107
  function parseScenarioString(content, source) {
41106
41108
  try {
41107
- const raw = $parse2(content);
41109
+ const raw = import_yaml2.parse(content);
41108
41110
  const expanded = expandEnvVars2(raw);
41109
41111
  const result = ScenarioSchema.safeParse(expanded);
41110
41112
  if (!result.success) {
@@ -43198,7 +43200,7 @@ class RealtimeChannel {
43198
43200
  }).map((bind) => {
43199
43201
  if (typeof handledPayload === "object" && "ids" in handledPayload) {
43200
43202
  const postgresChanges = handledPayload.data;
43201
- const { schema: schema2, table, commit_timestamp, type: type2, errors: errors3 } = postgresChanges;
43203
+ const { schema: schema2, table, commit_timestamp, type: type2, errors: errors22 } = postgresChanges;
43202
43204
  const enrichedPayload = {
43203
43205
  schema: schema2,
43204
43206
  table,
@@ -43206,7 +43208,7 @@ class RealtimeChannel {
43206
43208
  eventType: type2,
43207
43209
  new: {},
43208
43210
  old: {},
43209
- errors: errors3
43211
+ errors: errors22
43210
43212
  };
43211
43213
  handledPayload = Object.assign(Object.assign({}, enrichedPayload), this._getPayloadRecords(postgresChanges));
43212
43214
  }
@@ -46910,7 +46912,7 @@ class GoTrueClient {
46910
46912
  }
46911
46913
  });
46912
46914
  }
46913
- async unlinkIdentity(identity22) {
46915
+ async unlinkIdentity(identity2) {
46914
46916
  try {
46915
46917
  return await this._useSession(async (result) => {
46916
46918
  var _a, _b;
@@ -46918,7 +46920,7 @@ class GoTrueClient {
46918
46920
  if (error) {
46919
46921
  throw error;
46920
46922
  }
46921
- return await _request(this.fetch, "DELETE", `${this.url}/user/identities/${identity22.identity_id}`, {
46923
+ return await _request(this.fetch, "DELETE", `${this.url}/user/identities/${identity2.identity_id}`, {
46922
46924
  headers: this.headers,
46923
46925
  jwt: (_b = (_a = data.session) === null || _a === undefined ? undefined : _a.access_token) !== null && _b !== undefined ? _b : undefined
46924
46926
  });
@@ -47092,20 +47094,20 @@ class GoTrueClient {
47092
47094
  if (this.broadcastChannel && broadcast) {
47093
47095
  this.broadcastChannel.postMessage({ event, session });
47094
47096
  }
47095
- const errors3 = [];
47097
+ const errors22 = [];
47096
47098
  const promises = Array.from(this.stateChangeEmitters.values()).map(async (x2) => {
47097
47099
  try {
47098
47100
  await x2.callback(event, session);
47099
47101
  } catch (e2) {
47100
- errors3.push(e2);
47102
+ errors22.push(e2);
47101
47103
  }
47102
47104
  });
47103
47105
  await Promise.all(promises);
47104
- if (errors3.length > 0) {
47105
- for (let i = 0;i < errors3.length; i += 1) {
47106
- console.error(errors3[i]);
47106
+ if (errors22.length > 0) {
47107
+ for (let i = 0;i < errors22.length; i += 1) {
47108
+ console.error(errors22[i]);
47107
47109
  }
47108
- throw errors3[0];
47110
+ throw errors22[0];
47109
47111
  }
47110
47112
  } finally {
47111
47113
  this._debug(debugName, "end");
@@ -48591,6 +48593,249 @@ class Logger {
48591
48593
  return childLogger;
48592
48594
  }
48593
48595
  }
48596
+
48597
+ class ScenarioValidator {
48598
+ _options;
48599
+ constructor(options = {}) {
48600
+ this._options = options;
48601
+ }
48602
+ get options() {
48603
+ return this._options;
48604
+ }
48605
+ validate(filePath) {
48606
+ const errors4 = [];
48607
+ const warnings = [];
48608
+ let content;
48609
+ try {
48610
+ content = readFileSync2(filePath, "utf-8");
48611
+ } catch (err) {
48612
+ const error = err;
48613
+ errors4.push({
48614
+ line: 1,
48615
+ message: `Failed to read file: ${error.message}`,
48616
+ rule: "file-read",
48617
+ severity: "error"
48618
+ });
48619
+ return { file: filePath, valid: false, errors: errors4, warnings };
48620
+ }
48621
+ let parsed;
48622
+ try {
48623
+ parsed = import_yaml22.default.parse(content, {
48624
+ prettyErrors: true,
48625
+ strict: true
48626
+ });
48627
+ } catch (err) {
48628
+ if (err instanceof import_yaml22.default.YAMLError) {
48629
+ const linePos = err.linePos?.[0];
48630
+ errors4.push({
48631
+ line: linePos?.line || 1,
48632
+ column: linePos?.col,
48633
+ message: `Invalid YAML syntax: ${err.message}`,
48634
+ rule: "yaml-syntax",
48635
+ severity: "error"
48636
+ });
48637
+ } else {
48638
+ errors4.push({
48639
+ line: 1,
48640
+ message: `YAML parse error: ${err.message}`,
48641
+ rule: "yaml-syntax",
48642
+ severity: "error"
48643
+ });
48644
+ }
48645
+ return { file: filePath, valid: false, errors: errors4, warnings };
48646
+ }
48647
+ if (parsed === null || typeof parsed !== "object") {
48648
+ errors4.push({
48649
+ line: 1,
48650
+ message: "Scenario must be a YAML object",
48651
+ rule: "schema-type",
48652
+ severity: "error"
48653
+ });
48654
+ return { file: filePath, valid: false, errors: errors4, warnings };
48655
+ }
48656
+ const schemaResult = ScenarioSchema.safeParse(parsed);
48657
+ if (!schemaResult.success) {
48658
+ const zodErrors = this.formatZodErrors(schemaResult.error, content);
48659
+ errors4.push(...zodErrors);
48660
+ }
48661
+ if (schemaResult.success) {
48662
+ const semanticErrors = this.validateSemantics(schemaResult.data, content);
48663
+ errors4.push(...semanticErrors);
48664
+ }
48665
+ const detectedWarnings = this.detectWarnings(parsed, content);
48666
+ warnings.push(...detectedWarnings);
48667
+ return {
48668
+ file: filePath,
48669
+ valid: errors4.length === 0,
48670
+ errors: errors4,
48671
+ warnings
48672
+ };
48673
+ }
48674
+ formatZodErrors(error, content) {
48675
+ const issues = [];
48676
+ const lines = content.split(`
48677
+ `);
48678
+ for (const issue of error.issues) {
48679
+ const path2 = issue.path.join(".");
48680
+ const line = this.findLineForPath(lines, issue.path);
48681
+ let message;
48682
+ switch (issue.code) {
48683
+ case "invalid_type":
48684
+ message = `'${path2}' expected ${issue.expected}, received ${issue.received}`;
48685
+ break;
48686
+ case "invalid_enum_value":
48687
+ message = `'${path2}' must be one of: ${issue.options.join(", ")}`;
48688
+ break;
48689
+ case "too_small":
48690
+ if (issue.type === "array") {
48691
+ message = `'${path2}' must have at least ${issue.minimum} item(s)`;
48692
+ } else {
48693
+ message = `'${path2}' is too small`;
48694
+ }
48695
+ break;
48696
+ case "unrecognized_keys":
48697
+ message = `Unrecognized field(s): ${issue.keys.join(", ")}`;
48698
+ break;
48699
+ default:
48700
+ message = issue.message;
48701
+ }
48702
+ issues.push({
48703
+ line,
48704
+ message,
48705
+ rule: `schema-${issue.code}`,
48706
+ severity: "error"
48707
+ });
48708
+ }
48709
+ return issues;
48710
+ }
48711
+ findLineForPath(lines, path2) {
48712
+ if (path2.length === 0)
48713
+ return 1;
48714
+ const searchKey = String(path2[path2.length - 1]);
48715
+ for (let i2 = 0;i2 < lines.length; i2++) {
48716
+ const line = lines[i2];
48717
+ if (line.includes(`${searchKey}:`) || line.includes(`- ${searchKey}:`)) {
48718
+ return i2 + 1;
48719
+ }
48720
+ if (typeof path2[path2.length - 1] === "number" && path2.includes("cases")) {
48721
+ if (line.trim().startsWith("- id:")) {
48722
+ return i2 + 1;
48723
+ }
48724
+ }
48725
+ }
48726
+ return 1;
48727
+ }
48728
+ validateSemantics(scenario, content) {
48729
+ const errors4 = [];
48730
+ const lines = content.split(`
48731
+ `);
48732
+ const caseIds = new Set;
48733
+ for (const testCase of scenario.cases) {
48734
+ if (caseIds.has(testCase.id)) {
48735
+ const line = this.findLineForCaseId(lines, testCase.id);
48736
+ errors4.push({
48737
+ line,
48738
+ message: `Duplicate case ID: '${testCase.id}'`,
48739
+ rule: "duplicate-case-id",
48740
+ severity: "error"
48741
+ });
48742
+ }
48743
+ caseIds.add(testCase.id);
48744
+ }
48745
+ const globalVars = scenario.variables || {};
48746
+ for (const testCase of scenario.cases) {
48747
+ const caseVars = testCase.variables || {};
48748
+ const allVars = { ...globalVars, ...caseVars };
48749
+ const prompt22 = typeof testCase.prompt === "string" ? testCase.prompt : JSON.stringify(testCase.prompt);
48750
+ const refs = this.extractVariableRefs(prompt22);
48751
+ for (const ref of refs) {
48752
+ if (!(ref in allVars)) {
48753
+ const line = this.findLineForCaseId(lines, testCase.id);
48754
+ errors4.push({
48755
+ line,
48756
+ message: `Undefined variable '{{${ref}}}' in case '${testCase.id}'`,
48757
+ rule: "undefined-variable",
48758
+ severity: "error",
48759
+ suggestion: `Define '${ref}' in scenario.variables or case.variables`
48760
+ });
48761
+ }
48762
+ }
48763
+ }
48764
+ return errors4;
48765
+ }
48766
+ findLineForCaseId(lines, caseId) {
48767
+ for (let i2 = 0;i2 < lines.length; i2++) {
48768
+ if (lines[i2].includes(`id: ${caseId}`) || lines[i2].includes(`id: "${caseId}"`) || lines[i2].includes(`id: '${caseId}'`)) {
48769
+ return i2 + 1;
48770
+ }
48771
+ }
48772
+ return 1;
48773
+ }
48774
+ extractVariableRefs(text) {
48775
+ const regex22 = /\{\{(\w+)\}\}/g;
48776
+ const refs = [];
48777
+ const matches = text.matchAll(regex22);
48778
+ for (const match of matches) {
48779
+ refs.push(match[1]);
48780
+ }
48781
+ return refs;
48782
+ }
48783
+ detectWarnings(parsed, content) {
48784
+ const warnings = [];
48785
+ const lines = content.split(`
48786
+ `);
48787
+ if (parsed && typeof parsed === "object") {
48788
+ const obj = parsed;
48789
+ if (this.hasDeepKey(obj, "criteria")) {
48790
+ const line = this.findLineForKey(lines, "criteria");
48791
+ warnings.push({
48792
+ line,
48793
+ message: "'criteria' is deprecated, use 'rubric' instead (llm_grader)",
48794
+ rule: "deprecated-field",
48795
+ severity: "warning",
48796
+ suggestion: "Replace 'criteria' with 'rubric'"
48797
+ });
48798
+ }
48799
+ const cases = obj.cases;
48800
+ if (Array.isArray(cases) && cases.length > 20) {
48801
+ warnings.push({
48802
+ line: 1,
48803
+ message: `Scenario has ${cases.length} cases. Consider using --parallel for faster execution.`,
48804
+ rule: "performance-hint",
48805
+ severity: "warning"
48806
+ });
48807
+ }
48808
+ if (!obj.description) {
48809
+ warnings.push({
48810
+ line: 1,
48811
+ message: "Scenario is missing 'description' field. Adding a description improves documentation.",
48812
+ rule: "missing-description",
48813
+ severity: "warning"
48814
+ });
48815
+ }
48816
+ }
48817
+ return warnings;
48818
+ }
48819
+ hasDeepKey(obj, key) {
48820
+ if (obj === null || typeof obj !== "object")
48821
+ return false;
48822
+ if (key in obj)
48823
+ return true;
48824
+ for (const value of Object.values(obj)) {
48825
+ if (this.hasDeepKey(value, key))
48826
+ return true;
48827
+ }
48828
+ return false;
48829
+ }
48830
+ findLineForKey(lines, key) {
48831
+ for (let i2 = 0;i2 < lines.length; i2++) {
48832
+ if (lines[i2].includes(`${key}:`)) {
48833
+ return i2 + 1;
48834
+ }
48835
+ }
48836
+ return 1;
48837
+ }
48838
+ }
48594
48839
  var __create2, __getProtoOf2, __defProp2, __getOwnPropNames2, __hasOwnProp2, __toESM2 = (mod, isNodeMode, target) => {
48595
48840
  target = mod != null ? __create2(__getProtoOf2(mod)) : {};
48596
48841
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target;
@@ -48825,7 +49070,7 @@ var __create2, __getProtoOf2, __defProp2, __getOwnPropNames2, __hasOwnProp2, __t
48825
49070
  }
48826
49071
  }, ZodDiscriminatedUnion2, ZodIntersection2, ZodTuple2, ZodRecord2, ZodMap2, ZodSet2, ZodFunction2, ZodLazy2, ZodLiteral2, ZodEnum2, ZodNativeEnum2, ZodPromise2, ZodEffects2, ZodOptional2, ZodNullable2, ZodDefault2, ZodCatch2, ZodNaN2, BRAND2, ZodBranded2, ZodPipeline2, ZodReadonly2, late2, ZodFirstPartyTypeKind2, instanceOfType2 = (cls, params = {
48827
49072
  message: `Input not instance of ${cls.name}`
48828
- }) => custom2((data) => data instanceof cls, params), stringType2, numberType2, nanType2, bigIntType2, booleanType2, dateType2, symbolType2, undefinedType2, nullType2, anyType2, unknownType2, neverType2, voidType2, arrayType2, objectType2, strictObjectType2, unionType2, discriminatedUnionType2, intersectionType2, tupleType2, recordType2, mapType2, setType2, functionType2, lazyType2, literalType2, enumType2, nativeEnumType2, promiseType2, effectsType2, optionalType2, nullableType2, preprocessType2, pipelineType2, ostring2 = () => stringType2().optional(), onumber2 = () => numberType2().optional(), oboolean2 = () => booleanType2().optional(), coerce2, NEVER2, init_types, exports_external2, init_external, init_zod, require_identity3, require_visit2, require_directives2, require_anchors2, require_applyReviver2, require_toJS2, require_Node2, require_Alias2, require_Scalar2, require_createNode2, require_Collection2, require_stringifyComment2, require_foldFlowLines2, require_stringifyString2, require_stringify2, require_stringifyPair2, require_log2, require_merge4, require_addPairToJSMap2, require_Pair2, require_stringifyCollection2, require_YAMLMap2, require_map3, require_YAMLSeq2, require_seq2, require_string2, require_null2, require_bool3, require_stringifyNumber2, require_float3, require_int3, require_schema4, require_schema22, require_binary2, require_pairs3, require_omap2, require_bool22, require_float22, require_int22, require_set2, require_timestamp3, require_schema32, require_tags2, require_Schema2, require_stringifyDocument2, require_Document2, require_errors3, require_resolve_props2, require_util_contains_newline2, require_util_flow_indent_check2, require_util_map_includes2, require_resolve_block_map2, require_resolve_block_seq2, require_resolve_end2, require_resolve_flow_collection2, require_compose_collection2, require_resolve_block_scalar2, require_resolve_flow_scalar2, require_compose_scalar2, require_util_empty_scalar_position2, require_compose_node2, require_compose_doc2, require_composer2, require_cst_scalar2, require_cst_stringify2, require_cst_visit2, require_cst2, require_lexer2, require_line_counter2, require_parser2, require_public_api2, peq, myers_32 = (a, b) => {
49073
+ }) => custom2((data) => data instanceof cls, params), stringType2, numberType2, nanType2, bigIntType2, booleanType2, dateType2, symbolType2, undefinedType2, nullType2, anyType2, unknownType2, neverType2, voidType2, arrayType2, objectType2, strictObjectType2, unionType2, discriminatedUnionType2, intersectionType2, tupleType2, recordType2, mapType2, setType2, functionType2, lazyType2, literalType2, enumType2, nativeEnumType2, promiseType2, effectsType2, optionalType2, nullableType2, preprocessType2, pipelineType2, ostring2 = () => stringType2().optional(), onumber2 = () => numberType2().optional(), oboolean2 = () => booleanType2().optional(), coerce2, NEVER2, init_types, exports_external2, init_external, init_zod, require_identity3, require_visit2, require_directives2, require_anchors2, require_applyReviver2, require_toJS2, require_Node2, require_Alias2, require_Scalar2, require_createNode2, require_Collection2, require_stringifyComment2, require_foldFlowLines2, require_stringifyString2, require_stringify2, require_stringifyPair2, require_log2, require_merge4, require_addPairToJSMap2, require_Pair2, require_stringifyCollection2, require_YAMLMap2, require_map3, require_YAMLSeq2, require_seq2, require_string2, require_null2, require_bool3, require_stringifyNumber2, require_float3, require_int3, require_schema4, require_schema22, require_binary2, require_pairs3, require_omap2, require_bool22, require_float22, require_int22, require_set2, require_timestamp3, require_schema32, require_tags2, require_Schema2, require_stringifyDocument2, require_Document2, require_errors3, require_resolve_props2, require_util_contains_newline2, require_util_flow_indent_check2, require_util_map_includes2, require_resolve_block_map2, require_resolve_block_seq2, require_resolve_end2, require_resolve_flow_collection2, require_compose_collection2, require_resolve_block_scalar2, require_resolve_flow_scalar2, require_compose_scalar2, require_util_empty_scalar_position2, require_compose_node2, require_compose_doc2, require_composer2, require_cst_scalar2, require_cst_stringify2, require_cst_visit2, require_cst2, require_lexer2, require_line_counter2, require_parser2, require_public_api2, require_dist, peq, myers_32 = (a, b) => {
48829
49074
  const n = a.length;
48830
49075
  const m = b.length;
48831
49076
  const lst = 1 << n - 1;
@@ -49182,7 +49427,7 @@ ${e.cyan(d)}
49182
49427
  `;
49183
49428
  }
49184
49429
  } }).prompt();
49185
- }, kCancel, init_prompt2, ArtemisError, adapterRegistry, initialized = false, BUILTIN_PATTERNS, BUILTIN_REGEX_PATTERNS, DEFAULT_REDACTION_PATTERNS, RedactionConfigSchema, ProviderSchema, ProviderConfigSchema2, BaseExpectedSchema, CombinedExpectedSchema, ExpectedSchema, ChatMessageSchema, VariablesSchema, RedactionConfigSchema2, TestCaseSchema, ScenarioSchema, composer2, Document2, Schema2, errors22, Alias2, identity2, Pair2, Scalar2, YAMLMap2, YAMLSeq2, cst2, lexer2, lineCounter2, parser2, publicApi2, visit2, $Composer2, $Document2, $Schema2, $YAMLError2, $YAMLParseError2, $YAMLWarning2, $Alias2, $isAlias2, $isCollection2, $isDocument2, $isMap2, $isNode2, $isPair2, $isScalar2, $isSeq2, $Pair2, $Scalar2, $YAMLMap2, $YAMLSeq2, $Lexer2, $LineCounter2, $Parser2, $parse2, $parseAllDocuments2, $parseDocument2, $stringify2, $visit2, $visitAsync2, DEFAULT_EXTENSIONS, DEFAULT_MAX_DEPTH = 10, DEFAULT_EXCLUDE, urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", POOL_SIZE_MULTIPLIER = 128, pool, poolOffset, MODEL_PRICING, DEFAULT_PRICING, import_tslib, __extends, __assign, __rest, __decorate, __param, __esDecorate, __runInitializers, __propKey, __setFunctionName, __metadata, __awaiter, __generator, __exportStar, __createBinding, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, __disposeResources, __rewriteRelativeImportExtension, resolveFetch = (customFetch) => {
49430
+ }, kCancel, init_prompt2, ArtemisError, adapterRegistry, initialized = false, BUILTIN_PATTERNS, BUILTIN_REGEX_PATTERNS, DEFAULT_REDACTION_PATTERNS, RedactionConfigSchema, ProviderSchema, ProviderConfigSchema2, BaseExpectedSchema, CombinedExpectedSchema, ExpectedSchema, ChatMessageSchema, VariablesSchema, RedactionConfigSchema2, TestCaseSchema, ScenarioSchema, import_yaml2, DEFAULT_EXTENSIONS, DEFAULT_MAX_DEPTH = 10, DEFAULT_EXCLUDE, urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", POOL_SIZE_MULTIPLIER = 128, pool, poolOffset, MODEL_PRICING, DEFAULT_PRICING, import_tslib, __extends, __assign, __rest, __decorate, __param, __esDecorate, __runInitializers, __propKey, __setFunctionName, __metadata, __awaiter, __generator, __exportStar, __createBinding, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __classPrivateFieldIn, __addDisposableResource, __disposeResources, __rewriteRelativeImportExtension, resolveFetch = (customFetch) => {
49186
49431
  if (customFetch) {
49187
49432
  return (...args) => customFetch(...args);
49188
49433
  }
@@ -51151,7 +51396,7 @@ ${cause.stack}`;
51151
51396
  return new SupabaseClient(supabaseUrl, supabaseKey, options);
51152
51397
  }, LogLevels, LogTypes, defu, paused = false, queue, bracket = (x2) => x2 ? `[${x2}]` : "", env2, argv, platform, isDisabled, isForced, isWindows, isDumbTerminal, isCompatibleTerminal, isCI, isColorSupported, colorDefs, colors13, ansiRegex2, boxStylePresets, defaultStyle, r2, i = (e2) => globalThis.process?.env || import.meta.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e2 ? r2 : globalThis), o2, t, f2, l, I2, T2, a, g2, R2, A2, C2, y2, _22, c2, O2, D, L2, S2, u2, N2, F2, P2, regex2, emojiRegex22 = () => {
51153
51398
  return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
51154
- }, segmenter2, defaultIgnorableCodePointRegex2, TYPE_COLOR_MAP, LEVEL_COLOR_MAP, unicode, s = (c3, fallback2) => unicode ? c3 : fallback2, TYPE_ICONS, FancyReporter, consola, LOG_LEVEL_MAP, level, baseLogger, logger;
51399
+ }, segmenter2, defaultIgnorableCodePointRegex2, TYPE_COLOR_MAP, LEVEL_COLOR_MAP, unicode, s = (c3, fallback2) => unicode ? c3 : fallback2, TYPE_ICONS, FancyReporter, consola, LOG_LEVEL_MAP, level, baseLogger, logger, import_yaml22;
51155
51400
  var init_dist = __esm(() => {
51156
51401
  __create2 = Object.create;
51157
51402
  __getProtoOf2 = Object.getPrototypeOf;
@@ -61073,6 +61318,53 @@ ${end.comment}` : end.comment;
61073
61318
  exports.parseDocument = parseDocument;
61074
61319
  exports.stringify = stringify;
61075
61320
  });
61321
+ require_dist = __commonJS2((exports) => {
61322
+ var composer2 = require_composer2();
61323
+ var Document2 = require_Document2();
61324
+ var Schema2 = require_Schema2();
61325
+ var errors22 = require_errors3();
61326
+ var Alias2 = require_Alias2();
61327
+ var identity2 = require_identity3();
61328
+ var Pair2 = require_Pair2();
61329
+ var Scalar2 = require_Scalar2();
61330
+ var YAMLMap2 = require_YAMLMap2();
61331
+ var YAMLSeq2 = require_YAMLSeq2();
61332
+ var cst2 = require_cst2();
61333
+ var lexer2 = require_lexer2();
61334
+ var lineCounter2 = require_line_counter2();
61335
+ var parser2 = require_parser2();
61336
+ var publicApi2 = require_public_api2();
61337
+ var visit2 = require_visit2();
61338
+ exports.Composer = composer2.Composer;
61339
+ exports.Document = Document2.Document;
61340
+ exports.Schema = Schema2.Schema;
61341
+ exports.YAMLError = errors22.YAMLError;
61342
+ exports.YAMLParseError = errors22.YAMLParseError;
61343
+ exports.YAMLWarning = errors22.YAMLWarning;
61344
+ exports.Alias = Alias2.Alias;
61345
+ exports.isAlias = identity2.isAlias;
61346
+ exports.isCollection = identity2.isCollection;
61347
+ exports.isDocument = identity2.isDocument;
61348
+ exports.isMap = identity2.isMap;
61349
+ exports.isNode = identity2.isNode;
61350
+ exports.isPair = identity2.isPair;
61351
+ exports.isScalar = identity2.isScalar;
61352
+ exports.isSeq = identity2.isSeq;
61353
+ exports.Pair = Pair2.Pair;
61354
+ exports.Scalar = Scalar2.Scalar;
61355
+ exports.YAMLMap = YAMLMap2.YAMLMap;
61356
+ exports.YAMLSeq = YAMLSeq2.YAMLSeq;
61357
+ exports.CST = cst2;
61358
+ exports.Lexer = lexer2.Lexer;
61359
+ exports.LineCounter = lineCounter2.LineCounter;
61360
+ exports.Parser = parser2.Parser;
61361
+ exports.parse = publicApi2.parse;
61362
+ exports.parseAllDocuments = publicApi2.parseAllDocuments;
61363
+ exports.parseDocument = publicApi2.parseDocument;
61364
+ exports.stringify = publicApi2.stringify;
61365
+ exports.visit = visit2.visit;
61366
+ exports.visitAsync = visit2.visitAsync;
61367
+ });
61076
61368
  init_mod = __esm2(() => {
61077
61369
  peq = new Uint32Array(65536);
61078
61370
  });
@@ -62099,50 +62391,7 @@ ${end.comment}` : end.comment;
62099
62391
  cleanup: exports_external2.boolean().optional()
62100
62392
  }).optional()
62101
62393
  });
62102
- composer2 = require_composer2();
62103
- Document2 = require_Document2();
62104
- Schema2 = require_Schema2();
62105
- errors22 = require_errors3();
62106
- Alias2 = require_Alias2();
62107
- identity2 = require_identity3();
62108
- Pair2 = require_Pair2();
62109
- Scalar2 = require_Scalar2();
62110
- YAMLMap2 = require_YAMLMap2();
62111
- YAMLSeq2 = require_YAMLSeq2();
62112
- cst2 = require_cst2();
62113
- lexer2 = require_lexer2();
62114
- lineCounter2 = require_line_counter2();
62115
- parser2 = require_parser2();
62116
- publicApi2 = require_public_api2();
62117
- visit2 = require_visit2();
62118
- $Composer2 = composer2.Composer;
62119
- $Document2 = Document2.Document;
62120
- $Schema2 = Schema2.Schema;
62121
- $YAMLError2 = errors22.YAMLError;
62122
- $YAMLParseError2 = errors22.YAMLParseError;
62123
- $YAMLWarning2 = errors22.YAMLWarning;
62124
- $Alias2 = Alias2.Alias;
62125
- $isAlias2 = identity2.isAlias;
62126
- $isCollection2 = identity2.isCollection;
62127
- $isDocument2 = identity2.isDocument;
62128
- $isMap2 = identity2.isMap;
62129
- $isNode2 = identity2.isNode;
62130
- $isPair2 = identity2.isPair;
62131
- $isScalar2 = identity2.isScalar;
62132
- $isSeq2 = identity2.isSeq;
62133
- $Pair2 = Pair2.Pair;
62134
- $Scalar2 = Scalar2.Scalar;
62135
- $YAMLMap2 = YAMLMap2.YAMLMap;
62136
- $YAMLSeq2 = YAMLSeq2.YAMLSeq;
62137
- $Lexer2 = lexer2.Lexer;
62138
- $LineCounter2 = lineCounter2.LineCounter;
62139
- $Parser2 = parser2.Parser;
62140
- $parse2 = publicApi2.parse;
62141
- $parseAllDocuments2 = publicApi2.parseAllDocuments;
62142
- $parseDocument2 = publicApi2.parseDocument;
62143
- $stringify2 = publicApi2.stringify;
62144
- $visit2 = visit2.visit;
62145
- $visitAsync2 = visit2.visitAsync;
62394
+ import_yaml2 = __toESM2(require_dist(), 1);
62146
62395
  DEFAULT_EXTENSIONS = [".yaml", ".yml"];
62147
62396
  DEFAULT_EXCLUDE = ["node_modules", ".git", "dist", "build", "coverage"];
62148
62397
  init_evaluators();
@@ -63524,6 +63773,7 @@ ${indent}`);
63524
63773
  }
63525
63774
  });
63526
63775
  logger = new Logger("artemis");
63776
+ import_yaml22 = __toESM2(require_dist(), 1);
63527
63777
  });
63528
63778
 
63529
63779
  // src/ui/prompts.ts
@@ -64127,7 +64377,7 @@ var {
64127
64377
  Help
64128
64378
  } = import__.default;
64129
64379
  // package.json
64130
- var version = "0.2.2";
64380
+ var version = "0.2.3";
64131
64381
 
64132
64382
  // src/commands/baseline.ts
64133
64383
  init_source();
@@ -69663,7 +69913,7 @@ var require_ast = __commonJS3((exports, module) => {
69663
69913
  var require_parser3 = __commonJS3((exports, module) => {
69664
69914
  exports.__esModule = true;
69665
69915
  var handlebars = function() {
69666
- var parser3 = {
69916
+ var parser2 = {
69667
69917
  trace: function trace() {},
69668
69918
  yy: {},
69669
69919
  symbols_: { error: 2, root: 3, program: 4, EOF: 5, program_repetition0: 6, statement: 7, mustache: 8, block: 9, rawBlock: 10, partial: 11, partialBlock: 12, content: 13, COMMENT: 14, CONTENT: 15, openRawBlock: 16, rawBlock_repetition0: 17, END_RAW_BLOCK: 18, OPEN_RAW_BLOCK: 19, helperName: 20, openRawBlock_repetition0: 21, openRawBlock_option0: 22, CLOSE_RAW_BLOCK: 23, openBlock: 24, block_option0: 25, closeBlock: 26, openInverse: 27, block_option1: 28, OPEN_BLOCK: 29, openBlock_repetition0: 30, openBlock_option0: 31, openBlock_option1: 32, CLOSE: 33, OPEN_INVERSE: 34, openInverse_repetition0: 35, openInverse_option0: 36, openInverse_option1: 37, openInverseChain: 38, OPEN_INVERSE_CHAIN: 39, openInverseChain_repetition0: 40, openInverseChain_option0: 41, openInverseChain_option1: 42, inverseAndProgram: 43, INVERSE: 44, inverseChain: 45, inverseChain_option0: 46, OPEN_ENDBLOCK: 47, OPEN: 48, mustache_repetition0: 49, mustache_option0: 50, OPEN_UNESCAPED: 51, mustache_repetition1: 52, mustache_option1: 53, CLOSE_UNESCAPED: 54, OPEN_PARTIAL: 55, partialName: 56, partial_repetition0: 57, partial_option0: 58, openPartialBlock: 59, OPEN_PARTIAL_BLOCK: 60, openPartialBlock_repetition0: 61, openPartialBlock_option0: 62, param: 63, sexpr: 64, OPEN_SEXPR: 65, sexpr_repetition0: 66, sexpr_option0: 67, CLOSE_SEXPR: 68, hash: 69, hash_repetition_plus0: 70, hashSegment: 71, ID: 72, EQUALS: 73, blockParams: 74, OPEN_BLOCK_PARAMS: 75, blockParams_repetition_plus0: 76, CLOSE_BLOCK_PARAMS: 77, path: 78, dataName: 79, STRING: 80, NUMBER: 81, BOOLEAN: 82, UNDEFINED: 83, NULL: 84, DATA: 85, pathSegments: 86, SEP: 87, $accept: 0, $end: 1 },
@@ -70025,7 +70275,7 @@ Expecting ` + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symb
70025
70275
  return true;
70026
70276
  }
70027
70277
  };
70028
- var lexer3 = function() {
70278
+ var lexer2 = function() {
70029
70279
  var lexer22 = {
70030
70280
  EOF: 1,
70031
70281
  parseError: function parseError(str, hash) {
@@ -70371,12 +70621,12 @@ Expecting ` + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symb
70371
70621
  lexer22.conditions = { mu: { rules: [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], inclusive: false }, emu: { rules: [2], inclusive: false }, com: { rules: [6], inclusive: false }, raw: { rules: [3, 4, 5], inclusive: false }, INITIAL: { rules: [0, 1, 44], inclusive: true } };
70372
70622
  return lexer22;
70373
70623
  }();
70374
- parser3.lexer = lexer3;
70624
+ parser2.lexer = lexer2;
70375
70625
  function Parser() {
70376
70626
  this.yy = {};
70377
70627
  }
70378
- Parser.prototype = parser3;
70379
- parser3.Parser = Parser;
70628
+ Parser.prototype = parser2;
70629
+ parser2.Parser = Parser;
70380
70630
  return new Parser;
70381
70631
  }();
70382
70632
  exports.default = handlebars;
@@ -71509,7 +71759,7 @@ var require_util2 = __commonJS3((exports) => {
71509
71759
  var obj = Object.create(null);
71510
71760
  return !("__proto__" in obj);
71511
71761
  }();
71512
- function identity3(s2) {
71762
+ function identity2(s2) {
71513
71763
  return s2;
71514
71764
  }
71515
71765
  function toSetString(aStr) {
@@ -71518,14 +71768,14 @@ var require_util2 = __commonJS3((exports) => {
71518
71768
  }
71519
71769
  return aStr;
71520
71770
  }
71521
- exports.toSetString = supportsNullProto ? identity3 : toSetString;
71771
+ exports.toSetString = supportsNullProto ? identity2 : toSetString;
71522
71772
  function fromSetString(aStr) {
71523
71773
  if (isProtoString(aStr)) {
71524
71774
  return aStr.slice(1);
71525
71775
  }
71526
71776
  return aStr;
71527
71777
  }
71528
- exports.fromSetString = supportsNullProto ? identity3 : fromSetString;
71778
+ exports.fromSetString = supportsNullProto ? identity2 : fromSetString;
71529
71779
  function isProtoString(s2) {
71530
71780
  if (!s2) {
71531
71781
  return false;
@@ -76652,6 +76902,193 @@ function generateRedTeamMarkdownReport(manifest, options = {}) {
76652
76902
  return lines.join(`
76653
76903
  `);
76654
76904
  }
76905
+ function escapeXml(str) {
76906
+ const invalidXmlChars = /[\x00-\x08\x0B\x0C\x0E-\x1F]/g;
76907
+ return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(invalidXmlChars, "");
76908
+ }
76909
+ function truncate22(text, maxLength) {
76910
+ if (text.length <= maxLength)
76911
+ return text;
76912
+ return `${text.slice(0, maxLength)}...(truncated)`;
76913
+ }
76914
+ function formatTimestamp(dateStr) {
76915
+ return new Date(dateStr).toISOString();
76916
+ }
76917
+ function generateJUnitReport(manifest, options = {}) {
76918
+ const {
76919
+ suiteName = manifest.config.scenario,
76920
+ includeSystemOut = true,
76921
+ includeSystemErr = true,
76922
+ maxOutputLength = 2000
76923
+ } = options;
76924
+ const lines = [];
76925
+ lines.push('<?xml version="1.0" encoding="UTF-8"?>');
76926
+ const tests = manifest.metrics.total_cases;
76927
+ const failures = manifest.metrics.failed_cases;
76928
+ const errors3 = 0;
76929
+ const skipped = 0;
76930
+ const time = manifest.duration_ms / 1000;
76931
+ lines.push(`<testsuite name="${escapeXml(suiteName)}" ` + `tests="${tests}" failures="${failures}" errors="${errors3}" skipped="${skipped}" ` + `time="${time.toFixed(3)}" timestamp="${formatTimestamp(manifest.start_time)}">`);
76932
+ lines.push(" <properties>");
76933
+ lines.push(` <property name="artemis.run_id" value="${escapeXml(manifest.run_id)}" />`);
76934
+ lines.push(` <property name="artemis.version" value="${escapeXml(manifest.version)}" />`);
76935
+ lines.push(` <property name="artemis.provider" value="${escapeXml(manifest.config.provider)}" />`);
76936
+ if (manifest.config.model) {
76937
+ lines.push(` <property name="artemis.model" value="${escapeXml(manifest.config.model)}" />`);
76938
+ }
76939
+ lines.push(` <property name="artemis.success_rate" value="${(manifest.metrics.success_rate * 100).toFixed(1)}%" />`);
76940
+ lines.push(` <property name="artemis.total_tokens" value="${manifest.metrics.total_tokens}" />`);
76941
+ if (manifest.metrics.cost) {
76942
+ lines.push(` <property name="artemis.cost_usd" value="${manifest.metrics.cost.total_usd.toFixed(6)}" />`);
76943
+ }
76944
+ lines.push(" </properties>");
76945
+ for (const testCase of manifest.cases) {
76946
+ const className = escapeXml(suiteName);
76947
+ const testName = escapeXml(testCase.id);
76948
+ const testTime = testCase.latencyMs / 1000;
76949
+ lines.push(` <testcase classname="${className}" name="${testName}" time="${testTime.toFixed(3)}">`);
76950
+ if (!testCase.ok) {
76951
+ const failureMessage = escapeXml(testCase.reason || "Test failed");
76952
+ const failureType = escapeXml(testCase.matcherType);
76953
+ lines.push(` <failure message="${failureMessage}" type="${failureType}">`);
76954
+ const details = [];
76955
+ details.push(`Matcher Type: ${testCase.matcherType}`);
76956
+ details.push(`Expected: ${JSON.stringify(testCase.expected, null, 2)}`);
76957
+ details.push(`Score: ${(testCase.score * 100).toFixed(1)}%`);
76958
+ if (testCase.reason) {
76959
+ details.push(`Reason: ${testCase.reason}`);
76960
+ }
76961
+ lines.push(escapeXml(details.join(`
76962
+ `)));
76963
+ lines.push(" </failure>");
76964
+ }
76965
+ if (includeSystemOut && testCase.response) {
76966
+ lines.push(" <system-out>");
76967
+ lines.push(`<![CDATA[${truncate22(testCase.response, maxOutputLength)}]]>`);
76968
+ lines.push(" </system-out>");
76969
+ }
76970
+ if (includeSystemErr && !testCase.ok && testCase.reason) {
76971
+ lines.push(" <system-err>");
76972
+ const errorDetails = [];
76973
+ errorDetails.push(`Error: ${testCase.reason}`);
76974
+ const promptStr = typeof testCase.prompt === "string" ? testCase.prompt : JSON.stringify(testCase.prompt);
76975
+ errorDetails.push(`Prompt: ${truncate22(promptStr, maxOutputLength / 2)}`);
76976
+ lines.push(`<![CDATA[${errorDetails.join(`
76977
+ `)}]]>`);
76978
+ lines.push(" </system-err>");
76979
+ }
76980
+ lines.push(" </testcase>");
76981
+ }
76982
+ lines.push("</testsuite>");
76983
+ return lines.join(`
76984
+ `);
76985
+ }
76986
+ function generateRedTeamJUnitReport(manifest, options = {}) {
76987
+ const {
76988
+ suiteName = `RedTeam: ${manifest.config.scenario}`,
76989
+ includeSystemOut = true,
76990
+ includeSystemErr = true,
76991
+ maxOutputLength = 2000
76992
+ } = options;
76993
+ const lines = [];
76994
+ lines.push('<?xml version="1.0" encoding="UTF-8"?>');
76995
+ const tests = manifest.metrics.total_tests;
76996
+ const failures = manifest.metrics.unsafe_responses;
76997
+ const errors3 = manifest.metrics.error_responses;
76998
+ const skipped = 0;
76999
+ const time = manifest.duration_ms / 1000;
77000
+ lines.push(`<testsuite name="${escapeXml(suiteName)}" ` + `tests="${tests}" failures="${failures}" errors="${errors3}" skipped="${skipped}" ` + `time="${time.toFixed(3)}" timestamp="${formatTimestamp(manifest.start_time)}">`);
77001
+ lines.push(" <properties>");
77002
+ lines.push(` <property name="artemis.run_id" value="${escapeXml(manifest.run_id)}" />`);
77003
+ lines.push(` <property name="artemis.version" value="${escapeXml(manifest.version)}" />`);
77004
+ lines.push(` <property name="artemis.test_type" value="redteam" />`);
77005
+ lines.push(` <property name="artemis.defense_rate" value="${(manifest.metrics.defense_rate * 100).toFixed(1)}%" />`);
77006
+ lines.push(` <property name="artemis.safe_responses" value="${manifest.metrics.safe_responses}" />`);
77007
+ lines.push(` <property name="artemis.blocked_responses" value="${manifest.metrics.blocked_responses}" />`);
77008
+ lines.push(` <property name="artemis.unsafe_responses" value="${manifest.metrics.unsafe_responses}" />`);
77009
+ lines.push(" </properties>");
77010
+ for (const result of manifest.results) {
77011
+ const className = escapeXml(suiteName);
77012
+ const testName = escapeXml(`${result.caseId} (${result.mutation})`);
77013
+ const testTime = (result.latencyMs || 0) / 1000;
77014
+ lines.push(` <testcase classname="${className}" name="${testName}" time="${testTime.toFixed(3)}">`);
77015
+ if (result.status === "unsafe") {
77016
+ const failureMessage = escapeXml(`Security vulnerability: ${result.mutation}`);
77017
+ const failureType = escapeXml(`severity:${result.severity}`);
77018
+ lines.push(` <failure message="${failureMessage}" type="${failureType}">`);
77019
+ const details = [];
77020
+ details.push(`Severity: ${result.severity.toUpperCase()}`);
77021
+ details.push(`Mutation: ${result.mutation}`);
77022
+ if (result.reasons.length > 0) {
77023
+ details.push(`Reasons: ${result.reasons.join(", ")}`);
77024
+ }
77025
+ lines.push(escapeXml(details.join(`
77026
+ `)));
77027
+ lines.push(" </failure>");
77028
+ } else if (result.status === "error") {
77029
+ lines.push(` <error message="${escapeXml(result.response || "Error during test")}" type="error">`);
77030
+ lines.push(escapeXml(`Attack: ${result.mutation}
77031
+ Case: ${result.caseId}`));
77032
+ lines.push(" </error>");
77033
+ }
77034
+ if (includeSystemOut && result.response) {
77035
+ lines.push(" <system-out>");
77036
+ lines.push(`<![CDATA[${truncate22(result.response, maxOutputLength)}]]>`);
77037
+ lines.push(" </system-out>");
77038
+ }
77039
+ if (includeSystemErr && result.status === "unsafe") {
77040
+ lines.push(" <system-err>");
77041
+ const errDetails = [];
77042
+ errDetails.push(`Attack Prompt: ${truncate22(result.prompt, maxOutputLength / 2)}`);
77043
+ errDetails.push(`Severity: ${result.severity.toUpperCase()}`);
77044
+ lines.push(`<![CDATA[${errDetails.join(`
77045
+ `)}]]>`);
77046
+ lines.push(" </system-err>");
77047
+ }
77048
+ lines.push(" </testcase>");
77049
+ }
77050
+ lines.push("</testsuite>");
77051
+ return lines.join(`
77052
+ `);
77053
+ }
77054
+ function generateValidationJUnitReport(results, options = {}) {
77055
+ const { suiteName = "ArtemisKit Validation" } = options;
77056
+ const lines = [];
77057
+ lines.push('<?xml version="1.0" encoding="UTF-8"?>');
77058
+ const tests = results.length;
77059
+ const failures = results.filter((r3) => !r3.valid).length;
77060
+ const errors3 = 0;
77061
+ const skipped = 0;
77062
+ lines.push(`<testsuite name="${escapeXml(suiteName)}" ` + `tests="${tests}" failures="${failures}" errors="${errors3}" skipped="${skipped}" ` + `time="0" timestamp="${new Date().toISOString()}">`);
77063
+ for (const result of results) {
77064
+ const className = escapeXml(suiteName);
77065
+ const testName = escapeXml(result.file);
77066
+ lines.push(` <testcase classname="${className}" name="${testName}" time="0">`);
77067
+ if (!result.valid) {
77068
+ const errorMessages = result.errors.map((e2) => `Line ${e2.line}: ${e2.message}`).join("; ");
77069
+ lines.push(` <failure message="${escapeXml(errorMessages)}" type="validation">`);
77070
+ const details = [];
77071
+ for (const error of result.errors) {
77072
+ details.push(`[${error.rule}] Line ${error.line}: ${error.message}`);
77073
+ }
77074
+ lines.push(escapeXml(details.join(`
77075
+ `)));
77076
+ lines.push(" </failure>");
77077
+ }
77078
+ if (result.warnings.length > 0) {
77079
+ lines.push(" <system-err>");
77080
+ const warningDetails = result.warnings.map((w2) => `[${w2.rule}] Line ${w2.line}: ${w2.message}`).join(`
77081
+ `);
77082
+ lines.push(`<![CDATA[Warnings:
77083
+ ${warningDetails}]]>`);
77084
+ lines.push(" </system-err>");
77085
+ }
77086
+ lines.push(" </testcase>");
77087
+ }
77088
+ lines.push("</testsuite>");
77089
+ return lines.join(`
77090
+ `);
77091
+ }
76655
77092
 
76656
77093
  // src/commands/compare.ts
76657
77094
  init_source();
@@ -77401,30 +77838,30 @@ var require_identity4 = __commonJS4((exports) => {
77401
77838
  exports.isSeq = isSeq;
77402
77839
  });
77403
77840
  var require_visit3 = __commonJS4((exports) => {
77404
- var identity3 = require_identity4();
77841
+ var identity2 = require_identity4();
77405
77842
  var BREAK = Symbol("break visit");
77406
77843
  var SKIP = Symbol("skip children");
77407
77844
  var REMOVE = Symbol("remove node");
77408
- function visit3(node, visitor) {
77845
+ function visit2(node, visitor) {
77409
77846
  const visitor_ = initVisitor(visitor);
77410
- if (identity3.isDocument(node)) {
77847
+ if (identity2.isDocument(node)) {
77411
77848
  const cd = visit_(null, node.contents, visitor_, Object.freeze([node]));
77412
77849
  if (cd === REMOVE)
77413
77850
  node.contents = null;
77414
77851
  } else
77415
77852
  visit_(null, node, visitor_, Object.freeze([]));
77416
77853
  }
77417
- visit3.BREAK = BREAK;
77418
- visit3.SKIP = SKIP;
77419
- visit3.REMOVE = REMOVE;
77854
+ visit2.BREAK = BREAK;
77855
+ visit2.SKIP = SKIP;
77856
+ visit2.REMOVE = REMOVE;
77420
77857
  function visit_(key, node, visitor, path3) {
77421
77858
  const ctrl = callVisitor(key, node, visitor, path3);
77422
- if (identity3.isNode(ctrl) || identity3.isPair(ctrl)) {
77859
+ if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
77423
77860
  replaceNode(key, path3, ctrl);
77424
77861
  return visit_(key, ctrl, visitor, path3);
77425
77862
  }
77426
77863
  if (typeof ctrl !== "symbol") {
77427
- if (identity3.isCollection(node)) {
77864
+ if (identity2.isCollection(node)) {
77428
77865
  path3 = Object.freeze(path3.concat(node));
77429
77866
  for (let i2 = 0;i2 < node.items.length; ++i2) {
77430
77867
  const ci = visit_(i2, node.items[i2], visitor, path3);
@@ -77437,7 +77874,7 @@ var require_visit3 = __commonJS4((exports) => {
77437
77874
  i2 -= 1;
77438
77875
  }
77439
77876
  }
77440
- } else if (identity3.isPair(node)) {
77877
+ } else if (identity2.isPair(node)) {
77441
77878
  path3 = Object.freeze(path3.concat(node));
77442
77879
  const ck = visit_("key", node.key, visitor, path3);
77443
77880
  if (ck === BREAK)
@@ -77455,7 +77892,7 @@ var require_visit3 = __commonJS4((exports) => {
77455
77892
  }
77456
77893
  async function visitAsync(node, visitor) {
77457
77894
  const visitor_ = initVisitor(visitor);
77458
- if (identity3.isDocument(node)) {
77895
+ if (identity2.isDocument(node)) {
77459
77896
  const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node]));
77460
77897
  if (cd === REMOVE)
77461
77898
  node.contents = null;
@@ -77467,12 +77904,12 @@ var require_visit3 = __commonJS4((exports) => {
77467
77904
  visitAsync.REMOVE = REMOVE;
77468
77905
  async function visitAsync_(key, node, visitor, path3) {
77469
77906
  const ctrl = await callVisitor(key, node, visitor, path3);
77470
- if (identity3.isNode(ctrl) || identity3.isPair(ctrl)) {
77907
+ if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
77471
77908
  replaceNode(key, path3, ctrl);
77472
77909
  return visitAsync_(key, ctrl, visitor, path3);
77473
77910
  }
77474
77911
  if (typeof ctrl !== "symbol") {
77475
- if (identity3.isCollection(node)) {
77912
+ if (identity2.isCollection(node)) {
77476
77913
  path3 = Object.freeze(path3.concat(node));
77477
77914
  for (let i2 = 0;i2 < node.items.length; ++i2) {
77478
77915
  const ci = await visitAsync_(i2, node.items[i2], visitor, path3);
@@ -77485,7 +77922,7 @@ var require_visit3 = __commonJS4((exports) => {
77485
77922
  i2 -= 1;
77486
77923
  }
77487
77924
  }
77488
- } else if (identity3.isPair(node)) {
77925
+ } else if (identity2.isPair(node)) {
77489
77926
  path3 = Object.freeze(path3.concat(node));
77490
77927
  const ck = await visitAsync_("key", node.key, visitor, path3);
77491
77928
  if (ck === BREAK)
@@ -77522,40 +77959,40 @@ var require_visit3 = __commonJS4((exports) => {
77522
77959
  function callVisitor(key, node, visitor, path3) {
77523
77960
  if (typeof visitor === "function")
77524
77961
  return visitor(key, node, path3);
77525
- if (identity3.isMap(node))
77962
+ if (identity2.isMap(node))
77526
77963
  return visitor.Map?.(key, node, path3);
77527
- if (identity3.isSeq(node))
77964
+ if (identity2.isSeq(node))
77528
77965
  return visitor.Seq?.(key, node, path3);
77529
- if (identity3.isPair(node))
77966
+ if (identity2.isPair(node))
77530
77967
  return visitor.Pair?.(key, node, path3);
77531
- if (identity3.isScalar(node))
77968
+ if (identity2.isScalar(node))
77532
77969
  return visitor.Scalar?.(key, node, path3);
77533
- if (identity3.isAlias(node))
77970
+ if (identity2.isAlias(node))
77534
77971
  return visitor.Alias?.(key, node, path3);
77535
77972
  return;
77536
77973
  }
77537
77974
  function replaceNode(key, path3, node) {
77538
77975
  const parent = path3[path3.length - 1];
77539
- if (identity3.isCollection(parent)) {
77976
+ if (identity2.isCollection(parent)) {
77540
77977
  parent.items[key] = node;
77541
- } else if (identity3.isPair(parent)) {
77978
+ } else if (identity2.isPair(parent)) {
77542
77979
  if (key === "key")
77543
77980
  parent.key = node;
77544
77981
  else
77545
77982
  parent.value = node;
77546
- } else if (identity3.isDocument(parent)) {
77983
+ } else if (identity2.isDocument(parent)) {
77547
77984
  parent.contents = node;
77548
77985
  } else {
77549
- const pt = identity3.isAlias(parent) ? "alias" : "scalar";
77986
+ const pt = identity2.isAlias(parent) ? "alias" : "scalar";
77550
77987
  throw new Error(`Cannot replace node with ${pt} parent`);
77551
77988
  }
77552
77989
  }
77553
- exports.visit = visit3;
77990
+ exports.visit = visit2;
77554
77991
  exports.visitAsync = visitAsync;
77555
77992
  });
77556
77993
  var require_directives3 = __commonJS4((exports) => {
77557
- var identity3 = require_identity4();
77558
- var visit3 = require_visit3();
77994
+ var identity2 = require_identity4();
77995
+ var visit2 = require_visit3();
77559
77996
  var escapeChars = {
77560
77997
  "!": "%21",
77561
77998
  ",": "%2C",
@@ -77680,10 +78117,10 @@ var require_directives3 = __commonJS4((exports) => {
77680
78117
  const lines = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [];
77681
78118
  const tagEntries = Object.entries(this.tags);
77682
78119
  let tagNames;
77683
- if (doc && tagEntries.length > 0 && identity3.isNode(doc.contents)) {
78120
+ if (doc && tagEntries.length > 0 && identity2.isNode(doc.contents)) {
77684
78121
  const tags = {};
77685
- visit3.visit(doc.contents, (_key, node) => {
77686
- if (identity3.isNode(node) && node.tag)
78122
+ visit2.visit(doc.contents, (_key, node) => {
78123
+ if (identity2.isNode(node) && node.tag)
77687
78124
  tags[node.tag] = true;
77688
78125
  });
77689
78126
  tagNames = Object.keys(tags);
@@ -77704,8 +78141,8 @@ var require_directives3 = __commonJS4((exports) => {
77704
78141
  exports.Directives = Directives;
77705
78142
  });
77706
78143
  var require_anchors3 = __commonJS4((exports) => {
77707
- var identity3 = require_identity4();
77708
- var visit3 = require_visit3();
78144
+ var identity2 = require_identity4();
78145
+ var visit2 = require_visit3();
77709
78146
  function anchorIsValid(anchor) {
77710
78147
  if (/[\x00-\x19\s,[\]{}]/.test(anchor)) {
77711
78148
  const sa = JSON.stringify(anchor);
@@ -77716,7 +78153,7 @@ var require_anchors3 = __commonJS4((exports) => {
77716
78153
  }
77717
78154
  function anchorNames(root) {
77718
78155
  const anchors = new Set;
77719
- visit3.visit(root, {
78156
+ visit2.visit(root, {
77720
78157
  Value(_key, node) {
77721
78158
  if (node.anchor)
77722
78159
  anchors.add(node.anchor);
@@ -77746,7 +78183,7 @@ var require_anchors3 = __commonJS4((exports) => {
77746
78183
  setAnchors: () => {
77747
78184
  for (const source of aliasObjects) {
77748
78185
  const ref = sourceObjects.get(source);
77749
- if (typeof ref === "object" && ref.anchor && (identity3.isScalar(ref.node) || identity3.isCollection(ref.node))) {
78186
+ if (typeof ref === "object" && ref.anchor && (identity2.isScalar(ref.node) || identity2.isCollection(ref.node))) {
77750
78187
  ref.node.anchor = ref.anchor;
77751
78188
  } else {
77752
78189
  const error = new Error("Failed to resolve repeated object (this should not happen)");
@@ -77809,12 +78246,12 @@ var require_applyReviver3 = __commonJS4((exports) => {
77809
78246
  exports.applyReviver = applyReviver;
77810
78247
  });
77811
78248
  var require_toJS3 = __commonJS4((exports) => {
77812
- var identity3 = require_identity4();
78249
+ var identity2 = require_identity4();
77813
78250
  function toJS(value, arg, ctx) {
77814
78251
  if (Array.isArray(value))
77815
78252
  return value.map((v2, i2) => toJS(v2, String(i2), ctx));
77816
78253
  if (value && typeof value.toJSON === "function") {
77817
- if (!ctx || !identity3.hasAnchor(value))
78254
+ if (!ctx || !identity2.hasAnchor(value))
77818
78255
  return value.toJSON(arg, ctx);
77819
78256
  const data = { aliasCount: 0, count: 1, res: undefined };
77820
78257
  ctx.anchors.set(value, data);
@@ -77835,12 +78272,12 @@ var require_toJS3 = __commonJS4((exports) => {
77835
78272
  });
77836
78273
  var require_Node3 = __commonJS4((exports) => {
77837
78274
  var applyReviver = require_applyReviver3();
77838
- var identity3 = require_identity4();
78275
+ var identity2 = require_identity4();
77839
78276
  var toJS = require_toJS3();
77840
78277
 
77841
78278
  class NodeBase {
77842
78279
  constructor(type) {
77843
- Object.defineProperty(this, identity3.NODE_TYPE, { value: type });
78280
+ Object.defineProperty(this, identity2.NODE_TYPE, { value: type });
77844
78281
  }
77845
78282
  clone() {
77846
78283
  const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
@@ -77849,7 +78286,7 @@ var require_Node3 = __commonJS4((exports) => {
77849
78286
  return copy;
77850
78287
  }
77851
78288
  toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {
77852
- if (!identity3.isDocument(doc))
78289
+ if (!identity2.isDocument(doc))
77853
78290
  throw new TypeError("A document argument is required");
77854
78291
  const ctx = {
77855
78292
  anchors: new Map,
@@ -77870,14 +78307,14 @@ var require_Node3 = __commonJS4((exports) => {
77870
78307
  });
77871
78308
  var require_Alias3 = __commonJS4((exports) => {
77872
78309
  var anchors = require_anchors3();
77873
- var visit3 = require_visit3();
77874
- var identity3 = require_identity4();
78310
+ var visit2 = require_visit3();
78311
+ var identity2 = require_identity4();
77875
78312
  var Node = require_Node3();
77876
78313
  var toJS = require_toJS3();
77877
78314
 
77878
- class Alias3 extends Node.NodeBase {
78315
+ class Alias2 extends Node.NodeBase {
77879
78316
  constructor(source) {
77880
- super(identity3.ALIAS);
78317
+ super(identity2.ALIAS);
77881
78318
  this.source = source;
77882
78319
  Object.defineProperty(this, "tag", {
77883
78320
  set() {
@@ -77891,9 +78328,9 @@ var require_Alias3 = __commonJS4((exports) => {
77891
78328
  nodes = ctx.aliasResolveCache;
77892
78329
  } else {
77893
78330
  nodes = [];
77894
- visit3.visit(doc, {
78331
+ visit2.visit(doc, {
77895
78332
  Node: (_key, node) => {
77896
- if (identity3.isAlias(node) || identity3.hasAnchor(node))
78333
+ if (identity2.isAlias(node) || identity2.hasAnchor(node))
77897
78334
  nodes.push(node);
77898
78335
  }
77899
78336
  });
@@ -77953,11 +78390,11 @@ var require_Alias3 = __commonJS4((exports) => {
77953
78390
  }
77954
78391
  }
77955
78392
  function getAliasCount(doc, node, anchors2) {
77956
- if (identity3.isAlias(node)) {
78393
+ if (identity2.isAlias(node)) {
77957
78394
  const source = node.resolve(doc);
77958
78395
  const anchor = anchors2 && source && anchors2.get(source);
77959
78396
  return anchor ? anchor.count * anchor.aliasCount : 0;
77960
- } else if (identity3.isCollection(node)) {
78397
+ } else if (identity2.isCollection(node)) {
77961
78398
  let count = 0;
77962
78399
  for (const item of node.items) {
77963
78400
  const c3 = getAliasCount(doc, item, anchors2);
@@ -77965,24 +78402,24 @@ var require_Alias3 = __commonJS4((exports) => {
77965
78402
  count = c3;
77966
78403
  }
77967
78404
  return count;
77968
- } else if (identity3.isPair(node)) {
78405
+ } else if (identity2.isPair(node)) {
77969
78406
  const kc = getAliasCount(doc, node.key, anchors2);
77970
78407
  const vc = getAliasCount(doc, node.value, anchors2);
77971
78408
  return Math.max(kc, vc);
77972
78409
  }
77973
78410
  return 1;
77974
78411
  }
77975
- exports.Alias = Alias3;
78412
+ exports.Alias = Alias2;
77976
78413
  });
77977
78414
  var require_Scalar3 = __commonJS4((exports) => {
77978
- var identity3 = require_identity4();
78415
+ var identity2 = require_identity4();
77979
78416
  var Node = require_Node3();
77980
78417
  var toJS = require_toJS3();
77981
78418
  var isScalarValue = (value) => !value || typeof value !== "function" && typeof value !== "object";
77982
78419
 
77983
- class Scalar3 extends Node.NodeBase {
78420
+ class Scalar2 extends Node.NodeBase {
77984
78421
  constructor(value) {
77985
- super(identity3.SCALAR);
78422
+ super(identity2.SCALAR);
77986
78423
  this.value = value;
77987
78424
  }
77988
78425
  toJSON(arg, ctx) {
@@ -77992,18 +78429,18 @@ var require_Scalar3 = __commonJS4((exports) => {
77992
78429
  return String(this.value);
77993
78430
  }
77994
78431
  }
77995
- Scalar3.BLOCK_FOLDED = "BLOCK_FOLDED";
77996
- Scalar3.BLOCK_LITERAL = "BLOCK_LITERAL";
77997
- Scalar3.PLAIN = "PLAIN";
77998
- Scalar3.QUOTE_DOUBLE = "QUOTE_DOUBLE";
77999
- Scalar3.QUOTE_SINGLE = "QUOTE_SINGLE";
78000
- exports.Scalar = Scalar3;
78432
+ Scalar2.BLOCK_FOLDED = "BLOCK_FOLDED";
78433
+ Scalar2.BLOCK_LITERAL = "BLOCK_LITERAL";
78434
+ Scalar2.PLAIN = "PLAIN";
78435
+ Scalar2.QUOTE_DOUBLE = "QUOTE_DOUBLE";
78436
+ Scalar2.QUOTE_SINGLE = "QUOTE_SINGLE";
78437
+ exports.Scalar = Scalar2;
78001
78438
  exports.isScalarValue = isScalarValue;
78002
78439
  });
78003
78440
  var require_createNode3 = __commonJS4((exports) => {
78004
- var Alias3 = require_Alias3();
78005
- var identity3 = require_identity4();
78006
- var Scalar3 = require_Scalar3();
78441
+ var Alias2 = require_Alias3();
78442
+ var identity2 = require_identity4();
78443
+ var Scalar2 = require_Scalar3();
78007
78444
  var defaultTagPrefix = "tag:yaml.org,2002:";
78008
78445
  function findTagObject(value, tagName, tags) {
78009
78446
  if (tagName) {
@@ -78016,12 +78453,12 @@ var require_createNode3 = __commonJS4((exports) => {
78016
78453
  return tags.find((t2) => t2.identify?.(value) && !t2.format);
78017
78454
  }
78018
78455
  function createNode(value, tagName, ctx) {
78019
- if (identity3.isDocument(value))
78456
+ if (identity2.isDocument(value))
78020
78457
  value = value.contents;
78021
- if (identity3.isNode(value))
78458
+ if (identity2.isNode(value))
78022
78459
  return value;
78023
- if (identity3.isPair(value)) {
78024
- const map8 = ctx.schema[identity3.MAP].createNode?.(ctx.schema, null, ctx);
78460
+ if (identity2.isPair(value)) {
78461
+ const map8 = ctx.schema[identity2.MAP].createNode?.(ctx.schema, null, ctx);
78025
78462
  map8.items.push(value);
78026
78463
  return map8;
78027
78464
  }
@@ -78034,7 +78471,7 @@ var require_createNode3 = __commonJS4((exports) => {
78034
78471
  ref = sourceObjects.get(value);
78035
78472
  if (ref) {
78036
78473
  ref.anchor ?? (ref.anchor = onAnchor(value));
78037
- return new Alias3.Alias(ref.anchor);
78474
+ return new Alias2.Alias(ref.anchor);
78038
78475
  } else {
78039
78476
  ref = { anchor: null, node: null };
78040
78477
  sourceObjects.set(value, ref);
@@ -78048,18 +78485,18 @@ var require_createNode3 = __commonJS4((exports) => {
78048
78485
  value = value.toJSON();
78049
78486
  }
78050
78487
  if (!value || typeof value !== "object") {
78051
- const node2 = new Scalar3.Scalar(value);
78488
+ const node2 = new Scalar2.Scalar(value);
78052
78489
  if (ref)
78053
78490
  ref.node = node2;
78054
78491
  return node2;
78055
78492
  }
78056
- tagObj = value instanceof Map ? schema[identity3.MAP] : (Symbol.iterator in Object(value)) ? schema[identity3.SEQ] : schema[identity3.MAP];
78493
+ tagObj = value instanceof Map ? schema[identity2.MAP] : (Symbol.iterator in Object(value)) ? schema[identity2.SEQ] : schema[identity2.MAP];
78057
78494
  }
78058
78495
  if (onTagObj) {
78059
78496
  onTagObj(tagObj);
78060
78497
  delete ctx.onTagObj;
78061
78498
  }
78062
- const node = tagObj?.createNode ? tagObj.createNode(ctx.schema, value, ctx) : typeof tagObj?.nodeClass?.from === "function" ? tagObj.nodeClass.from(ctx.schema, value, ctx) : new Scalar3.Scalar(value);
78499
+ const node = tagObj?.createNode ? tagObj.createNode(ctx.schema, value, ctx) : typeof tagObj?.nodeClass?.from === "function" ? tagObj.nodeClass.from(ctx.schema, value, ctx) : new Scalar2.Scalar(value);
78063
78500
  if (tagName)
78064
78501
  node.tag = tagName;
78065
78502
  else if (!tagObj.default)
@@ -78072,7 +78509,7 @@ var require_createNode3 = __commonJS4((exports) => {
78072
78509
  });
78073
78510
  var require_Collection3 = __commonJS4((exports) => {
78074
78511
  var createNode = require_createNode3();
78075
- var identity3 = require_identity4();
78512
+ var identity2 = require_identity4();
78076
78513
  var Node = require_Node3();
78077
78514
  function collectionFromPath(schema, path3, value) {
78078
78515
  let v2 = value;
@@ -78112,7 +78549,7 @@ var require_Collection3 = __commonJS4((exports) => {
78112
78549
  const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
78113
78550
  if (schema)
78114
78551
  copy.schema = schema;
78115
- copy.items = copy.items.map((it) => identity3.isNode(it) || identity3.isPair(it) ? it.clone(schema) : it);
78552
+ copy.items = copy.items.map((it) => identity2.isNode(it) || identity2.isPair(it) ? it.clone(schema) : it);
78116
78553
  if (this.range)
78117
78554
  copy.range = this.range.slice();
78118
78555
  return copy;
@@ -78123,7 +78560,7 @@ var require_Collection3 = __commonJS4((exports) => {
78123
78560
  else {
78124
78561
  const [key, ...rest] = path3;
78125
78562
  const node = this.get(key, true);
78126
- if (identity3.isCollection(node))
78563
+ if (identity2.isCollection(node))
78127
78564
  node.addIn(rest, value);
78128
78565
  else if (node === undefined && this.schema)
78129
78566
  this.set(key, collectionFromPath(this.schema, rest, value));
@@ -78136,7 +78573,7 @@ var require_Collection3 = __commonJS4((exports) => {
78136
78573
  if (rest.length === 0)
78137
78574
  return this.delete(key);
78138
78575
  const node = this.get(key, true);
78139
- if (identity3.isCollection(node))
78576
+ if (identity2.isCollection(node))
78140
78577
  return node.deleteIn(rest);
78141
78578
  else
78142
78579
  throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
@@ -78145,16 +78582,16 @@ var require_Collection3 = __commonJS4((exports) => {
78145
78582
  const [key, ...rest] = path3;
78146
78583
  const node = this.get(key, true);
78147
78584
  if (rest.length === 0)
78148
- return !keepScalar && identity3.isScalar(node) ? node.value : node;
78585
+ return !keepScalar && identity2.isScalar(node) ? node.value : node;
78149
78586
  else
78150
- return identity3.isCollection(node) ? node.getIn(rest, keepScalar) : undefined;
78587
+ return identity2.isCollection(node) ? node.getIn(rest, keepScalar) : undefined;
78151
78588
  }
78152
78589
  hasAllNullValues(allowScalar) {
78153
78590
  return this.items.every((node) => {
78154
- if (!identity3.isPair(node))
78591
+ if (!identity2.isPair(node))
78155
78592
  return false;
78156
78593
  const n2 = node.value;
78157
- return n2 == null || allowScalar && identity3.isScalar(n2) && n2.value == null && !n2.commentBefore && !n2.comment && !n2.tag;
78594
+ return n2 == null || allowScalar && identity2.isScalar(n2) && n2.value == null && !n2.commentBefore && !n2.comment && !n2.tag;
78158
78595
  });
78159
78596
  }
78160
78597
  hasIn(path3) {
@@ -78162,7 +78599,7 @@ var require_Collection3 = __commonJS4((exports) => {
78162
78599
  if (rest.length === 0)
78163
78600
  return this.has(key);
78164
78601
  const node = this.get(key, true);
78165
- return identity3.isCollection(node) ? node.hasIn(rest) : false;
78602
+ return identity2.isCollection(node) ? node.hasIn(rest) : false;
78166
78603
  }
78167
78604
  setIn(path3, value) {
78168
78605
  const [key, ...rest] = path3;
@@ -78170,7 +78607,7 @@ var require_Collection3 = __commonJS4((exports) => {
78170
78607
  this.set(key, value);
78171
78608
  } else {
78172
78609
  const node = this.get(key, true);
78173
- if (identity3.isCollection(node))
78610
+ if (identity2.isCollection(node))
78174
78611
  node.setIn(rest, value);
78175
78612
  else if (node === undefined && this.schema)
78176
78613
  this.set(key, collectionFromPath(this.schema, rest, value));
@@ -78334,7 +78771,7 @@ ${indent}${text.slice(fold + 1, end2)}`;
78334
78771
  exports.foldFlowLines = foldFlowLines;
78335
78772
  });
78336
78773
  var require_stringifyString3 = __commonJS4((exports) => {
78337
- var Scalar3 = require_Scalar3();
78774
+ var Scalar2 = require_Scalar3();
78338
78775
  var foldFlowLines = require_foldFlowLines3();
78339
78776
  var getFoldOptions = (ctx, isBlock) => ({
78340
78777
  indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,
@@ -78485,7 +78922,7 @@ ${indent}`) + "'";
78485
78922
  return quotedString(value, ctx);
78486
78923
  }
78487
78924
  const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? " " : "");
78488
- const literal = blockQuote === "literal" ? true : blockQuote === "folded" || type === Scalar3.Scalar.BLOCK_FOLDED ? false : type === Scalar3.Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length);
78925
+ const literal = blockQuote === "literal" ? true : blockQuote === "folded" || type === Scalar2.Scalar.BLOCK_FOLDED ? false : type === Scalar2.Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length);
78489
78926
  if (!value)
78490
78927
  return literal ? `|
78491
78928
  ` : `>
@@ -78547,7 +78984,7 @@ ${indent}`) + "'";
78547
78984
  $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent}`);
78548
78985
  let literalFallback = false;
78549
78986
  const foldOptions = getFoldOptions(ctx, true);
78550
- if (blockQuote !== "folded" && type !== Scalar3.Scalar.BLOCK_FOLDED) {
78987
+ if (blockQuote !== "folded" && type !== Scalar2.Scalar.BLOCK_FOLDED) {
78551
78988
  foldOptions.onOverflow = () => {
78552
78989
  literalFallback = true;
78553
78990
  };
@@ -78572,7 +79009,7 @@ ${indent}${start}${value}${end}`;
78572
79009
  return implicitKey || inFlow || !value.includes(`
78573
79010
  `) ? quotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep);
78574
79011
  }
78575
- if (!implicitKey && !inFlow && type !== Scalar3.Scalar.PLAIN && value.includes(`
79012
+ if (!implicitKey && !inFlow && type !== Scalar2.Scalar.PLAIN && value.includes(`
78576
79013
  `)) {
78577
79014
  return blockString(item, ctx, onComment, onChompKeep);
78578
79015
  }
@@ -78598,20 +79035,20 @@ ${indent}`);
78598
79035
  const { implicitKey, inFlow } = ctx;
78599
79036
  const ss = typeof item.value === "string" ? item : Object.assign({}, item, { value: String(item.value) });
78600
79037
  let { type } = item;
78601
- if (type !== Scalar3.Scalar.QUOTE_DOUBLE) {
79038
+ if (type !== Scalar2.Scalar.QUOTE_DOUBLE) {
78602
79039
  if (/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value))
78603
- type = Scalar3.Scalar.QUOTE_DOUBLE;
79040
+ type = Scalar2.Scalar.QUOTE_DOUBLE;
78604
79041
  }
78605
79042
  const _stringify = (_type) => {
78606
79043
  switch (_type) {
78607
- case Scalar3.Scalar.BLOCK_FOLDED:
78608
- case Scalar3.Scalar.BLOCK_LITERAL:
79044
+ case Scalar2.Scalar.BLOCK_FOLDED:
79045
+ case Scalar2.Scalar.BLOCK_LITERAL:
78609
79046
  return implicitKey || inFlow ? quotedString(ss.value, ctx) : blockString(ss, ctx, onComment, onChompKeep);
78610
- case Scalar3.Scalar.QUOTE_DOUBLE:
79047
+ case Scalar2.Scalar.QUOTE_DOUBLE:
78611
79048
  return doubleQuotedString(ss.value, ctx);
78612
- case Scalar3.Scalar.QUOTE_SINGLE:
79049
+ case Scalar2.Scalar.QUOTE_SINGLE:
78613
79050
  return singleQuotedString(ss.value, ctx);
78614
- case Scalar3.Scalar.PLAIN:
79051
+ case Scalar2.Scalar.PLAIN:
78615
79052
  return plainString(ss, ctx, onComment, onChompKeep);
78616
79053
  default:
78617
79054
  return null;
@@ -78631,7 +79068,7 @@ ${indent}`);
78631
79068
  });
78632
79069
  var require_stringify3 = __commonJS4((exports) => {
78633
79070
  var anchors = require_anchors3();
78634
- var identity3 = require_identity4();
79071
+ var identity2 = require_identity4();
78635
79072
  var stringifyComment = require_stringifyComment3();
78636
79073
  var stringifyString = require_stringifyString3();
78637
79074
  function createStringifyContext(doc, options) {
@@ -78683,7 +79120,7 @@ var require_stringify3 = __commonJS4((exports) => {
78683
79120
  }
78684
79121
  let tagObj = undefined;
78685
79122
  let obj;
78686
- if (identity3.isScalar(item)) {
79123
+ if (identity2.isScalar(item)) {
78687
79124
  obj = item.value;
78688
79125
  let match = tags.filter((t2) => t2.identify?.(obj));
78689
79126
  if (match.length > 1) {
@@ -78706,7 +79143,7 @@ var require_stringify3 = __commonJS4((exports) => {
78706
79143
  if (!doc.directives)
78707
79144
  return "";
78708
79145
  const props = [];
78709
- const anchor = (identity3.isScalar(node) || identity3.isCollection(node)) && node.anchor;
79146
+ const anchor = (identity2.isScalar(node) || identity2.isCollection(node)) && node.anchor;
78710
79147
  if (anchor && anchors.anchorIsValid(anchor)) {
78711
79148
  anchors$1.add(anchor);
78712
79149
  props.push(`&${anchor}`);
@@ -78717,9 +79154,9 @@ var require_stringify3 = __commonJS4((exports) => {
78717
79154
  return props.join(" ");
78718
79155
  }
78719
79156
  function stringify(item, ctx, onComment, onChompKeep) {
78720
- if (identity3.isPair(item))
79157
+ if (identity2.isPair(item))
78721
79158
  return item.toString(ctx, onComment, onChompKeep);
78722
- if (identity3.isAlias(item)) {
79159
+ if (identity2.isAlias(item)) {
78723
79160
  if (ctx.doc.directives)
78724
79161
  return item.toString(ctx);
78725
79162
  if (ctx.resolvedAliases?.has(item)) {
@@ -78733,38 +79170,38 @@ var require_stringify3 = __commonJS4((exports) => {
78733
79170
  }
78734
79171
  }
78735
79172
  let tagObj = undefined;
78736
- const node = identity3.isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o3) => tagObj = o3 });
79173
+ const node = identity2.isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o3) => tagObj = o3 });
78737
79174
  tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));
78738
79175
  const props = stringifyProps(node, tagObj, ctx);
78739
79176
  if (props.length > 0)
78740
79177
  ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
78741
- const str = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : identity3.isScalar(node) ? stringifyString.stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep);
79178
+ const str = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : identity2.isScalar(node) ? stringifyString.stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep);
78742
79179
  if (!props)
78743
79180
  return str;
78744
- return identity3.isScalar(node) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props}
79181
+ return identity2.isScalar(node) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props}
78745
79182
  ${ctx.indent}${str}`;
78746
79183
  }
78747
79184
  exports.createStringifyContext = createStringifyContext;
78748
79185
  exports.stringify = stringify;
78749
79186
  });
78750
79187
  var require_stringifyPair3 = __commonJS4((exports) => {
78751
- var identity3 = require_identity4();
78752
- var Scalar3 = require_Scalar3();
79188
+ var identity2 = require_identity4();
79189
+ var Scalar2 = require_Scalar3();
78753
79190
  var stringify = require_stringify3();
78754
79191
  var stringifyComment = require_stringifyComment3();
78755
79192
  function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
78756
79193
  const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
78757
- let keyComment = identity3.isNode(key) && key.comment || null;
79194
+ let keyComment = identity2.isNode(key) && key.comment || null;
78758
79195
  if (simpleKeys) {
78759
79196
  if (keyComment) {
78760
79197
  throw new Error("With simple keys, key nodes cannot have comments");
78761
79198
  }
78762
- if (identity3.isCollection(key) || !identity3.isNode(key) && typeof key === "object") {
79199
+ if (identity2.isCollection(key) || !identity2.isNode(key) && typeof key === "object") {
78763
79200
  const msg = "With simple keys, collection cannot be used as a key value";
78764
79201
  throw new Error(msg);
78765
79202
  }
78766
79203
  }
78767
- let explicitKey = !simpleKeys && (!key || keyComment && value == null && !ctx.inFlow || identity3.isCollection(key) || (identity3.isScalar(key) ? key.type === Scalar3.Scalar.BLOCK_FOLDED || key.type === Scalar3.Scalar.BLOCK_LITERAL : typeof key === "object"));
79204
+ let explicitKey = !simpleKeys && (!key || keyComment && value == null && !ctx.inFlow || identity2.isCollection(key) || (identity2.isScalar(key) ? key.type === Scalar2.Scalar.BLOCK_FOLDED || key.type === Scalar2.Scalar.BLOCK_LITERAL : typeof key === "object"));
78768
79205
  ctx = Object.assign({}, ctx, {
78769
79206
  allNullValues: false,
78770
79207
  implicitKey: !explicitKey && (simpleKeys || !allNullValues),
@@ -78805,7 +79242,7 @@ ${indent}:`;
78805
79242
  str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));
78806
79243
  }
78807
79244
  let vsb, vcb, valueComment;
78808
- if (identity3.isNode(value)) {
79245
+ if (identity2.isNode(value)) {
78809
79246
  vsb = !!value.spaceBefore;
78810
79247
  vcb = value.commentBefore;
78811
79248
  valueComment = value.comment;
@@ -78817,10 +79254,10 @@ ${indent}:`;
78817
79254
  value = doc.createNode(value);
78818
79255
  }
78819
79256
  ctx.implicitKey = false;
78820
- if (!explicitKey && !keyComment && identity3.isScalar(value))
79257
+ if (!explicitKey && !keyComment && identity2.isScalar(value))
78821
79258
  ctx.indentAtStart = str.length + 1;
78822
79259
  chompKeep = false;
78823
- if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && identity3.isSeq(value) && !value.flow && !value.tag && !value.anchor) {
79260
+ if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && identity2.isSeq(value) && !value.flow && !value.tag && !value.anchor) {
78824
79261
  ctx.indent = ctx.indent.substring(2);
78825
79262
  }
78826
79263
  let valueCommentDone = false;
@@ -78844,7 +79281,7 @@ ${stringifyComment.indentComment(cs, ctx.indent)}`;
78844
79281
  ws += `
78845
79282
  ${ctx.indent}`;
78846
79283
  }
78847
- } else if (!explicitKey && identity3.isCollection(value)) {
79284
+ } else if (!explicitKey && identity2.isCollection(value)) {
78848
79285
  const vs0 = valueStr[0];
78849
79286
  const nl0 = valueStr.indexOf(`
78850
79287
  `);
@@ -78899,23 +79336,23 @@ var require_log4 = __commonJS4((exports) => {
78899
79336
  exports.warn = warn;
78900
79337
  });
78901
79338
  var require_merge5 = __commonJS4((exports) => {
78902
- var identity3 = require_identity4();
78903
- var Scalar3 = require_Scalar3();
79339
+ var identity2 = require_identity4();
79340
+ var Scalar2 = require_Scalar3();
78904
79341
  var MERGE_KEY = "<<";
78905
79342
  var merge = {
78906
79343
  identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
78907
79344
  default: "key",
78908
79345
  tag: "tag:yaml.org,2002:merge",
78909
79346
  test: /^<<$/,
78910
- resolve: () => Object.assign(new Scalar3.Scalar(Symbol(MERGE_KEY)), {
79347
+ resolve: () => Object.assign(new Scalar2.Scalar(Symbol(MERGE_KEY)), {
78911
79348
  addToJSMap: addMergeToJSMap
78912
79349
  }),
78913
79350
  stringify: () => MERGE_KEY
78914
79351
  };
78915
- var isMergeKey = (ctx, key) => (merge.identify(key) || identity3.isScalar(key) && (!key.type || key.type === Scalar3.Scalar.PLAIN) && merge.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default);
79352
+ var isMergeKey = (ctx, key) => (merge.identify(key) || identity2.isScalar(key) && (!key.type || key.type === Scalar2.Scalar.PLAIN) && merge.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default);
78916
79353
  function addMergeToJSMap(ctx, map8, value) {
78917
- value = ctx && identity3.isAlias(value) ? value.resolve(ctx.doc) : value;
78918
- if (identity3.isSeq(value))
79354
+ value = ctx && identity2.isAlias(value) ? value.resolve(ctx.doc) : value;
79355
+ if (identity2.isSeq(value))
78919
79356
  for (const it of value.items)
78920
79357
  mergeValue(ctx, map8, it);
78921
79358
  else if (Array.isArray(value))
@@ -78925,8 +79362,8 @@ var require_merge5 = __commonJS4((exports) => {
78925
79362
  mergeValue(ctx, map8, value);
78926
79363
  }
78927
79364
  function mergeValue(ctx, map8, value) {
78928
- const source = ctx && identity3.isAlias(value) ? value.resolve(ctx.doc) : value;
78929
- if (!identity3.isMap(source))
79365
+ const source = ctx && identity2.isAlias(value) ? value.resolve(ctx.doc) : value;
79366
+ if (!identity2.isMap(source))
78930
79367
  throw new Error("Merge sources must be maps or map aliases");
78931
79368
  const srcMap = source.toJSON(null, ctx, Map);
78932
79369
  for (const [key, value2] of srcMap) {
@@ -78954,10 +79391,10 @@ var require_addPairToJSMap3 = __commonJS4((exports) => {
78954
79391
  var log = require_log4();
78955
79392
  var merge = require_merge5();
78956
79393
  var stringify = require_stringify3();
78957
- var identity3 = require_identity4();
79394
+ var identity2 = require_identity4();
78958
79395
  var toJS = require_toJS3();
78959
79396
  function addPairToJSMap(ctx, map8, { key, value }) {
78960
- if (identity3.isNode(key) && key.addToJSMap)
79397
+ if (identity2.isNode(key) && key.addToJSMap)
78961
79398
  key.addToJSMap(ctx, map8, value);
78962
79399
  else if (merge.isMergeKey(ctx, key))
78963
79400
  merge.addMergeToJSMap(ctx, map8, value);
@@ -78988,7 +79425,7 @@ var require_addPairToJSMap3 = __commonJS4((exports) => {
78988
79425
  return "";
78989
79426
  if (typeof jsKey !== "object")
78990
79427
  return String(jsKey);
78991
- if (identity3.isNode(key) && ctx?.doc) {
79428
+ if (identity2.isNode(key) && ctx?.doc) {
78992
79429
  const strCtx = stringify.createStringifyContext(ctx.doc, {});
78993
79430
  strCtx.anchors = new Set;
78994
79431
  for (const node of ctx.anchors.keys())
@@ -79013,26 +79450,26 @@ var require_Pair3 = __commonJS4((exports) => {
79013
79450
  var createNode = require_createNode3();
79014
79451
  var stringifyPair = require_stringifyPair3();
79015
79452
  var addPairToJSMap = require_addPairToJSMap3();
79016
- var identity3 = require_identity4();
79453
+ var identity2 = require_identity4();
79017
79454
  function createPair(key, value, ctx) {
79018
79455
  const k2 = createNode.createNode(key, undefined, ctx);
79019
79456
  const v2 = createNode.createNode(value, undefined, ctx);
79020
- return new Pair3(k2, v2);
79457
+ return new Pair2(k2, v2);
79021
79458
  }
79022
79459
 
79023
- class Pair3 {
79460
+ class Pair2 {
79024
79461
  constructor(key, value = null) {
79025
- Object.defineProperty(this, identity3.NODE_TYPE, { value: identity3.PAIR });
79462
+ Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
79026
79463
  this.key = key;
79027
79464
  this.value = value;
79028
79465
  }
79029
79466
  clone(schema) {
79030
79467
  let { key, value } = this;
79031
- if (identity3.isNode(key))
79468
+ if (identity2.isNode(key))
79032
79469
  key = key.clone(schema);
79033
- if (identity3.isNode(value))
79470
+ if (identity2.isNode(value))
79034
79471
  value = value.clone(schema);
79035
- return new Pair3(key, value);
79472
+ return new Pair2(key, value);
79036
79473
  }
79037
79474
  toJSON(_3, ctx) {
79038
79475
  const pair = ctx?.mapAsMap ? new Map : {};
@@ -79042,11 +79479,11 @@ var require_Pair3 = __commonJS4((exports) => {
79042
79479
  return ctx?.doc ? stringifyPair.stringifyPair(this, ctx, onComment, onChompKeep) : JSON.stringify(this);
79043
79480
  }
79044
79481
  }
79045
- exports.Pair = Pair3;
79482
+ exports.Pair = Pair2;
79046
79483
  exports.createPair = createPair;
79047
79484
  });
79048
79485
  var require_stringifyCollection3 = __commonJS4((exports) => {
79049
- var identity3 = require_identity4();
79486
+ var identity2 = require_identity4();
79050
79487
  var stringify = require_stringify3();
79051
79488
  var stringifyComment = require_stringifyComment3();
79052
79489
  function stringifyCollection(collection, ctx, options) {
@@ -79062,14 +79499,14 @@ var require_stringifyCollection3 = __commonJS4((exports) => {
79062
79499
  for (let i2 = 0;i2 < items.length; ++i2) {
79063
79500
  const item = items[i2];
79064
79501
  let comment2 = null;
79065
- if (identity3.isNode(item)) {
79502
+ if (identity2.isNode(item)) {
79066
79503
  if (!chompKeep && item.spaceBefore)
79067
79504
  lines.push("");
79068
79505
  addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
79069
79506
  if (item.comment)
79070
79507
  comment2 = item.comment;
79071
- } else if (identity3.isPair(item)) {
79072
- const ik = identity3.isNode(item.key) ? item.key : null;
79508
+ } else if (identity2.isPair(item)) {
79509
+ const ik = identity2.isNode(item.key) ? item.key : null;
79073
79510
  if (ik) {
79074
79511
  if (!chompKeep && ik.spaceBefore)
79075
79512
  lines.push("");
@@ -79119,14 +79556,14 @@ ${indent}${line}` : `
79119
79556
  for (let i2 = 0;i2 < items.length; ++i2) {
79120
79557
  const item = items[i2];
79121
79558
  let comment = null;
79122
- if (identity3.isNode(item)) {
79559
+ if (identity2.isNode(item)) {
79123
79560
  if (item.spaceBefore)
79124
79561
  lines.push("");
79125
79562
  addCommentBefore(ctx, lines, item.commentBefore, false);
79126
79563
  if (item.comment)
79127
79564
  comment = item.comment;
79128
- } else if (identity3.isPair(item)) {
79129
- const ik = identity3.isNode(item.key) ? item.key : null;
79565
+ } else if (identity2.isPair(item)) {
79566
+ const ik = identity2.isNode(item.key) ? item.key : null;
79130
79567
  if (ik) {
79131
79568
  if (ik.spaceBefore)
79132
79569
  lines.push("");
@@ -79134,7 +79571,7 @@ ${indent}${line}` : `
79134
79571
  if (ik.comment)
79135
79572
  reqNewline = true;
79136
79573
  }
79137
- const iv = identity3.isNode(item.value) ? item.value : null;
79574
+ const iv = identity2.isNode(item.value) ? item.value : null;
79138
79575
  if (iv) {
79139
79576
  if (iv.comment)
79140
79577
  comment = iv.comment;
@@ -79192,28 +79629,28 @@ var require_YAMLMap3 = __commonJS4((exports) => {
79192
79629
  var stringifyCollection = require_stringifyCollection3();
79193
79630
  var addPairToJSMap = require_addPairToJSMap3();
79194
79631
  var Collection = require_Collection3();
79195
- var identity3 = require_identity4();
79196
- var Pair3 = require_Pair3();
79197
- var Scalar3 = require_Scalar3();
79632
+ var identity2 = require_identity4();
79633
+ var Pair2 = require_Pair3();
79634
+ var Scalar2 = require_Scalar3();
79198
79635
  function findPair(items, key) {
79199
- const k2 = identity3.isScalar(key) ? key.value : key;
79636
+ const k2 = identity2.isScalar(key) ? key.value : key;
79200
79637
  for (const it of items) {
79201
- if (identity3.isPair(it)) {
79638
+ if (identity2.isPair(it)) {
79202
79639
  if (it.key === key || it.key === k2)
79203
79640
  return it;
79204
- if (identity3.isScalar(it.key) && it.key.value === k2)
79641
+ if (identity2.isScalar(it.key) && it.key.value === k2)
79205
79642
  return it;
79206
79643
  }
79207
79644
  }
79208
79645
  return;
79209
79646
  }
79210
79647
 
79211
- class YAMLMap3 extends Collection.Collection {
79648
+ class YAMLMap2 extends Collection.Collection {
79212
79649
  static get tagName() {
79213
79650
  return "tag:yaml.org,2002:map";
79214
79651
  }
79215
79652
  constructor(schema) {
79216
- super(identity3.MAP, schema);
79653
+ super(identity2.MAP, schema);
79217
79654
  this.items = [];
79218
79655
  }
79219
79656
  static from(schema, obj, ctx) {
@@ -79225,7 +79662,7 @@ var require_YAMLMap3 = __commonJS4((exports) => {
79225
79662
  else if (Array.isArray(replacer) && !replacer.includes(key))
79226
79663
  return;
79227
79664
  if (value !== undefined || keepUndefined)
79228
- map8.items.push(Pair3.createPair(key, value, ctx));
79665
+ map8.items.push(Pair2.createPair(key, value, ctx));
79229
79666
  };
79230
79667
  if (obj instanceof Map) {
79231
79668
  for (const [key, value] of obj)
@@ -79241,18 +79678,18 @@ var require_YAMLMap3 = __commonJS4((exports) => {
79241
79678
  }
79242
79679
  add(pair, overwrite) {
79243
79680
  let _pair;
79244
- if (identity3.isPair(pair))
79681
+ if (identity2.isPair(pair))
79245
79682
  _pair = pair;
79246
79683
  else if (!pair || typeof pair !== "object" || !("key" in pair)) {
79247
- _pair = new Pair3.Pair(pair, pair?.value);
79684
+ _pair = new Pair2.Pair(pair, pair?.value);
79248
79685
  } else
79249
- _pair = new Pair3.Pair(pair.key, pair.value);
79686
+ _pair = new Pair2.Pair(pair.key, pair.value);
79250
79687
  const prev = findPair(this.items, _pair.key);
79251
79688
  const sortEntries = this.schema?.sortMapEntries;
79252
79689
  if (prev) {
79253
79690
  if (!overwrite)
79254
79691
  throw new Error(`Key ${_pair.key} already set`);
79255
- if (identity3.isScalar(prev.value) && Scalar3.isScalarValue(_pair.value))
79692
+ if (identity2.isScalar(prev.value) && Scalar2.isScalarValue(_pair.value))
79256
79693
  prev.value.value = _pair.value;
79257
79694
  else
79258
79695
  prev.value = _pair.value;
@@ -79276,13 +79713,13 @@ var require_YAMLMap3 = __commonJS4((exports) => {
79276
79713
  get(key, keepScalar) {
79277
79714
  const it = findPair(this.items, key);
79278
79715
  const node = it?.value;
79279
- return (!keepScalar && identity3.isScalar(node) ? node.value : node) ?? undefined;
79716
+ return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? undefined;
79280
79717
  }
79281
79718
  has(key) {
79282
79719
  return !!findPair(this.items, key);
79283
79720
  }
79284
79721
  set(key, value) {
79285
- this.add(new Pair3.Pair(key, value), true);
79722
+ this.add(new Pair2.Pair(key, value), true);
79286
79723
  }
79287
79724
  toJSON(_3, ctx, Type) {
79288
79725
  const map8 = Type ? new Type : ctx?.mapAsMap ? new Map : {};
@@ -79296,7 +79733,7 @@ var require_YAMLMap3 = __commonJS4((exports) => {
79296
79733
  if (!ctx)
79297
79734
  return JSON.stringify(this);
79298
79735
  for (const item of this.items) {
79299
- if (!identity3.isPair(item))
79736
+ if (!identity2.isPair(item))
79300
79737
  throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);
79301
79738
  }
79302
79739
  if (!ctx.allNullValues && this.hasAllNullValues(false))
@@ -79310,23 +79747,23 @@ var require_YAMLMap3 = __commonJS4((exports) => {
79310
79747
  });
79311
79748
  }
79312
79749
  }
79313
- exports.YAMLMap = YAMLMap3;
79750
+ exports.YAMLMap = YAMLMap2;
79314
79751
  exports.findPair = findPair;
79315
79752
  });
79316
79753
  var require_map4 = __commonJS4((exports) => {
79317
- var identity3 = require_identity4();
79318
- var YAMLMap3 = require_YAMLMap3();
79754
+ var identity2 = require_identity4();
79755
+ var YAMLMap2 = require_YAMLMap3();
79319
79756
  var map8 = {
79320
79757
  collection: "map",
79321
79758
  default: true,
79322
- nodeClass: YAMLMap3.YAMLMap,
79759
+ nodeClass: YAMLMap2.YAMLMap,
79323
79760
  tag: "tag:yaml.org,2002:map",
79324
79761
  resolve(map22, onError) {
79325
- if (!identity3.isMap(map22))
79762
+ if (!identity2.isMap(map22))
79326
79763
  onError("Expected a mapping for this tag");
79327
79764
  return map22;
79328
79765
  },
79329
- createNode: (schema, obj, ctx) => YAMLMap3.YAMLMap.from(schema, obj, ctx)
79766
+ createNode: (schema, obj, ctx) => YAMLMap2.YAMLMap.from(schema, obj, ctx)
79330
79767
  };
79331
79768
  exports.map = map8;
79332
79769
  });
@@ -79334,16 +79771,16 @@ var require_YAMLSeq3 = __commonJS4((exports) => {
79334
79771
  var createNode = require_createNode3();
79335
79772
  var stringifyCollection = require_stringifyCollection3();
79336
79773
  var Collection = require_Collection3();
79337
- var identity3 = require_identity4();
79338
- var Scalar3 = require_Scalar3();
79774
+ var identity2 = require_identity4();
79775
+ var Scalar2 = require_Scalar3();
79339
79776
  var toJS = require_toJS3();
79340
79777
 
79341
- class YAMLSeq3 extends Collection.Collection {
79778
+ class YAMLSeq2 extends Collection.Collection {
79342
79779
  static get tagName() {
79343
79780
  return "tag:yaml.org,2002:seq";
79344
79781
  }
79345
79782
  constructor(schema) {
79346
- super(identity3.SEQ, schema);
79783
+ super(identity2.SEQ, schema);
79347
79784
  this.items = [];
79348
79785
  }
79349
79786
  add(value) {
@@ -79361,7 +79798,7 @@ var require_YAMLSeq3 = __commonJS4((exports) => {
79361
79798
  if (typeof idx !== "number")
79362
79799
  return;
79363
79800
  const it = this.items[idx];
79364
- return !keepScalar && identity3.isScalar(it) ? it.value : it;
79801
+ return !keepScalar && identity2.isScalar(it) ? it.value : it;
79365
79802
  }
79366
79803
  has(key) {
79367
79804
  const idx = asItemIndex(key);
@@ -79372,7 +79809,7 @@ var require_YAMLSeq3 = __commonJS4((exports) => {
79372
79809
  if (typeof idx !== "number")
79373
79810
  throw new Error(`Expected a valid index, not ${key}.`);
79374
79811
  const prev = this.items[idx];
79375
- if (identity3.isScalar(prev) && Scalar3.isScalarValue(value))
79812
+ if (identity2.isScalar(prev) && Scalar2.isScalarValue(value))
79376
79813
  prev.value = value;
79377
79814
  else
79378
79815
  this.items[idx] = value;
@@ -79414,27 +79851,27 @@ var require_YAMLSeq3 = __commonJS4((exports) => {
79414
79851
  }
79415
79852
  }
79416
79853
  function asItemIndex(key) {
79417
- let idx = identity3.isScalar(key) ? key.value : key;
79854
+ let idx = identity2.isScalar(key) ? key.value : key;
79418
79855
  if (idx && typeof idx === "string")
79419
79856
  idx = Number(idx);
79420
79857
  return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
79421
79858
  }
79422
- exports.YAMLSeq = YAMLSeq3;
79859
+ exports.YAMLSeq = YAMLSeq2;
79423
79860
  });
79424
79861
  var require_seq3 = __commonJS4((exports) => {
79425
- var identity3 = require_identity4();
79426
- var YAMLSeq3 = require_YAMLSeq3();
79862
+ var identity2 = require_identity4();
79863
+ var YAMLSeq2 = require_YAMLSeq3();
79427
79864
  var seq = {
79428
79865
  collection: "seq",
79429
79866
  default: true,
79430
- nodeClass: YAMLSeq3.YAMLSeq,
79867
+ nodeClass: YAMLSeq2.YAMLSeq,
79431
79868
  tag: "tag:yaml.org,2002:seq",
79432
79869
  resolve(seq2, onError) {
79433
- if (!identity3.isSeq(seq2))
79870
+ if (!identity2.isSeq(seq2))
79434
79871
  onError("Expected a sequence for this tag");
79435
79872
  return seq2;
79436
79873
  },
79437
- createNode: (schema, obj, ctx) => YAMLSeq3.YAMLSeq.from(schema, obj, ctx)
79874
+ createNode: (schema, obj, ctx) => YAMLSeq2.YAMLSeq.from(schema, obj, ctx)
79438
79875
  };
79439
79876
  exports.seq = seq;
79440
79877
  });
@@ -79453,26 +79890,26 @@ var require_string3 = __commonJS4((exports) => {
79453
79890
  exports.string = string;
79454
79891
  });
79455
79892
  var require_null3 = __commonJS4((exports) => {
79456
- var Scalar3 = require_Scalar3();
79893
+ var Scalar2 = require_Scalar3();
79457
79894
  var nullTag = {
79458
79895
  identify: (value) => value == null,
79459
- createNode: () => new Scalar3.Scalar(null),
79896
+ createNode: () => new Scalar2.Scalar(null),
79460
79897
  default: true,
79461
79898
  tag: "tag:yaml.org,2002:null",
79462
79899
  test: /^(?:~|[Nn]ull|NULL)?$/,
79463
- resolve: () => new Scalar3.Scalar(null),
79900
+ resolve: () => new Scalar2.Scalar(null),
79464
79901
  stringify: ({ source }, ctx) => typeof source === "string" && nullTag.test.test(source) ? source : ctx.options.nullStr
79465
79902
  };
79466
79903
  exports.nullTag = nullTag;
79467
79904
  });
79468
79905
  var require_bool4 = __commonJS4((exports) => {
79469
- var Scalar3 = require_Scalar3();
79906
+ var Scalar2 = require_Scalar3();
79470
79907
  var boolTag = {
79471
79908
  identify: (value) => typeof value === "boolean",
79472
79909
  default: true,
79473
79910
  tag: "tag:yaml.org,2002:bool",
79474
79911
  test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
79475
- resolve: (str) => new Scalar3.Scalar(str[0] === "t" || str[0] === "T"),
79912
+ resolve: (str) => new Scalar2.Scalar(str[0] === "t" || str[0] === "T"),
79476
79913
  stringify({ source, value }, ctx) {
79477
79914
  if (source && boolTag.test.test(source)) {
79478
79915
  const sv = source[0] === "t" || source[0] === "T";
@@ -79507,7 +79944,7 @@ var require_stringifyNumber3 = __commonJS4((exports) => {
79507
79944
  exports.stringifyNumber = stringifyNumber;
79508
79945
  });
79509
79946
  var require_float4 = __commonJS4((exports) => {
79510
- var Scalar3 = require_Scalar3();
79947
+ var Scalar2 = require_Scalar3();
79511
79948
  var stringifyNumber = require_stringifyNumber3();
79512
79949
  var floatNaN = {
79513
79950
  identify: (value) => typeof value === "number",
@@ -79535,7 +79972,7 @@ var require_float4 = __commonJS4((exports) => {
79535
79972
  tag: "tag:yaml.org,2002:float",
79536
79973
  test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
79537
79974
  resolve(str) {
79538
- const node = new Scalar3.Scalar(parseFloat(str));
79975
+ const node = new Scalar2.Scalar(parseFloat(str));
79539
79976
  const dot = str.indexOf(".");
79540
79977
  if (dot !== -1 && str[str.length - 1] === "0")
79541
79978
  node.minFractionDigits = str.length - dot - 1;
@@ -79611,7 +80048,7 @@ var require_schema5 = __commonJS4((exports) => {
79611
80048
  exports.schema = schema;
79612
80049
  });
79613
80050
  var require_schema23 = __commonJS4((exports) => {
79614
- var Scalar3 = require_Scalar3();
80051
+ var Scalar2 = require_Scalar3();
79615
80052
  var map8 = require_map4();
79616
80053
  var seq = require_seq3();
79617
80054
  function intIdentify(value) {
@@ -79628,7 +80065,7 @@ var require_schema23 = __commonJS4((exports) => {
79628
80065
  },
79629
80066
  {
79630
80067
  identify: (value) => value == null,
79631
- createNode: () => new Scalar3.Scalar(null),
80068
+ createNode: () => new Scalar2.Scalar(null),
79632
80069
  default: true,
79633
80070
  tag: "tag:yaml.org,2002:null",
79634
80071
  test: /^null$/,
@@ -79674,7 +80111,7 @@ var require_schema23 = __commonJS4((exports) => {
79674
80111
  });
79675
80112
  var require_binary3 = __commonJS4((exports) => {
79676
80113
  var node_buffer = __require4("buffer");
79677
- var Scalar3 = require_Scalar3();
80114
+ var Scalar2 = require_Scalar3();
79678
80115
  var stringifyString = require_stringifyString3();
79679
80116
  var binary = {
79680
80117
  identify: (value) => value instanceof Uint8Array,
@@ -79709,15 +80146,15 @@ var require_binary3 = __commonJS4((exports) => {
79709
80146
  } else {
79710
80147
  throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
79711
80148
  }
79712
- type ?? (type = Scalar3.Scalar.BLOCK_LITERAL);
79713
- if (type !== Scalar3.Scalar.QUOTE_DOUBLE) {
80149
+ type ?? (type = Scalar2.Scalar.BLOCK_LITERAL);
80150
+ if (type !== Scalar2.Scalar.QUOTE_DOUBLE) {
79714
80151
  const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
79715
80152
  const n2 = Math.ceil(str.length / lineWidth);
79716
80153
  const lines = new Array(n2);
79717
80154
  for (let i2 = 0, o3 = 0;i2 < n2; ++i2, o3 += lineWidth) {
79718
80155
  lines[i2] = str.substr(o3, lineWidth);
79719
80156
  }
79720
- str = lines.join(type === Scalar3.Scalar.BLOCK_LITERAL ? `
80157
+ str = lines.join(type === Scalar2.Scalar.BLOCK_LITERAL ? `
79721
80158
  ` : " ");
79722
80159
  }
79723
80160
  return stringifyString.stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep);
@@ -79726,20 +80163,20 @@ var require_binary3 = __commonJS4((exports) => {
79726
80163
  exports.binary = binary;
79727
80164
  });
79728
80165
  var require_pairs4 = __commonJS4((exports) => {
79729
- var identity3 = require_identity4();
79730
- var Pair3 = require_Pair3();
79731
- var Scalar3 = require_Scalar3();
79732
- var YAMLSeq3 = require_YAMLSeq3();
80166
+ var identity2 = require_identity4();
80167
+ var Pair2 = require_Pair3();
80168
+ var Scalar2 = require_Scalar3();
80169
+ var YAMLSeq2 = require_YAMLSeq3();
79733
80170
  function resolvePairs(seq, onError) {
79734
- if (identity3.isSeq(seq)) {
80171
+ if (identity2.isSeq(seq)) {
79735
80172
  for (let i2 = 0;i2 < seq.items.length; ++i2) {
79736
80173
  let item = seq.items[i2];
79737
- if (identity3.isPair(item))
80174
+ if (identity2.isPair(item))
79738
80175
  continue;
79739
- else if (identity3.isMap(item)) {
80176
+ else if (identity2.isMap(item)) {
79740
80177
  if (item.items.length > 1)
79741
80178
  onError("Each pair must have its own sequence indicator");
79742
- const pair = item.items[0] || new Pair3.Pair(new Scalar3.Scalar(null));
80179
+ const pair = item.items[0] || new Pair2.Pair(new Scalar2.Scalar(null));
79743
80180
  if (item.commentBefore)
79744
80181
  pair.key.commentBefore = pair.key.commentBefore ? `${item.commentBefore}
79745
80182
  ${pair.key.commentBefore}` : item.commentBefore;
@@ -79750,7 +80187,7 @@ ${cn.comment}` : item.comment;
79750
80187
  }
79751
80188
  item = pair;
79752
80189
  }
79753
- seq.items[i2] = identity3.isPair(item) ? item : new Pair3.Pair(item);
80190
+ seq.items[i2] = identity2.isPair(item) ? item : new Pair2.Pair(item);
79754
80191
  }
79755
80192
  } else
79756
80193
  onError("Expected a sequence for this tag");
@@ -79758,7 +80195,7 @@ ${cn.comment}` : item.comment;
79758
80195
  }
79759
80196
  function createPairs(schema, iterable, ctx) {
79760
80197
  const { replacer } = ctx;
79761
- const pairs2 = new YAMLSeq3.YAMLSeq(schema);
80198
+ const pairs2 = new YAMLSeq2.YAMLSeq(schema);
79762
80199
  pairs2.tag = "tag:yaml.org,2002:pairs";
79763
80200
  let i2 = 0;
79764
80201
  if (iterable && Symbol.iterator in Object(iterable))
@@ -79783,7 +80220,7 @@ ${cn.comment}` : item.comment;
79783
80220
  } else {
79784
80221
  key = it;
79785
80222
  }
79786
- pairs2.items.push(Pair3.createPair(key, value, ctx));
80223
+ pairs2.items.push(Pair2.createPair(key, value, ctx));
79787
80224
  }
79788
80225
  return pairs2;
79789
80226
  }
@@ -79799,20 +80236,20 @@ ${cn.comment}` : item.comment;
79799
80236
  exports.resolvePairs = resolvePairs;
79800
80237
  });
79801
80238
  var require_omap3 = __commonJS4((exports) => {
79802
- var identity3 = require_identity4();
80239
+ var identity2 = require_identity4();
79803
80240
  var toJS = require_toJS3();
79804
- var YAMLMap3 = require_YAMLMap3();
79805
- var YAMLSeq3 = require_YAMLSeq3();
80241
+ var YAMLMap2 = require_YAMLMap3();
80242
+ var YAMLSeq2 = require_YAMLSeq3();
79806
80243
  var pairs = require_pairs4();
79807
80244
 
79808
- class YAMLOMap extends YAMLSeq3.YAMLSeq {
80245
+ class YAMLOMap extends YAMLSeq2.YAMLSeq {
79809
80246
  constructor() {
79810
80247
  super();
79811
- this.add = YAMLMap3.YAMLMap.prototype.add.bind(this);
79812
- this.delete = YAMLMap3.YAMLMap.prototype.delete.bind(this);
79813
- this.get = YAMLMap3.YAMLMap.prototype.get.bind(this);
79814
- this.has = YAMLMap3.YAMLMap.prototype.has.bind(this);
79815
- this.set = YAMLMap3.YAMLMap.prototype.set.bind(this);
80248
+ this.add = YAMLMap2.YAMLMap.prototype.add.bind(this);
80249
+ this.delete = YAMLMap2.YAMLMap.prototype.delete.bind(this);
80250
+ this.get = YAMLMap2.YAMLMap.prototype.get.bind(this);
80251
+ this.has = YAMLMap2.YAMLMap.prototype.has.bind(this);
80252
+ this.set = YAMLMap2.YAMLMap.prototype.set.bind(this);
79816
80253
  this.tag = YAMLOMap.tag;
79817
80254
  }
79818
80255
  toJSON(_3, ctx) {
@@ -79823,7 +80260,7 @@ var require_omap3 = __commonJS4((exports) => {
79823
80260
  ctx.onCreate(map8);
79824
80261
  for (const pair of this.items) {
79825
80262
  let key, value;
79826
- if (identity3.isPair(pair)) {
80263
+ if (identity2.isPair(pair)) {
79827
80264
  key = toJS.toJS(pair.key, "", ctx);
79828
80265
  value = toJS.toJS(pair.value, key, ctx);
79829
80266
  } else {
@@ -79853,7 +80290,7 @@ var require_omap3 = __commonJS4((exports) => {
79853
80290
  const pairs$1 = pairs.resolvePairs(seq, onError);
79854
80291
  const seenKeys = [];
79855
80292
  for (const { key } of pairs$1.items) {
79856
- if (identity3.isScalar(key)) {
80293
+ if (identity2.isScalar(key)) {
79857
80294
  if (seenKeys.includes(key.value)) {
79858
80295
  onError(`Ordered maps must not include duplicate keys: ${key.value}`);
79859
80296
  } else {
@@ -79869,7 +80306,7 @@ var require_omap3 = __commonJS4((exports) => {
79869
80306
  exports.omap = omap;
79870
80307
  });
79871
80308
  var require_bool23 = __commonJS4((exports) => {
79872
- var Scalar3 = require_Scalar3();
80309
+ var Scalar2 = require_Scalar3();
79873
80310
  function boolStringify({ value, source }, ctx) {
79874
80311
  const boolObj = value ? trueTag : falseTag;
79875
80312
  if (source && boolObj.test.test(source))
@@ -79881,7 +80318,7 @@ var require_bool23 = __commonJS4((exports) => {
79881
80318
  default: true,
79882
80319
  tag: "tag:yaml.org,2002:bool",
79883
80320
  test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
79884
- resolve: () => new Scalar3.Scalar(true),
80321
+ resolve: () => new Scalar2.Scalar(true),
79885
80322
  stringify: boolStringify
79886
80323
  };
79887
80324
  var falseTag = {
@@ -79889,14 +80326,14 @@ var require_bool23 = __commonJS4((exports) => {
79889
80326
  default: true,
79890
80327
  tag: "tag:yaml.org,2002:bool",
79891
80328
  test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
79892
- resolve: () => new Scalar3.Scalar(false),
80329
+ resolve: () => new Scalar2.Scalar(false),
79893
80330
  stringify: boolStringify
79894
80331
  };
79895
80332
  exports.falseTag = falseTag;
79896
80333
  exports.trueTag = trueTag;
79897
80334
  });
79898
80335
  var require_float23 = __commonJS4((exports) => {
79899
- var Scalar3 = require_Scalar3();
80336
+ var Scalar2 = require_Scalar3();
79900
80337
  var stringifyNumber = require_stringifyNumber3();
79901
80338
  var floatNaN = {
79902
80339
  identify: (value) => typeof value === "number",
@@ -79924,7 +80361,7 @@ var require_float23 = __commonJS4((exports) => {
79924
80361
  tag: "tag:yaml.org,2002:float",
79925
80362
  test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
79926
80363
  resolve(str) {
79927
- const node = new Scalar3.Scalar(parseFloat(str.replace(/_/g, "")));
80364
+ const node = new Scalar2.Scalar(parseFloat(str.replace(/_/g, "")));
79928
80365
  const dot = str.indexOf(".");
79929
80366
  if (dot !== -1) {
79930
80367
  const f3 = str.substring(dot + 1).replace(/_/g, "");
@@ -80014,39 +80451,39 @@ var require_int23 = __commonJS4((exports) => {
80014
80451
  exports.intOct = intOct;
80015
80452
  });
80016
80453
  var require_set3 = __commonJS4((exports) => {
80017
- var identity3 = require_identity4();
80018
- var Pair3 = require_Pair3();
80019
- var YAMLMap3 = require_YAMLMap3();
80454
+ var identity2 = require_identity4();
80455
+ var Pair2 = require_Pair3();
80456
+ var YAMLMap2 = require_YAMLMap3();
80020
80457
 
80021
- class YAMLSet extends YAMLMap3.YAMLMap {
80458
+ class YAMLSet extends YAMLMap2.YAMLMap {
80022
80459
  constructor(schema) {
80023
80460
  super(schema);
80024
80461
  this.tag = YAMLSet.tag;
80025
80462
  }
80026
80463
  add(key) {
80027
80464
  let pair;
80028
- if (identity3.isPair(key))
80465
+ if (identity2.isPair(key))
80029
80466
  pair = key;
80030
80467
  else if (key && typeof key === "object" && "key" in key && "value" in key && key.value === null)
80031
- pair = new Pair3.Pair(key.key, null);
80468
+ pair = new Pair2.Pair(key.key, null);
80032
80469
  else
80033
- pair = new Pair3.Pair(key, null);
80034
- const prev = YAMLMap3.findPair(this.items, pair.key);
80470
+ pair = new Pair2.Pair(key, null);
80471
+ const prev = YAMLMap2.findPair(this.items, pair.key);
80035
80472
  if (!prev)
80036
80473
  this.items.push(pair);
80037
80474
  }
80038
80475
  get(key, keepPair) {
80039
- const pair = YAMLMap3.findPair(this.items, key);
80040
- return !keepPair && identity3.isPair(pair) ? identity3.isScalar(pair.key) ? pair.key.value : pair.key : pair;
80476
+ const pair = YAMLMap2.findPair(this.items, key);
80477
+ return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
80041
80478
  }
80042
80479
  set(key, value) {
80043
80480
  if (typeof value !== "boolean")
80044
80481
  throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);
80045
- const prev = YAMLMap3.findPair(this.items, key);
80482
+ const prev = YAMLMap2.findPair(this.items, key);
80046
80483
  if (prev && !value) {
80047
80484
  this.items.splice(this.items.indexOf(prev), 1);
80048
80485
  } else if (!prev && value) {
80049
- this.items.push(new Pair3.Pair(key));
80486
+ this.items.push(new Pair2.Pair(key));
80050
80487
  }
80051
80488
  }
80052
80489
  toJSON(_3, ctx) {
@@ -80067,7 +80504,7 @@ var require_set3 = __commonJS4((exports) => {
80067
80504
  for (let value of iterable) {
80068
80505
  if (typeof replacer === "function")
80069
80506
  value = replacer.call(iterable, value, value);
80070
- set2.items.push(Pair3.createPair(value, null, ctx));
80507
+ set2.items.push(Pair2.createPair(value, null, ctx));
80071
80508
  }
80072
80509
  return set2;
80073
80510
  }
@@ -80081,7 +80518,7 @@ var require_set3 = __commonJS4((exports) => {
80081
80518
  tag: "tag:yaml.org,2002:set",
80082
80519
  createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx),
80083
80520
  resolve(map8, onError) {
80084
- if (identity3.isMap(map8)) {
80521
+ if (identity2.isMap(map8)) {
80085
80522
  if (map8.hasAllNullValues(true))
80086
80523
  return Object.assign(new YAMLSet, map8);
80087
80524
  else
@@ -80303,35 +80740,35 @@ var require_tags3 = __commonJS4((exports) => {
80303
80740
  exports.getTags = getTags;
80304
80741
  });
80305
80742
  var require_Schema3 = __commonJS4((exports) => {
80306
- var identity3 = require_identity4();
80743
+ var identity2 = require_identity4();
80307
80744
  var map8 = require_map4();
80308
80745
  var seq = require_seq3();
80309
80746
  var string = require_string3();
80310
80747
  var tags = require_tags3();
80311
80748
  var sortMapEntriesByKey = (a2, b2) => a2.key < b2.key ? -1 : a2.key > b2.key ? 1 : 0;
80312
80749
 
80313
- class Schema3 {
80750
+ class Schema2 {
80314
80751
  constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
80315
80752
  this.compat = Array.isArray(compat) ? tags.getTags(compat, "compat") : compat ? tags.getTags(null, compat) : null;
80316
80753
  this.name = typeof schema === "string" && schema || "core";
80317
80754
  this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
80318
80755
  this.tags = tags.getTags(customTags, this.name, merge);
80319
80756
  this.toStringOptions = toStringDefaults ?? null;
80320
- Object.defineProperty(this, identity3.MAP, { value: map8.map });
80321
- Object.defineProperty(this, identity3.SCALAR, { value: string.string });
80322
- Object.defineProperty(this, identity3.SEQ, { value: seq.seq });
80757
+ Object.defineProperty(this, identity2.MAP, { value: map8.map });
80758
+ Object.defineProperty(this, identity2.SCALAR, { value: string.string });
80759
+ Object.defineProperty(this, identity2.SEQ, { value: seq.seq });
80323
80760
  this.sortMapEntries = typeof sortMapEntries === "function" ? sortMapEntries : sortMapEntries === true ? sortMapEntriesByKey : null;
80324
80761
  }
80325
80762
  clone() {
80326
- const copy = Object.create(Schema3.prototype, Object.getOwnPropertyDescriptors(this));
80763
+ const copy = Object.create(Schema2.prototype, Object.getOwnPropertyDescriptors(this));
80327
80764
  copy.tags = this.tags.slice();
80328
80765
  return copy;
80329
80766
  }
80330
80767
  }
80331
- exports.Schema = Schema3;
80768
+ exports.Schema = Schema2;
80332
80769
  });
80333
80770
  var require_stringifyDocument3 = __commonJS4((exports) => {
80334
- var identity3 = require_identity4();
80771
+ var identity2 = require_identity4();
80335
80772
  var stringify = require_stringify3();
80336
80773
  var stringifyComment = require_stringifyComment3();
80337
80774
  function stringifyDocument(doc, options) {
@@ -80358,7 +80795,7 @@ var require_stringifyDocument3 = __commonJS4((exports) => {
80358
80795
  let chompKeep = false;
80359
80796
  let contentComment = null;
80360
80797
  if (doc.contents) {
80361
- if (identity3.isNode(doc.contents)) {
80798
+ if (identity2.isNode(doc.contents)) {
80362
80799
  if (doc.contents.spaceBefore && hasDirectives)
80363
80800
  lines.push("");
80364
80801
  if (doc.contents.commentBefore) {
@@ -80409,25 +80846,25 @@ var require_stringifyDocument3 = __commonJS4((exports) => {
80409
80846
  exports.stringifyDocument = stringifyDocument;
80410
80847
  });
80411
80848
  var require_Document3 = __commonJS4((exports) => {
80412
- var Alias3 = require_Alias3();
80849
+ var Alias2 = require_Alias3();
80413
80850
  var Collection = require_Collection3();
80414
- var identity3 = require_identity4();
80415
- var Pair3 = require_Pair3();
80851
+ var identity2 = require_identity4();
80852
+ var Pair2 = require_Pair3();
80416
80853
  var toJS = require_toJS3();
80417
- var Schema3 = require_Schema3();
80854
+ var Schema2 = require_Schema3();
80418
80855
  var stringifyDocument = require_stringifyDocument3();
80419
80856
  var anchors = require_anchors3();
80420
80857
  var applyReviver = require_applyReviver3();
80421
80858
  var createNode = require_createNode3();
80422
80859
  var directives = require_directives3();
80423
80860
 
80424
- class Document3 {
80861
+ class Document2 {
80425
80862
  constructor(value, replacer, options) {
80426
80863
  this.commentBefore = null;
80427
80864
  this.comment = null;
80428
80865
  this.errors = [];
80429
80866
  this.warnings = [];
80430
- Object.defineProperty(this, identity3.NODE_TYPE, { value: identity3.DOC });
80867
+ Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.DOC });
80431
80868
  let _replacer = null;
80432
80869
  if (typeof replacer === "function" || Array.isArray(replacer)) {
80433
80870
  _replacer = replacer;
@@ -80457,8 +80894,8 @@ var require_Document3 = __commonJS4((exports) => {
80457
80894
  this.contents = value === undefined ? null : this.createNode(value, _replacer, options);
80458
80895
  }
80459
80896
  clone() {
80460
- const copy = Object.create(Document3.prototype, {
80461
- [identity3.NODE_TYPE]: { value: identity3.DOC }
80897
+ const copy = Object.create(Document2.prototype, {
80898
+ [identity2.NODE_TYPE]: { value: identity2.DOC }
80462
80899
  });
80463
80900
  copy.commentBefore = this.commentBefore;
80464
80901
  copy.comment = this.comment;
@@ -80468,7 +80905,7 @@ var require_Document3 = __commonJS4((exports) => {
80468
80905
  if (this.directives)
80469
80906
  copy.directives = this.directives.clone();
80470
80907
  copy.schema = this.schema.clone();
80471
- copy.contents = identity3.isNode(this.contents) ? this.contents.clone(copy.schema) : this.contents;
80908
+ copy.contents = identity2.isNode(this.contents) ? this.contents.clone(copy.schema) : this.contents;
80472
80909
  if (this.range)
80473
80910
  copy.range = this.range.slice();
80474
80911
  return copy;
@@ -80486,7 +80923,7 @@ var require_Document3 = __commonJS4((exports) => {
80486
80923
  const prev = anchors.anchorNames(this);
80487
80924
  node.anchor = !name || prev.has(name) ? anchors.findNewAnchor(name || "a", prev) : name;
80488
80925
  }
80489
- return new Alias3.Alias(node.anchor);
80926
+ return new Alias2.Alias(node.anchor);
80490
80927
  }
80491
80928
  createNode(value, replacer, options) {
80492
80929
  let _replacer = undefined;
@@ -80515,7 +80952,7 @@ var require_Document3 = __commonJS4((exports) => {
80515
80952
  sourceObjects
80516
80953
  };
80517
80954
  const node = createNode.createNode(value, tag, ctx);
80518
- if (flow && identity3.isCollection(node))
80955
+ if (flow && identity2.isCollection(node))
80519
80956
  node.flow = true;
80520
80957
  setAnchors();
80521
80958
  return node;
@@ -80523,7 +80960,7 @@ var require_Document3 = __commonJS4((exports) => {
80523
80960
  createPair(key, value, options = {}) {
80524
80961
  const k2 = this.createNode(key, null, options);
80525
80962
  const v2 = this.createNode(value, null, options);
80526
- return new Pair3.Pair(k2, v2);
80963
+ return new Pair2.Pair(k2, v2);
80527
80964
  }
80528
80965
  delete(key) {
80529
80966
  return assertCollection(this.contents) ? this.contents.delete(key) : false;
@@ -80538,20 +80975,20 @@ var require_Document3 = __commonJS4((exports) => {
80538
80975
  return assertCollection(this.contents) ? this.contents.deleteIn(path3) : false;
80539
80976
  }
80540
80977
  get(key, keepScalar) {
80541
- return identity3.isCollection(this.contents) ? this.contents.get(key, keepScalar) : undefined;
80978
+ return identity2.isCollection(this.contents) ? this.contents.get(key, keepScalar) : undefined;
80542
80979
  }
80543
80980
  getIn(path3, keepScalar) {
80544
80981
  if (Collection.isEmptyPath(path3))
80545
- return !keepScalar && identity3.isScalar(this.contents) ? this.contents.value : this.contents;
80546
- return identity3.isCollection(this.contents) ? this.contents.getIn(path3, keepScalar) : undefined;
80982
+ return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
80983
+ return identity2.isCollection(this.contents) ? this.contents.getIn(path3, keepScalar) : undefined;
80547
80984
  }
80548
80985
  has(key) {
80549
- return identity3.isCollection(this.contents) ? this.contents.has(key) : false;
80986
+ return identity2.isCollection(this.contents) ? this.contents.has(key) : false;
80550
80987
  }
80551
80988
  hasIn(path3) {
80552
80989
  if (Collection.isEmptyPath(path3))
80553
80990
  return this.contents !== undefined;
80554
- return identity3.isCollection(this.contents) ? this.contents.hasIn(path3) : false;
80991
+ return identity2.isCollection(this.contents) ? this.contents.hasIn(path3) : false;
80555
80992
  }
80556
80993
  set(key, value) {
80557
80994
  if (this.contents == null) {
@@ -80602,7 +81039,7 @@ var require_Document3 = __commonJS4((exports) => {
80602
81039
  if (options.schema instanceof Object)
80603
81040
  this.schema = options.schema;
80604
81041
  else if (opt)
80605
- this.schema = new Schema3.Schema(Object.assign(opt, options));
81042
+ this.schema = new Schema2.Schema(Object.assign(opt, options));
80606
81043
  else
80607
81044
  throw new Error(`With a null YAML version, the { schema: Schema } option is required`);
80608
81045
  }
@@ -80635,11 +81072,11 @@ var require_Document3 = __commonJS4((exports) => {
80635
81072
  }
80636
81073
  }
80637
81074
  function assertCollection(contents) {
80638
- if (identity3.isCollection(contents))
81075
+ if (identity2.isCollection(contents))
80639
81076
  return true;
80640
81077
  throw new Error("Expected a YAML collection as document contents");
80641
81078
  }
80642
- exports.Document = Document3;
81079
+ exports.Document = Document2;
80643
81080
  });
80644
81081
  var require_errors4 = __commonJS4((exports) => {
80645
81082
 
@@ -80885,26 +81322,26 @@ var require_util_flow_indent_check3 = __commonJS4((exports) => {
80885
81322
  exports.flowIndentCheck = flowIndentCheck;
80886
81323
  });
80887
81324
  var require_util_map_includes3 = __commonJS4((exports) => {
80888
- var identity3 = require_identity4();
81325
+ var identity2 = require_identity4();
80889
81326
  function mapIncludes(ctx, items, search) {
80890
81327
  const { uniqueKeys } = ctx.options;
80891
81328
  if (uniqueKeys === false)
80892
81329
  return false;
80893
- const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a2, b2) => a2 === b2 || identity3.isScalar(a2) && identity3.isScalar(b2) && a2.value === b2.value;
81330
+ const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a2, b2) => a2 === b2 || identity2.isScalar(a2) && identity2.isScalar(b2) && a2.value === b2.value;
80894
81331
  return items.some((pair) => isEqual(pair.key, search));
80895
81332
  }
80896
81333
  exports.mapIncludes = mapIncludes;
80897
81334
  });
80898
81335
  var require_resolve_block_map3 = __commonJS4((exports) => {
80899
- var Pair3 = require_Pair3();
80900
- var YAMLMap3 = require_YAMLMap3();
81336
+ var Pair2 = require_Pair3();
81337
+ var YAMLMap2 = require_YAMLMap3();
80901
81338
  var resolveProps = require_resolve_props3();
80902
81339
  var utilContainsNewline = require_util_contains_newline3();
80903
81340
  var utilFlowIndentCheck = require_util_flow_indent_check3();
80904
81341
  var utilMapIncludes = require_util_map_includes3();
80905
81342
  var startColMsg = "All mapping items must start at the same column";
80906
81343
  function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) {
80907
- const NodeClass = tag?.nodeClass ?? YAMLMap3.YAMLMap;
81344
+ const NodeClass = tag?.nodeClass ?? YAMLMap2.YAMLMap;
80908
81345
  const map8 = new NodeClass(ctx.schema);
80909
81346
  if (ctx.atRoot)
80910
81347
  ctx.atRoot = false;
@@ -80973,7 +81410,7 @@ var require_resolve_block_map3 = __commonJS4((exports) => {
80973
81410
  if (ctx.schema.compat)
80974
81411
  utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
80975
81412
  offset = valueNode.range[2];
80976
- const pair = new Pair3.Pair(keyNode, valueNode);
81413
+ const pair = new Pair2.Pair(keyNode, valueNode);
80977
81414
  if (ctx.options.keepSourceTokens)
80978
81415
  pair.srcToken = collItem;
80979
81416
  map8.items.push(pair);
@@ -80987,7 +81424,7 @@ var require_resolve_block_map3 = __commonJS4((exports) => {
80987
81424
  else
80988
81425
  keyNode.comment = valueProps.comment;
80989
81426
  }
80990
- const pair = new Pair3.Pair(keyNode);
81427
+ const pair = new Pair2.Pair(keyNode);
80991
81428
  if (ctx.options.keepSourceTokens)
80992
81429
  pair.srcToken = collItem;
80993
81430
  map8.items.push(pair);
@@ -81001,11 +81438,11 @@ var require_resolve_block_map3 = __commonJS4((exports) => {
81001
81438
  exports.resolveBlockMap = resolveBlockMap;
81002
81439
  });
81003
81440
  var require_resolve_block_seq3 = __commonJS4((exports) => {
81004
- var YAMLSeq3 = require_YAMLSeq3();
81441
+ var YAMLSeq2 = require_YAMLSeq3();
81005
81442
  var resolveProps = require_resolve_props3();
81006
81443
  var utilFlowIndentCheck = require_util_flow_indent_check3();
81007
81444
  function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) {
81008
- const NodeClass = tag?.nodeClass ?? YAMLSeq3.YAMLSeq;
81445
+ const NodeClass = tag?.nodeClass ?? YAMLSeq2.YAMLSeq;
81009
81446
  const seq = new NodeClass(ctx.schema);
81010
81447
  if (ctx.atRoot)
81011
81448
  ctx.atRoot = false;
@@ -81085,10 +81522,10 @@ var require_resolve_end3 = __commonJS4((exports) => {
81085
81522
  exports.resolveEnd = resolveEnd;
81086
81523
  });
81087
81524
  var require_resolve_flow_collection3 = __commonJS4((exports) => {
81088
- var identity3 = require_identity4();
81089
- var Pair3 = require_Pair3();
81090
- var YAMLMap3 = require_YAMLMap3();
81091
- var YAMLSeq3 = require_YAMLSeq3();
81525
+ var identity2 = require_identity4();
81526
+ var Pair2 = require_Pair3();
81527
+ var YAMLMap2 = require_YAMLMap3();
81528
+ var YAMLSeq2 = require_YAMLSeq3();
81092
81529
  var resolveEnd = require_resolve_end3();
81093
81530
  var resolveProps = require_resolve_props3();
81094
81531
  var utilContainsNewline = require_util_contains_newline3();
@@ -81098,7 +81535,7 @@ var require_resolve_flow_collection3 = __commonJS4((exports) => {
81098
81535
  function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) {
81099
81536
  const isMap = fc.start.source === "{";
81100
81537
  const fcName = isMap ? "flow map" : "flow sequence";
81101
- const NodeClass = tag?.nodeClass ?? (isMap ? YAMLMap3.YAMLMap : YAMLSeq3.YAMLSeq);
81538
+ const NodeClass = tag?.nodeClass ?? (isMap ? YAMLMap2.YAMLMap : YAMLSeq2.YAMLSeq);
81102
81539
  const coll = new NodeClass(ctx.schema);
81103
81540
  coll.flow = true;
81104
81541
  const atRoot = ctx.atRoot;
@@ -81161,7 +81598,7 @@ var require_resolve_flow_collection3 = __commonJS4((exports) => {
81161
81598
  }
81162
81599
  if (prevItemComment) {
81163
81600
  let prev = coll.items[coll.items.length - 1];
81164
- if (identity3.isPair(prev))
81601
+ if (identity2.isPair(prev))
81165
81602
  prev = prev.value ?? prev.key;
81166
81603
  if (prev.comment)
81167
81604
  prev.comment += `
@@ -81225,7 +81662,7 @@ var require_resolve_flow_collection3 = __commonJS4((exports) => {
81225
81662
  else
81226
81663
  keyNode.comment = valueProps.comment;
81227
81664
  }
81228
- const pair = new Pair3.Pair(keyNode, valueNode);
81665
+ const pair = new Pair2.Pair(keyNode, valueNode);
81229
81666
  if (ctx.options.keepSourceTokens)
81230
81667
  pair.srcToken = collItem;
81231
81668
  if (isMap) {
@@ -81234,7 +81671,7 @@ var require_resolve_flow_collection3 = __commonJS4((exports) => {
81234
81671
  onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
81235
81672
  map8.items.push(pair);
81236
81673
  } else {
81237
- const map8 = new YAMLMap3.YAMLMap(ctx.schema);
81674
+ const map8 = new YAMLMap2.YAMLMap(ctx.schema);
81238
81675
  map8.flow = true;
81239
81676
  map8.items.push(pair);
81240
81677
  const endRange = (valueNode ?? keyNode).range;
@@ -81274,10 +81711,10 @@ var require_resolve_flow_collection3 = __commonJS4((exports) => {
81274
81711
  exports.resolveFlowCollection = resolveFlowCollection;
81275
81712
  });
81276
81713
  var require_compose_collection3 = __commonJS4((exports) => {
81277
- var identity3 = require_identity4();
81278
- var Scalar3 = require_Scalar3();
81279
- var YAMLMap3 = require_YAMLMap3();
81280
- var YAMLSeq3 = require_YAMLSeq3();
81714
+ var identity2 = require_identity4();
81715
+ var Scalar2 = require_Scalar3();
81716
+ var YAMLMap2 = require_YAMLMap3();
81717
+ var YAMLSeq2 = require_YAMLSeq3();
81281
81718
  var resolveBlockMap = require_resolve_block_map3();
81282
81719
  var resolveBlockSeq = require_resolve_block_seq3();
81283
81720
  var resolveFlowCollection = require_resolve_flow_collection3();
@@ -81304,7 +81741,7 @@ var require_compose_collection3 = __commonJS4((exports) => {
81304
81741
  }
81305
81742
  }
81306
81743
  const expType = token.type === "block-map" ? "map" : token.type === "block-seq" ? "seq" : token.start.source === "{" ? "map" : "seq";
81307
- if (!tagToken || !tagName || tagName === "!" || tagName === YAMLMap3.YAMLMap.tagName && expType === "map" || tagName === YAMLSeq3.YAMLSeq.tagName && expType === "seq") {
81744
+ if (!tagToken || !tagName || tagName === "!" || tagName === YAMLMap2.YAMLMap.tagName && expType === "map" || tagName === YAMLSeq2.YAMLSeq.tagName && expType === "seq") {
81308
81745
  return resolveCollection(CN, ctx, token, onError, tagName);
81309
81746
  }
81310
81747
  let tag = ctx.schema.tags.find((t2) => t2.tag === tagName && t2.collection === expType);
@@ -81324,7 +81761,7 @@ var require_compose_collection3 = __commonJS4((exports) => {
81324
81761
  }
81325
81762
  const coll = resolveCollection(CN, ctx, token, onError, tagName, tag);
81326
81763
  const res = tag.resolve?.(coll, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg), ctx.options) ?? coll;
81327
- const node = identity3.isNode(res) ? res : new Scalar3.Scalar(res);
81764
+ const node = identity2.isNode(res) ? res : new Scalar2.Scalar(res);
81328
81765
  node.range = coll.range;
81329
81766
  node.tag = tagName;
81330
81767
  if (tag?.format)
@@ -81334,13 +81771,13 @@ var require_compose_collection3 = __commonJS4((exports) => {
81334
81771
  exports.composeCollection = composeCollection;
81335
81772
  });
81336
81773
  var require_resolve_block_scalar3 = __commonJS4((exports) => {
81337
- var Scalar3 = require_Scalar3();
81774
+ var Scalar2 = require_Scalar3();
81338
81775
  function resolveBlockScalar(ctx, scalar, onError) {
81339
81776
  const start = scalar.offset;
81340
81777
  const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError);
81341
81778
  if (!header)
81342
81779
  return { value: "", type: null, comment: "", range: [start, start, start] };
81343
- const type = header.mode === ">" ? Scalar3.Scalar.BLOCK_FOLDED : Scalar3.Scalar.BLOCK_LITERAL;
81780
+ const type = header.mode === ">" ? Scalar2.Scalar.BLOCK_FOLDED : Scalar2.Scalar.BLOCK_LITERAL;
81344
81781
  const lines = scalar.source ? splitLines(scalar.source) : [];
81345
81782
  let chompStart = lines.length;
81346
81783
  for (let i2 = lines.length - 1;i2 >= 0; --i2) {
@@ -81404,7 +81841,7 @@ var require_resolve_block_scalar3 = __commonJS4((exports) => {
81404
81841
  onError(offset - content.length - (crlf ? 2 : 1), "BAD_INDENT", message);
81405
81842
  indent = "";
81406
81843
  }
81407
- if (type === Scalar3.Scalar.BLOCK_LITERAL) {
81844
+ if (type === Scalar2.Scalar.BLOCK_LITERAL) {
81408
81845
  value += sep2 + indent.slice(trimIndent) + content;
81409
81846
  sep2 = `
81410
81847
  `;
@@ -81525,7 +81962,7 @@ var require_resolve_block_scalar3 = __commonJS4((exports) => {
81525
81962
  exports.resolveBlockScalar = resolveBlockScalar;
81526
81963
  });
81527
81964
  var require_resolve_flow_scalar3 = __commonJS4((exports) => {
81528
- var Scalar3 = require_Scalar3();
81965
+ var Scalar2 = require_Scalar3();
81529
81966
  var resolveEnd = require_resolve_end3();
81530
81967
  function resolveFlowScalar(scalar, strict, onError) {
81531
81968
  const { offset, type, source, end } = scalar;
@@ -81534,15 +81971,15 @@ var require_resolve_flow_scalar3 = __commonJS4((exports) => {
81534
81971
  const _onError = (rel, code, msg) => onError(offset + rel, code, msg);
81535
81972
  switch (type) {
81536
81973
  case "scalar":
81537
- _type = Scalar3.Scalar.PLAIN;
81974
+ _type = Scalar2.Scalar.PLAIN;
81538
81975
  value = plainValue(source, _onError);
81539
81976
  break;
81540
81977
  case "single-quoted-scalar":
81541
- _type = Scalar3.Scalar.QUOTE_SINGLE;
81978
+ _type = Scalar2.Scalar.QUOTE_SINGLE;
81542
81979
  value = singleQuotedValue(source, _onError);
81543
81980
  break;
81544
81981
  case "double-quoted-scalar":
81545
- _type = Scalar3.Scalar.QUOTE_DOUBLE;
81982
+ _type = Scalar2.Scalar.QUOTE_DOUBLE;
81546
81983
  value = doubleQuotedValue(source, _onError);
81547
81984
  break;
81548
81985
  default:
@@ -81739,8 +82176,8 @@ var require_resolve_flow_scalar3 = __commonJS4((exports) => {
81739
82176
  exports.resolveFlowScalar = resolveFlowScalar;
81740
82177
  });
81741
82178
  var require_compose_scalar3 = __commonJS4((exports) => {
81742
- var identity3 = require_identity4();
81743
- var Scalar3 = require_Scalar3();
82179
+ var identity2 = require_identity4();
82180
+ var Scalar2 = require_Scalar3();
81744
82181
  var resolveBlockScalar = require_resolve_block_scalar3();
81745
82182
  var resolveFlowScalar = require_resolve_flow_scalar3();
81746
82183
  function composeScalar(ctx, token, tagToken, onError) {
@@ -81748,21 +82185,21 @@ var require_compose_scalar3 = __commonJS4((exports) => {
81748
82185
  const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg)) : null;
81749
82186
  let tag;
81750
82187
  if (ctx.options.stringKeys && ctx.atKey) {
81751
- tag = ctx.schema[identity3.SCALAR];
82188
+ tag = ctx.schema[identity2.SCALAR];
81752
82189
  } else if (tagName)
81753
82190
  tag = findScalarTagByName(ctx.schema, value, tagName, tagToken, onError);
81754
82191
  else if (token.type === "scalar")
81755
82192
  tag = findScalarTagByTest(ctx, value, token, onError);
81756
82193
  else
81757
- tag = ctx.schema[identity3.SCALAR];
82194
+ tag = ctx.schema[identity2.SCALAR];
81758
82195
  let scalar;
81759
82196
  try {
81760
82197
  const res = tag.resolve(value, (msg) => onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg), ctx.options);
81761
- scalar = identity3.isScalar(res) ? res : new Scalar3.Scalar(res);
82198
+ scalar = identity2.isScalar(res) ? res : new Scalar2.Scalar(res);
81762
82199
  } catch (error) {
81763
82200
  const msg = error instanceof Error ? error.message : String(error);
81764
82201
  onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg);
81765
- scalar = new Scalar3.Scalar(value);
82202
+ scalar = new Scalar2.Scalar(value);
81766
82203
  }
81767
82204
  scalar.range = range;
81768
82205
  scalar.source = value;
@@ -81778,7 +82215,7 @@ var require_compose_scalar3 = __commonJS4((exports) => {
81778
82215
  }
81779
82216
  function findScalarTagByName(schema, value, tagName, tagToken, onError) {
81780
82217
  if (tagName === "!")
81781
- return schema[identity3.SCALAR];
82218
+ return schema[identity2.SCALAR];
81782
82219
  const matchWithTest = [];
81783
82220
  for (const tag of schema.tags) {
81784
82221
  if (!tag.collection && tag.tag === tagName) {
@@ -81797,12 +82234,12 @@ var require_compose_scalar3 = __commonJS4((exports) => {
81797
82234
  return kt;
81798
82235
  }
81799
82236
  onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, tagName !== "tag:yaml.org,2002:str");
81800
- return schema[identity3.SCALAR];
82237
+ return schema[identity2.SCALAR];
81801
82238
  }
81802
82239
  function findScalarTagByTest({ atKey, directives, schema }, value, token, onError) {
81803
- const tag = schema.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && tag2.test?.test(value)) || schema[identity3.SCALAR];
82240
+ const tag = schema.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && tag2.test?.test(value)) || schema[identity2.SCALAR];
81804
82241
  if (schema.compat) {
81805
- const compat = schema.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema[identity3.SCALAR];
82242
+ const compat = schema.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema[identity2.SCALAR];
81806
82243
  if (tag.tag !== compat.tag) {
81807
82244
  const ts = directives.tagString(tag.tag);
81808
82245
  const cs = directives.tagString(compat.tag);
@@ -81840,8 +82277,8 @@ var require_util_empty_scalar_position3 = __commonJS4((exports) => {
81840
82277
  exports.emptyScalarPosition = emptyScalarPosition;
81841
82278
  });
81842
82279
  var require_compose_node3 = __commonJS4((exports) => {
81843
- var Alias3 = require_Alias3();
81844
- var identity3 = require_identity4();
82280
+ var Alias2 = require_Alias3();
82281
+ var identity2 = require_identity4();
81845
82282
  var composeCollection = require_compose_collection3();
81846
82283
  var composeScalar = require_compose_scalar3();
81847
82284
  var resolveEnd = require_resolve_end3();
@@ -81882,7 +82319,7 @@ var require_compose_node3 = __commonJS4((exports) => {
81882
82319
  }
81883
82320
  if (anchor && node.anchor === "")
81884
82321
  onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string");
81885
- if (atKey && ctx.options.stringKeys && (!identity3.isScalar(node) || typeof node.value !== "string" || node.tag && node.tag !== "tag:yaml.org,2002:str")) {
82322
+ if (atKey && ctx.options.stringKeys && (!identity2.isScalar(node) || typeof node.value !== "string" || node.tag && node.tag !== "tag:yaml.org,2002:str")) {
81886
82323
  const msg = "With stringKeys, all keys must be strings";
81887
82324
  onError(tag ?? token, "NON_STRING_KEY", msg);
81888
82325
  }
@@ -81920,7 +82357,7 @@ var require_compose_node3 = __commonJS4((exports) => {
81920
82357
  return node;
81921
82358
  }
81922
82359
  function composeAlias({ options }, { offset, source, end }, onError) {
81923
- const alias = new Alias3.Alias(source.substring(1));
82360
+ const alias = new Alias2.Alias(source.substring(1));
81924
82361
  if (alias.source === "")
81925
82362
  onError(offset, "BAD_ALIAS", "Alias cannot be an empty string");
81926
82363
  if (alias.source.endsWith(":"))
@@ -81936,13 +82373,13 @@ var require_compose_node3 = __commonJS4((exports) => {
81936
82373
  exports.composeNode = composeNode;
81937
82374
  });
81938
82375
  var require_compose_doc3 = __commonJS4((exports) => {
81939
- var Document3 = require_Document3();
82376
+ var Document2 = require_Document3();
81940
82377
  var composeNode = require_compose_node3();
81941
82378
  var resolveEnd = require_resolve_end3();
81942
82379
  var resolveProps = require_resolve_props3();
81943
82380
  function composeDoc(options, directives, { offset, start, value, end }, onError) {
81944
82381
  const opts = Object.assign({ _directives: directives }, options);
81945
- const doc = new Document3.Document(undefined, opts);
82382
+ const doc = new Document2.Document(undefined, opts);
81946
82383
  const ctx = {
81947
82384
  atKey: false,
81948
82385
  atRoot: true,
@@ -81976,9 +82413,9 @@ var require_compose_doc3 = __commonJS4((exports) => {
81976
82413
  var require_composer3 = __commonJS4((exports) => {
81977
82414
  var node_process = __require4("process");
81978
82415
  var directives = require_directives3();
81979
- var Document3 = require_Document3();
82416
+ var Document2 = require_Document3();
81980
82417
  var errors3 = require_errors4();
81981
- var identity3 = require_identity4();
82418
+ var identity2 = require_identity4();
81982
82419
  var composeDoc = require_compose_doc3();
81983
82420
  var resolveEnd = require_resolve_end3();
81984
82421
  function getErrorPos(src2) {
@@ -82044,9 +82481,9 @@ var require_composer3 = __commonJS4((exports) => {
82044
82481
  ${comment}` : comment;
82045
82482
  } else if (afterEmptyLine || doc.directives.docStart || !dc) {
82046
82483
  doc.commentBefore = comment;
82047
- } else if (identity3.isCollection(dc) && !dc.flow && dc.items.length > 0) {
82484
+ } else if (identity2.isCollection(dc) && !dc.flow && dc.items.length > 0) {
82048
82485
  let it = dc.items[0];
82049
- if (identity3.isPair(it))
82486
+ if (identity2.isPair(it))
82050
82487
  it = it.key;
82051
82488
  const cb = it.commentBefore;
82052
82489
  it.commentBefore = cb ? `${comment}
@@ -82149,7 +82586,7 @@ ${end.comment}` : end.comment;
82149
82586
  this.doc = null;
82150
82587
  } else if (forceDoc) {
82151
82588
  const opts = Object.assign({ _directives: this.directives }, this.options);
82152
- const doc = new Document3.Document(undefined, opts);
82589
+ const doc = new Document2.Document(undefined, opts);
82153
82590
  if (this.atDirectives)
82154
82591
  this.onError(endOffset, "MISSING_CHAR", "Missing directives-end indicator line");
82155
82592
  doc.range = [0, endOffset, endOffset];
@@ -82349,7 +82786,7 @@ var require_cst_scalar3 = __commonJS4((exports) => {
82349
82786
  exports.setScalarValue = setScalarValue;
82350
82787
  });
82351
82788
  var require_cst_stringify3 = __commonJS4((exports) => {
82352
- var stringify = (cst3) => ("type" in cst3) ? stringifyToken(cst3) : stringifyItem(cst3);
82789
+ var stringify = (cst2) => ("type" in cst2) ? stringifyToken(cst2) : stringifyItem(cst2);
82353
82790
  function stringifyToken(token) {
82354
82791
  switch (token.type) {
82355
82792
  case "block-scalar": {
@@ -82408,16 +82845,16 @@ var require_cst_visit3 = __commonJS4((exports) => {
82408
82845
  var BREAK = Symbol("break visit");
82409
82846
  var SKIP = Symbol("skip children");
82410
82847
  var REMOVE = Symbol("remove item");
82411
- function visit3(cst3, visitor) {
82412
- if ("type" in cst3 && cst3.type === "document")
82413
- cst3 = { start: cst3.start, value: cst3.value };
82414
- _visit(Object.freeze([]), cst3, visitor);
82415
- }
82416
- visit3.BREAK = BREAK;
82417
- visit3.SKIP = SKIP;
82418
- visit3.REMOVE = REMOVE;
82419
- visit3.itemAtPath = (cst3, path3) => {
82420
- let item = cst3;
82848
+ function visit2(cst2, visitor) {
82849
+ if ("type" in cst2 && cst2.type === "document")
82850
+ cst2 = { start: cst2.start, value: cst2.value };
82851
+ _visit(Object.freeze([]), cst2, visitor);
82852
+ }
82853
+ visit2.BREAK = BREAK;
82854
+ visit2.SKIP = SKIP;
82855
+ visit2.REMOVE = REMOVE;
82856
+ visit2.itemAtPath = (cst2, path3) => {
82857
+ let item = cst2;
82421
82858
  for (const [field, index] of path3) {
82422
82859
  const tok = item?.[field];
82423
82860
  if (tok && "items" in tok) {
@@ -82427,8 +82864,8 @@ var require_cst_visit3 = __commonJS4((exports) => {
82427
82864
  }
82428
82865
  return item;
82429
82866
  };
82430
- visit3.parentCollection = (cst3, path3) => {
82431
- const parent = visit3.itemAtPath(cst3, path3.slice(0, -1));
82867
+ visit2.parentCollection = (cst2, path3) => {
82868
+ const parent = visit2.itemAtPath(cst2, path3.slice(0, -1));
82432
82869
  const field = path3[path3.length - 1][0];
82433
82870
  const coll = parent?.[field];
82434
82871
  if (coll && "items" in coll)
@@ -82459,7 +82896,7 @@ var require_cst_visit3 = __commonJS4((exports) => {
82459
82896
  }
82460
82897
  return typeof ctrl === "function" ? ctrl(item, path3) : ctrl;
82461
82898
  }
82462
- exports.visit = visit3;
82899
+ exports.visit = visit2;
82463
82900
  });
82464
82901
  var require_cst3 = __commonJS4((exports) => {
82465
82902
  var cstScalar = require_cst_scalar3();
@@ -82561,7 +82998,7 @@ var require_cst3 = __commonJS4((exports) => {
82561
82998
  exports.tokenType = tokenType;
82562
82999
  });
82563
83000
  var require_lexer3 = __commonJS4((exports) => {
82564
- var cst3 = require_cst3();
83001
+ var cst2 = require_cst3();
82565
83002
  function isEmpty(ch) {
82566
83003
  switch (ch) {
82567
83004
  case undefined:
@@ -82696,7 +83133,7 @@ var require_lexer3 = __commonJS4((exports) => {
82696
83133
  let line = this.getLine();
82697
83134
  if (line === null)
82698
83135
  return this.setNext("stream");
82699
- if (line[0] === cst3.BOM) {
83136
+ if (line[0] === cst2.BOM) {
82700
83137
  yield* this.pushCount(1);
82701
83138
  line = line.substring(1);
82702
83139
  }
@@ -82730,7 +83167,7 @@ var require_lexer3 = __commonJS4((exports) => {
82730
83167
  yield* this.pushNewline();
82731
83168
  return "stream";
82732
83169
  }
82733
- yield cst3.DOCUMENT;
83170
+ yield cst2.DOCUMENT;
82734
83171
  return yield* this.parseLineStart();
82735
83172
  }
82736
83173
  *parseLineStart() {
@@ -82824,7 +83261,7 @@ var require_lexer3 = __commonJS4((exports) => {
82824
83261
  const atFlowEndMarker = indent === this.indentNext - 1 && this.flowLevel === 1 && (line[0] === "]" || line[0] === "}");
82825
83262
  if (!atFlowEndMarker) {
82826
83263
  this.flowLevel = 0;
82827
- yield cst3.FLOW_END;
83264
+ yield cst2.FLOW_END;
82828
83265
  return yield* this.parseLineStart();
82829
83266
  }
82830
83267
  }
@@ -83001,7 +83438,7 @@ var require_lexer3 = __commonJS4((exports) => {
83001
83438
  break;
83002
83439
  } while (true);
83003
83440
  }
83004
- yield cst3.SCALAR;
83441
+ yield cst2.SCALAR;
83005
83442
  yield* this.pushToIndex(nl + 1, true);
83006
83443
  return yield* this.parseLineStart();
83007
83444
  }
@@ -83045,7 +83482,7 @@ var require_lexer3 = __commonJS4((exports) => {
83045
83482
  }
83046
83483
  if (!ch && !this.atEnd)
83047
83484
  return this.setNext("plain-scalar");
83048
- yield cst3.SCALAR;
83485
+ yield cst2.SCALAR;
83049
83486
  yield* this.pushToIndex(end + 1, true);
83050
83487
  return inFlow ? "flow" : "doc";
83051
83488
  }
@@ -83173,8 +83610,8 @@ var require_line_counter3 = __commonJS4((exports) => {
83173
83610
  });
83174
83611
  var require_parser4 = __commonJS4((exports) => {
83175
83612
  var node_process = __require4("process");
83176
- var cst3 = require_cst3();
83177
- var lexer3 = require_lexer3();
83613
+ var cst2 = require_cst3();
83614
+ var lexer2 = require_lexer3();
83178
83615
  function includesToken(list, type) {
83179
83616
  for (let i2 = 0;i2 < list.length; ++i2)
83180
83617
  if (list[i2].type === type)
@@ -83268,7 +83705,7 @@ var require_parser4 = __commonJS4((exports) => {
83268
83705
  this.stack = [];
83269
83706
  this.source = "";
83270
83707
  this.type = "";
83271
- this.lexer = new lexer3.Lexer;
83708
+ this.lexer = new lexer2.Lexer;
83272
83709
  this.onNewLine = onNewLine;
83273
83710
  }
83274
83711
  *parse(source, incomplete = false) {
@@ -83282,14 +83719,14 @@ var require_parser4 = __commonJS4((exports) => {
83282
83719
  *next(source) {
83283
83720
  this.source = source;
83284
83721
  if (node_process.env.LOG_TOKENS)
83285
- console.log("|", cst3.prettyToken(source));
83722
+ console.log("|", cst2.prettyToken(source));
83286
83723
  if (this.atScalar) {
83287
83724
  this.atScalar = false;
83288
83725
  yield* this.step();
83289
83726
  this.offset += source.length;
83290
83727
  return;
83291
83728
  }
83292
- const type = cst3.tokenType(source);
83729
+ const type = cst2.tokenType(source);
83293
83730
  if (!type) {
83294
83731
  const message = `Not a YAML token: ${source}`;
83295
83732
  yield* this.pop({ type: "error", offset: this.offset, message, source });
@@ -84019,22 +84456,22 @@ var require_parser4 = __commonJS4((exports) => {
84019
84456
  exports.Parser = Parser;
84020
84457
  });
84021
84458
  var require_public_api3 = __commonJS4((exports) => {
84022
- var composer3 = require_composer3();
84023
- var Document3 = require_Document3();
84459
+ var composer2 = require_composer3();
84460
+ var Document2 = require_Document3();
84024
84461
  var errors3 = require_errors4();
84025
84462
  var log = require_log4();
84026
- var identity3 = require_identity4();
84027
- var lineCounter3 = require_line_counter3();
84028
- var parser3 = require_parser4();
84463
+ var identity2 = require_identity4();
84464
+ var lineCounter2 = require_line_counter3();
84465
+ var parser2 = require_parser4();
84029
84466
  function parseOptions(options) {
84030
84467
  const prettyErrors = options.prettyErrors !== false;
84031
- const lineCounter$1 = options.lineCounter || prettyErrors && new lineCounter3.LineCounter || null;
84468
+ const lineCounter$1 = options.lineCounter || prettyErrors && new lineCounter2.LineCounter || null;
84032
84469
  return { lineCounter: lineCounter$1, prettyErrors };
84033
84470
  }
84034
84471
  function parseAllDocuments(source, options = {}) {
84035
84472
  const { lineCounter: lineCounter22, prettyErrors } = parseOptions(options);
84036
- const parser$1 = new parser3.Parser(lineCounter22?.addNewLine);
84037
- const composer$1 = new composer3.Composer(options);
84473
+ const parser$1 = new parser2.Parser(lineCounter22?.addNewLine);
84474
+ const composer$1 = new composer2.Composer(options);
84038
84475
  const docs = Array.from(composer$1.compose(parser$1.parse(source)));
84039
84476
  if (prettyErrors && lineCounter22)
84040
84477
  for (const doc of docs) {
@@ -84047,8 +84484,8 @@ var require_public_api3 = __commonJS4((exports) => {
84047
84484
  }
84048
84485
  function parseDocument(source, options = {}) {
84049
84486
  const { lineCounter: lineCounter22, prettyErrors } = parseOptions(options);
84050
- const parser$1 = new parser3.Parser(lineCounter22?.addNewLine);
84051
- const composer$1 = new composer3.Composer(options);
84487
+ const parser$1 = new parser2.Parser(lineCounter22?.addNewLine);
84488
+ const composer$1 = new composer2.Composer(options);
84052
84489
  let doc = null;
84053
84490
  for (const _doc of composer$1.compose(parser$1.parse(source), true, source.length)) {
84054
84491
  if (!doc)
@@ -84101,61 +84538,61 @@ var require_public_api3 = __commonJS4((exports) => {
84101
84538
  if (!keepUndefined)
84102
84539
  return;
84103
84540
  }
84104
- if (identity3.isDocument(value) && !_replacer)
84541
+ if (identity2.isDocument(value) && !_replacer)
84105
84542
  return value.toString(options);
84106
- return new Document3.Document(value, _replacer, options).toString(options);
84543
+ return new Document2.Document(value, _replacer, options).toString(options);
84107
84544
  }
84108
84545
  exports.parse = parse;
84109
84546
  exports.parseAllDocuments = parseAllDocuments;
84110
84547
  exports.parseDocument = parseDocument;
84111
84548
  exports.stringify = stringify;
84112
84549
  });
84113
- var require_dist = __commonJS4((exports) => {
84114
- var composer3 = require_composer3();
84115
- var Document3 = require_Document3();
84116
- var Schema3 = require_Schema3();
84550
+ var require_dist2 = __commonJS4((exports) => {
84551
+ var composer2 = require_composer3();
84552
+ var Document2 = require_Document3();
84553
+ var Schema2 = require_Schema3();
84117
84554
  var errors3 = require_errors4();
84118
- var Alias3 = require_Alias3();
84119
- var identity3 = require_identity4();
84120
- var Pair3 = require_Pair3();
84121
- var Scalar3 = require_Scalar3();
84122
- var YAMLMap3 = require_YAMLMap3();
84123
- var YAMLSeq3 = require_YAMLSeq3();
84124
- var cst3 = require_cst3();
84125
- var lexer3 = require_lexer3();
84126
- var lineCounter3 = require_line_counter3();
84127
- var parser3 = require_parser4();
84128
- var publicApi3 = require_public_api3();
84129
- var visit3 = require_visit3();
84130
- exports.Composer = composer3.Composer;
84131
- exports.Document = Document3.Document;
84132
- exports.Schema = Schema3.Schema;
84555
+ var Alias2 = require_Alias3();
84556
+ var identity2 = require_identity4();
84557
+ var Pair2 = require_Pair3();
84558
+ var Scalar2 = require_Scalar3();
84559
+ var YAMLMap2 = require_YAMLMap3();
84560
+ var YAMLSeq2 = require_YAMLSeq3();
84561
+ var cst2 = require_cst3();
84562
+ var lexer2 = require_lexer3();
84563
+ var lineCounter2 = require_line_counter3();
84564
+ var parser2 = require_parser4();
84565
+ var publicApi2 = require_public_api3();
84566
+ var visit2 = require_visit3();
84567
+ exports.Composer = composer2.Composer;
84568
+ exports.Document = Document2.Document;
84569
+ exports.Schema = Schema2.Schema;
84133
84570
  exports.YAMLError = errors3.YAMLError;
84134
84571
  exports.YAMLParseError = errors3.YAMLParseError;
84135
84572
  exports.YAMLWarning = errors3.YAMLWarning;
84136
- exports.Alias = Alias3.Alias;
84137
- exports.isAlias = identity3.isAlias;
84138
- exports.isCollection = identity3.isCollection;
84139
- exports.isDocument = identity3.isDocument;
84140
- exports.isMap = identity3.isMap;
84141
- exports.isNode = identity3.isNode;
84142
- exports.isPair = identity3.isPair;
84143
- exports.isScalar = identity3.isScalar;
84144
- exports.isSeq = identity3.isSeq;
84145
- exports.Pair = Pair3.Pair;
84146
- exports.Scalar = Scalar3.Scalar;
84147
- exports.YAMLMap = YAMLMap3.YAMLMap;
84148
- exports.YAMLSeq = YAMLSeq3.YAMLSeq;
84149
- exports.CST = cst3;
84150
- exports.Lexer = lexer3.Lexer;
84151
- exports.LineCounter = lineCounter3.LineCounter;
84152
- exports.Parser = parser3.Parser;
84153
- exports.parse = publicApi3.parse;
84154
- exports.parseAllDocuments = publicApi3.parseAllDocuments;
84155
- exports.parseDocument = publicApi3.parseDocument;
84156
- exports.stringify = publicApi3.stringify;
84157
- exports.visit = visit3.visit;
84158
- exports.visitAsync = visit3.visitAsync;
84573
+ exports.Alias = Alias2.Alias;
84574
+ exports.isAlias = identity2.isAlias;
84575
+ exports.isCollection = identity2.isCollection;
84576
+ exports.isDocument = identity2.isDocument;
84577
+ exports.isMap = identity2.isMap;
84578
+ exports.isNode = identity2.isNode;
84579
+ exports.isPair = identity2.isPair;
84580
+ exports.isScalar = identity2.isScalar;
84581
+ exports.isSeq = identity2.isSeq;
84582
+ exports.Pair = Pair2.Pair;
84583
+ exports.Scalar = Scalar2.Scalar;
84584
+ exports.YAMLMap = YAMLMap2.YAMLMap;
84585
+ exports.YAMLSeq = YAMLSeq2.YAMLSeq;
84586
+ exports.CST = cst2;
84587
+ exports.Lexer = lexer2.Lexer;
84588
+ exports.LineCounter = lineCounter2.LineCounter;
84589
+ exports.Parser = parser2.Parser;
84590
+ exports.parse = publicApi2.parse;
84591
+ exports.parseAllDocuments = publicApi2.parseAllDocuments;
84592
+ exports.parseDocument = publicApi2.parseDocument;
84593
+ exports.stringify = publicApi2.stringify;
84594
+ exports.visit = visit2.visit;
84595
+ exports.visitAsync = visit2.visitAsync;
84159
84596
  });
84160
84597
  var CVSS_WEIGHTS = {
84161
84598
  attackVector: { network: 0.85, local: 0.55 },
@@ -85082,7 +85519,7 @@ class UnsafeResponseDetector {
85082
85519
  return CvssCalculator.describe(cvssScore);
85083
85520
  }
85084
85521
  }
85085
- var import_yaml2 = __toESM4(require_dist(), 1);
85522
+ var import_yaml3 = __toESM4(require_dist2(), 1);
85086
85523
 
85087
85524
  class CustomMutation {
85088
85525
  name;
@@ -85116,7 +85553,7 @@ function loadCustomAttacks(filePath) {
85116
85553
  throw new Error(`Custom attacks file not found: ${absolutePath}`);
85117
85554
  }
85118
85555
  const content = fs.readFileSync(absolutePath, "utf-8");
85119
- const parsed = import_yaml2.default.parse(content);
85556
+ const parsed = import_yaml3.default.parse(content);
85120
85557
  if (!parsed.version) {
85121
85558
  throw new Error("Custom attacks file must specify a version");
85122
85559
  }
@@ -85509,7 +85946,7 @@ function resolveModelWithSource(cliModel, scenarioModel, configModel) {
85509
85946
  // src/commands/redteam.ts
85510
85947
  function redteamCommand() {
85511
85948
  const cmd = new Command("redteam");
85512
- cmd.description("Run red-team adversarial tests against an LLM").argument("<scenario>", "Path to scenario YAML file").option("-p, --provider <provider>", "Provider to use").option("-m, --model <model>", "Model to use").option("--mutations <mutations...>", "Mutations to apply (typo, role-spoof, instruction-flip, cot-injection, encoding, multi-turn)").option("-c, --count <number>", "Number of mutated prompts per case", "5").option("--custom-attacks <path>", "Path to custom attacks YAML file").option("--save", "Save results to storage").option("-o, --output <dir>", "Output directory for reports").option("-v, --verbose", "Verbose output").option("--config <path>", "Path to config file").option("--redact", "Enable PII/sensitive data redaction in results").option("--redact-patterns <patterns...>", "Custom redaction patterns (regex or built-in: email, phone, credit_card, ssn, api_key)").option("--export <format>", "Export results to format (markdown)").option("--export-output <dir>", "Output directory for exports (default: ./artemis-exports)").action(async (scenarioPath, options) => {
85949
+ cmd.description("Run red-team adversarial tests against an LLM").argument("<scenario>", "Path to scenario YAML file").option("-p, --provider <provider>", "Provider to use").option("-m, --model <model>", "Model to use").option("--mutations <mutations...>", "Mutations to apply (typo, role-spoof, instruction-flip, cot-injection, encoding, multi-turn)").option("-c, --count <number>", "Number of mutated prompts per case", "5").option("--custom-attacks <path>", "Path to custom attacks YAML file").option("--save", "Save results to storage").option("-o, --output <dir>", "Output directory for reports").option("-v, --verbose", "Verbose output").option("--config <path>", "Path to config file").option("--redact", "Enable PII/sensitive data redaction in results").option("--redact-patterns <patterns...>", "Custom redaction patterns (regex or built-in: email, phone, credit_card, ssn, api_key)").option("--export <format>", "Export results to format (markdown or junit)").option("--export-output <dir>", "Output directory for exports (default: ./artemis-exports)").action(async (scenarioPath, options) => {
85513
85950
  const spinner = createSpinner("Loading configuration...");
85514
85951
  spinner.start();
85515
85952
  const startTime = new Date;
@@ -85810,13 +86247,20 @@ function redteamCommand() {
85810
86247
  console.log(source_default.dim(` HTML: ${htmlPath}`));
85811
86248
  console.log(source_default.dim(` JSON: ${jsonPath}`));
85812
86249
  }
85813
- if (options.export === "markdown") {
86250
+ if (options.export) {
85814
86251
  const exportDir = options.exportOutput || "./artemis-exports";
85815
86252
  await mkdir3(exportDir, { recursive: true });
85816
- const markdown = generateRedTeamMarkdownReport(manifest);
85817
- const mdPath = join4(exportDir, `${runId}.md`);
85818
- await writeFile3(mdPath, markdown);
85819
- console.log(source_default.dim(`Exported: ${mdPath}`));
86253
+ if (options.export === "markdown") {
86254
+ const markdown = generateRedTeamMarkdownReport(manifest);
86255
+ const mdPath = join4(exportDir, `${runId}.md`);
86256
+ await writeFile3(mdPath, markdown);
86257
+ console.log(source_default.dim(`Exported: ${mdPath}`));
86258
+ } else if (options.export === "junit") {
86259
+ const junit = generateRedTeamJUnitReport(manifest);
86260
+ const junitPath = join4(exportDir, `${runId}.xml`);
86261
+ await writeFile3(junitPath, junit);
86262
+ console.log(source_default.dim(`Exported: ${junitPath}`));
86263
+ }
85820
86264
  }
85821
86265
  if (metrics.unsafe_responses > 0) {
85822
86266
  process.exit(1);
@@ -86265,7 +86709,7 @@ async function runScenariosInParallel(scenarioPaths, options, config, parallelLi
86265
86709
  }
86266
86710
  function runCommand() {
86267
86711
  const cmd = new Command("run");
86268
- cmd.description("Run test scenarios against an LLM. Accepts a file path, directory, or glob pattern.").argument("[scenario]", "Path to scenario file, directory, or glob pattern (e.g., scenarios/**/*.yaml)").option("-p, --provider <provider>", "Provider to use (openai, azure-openai, vercel-ai)").option("-m, --model <model>", "Model to use").option("-o, --output <dir>", "Output directory for results").option("-v, --verbose", "Verbose output").option("-t, --tags <tags...>", "Filter test cases by tags").option("--save", "Save results to storage", true).option("-c, --concurrency <number>", "Number of concurrent test cases per scenario", "1").option("--parallel <number>", "Number of scenarios to run in parallel (default: sequential)").option("--timeout <ms>", "Timeout per test case in milliseconds").option("--retries <number>", "Number of retries per test case").option("--config <path>", "Path to config file").option("--redact", "Enable PII/sensitive data redaction in results").option("--redact-patterns <patterns...>", "Custom redaction patterns (regex or built-in: email, phone, credit_card, ssn, api_key)").option("-i, --interactive", "Enable interactive mode for scenario/provider selection").option("--ci", "CI mode: machine-readable output, no colors/spinners, JSON summary").option("--summary <format>", "Summary output format: json, text, or security (implies --ci for json/security)", "text").option("--baseline", "Compare against baseline and detect regression").option("--threshold <number>", "Regression threshold (0-1), e.g., 0.05 for 5%", "0.05").option("--budget <amount>", "Maximum budget in USD - fail if estimated cost exceeds this").option("--export <format>", "Export format: markdown").option("--export-output <dir>", "Output directory for exports (default: ./artemis-exports)").action(async (scenarioPath, options) => {
86712
+ cmd.description("Run test scenarios against an LLM. Accepts a file path, directory, or glob pattern.").argument("[scenario]", "Path to scenario file, directory, or glob pattern (e.g., scenarios/**/*.yaml)").option("-p, --provider <provider>", "Provider to use (openai, azure-openai, vercel-ai)").option("-m, --model <model>", "Model to use").option("-o, --output <dir>", "Output directory for results").option("-v, --verbose", "Verbose output").option("-t, --tags <tags...>", "Filter test cases by tags").option("--save", "Save results to storage", true).option("-c, --concurrency <number>", "Number of concurrent test cases per scenario", "1").option("--parallel <number>", "Number of scenarios to run in parallel (default: sequential)").option("--timeout <ms>", "Timeout per test case in milliseconds").option("--retries <number>", "Number of retries per test case").option("--config <path>", "Path to config file").option("--redact", "Enable PII/sensitive data redaction in results").option("--redact-patterns <patterns...>", "Custom redaction patterns (regex or built-in: email, phone, credit_card, ssn, api_key)").option("-i, --interactive", "Enable interactive mode for scenario/provider selection").option("--ci", "CI mode: machine-readable output, no colors/spinners, JSON summary").option("--summary <format>", "Summary output format: json, text, or security (implies --ci for json/security)", "text").option("--baseline", "Compare against baseline and detect regression").option("--threshold <number>", "Regression threshold (0-1), e.g., 0.05 for 5%", "0.05").option("--budget <amount>", "Maximum budget in USD - fail if estimated cost exceeds this").option("--export <format>", "Export format: markdown or junit (for CI integration)").option("--export-output <dir>", "Output directory for exports (default: ./artemis-exports)").action(async (scenarioPath, options) => {
86269
86713
  const isCIMode = options.ci || process.env.CI === "true" || options.summary === "json" || options.summary === "security";
86270
86714
  const spinner = isCIMode ? {
86271
86715
  start: () => {},
@@ -86398,13 +86842,20 @@ No scenarios selected. Exiting.`));
86398
86842
  const savedPath = await storage.save(result.manifest);
86399
86843
  console.log(source_default.dim(`Saved: ${savedPath}`));
86400
86844
  }
86401
- if (options.export === "markdown") {
86845
+ if (options.export) {
86402
86846
  const exportDir = options.exportOutput || "./artemis-exports";
86403
86847
  await mkdir5(exportDir, { recursive: true });
86404
- const markdown = generateMarkdownReport(result.manifest);
86405
- const mdPath = join6(exportDir, `${result.manifest.run_id}.md`);
86406
- await writeFile5(mdPath, markdown);
86407
- console.log(source_default.dim(`Exported: ${mdPath}`));
86848
+ if (options.export === "markdown") {
86849
+ const markdown = generateMarkdownReport(result.manifest);
86850
+ const mdPath = join6(exportDir, `${result.manifest.run_id}.md`);
86851
+ await writeFile5(mdPath, markdown);
86852
+ console.log(source_default.dim(`Exported: ${mdPath}`));
86853
+ } else if (options.export === "junit") {
86854
+ const junit = generateJUnitReport(result.manifest);
86855
+ const junitPath = join6(exportDir, `${result.manifest.run_id}.xml`);
86856
+ await writeFile5(junitPath, junit);
86857
+ console.log(source_default.dim(`Exported: ${junitPath}`));
86858
+ }
86408
86859
  }
86409
86860
  } catch (error) {
86410
86861
  console.log();
@@ -86952,6 +87403,168 @@ function displayHistogram(results) {
86952
87403
  }
86953
87404
  }
86954
87405
 
87406
+ // src/commands/validate.ts
87407
+ init_dist();
87408
+ import { readdirSync, statSync } from "fs";
87409
+ import { mkdir as mkdir7, writeFile as writeFile7 } from "fs/promises";
87410
+ import { basename as basename4, join as join8, resolve as resolve5 } from "path";
87411
+ init_source();
87412
+ var {Glob } = globalThis.Bun;
87413
+ init_ui();
87414
+ function validateCommand() {
87415
+ const cmd = new Command("validate");
87416
+ cmd.description("Validate scenario files without running them").argument("<path>", "Path to scenario file, directory, or glob pattern").option("--json", "Output as JSON").option("--strict", "Treat warnings as errors").option("-q, --quiet", "Only output errors (no success messages)").option("--export <format>", "Export results to format (junit for CI integration)").option("--export-output <dir>", "Output directory for exports (default: ./artemis-exports)").action(async (pathArg, options) => {
87417
+ const validator = new ScenarioValidator({ strict: options.strict });
87418
+ const files = resolveFiles(pathArg);
87419
+ if (files.length === 0) {
87420
+ if (options.json) {
87421
+ console.log(JSON.stringify({
87422
+ valid: false,
87423
+ error: `No scenario files found matching: ${pathArg}`,
87424
+ results: [],
87425
+ summary: { total: 0, passed: 0, failed: 0, withWarnings: 0 }
87426
+ }, null, 2));
87427
+ } else {
87428
+ console.log(source_default.red(`${icons.failed} No scenario files found matching: ${pathArg}`));
87429
+ }
87430
+ process.exit(2);
87431
+ }
87432
+ const results = [];
87433
+ if (!options.json && !options.quiet) {
87434
+ console.log(source_default.bold(`Validating scenarios...
87435
+ `));
87436
+ }
87437
+ for (const file of files) {
87438
+ const result = validator.validate(file);
87439
+ results.push(result);
87440
+ if (options.strict && result.warnings.length > 0) {
87441
+ result.valid = false;
87442
+ result.errors.push(...result.warnings.map((w2) => ({
87443
+ ...w2,
87444
+ severity: "error"
87445
+ })));
87446
+ }
87447
+ if (!options.json) {
87448
+ printFileResult(result, options);
87449
+ }
87450
+ }
87451
+ const summary = {
87452
+ total: results.length,
87453
+ passed: results.filter((r3) => r3.valid && r3.warnings.length === 0).length,
87454
+ failed: results.filter((r3) => !r3.valid).length,
87455
+ withWarnings: results.filter((r3) => r3.valid && r3.warnings.length > 0).length
87456
+ };
87457
+ if (options.json) {
87458
+ console.log(JSON.stringify({
87459
+ valid: summary.failed === 0,
87460
+ results: results.map((r3) => ({
87461
+ file: r3.file,
87462
+ valid: r3.valid,
87463
+ errors: r3.errors,
87464
+ warnings: r3.warnings
87465
+ })),
87466
+ summary
87467
+ }, null, 2));
87468
+ } else if (!options.quiet) {
87469
+ console.log();
87470
+ printSummary(summary, options.strict);
87471
+ }
87472
+ if (options.export === "junit") {
87473
+ const exportDir = options.exportOutput || "./artemis-exports";
87474
+ await mkdir7(exportDir, { recursive: true });
87475
+ const junit = generateValidationJUnitReport(results);
87476
+ const junitPath = join8(exportDir, `validation-${Date.now()}.xml`);
87477
+ await writeFile7(junitPath, junit);
87478
+ if (!options.quiet) {
87479
+ console.log(source_default.dim(`Exported: ${junitPath}`));
87480
+ }
87481
+ }
87482
+ if (summary.failed > 0) {
87483
+ process.exit(1);
87484
+ }
87485
+ });
87486
+ return cmd;
87487
+ }
87488
+ function resolveFiles(pathArg) {
87489
+ const resolved = resolve5(pathArg);
87490
+ try {
87491
+ const stat2 = statSync(resolved);
87492
+ if (stat2.isFile()) {
87493
+ return [resolved];
87494
+ }
87495
+ if (stat2.isDirectory()) {
87496
+ return findYamlFiles(resolved);
87497
+ }
87498
+ } catch {}
87499
+ const glob = new Glob(pathArg);
87500
+ const matches = [];
87501
+ for (const file of glob.scanSync({ absolute: true, onlyFiles: true })) {
87502
+ if (file.endsWith(".yaml") || file.endsWith(".yml")) {
87503
+ matches.push(file);
87504
+ }
87505
+ }
87506
+ return matches;
87507
+ }
87508
+ function findYamlFiles(dir) {
87509
+ const files = [];
87510
+ const entries = readdirSync(dir, { withFileTypes: true });
87511
+ for (const entry of entries) {
87512
+ const fullPath = join8(dir, entry.name);
87513
+ if (entry.isDirectory()) {
87514
+ files.push(...findYamlFiles(fullPath));
87515
+ } else if (entry.isFile() && (entry.name.endsWith(".yaml") || entry.name.endsWith(".yml"))) {
87516
+ files.push(fullPath);
87517
+ }
87518
+ }
87519
+ return files;
87520
+ }
87521
+ function printFileResult(result, options) {
87522
+ const fileName = basename4(result.file);
87523
+ if (result.valid && result.warnings.length === 0) {
87524
+ if (!options.quiet) {
87525
+ console.log(`${icons.passed} ${source_default.green(fileName)}`);
87526
+ }
87527
+ } else if (result.valid && result.warnings.length > 0) {
87528
+ console.log(`${icons.warning} ${source_default.yellow(fileName)}`);
87529
+ for (const warning of result.warnings) {
87530
+ const location = warning.column ? `Line ${warning.line}:${warning.column}` : `Line ${warning.line}`;
87531
+ console.log(source_default.yellow(` ${location}: ${warning.message}`));
87532
+ if (warning.suggestion) {
87533
+ console.log(source_default.dim(` Suggestion: ${warning.suggestion}`));
87534
+ }
87535
+ }
87536
+ } else {
87537
+ console.log(`${icons.failed} ${source_default.red(fileName)}`);
87538
+ for (const error of result.errors) {
87539
+ const location = error.column ? `Line ${error.line}:${error.column}` : `Line ${error.line}`;
87540
+ console.log(source_default.red(` ${location}: ${error.message}`));
87541
+ if (error.suggestion) {
87542
+ console.log(source_default.dim(` Suggestion: ${error.suggestion}`));
87543
+ }
87544
+ }
87545
+ for (const warning of result.warnings) {
87546
+ const location = warning.column ? `Line ${warning.line}:${warning.column}` : `Line ${warning.line}`;
87547
+ console.log(source_default.yellow(` ${location}: ${warning.message}`));
87548
+ }
87549
+ }
87550
+ }
87551
+ function printSummary(summary, strict) {
87552
+ const parts = [];
87553
+ if (summary.passed > 0) {
87554
+ parts.push(source_default.green(`${summary.passed} passed`));
87555
+ }
87556
+ if (summary.failed > 0) {
87557
+ parts.push(source_default.red(`${summary.failed} failed`));
87558
+ }
87559
+ if (summary.withWarnings > 0 && !strict) {
87560
+ parts.push(source_default.yellow(`${summary.withWarnings} with warnings`));
87561
+ }
87562
+ const statusIcon = summary.failed > 0 ? icons.failed : icons.passed;
87563
+ const statusColor = summary.failed > 0 ? source_default.red : source_default.green;
87564
+ console.log(statusColor(`${statusIcon} ${parts.join(", ")}`));
87565
+ console.log(source_default.dim(`${summary.total} scenario(s) validated`));
87566
+ }
87567
+
86955
87568
  // src/cli.ts
86956
87569
  function createCLI() {
86957
87570
  const program2 = new Command;
@@ -86975,6 +87588,7 @@ Checking for updates...`);
86975
87588
  });
86976
87589
  program2.addCommand(initCommand());
86977
87590
  program2.addCommand(runCommand());
87591
+ program2.addCommand(validateCommand());
86978
87592
  program2.addCommand(baselineCommand());
86979
87593
  program2.addCommand(compareCommand());
86980
87594
  program2.addCommand(historyCommand());