@nfdi4plants/arctrl 3.0.3 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/ts/node_modules/@fable-org/fable-library-js/System.Collections.Generic.js +320 -0
  2. package/dist/ts/ts/ARC.d.ts +3 -3
  3. package/dist/ts/ts/ARC.d.ts.map +1 -1
  4. package/dist/ts/ts/ARC.js +72 -93
  5. package/dist/ts/ts/CWL/Decode.d.ts +13 -10
  6. package/dist/ts/ts/CWL/Decode.d.ts.map +1 -1
  7. package/dist/ts/ts/CWL/Decode.js +91 -46
  8. package/dist/ts/ts/CWL/Encode.d.ts +1 -1
  9. package/dist/ts/ts/CWL/Encode.d.ts.map +1 -1
  10. package/dist/ts/ts/CWL/Encode.js +69 -51
  11. package/dist/ts/ts/CWL/ExpressionToolDescription.d.ts +6 -3
  12. package/dist/ts/ts/CWL/ExpressionToolDescription.d.ts.map +1 -1
  13. package/dist/ts/ts/CWL/ExpressionToolDescription.js +13 -4
  14. package/dist/ts/ts/CWL/OperationDescription.d.ts +6 -3
  15. package/dist/ts/ts/CWL/OperationDescription.d.ts.map +1 -1
  16. package/dist/ts/ts/CWL/OperationDescription.js +13 -4
  17. package/dist/ts/ts/CWL/Requirements.d.ts +6 -5
  18. package/dist/ts/ts/CWL/Requirements.d.ts.map +1 -1
  19. package/dist/ts/ts/CWL/Requirements.js +9 -8
  20. package/dist/ts/ts/CWL/ToolDescription.d.ts +6 -3
  21. package/dist/ts/ts/CWL/ToolDescription.d.ts.map +1 -1
  22. package/dist/ts/ts/CWL/ToolDescription.js +13 -4
  23. package/dist/ts/ts/CWL/WorkflowDescription.d.ts +6 -3
  24. package/dist/ts/ts/CWL/WorkflowDescription.d.ts.map +1 -1
  25. package/dist/ts/ts/CWL/WorkflowDescription.js +13 -4
  26. package/dist/ts/ts/CWL/WorkflowSteps.d.ts +1 -1
  27. package/dist/ts/ts/CWL/WorkflowSteps.js +1 -1
  28. package/dist/ts/ts/Contract/Git.d.ts.map +1 -1
  29. package/dist/ts/ts/Contract/Git.js +1 -1
  30. package/dist/ts/ts/ContractIO/ContractIO.d.ts +3 -3
  31. package/dist/ts/ts/ContractIO/ContractIO.d.ts.map +1 -1
  32. package/dist/ts/ts/ContractIO/ContractIO.js +27 -23
  33. package/dist/ts/ts/Conversion/Workflow.js +3 -3
  34. package/dist/ts/ts/Core/Datamap.d.ts.map +1 -1
  35. package/dist/ts/ts/Core/Datamap.js +4 -2
  36. package/dist/ts/ts/Core/OntologyAnnotation.d.ts.map +1 -1
  37. package/dist/ts/ts/Core/OntologyAnnotation.js +76 -2
  38. package/dist/ts/ts/Core/Table/ArcTableAux.d.ts +3 -0
  39. package/dist/ts/ts/Core/Table/ArcTableAux.d.ts.map +1 -1
  40. package/dist/ts/ts/Core/Table/ArcTableAux.js +23 -10
  41. package/dist/ts/ts/Core/Table/ArcTables.d.ts +1 -0
  42. package/dist/ts/ts/Core/Table/ArcTables.d.ts.map +1 -1
  43. package/dist/ts/ts/Core/Table/ArcTables.js +7 -3
  44. package/dist/ts/ts/Yaml/ValidationPackage.d.ts +1 -1
  45. package/dist/ts/ts/Yaml/ValidationPackage.js +5 -5
  46. package/dist/ts/ts/Yaml/ValidationPackagesConfig.d.ts +1 -1
  47. package/dist/ts/ts/Yaml/ValidationPackagesConfig.js +5 -5
  48. package/dist/ts/ts/Yaml.js +1 -1
  49. package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/Decode.fs.js +124 -24
  50. package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/Preprocessing.fs.js +66 -24
  51. package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/Reader.fs.js +474 -295
  52. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.7/Writer.fs.js +659 -0
  53. package/package.json +1 -1
  54. package/dist/ts/ts/fable_modules/YAMLicious.1.0.0-alpha.5/Writer.fs.js +0 -391
  55. /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/Encode.fs.js +0 -0
  56. /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/Escapes.fs.js +0 -0
  57. /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/FlowToBlock.fs.js +0 -0
  58. /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/Interop/JsInterop.fs.js +0 -0
  59. /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/Persil.fs.js +0 -0
  60. /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/Regex.fs.js +0 -0
  61. /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/RegexActivePatterns.fs.js +0 -0
  62. /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/StringBuffer.fs.js +0 -0
  63. /package/dist/ts/ts/fable_modules/{YAMLicious.1.0.0-alpha.5 → YAMLicious.1.0.0-alpha.7}/YAMLiciousTypes.fs.js +0 -0
@@ -1,14 +1,14 @@
1
1
  import { unescapeDoubleQuoted } from './Escapes.fs.js';
2
- import { BlockScalarStyle_Folded, BlockScalarStyle_Literal, ChompingMode_Clip, ChompingMode_Strip, ChompingMode_Keep, PreprocessorElement_Line, YAMLElement_Object, ScalarStyle_DoubleQuoted, ScalarStyle_SingleQuoted, YAMLElement_Value, YAMLContent_create_Z1C3A29C9, ScalarStyle_Block, YAMLElement_Comment, YAMLElement_Mapping, YAMLElement_Sequence, YAMLElement_Nil, YAMLElement_Alias } from './YAMLiciousTypes.fs.js';
2
+ import { BlockScalarStyle_Folded, BlockScalarStyle_Literal, ChompingMode_Clip, ChompingMode_Strip, ChompingMode_Keep, PreprocessorElement_Line, YAMLContent, ScalarStyle_Plain, YAMLElement_Object, ScalarStyle_DoubleQuoted, ScalarStyle_SingleQuoted, YAMLElement_Value, YAMLContent_create_Z1C3A29C9, ScalarStyle_Block, YAMLElement_Comment, YAMLElement_Mapping, YAMLElement_Sequence, YAMLElement_Nil, YAMLElement_Alias } from './YAMLiciousTypes.fs.js';
3
3
  import { match, create, replace } from '../../../node_modules/@fable-org/fable-library-js/RegExp.js';
4
4
  import { parse } from '../../../node_modules/@fable-org/fable-library-js/Int32.js';
5
5
  import { value, map as map$1, unwrap } from '../../../node_modules/@fable-org/fable-library-js/Option.js';
6
6
  import { getItemFromDict } from '../../../node_modules/@fable-org/fable-library-js/MapUtil.js';
7
7
  import { equals, comparePrimitives } from '../../../node_modules/@fable-org/fable-library-js/Util.js';
8
8
  import { isNullOrWhiteSpace, trimEnd, substring, join, toFail, printf, trimStart, split, replace as replace$1 } from '../../../node_modules/@fable-org/fable-library-js/String.js';
9
- import { length, takeWhile, toList, delay, append, singleton, skipWhile, map as map$2, collect as collect$1 } from '../../../node_modules/@fable-org/fable-library-js/Seq.js';
9
+ import { length, takeWhile, toList, delay, append, singleton, skipWhile, map as map$2 } from '../../../node_modules/@fable-org/fable-library-js/Seq.js';
10
10
  import { min } from '../../../node_modules/@fable-org/fable-library-js/Double.js';
11
- import { toArray, map, filter, min as min$1, isEmpty, head, tail, empty, singleton as singleton$1, cons, collect, reverse, append as append$1, ofArrayWithTail, exists, forAll, ofArray } from '../../../node_modules/@fable-org/fable-library-js/List.js';
11
+ import { toArray, map, filter, min as min$1, isEmpty, head, tail, empty, singleton as singleton$1, cons, collect, reverse, length as length$1, append as append$1, choose, ofArrayWithTail, exists, forAll, ofArray } from '../../../node_modules/@fable-org/fable-library-js/List.js';
12
12
  import { StringBuffer_$ctor, StringBuffer__Append_244C7CD6, StringBuffer__Append_Z721C83C5 } from './StringBuffer.fs.js';
13
13
  import { item, tryHead } from '../../../node_modules/@fable-org/fable-library-js/Array.js';
14
14
  import { toString } from '../../../node_modules/@fable-org/fable-library-js/Types.js';
@@ -16,6 +16,7 @@ import { $007CSequenceMinusOpener$007C_$007C, $007CYamlComment$007C_$007C, $007C
16
16
  import { defaultContext, transformElements, TransformContext } from './FlowToBlock.fs.js';
17
17
  import { VerbatimTagPattern, AnchorPattern } from './Regex.fs.js';
18
18
  import { tryFind } from '../../../node_modules/@fable-org/fable-library-js/Map.js';
19
+ import { Queue$1_$ctor_BB573A, Queue$1__Dequeue } from '../../../node_modules/@fable-org/fable-library-js/System.Collections.Generic.js';
19
20
  import { read as read$1, isDocumentStart, isDocumentEnd } from './Preprocessing.fs.js';
20
21
 
21
22
  function restoreScalarPlaceholderValue(entry) {
@@ -283,6 +284,7 @@ function tokenize(yamlList, stringDict, commentDict, handles) {
283
284
  return empty();
284
285
  }
285
286
  }, eles_2);
287
+ const flattenBlockScalarContent = (eles_3) => flattenBlockScalarContentWithDepth(0, eles_3);
286
288
  const extractProperties = (handles_2, v) => {
287
289
  let shorthand, m_2, handle, suffix, matchValue_2;
288
290
  let current = v.trim();
@@ -337,7 +339,7 @@ function tokenize(yamlList, stringDict, commentDict, handles) {
337
339
  const style_1 = value(matchValue_3)[0];
338
340
  const indent = value(matchValue_3)[1];
339
341
  const chomp = value(matchValue_3)[2];
340
- const value_4 = buildBlockScalarContent(style_1, chomp, headerIndent, indent, flattenBlockScalarContentWithDepth(0, block));
342
+ const value_4 = buildBlockScalarContent(style_1, chomp, headerIndent, indent, flattenBlockScalarContent(block));
341
343
  return {
342
344
  Chomp: chomp,
343
345
  Comment: unwrap(restoreCommentReplace(commentDict, commentId)),
@@ -348,73 +350,156 @@ function tokenize(yamlList, stringDict, commentDict, handles) {
348
350
  };
349
351
  }
350
352
  };
351
- const loopRead = (handles_3_mut, restlist_mut, acc_mut) => {
352
- let c2_2, c1_2, c1_1, c2_1, s_3, s_4, v_25, block_3, block_1, v_10, v_8, yamlAstList_1, v_2;
353
+ const tryCollapsePlainScalarContent = (hasInlineFirstLine, block_1, parsed) => {
354
+ let matchValue_6;
355
+ const element = parsed;
356
+ const loop = (allowMetadata_1_mut, items_mut, acc_mut) => {
357
+ let content, matchValue_4;
358
+ loop:
359
+ while (true) {
360
+ const allowMetadata_1 = allowMetadata_1_mut, items = items_mut, acc = acc_mut;
361
+ let matchResult, content_2, rest_1;
362
+ if (!isEmpty(items)) {
363
+ if (head(items).tag === /* Value */
364
+ 1) {
365
+ if (content = head(items).fields[0], (matchValue_4 = content.Style, matchValue_4 != null ? value(matchValue_4).tag === /* Plain */
366
+ 0 : true) && (allowMetadata_1 ? true : content.Comment == null && content.Anchor == null && content.Tag == null)) {
367
+ matchResult = 1;
368
+ content_2 = head(items).fields[0];
369
+ rest_1 = tail(items);
370
+ } else {
371
+ matchResult = 2;
372
+ }
373
+ } else {
374
+ matchResult = 2;
375
+ }
376
+ } else {
377
+ matchResult = 0;
378
+ }
379
+ switch (matchResult) {
380
+ case 0: {
381
+ const matchValue_5 = reverse(acc);
382
+ if (isEmpty(matchValue_5)) {
383
+ return void 0;
384
+ } else {
385
+ return matchValue_5;
386
+ }
387
+ }
388
+ case 1: {
389
+ allowMetadata_1_mut = false;
390
+ items_mut = rest_1;
391
+ acc_mut = cons(content_2, acc);
392
+ continue loop;
393
+ }
394
+ default:
395
+ return void 0;
396
+ }
397
+ break;
398
+ }
399
+ };
400
+ matchValue_6 = element.tag === /* Object */
401
+ 3 ? loop(true, element.fields[0], empty()) : void 0;
402
+ let matchResult_1, firstSegment, segments_1;
403
+ if (matchValue_6 != null) {
404
+ if (!isEmpty(value(matchValue_6))) {
405
+ matchResult_1 = 0;
406
+ firstSegment = head(value(matchValue_6));
407
+ segments_1 = value(matchValue_6);
408
+ } else {
409
+ matchResult_1 = 1;
410
+ }
411
+ } else {
412
+ matchResult_1 = 1;
413
+ }
414
+ switch (matchResult_1) {
415
+ case 0: {
416
+ const rawBlockLines = flattenBlockScalarContent(block_1);
417
+ if ((hasInlineFirstLine ? length$1(segments_1) - 1 : length$1(segments_1)) !== length$1(filter((line_1) => line_1.trim() !== "", rawBlockLines))) {
418
+ return void 0;
419
+ } else {
420
+ const values = Queue$1_$ctor_BB573A(hasInlineFirstLine ? tail(segments_1) : segments_1);
421
+ const renderedBlockLines = map((rawLine) => {
422
+ if (rawLine.trim() === "") {
423
+ return "";
424
+ } else {
425
+ return Queue$1__Dequeue(values).Value;
426
+ }
427
+ }, rawBlockLines);
428
+ const rawValue = join("\n", hasInlineFirstLine ? cons(firstSegment.Value, renderedBlockLines) : renderedBlockLines);
429
+ return new YAMLContent(rawValue, firstSegment.Comment, firstSegment.Anchor, firstSegment.Tag, rawValue.indexOf("\n") >= 0 ? ScalarStyle_Plain() : firstSegment.Style);
430
+ }
431
+ }
432
+ default:
433
+ return void 0;
434
+ }
435
+ };
436
+ const loopRead = (handles_3_mut, restlist_mut, acc_1_mut) => {
437
+ let c2_2, c1_2, c1_1, c2_1, s_5, s_6, matchValue_15, single, v_27, block_5, block_2, v_10, v_8, yamlAstList_1, v_2;
353
438
  loopRead:
354
439
  while (true) {
355
- const handles_3 = handles_3_mut, restlist = restlist_mut, acc = acc_mut;
356
- let matchResult, alias, rest;
440
+ const handles_3 = handles_3_mut, restlist = restlist_mut, acc_1 = acc_1_mut;
441
+ let matchResult_2, alias, rest_2;
357
442
  if (!isEmpty(restlist)) {
358
443
  const activePatternResult = $007CAliasNode$007C_$007C(head(restlist));
359
444
  if (activePatternResult != null) {
360
- matchResult = 0;
445
+ matchResult_2 = 0;
361
446
  alias = value(activePatternResult);
362
- rest = tail(restlist);
447
+ rest_2 = tail(restlist);
363
448
  } else if ($007CDocumentEnd$007C_$007C(head(restlist)) != null) {
364
- matchResult = 1;
449
+ matchResult_2 = 1;
365
450
  } else {
366
- matchResult = 2;
451
+ matchResult_2 = 2;
367
452
  }
368
453
  } else {
369
- matchResult = 2;
454
+ matchResult_2 = 2;
370
455
  }
371
- switch (matchResult) {
456
+ switch (matchResult_2) {
372
457
  case 0: {
373
458
  handles_3_mut = handles_3;
374
- restlist_mut = rest;
375
- acc_mut = cons(YAMLElement_Alias(alias), acc);
459
+ restlist_mut = rest_2;
460
+ acc_1_mut = cons(YAMLElement_Alias(alias), acc_1);
376
461
  continue loopRead;
377
462
  }
378
463
  case 1:
379
- return YAMLElement_Object(reverse(acc));
464
+ return YAMLElement_Object(reverse(acc_1));
380
465
  default: {
381
- let matchResult_1, rest0, v_1, yamlAstList;
466
+ let matchResult_3, rest0, v_1, yamlAstList;
382
467
  if (!isEmpty(restlist)) {
383
468
  const activePatternResult_2 = $007CSchemaNamespace$007C_$007C(head(restlist));
384
469
  if (activePatternResult_2 != null) {
385
470
  if (!isEmpty(tail(restlist))) {
386
471
  if (head(tail(restlist)).tag === /* Intendation */
387
472
  1) {
388
- matchResult_1 = 0;
473
+ matchResult_3 = 0;
389
474
  rest0 = tail(tail(restlist));
390
475
  v_1 = value(activePatternResult_2);
391
476
  yamlAstList = head(tail(restlist)).fields[0];
392
477
  } else {
393
- matchResult_1 = 1;
478
+ matchResult_3 = 1;
394
479
  }
395
480
  } else {
396
- matchResult_1 = 1;
481
+ matchResult_3 = 1;
397
482
  }
398
483
  } else {
399
- matchResult_1 = 1;
484
+ matchResult_3 = 1;
400
485
  }
401
486
  } else {
402
- matchResult_1 = 1;
487
+ matchResult_3 = 1;
403
488
  }
404
- switch (matchResult_1) {
489
+ switch (matchResult_3) {
405
490
  case 0: {
406
491
  const sequenceElements = collectSequenceElements(toList(takeWhile(isSequenceElement, rest0)));
407
492
  handles_3_mut = handles_3;
408
493
  restlist_mut = toList(skipWhile(isSequenceElement, rest0));
409
- acc_mut = cons(YAMLElement_Sequence(toList(delay(() => append(singleton(loopRead(handles_3, cons(PreprocessorElement_Line(v_1.Key), yamlAstList), empty())), delay(() => map$2((i) => loopRead(handles_3, i, empty()), sequenceElements)))))), acc);
494
+ acc_1_mut = cons(YAMLElement_Sequence(toList(delay(() => append(singleton(loopRead(handles_3, cons(PreprocessorElement_Line(v_1.Key), yamlAstList), empty())), delay(() => map$2((i) => loopRead(handles_3, i, empty()), sequenceElements)))))), acc_1);
410
495
  continue loopRead;
411
496
  }
412
497
  default: {
413
- let matchResult_2, rest0_2, v_3, rest0_3, v_4, yamlAstList_2;
498
+ let matchResult_4, rest0_2, v_3, rest0_3, v_4, yamlAstList_2;
414
499
  if (!isEmpty(restlist)) {
415
500
  const activePatternResult_3 = $007CSchemaNamespace$007C_$007C(head(restlist));
416
501
  if (activePatternResult_3 != null) {
417
- matchResult_2 = 0;
502
+ matchResult_4 = 0;
418
503
  rest0_2 = tail(restlist);
419
504
  v_3 = value(activePatternResult_3);
420
505
  } else {
@@ -424,96 +509,99 @@ function tokenize(yamlList, stringDict, commentDict, handles) {
424
509
  if (head(tail(restlist)).tag === /* Intendation */
425
510
  1) {
426
511
  if (yamlAstList_1 = head(tail(restlist)).fields[0], v_2 = value(activePatternResult_4), v_2.Value != null && isBlockScalarHeaderCandidate(value(v_2.Value))) {
427
- matchResult_2 = 1;
512
+ matchResult_4 = 1;
428
513
  rest0_3 = tail(tail(restlist));
429
514
  v_4 = value(activePatternResult_4);
430
515
  yamlAstList_2 = head(tail(restlist)).fields[0];
431
516
  } else {
432
- matchResult_2 = 2;
517
+ matchResult_4 = 2;
433
518
  }
434
519
  } else {
435
- matchResult_2 = 2;
520
+ matchResult_4 = 2;
436
521
  }
437
522
  } else {
438
- matchResult_2 = 2;
523
+ matchResult_4 = 2;
439
524
  }
440
525
  } else {
441
- matchResult_2 = 2;
526
+ matchResult_4 = 2;
442
527
  }
443
528
  }
444
529
  } else {
445
- matchResult_2 = 2;
530
+ matchResult_4 = 2;
446
531
  }
447
- switch (matchResult_2) {
532
+ switch (matchResult_4) {
448
533
  case 0: {
449
534
  const sequenceElements_1 = collectSequenceElements(toList(takeWhile(isSequenceElement, rest0_2)));
450
535
  handles_3_mut = handles_3;
451
536
  restlist_mut = toList(skipWhile(isSequenceElement, rest0_2));
452
- acc_mut = cons(YAMLElement_Sequence(toList(delay(() => append(singleton(loopRead(handles_3, singleton$1(PreprocessorElement_Line(v_3.Key)), empty())), delay(() => map$2((i_1) => loopRead(handles_3, i_1, empty()), sequenceElements_1)))))), acc);
537
+ acc_1_mut = cons(YAMLElement_Sequence(toList(delay(() => append(singleton(loopRead(handles_3, singleton$1(PreprocessorElement_Line(v_3.Key)), empty())), delay(() => map$2((i_1) => loopRead(handles_3, i_1, empty()), sequenceElements_1)))))), acc_1);
453
538
  continue loopRead;
454
539
  }
455
540
  case 1: {
456
- const matchValue_4 = tryReadBlockScalar(value(v_4.Value), v_4.Indent, void 0, yamlAstList_2);
457
- if (matchValue_4 == null) {
541
+ const matchValue_7 = tryReadBlockScalar(value(v_4.Value), v_4.Indent, void 0, yamlAstList_2);
542
+ if (matchValue_7 == null) {
458
543
  const arg = value(v_4.Value);
459
544
  return toFail(printf("Invalid sequence block scalar header: %s"))(arg);
460
545
  } else {
461
- const blockScalar = value(matchValue_4);
546
+ const blockScalar = value(matchValue_7);
462
547
  const sequenceElements_2 = collectSequenceElements(toList(takeWhile(isSequenceElement, rest0_3)));
463
- const rest_3 = toList(skipWhile(isSequenceElement, rest0_3));
548
+ const rest_5 = toList(skipWhile(isSequenceElement, rest0_3));
464
549
  const firstItem = YAMLElement_Object(singleton$1(YAMLElement_Value(YAMLContent_create_Z1C3A29C9(blockScalar.Value, unwrap(blockScalar.Comment), unwrap(blockScalar.Props.Anchor), unwrap(blockScalar.Props.Tag), ScalarStyle_Block(blockScalar.Style, blockScalar.Chomp, blockScalar.Indent)))));
465
550
  handles_3_mut = handles_3;
466
- restlist_mut = rest_3;
467
- acc_mut = cons(YAMLElement_Sequence(toList(delay(() => append(singleton(firstItem), delay(() => map$2((i_2) => loopRead(handles_3, i_2, empty()), sequenceElements_2)))))), acc);
551
+ restlist_mut = rest_5;
552
+ acc_1_mut = cons(YAMLElement_Sequence(toList(delay(() => append(singleton(firstItem), delay(() => map$2((i_2) => loopRead(handles_3, i_2, empty()), sequenceElements_2)))))), acc_1);
468
553
  continue loopRead;
469
554
  }
470
555
  }
471
556
  default: {
472
- let matchResult_3, rest0_4, v_5, yamlAstList_3;
557
+ let matchResult_5, rest0_4, v_5, yamlAstList_3;
473
558
  if (!isEmpty(restlist)) {
474
559
  const activePatternResult_5 = $007CSequenceMinusOpener$007C_$007C(head(restlist));
475
560
  if (activePatternResult_5 != null) {
476
561
  if (!isEmpty(tail(restlist))) {
477
562
  if (head(tail(restlist)).tag === /* Intendation */
478
563
  1) {
479
- matchResult_3 = 0;
564
+ matchResult_5 = 0;
480
565
  rest0_4 = tail(tail(restlist));
481
566
  v_5 = value(activePatternResult_5);
482
567
  yamlAstList_3 = head(tail(restlist)).fields[0];
483
568
  } else {
484
- matchResult_3 = 1;
569
+ matchResult_5 = 1;
485
570
  }
486
571
  } else {
487
- matchResult_3 = 1;
572
+ matchResult_5 = 1;
488
573
  }
489
574
  } else {
490
- matchResult_3 = 1;
575
+ matchResult_5 = 1;
491
576
  }
492
577
  } else {
493
- matchResult_3 = 1;
578
+ matchResult_5 = 1;
494
579
  }
495
- switch (matchResult_3) {
580
+ switch (matchResult_5) {
496
581
  case 0: {
497
- const objectList_1 = v_5.Value != null ? cons(PreprocessorElement_Line(value(v_5.Value)), yamlAstList_3) : yamlAstList_3;
582
+ const parsedFirstItem = loopRead(handles_3, v_5.Value != null ? cons(PreprocessorElement_Line(value(v_5.Value)), yamlAstList_3) : yamlAstList_3, empty());
583
+ let firstItem_1;
584
+ const matchValue_8 = tryCollapsePlainScalarContent(v_5.Value != null, yamlAstList_3, parsedFirstItem);
585
+ firstItem_1 = matchValue_8 == null ? parsedFirstItem : YAMLElement_Object(singleton$1(YAMLElement_Value(value(matchValue_8))));
498
586
  const sequenceElements_3 = collectSequenceElements(toList(takeWhile(isSequenceElement, rest0_4)));
499
587
  handles_3_mut = handles_3;
500
588
  restlist_mut = toList(skipWhile(isSequenceElement, rest0_4));
501
- acc_mut = cons(YAMLElement_Sequence(toList(delay(() => append(singleton(loopRead(handles_3, objectList_1, empty())), delay(() => map$2((i_3) => loopRead(handles_3, i_3, empty()), sequenceElements_3)))))), acc);
589
+ acc_1_mut = cons(YAMLElement_Sequence(toList(delay(() => append(singleton(firstItem_1), delay(() => map$2((i_3) => loopRead(handles_3, i_3, empty()), sequenceElements_3)))))), acc_1);
502
590
  continue loopRead;
503
591
  }
504
592
  default: {
505
- let matchResult_4, rest0_5, v_6, rest_6, v_7, closer, iList, opener, rest_7;
593
+ let matchResult_6, rest0_5, v_6, rest_8, v_7, closer, iList, opener, rest_9;
506
594
  if (!isEmpty(restlist)) {
507
595
  const activePatternResult_6 = $007CSequenceMinusOpener$007C_$007C(head(restlist));
508
596
  if (activePatternResult_6 != null) {
509
- matchResult_4 = 0;
597
+ matchResult_6 = 0;
510
598
  rest0_5 = tail(restlist);
511
599
  v_6 = value(activePatternResult_6);
512
600
  } else {
513
601
  const activePatternResult_7 = $007CInlineSequence$007C_$007C(head(restlist));
514
602
  if (activePatternResult_7 != null) {
515
- matchResult_4 = 1;
516
- rest_6 = tail(restlist);
603
+ matchResult_6 = 1;
604
+ rest_8 = tail(restlist);
517
605
  v_7 = value(activePatternResult_7);
518
606
  } else {
519
607
  const activePatternResult_8 = $007CSequenceSquareOpener$007C_$007C(head(restlist));
@@ -524,39 +612,39 @@ function tokenize(yamlList, stringDict, commentDict, handles) {
524
612
  if (!isEmpty(tail(tail(restlist)))) {
525
613
  const activePatternResult_9 = $007CSequenceSquareCloser$007C_$007C(head(tail(tail(restlist))));
526
614
  if (activePatternResult_9 != null) {
527
- matchResult_4 = 2;
615
+ matchResult_6 = 2;
528
616
  closer = value(activePatternResult_9);
529
617
  iList = head(tail(restlist)).fields[0];
530
618
  opener = value(activePatternResult_8);
531
- rest_7 = tail(tail(tail(restlist)));
619
+ rest_9 = tail(tail(tail(restlist)));
532
620
  } else {
533
- matchResult_4 = 3;
621
+ matchResult_6 = 3;
534
622
  }
535
623
  } else {
536
- matchResult_4 = 3;
624
+ matchResult_6 = 3;
537
625
  }
538
626
  } else {
539
- matchResult_4 = 3;
627
+ matchResult_6 = 3;
540
628
  }
541
629
  } else {
542
- matchResult_4 = 3;
630
+ matchResult_6 = 3;
543
631
  }
544
632
  } else {
545
- matchResult_4 = 3;
633
+ matchResult_6 = 3;
546
634
  }
547
635
  }
548
636
  }
549
637
  } else {
550
- matchResult_4 = 3;
638
+ matchResult_6 = 3;
551
639
  }
552
- switch (matchResult_4) {
640
+ switch (matchResult_6) {
553
641
  case 0: {
554
642
  const sequenceElements_4 = collectSequenceElements(toList(takeWhile(isSequenceElement, rest0_5)));
555
- const rest_5 = toList(skipWhile(isSequenceElement, rest0_5));
643
+ const rest_7 = toList(skipWhile(isSequenceElement, rest0_5));
556
644
  const objectList_2 = v_6.Value != null ? singleton$1(PreprocessorElement_Line(value(v_6.Value))) : empty();
557
645
  handles_3_mut = handles_3;
558
- restlist_mut = rest_5;
559
- acc_mut = cons(YAMLElement_Sequence(toList(delay(() => append(singleton(loopRead(handles_3, objectList_2, empty())), delay(() => map$2((i_4) => loopRead(handles_3, i_4, empty()), sequenceElements_4)))))), acc);
646
+ restlist_mut = rest_7;
647
+ acc_1_mut = cons(YAMLElement_Sequence(toList(delay(() => append(singleton(loopRead(handles_3, objectList_2, empty())), delay(() => map$2((i_4) => loopRead(handles_3, i_4, empty()), sequenceElements_4)))))), acc_1);
560
648
  continue loopRead;
561
649
  }
562
650
  case 1: {
@@ -564,49 +652,63 @@ function tokenize(yamlList, stringDict, commentDict, handles) {
564
652
  const split$1 = split(v_7.Value, [","], void 0, 1);
565
653
  const current_6 = YAMLElement_Sequence(toList(delay(() => map$2((value_5) => loopRead(handles_3, singleton$1(PreprocessorElement_Line(value_5.trim())), empty()), split$1))));
566
654
  handles_3_mut = handles_3;
567
- restlist_mut = rest_6;
568
- acc_mut = c != null ? ofArrayWithTail([current_6, YAMLElement_Comment(value(c))], acc) : cons(current_6, acc);
655
+ restlist_mut = rest_8;
656
+ acc_1_mut = c != null ? ofArrayWithTail([current_6, YAMLElement_Comment(value(c))], acc_1) : cons(current_6, acc_1);
569
657
  continue loopRead;
570
658
  }
571
659
  case 2: {
572
660
  const c1 = restoreCommentReplace(commentDict, opener.Comment);
573
661
  const c2 = restoreCommentReplace(commentDict, closer.Comment);
574
- const current_7 = YAMLElement_Sequence(toList(delay(() => collect$1((i_5) => singleton(loopRead(handles_3, singleton$1(i_5.tag === /* Line */
575
- 2 ? PreprocessorElement_Line(trimEnd(i_5.fields[0], ",")) : toFail(printf("Unexpected element in MultiLineSquareBrackets: %A"))(i_5)), empty())), iList))));
662
+ const sequenceItems = choose((_arg_2) => {
663
+ let s_2;
664
+ if (_arg_2.tag === /* Line */
665
+ 2) {
666
+ if (s_2 = _arg_2.fields[0], s_2.trim() === "") {
667
+ const s_3 = _arg_2.fields[0];
668
+ return void 0;
669
+ } else {
670
+ const s_4 = _arg_2.fields[0];
671
+ return PreprocessorElement_Line(trimEnd(s_4, ","));
672
+ }
673
+ } else {
674
+ return toFail(printf("Unexpected element in MultiLineSquareBrackets: %A"))(_arg_2);
675
+ }
676
+ }, iList);
677
+ const current_7 = YAMLElement_Sequence(toList(delay(() => map$2((i$0027) => loopRead(handles_3, singleton$1(i$0027), empty()), sequenceItems))));
576
678
  handles_3_mut = handles_3;
577
- restlist_mut = rest_7;
578
- acc_mut = c1 == null ? c2 == null ? cons(current_7, acc) : (c2_2 = value(c2), ofArrayWithTail([YAMLElement_Comment(c2_2), current_7], acc)) : c2 == null ? (c1_2 = value(c1), ofArrayWithTail([current_7, YAMLElement_Comment(c1_2)], acc)) : (c1_1 = value(c1), c2_1 = value(c2), ofArrayWithTail([YAMLElement_Comment(c2_1), current_7, YAMLElement_Comment(c1_1)], acc));
679
+ restlist_mut = rest_9;
680
+ acc_1_mut = c1 == null ? c2 == null ? cons(current_7, acc_1) : (c2_2 = value(c2), ofArrayWithTail([YAMLElement_Comment(c2_2), current_7], acc_1)) : c2 == null ? (c1_2 = value(c1), ofArrayWithTail([current_7, YAMLElement_Comment(c1_2)], acc_1)) : (c1_1 = value(c1), c2_1 = value(c2), ofArrayWithTail([YAMLElement_Comment(c2_1), current_7, YAMLElement_Comment(c1_1)], acc_1));
579
681
  continue loopRead;
580
682
  }
581
683
  default: {
582
- let matchResult_5, rest_9, v_9;
684
+ let matchResult_7, rest_11, v_9;
583
685
  if (!isEmpty(restlist)) {
584
686
  const activePatternResult_10 = $007CInlineJSON$007C_$007C(head(restlist));
585
687
  if (activePatternResult_10 != null) {
586
688
  if (v_8 = value(activePatternResult_10), v_8.Value.trim() === "") {
587
- matchResult_5 = 0;
588
- rest_9 = tail(restlist);
689
+ matchResult_7 = 0;
690
+ rest_11 = tail(restlist);
589
691
  v_9 = value(activePatternResult_10);
590
692
  } else {
591
- matchResult_5 = 1;
693
+ matchResult_7 = 1;
592
694
  }
593
695
  } else {
594
- matchResult_5 = 1;
696
+ matchResult_7 = 1;
595
697
  }
596
698
  } else {
597
- matchResult_5 = 1;
699
+ matchResult_7 = 1;
598
700
  }
599
- switch (matchResult_5) {
701
+ switch (matchResult_7) {
600
702
  case 0: {
601
703
  const c_1 = restoreCommentReplace(commentDict, v_9.Comment);
602
704
  const current_8 = empty();
603
705
  handles_3_mut = handles_3;
604
- restlist_mut = rest_9;
605
- acc_mut = c_1 != null ? append$1(current_8, cons(YAMLElement_Comment(value(c_1)), acc)) : append$1(current_8, acc);
706
+ restlist_mut = rest_11;
707
+ acc_1_mut = c_1 != null ? append$1(current_8, cons(YAMLElement_Comment(value(c_1)), acc_1)) : append$1(current_8, acc_1);
606
708
  continue loopRead;
607
709
  }
608
710
  default: {
609
- let matchResult_6, opener_1;
711
+ let matchResult_8, opener_1;
610
712
  if (!isEmpty(restlist)) {
611
713
  const activePatternResult_11 = $007CJSONKeyOpener$007C_$007C(head(restlist));
612
714
  if (activePatternResult_11 != null) {
@@ -615,191 +717,191 @@ function tokenize(yamlList, stringDict, commentDict, handles) {
615
717
  1) {
616
718
  if (!isEmpty(tail(tail(restlist)))) {
617
719
  if ($007CJSONCloser$007C_$007C(head(tail(tail(restlist)))) != null) {
618
- matchResult_6 = 0;
720
+ matchResult_8 = 0;
619
721
  opener_1 = value(activePatternResult_11);
620
722
  } else {
621
- matchResult_6 = 1;
723
+ matchResult_8 = 1;
622
724
  }
623
725
  } else {
624
- matchResult_6 = 1;
726
+ matchResult_8 = 1;
625
727
  }
626
728
  } else {
627
- matchResult_6 = 1;
729
+ matchResult_8 = 1;
628
730
  }
629
731
  } else {
630
- matchResult_6 = 1;
732
+ matchResult_8 = 1;
631
733
  }
632
734
  } else {
633
- matchResult_6 = 1;
735
+ matchResult_8 = 1;
634
736
  }
635
737
  } else {
636
- matchResult_6 = 1;
738
+ matchResult_8 = 1;
637
739
  }
638
- switch (matchResult_6) {
740
+ switch (matchResult_8) {
639
741
  case 0:
640
742
  return toFail(printf("Untransformed flow-style object detected. This is a bug in FlowToBlock transformation. Pattern: %A"))(opener_1);
641
743
  default: {
642
- let matchResult_7, v_11;
744
+ let matchResult_9, v_11;
643
745
  if (!isEmpty(restlist)) {
644
746
  const activePatternResult_13 = $007CInlineJSON$007C_$007C(head(restlist));
645
747
  if (activePatternResult_13 != null) {
646
748
  if (v_10 = value(activePatternResult_13), v_10.Value.trim() !== "") {
647
- matchResult_7 = 0;
749
+ matchResult_9 = 0;
648
750
  v_11 = value(activePatternResult_13);
649
751
  } else {
650
- matchResult_7 = 1;
752
+ matchResult_9 = 1;
651
753
  }
652
754
  } else {
653
- matchResult_7 = 1;
755
+ matchResult_9 = 1;
654
756
  }
655
757
  } else {
656
- matchResult_7 = 1;
758
+ matchResult_9 = 1;
657
759
  }
658
- switch (matchResult_7) {
760
+ switch (matchResult_9) {
659
761
  case 0:
660
762
  return toFail(printf("Untransformed non-empty flow-style object detected: {%s}. This is a bug in FlowToBlock transformation."))(v_11.Value);
661
763
  default: {
662
- let matchResult_8, k, rest_10, rest_11, v_16, yamlAstList_4;
764
+ let matchResult_10, k, rest_12, rest_13, v_16, yamlAstList_4;
663
765
  if (!isEmpty(restlist)) {
664
766
  const activePatternResult_14 = $007CExplicitKey$007C_$007C(head(restlist));
665
767
  if (activePatternResult_14 != null) {
666
- matchResult_8 = 0;
768
+ matchResult_10 = 0;
667
769
  k = value(activePatternResult_14);
668
- rest_10 = tail(restlist);
770
+ rest_12 = tail(restlist);
669
771
  } else {
670
772
  const activePatternResult_15 = $007CKey$007C_$007C(head(restlist));
671
773
  if (activePatternResult_15 != null) {
672
774
  if (!isEmpty(tail(restlist))) {
673
775
  if (head(tail(restlist)).tag === /* Intendation */
674
776
  1) {
675
- matchResult_8 = 1;
676
- rest_11 = tail(tail(restlist));
777
+ matchResult_10 = 1;
778
+ rest_13 = tail(tail(restlist));
677
779
  v_16 = value(activePatternResult_15);
678
780
  yamlAstList_4 = head(tail(restlist)).fields[0];
679
781
  } else {
680
- matchResult_8 = 2;
782
+ matchResult_10 = 2;
681
783
  }
682
784
  } else {
683
- matchResult_8 = 2;
785
+ matchResult_10 = 2;
684
786
  }
685
787
  } else {
686
- matchResult_8 = 2;
788
+ matchResult_10 = 2;
687
789
  }
688
790
  }
689
791
  } else {
690
- matchResult_8 = 2;
792
+ matchResult_10 = 2;
691
793
  }
692
- switch (matchResult_8) {
794
+ switch (matchResult_10) {
693
795
  case 0: {
694
796
  const parseValue = (vStr) => {
695
- let matchValue_6;
696
- return loopRead(handles_3, transformElements(new TransformContext(0, ctx.IndentStep, ctx.StringDict), (matchValue_6 = read$1(vStr).AST, matchValue_6.tag === /* Level */
697
- 0 ? matchValue_6.fields[0] : empty())), empty());
797
+ let matchValue_10;
798
+ return loopRead(handles_3, transformElements(new TransformContext(0, ctx.IndentStep, ctx.StringDict), (matchValue_10 = read$1(vStr).AST, matchValue_10.tag === /* Level */
799
+ 0 ? matchValue_10.fields[0] : empty())), empty());
698
800
  };
699
- let matchResult_9, iList_1, keyBody, tail$1, v_12;
700
- if (!isEmpty(rest_10)) {
701
- if (head(rest_10).tag === /* Intendation */
801
+ let matchResult_11, iList_1, keyBody, tail$1, v_12;
802
+ if (!isEmpty(rest_12)) {
803
+ if (head(rest_12).tag === /* Intendation */
702
804
  1) {
703
- if (!isEmpty(tail(rest_10))) {
704
- const activePatternResult_16 = $007CExplicitValue$007C_$007C(head(tail(rest_10)));
805
+ if (!isEmpty(tail(rest_12))) {
806
+ const activePatternResult_16 = $007CExplicitValue$007C_$007C(head(tail(rest_12)));
705
807
  if (activePatternResult_16 != null) {
706
- if (!isEmpty(tail(tail(rest_10)))) {
707
- if (head(tail(tail(rest_10))).tag === /* Intendation */
808
+ if (!isEmpty(tail(tail(rest_12)))) {
809
+ if (head(tail(tail(rest_12))).tag === /* Intendation */
708
810
  1) {
709
- matchResult_9 = 0;
710
- iList_1 = head(tail(tail(rest_10))).fields[0];
711
- keyBody = head(rest_10).fields[0];
712
- tail$1 = tail(tail(tail(rest_10)));
811
+ matchResult_11 = 0;
812
+ iList_1 = head(tail(tail(rest_12))).fields[0];
813
+ keyBody = head(rest_12).fields[0];
814
+ tail$1 = tail(tail(tail(rest_12)));
713
815
  v_12 = value(activePatternResult_16);
714
816
  } else {
715
- matchResult_9 = 1;
817
+ matchResult_11 = 1;
716
818
  }
717
819
  } else {
718
- matchResult_9 = 1;
820
+ matchResult_11 = 1;
719
821
  }
720
822
  } else {
721
- matchResult_9 = 1;
823
+ matchResult_11 = 1;
722
824
  }
723
825
  } else {
724
- matchResult_9 = 1;
826
+ matchResult_11 = 1;
725
827
  }
726
828
  } else {
727
- matchResult_9 = 1;
829
+ matchResult_11 = 1;
728
830
  }
729
831
  } else {
730
- matchResult_9 = 1;
832
+ matchResult_11 = 1;
731
833
  }
732
- switch (matchResult_9) {
834
+ switch (matchResult_11) {
733
835
  case 0: {
734
836
  const simplifiedKey = join("\n", flattenBlockScalar(keyBody));
735
- const kp = extractProperties(handles_3, k == null ? simplifiedKey : (s_3 = value(k), s_3 + (s_3 !== "" ? "\n" : "") + simplifiedKey));
837
+ const kp = extractProperties(handles_3, k == null ? simplifiedKey : (s_5 = value(k), s_5 + (s_5 !== "" ? "\n" : "") + simplifiedKey));
736
838
  const separator = (trimStart(v_12).startsWith("[") ? true : trimStart(v_12).startsWith("{")) ? " " : "\n";
737
839
  const valueElement = parseValue(v_12 + separator + join(separator, flattenBlockScalar(iList_1)));
738
840
  handles_3_mut = handles_3;
739
841
  restlist_mut = tail$1;
740
- acc_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(kp.Value, void 0, unwrap(kp.Anchor), unwrap(kp.Tag)), valueElement), acc);
842
+ acc_1_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(kp.Value, void 0, unwrap(kp.Anchor), unwrap(kp.Tag)), valueElement), acc_1);
741
843
  continue loopRead;
742
844
  }
743
845
  default: {
744
- let matchResult_10, keyBody_1, tail_1, v_13, iList_2, tail_2, v_14;
745
- if (!isEmpty(rest_10)) {
746
- if (head(rest_10).tag === /* Intendation */
846
+ let matchResult_12, keyBody_1, tail_1, v_13, iList_2, tail_2, v_14;
847
+ if (!isEmpty(rest_12)) {
848
+ if (head(rest_12).tag === /* Intendation */
747
849
  1) {
748
- if (!isEmpty(tail(rest_10))) {
749
- const activePatternResult_17 = $007CExplicitValue$007C_$007C(head(tail(rest_10)));
850
+ if (!isEmpty(tail(rest_12))) {
851
+ const activePatternResult_17 = $007CExplicitValue$007C_$007C(head(tail(rest_12)));
750
852
  if (activePatternResult_17 != null) {
751
- matchResult_10 = 0;
752
- keyBody_1 = head(rest_10).fields[0];
753
- tail_1 = tail(tail(rest_10));
853
+ matchResult_12 = 0;
854
+ keyBody_1 = head(rest_12).fields[0];
855
+ tail_1 = tail(tail(rest_12));
754
856
  v_13 = value(activePatternResult_17);
755
- } else if (head(tail(rest_10)).tag === /* Intendation */
857
+ } else if (head(tail(rest_12)).tag === /* Intendation */
756
858
  1) {
757
- const activePatternResult_18 = $007CExplicitValue$007C_$007C(head(rest_10));
859
+ const activePatternResult_18 = $007CExplicitValue$007C_$007C(head(rest_12));
758
860
  if (activePatternResult_18 != null) {
759
- matchResult_10 = 1;
760
- iList_2 = head(tail(rest_10)).fields[0];
761
- tail_2 = tail(tail(rest_10));
861
+ matchResult_12 = 1;
862
+ iList_2 = head(tail(rest_12)).fields[0];
863
+ tail_2 = tail(tail(rest_12));
762
864
  v_14 = value(activePatternResult_18);
763
865
  } else {
764
- matchResult_10 = 2;
866
+ matchResult_12 = 2;
765
867
  }
766
868
  } else {
767
- matchResult_10 = 2;
869
+ matchResult_12 = 2;
768
870
  }
769
871
  } else {
770
- matchResult_10 = 2;
872
+ matchResult_12 = 2;
771
873
  }
772
874
  } else {
773
- const activePatternResult_19 = $007CExplicitValue$007C_$007C(head(rest_10));
875
+ const activePatternResult_19 = $007CExplicitValue$007C_$007C(head(rest_12));
774
876
  if (activePatternResult_19 != null) {
775
- if (!isEmpty(tail(rest_10))) {
776
- if (head(tail(rest_10)).tag === /* Intendation */
877
+ if (!isEmpty(tail(rest_12))) {
878
+ if (head(tail(rest_12)).tag === /* Intendation */
777
879
  1) {
778
- matchResult_10 = 1;
779
- iList_2 = head(tail(rest_10)).fields[0];
780
- tail_2 = tail(tail(rest_10));
880
+ matchResult_12 = 1;
881
+ iList_2 = head(tail(rest_12)).fields[0];
882
+ tail_2 = tail(tail(rest_12));
781
883
  v_14 = value(activePatternResult_19);
782
884
  } else {
783
- matchResult_10 = 2;
885
+ matchResult_12 = 2;
784
886
  }
785
887
  } else {
786
- matchResult_10 = 2;
888
+ matchResult_12 = 2;
787
889
  }
788
890
  } else {
789
- matchResult_10 = 2;
891
+ matchResult_12 = 2;
790
892
  }
791
893
  }
792
894
  } else {
793
- matchResult_10 = 2;
895
+ matchResult_12 = 2;
794
896
  }
795
- switch (matchResult_10) {
897
+ switch (matchResult_12) {
796
898
  case 0: {
797
899
  const simplifiedKey_1 = join("\n", flattenBlockScalar(keyBody_1));
798
- const kp_1 = extractProperties(handles_3, k == null ? simplifiedKey_1 : (s_4 = value(k), s_4 + (s_4 !== "" ? "\n" : "") + simplifiedKey_1));
900
+ const kp_1 = extractProperties(handles_3, k == null ? simplifiedKey_1 : (s_6 = value(k), s_6 + (s_6 !== "" ? "\n" : "") + simplifiedKey_1));
799
901
  const valueElement_1 = parseValue(v_13);
800
902
  handles_3_mut = handles_3;
801
903
  restlist_mut = tail_1;
802
- acc_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(kp_1.Value, void 0, unwrap(kp_1.Anchor), unwrap(kp_1.Tag)), valueElement_1), acc);
904
+ acc_1_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(kp_1.Value, void 0, unwrap(kp_1.Anchor), unwrap(kp_1.Tag)), valueElement_1), acc_1);
803
905
  continue loopRead;
804
906
  }
805
907
  case 1: {
@@ -809,24 +911,24 @@ function tokenize(yamlList, stringDict, commentDict, handles) {
809
911
  const valueElement_2 = parseValue(v_14 + "\n" + join("\n", flattenBlockScalar(iList_2)));
810
912
  handles_3_mut = handles_3;
811
913
  restlist_mut = tail_2;
812
- acc_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(kp_2.Value, void 0, unwrap(kp_2.Anchor), unwrap(kp_2.Tag)), valueElement_2), acc);
914
+ acc_1_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(kp_2.Value, void 0, unwrap(kp_2.Anchor), unwrap(kp_2.Tag)), valueElement_2), acc_1);
813
915
  continue loopRead;
814
916
  }
815
917
  default: {
816
- let matchResult_11, tail_3, v_15;
817
- if (!isEmpty(rest_10)) {
818
- const activePatternResult_20 = $007CExplicitValue$007C_$007C(head(rest_10));
918
+ let matchResult_13, tail_3, v_15;
919
+ if (!isEmpty(rest_12)) {
920
+ const activePatternResult_20 = $007CExplicitValue$007C_$007C(head(rest_12));
819
921
  if (activePatternResult_20 != null) {
820
- matchResult_11 = 0;
821
- tail_3 = tail(rest_10);
922
+ matchResult_13 = 0;
923
+ tail_3 = tail(rest_12);
822
924
  v_15 = value(activePatternResult_20);
823
925
  } else {
824
- matchResult_11 = 1;
926
+ matchResult_13 = 1;
825
927
  }
826
928
  } else {
827
- matchResult_11 = 1;
929
+ matchResult_13 = 1;
828
930
  }
829
- switch (matchResult_11) {
931
+ switch (matchResult_13) {
830
932
  case 0: {
831
933
  const kp_3 = k == null ? {
832
934
  Value: ""
@@ -834,7 +936,7 @@ function tokenize(yamlList, stringDict, commentDict, handles) {
834
936
  const valueElement_3 = parseValue(v_15);
835
937
  handles_3_mut = handles_3;
836
938
  restlist_mut = tail_3;
837
- acc_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(kp_3.Value, void 0, unwrap(kp_3.Anchor), unwrap(kp_3.Tag)), valueElement_3), acc);
939
+ acc_1_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(kp_3.Value, void 0, unwrap(kp_3.Anchor), unwrap(kp_3.Tag)), valueElement_3), acc_1);
838
940
  continue loopRead;
839
941
  }
840
942
  default: {
@@ -842,8 +944,8 @@ function tokenize(yamlList, stringDict, commentDict, handles) {
842
944
  Value: ""
843
945
  } : extractProperties(handles_3, value(k));
844
946
  handles_3_mut = handles_3;
845
- restlist_mut = rest_10;
846
- acc_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(kp_4.Value, void 0, unwrap(kp_4.Anchor), unwrap(kp_4.Tag)), YAMLElement_Nil()), acc);
947
+ restlist_mut = rest_12;
948
+ acc_1_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(kp_4.Value, void 0, unwrap(kp_4.Anchor), unwrap(kp_4.Tag)), YAMLElement_Nil()), acc_1);
847
949
  continue loopRead;
848
950
  }
849
951
  }
@@ -855,13 +957,17 @@ function tokenize(yamlList, stringDict, commentDict, handles) {
855
957
  case 1: {
856
958
  const c_2 = restoreCommentReplace(commentDict, v_16.Comment);
857
959
  const props_2 = extractProperties(handles_3, v_16.Key);
960
+ const parsedValue = loopRead(handles_3, yamlAstList_4, empty());
961
+ let valueElement_4;
962
+ const matchValue_11 = tryCollapsePlainScalarContent(false, yamlAstList_4, parsedValue);
963
+ valueElement_4 = matchValue_11 == null ? parsedValue : YAMLElement_Object(singleton$1(YAMLElement_Value(value(matchValue_11))));
858
964
  handles_3_mut = handles_3;
859
- restlist_mut = rest_11;
860
- acc_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(props_2.Value, unwrap(c_2), unwrap(props_2.Anchor), unwrap(props_2.Tag)), loopRead(handles_3, yamlAstList_4, empty())), acc);
965
+ restlist_mut = rest_13;
966
+ acc_1_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(props_2.Value, unwrap(c_2), unwrap(props_2.Anchor), unwrap(props_2.Tag)), valueElement_4), acc_1);
861
967
  continue loopRead;
862
968
  }
863
969
  default: {
864
- let matchResult_12, rest0_6, v_17, w, yamlAstList_5;
970
+ let matchResult_14, rest0_6, v_17, w, yamlAstList_5;
865
971
  if (!isEmpty(restlist)) {
866
972
  const activePatternResult_21 = $007CKey$007C_$007C(head(restlist));
867
973
  if (activePatternResult_21 != null) {
@@ -871,240 +977,313 @@ function tokenize(yamlList, stringDict, commentDict, handles) {
871
977
  if (!isEmpty(tail(tail(restlist)))) {
872
978
  if (head(tail(tail(restlist))).tag === /* Intendation */
873
979
  1) {
874
- matchResult_12 = 0;
980
+ matchResult_14 = 0;
875
981
  rest0_6 = tail(tail(tail(restlist)));
876
982
  v_17 = value(activePatternResult_21);
877
983
  w = value(activePatternResult_22);
878
984
  yamlAstList_5 = head(tail(tail(restlist))).fields[0];
879
985
  } else {
880
- matchResult_12 = 1;
986
+ matchResult_14 = 1;
881
987
  }
882
988
  } else {
883
- matchResult_12 = 1;
989
+ matchResult_14 = 1;
884
990
  }
885
991
  } else {
886
- matchResult_12 = 1;
992
+ matchResult_14 = 1;
887
993
  }
888
994
  } else {
889
- matchResult_12 = 1;
995
+ matchResult_14 = 1;
890
996
  }
891
997
  } else {
892
- matchResult_12 = 1;
998
+ matchResult_14 = 1;
893
999
  }
894
1000
  } else {
895
- matchResult_12 = 1;
1001
+ matchResult_14 = 1;
896
1002
  }
897
- switch (matchResult_12) {
1003
+ switch (matchResult_14) {
898
1004
  case 0: {
899
1005
  const c_3 = restoreCommentReplace(commentDict, v_17.Comment);
900
1006
  const props_3 = extractProperties(handles_3, v_17.Key);
901
1007
  const objectList_3 = w.Value != null ? cons(PreprocessorElement_Line(value(w.Value)), yamlAstList_5) : yamlAstList_5;
902
1008
  const sequenceElements_5 = collectSequenceElements(toList(takeWhile(isSequenceElement, rest0_6)));
903
- const rest_12 = toList(skipWhile(isSequenceElement, rest0_6));
904
- const seq = YAMLElement_Sequence(toList(delay(() => append(singleton(loopRead(handles_3, objectList_3, empty())), delay(() => map$2((i_6) => loopRead(handles_3, i_6, empty()), sequenceElements_5))))));
1009
+ const rest_14 = toList(skipWhile(isSequenceElement, rest0_6));
1010
+ const seq = YAMLElement_Sequence(toList(delay(() => append(singleton(loopRead(handles_3, objectList_3, empty())), delay(() => map$2((i_5) => loopRead(handles_3, i_5, empty()), sequenceElements_5))))));
905
1011
  handles_3_mut = handles_3;
906
- restlist_mut = rest_12;
907
- acc_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(props_3.Value, unwrap(c_3), unwrap(props_3.Anchor), unwrap(props_3.Tag)), YAMLElement_Object(singleton$1(seq))), acc);
1012
+ restlist_mut = rest_14;
1013
+ acc_1_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(props_3.Value, unwrap(c_3), unwrap(props_3.Anchor), unwrap(props_3.Tag)), YAMLElement_Object(singleton$1(seq))), acc_1);
908
1014
  continue loopRead;
909
1015
  }
910
1016
  default: {
911
- let matchResult_13, rest0_7, v_18, w_1;
1017
+ let matchResult_15, rest0_7, v_18, w_1;
912
1018
  if (!isEmpty(restlist)) {
913
1019
  const activePatternResult_23 = $007CKey$007C_$007C(head(restlist));
914
1020
  if (activePatternResult_23 != null) {
915
1021
  if (!isEmpty(tail(restlist))) {
916
1022
  const activePatternResult_24 = $007CSequenceMinusOpener$007C_$007C(head(tail(restlist)));
917
1023
  if (activePatternResult_24 != null) {
918
- matchResult_13 = 0;
1024
+ matchResult_15 = 0;
919
1025
  rest0_7 = tail(tail(restlist));
920
1026
  v_18 = value(activePatternResult_23);
921
1027
  w_1 = value(activePatternResult_24);
922
1028
  } else {
923
- matchResult_13 = 1;
1029
+ matchResult_15 = 1;
924
1030
  }
925
1031
  } else {
926
- matchResult_13 = 1;
1032
+ matchResult_15 = 1;
927
1033
  }
928
1034
  } else {
929
- matchResult_13 = 1;
1035
+ matchResult_15 = 1;
930
1036
  }
931
1037
  } else {
932
- matchResult_13 = 1;
1038
+ matchResult_15 = 1;
933
1039
  }
934
- switch (matchResult_13) {
1040
+ switch (matchResult_15) {
935
1041
  case 0: {
936
1042
  const c_4 = restoreCommentReplace(commentDict, v_18.Comment);
937
1043
  const props_4 = extractProperties(handles_3, v_18.Key);
938
1044
  const sequenceElements_6 = collectSequenceElements(toList(takeWhile(isSequenceElement, rest0_7)));
939
- const rest_13 = toList(skipWhile(isSequenceElement, rest0_7));
940
- const seq_1 = YAMLElement_Sequence(toList(delay(() => append(singleton(loopRead(handles_3, singleton$1(PreprocessorElement_Line(value(w_1.Value))), empty())), delay(() => map$2((i_7) => loopRead(handles_3, i_7, empty()), sequenceElements_6))))));
1045
+ const rest_15 = toList(skipWhile(isSequenceElement, rest0_7));
1046
+ const seq_1 = YAMLElement_Sequence(toList(delay(() => append(singleton(loopRead(handles_3, singleton$1(PreprocessorElement_Line(value(w_1.Value))), empty())), delay(() => map$2((i_6) => loopRead(handles_3, i_6, empty()), sequenceElements_6))))));
941
1047
  handles_3_mut = handles_3;
942
- restlist_mut = rest_13;
943
- acc_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(props_4.Value, unwrap(c_4), unwrap(props_4.Anchor), unwrap(props_4.Tag)), YAMLElement_Object(singleton$1(seq_1))), acc);
1048
+ restlist_mut = rest_15;
1049
+ acc_1_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(props_4.Value, unwrap(c_4), unwrap(props_4.Anchor), unwrap(props_4.Tag)), YAMLElement_Object(singleton$1(seq_1))), acc_1);
944
1050
  continue loopRead;
945
1051
  }
946
1052
  default: {
947
- let matchResult_14, block_2, rest_15, v_20;
1053
+ let matchResult_16, block_3, rest_17, v_20;
948
1054
  if (!isEmpty(restlist)) {
949
1055
  const activePatternResult_25 = $007CKeyValue$007C_$007C(head(restlist));
950
1056
  if (activePatternResult_25 != null) {
951
1057
  if (!isEmpty(tail(restlist))) {
952
1058
  if (head(tail(restlist)).tag === /* Intendation */
953
1059
  1) {
954
- if (block_1 = head(tail(restlist)).fields[0], isBlockScalarHeaderCandidate(value(activePatternResult_25).Value)) {
955
- matchResult_14 = 0;
956
- block_2 = head(tail(restlist)).fields[0];
957
- rest_15 = tail(tail(restlist));
1060
+ if (block_2 = head(tail(restlist)).fields[0], isBlockScalarHeaderCandidate(value(activePatternResult_25).Value)) {
1061
+ matchResult_16 = 0;
1062
+ block_3 = head(tail(restlist)).fields[0];
1063
+ rest_17 = tail(tail(restlist));
958
1064
  v_20 = value(activePatternResult_25);
959
1065
  } else {
960
- matchResult_14 = 1;
1066
+ matchResult_16 = 1;
961
1067
  }
962
1068
  } else {
963
- matchResult_14 = 1;
1069
+ matchResult_16 = 1;
964
1070
  }
965
1071
  } else {
966
- matchResult_14 = 1;
1072
+ matchResult_16 = 1;
967
1073
  }
968
1074
  } else {
969
- matchResult_14 = 1;
1075
+ matchResult_16 = 1;
970
1076
  }
971
1077
  } else {
972
- matchResult_14 = 1;
1078
+ matchResult_16 = 1;
973
1079
  }
974
- switch (matchResult_14) {
1080
+ switch (matchResult_16) {
975
1081
  case 0: {
976
- const matchValue_7 = tryReadBlockScalar(v_20.Value, v_20.Indent, void 0, block_2);
977
- if (matchValue_7 == null) {
1082
+ const matchValue_12 = tryReadBlockScalar(v_20.Value, v_20.Indent, void 0, block_3);
1083
+ if (matchValue_12 == null) {
978
1084
  return toFail(printf("Invalid block scalar header: %s"))(v_20.Value);
979
1085
  } else {
980
- const blockScalar_1 = value(matchValue_7);
1086
+ const blockScalar_1 = value(matchValue_12);
981
1087
  const keyProps = extractProperties(handles_3, v_20.Key);
982
1088
  handles_3_mut = handles_3;
983
- restlist_mut = rest_15;
984
- acc_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(keyProps.Value, void 0, unwrap(keyProps.Anchor), unwrap(keyProps.Tag)), YAMLElement_Value(YAMLContent_create_Z1C3A29C9(blockScalar_1.Value, unwrap(blockScalar_1.Comment), unwrap(blockScalar_1.Props.Anchor), unwrap(blockScalar_1.Props.Tag), ScalarStyle_Block(blockScalar_1.Style, blockScalar_1.Chomp, blockScalar_1.Indent)))), acc);
1089
+ restlist_mut = rest_17;
1090
+ acc_1_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(keyProps.Value, void 0, unwrap(keyProps.Anchor), unwrap(keyProps.Tag)), YAMLElement_Value(YAMLContent_create_Z1C3A29C9(blockScalar_1.Value, unwrap(blockScalar_1.Comment), unwrap(blockScalar_1.Props.Anchor), unwrap(blockScalar_1.Props.Tag), ScalarStyle_Block(blockScalar_1.Style, blockScalar_1.Chomp, blockScalar_1.Indent)))), acc_1);
985
1091
  continue loopRead;
986
1092
  }
987
1093
  }
988
1094
  default: {
989
- let matchResult_15, rest_17, v_22, rest_18, v_23, block_4, rest_19, v_24;
1095
+ let matchResult_17, block_4, rest_18, v_21;
990
1096
  if (!isEmpty(restlist)) {
991
1097
  const activePatternResult_26 = $007CKeyValue$007C_$007C(head(restlist));
992
1098
  if (activePatternResult_26 != null) {
993
- matchResult_15 = 0;
994
- rest_17 = tail(restlist);
995
- v_22 = value(activePatternResult_26);
996
- } else {
997
- const activePatternResult_27 = $007CYamlComment$007C_$007C(head(restlist));
998
- if (activePatternResult_27 != null) {
999
- matchResult_15 = 1;
1000
- rest_18 = tail(restlist);
1001
- v_23 = value(activePatternResult_27);
1002
- } else {
1003
- const activePatternResult_28 = $007CYamlValue$007C_$007C(head(restlist));
1004
- if (activePatternResult_28 != null) {
1005
- if (!isEmpty(tail(restlist))) {
1006
- if (head(tail(restlist)).tag === /* Intendation */
1007
- 1) {
1008
- if (block_3 = head(tail(restlist)).fields[0], isBlockScalarHeaderCandidate(value(activePatternResult_28).Value)) {
1009
- matchResult_15 = 2;
1010
- block_4 = head(tail(restlist)).fields[0];
1011
- rest_19 = tail(tail(restlist));
1012
- v_24 = value(activePatternResult_28);
1013
- } else {
1014
- matchResult_15 = 3;
1015
- }
1016
- } else {
1017
- matchResult_15 = 3;
1018
- }
1019
- } else {
1020
- matchResult_15 = 3;
1021
- }
1099
+ if (!isEmpty(tail(restlist))) {
1100
+ if (head(tail(restlist)).tag === /* Intendation */
1101
+ 1) {
1102
+ matchResult_17 = 0;
1103
+ block_4 = head(tail(restlist)).fields[0];
1104
+ rest_18 = tail(tail(restlist));
1105
+ v_21 = value(activePatternResult_26);
1022
1106
  } else {
1023
- matchResult_15 = 3;
1107
+ matchResult_17 = 1;
1024
1108
  }
1109
+ } else {
1110
+ matchResult_17 = 1;
1025
1111
  }
1112
+ } else {
1113
+ matchResult_17 = 1;
1026
1114
  }
1027
1115
  } else {
1028
- matchResult_15 = 3;
1116
+ matchResult_17 = 1;
1029
1117
  }
1030
- switch (matchResult_15) {
1118
+ switch (matchResult_17) {
1031
1119
  case 0: {
1032
- const props_5 = extractProperties(handles_3, v_22.Key);
1033
- handles_3_mut = handles_3;
1034
- restlist_mut = rest_17;
1035
- acc_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(props_5.Value, void 0, unwrap(props_5.Anchor), unwrap(props_5.Tag)), loopRead(handles_3, singleton$1(PreprocessorElement_Line(v_22.Value)), empty())), acc);
1036
- continue loopRead;
1037
- }
1038
- case 1: {
1120
+ const keyProps_1 = extractProperties(handles_3, v_21.Key);
1121
+ const parsedValue_1 = loopRead(handles_3, cons(PreprocessorElement_Line(v_21.Value), block_4), empty());
1122
+ let valueElement_5;
1123
+ const matchValue_13 = tryCollapsePlainScalarContent(true, block_4, parsedValue_1);
1124
+ valueElement_5 = matchValue_13 == null ? parsedValue_1 : YAMLElement_Object(singleton$1(YAMLElement_Value(value(matchValue_13))));
1039
1125
  handles_3_mut = handles_3;
1040
1126
  restlist_mut = rest_18;
1041
- acc_mut = cons(YAMLElement_Comment(getItemFromDict(commentDict, v_23.Comment)), acc);
1127
+ acc_1_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(keyProps_1.Value, void 0, unwrap(keyProps_1.Anchor), unwrap(keyProps_1.Tag)), valueElement_5), acc_1);
1042
1128
  continue loopRead;
1043
1129
  }
1044
- case 2: {
1045
- const matchValue_8 = tryReadBlockScalar(v_24.Value, v_24.Indent, v_24.Comment, block_4);
1046
- if (matchValue_8 == null) {
1047
- return toFail(printf("Invalid block scalar header: %s"))(v_24.Value);
1048
- } else {
1049
- const blockScalar_2 = value(matchValue_8);
1050
- handles_3_mut = handles_3;
1051
- restlist_mut = rest_19;
1052
- acc_mut = cons(YAMLElement_Value(YAMLContent_create_Z1C3A29C9(blockScalar_2.Value, unwrap(blockScalar_2.Comment), unwrap(blockScalar_2.Props.Anchor), unwrap(blockScalar_2.Props.Tag), ScalarStyle_Block(blockScalar_2.Style, blockScalar_2.Chomp, blockScalar_2.Indent))), acc);
1053
- continue loopRead;
1054
- }
1055
- }
1056
1130
  default: {
1057
- let matchResult_16, rest_21, v_26;
1131
+ let matchResult_18, rest_20, v_23, rest_21, v_24, block_6, rest_22, v_25;
1058
1132
  if (!isEmpty(restlist)) {
1059
- const activePatternResult_29 = $007CYamlValue$007C_$007C(head(restlist));
1060
- if (activePatternResult_29 != null) {
1061
- if (v_25 = value(activePatternResult_29), v_25.Value === "" && v_25.Comment == null) {
1062
- matchResult_16 = 0;
1133
+ const activePatternResult_27 = $007CKeyValue$007C_$007C(head(restlist));
1134
+ if (activePatternResult_27 != null) {
1135
+ matchResult_18 = 0;
1136
+ rest_20 = tail(restlist);
1137
+ v_23 = value(activePatternResult_27);
1138
+ } else {
1139
+ const activePatternResult_28 = $007CYamlComment$007C_$007C(head(restlist));
1140
+ if (activePatternResult_28 != null) {
1141
+ matchResult_18 = 1;
1063
1142
  rest_21 = tail(restlist);
1064
- v_26 = value(activePatternResult_29);
1143
+ v_24 = value(activePatternResult_28);
1065
1144
  } else {
1066
- matchResult_16 = 1;
1145
+ const activePatternResult_29 = $007CYamlValue$007C_$007C(head(restlist));
1146
+ if (activePatternResult_29 != null) {
1147
+ if (!isEmpty(tail(restlist))) {
1148
+ if (head(tail(restlist)).tag === /* Intendation */
1149
+ 1) {
1150
+ if (block_5 = head(tail(restlist)).fields[0], isBlockScalarHeaderCandidate(value(activePatternResult_29).Value)) {
1151
+ matchResult_18 = 2;
1152
+ block_6 = head(tail(restlist)).fields[0];
1153
+ rest_22 = tail(tail(restlist));
1154
+ v_25 = value(activePatternResult_29);
1155
+ } else {
1156
+ matchResult_18 = 3;
1157
+ }
1158
+ } else {
1159
+ matchResult_18 = 3;
1160
+ }
1161
+ } else {
1162
+ matchResult_18 = 3;
1163
+ }
1164
+ } else {
1165
+ matchResult_18 = 3;
1166
+ }
1067
1167
  }
1068
- } else {
1069
- matchResult_16 = 1;
1070
1168
  }
1071
1169
  } else {
1072
- matchResult_16 = 1;
1170
+ matchResult_18 = 3;
1073
1171
  }
1074
- switch (matchResult_16) {
1172
+ switch (matchResult_18) {
1075
1173
  case 0: {
1174
+ const props_5 = extractProperties(handles_3, v_23.Key);
1175
+ handles_3_mut = handles_3;
1176
+ restlist_mut = rest_20;
1177
+ acc_1_mut = cons(YAMLElement_Mapping(YAMLContent_create_Z1C3A29C9(props_5.Value, void 0, unwrap(props_5.Anchor), unwrap(props_5.Tag)), loopRead(handles_3, singleton$1(PreprocessorElement_Line(v_23.Value)), empty())), acc_1);
1178
+ continue loopRead;
1179
+ }
1180
+ case 1: {
1076
1181
  handles_3_mut = handles_3;
1077
1182
  restlist_mut = rest_21;
1078
- acc_mut = acc;
1183
+ acc_1_mut = cons(YAMLElement_Comment(getItemFromDict(commentDict, v_24.Comment)), acc_1);
1079
1184
  continue loopRead;
1080
1185
  }
1081
- default:
1082
- if (isEmpty(restlist)) {
1083
- return YAMLElement_Object(reverse(acc));
1186
+ case 2: {
1187
+ const matchValue_14 = tryReadBlockScalar(v_25.Value, v_25.Indent, v_25.Comment, block_6);
1188
+ if (matchValue_14 == null) {
1189
+ return toFail(printf("Invalid block scalar header: %s"))(v_25.Value);
1084
1190
  } else {
1191
+ const blockScalar_2 = value(matchValue_14);
1192
+ handles_3_mut = handles_3;
1193
+ restlist_mut = rest_22;
1194
+ acc_1_mut = cons(YAMLElement_Value(YAMLContent_create_Z1C3A29C9(blockScalar_2.Value, unwrap(blockScalar_2.Comment), unwrap(blockScalar_2.Props.Anchor), unwrap(blockScalar_2.Props.Tag), ScalarStyle_Block(blockScalar_2.Style, blockScalar_2.Chomp, blockScalar_2.Indent))), acc_1);
1195
+ continue loopRead;
1196
+ }
1197
+ }
1198
+ default: {
1199
+ let matchResult_19, block_7, rest_23, v_26;
1200
+ if (!isEmpty(restlist)) {
1085
1201
  const activePatternResult_30 = $007CYamlValue$007C_$007C(head(restlist));
1086
1202
  if (activePatternResult_30 != null) {
1087
- const v_27 = value(activePatternResult_30);
1088
- const c_6 = restoreCommentReplace(commentDict, v_27.Comment);
1089
- const props_6 = extractProperties(handles_3, v_27.Value);
1090
- let patternInput_2;
1091
- const raw = props_6.Value;
1092
- const matchValue = tryParseExactPlaceholderIndex(raw);
1093
- if (matchValue == null) {
1094
- patternInput_2 = [restoreStringReplace(stringDict, raw), void 0];
1203
+ if (!isEmpty(tail(restlist))) {
1204
+ if (head(tail(restlist)).tag === /* Intendation */
1205
+ 1) {
1206
+ matchResult_19 = 0;
1207
+ block_7 = head(tail(restlist)).fields[0];
1208
+ rest_23 = tail(tail(restlist));
1209
+ v_26 = value(activePatternResult_30);
1210
+ } else {
1211
+ matchResult_19 = 1;
1212
+ }
1095
1213
  } else {
1096
- const entry = getItemFromDict(stringDict, value(matchValue));
1097
- patternInput_2 = [restoreScalarPlaceholderValue(entry), entry.Kind.tag === /* DoubleQuotedString */
1098
- 1 ? ScalarStyle_DoubleQuoted() : ScalarStyle_SingleQuoted()];
1214
+ matchResult_19 = 1;
1099
1215
  }
1216
+ } else {
1217
+ matchResult_19 = 1;
1218
+ }
1219
+ } else {
1220
+ matchResult_19 = 1;
1221
+ }
1222
+ switch (matchResult_19) {
1223
+ case 0: {
1224
+ const parsedValue_2 = loopRead(handles_3, cons(PreprocessorElement_Line(v_26.Value), block_7), empty());
1100
1225
  handles_3_mut = handles_3;
1101
- restlist_mut = tail(restlist);
1102
- acc_mut = cons(YAMLElement_Value(YAMLContent_create_Z1C3A29C9(patternInput_2[0], unwrap(c_6), unwrap(props_6.Anchor), unwrap(props_6.Tag), unwrap(patternInput_2[1]))), acc);
1226
+ restlist_mut = rest_23;
1227
+ acc_1_mut = cons((matchValue_15 = tryCollapsePlainScalarContent(true, block_7, parsedValue_2), matchValue_15 == null ? parsedValue_2.tag === /* Object */
1228
+ 3 ? !isEmpty(parsedValue_2.fields[0]) ? isEmpty(tail(parsedValue_2.fields[0])) ? (single = head(parsedValue_2.fields[0]), single) : toFail(printf("Unknown pattern: %A"))(cons(PreprocessorElement_Line(v_26.Value), block_7)) : toFail(printf("Unknown pattern: %A"))(cons(PreprocessorElement_Line(v_26.Value), block_7)) : toFail(printf("Unknown pattern: %A"))(cons(PreprocessorElement_Line(v_26.Value), block_7)) : YAMLElement_Value(value(matchValue_15))), acc_1);
1103
1229
  continue loopRead;
1104
- } else {
1105
- return toFail(printf("Unknown pattern: %A"))(restlist);
1230
+ }
1231
+ default: {
1232
+ let matchResult_20, rest_25, v_28;
1233
+ if (!isEmpty(restlist)) {
1234
+ const activePatternResult_31 = $007CYamlValue$007C_$007C(head(restlist));
1235
+ if (activePatternResult_31 != null) {
1236
+ if (v_27 = value(activePatternResult_31), v_27.Value === "" && v_27.Comment == null) {
1237
+ matchResult_20 = 0;
1238
+ rest_25 = tail(restlist);
1239
+ v_28 = value(activePatternResult_31);
1240
+ } else {
1241
+ matchResult_20 = 1;
1242
+ }
1243
+ } else {
1244
+ matchResult_20 = 1;
1245
+ }
1246
+ } else {
1247
+ matchResult_20 = 1;
1248
+ }
1249
+ switch (matchResult_20) {
1250
+ case 0: {
1251
+ handles_3_mut = handles_3;
1252
+ restlist_mut = rest_25;
1253
+ acc_1_mut = acc_1;
1254
+ continue loopRead;
1255
+ }
1256
+ default:
1257
+ if (isEmpty(restlist)) {
1258
+ return YAMLElement_Object(reverse(acc_1));
1259
+ } else {
1260
+ const activePatternResult_32 = $007CYamlValue$007C_$007C(head(restlist));
1261
+ if (activePatternResult_32 != null) {
1262
+ const v_29 = value(activePatternResult_32);
1263
+ const c_6 = restoreCommentReplace(commentDict, v_29.Comment);
1264
+ const props_6 = extractProperties(handles_3, v_29.Value);
1265
+ let patternInput_2;
1266
+ const raw = props_6.Value;
1267
+ const matchValue = tryParseExactPlaceholderIndex(raw);
1268
+ if (matchValue == null) {
1269
+ patternInput_2 = [restoreStringReplace(stringDict, raw), void 0];
1270
+ } else {
1271
+ const entry = getItemFromDict(stringDict, value(matchValue));
1272
+ patternInput_2 = [restoreScalarPlaceholderValue(entry), entry.Kind.tag === /* DoubleQuotedString */
1273
+ 1 ? ScalarStyle_DoubleQuoted() : ScalarStyle_SingleQuoted()];
1274
+ }
1275
+ handles_3_mut = handles_3;
1276
+ restlist_mut = tail(restlist);
1277
+ acc_1_mut = cons(YAMLElement_Value(YAMLContent_create_Z1C3A29C9(patternInput_2[0], unwrap(c_6), unwrap(props_6.Anchor), unwrap(props_6.Tag), unwrap(patternInput_2[1]))), acc_1);
1278
+ continue loopRead;
1279
+ } else {
1280
+ return toFail(printf("Unknown pattern: %A"))(restlist);
1281
+ }
1282
+ }
1283
+ }
1106
1284
  }
1107
1285
  }
1286
+ }
1108
1287
  }
1109
1288
  }
1110
1289
  }