chordsheetjs 7.5.0 → 7.7.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.
package/lib/bundle.js CHANGED
@@ -42,7 +42,7 @@ $parcel$export(module.exports, "NONE", () => $af8d31735c159a26$export$c53d0f541b
42
42
  $parcel$export(module.exports, "TAB", () => $af8d31735c159a26$export$f1c9dd0f5207dd5e);
43
43
  $parcel$export(module.exports, "SYMBOL", () => $af8d31735c159a26$export$27c95a7104c1f7aa);
44
44
  $parcel$export(module.exports, "NUMERIC", () => $af8d31735c159a26$export$4d318981b5a83836);
45
- // Generated by peggy v. 1.2.0 (ts-pegjs plugin v. 1.2.2 )
45
+ // Generated by peggy v. 2.0.1 (ts-pegjs plugin v. 2.1.0 )
46
46
  //
47
47
  // https://peggyjs.org/ https://github.com/metadevpro/ts-pegjs
48
48
  "use strict";
@@ -178,93 +178,100 @@ function $1a506a341538d943$var$peg$parse(input, options) {
178
178
  comment ? {
179
179
  type: "comment",
180
180
  comment: comment
181
- } : null
181
+ } : null,
182
182
  ].filter((x)=>x)
183
183
  };
184
184
  };
185
- const peg$c3 = "#";
186
- const peg$c4 = peg$literalExpectation("#", false);
187
- const peg$c5 = /^[^\r\n]/;
188
- const peg$c6 = peg$classExpectation([
185
+ const peg$c3 = function(lyrics) {
186
+ return {
187
+ type: "chordLyricsPair",
188
+ chords: "",
189
+ lyrics: lyrics
190
+ };
191
+ };
192
+ const peg$c4 = "#";
193
+ const peg$c5 = peg$literalExpectation("#", false);
194
+ const peg$c6 = /^[^\r\n]/;
195
+ const peg$c7 = peg$classExpectation([
189
196
  "\r",
190
197
  "\n"
191
198
  ], true, false);
192
- const peg$c7 = function(comment) {
199
+ const peg$c8 = function(comment) {
193
200
  return comment;
194
201
  };
195
- const peg$c8 = function(chords, lyrics) {
202
+ const peg$c9 = function(chords, lyrics, space) {
196
203
  return {
197
204
  type: "chordLyricsPair",
198
205
  chords: chords || "",
199
- lyrics: lyrics
206
+ lyrics: lyrics + (space || "")
200
207
  };
201
208
  };
202
- const peg$c9 = function(lyrics) {
209
+ const peg$c10 = function(lyrics) {
203
210
  return lyrics.map((c)=>c.char || c).join("");
204
211
  };
205
- const peg$c10 = "[";
206
- const peg$c11 = peg$literalExpectation("[", false);
207
- const peg$c12 = "]";
208
- const peg$c13 = peg$literalExpectation("]", false);
209
- const peg$c14 = function(chords) {
212
+ const peg$c11 = "[";
213
+ const peg$c12 = peg$literalExpectation("[", false);
214
+ const peg$c13 = "]";
215
+ const peg$c14 = peg$literalExpectation("]", false);
216
+ const peg$c15 = function(chords) {
210
217
  return chords.map((c)=>c.char || c).join("");
211
218
  };
212
- const peg$c15 = /^[^\]\r\n]/;
213
- const peg$c16 = peg$classExpectation([
219
+ const peg$c16 = /^[^\]\r\n]/;
220
+ const peg$c17 = peg$classExpectation([
214
221
  "]",
215
222
  "\r",
216
223
  "\n"
217
224
  ], true, false);
218
- const peg$c17 = "\\";
219
- const peg$c18 = peg$literalExpectation("\\", false);
220
- const peg$c19 = function() {
225
+ const peg$c18 = "\\";
226
+ const peg$c19 = peg$literalExpectation("\\", false);
227
+ const peg$c20 = function() {
221
228
  return {
222
229
  type: "char",
223
230
  char: "\\"
224
231
  };
225
232
  };
226
- const peg$c20 = function() {
233
+ const peg$c21 = function() {
227
234
  return {
228
235
  type: "char",
229
236
  char: "]"
230
237
  };
231
238
  };
232
- const peg$c21 = function(sequence) {
239
+ const peg$c22 = function(sequence) {
233
240
  return sequence;
234
241
  };
235
- const peg$c22 = "%{";
236
- const peg$c23 = peg$literalExpectation("%{", false);
237
- const peg$c24 = "}";
238
- const peg$c25 = peg$literalExpectation("}", false);
239
- const peg$c26 = function(variableName, valueTest, expressions) {
242
+ const peg$c23 = "%{";
243
+ const peg$c24 = peg$literalExpectation("%{", false);
244
+ const peg$c25 = "}";
245
+ const peg$c26 = peg$literalExpectation("}", false);
246
+ const peg$c27 = function(variableName, valueTest, expressions) {
240
247
  return {
241
- "type": "ternary",
248
+ type: "ternary",
242
249
  variable: variableName.length > 0 ? variableName : null,
243
250
  valueTest: valueTest,
244
251
  ...expressions,
245
252
  location: location().start
246
253
  };
247
254
  };
248
- const peg$c27 = "=";
249
- const peg$c28 = peg$literalExpectation("=", false);
250
- const peg$c29 = function(testValue) {
255
+ const peg$c28 = "=";
256
+ const peg$c29 = peg$literalExpectation("=", false);
257
+ const peg$c30 = function(testValue) {
251
258
  return testValue;
252
259
  };
253
- const peg$c30 = "|";
254
- const peg$c31 = peg$literalExpectation("|", false);
255
- const peg$c32 = function(trueExpression, falseExpression) {
260
+ const peg$c31 = "|";
261
+ const peg$c32 = peg$literalExpectation("|", false);
262
+ const peg$c33 = function(trueExpression, falseExpression) {
256
263
  return {
257
- "type": "ternary",
264
+ type: "ternary",
258
265
  trueExpression: trueExpression,
259
266
  falseExpression: falseExpression,
260
267
  location: location().start
261
268
  };
262
269
  };
263
- const peg$c33 = function(falseExpression) {
270
+ const peg$c34 = function(falseExpression) {
264
271
  return falseExpression;
265
272
  };
266
- const peg$c34 = /^[a-zA-Z0-9\-_]/;
267
- const peg$c35 = peg$classExpectation([
273
+ const peg$c35 = /^[a-zA-Z0-9\-_]/;
274
+ const peg$c36 = peg$classExpectation([
268
275
  [
269
276
  "a",
270
277
  "z"
@@ -280,20 +287,26 @@ function $1a506a341538d943$var$peg$parse(input, options) {
280
287
  "-",
281
288
  "_"
282
289
  ], false, false);
283
- const peg$c36 = function() {
290
+ const peg$c37 = function() {
291
+ return {
292
+ type: "char",
293
+ char: "]"
294
+ };
295
+ };
296
+ const peg$c38 = function() {
284
297
  return {
285
298
  type: "char",
286
299
  char: "|"
287
300
  };
288
301
  };
289
- const peg$c37 = function() {
302
+ const peg$c39 = function() {
290
303
  return {
291
304
  type: "char",
292
305
  char: "}"
293
306
  };
294
307
  };
295
- const peg$c38 = /^[^|[\]\\{}%#\r\n]/;
296
- const peg$c39 = peg$classExpectation([
308
+ const peg$c40 = /^[^|[\]\\{}%#\r\n\t ]/;
309
+ const peg$c41 = peg$classExpectation([
297
310
  "|",
298
311
  "[",
299
312
  "]",
@@ -303,37 +316,45 @@ function $1a506a341538d943$var$peg$parse(input, options) {
303
316
  "%",
304
317
  "#",
305
318
  "\r",
306
- "\n"
319
+ "\n",
320
+ " ",
321
+ " "
307
322
  ], true, false);
308
- const peg$c40 = function() {
323
+ const peg$c42 = function() {
309
324
  return {
310
325
  type: "char",
311
- char: "["
326
+ char: "\\"
312
327
  };
313
328
  };
314
- const peg$c41 = "{";
315
- const peg$c42 = peg$literalExpectation("{", false);
316
329
  const peg$c43 = function() {
317
330
  return {
318
331
  type: "char",
319
- char: "{"
332
+ char: "["
320
333
  };
321
334
  };
322
- const peg$c44 = "%";
323
- const peg$c45 = peg$literalExpectation("%", false);
335
+ const peg$c44 = "{";
336
+ const peg$c45 = peg$literalExpectation("{", false);
324
337
  const peg$c46 = function() {
338
+ return {
339
+ type: "char",
340
+ char: "{"
341
+ };
342
+ };
343
+ const peg$c47 = "%";
344
+ const peg$c48 = peg$literalExpectation("%", false);
345
+ const peg$c49 = function() {
325
346
  return {
326
347
  type: "char",
327
348
  char: "%"
328
349
  };
329
350
  };
330
- const peg$c47 = function() {
351
+ const peg$c50 = function() {
331
352
  return {
332
353
  type: "char",
333
354
  char: "#"
334
355
  };
335
356
  };
336
- const peg$c48 = function(tagName, tagColonWithValue) {
357
+ const peg$c51 = function(tagName, tagColonWithValue) {
337
358
  return {
338
359
  type: "tag",
339
360
  name: tagName,
@@ -341,13 +362,13 @@ function $1a506a341538d943$var$peg$parse(input, options) {
341
362
  location: location().start
342
363
  };
343
364
  };
344
- const peg$c49 = ":";
345
- const peg$c50 = peg$literalExpectation(":", false);
346
- const peg$c51 = function(tagValue) {
365
+ const peg$c52 = ":";
366
+ const peg$c53 = peg$literalExpectation(":", false);
367
+ const peg$c54 = function(tagValue) {
347
368
  return tagValue.map((c)=>c.char || c).join("");
348
369
  };
349
- const peg$c52 = /^[a-zA-Z\-_]/;
350
- const peg$c53 = peg$classExpectation([
370
+ const peg$c55 = /^[a-zA-Z\-_]/;
371
+ const peg$c56 = peg$classExpectation([
351
372
  [
352
373
  "a",
353
374
  "z"
@@ -359,31 +380,31 @@ function $1a506a341538d943$var$peg$parse(input, options) {
359
380
  "-",
360
381
  "_"
361
382
  ], false, false);
362
- const peg$c54 = /^[^}\\\r\n]/;
363
- const peg$c55 = peg$classExpectation([
383
+ const peg$c57 = /^[^}\\\r\n]/;
384
+ const peg$c58 = peg$classExpectation([
364
385
  "}",
365
386
  "\\",
366
387
  "\r",
367
388
  "\n"
368
389
  ], true, false);
369
- const peg$c56 = peg$otherExpectation("whitespace");
370
- const peg$c57 = /^[ \t\n\r]/;
371
- const peg$c58 = peg$classExpectation([
390
+ const peg$c59 = peg$otherExpectation("whitespace");
391
+ const peg$c60 = /^[ \t\n\r]/;
392
+ const peg$c61 = peg$classExpectation([
372
393
  " ",
373
394
  " ",
374
395
  "\n",
375
396
  "\r"
376
397
  ], false, false);
377
- const peg$c59 = peg$otherExpectation("space");
378
- const peg$c60 = /^[ \t]/;
379
- const peg$c61 = peg$classExpectation([
398
+ const peg$c62 = peg$otherExpectation("space");
399
+ const peg$c63 = /^[ \t]/;
400
+ const peg$c64 = peg$classExpectation([
380
401
  " ",
381
402
  " "
382
403
  ], false, false);
383
- const peg$c62 = "\n";
384
- const peg$c63 = peg$literalExpectation("\n", false);
385
- const peg$c64 = "\r";
386
- const peg$c65 = peg$literalExpectation("\r", false);
404
+ const peg$c65 = "\n";
405
+ const peg$c66 = peg$literalExpectation("\n", false);
406
+ const peg$c67 = "\r";
407
+ const peg$c68 = peg$literalExpectation("\r", false);
387
408
  let peg$currPos = 0;
388
409
  let peg$savedPos = 0;
389
410
  const peg$posDetailsCache = [
@@ -550,8 +571,11 @@ function $1a506a341538d943$var$peg$parse(input, options) {
550
571
  function peg$parseLine() {
551
572
  let s0, s1, s2, s3, s4, s5, s6;
552
573
  s0 = peg$currPos;
553
- s1 = peg$parseLyrics();
554
- if (s1 === peg$FAILED) s1 = null;
574
+ s1 = peg$currPos;
575
+ s2 = peg$parseLyrics();
576
+ if (s2 === peg$FAILED) s2 = null;
577
+ if (s2 !== peg$FAILED) s1 = input.substring(s1, peg$currPos);
578
+ else s1 = s2;
555
579
  if (s1 !== peg$FAILED) {
556
580
  s2 = [];
557
581
  s3 = peg$parseToken();
@@ -599,11 +623,22 @@ function $1a506a341538d943$var$peg$parse(input, options) {
599
623
  return s0;
600
624
  }
601
625
  function peg$parseToken() {
602
- let s0;
626
+ let s0, s1;
603
627
  s0 = peg$parseTag();
604
628
  if (s0 === peg$FAILED) {
605
629
  s0 = peg$parseChordLyricsPair();
606
- if (s0 === peg$FAILED) s0 = peg$parseMetaTernary();
630
+ if (s0 === peg$FAILED) {
631
+ s0 = peg$parseMetaTernary();
632
+ if (s0 === peg$FAILED) {
633
+ s0 = peg$currPos;
634
+ s1 = peg$parseLyrics();
635
+ if (s1 !== peg$FAILED) {
636
+ peg$savedPos = s0;
637
+ s1 = peg$c3(s1);
638
+ }
639
+ s0 = s1;
640
+ }
641
+ }
607
642
  }
608
643
  return s0;
609
644
  }
@@ -614,37 +649,37 @@ function $1a506a341538d943$var$peg$parse(input, options) {
614
649
  if (s1 === peg$FAILED) s1 = null;
615
650
  if (s1 !== peg$FAILED) {
616
651
  if (input.charCodeAt(peg$currPos) === 35) {
617
- s2 = peg$c3;
652
+ s2 = peg$c4;
618
653
  peg$currPos++;
619
654
  } else {
620
655
  s2 = peg$FAILED;
621
- if (peg$silentFails === 0) peg$fail(peg$c4);
656
+ if (peg$silentFails === 0) peg$fail(peg$c5);
622
657
  }
623
658
  if (s2 !== peg$FAILED) {
624
659
  s3 = peg$currPos;
625
660
  s4 = [];
626
- if (peg$c5.test(input.charAt(peg$currPos))) {
661
+ if (peg$c6.test(input.charAt(peg$currPos))) {
627
662
  s5 = input.charAt(peg$currPos);
628
663
  peg$currPos++;
629
664
  } else {
630
665
  s5 = peg$FAILED;
631
- if (peg$silentFails === 0) peg$fail(peg$c6);
666
+ if (peg$silentFails === 0) peg$fail(peg$c7);
632
667
  }
633
668
  while(s5 !== peg$FAILED){
634
669
  s4.push(s5);
635
- if (peg$c5.test(input.charAt(peg$currPos))) {
670
+ if (peg$c6.test(input.charAt(peg$currPos))) {
636
671
  s5 = input.charAt(peg$currPos);
637
672
  peg$currPos++;
638
673
  } else {
639
674
  s5 = peg$FAILED;
640
- if (peg$silentFails === 0) peg$fail(peg$c6);
675
+ if (peg$silentFails === 0) peg$fail(peg$c7);
641
676
  }
642
677
  }
643
678
  if (s4 !== peg$FAILED) s3 = input.substring(s3, peg$currPos);
644
679
  else s3 = s4;
645
680
  if (s3 !== peg$FAILED) {
646
681
  peg$savedPos = s0;
647
- s1 = peg$c7(s3);
682
+ s1 = peg$c8(s3);
648
683
  s0 = s1;
649
684
  } else {
650
685
  peg$currPos = s0;
@@ -661,23 +696,37 @@ function $1a506a341538d943$var$peg$parse(input, options) {
661
696
  return s0;
662
697
  }
663
698
  function peg$parseChordLyricsPair() {
664
- let s0, s1, s2, s3, s4;
699
+ let s0, s1, s2, s3, s4, s5;
665
700
  s0 = peg$currPos;
666
701
  s1 = peg$parseChord();
667
702
  if (s1 !== peg$FAILED) {
668
703
  s2 = peg$currPos;
669
704
  s3 = [];
670
- s4 = peg$parseLyrics();
705
+ s4 = peg$parseLyricsChar();
671
706
  while(s4 !== peg$FAILED){
672
707
  s3.push(s4);
673
- s4 = peg$parseLyrics();
708
+ s4 = peg$parseLyricsChar();
674
709
  }
675
710
  if (s3 !== peg$FAILED) s2 = input.substring(s2, peg$currPos);
676
711
  else s2 = s3;
677
712
  if (s2 !== peg$FAILED) {
678
- peg$savedPos = s0;
679
- s1 = peg$c8(s1, s2);
680
- s0 = s1;
713
+ s3 = peg$currPos;
714
+ s4 = [];
715
+ s5 = peg$parseSpace();
716
+ while(s5 !== peg$FAILED){
717
+ s4.push(s5);
718
+ s5 = peg$parseSpace();
719
+ }
720
+ if (s4 !== peg$FAILED) s3 = input.substring(s3, peg$currPos);
721
+ else s3 = s4;
722
+ if (s3 !== peg$FAILED) {
723
+ peg$savedPos = s0;
724
+ s1 = peg$c9(s1, s2, s3);
725
+ s0 = s1;
726
+ } else {
727
+ peg$currPos = s0;
728
+ s0 = peg$FAILED;
729
+ }
681
730
  } else {
682
731
  peg$currPos = s0;
683
732
  s0 = peg$FAILED;
@@ -692,19 +741,25 @@ function $1a506a341538d943$var$peg$parse(input, options) {
692
741
  let s0, s1, s2;
693
742
  s0 = peg$currPos;
694
743
  s1 = [];
695
- s2 = peg$parseLyricsChar();
744
+ s2 = peg$parseLyricsCharOrSpace();
696
745
  if (s2 !== peg$FAILED) while(s2 !== peg$FAILED){
697
746
  s1.push(s2);
698
- s2 = peg$parseLyricsChar();
747
+ s2 = peg$parseLyricsCharOrSpace();
699
748
  }
700
749
  else s1 = peg$FAILED;
701
750
  if (s1 !== peg$FAILED) {
702
751
  peg$savedPos = s0;
703
- s1 = peg$c9(s1);
752
+ s1 = peg$c10(s1);
704
753
  }
705
754
  s0 = s1;
706
755
  return s0;
707
756
  }
757
+ function peg$parseLyricsCharOrSpace() {
758
+ let s0;
759
+ s0 = peg$parseLyricsChar();
760
+ if (s0 === peg$FAILED) s0 = peg$parseSpace();
761
+ return s0;
762
+ }
708
763
  function peg$parseChord() {
709
764
  let s0, s1, s2, s3, s4;
710
765
  s0 = peg$currPos;
@@ -719,11 +774,11 @@ function $1a506a341538d943$var$peg$parse(input, options) {
719
774
  }
720
775
  if (s1 !== peg$FAILED) {
721
776
  if (input.charCodeAt(peg$currPos) === 91) {
722
- s2 = peg$c10;
777
+ s2 = peg$c11;
723
778
  peg$currPos++;
724
779
  } else {
725
780
  s2 = peg$FAILED;
726
- if (peg$silentFails === 0) peg$fail(peg$c11);
781
+ if (peg$silentFails === 0) peg$fail(peg$c12);
727
782
  }
728
783
  if (s2 !== peg$FAILED) {
729
784
  s3 = [];
@@ -734,15 +789,15 @@ function $1a506a341538d943$var$peg$parse(input, options) {
734
789
  }
735
790
  if (s3 !== peg$FAILED) {
736
791
  if (input.charCodeAt(peg$currPos) === 93) {
737
- s4 = peg$c12;
792
+ s4 = peg$c13;
738
793
  peg$currPos++;
739
794
  } else {
740
795
  s4 = peg$FAILED;
741
- if (peg$silentFails === 0) peg$fail(peg$c13);
796
+ if (peg$silentFails === 0) peg$fail(peg$c14);
742
797
  }
743
798
  if (s4 !== peg$FAILED) {
744
799
  peg$savedPos = s0;
745
- s1 = peg$c14(s3);
800
+ s1 = peg$c15(s3);
746
801
  s0 = s1;
747
802
  } else {
748
803
  peg$currPos = s0;
@@ -764,12 +819,12 @@ function $1a506a341538d943$var$peg$parse(input, options) {
764
819
  }
765
820
  function peg$parseChordChar() {
766
821
  let s0, s1, s2, s3;
767
- if (peg$c15.test(input.charAt(peg$currPos))) {
822
+ if (peg$c16.test(input.charAt(peg$currPos))) {
768
823
  s0 = input.charAt(peg$currPos);
769
824
  peg$currPos++;
770
825
  } else {
771
826
  s0 = peg$FAILED;
772
- if (peg$silentFails === 0) peg$fail(peg$c16);
827
+ if (peg$silentFails === 0) peg$fail(peg$c17);
773
828
  }
774
829
  if (s0 === peg$FAILED) {
775
830
  s0 = peg$currPos;
@@ -777,35 +832,35 @@ function $1a506a341538d943$var$peg$parse(input, options) {
777
832
  if (s1 !== peg$FAILED) {
778
833
  s2 = peg$currPos;
779
834
  if (input.charCodeAt(peg$currPos) === 92) {
780
- s3 = peg$c17;
835
+ s3 = peg$c18;
781
836
  peg$currPos++;
782
837
  } else {
783
838
  s3 = peg$FAILED;
784
- if (peg$silentFails === 0) peg$fail(peg$c18);
839
+ if (peg$silentFails === 0) peg$fail(peg$c19);
785
840
  }
786
841
  if (s3 !== peg$FAILED) {
787
842
  peg$savedPos = s2;
788
- s3 = peg$c19();
843
+ s3 = peg$c20();
789
844
  }
790
845
  s2 = s3;
791
846
  if (s2 === peg$FAILED) {
792
847
  s2 = peg$currPos;
793
848
  if (input.charCodeAt(peg$currPos) === 93) {
794
- s3 = peg$c12;
849
+ s3 = peg$c13;
795
850
  peg$currPos++;
796
851
  } else {
797
852
  s3 = peg$FAILED;
798
- if (peg$silentFails === 0) peg$fail(peg$c13);
853
+ if (peg$silentFails === 0) peg$fail(peg$c14);
799
854
  }
800
855
  if (s3 !== peg$FAILED) {
801
856
  peg$savedPos = s2;
802
- s3 = peg$c20();
857
+ s3 = peg$c21();
803
858
  }
804
859
  s2 = s3;
805
860
  }
806
861
  if (s2 !== peg$FAILED) {
807
862
  peg$savedPos = s0;
808
- s1 = peg$c21(s2);
863
+ s1 = peg$c22(s2);
809
864
  s0 = s1;
810
865
  } else {
811
866
  peg$currPos = s0;
@@ -821,12 +876,12 @@ function $1a506a341538d943$var$peg$parse(input, options) {
821
876
  function peg$parseMetaTernary() {
822
877
  let s0, s1, s2, s3, s4, s5, s6, s7, s8;
823
878
  s0 = peg$currPos;
824
- if (input.substr(peg$currPos, 2) === peg$c22) {
825
- s1 = peg$c22;
879
+ if (input.substr(peg$currPos, 2) === peg$c23) {
880
+ s1 = peg$c23;
826
881
  peg$currPos += 2;
827
882
  } else {
828
883
  s1 = peg$FAILED;
829
- if (peg$silentFails === 0) peg$fail(peg$c23);
884
+ if (peg$silentFails === 0) peg$fail(peg$c24);
830
885
  }
831
886
  if (s1 !== peg$FAILED) {
832
887
  s2 = peg$parse_();
@@ -848,15 +903,15 @@ function $1a506a341538d943$var$peg$parse(input, options) {
848
903
  s7 = peg$parse_();
849
904
  if (s7 !== peg$FAILED) {
850
905
  if (input.charCodeAt(peg$currPos) === 125) {
851
- s8 = peg$c24;
906
+ s8 = peg$c25;
852
907
  peg$currPos++;
853
908
  } else {
854
909
  s8 = peg$FAILED;
855
- if (peg$silentFails === 0) peg$fail(peg$c25);
910
+ if (peg$silentFails === 0) peg$fail(peg$c26);
856
911
  }
857
912
  if (s8 !== peg$FAILED) {
858
913
  peg$savedPos = s0;
859
- s1 = peg$c26(s3, s4, s6);
914
+ s1 = peg$c27(s3, s4, s6);
860
915
  s0 = s1;
861
916
  } else {
862
917
  peg$currPos = s0;
@@ -896,11 +951,11 @@ function $1a506a341538d943$var$peg$parse(input, options) {
896
951
  let s0, s1, s2, s3;
897
952
  s0 = peg$currPos;
898
953
  if (input.charCodeAt(peg$currPos) === 61) {
899
- s1 = peg$c27;
954
+ s1 = peg$c28;
900
955
  peg$currPos++;
901
956
  } else {
902
957
  s1 = peg$FAILED;
903
- if (peg$silentFails === 0) peg$fail(peg$c28);
958
+ if (peg$silentFails === 0) peg$fail(peg$c29);
904
959
  }
905
960
  if (s1 !== peg$FAILED) {
906
961
  s2 = peg$parse_();
@@ -908,7 +963,7 @@ function $1a506a341538d943$var$peg$parse(input, options) {
908
963
  s3 = peg$parseMetaTestValue();
909
964
  if (s3 !== peg$FAILED) {
910
965
  peg$savedPos = s0;
911
- s1 = peg$c29(s3);
966
+ s1 = peg$c30(s3);
912
967
  s0 = s1;
913
968
  } else {
914
969
  peg$currPos = s0;
@@ -942,11 +997,11 @@ function $1a506a341538d943$var$peg$parse(input, options) {
942
997
  let s0, s1, s2, s3, s4, s5, s6;
943
998
  s0 = peg$currPos;
944
999
  if (input.charCodeAt(peg$currPos) === 124) {
945
- s1 = peg$c30;
1000
+ s1 = peg$c31;
946
1001
  peg$currPos++;
947
1002
  } else {
948
1003
  s1 = peg$FAILED;
949
- if (peg$silentFails === 0) peg$fail(peg$c31);
1004
+ if (peg$silentFails === 0) peg$fail(peg$c32);
950
1005
  }
951
1006
  if (s1 !== peg$FAILED) {
952
1007
  s2 = peg$parse_();
@@ -961,7 +1016,7 @@ function $1a506a341538d943$var$peg$parse(input, options) {
961
1016
  s6 = peg$parse_();
962
1017
  if (s6 !== peg$FAILED) {
963
1018
  peg$savedPos = s0;
964
- s1 = peg$c32(s3, s5);
1019
+ s1 = peg$c33(s3, s5);
965
1020
  s0 = s1;
966
1021
  } else {
967
1022
  peg$currPos = s0;
@@ -993,11 +1048,11 @@ function $1a506a341538d943$var$peg$parse(input, options) {
993
1048
  let s0, s1, s2, s3;
994
1049
  s0 = peg$currPos;
995
1050
  if (input.charCodeAt(peg$currPos) === 124) {
996
- s1 = peg$c30;
1051
+ s1 = peg$c31;
997
1052
  peg$currPos++;
998
1053
  } else {
999
1054
  s1 = peg$FAILED;
1000
- if (peg$silentFails === 0) peg$fail(peg$c31);
1055
+ if (peg$silentFails === 0) peg$fail(peg$c32);
1001
1056
  }
1002
1057
  if (s1 !== peg$FAILED) {
1003
1058
  s2 = peg$parse_();
@@ -1005,7 +1060,7 @@ function $1a506a341538d943$var$peg$parse(input, options) {
1005
1060
  s3 = peg$parseMetaExpression();
1006
1061
  if (s3 !== peg$FAILED) {
1007
1062
  peg$savedPos = s0;
1008
- s1 = peg$c33(s3);
1063
+ s1 = peg$c34(s3);
1009
1064
  s0 = s1;
1010
1065
  } else {
1011
1066
  peg$currPos = s0;
@@ -1024,21 +1079,21 @@ function $1a506a341538d943$var$peg$parse(input, options) {
1024
1079
  function peg$parseMetaVariableName() {
1025
1080
  let s0, s1;
1026
1081
  s0 = [];
1027
- if (peg$c34.test(input.charAt(peg$currPos))) {
1082
+ if (peg$c35.test(input.charAt(peg$currPos))) {
1028
1083
  s1 = input.charAt(peg$currPos);
1029
1084
  peg$currPos++;
1030
1085
  } else {
1031
1086
  s1 = peg$FAILED;
1032
- if (peg$silentFails === 0) peg$fail(peg$c35);
1087
+ if (peg$silentFails === 0) peg$fail(peg$c36);
1033
1088
  }
1034
1089
  if (s1 !== peg$FAILED) while(s1 !== peg$FAILED){
1035
1090
  s0.push(s1);
1036
- if (peg$c34.test(input.charAt(peg$currPos))) {
1091
+ if (peg$c35.test(input.charAt(peg$currPos))) {
1037
1092
  s1 = input.charAt(peg$currPos);
1038
1093
  peg$currPos++;
1039
1094
  } else {
1040
1095
  s1 = peg$FAILED;
1041
- if (peg$silentFails === 0) peg$fail(peg$c35);
1096
+ if (peg$silentFails === 0) peg$fail(peg$c36);
1042
1097
  }
1043
1098
  }
1044
1099
  else s0 = peg$FAILED;
@@ -1077,47 +1132,47 @@ function $1a506a341538d943$var$peg$parse(input, options) {
1077
1132
  }
1078
1133
  function peg$parseLyricsChar() {
1079
1134
  let s0, s1;
1080
- s0 = peg$parseChar();
1135
+ s0 = peg$parseWordChar();
1081
1136
  if (s0 === peg$FAILED) {
1082
1137
  s0 = peg$currPos;
1083
1138
  if (input.charCodeAt(peg$currPos) === 93) {
1084
- s1 = peg$c12;
1139
+ s1 = peg$c13;
1085
1140
  peg$currPos++;
1086
1141
  } else {
1087
1142
  s1 = peg$FAILED;
1088
- if (peg$silentFails === 0) peg$fail(peg$c13);
1143
+ if (peg$silentFails === 0) peg$fail(peg$c14);
1089
1144
  }
1090
1145
  if (s1 !== peg$FAILED) {
1091
1146
  peg$savedPos = s0;
1092
- s1 = peg$c20();
1147
+ s1 = peg$c37();
1093
1148
  }
1094
1149
  s0 = s1;
1095
1150
  if (s0 === peg$FAILED) {
1096
1151
  s0 = peg$currPos;
1097
1152
  if (input.charCodeAt(peg$currPos) === 124) {
1098
- s1 = peg$c30;
1153
+ s1 = peg$c31;
1099
1154
  peg$currPos++;
1100
1155
  } else {
1101
1156
  s1 = peg$FAILED;
1102
- if (peg$silentFails === 0) peg$fail(peg$c31);
1157
+ if (peg$silentFails === 0) peg$fail(peg$c32);
1103
1158
  }
1104
1159
  if (s1 !== peg$FAILED) {
1105
1160
  peg$savedPos = s0;
1106
- s1 = peg$c36();
1161
+ s1 = peg$c38();
1107
1162
  }
1108
1163
  s0 = s1;
1109
1164
  if (s0 === peg$FAILED) {
1110
1165
  s0 = peg$currPos;
1111
1166
  if (input.charCodeAt(peg$currPos) === 125) {
1112
- s1 = peg$c24;
1167
+ s1 = peg$c25;
1113
1168
  peg$currPos++;
1114
1169
  } else {
1115
1170
  s1 = peg$FAILED;
1116
- if (peg$silentFails === 0) peg$fail(peg$c25);
1171
+ if (peg$silentFails === 0) peg$fail(peg$c26);
1117
1172
  }
1118
1173
  if (s1 !== peg$FAILED) {
1119
1174
  peg$savedPos = s0;
1120
- s1 = peg$c37();
1175
+ s1 = peg$c39();
1121
1176
  }
1122
1177
  s0 = s1;
1123
1178
  }
@@ -1126,13 +1181,19 @@ function $1a506a341538d943$var$peg$parse(input, options) {
1126
1181
  return s0;
1127
1182
  }
1128
1183
  function peg$parseChar() {
1184
+ let s0;
1185
+ s0 = peg$parseWordChar();
1186
+ if (s0 === peg$FAILED) s0 = peg$parseSpace();
1187
+ return s0;
1188
+ }
1189
+ function peg$parseWordChar() {
1129
1190
  let s0, s1, s2, s3;
1130
- if (peg$c38.test(input.charAt(peg$currPos))) {
1191
+ if (peg$c40.test(input.charAt(peg$currPos))) {
1131
1192
  s0 = input.charAt(peg$currPos);
1132
1193
  peg$currPos++;
1133
1194
  } else {
1134
1195
  s0 = peg$FAILED;
1135
- if (peg$silentFails === 0) peg$fail(peg$c39);
1196
+ if (peg$silentFails === 0) peg$fail(peg$c41);
1136
1197
  }
1137
1198
  if (s0 === peg$FAILED) {
1138
1199
  s0 = peg$currPos;
@@ -1140,113 +1201,113 @@ function $1a506a341538d943$var$peg$parse(input, options) {
1140
1201
  if (s1 !== peg$FAILED) {
1141
1202
  s2 = peg$currPos;
1142
1203
  if (input.charCodeAt(peg$currPos) === 92) {
1143
- s3 = peg$c17;
1204
+ s3 = peg$c18;
1144
1205
  peg$currPos++;
1145
1206
  } else {
1146
1207
  s3 = peg$FAILED;
1147
- if (peg$silentFails === 0) peg$fail(peg$c18);
1208
+ if (peg$silentFails === 0) peg$fail(peg$c19);
1148
1209
  }
1149
1210
  if (s3 !== peg$FAILED) {
1150
1211
  peg$savedPos = s2;
1151
- s3 = peg$c19();
1212
+ s3 = peg$c42();
1152
1213
  }
1153
1214
  s2 = s3;
1154
1215
  if (s2 === peg$FAILED) {
1155
1216
  s2 = peg$currPos;
1156
1217
  if (input.charCodeAt(peg$currPos) === 124) {
1157
- s3 = peg$c30;
1218
+ s3 = peg$c31;
1158
1219
  peg$currPos++;
1159
1220
  } else {
1160
1221
  s3 = peg$FAILED;
1161
- if (peg$silentFails === 0) peg$fail(peg$c31);
1222
+ if (peg$silentFails === 0) peg$fail(peg$c32);
1162
1223
  }
1163
1224
  if (s3 !== peg$FAILED) {
1164
1225
  peg$savedPos = s2;
1165
- s3 = peg$c36();
1226
+ s3 = peg$c38();
1166
1227
  }
1167
1228
  s2 = s3;
1168
1229
  if (s2 === peg$FAILED) {
1169
1230
  s2 = peg$currPos;
1170
1231
  if (input.charCodeAt(peg$currPos) === 91) {
1171
- s3 = peg$c10;
1232
+ s3 = peg$c11;
1172
1233
  peg$currPos++;
1173
1234
  } else {
1174
1235
  s3 = peg$FAILED;
1175
- if (peg$silentFails === 0) peg$fail(peg$c11);
1236
+ if (peg$silentFails === 0) peg$fail(peg$c12);
1176
1237
  }
1177
1238
  if (s3 !== peg$FAILED) {
1178
1239
  peg$savedPos = s2;
1179
- s3 = peg$c40();
1240
+ s3 = peg$c43();
1180
1241
  }
1181
1242
  s2 = s3;
1182
1243
  if (s2 === peg$FAILED) {
1183
1244
  s2 = peg$currPos;
1184
1245
  if (input.charCodeAt(peg$currPos) === 93) {
1185
- s3 = peg$c12;
1246
+ s3 = peg$c13;
1186
1247
  peg$currPos++;
1187
1248
  } else {
1188
1249
  s3 = peg$FAILED;
1189
- if (peg$silentFails === 0) peg$fail(peg$c13);
1250
+ if (peg$silentFails === 0) peg$fail(peg$c14);
1190
1251
  }
1191
1252
  if (s3 !== peg$FAILED) {
1192
1253
  peg$savedPos = s2;
1193
- s3 = peg$c20();
1254
+ s3 = peg$c37();
1194
1255
  }
1195
1256
  s2 = s3;
1196
1257
  if (s2 === peg$FAILED) {
1197
1258
  s2 = peg$currPos;
1198
1259
  if (input.charCodeAt(peg$currPos) === 123) {
1199
- s3 = peg$c41;
1260
+ s3 = peg$c44;
1200
1261
  peg$currPos++;
1201
1262
  } else {
1202
1263
  s3 = peg$FAILED;
1203
- if (peg$silentFails === 0) peg$fail(peg$c42);
1264
+ if (peg$silentFails === 0) peg$fail(peg$c45);
1204
1265
  }
1205
1266
  if (s3 !== peg$FAILED) {
1206
1267
  peg$savedPos = s2;
1207
- s3 = peg$c43();
1268
+ s3 = peg$c46();
1208
1269
  }
1209
1270
  s2 = s3;
1210
1271
  if (s2 === peg$FAILED) {
1211
1272
  s2 = peg$currPos;
1212
1273
  if (input.charCodeAt(peg$currPos) === 125) {
1213
- s3 = peg$c24;
1274
+ s3 = peg$c25;
1214
1275
  peg$currPos++;
1215
1276
  } else {
1216
1277
  s3 = peg$FAILED;
1217
- if (peg$silentFails === 0) peg$fail(peg$c25);
1278
+ if (peg$silentFails === 0) peg$fail(peg$c26);
1218
1279
  }
1219
1280
  if (s3 !== peg$FAILED) {
1220
1281
  peg$savedPos = s2;
1221
- s3 = peg$c37();
1282
+ s3 = peg$c39();
1222
1283
  }
1223
1284
  s2 = s3;
1224
1285
  if (s2 === peg$FAILED) {
1225
1286
  s2 = peg$currPos;
1226
1287
  if (input.charCodeAt(peg$currPos) === 37) {
1227
- s3 = peg$c44;
1288
+ s3 = peg$c47;
1228
1289
  peg$currPos++;
1229
1290
  } else {
1230
1291
  s3 = peg$FAILED;
1231
- if (peg$silentFails === 0) peg$fail(peg$c45);
1292
+ if (peg$silentFails === 0) peg$fail(peg$c48);
1232
1293
  }
1233
1294
  if (s3 !== peg$FAILED) {
1234
1295
  peg$savedPos = s2;
1235
- s3 = peg$c46();
1296
+ s3 = peg$c49();
1236
1297
  }
1237
1298
  s2 = s3;
1238
1299
  if (s2 === peg$FAILED) {
1239
1300
  s2 = peg$currPos;
1240
1301
  if (input.charCodeAt(peg$currPos) === 35) {
1241
- s3 = peg$c3;
1302
+ s3 = peg$c4;
1242
1303
  peg$currPos++;
1243
1304
  } else {
1244
1305
  s3 = peg$FAILED;
1245
- if (peg$silentFails === 0) peg$fail(peg$c4);
1306
+ if (peg$silentFails === 0) peg$fail(peg$c5);
1246
1307
  }
1247
1308
  if (s3 !== peg$FAILED) {
1248
1309
  peg$savedPos = s2;
1249
- s3 = peg$c47();
1310
+ s3 = peg$c50();
1250
1311
  }
1251
1312
  s2 = s3;
1252
1313
  }
@@ -1258,7 +1319,7 @@ function $1a506a341538d943$var$peg$parse(input, options) {
1258
1319
  }
1259
1320
  if (s2 !== peg$FAILED) {
1260
1321
  peg$savedPos = s0;
1261
- s1 = peg$c21(s2);
1322
+ s1 = peg$c22(s2);
1262
1323
  s0 = s1;
1263
1324
  } else {
1264
1325
  peg$currPos = s0;
@@ -1275,11 +1336,11 @@ function $1a506a341538d943$var$peg$parse(input, options) {
1275
1336
  let s0, s1, s2, s3, s4, s5, s6, s7;
1276
1337
  s0 = peg$currPos;
1277
1338
  if (input.charCodeAt(peg$currPos) === 123) {
1278
- s1 = peg$c41;
1339
+ s1 = peg$c44;
1279
1340
  peg$currPos++;
1280
1341
  } else {
1281
1342
  s1 = peg$FAILED;
1282
- if (peg$silentFails === 0) peg$fail(peg$c42);
1343
+ if (peg$silentFails === 0) peg$fail(peg$c45);
1283
1344
  }
1284
1345
  if (s1 !== peg$FAILED) {
1285
1346
  s2 = peg$parse_();
@@ -1297,15 +1358,15 @@ function $1a506a341538d943$var$peg$parse(input, options) {
1297
1358
  s6 = peg$parse_();
1298
1359
  if (s6 !== peg$FAILED) {
1299
1360
  if (input.charCodeAt(peg$currPos) === 125) {
1300
- s7 = peg$c24;
1361
+ s7 = peg$c25;
1301
1362
  peg$currPos++;
1302
1363
  } else {
1303
1364
  s7 = peg$FAILED;
1304
- if (peg$silentFails === 0) peg$fail(peg$c25);
1365
+ if (peg$silentFails === 0) peg$fail(peg$c26);
1305
1366
  }
1306
1367
  if (s7 !== peg$FAILED) {
1307
1368
  peg$savedPos = s0;
1308
- s1 = peg$c48(s3, s5);
1369
+ s1 = peg$c51(s3, s5);
1309
1370
  s0 = s1;
1310
1371
  } else {
1311
1372
  peg$currPos = s0;
@@ -1341,11 +1402,11 @@ function $1a506a341538d943$var$peg$parse(input, options) {
1341
1402
  let s0, s1, s2, s3;
1342
1403
  s0 = peg$currPos;
1343
1404
  if (input.charCodeAt(peg$currPos) === 58) {
1344
- s1 = peg$c49;
1405
+ s1 = peg$c52;
1345
1406
  peg$currPos++;
1346
1407
  } else {
1347
1408
  s1 = peg$FAILED;
1348
- if (peg$silentFails === 0) peg$fail(peg$c50);
1409
+ if (peg$silentFails === 0) peg$fail(peg$c53);
1349
1410
  }
1350
1411
  if (s1 !== peg$FAILED) {
1351
1412
  s2 = peg$parse_();
@@ -1353,7 +1414,7 @@ function $1a506a341538d943$var$peg$parse(input, options) {
1353
1414
  s3 = peg$parseTagValue();
1354
1415
  if (s3 !== peg$FAILED) {
1355
1416
  peg$savedPos = s0;
1356
- s1 = peg$c51(s3);
1417
+ s1 = peg$c54(s3);
1357
1418
  s0 = s1;
1358
1419
  } else {
1359
1420
  peg$currPos = s0;
@@ -1372,21 +1433,21 @@ function $1a506a341538d943$var$peg$parse(input, options) {
1372
1433
  function peg$parseTagName() {
1373
1434
  let s0, s1;
1374
1435
  s0 = [];
1375
- if (peg$c52.test(input.charAt(peg$currPos))) {
1436
+ if (peg$c55.test(input.charAt(peg$currPos))) {
1376
1437
  s1 = input.charAt(peg$currPos);
1377
1438
  peg$currPos++;
1378
1439
  } else {
1379
1440
  s1 = peg$FAILED;
1380
- if (peg$silentFails === 0) peg$fail(peg$c53);
1441
+ if (peg$silentFails === 0) peg$fail(peg$c56);
1381
1442
  }
1382
1443
  if (s1 !== peg$FAILED) while(s1 !== peg$FAILED){
1383
1444
  s0.push(s1);
1384
- if (peg$c52.test(input.charAt(peg$currPos))) {
1445
+ if (peg$c55.test(input.charAt(peg$currPos))) {
1385
1446
  s1 = input.charAt(peg$currPos);
1386
1447
  peg$currPos++;
1387
1448
  } else {
1388
1449
  s1 = peg$FAILED;
1389
- if (peg$silentFails === 0) peg$fail(peg$c53);
1450
+ if (peg$silentFails === 0) peg$fail(peg$c56);
1390
1451
  }
1391
1452
  }
1392
1453
  else s0 = peg$FAILED;
@@ -1404,12 +1465,12 @@ function $1a506a341538d943$var$peg$parse(input, options) {
1404
1465
  }
1405
1466
  function peg$parseTagValueChar() {
1406
1467
  let s0, s1, s2, s3;
1407
- if (peg$c54.test(input.charAt(peg$currPos))) {
1468
+ if (peg$c57.test(input.charAt(peg$currPos))) {
1408
1469
  s0 = input.charAt(peg$currPos);
1409
1470
  peg$currPos++;
1410
1471
  } else {
1411
1472
  s0 = peg$FAILED;
1412
- if (peg$silentFails === 0) peg$fail(peg$c55);
1473
+ if (peg$silentFails === 0) peg$fail(peg$c58);
1413
1474
  }
1414
1475
  if (s0 === peg$FAILED) {
1415
1476
  s0 = peg$currPos;
@@ -1417,50 +1478,50 @@ function $1a506a341538d943$var$peg$parse(input, options) {
1417
1478
  if (s1 !== peg$FAILED) {
1418
1479
  s2 = peg$currPos;
1419
1480
  if (input.charCodeAt(peg$currPos) === 92) {
1420
- s3 = peg$c17;
1481
+ s3 = peg$c18;
1421
1482
  peg$currPos++;
1422
1483
  } else {
1423
1484
  s3 = peg$FAILED;
1424
- if (peg$silentFails === 0) peg$fail(peg$c18);
1485
+ if (peg$silentFails === 0) peg$fail(peg$c19);
1425
1486
  }
1426
1487
  if (s3 !== peg$FAILED) {
1427
1488
  peg$savedPos = s2;
1428
- s3 = peg$c19();
1489
+ s3 = peg$c42();
1429
1490
  }
1430
1491
  s2 = s3;
1431
1492
  if (s2 === peg$FAILED) {
1432
1493
  s2 = peg$currPos;
1433
1494
  if (input.charCodeAt(peg$currPos) === 125) {
1434
- s3 = peg$c24;
1495
+ s3 = peg$c25;
1435
1496
  peg$currPos++;
1436
1497
  } else {
1437
1498
  s3 = peg$FAILED;
1438
- if (peg$silentFails === 0) peg$fail(peg$c25);
1499
+ if (peg$silentFails === 0) peg$fail(peg$c26);
1439
1500
  }
1440
1501
  if (s3 !== peg$FAILED) {
1441
1502
  peg$savedPos = s2;
1442
- s3 = peg$c37();
1503
+ s3 = peg$c39();
1443
1504
  }
1444
1505
  s2 = s3;
1445
1506
  if (s2 === peg$FAILED) {
1446
1507
  s2 = peg$currPos;
1447
1508
  if (input.charCodeAt(peg$currPos) === 123) {
1448
- s3 = peg$c41;
1509
+ s3 = peg$c44;
1449
1510
  peg$currPos++;
1450
1511
  } else {
1451
1512
  s3 = peg$FAILED;
1452
- if (peg$silentFails === 0) peg$fail(peg$c42);
1513
+ if (peg$silentFails === 0) peg$fail(peg$c45);
1453
1514
  }
1454
1515
  if (s3 !== peg$FAILED) {
1455
1516
  peg$savedPos = s2;
1456
- s3 = peg$c43();
1517
+ s3 = peg$c46();
1457
1518
  }
1458
1519
  s2 = s3;
1459
1520
  }
1460
1521
  }
1461
1522
  if (s2 !== peg$FAILED) {
1462
1523
  peg$savedPos = s0;
1463
- s1 = peg$c21(s2);
1524
+ s1 = peg$c22(s2);
1464
1525
  s0 = s1;
1465
1526
  } else {
1466
1527
  peg$currPos = s0;
@@ -1477,27 +1538,27 @@ function $1a506a341538d943$var$peg$parse(input, options) {
1477
1538
  let s0, s1;
1478
1539
  peg$silentFails++;
1479
1540
  s0 = [];
1480
- if (peg$c57.test(input.charAt(peg$currPos))) {
1541
+ if (peg$c60.test(input.charAt(peg$currPos))) {
1481
1542
  s1 = input.charAt(peg$currPos);
1482
1543
  peg$currPos++;
1483
1544
  } else {
1484
1545
  s1 = peg$FAILED;
1485
- if (peg$silentFails === 0) peg$fail(peg$c58);
1546
+ if (peg$silentFails === 0) peg$fail(peg$c61);
1486
1547
  }
1487
1548
  while(s1 !== peg$FAILED){
1488
1549
  s0.push(s1);
1489
- if (peg$c57.test(input.charAt(peg$currPos))) {
1550
+ if (peg$c60.test(input.charAt(peg$currPos))) {
1490
1551
  s1 = input.charAt(peg$currPos);
1491
1552
  peg$currPos++;
1492
1553
  } else {
1493
1554
  s1 = peg$FAILED;
1494
- if (peg$silentFails === 0) peg$fail(peg$c58);
1555
+ if (peg$silentFails === 0) peg$fail(peg$c61);
1495
1556
  }
1496
1557
  }
1497
1558
  peg$silentFails--;
1498
1559
  if (s0 === peg$FAILED) {
1499
1560
  s1 = peg$FAILED;
1500
- if (peg$silentFails === 0) peg$fail(peg$c56);
1561
+ if (peg$silentFails === 0) peg$fail(peg$c59);
1501
1562
  }
1502
1563
  return s0;
1503
1564
  }
@@ -1505,28 +1566,28 @@ function $1a506a341538d943$var$peg$parse(input, options) {
1505
1566
  let s0, s1;
1506
1567
  peg$silentFails++;
1507
1568
  s0 = [];
1508
- if (peg$c60.test(input.charAt(peg$currPos))) {
1569
+ if (peg$c63.test(input.charAt(peg$currPos))) {
1509
1570
  s1 = input.charAt(peg$currPos);
1510
1571
  peg$currPos++;
1511
1572
  } else {
1512
1573
  s1 = peg$FAILED;
1513
- if (peg$silentFails === 0) peg$fail(peg$c61);
1574
+ if (peg$silentFails === 0) peg$fail(peg$c64);
1514
1575
  }
1515
1576
  if (s1 !== peg$FAILED) while(s1 !== peg$FAILED){
1516
1577
  s0.push(s1);
1517
- if (peg$c60.test(input.charAt(peg$currPos))) {
1578
+ if (peg$c63.test(input.charAt(peg$currPos))) {
1518
1579
  s1 = input.charAt(peg$currPos);
1519
1580
  peg$currPos++;
1520
1581
  } else {
1521
1582
  s1 = peg$FAILED;
1522
- if (peg$silentFails === 0) peg$fail(peg$c61);
1583
+ if (peg$silentFails === 0) peg$fail(peg$c64);
1523
1584
  }
1524
1585
  }
1525
1586
  else s0 = peg$FAILED;
1526
1587
  peg$silentFails--;
1527
1588
  if (s0 === peg$FAILED) {
1528
1589
  s1 = peg$FAILED;
1529
- if (peg$silentFails === 0) peg$fail(peg$c59);
1590
+ if (peg$silentFails === 0) peg$fail(peg$c62);
1530
1591
  }
1531
1592
  return s0;
1532
1593
  }
@@ -1564,55 +1625,55 @@ function $1a506a341538d943$var$peg$parse(input, options) {
1564
1625
  function peg$parseLineFeed() {
1565
1626
  let s0;
1566
1627
  if (input.charCodeAt(peg$currPos) === 10) {
1567
- s0 = peg$c62;
1628
+ s0 = peg$c65;
1568
1629
  peg$currPos++;
1569
1630
  } else {
1570
1631
  s0 = peg$FAILED;
1571
- if (peg$silentFails === 0) peg$fail(peg$c63);
1632
+ if (peg$silentFails === 0) peg$fail(peg$c66);
1572
1633
  }
1573
1634
  return s0;
1574
1635
  }
1575
1636
  function peg$parseCarriageReturn() {
1576
1637
  let s0;
1577
1638
  if (input.charCodeAt(peg$currPos) === 13) {
1578
- s0 = peg$c64;
1639
+ s0 = peg$c67;
1579
1640
  peg$currPos++;
1580
1641
  } else {
1581
1642
  s0 = peg$FAILED;
1582
- if (peg$silentFails === 0) peg$fail(peg$c65);
1643
+ if (peg$silentFails === 0) peg$fail(peg$c68);
1583
1644
  }
1584
1645
  return s0;
1585
1646
  }
1586
1647
  function peg$parseEscape() {
1587
1648
  let s0;
1588
1649
  if (input.charCodeAt(peg$currPos) === 92) {
1589
- s0 = peg$c17;
1650
+ s0 = peg$c18;
1590
1651
  peg$currPos++;
1591
1652
  } else {
1592
1653
  s0 = peg$FAILED;
1593
- if (peg$silentFails === 0) peg$fail(peg$c18);
1654
+ if (peg$silentFails === 0) peg$fail(peg$c19);
1594
1655
  }
1595
1656
  return s0;
1596
1657
  }
1597
1658
  function peg$parsePound() {
1598
1659
  let s0;
1599
1660
  if (input.charCodeAt(peg$currPos) === 35) {
1600
- s0 = peg$c3;
1661
+ s0 = peg$c4;
1601
1662
  peg$currPos++;
1602
1663
  } else {
1603
1664
  s0 = peg$FAILED;
1604
- if (peg$silentFails === 0) peg$fail(peg$c4);
1665
+ if (peg$silentFails === 0) peg$fail(peg$c5);
1605
1666
  }
1606
1667
  return s0;
1607
1668
  }
1608
1669
  function peg$parsePercent() {
1609
1670
  let s0;
1610
1671
  if (input.charCodeAt(peg$currPos) === 37) {
1611
- s0 = peg$c44;
1672
+ s0 = peg$c47;
1612
1673
  peg$currPos++;
1613
1674
  } else {
1614
1675
  s0 = peg$FAILED;
1615
- if (peg$silentFails === 0) peg$fail(peg$c45);
1676
+ if (peg$silentFails === 0) peg$fail(peg$c48);
1616
1677
  }
1617
1678
  return s0;
1618
1679
  }
@@ -2004,7 +2065,11 @@ const $bff5407e03fdc8ee$var$regexes = [
2004
2065
  $bff5407e03fdc8ee$var$numericKeyRegex,
2005
2066
  $bff5407e03fdc8ee$var$numeralKeyRegex
2006
2067
  ];
2007
- class $bff5407e03fdc8ee$var$Key {
2068
+ /**
2069
+ * Represents a key, such as Eb (symbol), #3 (numeric) or VII (numeral).
2070
+ *
2071
+ * The only function considered public API is `Key.distance`
2072
+ */ class $bff5407e03fdc8ee$var$Key {
2008
2073
  modifier = null;
2009
2074
  minor = false;
2010
2075
  static parse(keyString) {
@@ -2017,7 +2082,12 @@ class $bff5407e03fdc8ee$var$Key {
2017
2082
  static toString(keyStringOrObject) {
2018
2083
  return `${$bff5407e03fdc8ee$var$Key.wrap(keyStringOrObject)}`;
2019
2084
  }
2020
- static distance(oneKey, otherKey) {
2085
+ /**
2086
+ * Calculates the distance in semitones between one key and another.
2087
+ * @param {Key | string} oneKey the key
2088
+ * @param {Key | string} otherKey the other key
2089
+ * @return {number} the distance in semitones
2090
+ */ static distance(oneKey, otherKey) {
2021
2091
  return this.wrap(oneKey).distanceTo(otherKey);
2022
2092
  }
2023
2093
  distanceTo(otherKey) {
@@ -3328,7 +3398,7 @@ const $26f57998457eb2d4$var$regexes = [
3328
3398
  else if (bassBase) this.bass = new (0, $bff5407e03fdc8ee$export$2e2bcd8739ae039)({
3329
3399
  note: bassBase,
3330
3400
  modifier: bassModifier,
3331
- minor: isMinor
3401
+ minor: false
3332
3402
  });
3333
3403
  else this.bass = null;
3334
3404
  }
@@ -3409,7 +3479,7 @@ var $26f57998457eb2d4$export$2e2bcd8739ae039 = $26f57998457eb2d4$var$Chord;
3409
3479
  });
3410
3480
  }
3411
3481
  transpose(delta, key = null, { normalizeChordSuffix: normalizeChordSuffix = false } = {}) {
3412
- const chordObj = (0, $26f57998457eb2d4$export$2e2bcd8739ae039).parse(this.chords);
3482
+ const chordObj = (0, $26f57998457eb2d4$export$2e2bcd8739ae039).parse(this.chords.trim());
3413
3483
  if (chordObj) {
3414
3484
  let transposedChord = chordObj.transpose(delta);
3415
3485
  if (key) transposedChord = transposedChord.normalize(key, {
@@ -3502,7 +3572,6 @@ const $5e9ede69210ec54a$var$ALIASES = {
3502
3572
  [$5e9ede69210ec54a$var$END_OF_TAB_SHORT]: $5e9ede69210ec54a$export$66a0ef3ffeab32b7,
3503
3573
  [$5e9ede69210ec54a$var$NEW_KEY_SHORT]: $5e9ede69210ec54a$export$b7627374a6424f68
3504
3574
  };
3505
- const $5e9ede69210ec54a$var$META_TAG_REGEX = /^meta:\s*([^:\s]+)(\s*(.+))?$/;
3506
3575
  const $5e9ede69210ec54a$var$TAG_REGEX = /^([^:\s]+)(:?\s*(.+))?$/;
3507
3576
  const $5e9ede69210ec54a$var$CUSTOM_META_TAG_NAME_REGEX = /^x_(.+)$/;
3508
3577
  function $5e9ede69210ec54a$export$3ef04055cb4a269a(tagName) {
@@ -3517,14 +3586,25 @@ const $5e9ede69210ec54a$var$translateTagNameAlias = (name)=>{
3517
3586
  /**
3518
3587
  * Represents a tag/directive. See https://www.chordpro.org/chordpro/chordpro-directives/
3519
3588
  */ class $5e9ede69210ec54a$var$Tag extends (0, $cf00b4d3af89fa07$export$2e2bcd8739ae039) {
3589
+ _isMetaTag = false;
3520
3590
  constructor(name, value = "", traceInfo = null){
3521
3591
  super(traceInfo);
3522
- this.name = name;
3523
- this.value = value || "";
3592
+ this.parseNameValue(name, value);
3593
+ }
3594
+ parseNameValue(name, value) {
3595
+ if (name === "meta") {
3596
+ const [metaName, metaValue] = value.split(/\s(.+)/);
3597
+ this.name = metaName;
3598
+ this.value = metaValue || "";
3599
+ this._isMetaTag = true;
3600
+ } else {
3601
+ this.name = name;
3602
+ this.value = value || "";
3603
+ }
3524
3604
  }
3525
3605
  static parse(tag) {
3526
3606
  if (tag instanceof $5e9ede69210ec54a$var$Tag) return tag;
3527
- return this.parseWithRegex(tag, $5e9ede69210ec54a$var$META_TAG_REGEX) || this.parseWithRegex(tag, $5e9ede69210ec54a$var$TAG_REGEX);
3607
+ return this.parseWithRegex(tag, $5e9ede69210ec54a$var$TAG_REGEX);
3528
3608
  }
3529
3609
  static parseWithRegex(tag, regex) {
3530
3610
  const matches = tag.match(regex);
@@ -3576,7 +3656,7 @@ const $5e9ede69210ec54a$var$translateTagNameAlias = (name)=>{
3576
3656
  * Checks whether the tag is either a standard meta tag or a custom meta directive (`{x_some_name}`)
3577
3657
  * @returns {boolean}
3578
3658
  */ isMetaTag() {
3579
- return $5e9ede69210ec54a$var$CUSTOM_META_TAG_NAME_REGEX.test(this.name) || $5e9ede69210ec54a$export$57ecf0dc09effb3.indexOf(this.name) !== -1;
3659
+ return this._isMetaTag || $5e9ede69210ec54a$var$CUSTOM_META_TAG_NAME_REGEX.test(this.name) || $5e9ede69210ec54a$export$57ecf0dc09effb3.indexOf(this.name) !== -1;
3580
3660
  }
3581
3661
  /**
3582
3662
  * Returns a clone of the tag.
@@ -3793,34 +3873,34 @@ var $0c3420c6a3e8a9d7$export$2e2bcd8739ae039 = $0c3420c6a3e8a9d7$var$Paragraph;
3793
3873
 
3794
3874
  class $59abde4480df2d69$var$MetadataAccessors {
3795
3875
  get key() {
3796
- return this.getMetadata((0, $5e9ede69210ec54a$export$7167c830cefcb6b5));
3876
+ return this.getSingleMetadata((0, $5e9ede69210ec54a$export$7167c830cefcb6b5));
3797
3877
  }
3798
3878
  get title() {
3799
- return this.getMetadata((0, $5e9ede69210ec54a$export$f1e53f710478ceb4));
3879
+ return this.getSingleMetadata((0, $5e9ede69210ec54a$export$f1e53f710478ceb4));
3800
3880
  }
3801
3881
  get subtitle() {
3802
- return this.getMetadata((0, $5e9ede69210ec54a$export$5895c693c74b9cf4));
3882
+ return this.getSingleMetadata((0, $5e9ede69210ec54a$export$5895c693c74b9cf4));
3803
3883
  }
3804
3884
  get capo() {
3805
3885
  return this.getMetadata((0, $5e9ede69210ec54a$export$866f445d49bad88e));
3806
3886
  }
3807
3887
  get duration() {
3808
- return this.getMetadata((0, $5e9ede69210ec54a$export$bacc88974c736870));
3888
+ return this.getSingleMetadata((0, $5e9ede69210ec54a$export$bacc88974c736870));
3809
3889
  }
3810
3890
  get tempo() {
3811
- return this.getMetadata((0, $5e9ede69210ec54a$export$bd8d57d0bc5a8478));
3891
+ return this.getSingleMetadata((0, $5e9ede69210ec54a$export$bd8d57d0bc5a8478));
3812
3892
  }
3813
3893
  get time() {
3814
3894
  return this.getMetadata((0, $5e9ede69210ec54a$export$a9905336c0111a3a));
3815
3895
  }
3816
3896
  get year() {
3817
- return this.getMetadata((0, $5e9ede69210ec54a$export$90b88dc425a06a95));
3897
+ return this.getSingleMetadata((0, $5e9ede69210ec54a$export$90b88dc425a06a95));
3818
3898
  }
3819
3899
  get album() {
3820
3900
  return this.getMetadata((0, $5e9ede69210ec54a$export$10227cb086d1770c));
3821
3901
  }
3822
3902
  get copyright() {
3823
- return this.getMetadata((0, $5e9ede69210ec54a$export$4ab8c75045d12480));
3903
+ return this.getSingleMetadata((0, $5e9ede69210ec54a$export$4ab8c75045d12480));
3824
3904
  }
3825
3905
  get lyricist() {
3826
3906
  return this.getMetadata((0, $5e9ede69210ec54a$export$a6901bd008617c61));
@@ -3885,6 +3965,9 @@ function $1406c61233580008$var$appendValue(array, key, value) {
3885
3965
  getMetadata(name) {
3886
3966
  return this.get(name);
3887
3967
  }
3968
+ getSingleMetadata(name) {
3969
+ return this.getSingle(name);
3970
+ }
3888
3971
  /**
3889
3972
  * Reads a metadata value by key. This method supports simple value lookup, as fetching single array values.
3890
3973
  *
@@ -4141,7 +4224,10 @@ var $ce1dd7d0f2cd2369$export$2e2bcd8739ae039 = $ce1dd7d0f2cd2369$var$ParserWarni
4141
4224
  return this.metadata;
4142
4225
  }
4143
4226
  getMetadata(name) {
4144
- return this.metadata[name] || null;
4227
+ return this.metadata.getMetadata(name);
4228
+ }
4229
+ getSingleMetadata(name) {
4230
+ return this.metadata.getSingleMetadata(name);
4145
4231
  }
4146
4232
  /**
4147
4233
  * Returns a copy of the song with the key value set to the specified key. It changes: