chordsheetjs 10.9.1 → 10.9.3

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/lib/bundle.js CHANGED
@@ -14030,57 +14030,97 @@ to a key`);
14030
14030
  const peg$c10 = function(finger) {
14031
14031
  return finger;
14032
14032
  };
14033
- const peg$c11 = /^[1-9]/;
14033
+ const peg$c11 = /^[\-A-Za-z]/;
14034
14034
  const peg$c12 = peg$classExpectation([
14035
+ "-",
14035
14036
  [
14036
- "1",
14037
+ "A",
14038
+ "Z"
14039
+ ],
14040
+ [
14041
+ "a",
14042
+ "z"
14043
+ ]
14044
+ ], false, false);
14045
+ const peg$c13 = /^[0-9]/;
14046
+ const peg$c14 = peg$classExpectation([
14047
+ [
14048
+ "0",
14037
14049
  "9"
14038
14050
  ]
14039
14051
  ], false, false);
14040
- const peg$c13 = function(number) {
14052
+ const peg$c15 = function(number) {
14041
14053
  return parseInt(number, 10);
14042
14054
  };
14043
- const peg$c14 = function(fret) {
14055
+ const peg$c16 = /^[a-zA-Z]/;
14056
+ const peg$c17 = peg$classExpectation([
14057
+ [
14058
+ "a",
14059
+ "z"
14060
+ ],
14061
+ [
14062
+ "A",
14063
+ "Z"
14064
+ ]
14065
+ ], false, false);
14066
+ const peg$c18 = /^[\-NXnx]/;
14067
+ const peg$c19 = peg$classExpectation([
14068
+ "-",
14069
+ "N",
14070
+ "X",
14071
+ "n",
14072
+ "x"
14073
+ ], false, false);
14074
+ const peg$c20 = function(fret) {
14044
14075
  return fret;
14045
14076
  };
14046
- const peg$c15 = "0";
14047
- const peg$c16 = peg$literalExpectation("0", false);
14048
- const peg$c17 = function() {
14077
+ const peg$c21 = /^[1-9]/;
14078
+ const peg$c22 = peg$classExpectation([
14079
+ [
14080
+ "1",
14081
+ "9"
14082
+ ]
14083
+ ], false, false);
14084
+ const peg$c23 = "0";
14085
+ const peg$c24 = peg$literalExpectation("0", false);
14086
+ const peg$c25 = function() {
14049
14087
  return 0;
14050
14088
  };
14051
- const peg$c18 = "-1";
14052
- const peg$c19 = peg$literalExpectation("-1", false);
14053
- const peg$c20 = /^[Nx]/;
14054
- const peg$c21 = peg$classExpectation([
14089
+ const peg$c26 = "-1";
14090
+ const peg$c27 = peg$literalExpectation("-1", false);
14091
+ const peg$c28 = /^[NXnx]/;
14092
+ const peg$c29 = peg$classExpectation([
14055
14093
  "N",
14094
+ "X",
14095
+ "n",
14056
14096
  "x"
14057
14097
  ], false, false);
14058
- const peg$c22 = peg$otherExpectation("whitespace");
14059
- const peg$c23 = peg$otherExpectation("optional whitespace");
14060
- const peg$c24 = /^[ \t\n\r]/;
14061
- const peg$c25 = peg$classExpectation([
14098
+ const peg$c30 = peg$otherExpectation("whitespace");
14099
+ const peg$c31 = peg$otherExpectation("optional whitespace");
14100
+ const peg$c32 = /^[ \t\n\r]/;
14101
+ const peg$c33 = peg$classExpectation([
14062
14102
  " ",
14063
14103
  " ",
14064
14104
  "\n",
14065
14105
  "\r"
14066
14106
  ], false, false);
14067
- const peg$c26 = peg$otherExpectation("space");
14068
- const peg$c27 = /^[ \t]/;
14069
- const peg$c28 = peg$classExpectation([
14107
+ const peg$c34 = peg$otherExpectation("space");
14108
+ const peg$c35 = /^[ \t]/;
14109
+ const peg$c36 = peg$classExpectation([
14070
14110
  " ",
14071
14111
  " "
14072
14112
  ], false, false);
14073
- const peg$c29 = /^[\n\r]/;
14074
- const peg$c30 = peg$classExpectation([
14113
+ const peg$c37 = /^[\n\r]/;
14114
+ const peg$c38 = peg$classExpectation([
14075
14115
  "\n",
14076
14116
  "\r"
14077
14117
  ], false, false);
14078
- const peg$c31 = "\n";
14079
- const peg$c32 = peg$literalExpectation("\n", false);
14080
- const peg$c33 = "\r";
14081
- const peg$c34 = peg$literalExpectation("\r", false);
14082
- const peg$c35 = "\\";
14083
- const peg$c36 = peg$literalExpectation("\\", false);
14118
+ const peg$c39 = "\n";
14119
+ const peg$c40 = peg$literalExpectation("\n", false);
14120
+ const peg$c41 = "\r";
14121
+ const peg$c42 = peg$literalExpectation("\r", false);
14122
+ const peg$c43 = "\\";
14123
+ const peg$c44 = peg$literalExpectation("\\", false);
14084
14124
  let peg$currPos = 0;
14085
14125
  let peg$savedPos = 0;
14086
14126
  const peg$posDetailsCache = [
@@ -14314,10 +14354,10 @@ to a key`);
14314
14354
  }
14315
14355
  if (s2 !== peg$FAILED) {
14316
14356
  s3 = [];
14317
- s4 = peg$parseFingerNumberWithLeadingSpace();
14357
+ s4 = peg$parseFingerWithLeadingSpace();
14318
14358
  if (s4 !== peg$FAILED) while (s4 !== peg$FAILED) {
14319
14359
  s3.push(s4);
14320
- s4 = peg$parseFingerNumberWithLeadingSpace();
14360
+ s4 = peg$parseFingerWithLeadingSpace();
14321
14361
  }
14322
14362
  else s3 = peg$FAILED;
14323
14363
  if (s3 !== peg$FAILED) {
@@ -14338,12 +14378,12 @@ to a key`);
14338
14378
  }
14339
14379
  return s0;
14340
14380
  }
14341
- function peg$parseFingerNumberWithLeadingSpace() {
14381
+ function peg$parseFingerWithLeadingSpace() {
14342
14382
  let s0, s1, s2;
14343
14383
  s0 = peg$currPos;
14344
14384
  s1 = peg$parse__();
14345
14385
  if (s1 !== peg$FAILED) {
14346
- s2 = peg$parseFingerNumber();
14386
+ s2 = peg$parseFinger();
14347
14387
  if (s2 !== peg$FAILED) {
14348
14388
  peg$savedPos = s0;
14349
14389
  s1 = peg$c10(s2);
@@ -14358,23 +14398,59 @@ to a key`);
14358
14398
  }
14359
14399
  return s0;
14360
14400
  }
14401
+ function peg$parseFinger() {
14402
+ let s0;
14403
+ s0 = peg$parseFingerNumber();
14404
+ if (s0 === peg$FAILED) {
14405
+ if (peg$c11.test(input.charAt(peg$currPos))) {
14406
+ s0 = input.charAt(peg$currPos);
14407
+ peg$currPos++;
14408
+ } else {
14409
+ s0 = peg$FAILED;
14410
+ if (peg$silentFails === 0) peg$fail(peg$c12);
14411
+ }
14412
+ }
14413
+ return s0;
14414
+ }
14361
14415
  function peg$parseFingerNumber() {
14362
14416
  let s0, s1;
14363
14417
  s0 = peg$currPos;
14364
- if (peg$c11.test(input.charAt(peg$currPos))) {
14418
+ if (peg$c13.test(input.charAt(peg$currPos))) {
14365
14419
  s1 = input.charAt(peg$currPos);
14366
14420
  peg$currPos++;
14367
14421
  } else {
14368
14422
  s1 = peg$FAILED;
14369
- if (peg$silentFails === 0) peg$fail(peg$c12);
14423
+ if (peg$silentFails === 0) peg$fail(peg$c14);
14370
14424
  }
14371
14425
  if (s1 !== peg$FAILED) {
14372
14426
  peg$savedPos = s0;
14373
- s1 = peg$c13(s1);
14427
+ s1 = peg$c15(s1);
14374
14428
  }
14375
14429
  s0 = s1;
14376
14430
  return s0;
14377
14431
  }
14432
+ function peg$parseFingerLetter() {
14433
+ let s0;
14434
+ if (peg$c16.test(input.charAt(peg$currPos))) {
14435
+ s0 = input.charAt(peg$currPos);
14436
+ peg$currPos++;
14437
+ } else {
14438
+ s0 = peg$FAILED;
14439
+ if (peg$silentFails === 0) peg$fail(peg$c17);
14440
+ }
14441
+ return s0;
14442
+ }
14443
+ function peg$parseNoFingerSetting() {
14444
+ let s0;
14445
+ if (peg$c18.test(input.charAt(peg$currPos))) {
14446
+ s0 = input.charAt(peg$currPos);
14447
+ peg$currPos++;
14448
+ } else {
14449
+ s0 = peg$FAILED;
14450
+ if (peg$silentFails === 0) peg$fail(peg$c19);
14451
+ }
14452
+ return s0;
14453
+ }
14378
14454
  function peg$parseFretWithLeadingSpace() {
14379
14455
  let s0, s1, s2;
14380
14456
  s0 = peg$currPos;
@@ -14383,7 +14459,7 @@ to a key`);
14383
14459
  s2 = peg$parseFret();
14384
14460
  if (s2 !== peg$FAILED) {
14385
14461
  peg$savedPos = s0;
14386
- s1 = peg$c14(s2);
14462
+ s1 = peg$c20(s2);
14387
14463
  s0 = s1;
14388
14464
  } else {
14389
14465
  peg$currPos = s0;
@@ -14407,7 +14483,7 @@ to a key`);
14407
14483
  }
14408
14484
  if (s2 !== peg$FAILED) {
14409
14485
  peg$savedPos = s0;
14410
- s1 = peg$c14(s2);
14486
+ s1 = peg$c20(s2);
14411
14487
  s0 = s1;
14412
14488
  } else {
14413
14489
  peg$currPos = s0;
@@ -14422,16 +14498,16 @@ to a key`);
14422
14498
  function peg$parseFretNumber() {
14423
14499
  let s0, s1;
14424
14500
  s0 = peg$currPos;
14425
- if (peg$c11.test(input.charAt(peg$currPos))) {
14501
+ if (peg$c21.test(input.charAt(peg$currPos))) {
14426
14502
  s1 = input.charAt(peg$currPos);
14427
14503
  peg$currPos++;
14428
14504
  } else {
14429
14505
  s1 = peg$FAILED;
14430
- if (peg$silentFails === 0) peg$fail(peg$c12);
14506
+ if (peg$silentFails === 0) peg$fail(peg$c22);
14431
14507
  }
14432
14508
  if (s1 !== peg$FAILED) {
14433
14509
  peg$savedPos = s0;
14434
- s1 = peg$c13(s1);
14510
+ s1 = peg$c15(s1);
14435
14511
  }
14436
14512
  s0 = s1;
14437
14513
  return s0;
@@ -14440,35 +14516,35 @@ to a key`);
14440
14516
  let s0, s1;
14441
14517
  s0 = peg$currPos;
14442
14518
  if (input.charCodeAt(peg$currPos) === 48) {
14443
- s1 = peg$c15;
14519
+ s1 = peg$c23;
14444
14520
  peg$currPos++;
14445
14521
  } else {
14446
14522
  s1 = peg$FAILED;
14447
- if (peg$silentFails === 0) peg$fail(peg$c16);
14523
+ if (peg$silentFails === 0) peg$fail(peg$c24);
14448
14524
  }
14449
14525
  if (s1 !== peg$FAILED) {
14450
14526
  peg$savedPos = s0;
14451
- s1 = peg$c17();
14527
+ s1 = peg$c25();
14452
14528
  }
14453
14529
  s0 = s1;
14454
14530
  return s0;
14455
14531
  }
14456
14532
  function peg$parseNonSoundingString() {
14457
14533
  let s0;
14458
- if (input.substr(peg$currPos, 2) === peg$c18) {
14459
- s0 = peg$c18;
14534
+ if (input.substr(peg$currPos, 2) === peg$c26) {
14535
+ s0 = peg$c26;
14460
14536
  peg$currPos += 2;
14461
14537
  } else {
14462
14538
  s0 = peg$FAILED;
14463
- if (peg$silentFails === 0) peg$fail(peg$c19);
14539
+ if (peg$silentFails === 0) peg$fail(peg$c27);
14464
14540
  }
14465
14541
  if (s0 === peg$FAILED) {
14466
- if (peg$c20.test(input.charAt(peg$currPos))) {
14542
+ if (peg$c28.test(input.charAt(peg$currPos))) {
14467
14543
  s0 = input.charAt(peg$currPos);
14468
14544
  peg$currPos++;
14469
14545
  } else {
14470
14546
  s0 = peg$FAILED;
14471
- if (peg$silentFails === 0) peg$fail(peg$c21);
14547
+ if (peg$silentFails === 0) peg$fail(peg$c29);
14472
14548
  }
14473
14549
  }
14474
14550
  return s0;
@@ -14486,7 +14562,7 @@ to a key`);
14486
14562
  peg$silentFails--;
14487
14563
  if (s0 === peg$FAILED) {
14488
14564
  s1 = peg$FAILED;
14489
- if (peg$silentFails === 0) peg$fail(peg$c22);
14565
+ if (peg$silentFails === 0) peg$fail(peg$c30);
14490
14566
  }
14491
14567
  return s0;
14492
14568
  }
@@ -14502,18 +14578,18 @@ to a key`);
14502
14578
  peg$silentFails--;
14503
14579
  if (s0 === peg$FAILED) {
14504
14580
  s1 = peg$FAILED;
14505
- if (peg$silentFails === 0) peg$fail(peg$c23);
14581
+ if (peg$silentFails === 0) peg$fail(peg$c31);
14506
14582
  }
14507
14583
  return s0;
14508
14584
  }
14509
14585
  function peg$parseWhitespaceCharacter() {
14510
14586
  let s0;
14511
- if (peg$c24.test(input.charAt(peg$currPos))) {
14587
+ if (peg$c32.test(input.charAt(peg$currPos))) {
14512
14588
  s0 = input.charAt(peg$currPos);
14513
14589
  peg$currPos++;
14514
14590
  } else {
14515
14591
  s0 = peg$FAILED;
14516
- if (peg$silentFails === 0) peg$fail(peg$c25);
14592
+ if (peg$silentFails === 0) peg$fail(peg$c33);
14517
14593
  }
14518
14594
  return s0;
14519
14595
  }
@@ -14522,21 +14598,21 @@ to a key`);
14522
14598
  peg$silentFails++;
14523
14599
  s0 = peg$currPos;
14524
14600
  s1 = [];
14525
- if (peg$c27.test(input.charAt(peg$currPos))) {
14601
+ if (peg$c35.test(input.charAt(peg$currPos))) {
14526
14602
  s2 = input.charAt(peg$currPos);
14527
14603
  peg$currPos++;
14528
14604
  } else {
14529
14605
  s2 = peg$FAILED;
14530
- if (peg$silentFails === 0) peg$fail(peg$c28);
14606
+ if (peg$silentFails === 0) peg$fail(peg$c36);
14531
14607
  }
14532
14608
  if (s2 !== peg$FAILED) while (s2 !== peg$FAILED) {
14533
14609
  s1.push(s2);
14534
- if (peg$c27.test(input.charAt(peg$currPos))) {
14610
+ if (peg$c35.test(input.charAt(peg$currPos))) {
14535
14611
  s2 = input.charAt(peg$currPos);
14536
14612
  peg$currPos++;
14537
14613
  } else {
14538
14614
  s2 = peg$FAILED;
14539
- if (peg$silentFails === 0) peg$fail(peg$c28);
14615
+ if (peg$silentFails === 0) peg$fail(peg$c36);
14540
14616
  }
14541
14617
  }
14542
14618
  else s1 = peg$FAILED;
@@ -14545,18 +14621,18 @@ to a key`);
14545
14621
  peg$silentFails--;
14546
14622
  if (s0 === peg$FAILED) {
14547
14623
  s1 = peg$FAILED;
14548
- if (peg$silentFails === 0) peg$fail(peg$c26);
14624
+ if (peg$silentFails === 0) peg$fail(peg$c34);
14549
14625
  }
14550
14626
  return s0;
14551
14627
  }
14552
14628
  function peg$parseNewLine() {
14553
14629
  let s0;
14554
- if (peg$c29.test(input.charAt(peg$currPos))) {
14630
+ if (peg$c37.test(input.charAt(peg$currPos))) {
14555
14631
  s0 = input.charAt(peg$currPos);
14556
14632
  peg$currPos++;
14557
14633
  } else {
14558
14634
  s0 = peg$FAILED;
14559
- if (peg$silentFails === 0) peg$fail(peg$c30);
14635
+ if (peg$silentFails === 0) peg$fail(peg$c38);
14560
14636
  }
14561
14637
  if (s0 === peg$FAILED) s0 = peg$parseCarriageReturnLineFeed();
14562
14638
  return s0;
@@ -14586,33 +14662,33 @@ to a key`);
14586
14662
  function peg$parseLineFeed() {
14587
14663
  let s0;
14588
14664
  if (input.charCodeAt(peg$currPos) === 10) {
14589
- s0 = peg$c31;
14665
+ s0 = peg$c39;
14590
14666
  peg$currPos++;
14591
14667
  } else {
14592
14668
  s0 = peg$FAILED;
14593
- if (peg$silentFails === 0) peg$fail(peg$c32);
14669
+ if (peg$silentFails === 0) peg$fail(peg$c40);
14594
14670
  }
14595
14671
  return s0;
14596
14672
  }
14597
14673
  function peg$parseCarriageReturn() {
14598
14674
  let s0;
14599
14675
  if (input.charCodeAt(peg$currPos) === 13) {
14600
- s0 = peg$c33;
14676
+ s0 = peg$c41;
14601
14677
  peg$currPos++;
14602
14678
  } else {
14603
14679
  s0 = peg$FAILED;
14604
- if (peg$silentFails === 0) peg$fail(peg$c34);
14680
+ if (peg$silentFails === 0) peg$fail(peg$c42);
14605
14681
  }
14606
14682
  return s0;
14607
14683
  }
14608
14684
  function peg$parseEscape() {
14609
14685
  let s0;
14610
14686
  if (input.charCodeAt(peg$currPos) === 92) {
14611
- s0 = peg$c35;
14687
+ s0 = peg$c43;
14612
14688
  peg$currPos++;
14613
14689
  } else {
14614
14690
  s0 = peg$FAILED;
14615
- if (peg$silentFails === 0) peg$fail(peg$c36);
14691
+ if (peg$silentFails === 0) peg$fail(peg$c44);
14616
14692
  }
14617
14693
  return s0;
14618
14694
  }
@@ -14830,14 +14906,7 @@ to a key`);
14830
14906
  $7251dad5f4a4c35f$export$d2ed2b49c006eb23
14831
14907
  ];
14832
14908
  var $7251dad5f4a4c35f$var$DIRECTIVES_WITH_RENDERABLE_LABEL = [
14833
- $7251dad5f4a4c35f$export$8db6c706fc9142b2,
14834
- $7251dad5f4a4c35f$export$9e9edc166b8d0233,
14835
- $7251dad5f4a4c35f$export$3550cc87694d54e0,
14836
- $7251dad5f4a4c35f$export$4f5168acae064e01,
14837
- $7251dad5f4a4c35f$export$b7e6dcd848b88f43,
14838
- $7251dad5f4a4c35f$export$634ff7795b596e62,
14839
- $7251dad5f4a4c35f$export$8dd1111100e0e88d,
14840
- $7251dad5f4a4c35f$export$deca399f8cd9b7dc
14909
+ $7251dad5f4a4c35f$export$8db6c706fc9142b2
14841
14910
  ];
14842
14911
  var $7251dad5f4a4c35f$var$ALIASES = {
14843
14912
  [$7251dad5f4a4c35f$var$CHORDFONT_SHORT]: $7251dad5f4a4c35f$export$2b0cbe6e95114098,
@@ -15032,7 +15101,7 @@ to a key`);
15032
15101
  * https://chordpro.org/chordpro/directives-env_bridge/, https://chordpro.org/chordpro/directives-env_tab/
15033
15102
  */
15034
15103
  hasRenderableLabel() {
15035
- return $7251dad5f4a4c35f$var$DIRECTIVES_WITH_RENDERABLE_LABEL.includes(this.name) && this.hasLabel();
15104
+ return ($7251dad5f4a4c35f$var$DIRECTIVES_WITH_RENDERABLE_LABEL.includes(this.name) || this.isSectionStart()) && this.hasLabel();
15036
15105
  }
15037
15106
  /**
15038
15107
  * Checks whether the tag is either a standard meta tag or a custom meta directive (`{x_some_name}`)
@@ -15243,9 +15312,15 @@ to a key`);
15243
15312
  return "";
15244
15313
  }
15245
15314
  formatTag(tag) {
15315
+ if (tag.hasAttributes()) return `{${tag.originalName}: ${this.formatTagAttributes(tag)}}`;
15246
15316
  if (tag.hasValue()) return `{${tag.originalName}: ${tag.value}}`;
15247
15317
  return `{${tag.originalName}}`;
15248
15318
  }
15319
+ formatTagAttributes(tag) {
15320
+ const keys = Object.keys(tag.attributes);
15321
+ if (keys.length === 0) return "";
15322
+ return keys.map((key) => `${key}="${tag.attributes[key]}"`).join(" ");
15323
+ }
15249
15324
  formatChordLyricsPair(chordLyricsPair) {
15250
15325
  return [
15251
15326
  this.formatChordLyricsPairChords(chordLyricsPair),
@@ -15296,8 +15371,9 @@ to a key`);
15296
15371
  return {
15297
15372
  type: "tag",
15298
15373
  name,
15299
- value: value || "",
15300
- location: location.start
15374
+ location: location.start,
15375
+ value: value?.value || "",
15376
+ attributes: value?.attributes || {}
15301
15377
  };
15302
15378
  }
15303
15379
  function $51ced2cf8b50f946$export$4bae24da7c5e47c7(string, search, replaceMatch, replaceRest = (subString) => subString) {
@@ -15790,86 +15866,126 @@ to a key`);
15790
15866
  const peg$c94 = function(finger) {
15791
15867
  return finger;
15792
15868
  };
15793
- const peg$c95 = /^[1-9]/;
15869
+ const peg$c95 = /^[\-A-Za-z]/;
15794
15870
  const peg$c96 = peg$classExpectation([
15871
+ "-",
15795
15872
  [
15796
- "1",
15873
+ "A",
15874
+ "Z"
15875
+ ],
15876
+ [
15877
+ "a",
15878
+ "z"
15879
+ ]
15880
+ ], false, false);
15881
+ const peg$c97 = /^[0-9]/;
15882
+ const peg$c98 = peg$classExpectation([
15883
+ [
15884
+ "0",
15797
15885
  "9"
15798
15886
  ]
15799
15887
  ], false, false);
15800
- const peg$c97 = function(number) {
15888
+ const peg$c99 = function(number) {
15801
15889
  return parseInt(number, 10);
15802
15890
  };
15803
- const peg$c98 = function(fret) {
15891
+ const peg$c100 = /^[a-zA-Z]/;
15892
+ const peg$c101 = peg$classExpectation([
15893
+ [
15894
+ "a",
15895
+ "z"
15896
+ ],
15897
+ [
15898
+ "A",
15899
+ "Z"
15900
+ ]
15901
+ ], false, false);
15902
+ const peg$c102 = /^[\-NXnx]/;
15903
+ const peg$c103 = peg$classExpectation([
15904
+ "-",
15905
+ "N",
15906
+ "X",
15907
+ "n",
15908
+ "x"
15909
+ ], false, false);
15910
+ const peg$c104 = function(fret) {
15804
15911
  return fret;
15805
15912
  };
15806
- const peg$c99 = "0";
15807
- const peg$c100 = peg$literalExpectation("0", false);
15808
- const peg$c101 = function() {
15913
+ const peg$c105 = /^[1-9]/;
15914
+ const peg$c106 = peg$classExpectation([
15915
+ [
15916
+ "1",
15917
+ "9"
15918
+ ]
15919
+ ], false, false);
15920
+ const peg$c107 = "0";
15921
+ const peg$c108 = peg$literalExpectation("0", false);
15922
+ const peg$c109 = function() {
15809
15923
  return 0;
15810
15924
  };
15811
- const peg$c102 = "-1";
15812
- const peg$c103 = peg$literalExpectation("-1", false);
15813
- const peg$c104 = /^[Nx]/;
15814
- const peg$c105 = peg$classExpectation([
15925
+ const peg$c110 = "-1";
15926
+ const peg$c111 = peg$literalExpectation("-1", false);
15927
+ const peg$c112 = /^[NXnx]/;
15928
+ const peg$c113 = peg$classExpectation([
15815
15929
  "N",
15930
+ "X",
15931
+ "n",
15816
15932
  "x"
15817
15933
  ], false, false);
15818
- const peg$c106 = function(startTag, content, endTag) {
15934
+ const peg$c114 = function(startTag, content, endTag) {
15819
15935
  return $51ced2cf8b50f946$export$665e0f4515a68234(startTag, endTag, content);
15820
15936
  };
15821
- const peg$c107 = "start_of_abc";
15822
- const peg$c108 = peg$literalExpectation("start_of_abc", false);
15823
- const peg$c109 = "end_of_abc";
15824
- const peg$c110 = peg$literalExpectation("end_of_abc", false);
15825
- const peg$c111 = function(tagName) {
15937
+ const peg$c115 = "start_of_abc";
15938
+ const peg$c116 = peg$literalExpectation("start_of_abc", false);
15939
+ const peg$c117 = "end_of_abc";
15940
+ const peg$c118 = peg$literalExpectation("end_of_abc", false);
15941
+ const peg$c119 = function(tagName) {
15826
15942
  return $51ced2cf8b50f946$export$4478cda40be33ba2(tagName, null, location());
15827
15943
  };
15828
- const peg$c112 = "start_of_grid";
15829
- const peg$c113 = peg$literalExpectation("start_of_grid", false);
15830
- const peg$c114 = "sog";
15831
- const peg$c115 = peg$literalExpectation("sog", false);
15832
- const peg$c116 = "end_of_grid";
15833
- const peg$c117 = peg$literalExpectation("end_of_grid", false);
15834
- const peg$c118 = "eog";
15835
- const peg$c119 = peg$literalExpectation("eog", false);
15836
- const peg$c120 = "start_of_ly";
15837
- const peg$c121 = peg$literalExpectation("start_of_ly", false);
15838
- const peg$c122 = "end_of_ly";
15839
- const peg$c123 = peg$literalExpectation("end_of_ly", false);
15840
- const peg$c124 = "start_of_tab";
15841
- const peg$c125 = peg$literalExpectation("start_of_tab", false);
15842
- const peg$c126 = "sot";
15843
- const peg$c127 = peg$literalExpectation("sot", false);
15844
- const peg$c128 = "end_of_tab";
15845
- const peg$c129 = peg$literalExpectation("end_of_tab", false);
15846
- const peg$c130 = "eot";
15847
- const peg$c131 = peg$literalExpectation("eot", false);
15848
- const peg$c132 = peg$anyExpectation();
15849
- const peg$c133 = peg$otherExpectation("whitespace");
15850
- const peg$c134 = peg$otherExpectation("optional whitespace");
15851
- const peg$c135 = /^[ \t\n\r]/;
15852
- const peg$c136 = peg$classExpectation([
15944
+ const peg$c120 = "start_of_grid";
15945
+ const peg$c121 = peg$literalExpectation("start_of_grid", false);
15946
+ const peg$c122 = "sog";
15947
+ const peg$c123 = peg$literalExpectation("sog", false);
15948
+ const peg$c124 = "end_of_grid";
15949
+ const peg$c125 = peg$literalExpectation("end_of_grid", false);
15950
+ const peg$c126 = "eog";
15951
+ const peg$c127 = peg$literalExpectation("eog", false);
15952
+ const peg$c128 = "start_of_ly";
15953
+ const peg$c129 = peg$literalExpectation("start_of_ly", false);
15954
+ const peg$c130 = "end_of_ly";
15955
+ const peg$c131 = peg$literalExpectation("end_of_ly", false);
15956
+ const peg$c132 = "start_of_tab";
15957
+ const peg$c133 = peg$literalExpectation("start_of_tab", false);
15958
+ const peg$c134 = "sot";
15959
+ const peg$c135 = peg$literalExpectation("sot", false);
15960
+ const peg$c136 = "end_of_tab";
15961
+ const peg$c137 = peg$literalExpectation("end_of_tab", false);
15962
+ const peg$c138 = "eot";
15963
+ const peg$c139 = peg$literalExpectation("eot", false);
15964
+ const peg$c140 = peg$anyExpectation();
15965
+ const peg$c141 = peg$otherExpectation("whitespace");
15966
+ const peg$c142 = peg$otherExpectation("optional whitespace");
15967
+ const peg$c143 = /^[ \t\n\r]/;
15968
+ const peg$c144 = peg$classExpectation([
15853
15969
  " ",
15854
15970
  " ",
15855
15971
  "\n",
15856
15972
  "\r"
15857
15973
  ], false, false);
15858
- const peg$c137 = peg$otherExpectation("space");
15859
- const peg$c138 = /^[ \t]/;
15860
- const peg$c139 = peg$classExpectation([
15974
+ const peg$c145 = peg$otherExpectation("space");
15975
+ const peg$c146 = /^[ \t]/;
15976
+ const peg$c147 = peg$classExpectation([
15861
15977
  " ",
15862
15978
  " "
15863
15979
  ], false, false);
15864
- const peg$c140 = /^[\n\r]/;
15865
- const peg$c141 = peg$classExpectation([
15980
+ const peg$c148 = /^[\n\r]/;
15981
+ const peg$c149 = peg$classExpectation([
15866
15982
  "\n",
15867
15983
  "\r"
15868
15984
  ], false, false);
15869
- const peg$c142 = "\n";
15870
- const peg$c143 = peg$literalExpectation("\n", false);
15871
- const peg$c144 = "\r";
15872
- const peg$c145 = peg$literalExpectation("\r", false);
15985
+ const peg$c150 = "\n";
15986
+ const peg$c151 = peg$literalExpectation("\n", false);
15987
+ const peg$c152 = "\r";
15988
+ const peg$c153 = peg$literalExpectation("\r", false);
15873
15989
  let peg$currPos = 0;
15874
15990
  let peg$savedPos = 0;
15875
15991
  const peg$posDetailsCache = [
@@ -17639,10 +17755,10 @@ to a key`);
17639
17755
  }
17640
17756
  if (s2 !== peg$FAILED) {
17641
17757
  s3 = [];
17642
- s4 = peg$parseFingerNumberWithLeadingSpace();
17758
+ s4 = peg$parseFingerWithLeadingSpace();
17643
17759
  if (s4 !== peg$FAILED) while (s4 !== peg$FAILED) {
17644
17760
  s3.push(s4);
17645
- s4 = peg$parseFingerNumberWithLeadingSpace();
17761
+ s4 = peg$parseFingerWithLeadingSpace();
17646
17762
  }
17647
17763
  else s3 = peg$FAILED;
17648
17764
  if (s3 !== peg$FAILED) {
@@ -17663,12 +17779,12 @@ to a key`);
17663
17779
  }
17664
17780
  return s0;
17665
17781
  }
17666
- function peg$parseFingerNumberWithLeadingSpace() {
17782
+ function peg$parseFingerWithLeadingSpace() {
17667
17783
  let s0, s1, s2;
17668
17784
  s0 = peg$currPos;
17669
17785
  s1 = peg$parse__();
17670
17786
  if (s1 !== peg$FAILED) {
17671
- s2 = peg$parseFingerNumber();
17787
+ s2 = peg$parseFinger();
17672
17788
  if (s2 !== peg$FAILED) {
17673
17789
  peg$savedPos = s0;
17674
17790
  s1 = peg$c94(s2);
@@ -17683,23 +17799,59 @@ to a key`);
17683
17799
  }
17684
17800
  return s0;
17685
17801
  }
17802
+ function peg$parseFinger() {
17803
+ let s0;
17804
+ s0 = peg$parseFingerNumber();
17805
+ if (s0 === peg$FAILED) {
17806
+ if (peg$c95.test(input.charAt(peg$currPos))) {
17807
+ s0 = input.charAt(peg$currPos);
17808
+ peg$currPos++;
17809
+ } else {
17810
+ s0 = peg$FAILED;
17811
+ if (peg$silentFails === 0) peg$fail(peg$c96);
17812
+ }
17813
+ }
17814
+ return s0;
17815
+ }
17686
17816
  function peg$parseFingerNumber() {
17687
17817
  let s0, s1;
17688
17818
  s0 = peg$currPos;
17689
- if (peg$c95.test(input.charAt(peg$currPos))) {
17819
+ if (peg$c97.test(input.charAt(peg$currPos))) {
17690
17820
  s1 = input.charAt(peg$currPos);
17691
17821
  peg$currPos++;
17692
17822
  } else {
17693
17823
  s1 = peg$FAILED;
17694
- if (peg$silentFails === 0) peg$fail(peg$c96);
17824
+ if (peg$silentFails === 0) peg$fail(peg$c98);
17695
17825
  }
17696
17826
  if (s1 !== peg$FAILED) {
17697
17827
  peg$savedPos = s0;
17698
- s1 = peg$c97(s1);
17828
+ s1 = peg$c99(s1);
17699
17829
  }
17700
17830
  s0 = s1;
17701
17831
  return s0;
17702
17832
  }
17833
+ function peg$parseFingerLetter() {
17834
+ let s0;
17835
+ if (peg$c100.test(input.charAt(peg$currPos))) {
17836
+ s0 = input.charAt(peg$currPos);
17837
+ peg$currPos++;
17838
+ } else {
17839
+ s0 = peg$FAILED;
17840
+ if (peg$silentFails === 0) peg$fail(peg$c101);
17841
+ }
17842
+ return s0;
17843
+ }
17844
+ function peg$parseNoFingerSetting() {
17845
+ let s0;
17846
+ if (peg$c102.test(input.charAt(peg$currPos))) {
17847
+ s0 = input.charAt(peg$currPos);
17848
+ peg$currPos++;
17849
+ } else {
17850
+ s0 = peg$FAILED;
17851
+ if (peg$silentFails === 0) peg$fail(peg$c103);
17852
+ }
17853
+ return s0;
17854
+ }
17703
17855
  function peg$parseFretWithLeadingSpace() {
17704
17856
  let s0, s1, s2;
17705
17857
  s0 = peg$currPos;
@@ -17708,7 +17860,7 @@ to a key`);
17708
17860
  s2 = peg$parseFret();
17709
17861
  if (s2 !== peg$FAILED) {
17710
17862
  peg$savedPos = s0;
17711
- s1 = peg$c98(s2);
17863
+ s1 = peg$c104(s2);
17712
17864
  s0 = s1;
17713
17865
  } else {
17714
17866
  peg$currPos = s0;
@@ -17732,7 +17884,7 @@ to a key`);
17732
17884
  }
17733
17885
  if (s2 !== peg$FAILED) {
17734
17886
  peg$savedPos = s0;
17735
- s1 = peg$c98(s2);
17887
+ s1 = peg$c104(s2);
17736
17888
  s0 = s1;
17737
17889
  } else {
17738
17890
  peg$currPos = s0;
@@ -17747,16 +17899,16 @@ to a key`);
17747
17899
  function peg$parseFretNumber() {
17748
17900
  let s0, s1;
17749
17901
  s0 = peg$currPos;
17750
- if (peg$c95.test(input.charAt(peg$currPos))) {
17902
+ if (peg$c105.test(input.charAt(peg$currPos))) {
17751
17903
  s1 = input.charAt(peg$currPos);
17752
17904
  peg$currPos++;
17753
17905
  } else {
17754
17906
  s1 = peg$FAILED;
17755
- if (peg$silentFails === 0) peg$fail(peg$c96);
17907
+ if (peg$silentFails === 0) peg$fail(peg$c106);
17756
17908
  }
17757
17909
  if (s1 !== peg$FAILED) {
17758
17910
  peg$savedPos = s0;
17759
- s1 = peg$c97(s1);
17911
+ s1 = peg$c99(s1);
17760
17912
  }
17761
17913
  s0 = s1;
17762
17914
  return s0;
@@ -17765,35 +17917,35 @@ to a key`);
17765
17917
  let s0, s1;
17766
17918
  s0 = peg$currPos;
17767
17919
  if (input.charCodeAt(peg$currPos) === 48) {
17768
- s1 = peg$c99;
17920
+ s1 = peg$c107;
17769
17921
  peg$currPos++;
17770
17922
  } else {
17771
17923
  s1 = peg$FAILED;
17772
- if (peg$silentFails === 0) peg$fail(peg$c100);
17924
+ if (peg$silentFails === 0) peg$fail(peg$c108);
17773
17925
  }
17774
17926
  if (s1 !== peg$FAILED) {
17775
17927
  peg$savedPos = s0;
17776
- s1 = peg$c101();
17928
+ s1 = peg$c109();
17777
17929
  }
17778
17930
  s0 = s1;
17779
17931
  return s0;
17780
17932
  }
17781
17933
  function peg$parseNonSoundingString() {
17782
17934
  let s0;
17783
- if (input.substr(peg$currPos, 2) === peg$c102) {
17784
- s0 = peg$c102;
17935
+ if (input.substr(peg$currPos, 2) === peg$c110) {
17936
+ s0 = peg$c110;
17785
17937
  peg$currPos += 2;
17786
17938
  } else {
17787
17939
  s0 = peg$FAILED;
17788
- if (peg$silentFails === 0) peg$fail(peg$c103);
17940
+ if (peg$silentFails === 0) peg$fail(peg$c111);
17789
17941
  }
17790
17942
  if (s0 === peg$FAILED) {
17791
- if (peg$c104.test(input.charAt(peg$currPos))) {
17943
+ if (peg$c112.test(input.charAt(peg$currPos))) {
17792
17944
  s0 = input.charAt(peg$currPos);
17793
17945
  peg$currPos++;
17794
17946
  } else {
17795
17947
  s0 = peg$FAILED;
17796
- if (peg$silentFails === 0) peg$fail(peg$c105);
17948
+ if (peg$silentFails === 0) peg$fail(peg$c113);
17797
17949
  }
17798
17950
  }
17799
17951
  return s0;
@@ -17880,7 +18032,7 @@ to a key`);
17880
18032
  s4 = peg$parseAbcEndTag();
17881
18033
  if (s4 !== peg$FAILED) {
17882
18034
  peg$savedPos = s0;
17883
- s1 = peg$c106(s1, s3, s4);
18035
+ s1 = peg$c114(s1, s3, s4);
17884
18036
  s0 = s1;
17885
18037
  } else {
17886
18038
  peg$currPos = s0;
@@ -17913,12 +18065,12 @@ to a key`);
17913
18065
  if (s1 !== peg$FAILED) {
17914
18066
  s2 = peg$parse_();
17915
18067
  if (s2 !== peg$FAILED) {
17916
- if (input.substr(peg$currPos, 12) === peg$c107) {
17917
- s3 = peg$c107;
18068
+ if (input.substr(peg$currPos, 12) === peg$c115) {
18069
+ s3 = peg$c115;
17918
18070
  peg$currPos += 12;
17919
18071
  } else {
17920
18072
  s3 = peg$FAILED;
17921
- if (peg$silentFails === 0) peg$fail(peg$c108);
18073
+ if (peg$silentFails === 0) peg$fail(peg$c116);
17922
18074
  }
17923
18075
  if (s3 !== peg$FAILED) {
17924
18076
  s4 = peg$parse_();
@@ -17982,12 +18134,12 @@ to a key`);
17982
18134
  if (s1 !== peg$FAILED) {
17983
18135
  s2 = peg$parse_();
17984
18136
  if (s2 !== peg$FAILED) {
17985
- if (input.substr(peg$currPos, 10) === peg$c109) {
17986
- s3 = peg$c109;
18137
+ if (input.substr(peg$currPos, 10) === peg$c117) {
18138
+ s3 = peg$c117;
17987
18139
  peg$currPos += 10;
17988
18140
  } else {
17989
18141
  s3 = peg$FAILED;
17990
- if (peg$silentFails === 0) peg$fail(peg$c110);
18142
+ if (peg$silentFails === 0) peg$fail(peg$c118);
17991
18143
  }
17992
18144
  if (s3 !== peg$FAILED) {
17993
18145
  s4 = peg$parse_();
@@ -18001,7 +18153,7 @@ to a key`);
18001
18153
  }
18002
18154
  if (s5 !== peg$FAILED) {
18003
18155
  peg$savedPos = s0;
18004
- s1 = peg$c111(s3);
18156
+ s1 = peg$c119(s3);
18005
18157
  s0 = s1;
18006
18158
  } else {
18007
18159
  peg$currPos = s0;
@@ -18095,7 +18247,7 @@ to a key`);
18095
18247
  s4 = peg$parseGridEndTag();
18096
18248
  if (s4 !== peg$FAILED) {
18097
18249
  peg$savedPos = s0;
18098
- s1 = peg$c106(s1, s3, s4);
18250
+ s1 = peg$c114(s1, s3, s4);
18099
18251
  s0 = s1;
18100
18252
  } else {
18101
18253
  peg$currPos = s0;
@@ -18128,20 +18280,20 @@ to a key`);
18128
18280
  if (s1 !== peg$FAILED) {
18129
18281
  s2 = peg$parse_();
18130
18282
  if (s2 !== peg$FAILED) {
18131
- if (input.substr(peg$currPos, 13) === peg$c112) {
18132
- s3 = peg$c112;
18283
+ if (input.substr(peg$currPos, 13) === peg$c120) {
18284
+ s3 = peg$c120;
18133
18285
  peg$currPos += 13;
18134
18286
  } else {
18135
18287
  s3 = peg$FAILED;
18136
- if (peg$silentFails === 0) peg$fail(peg$c113);
18288
+ if (peg$silentFails === 0) peg$fail(peg$c121);
18137
18289
  }
18138
18290
  if (s3 === peg$FAILED) {
18139
- if (input.substr(peg$currPos, 3) === peg$c114) {
18140
- s3 = peg$c114;
18291
+ if (input.substr(peg$currPos, 3) === peg$c122) {
18292
+ s3 = peg$c122;
18141
18293
  peg$currPos += 3;
18142
18294
  } else {
18143
18295
  s3 = peg$FAILED;
18144
- if (peg$silentFails === 0) peg$fail(peg$c115);
18296
+ if (peg$silentFails === 0) peg$fail(peg$c123);
18145
18297
  }
18146
18298
  }
18147
18299
  if (s3 !== peg$FAILED) {
@@ -18206,20 +18358,20 @@ to a key`);
18206
18358
  if (s1 !== peg$FAILED) {
18207
18359
  s2 = peg$parse_();
18208
18360
  if (s2 !== peg$FAILED) {
18209
- if (input.substr(peg$currPos, 11) === peg$c116) {
18210
- s3 = peg$c116;
18361
+ if (input.substr(peg$currPos, 11) === peg$c124) {
18362
+ s3 = peg$c124;
18211
18363
  peg$currPos += 11;
18212
18364
  } else {
18213
18365
  s3 = peg$FAILED;
18214
- if (peg$silentFails === 0) peg$fail(peg$c117);
18366
+ if (peg$silentFails === 0) peg$fail(peg$c125);
18215
18367
  }
18216
18368
  if (s3 === peg$FAILED) {
18217
- if (input.substr(peg$currPos, 3) === peg$c118) {
18218
- s3 = peg$c118;
18369
+ if (input.substr(peg$currPos, 3) === peg$c126) {
18370
+ s3 = peg$c126;
18219
18371
  peg$currPos += 3;
18220
18372
  } else {
18221
18373
  s3 = peg$FAILED;
18222
- if (peg$silentFails === 0) peg$fail(peg$c119);
18374
+ if (peg$silentFails === 0) peg$fail(peg$c127);
18223
18375
  }
18224
18376
  }
18225
18377
  if (s3 !== peg$FAILED) {
@@ -18234,7 +18386,7 @@ to a key`);
18234
18386
  }
18235
18387
  if (s5 !== peg$FAILED) {
18236
18388
  peg$savedPos = s0;
18237
- s1 = peg$c111(s3);
18389
+ s1 = peg$c119(s3);
18238
18390
  s0 = s1;
18239
18391
  } else {
18240
18392
  peg$currPos = s0;
@@ -18328,7 +18480,7 @@ to a key`);
18328
18480
  s4 = peg$parseLyEndTag();
18329
18481
  if (s4 !== peg$FAILED) {
18330
18482
  peg$savedPos = s0;
18331
- s1 = peg$c106(s1, s3, s4);
18483
+ s1 = peg$c114(s1, s3, s4);
18332
18484
  s0 = s1;
18333
18485
  } else {
18334
18486
  peg$currPos = s0;
@@ -18361,12 +18513,12 @@ to a key`);
18361
18513
  if (s1 !== peg$FAILED) {
18362
18514
  s2 = peg$parse_();
18363
18515
  if (s2 !== peg$FAILED) {
18364
- if (input.substr(peg$currPos, 11) === peg$c120) {
18365
- s3 = peg$c120;
18516
+ if (input.substr(peg$currPos, 11) === peg$c128) {
18517
+ s3 = peg$c128;
18366
18518
  peg$currPos += 11;
18367
18519
  } else {
18368
18520
  s3 = peg$FAILED;
18369
- if (peg$silentFails === 0) peg$fail(peg$c121);
18521
+ if (peg$silentFails === 0) peg$fail(peg$c129);
18370
18522
  }
18371
18523
  if (s3 !== peg$FAILED) {
18372
18524
  s4 = peg$parse_();
@@ -18430,12 +18582,12 @@ to a key`);
18430
18582
  if (s1 !== peg$FAILED) {
18431
18583
  s2 = peg$parse_();
18432
18584
  if (s2 !== peg$FAILED) {
18433
- if (input.substr(peg$currPos, 9) === peg$c122) {
18434
- s3 = peg$c122;
18585
+ if (input.substr(peg$currPos, 9) === peg$c130) {
18586
+ s3 = peg$c130;
18435
18587
  peg$currPos += 9;
18436
18588
  } else {
18437
18589
  s3 = peg$FAILED;
18438
- if (peg$silentFails === 0) peg$fail(peg$c123);
18590
+ if (peg$silentFails === 0) peg$fail(peg$c131);
18439
18591
  }
18440
18592
  if (s3 !== peg$FAILED) {
18441
18593
  s4 = peg$parse_();
@@ -18449,7 +18601,7 @@ to a key`);
18449
18601
  }
18450
18602
  if (s5 !== peg$FAILED) {
18451
18603
  peg$savedPos = s0;
18452
- s1 = peg$c111(s3);
18604
+ s1 = peg$c119(s3);
18453
18605
  s0 = s1;
18454
18606
  } else {
18455
18607
  peg$currPos = s0;
@@ -18543,7 +18695,7 @@ to a key`);
18543
18695
  s4 = peg$parseTabEndTag();
18544
18696
  if (s4 !== peg$FAILED) {
18545
18697
  peg$savedPos = s0;
18546
- s1 = peg$c106(s1, s3, s4);
18698
+ s1 = peg$c114(s1, s3, s4);
18547
18699
  s0 = s1;
18548
18700
  } else {
18549
18701
  peg$currPos = s0;
@@ -18576,20 +18728,20 @@ to a key`);
18576
18728
  if (s1 !== peg$FAILED) {
18577
18729
  s2 = peg$parse_();
18578
18730
  if (s2 !== peg$FAILED) {
18579
- if (input.substr(peg$currPos, 12) === peg$c124) {
18580
- s3 = peg$c124;
18731
+ if (input.substr(peg$currPos, 12) === peg$c132) {
18732
+ s3 = peg$c132;
18581
18733
  peg$currPos += 12;
18582
18734
  } else {
18583
18735
  s3 = peg$FAILED;
18584
- if (peg$silentFails === 0) peg$fail(peg$c125);
18736
+ if (peg$silentFails === 0) peg$fail(peg$c133);
18585
18737
  }
18586
18738
  if (s3 === peg$FAILED) {
18587
- if (input.substr(peg$currPos, 3) === peg$c126) {
18588
- s3 = peg$c126;
18739
+ if (input.substr(peg$currPos, 3) === peg$c134) {
18740
+ s3 = peg$c134;
18589
18741
  peg$currPos += 3;
18590
18742
  } else {
18591
18743
  s3 = peg$FAILED;
18592
- if (peg$silentFails === 0) peg$fail(peg$c127);
18744
+ if (peg$silentFails === 0) peg$fail(peg$c135);
18593
18745
  }
18594
18746
  }
18595
18747
  if (s3 !== peg$FAILED) {
@@ -18654,20 +18806,20 @@ to a key`);
18654
18806
  if (s1 !== peg$FAILED) {
18655
18807
  s2 = peg$parse_();
18656
18808
  if (s2 !== peg$FAILED) {
18657
- if (input.substr(peg$currPos, 10) === peg$c128) {
18658
- s3 = peg$c128;
18809
+ if (input.substr(peg$currPos, 10) === peg$c136) {
18810
+ s3 = peg$c136;
18659
18811
  peg$currPos += 10;
18660
18812
  } else {
18661
18813
  s3 = peg$FAILED;
18662
- if (peg$silentFails === 0) peg$fail(peg$c129);
18814
+ if (peg$silentFails === 0) peg$fail(peg$c137);
18663
18815
  }
18664
18816
  if (s3 === peg$FAILED) {
18665
- if (input.substr(peg$currPos, 3) === peg$c130) {
18666
- s3 = peg$c130;
18817
+ if (input.substr(peg$currPos, 3) === peg$c138) {
18818
+ s3 = peg$c138;
18667
18819
  peg$currPos += 3;
18668
18820
  } else {
18669
18821
  s3 = peg$FAILED;
18670
- if (peg$silentFails === 0) peg$fail(peg$c131);
18822
+ if (peg$silentFails === 0) peg$fail(peg$c139);
18671
18823
  }
18672
18824
  }
18673
18825
  if (s3 !== peg$FAILED) {
@@ -18682,7 +18834,7 @@ to a key`);
18682
18834
  }
18683
18835
  if (s5 !== peg$FAILED) {
18684
18836
  peg$savedPos = s0;
18685
- s1 = peg$c111(s3);
18837
+ s1 = peg$c119(s3);
18686
18838
  s0 = s1;
18687
18839
  } else {
18688
18840
  peg$currPos = s0;
@@ -18713,7 +18865,7 @@ to a key`);
18713
18865
  peg$currPos++;
18714
18866
  } else {
18715
18867
  s0 = peg$FAILED;
18716
- if (peg$silentFails === 0) peg$fail(peg$c132);
18868
+ if (peg$silentFails === 0) peg$fail(peg$c140);
18717
18869
  }
18718
18870
  return s0;
18719
18871
  }
@@ -18730,7 +18882,7 @@ to a key`);
18730
18882
  peg$silentFails--;
18731
18883
  if (s0 === peg$FAILED) {
18732
18884
  s1 = peg$FAILED;
18733
- if (peg$silentFails === 0) peg$fail(peg$c133);
18885
+ if (peg$silentFails === 0) peg$fail(peg$c141);
18734
18886
  }
18735
18887
  return s0;
18736
18888
  }
@@ -18746,18 +18898,18 @@ to a key`);
18746
18898
  peg$silentFails--;
18747
18899
  if (s0 === peg$FAILED) {
18748
18900
  s1 = peg$FAILED;
18749
- if (peg$silentFails === 0) peg$fail(peg$c134);
18901
+ if (peg$silentFails === 0) peg$fail(peg$c142);
18750
18902
  }
18751
18903
  return s0;
18752
18904
  }
18753
18905
  function peg$parseWhitespaceCharacter() {
18754
18906
  let s0;
18755
- if (peg$c135.test(input.charAt(peg$currPos))) {
18907
+ if (peg$c143.test(input.charAt(peg$currPos))) {
18756
18908
  s0 = input.charAt(peg$currPos);
18757
18909
  peg$currPos++;
18758
18910
  } else {
18759
18911
  s0 = peg$FAILED;
18760
- if (peg$silentFails === 0) peg$fail(peg$c136);
18912
+ if (peg$silentFails === 0) peg$fail(peg$c144);
18761
18913
  }
18762
18914
  return s0;
18763
18915
  }
@@ -18766,21 +18918,21 @@ to a key`);
18766
18918
  peg$silentFails++;
18767
18919
  s0 = peg$currPos;
18768
18920
  s1 = [];
18769
- if (peg$c138.test(input.charAt(peg$currPos))) {
18921
+ if (peg$c146.test(input.charAt(peg$currPos))) {
18770
18922
  s2 = input.charAt(peg$currPos);
18771
18923
  peg$currPos++;
18772
18924
  } else {
18773
18925
  s2 = peg$FAILED;
18774
- if (peg$silentFails === 0) peg$fail(peg$c139);
18926
+ if (peg$silentFails === 0) peg$fail(peg$c147);
18775
18927
  }
18776
18928
  if (s2 !== peg$FAILED) while (s2 !== peg$FAILED) {
18777
18929
  s1.push(s2);
18778
- if (peg$c138.test(input.charAt(peg$currPos))) {
18930
+ if (peg$c146.test(input.charAt(peg$currPos))) {
18779
18931
  s2 = input.charAt(peg$currPos);
18780
18932
  peg$currPos++;
18781
18933
  } else {
18782
18934
  s2 = peg$FAILED;
18783
- if (peg$silentFails === 0) peg$fail(peg$c139);
18935
+ if (peg$silentFails === 0) peg$fail(peg$c147);
18784
18936
  }
18785
18937
  }
18786
18938
  else s1 = peg$FAILED;
@@ -18789,18 +18941,18 @@ to a key`);
18789
18941
  peg$silentFails--;
18790
18942
  if (s0 === peg$FAILED) {
18791
18943
  s1 = peg$FAILED;
18792
- if (peg$silentFails === 0) peg$fail(peg$c137);
18944
+ if (peg$silentFails === 0) peg$fail(peg$c145);
18793
18945
  }
18794
18946
  return s0;
18795
18947
  }
18796
18948
  function peg$parseNewLine() {
18797
18949
  let s0;
18798
- if (peg$c140.test(input.charAt(peg$currPos))) {
18950
+ if (peg$c148.test(input.charAt(peg$currPos))) {
18799
18951
  s0 = input.charAt(peg$currPos);
18800
18952
  peg$currPos++;
18801
18953
  } else {
18802
18954
  s0 = peg$FAILED;
18803
- if (peg$silentFails === 0) peg$fail(peg$c141);
18955
+ if (peg$silentFails === 0) peg$fail(peg$c149);
18804
18956
  }
18805
18957
  if (s0 === peg$FAILED) s0 = peg$parseCarriageReturnLineFeed();
18806
18958
  return s0;
@@ -18830,22 +18982,22 @@ to a key`);
18830
18982
  function peg$parseLineFeed() {
18831
18983
  let s0;
18832
18984
  if (input.charCodeAt(peg$currPos) === 10) {
18833
- s0 = peg$c142;
18985
+ s0 = peg$c150;
18834
18986
  peg$currPos++;
18835
18987
  } else {
18836
18988
  s0 = peg$FAILED;
18837
- if (peg$silentFails === 0) peg$fail(peg$c143);
18989
+ if (peg$silentFails === 0) peg$fail(peg$c151);
18838
18990
  }
18839
18991
  return s0;
18840
18992
  }
18841
18993
  function peg$parseCarriageReturn() {
18842
18994
  let s0;
18843
18995
  if (input.charCodeAt(peg$currPos) === 13) {
18844
- s0 = peg$c144;
18996
+ s0 = peg$c152;
18845
18997
  peg$currPos++;
18846
18998
  } else {
18847
18999
  s0 = peg$FAILED;
18848
- if (peg$silentFails === 0) peg$fail(peg$c145);
19000
+ if (peg$silentFails === 0) peg$fail(peg$c153);
18849
19001
  }
18850
19002
  return s0;
18851
19003
  }
@@ -19432,24 +19584,6 @@ to a key`);
19432
19584
  }
19433
19585
  };
19434
19586
  var $7981c56ae667de5e$export$2e2bcd8739ae039 = $7981c56ae667de5e$var$ParserWarning;
19435
- var $69c885ea9d252cfd$var$START_TAG_TO_SECTION_TYPE = {
19436
- [(0, $7251dad5f4a4c35f$export$9e9edc166b8d0233)]: (0, $dce48cb70c4120bb$export$92249c36c213e508),
19437
- [(0, $7251dad5f4a4c35f$export$3550cc87694d54e0)]: (0, $dce48cb70c4120bb$export$78d8c50e853acd10),
19438
- [(0, $7251dad5f4a4c35f$export$4f5168acae064e01)]: (0, $dce48cb70c4120bb$export$8db6c706fc9142b2),
19439
- [(0, $7251dad5f4a4c35f$export$b7e6dcd848b88f43)]: (0, $dce48cb70c4120bb$export$e2b0b9a5e613f348),
19440
- [(0, $7251dad5f4a4c35f$export$634ff7795b596e62)]: (0, $dce48cb70c4120bb$export$6a5a2eab72b6e3d),
19441
- [(0, $7251dad5f4a4c35f$export$8dd1111100e0e88d)]: (0, $dce48cb70c4120bb$export$f1c9dd0f5207dd5e),
19442
- [(0, $7251dad5f4a4c35f$export$deca399f8cd9b7dc)]: (0, $dce48cb70c4120bb$export$4b194284baed1659)
19443
- };
19444
- var $69c885ea9d252cfd$var$END_TAG_TO_SECTION_TYPE = {
19445
- [(0, $7251dad5f4a4c35f$export$37c7b13f53af2469)]: (0, $dce48cb70c4120bb$export$92249c36c213e508),
19446
- [(0, $7251dad5f4a4c35f$export$1c874e9780385ecd)]: (0, $dce48cb70c4120bb$export$78d8c50e853acd10),
19447
- [(0, $7251dad5f4a4c35f$export$473c1a4819e5180b)]: (0, $dce48cb70c4120bb$export$8db6c706fc9142b2),
19448
- [(0, $7251dad5f4a4c35f$export$4b28ac1ae75aff60)]: (0, $dce48cb70c4120bb$export$e2b0b9a5e613f348),
19449
- [(0, $7251dad5f4a4c35f$export$e3f6cdbd95b1f8f)]: (0, $dce48cb70c4120bb$export$6a5a2eab72b6e3d),
19450
- [(0, $7251dad5f4a4c35f$export$66a0ef3ffeab32b7)]: (0, $dce48cb70c4120bb$export$f1c9dd0f5207dd5e),
19451
- [(0, $7251dad5f4a4c35f$export$640d294ab83f9040)]: (0, $dce48cb70c4120bb$export$4b194284baed1659)
19452
- };
19453
19587
  var $69c885ea9d252cfd$var$SongBuilder = class {
19454
19588
  constructor(song) {
19455
19589
  this.currentKey = null;
@@ -19530,11 +19664,10 @@ to a key`);
19530
19664
  this.metadata.add(name, value);
19531
19665
  }
19532
19666
  setSectionTypeFromTag(tag) {
19533
- if (tag.name in $69c885ea9d252cfd$var$START_TAG_TO_SECTION_TYPE) {
19534
- this.startSection($69c885ea9d252cfd$var$START_TAG_TO_SECTION_TYPE[tag.name], tag);
19535
- return;
19536
- }
19537
- if (tag.name in $69c885ea9d252cfd$var$END_TAG_TO_SECTION_TYPE) this.endSection($69c885ea9d252cfd$var$END_TAG_TO_SECTION_TYPE[tag.name], tag);
19667
+ const [tagType, sectionType] = (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039).recognizeSectionTag(tag.name);
19668
+ if (!sectionType) return;
19669
+ if (tagType === (0, $7251dad5f4a4c35f$export$dfea9b8ecbbb8623)) this.startSection(sectionType, tag);
19670
+ else if (tagType === (0, $7251dad5f4a4c35f$export$3d329a2c209fbc28)) this.endSection(sectionType, tag);
19538
19671
  }
19539
19672
  startSection(sectionType, tag) {
19540
19673
  this.checkCurrentSectionType((0, $dce48cb70c4120bb$export$c53d0f541b41b88e), tag);
@@ -19861,7 +19994,10 @@ Or set the song key before changing key:
19861
19994
  this.foreachItem((item) => {
19862
19995
  if (!(item instanceof (0, $551a223fc13b5c10$export$2e2bcd8739ae039))) return;
19863
19996
  const itemChords = item.chords;
19864
- if (itemChords && itemChords.length > 0) chords.add(itemChords);
19997
+ if (itemChords && itemChords.length > 0) {
19998
+ const parsedChord = (0, $177a605b8569b31c$export$2e2bcd8739ae039).parse(itemChords);
19999
+ if (parsedChord) chords.add(parsedChord.toString());
20000
+ }
19865
20001
  });
19866
20002
  return Array.from(chords);
19867
20003
  }
@@ -20463,7 +20599,7 @@ Or set the song key before changing key:
20463
20599
  return Math.max(contentLength, lyricsLength);
20464
20600
  }
20465
20601
  formatItemTop(item, _metadata, line) {
20466
- if (item instanceof (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039) && item.isRenderable()) return item.value || "";
20602
+ if (item instanceof (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039) && item.isRenderable()) return item.label;
20467
20603
  if (item instanceof (0, $551a223fc13b5c10$export$2e2bcd8739ae039)) {
20468
20604
  const content = item.annotation || this.renderChord(item, line);
20469
20605
  return (0, $28a2fcb6fb95a147$export$bc3bea8325045070)(content, this.chordLyricsPairLength(item, line));
@@ -20485,7 +20621,7 @@ Or set the song key before changing key:
20485
20621
  }
20486
20622
  formatItemBottom(item, metadata, line) {
20487
20623
  if (typeof item === "string") return item;
20488
- if (item instanceof (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039) && item.isRenderable()) return item.value || "";
20624
+ if (item instanceof (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039) && item.isRenderable()) return item.label;
20489
20625
  if (item instanceof (0, $551a223fc13b5c10$export$2e2bcd8739ae039)) return this.formatChordLyricsPair(item, line);
20490
20626
  if ("evaluate" in item) return this.formatEvaluatable(item, metadata);
20491
20627
  return "";
@@ -32661,7 +32797,7 @@ Or set the song key before changing key:
32661
32797
  `)}
32662
32798
 
32663
32799
  ${(0, $f9c5006b26957916$export$a55877ca9db47377)(item.hasRenderableLabel(), () => `
32664
- <h3 class="label">${item.value}</h3>
32800
+ <h3 class="label">${item.label}</h3>
32665
32801
  `)}
32666
32802
  `).elseWhen((0, $28a2fcb6fb95a147$export$e3f63561d52b936d)(item), () => `
32667
32803
  <div class="column">
@@ -32756,7 +32892,7 @@ Or set the song key before changing key:
32756
32892
  `)}
32757
32893
 
32758
32894
  ${(0, $f9c5006b26957916$export$a55877ca9db47377)(item.hasRenderableLabel(), () => `
32759
- <td><h3 class="label"${(0, $f9c5006b26957916$export$ca030c9435779e4b)(line.textFont)}>${item.value}</h3></td>
32895
+ <td><h3 class="label"${(0, $f9c5006b26957916$export$ca030c9435779e4b)(line.textFont)}>${item.label}</h3></td>
32760
32896
  `)}
32761
32897
  `).elseWhen((0, $f9c5006b26957916$export$899158ea22bb4609)(item), () => `
32762
32898
  <td class="literal">${item.string}</td>
@@ -32879,7 +33015,7 @@ Or set the song key before changing key:
32879
33015
  return chords;
32880
33016
  }
32881
33017
  formatItemTop(item, _metadata, line) {
32882
- if (item instanceof (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039) && item.isRenderable()) return item.value || "";
33018
+ if (item instanceof (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039) && item.isRenderable()) return item.label;
32883
33019
  if (item instanceof (0, $551a223fc13b5c10$export$2e2bcd8739ae039)) {
32884
33020
  const content = item.annotation || this.renderChords(item, line);
32885
33021
  return (0, $28a2fcb6fb95a147$export$bc3bea8325045070)(content, this.chordLyricsPairLength(item, line));
@@ -32894,7 +33030,7 @@ Or set the song key before changing key:
32894
33030
  return line.items.map((item) => formatter.call(this, item, metadata, line)).join("");
32895
33031
  }
32896
33032
  formatItemBottom(item, metadata, line) {
32897
- if (item instanceof (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039) && item.isRenderable()) return item.value || "";
33033
+ if (item instanceof (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039) && item.isRenderable()) return item.label;
32898
33034
  if (item instanceof (0, $551a223fc13b5c10$export$2e2bcd8739ae039)) return (0, $28a2fcb6fb95a147$export$bc3bea8325045070)(item.lyrics || "", this.chordLyricsPairLength(item, line));
32899
33035
  if ("evaluate" in item) return item.evaluate(metadata, this.configuration.get("metadata.separator"));
32900
33036
  return "";