@gmb/bitmark-parser-generator 4.12.0 → 4.14.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/dist/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/browser/cjs/index.cjs +1786 -438
- package/dist/browser/cjs/index.cjs.map +1 -1
- package/dist/browser/cjs/index.d.cts +301 -17
- package/dist/browser/esm/index.d.ts +301 -17
- package/dist/browser/esm/index.js +1786 -438
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/index.cjs +1786 -438
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +301 -17
- package/dist/index.d.ts +301 -17
- package/dist/index.js +1786 -438
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -116,6 +116,7 @@ var BitType = superenum({
|
|
|
116
116
|
botActionSend: "bot-action-send",
|
|
117
117
|
botActionTrueFalse: "bot-action-true-false",
|
|
118
118
|
botInterview: "bot-interview",
|
|
119
|
+
brandColor: "brand-color",
|
|
119
120
|
browserImage: "browser-image",
|
|
120
121
|
bug: "bug",
|
|
121
122
|
bugAlt: "bug-alt",
|
|
@@ -430,7 +431,18 @@ var BitType = superenum({
|
|
|
430
431
|
pageSubscribe: "page-subscribe",
|
|
431
432
|
parameters: "parameters",
|
|
432
433
|
photo: "photo",
|
|
434
|
+
platform: "platform",
|
|
435
|
+
platformHeader: "platform-header",
|
|
436
|
+
platformMain: "platform-main",
|
|
437
|
+
platformMainButton: "platform-main-button",
|
|
438
|
+
platformMainInput: "platform-main-input",
|
|
433
439
|
platformPath: "platform-path",
|
|
440
|
+
platformSection: "platform-section",
|
|
441
|
+
platformSectionButton: "platform-section-button",
|
|
442
|
+
platformSectionChat: "platform-section-chat",
|
|
443
|
+
platformSectionHeader: "platform-section-header",
|
|
444
|
+
platformSectionInput: "platform-section-input",
|
|
445
|
+
platformSystemIcon: "platform-system-icon",
|
|
434
446
|
preparationNote: "preparation-note",
|
|
435
447
|
pronunciationTable: "pronunciation-table",
|
|
436
448
|
prototypeImages: "prototype-images",
|
|
@@ -561,6 +573,7 @@ var BitType = superenum({
|
|
|
561
573
|
surveyRatingOnce: "survey-rating-once",
|
|
562
574
|
table: "table",
|
|
563
575
|
tableAlt: "table-alt",
|
|
576
|
+
tableExtended: "table-extended",
|
|
564
577
|
tableImage: "table-image",
|
|
565
578
|
tableImageAlt: "table-image-alt",
|
|
566
579
|
takePicture: "take-picture",
|
|
@@ -691,6 +704,7 @@ var CardSetConfigKey = superenum7({
|
|
|
691
704
|
matchImagePairs: "matchImagePairs",
|
|
692
705
|
matchMatrix: "matchMatrix",
|
|
693
706
|
table: "table",
|
|
707
|
+
tableExtended: "tableExtended",
|
|
694
708
|
pronunciationTable: "pronunciationTable",
|
|
695
709
|
botActionResponses: "botActionResponses",
|
|
696
710
|
exampleBitList: "exampleBitList",
|
|
@@ -1057,6 +1071,7 @@ var groupKeys = {
|
|
|
1057
1071
|
group_bookCommon: "group_bookCommon",
|
|
1058
1072
|
group_learningPathCommon: "group_learningPathCommon",
|
|
1059
1073
|
group_advertisingCommon: "group_advertisingCommon",
|
|
1074
|
+
group_platformColorsCommon: "group_platformColorsCommon",
|
|
1060
1075
|
group_quizCommon: "group_quizCommon",
|
|
1061
1076
|
group_resourceBitTags: "group_resourceBitTags",
|
|
1062
1077
|
group_resourceCommon: "group_resourceCommon",
|
|
@@ -1111,6 +1126,8 @@ var propertyKeys = {
|
|
|
1111
1126
|
property_author: "@author",
|
|
1112
1127
|
property_autoplay: "@autoplay",
|
|
1113
1128
|
property_availableClassifications: "@availableClassifications",
|
|
1129
|
+
property_brandColor: "@brandColor",
|
|
1130
|
+
property_brandColorName: "@brandColorName",
|
|
1114
1131
|
property_blockId: "@blockId",
|
|
1115
1132
|
property_book: "@book",
|
|
1116
1133
|
property_bookAlias: "@bookAlias",
|
|
@@ -1177,6 +1194,8 @@ var propertyKeys = {
|
|
|
1177
1194
|
property_imageSource: "@imageSource",
|
|
1178
1195
|
property_index: "@index",
|
|
1179
1196
|
property_internalComment: "@internalComment",
|
|
1197
|
+
property_internalPrintPdf: "@internalPrintPdf",
|
|
1198
|
+
property_hasPrintRestriction: "@hasPrintRestriction",
|
|
1180
1199
|
property_isCaseSensitive: "@isCaseSensitive",
|
|
1181
1200
|
property_isInfoOnly: "@isInfoOnly",
|
|
1182
1201
|
property_isPublic: "@isPublic",
|
|
@@ -1217,6 +1236,18 @@ var propertyKeys = {
|
|
|
1217
1236
|
property_partner: "@partner",
|
|
1218
1237
|
// Deprecated, replaced by person
|
|
1219
1238
|
property_path: "@path",
|
|
1239
|
+
property_platformBackgroundColor: "@platformBackgroundColor",
|
|
1240
|
+
property_platformButtonBackgroundColor: "@platformButtonBackgroundColor",
|
|
1241
|
+
property_platformButtonPrimaryColor: "@platformButtonPrimaryColor",
|
|
1242
|
+
property_platformMessageBackgroundColor: "@platformMessageBackgroundColor",
|
|
1243
|
+
property_platformName: "@platformName",
|
|
1244
|
+
property_platformPlaceholderColor: "@platformPlaceholderColor",
|
|
1245
|
+
property_platformPrimaryColor: "@platformPrimaryColor",
|
|
1246
|
+
property_platformScrollbarColor: "@platformScrollbarColor",
|
|
1247
|
+
property_platformSecondaryColor: "@platformSecondaryColor",
|
|
1248
|
+
property_platformSelectionColor: "@platformSelectionColor",
|
|
1249
|
+
property_platformSeparatorColor: "@platformSeparatorColor",
|
|
1250
|
+
property_platformTextSelectionColor: "@platformTextSelectionColor",
|
|
1220
1251
|
property_person: "@person",
|
|
1221
1252
|
property_pointerLeft: "@pointerLeft",
|
|
1222
1253
|
property_pointerTop: "@pointerTop",
|
|
@@ -1266,6 +1297,7 @@ var propertyKeys = {
|
|
|
1266
1297
|
property_size: "@size",
|
|
1267
1298
|
property_slug: "@slug",
|
|
1268
1299
|
property_sourceDocument: "@sourceDocument",
|
|
1300
|
+
property_sourceRL: "@sourceRL",
|
|
1269
1301
|
property_spaceId: "@spaceId",
|
|
1270
1302
|
property_src1x: "@src1x",
|
|
1271
1303
|
property_src2x: "@src2x",
|
|
@@ -1287,6 +1319,10 @@ var propertyKeys = {
|
|
|
1287
1319
|
property_tableSearch: "@tableSearch",
|
|
1288
1320
|
property_tableSort: "@tableSort",
|
|
1289
1321
|
property_tableWhitespaceNoWrap: "@tableWhitespaceNoWrap",
|
|
1322
|
+
property_tableCellType: "@tableCellType",
|
|
1323
|
+
property_tableRowSpan: "@tableRowSpan",
|
|
1324
|
+
property_tableColSpan: "@tableColSpan",
|
|
1325
|
+
property_tableScope: "@tableScope",
|
|
1290
1326
|
property_tag: "@tag",
|
|
1291
1327
|
property_target: "@target",
|
|
1292
1328
|
property_technicalTerm: "@technicalTerm",
|
|
@@ -1340,6 +1376,9 @@ var resourceKeys = {
|
|
|
1340
1376
|
resource_appLink: "&appLink",
|
|
1341
1377
|
resource_websiteLink: "&websiteLink",
|
|
1342
1378
|
resource_icon: "&icon",
|
|
1379
|
+
resource_platformBackgroundImage: "&platformBackgroundImage",
|
|
1380
|
+
resource_platformIcon: "&platformIcon",
|
|
1381
|
+
resource_platformLogo: "&platformLogo",
|
|
1343
1382
|
resource_backgroundWallpaper: "&backgroundWallpaper",
|
|
1344
1383
|
resource_imagePlaceholder: "&imagePlaceholder"
|
|
1345
1384
|
};
|
|
@@ -1566,7 +1605,10 @@ var ResourceType = superenum13({
|
|
|
1566
1605
|
// Aliases for image
|
|
1567
1606
|
icon: "icon",
|
|
1568
1607
|
backgroundWallpaper: "backgroundWallpaper",
|
|
1569
|
-
imagePlaceholder: "imagePlaceholder"
|
|
1608
|
+
imagePlaceholder: "imagePlaceholder",
|
|
1609
|
+
platformIcon: "platformIcon",
|
|
1610
|
+
platformLogo: "platformLogo",
|
|
1611
|
+
platformBackgroundImage: "platformBackgroundImage"
|
|
1570
1612
|
});
|
|
1571
1613
|
function resourceTypeToConfigKey(type) {
|
|
1572
1614
|
return `&${stringUtils.kebabToCamel(type)}`;
|
|
@@ -2363,6 +2405,47 @@ var CARDSETS = {
|
|
|
2363
2405
|
]
|
|
2364
2406
|
]
|
|
2365
2407
|
},
|
|
2408
|
+
[CardSetConfigKey.tableExtended]: {
|
|
2409
|
+
variants: [
|
|
2410
|
+
// Side 1
|
|
2411
|
+
[
|
|
2412
|
+
// Variant 1..N
|
|
2413
|
+
{
|
|
2414
|
+
tags: [
|
|
2415
|
+
{
|
|
2416
|
+
key: ConfigKey.group_standardItemLeadInstructionHint,
|
|
2417
|
+
description: "Standard tags for lead, instruction, and hint."
|
|
2418
|
+
},
|
|
2419
|
+
{
|
|
2420
|
+
key: ConfigKey.tag_title,
|
|
2421
|
+
description: "Title of the table."
|
|
2422
|
+
},
|
|
2423
|
+
{
|
|
2424
|
+
key: ConfigKey.property_tableCellType,
|
|
2425
|
+
description: "Table cell type (th/td).",
|
|
2426
|
+
format: TagFormat.plainText
|
|
2427
|
+
},
|
|
2428
|
+
{
|
|
2429
|
+
key: ConfigKey.property_tableRowSpan,
|
|
2430
|
+
description: "Number of rows the cell spans.",
|
|
2431
|
+
format: TagFormat.number
|
|
2432
|
+
},
|
|
2433
|
+
{
|
|
2434
|
+
key: ConfigKey.property_tableColSpan,
|
|
2435
|
+
description: "Number of columns the cell spans.",
|
|
2436
|
+
format: TagFormat.number
|
|
2437
|
+
},
|
|
2438
|
+
{
|
|
2439
|
+
key: ConfigKey.property_tableScope,
|
|
2440
|
+
description: "Scope attribute for header cells.",
|
|
2441
|
+
format: TagFormat.plainText
|
|
2442
|
+
}
|
|
2443
|
+
],
|
|
2444
|
+
repeatCount: Count.infinity
|
|
2445
|
+
}
|
|
2446
|
+
]
|
|
2447
|
+
]
|
|
2448
|
+
},
|
|
2366
2449
|
[CardSetConfigKey.pronunciationTable]: {
|
|
2367
2450
|
variants: [
|
|
2368
2451
|
// Side 1
|
|
@@ -2581,6 +2664,11 @@ var GROUPS = {
|
|
|
2581
2664
|
format: TagFormat.plainText,
|
|
2582
2665
|
maxCount: Count.infinity
|
|
2583
2666
|
},
|
|
2667
|
+
{
|
|
2668
|
+
key: ConfigKey.property_sourceRL,
|
|
2669
|
+
description: "The original location of the information in the original source material",
|
|
2670
|
+
format: TagFormat.plainText
|
|
2671
|
+
},
|
|
2584
2672
|
{
|
|
2585
2673
|
key: ConfigKey.property_isTemplate,
|
|
2586
2674
|
description: "If true, the bit is a template",
|
|
@@ -3227,6 +3315,17 @@ var GROUPS = {
|
|
|
3227
3315
|
key: ConfigKey.property_sourceDocument,
|
|
3228
3316
|
description: "Url of the source document for the book (for example, a PDF file)",
|
|
3229
3317
|
format: TagFormat.plainText
|
|
3318
|
+
},
|
|
3319
|
+
{
|
|
3320
|
+
key: ConfigKey.property_internalPrintPdf,
|
|
3321
|
+
description: "Url of the internal print PDF for the book",
|
|
3322
|
+
format: TagFormat.plainText
|
|
3323
|
+
},
|
|
3324
|
+
{
|
|
3325
|
+
key: ConfigKey.property_hasPrintRestriction,
|
|
3326
|
+
description: "If true, the book has print restrictions",
|
|
3327
|
+
format: TagFormat.boolean,
|
|
3328
|
+
defaultValue: "true"
|
|
3230
3329
|
}
|
|
3231
3330
|
]
|
|
3232
3331
|
},
|
|
@@ -3316,6 +3415,67 @@ var GROUPS = {
|
|
|
3316
3415
|
}
|
|
3317
3416
|
]
|
|
3318
3417
|
},
|
|
3418
|
+
[ConfigKey.group_platformColorsCommon]: {
|
|
3419
|
+
type: GroupConfigType.standard,
|
|
3420
|
+
description: "Common platform colors",
|
|
3421
|
+
tags: [
|
|
3422
|
+
{
|
|
3423
|
+
key: ConfigKey.property_platformPrimaryColor,
|
|
3424
|
+
description: "The platform system primary color",
|
|
3425
|
+
format: TagFormat.plainText
|
|
3426
|
+
},
|
|
3427
|
+
{
|
|
3428
|
+
key: ConfigKey.property_platformSecondaryColor,
|
|
3429
|
+
description: "The platform section secondary color",
|
|
3430
|
+
format: TagFormat.plainText
|
|
3431
|
+
},
|
|
3432
|
+
{
|
|
3433
|
+
key: ConfigKey.property_platformBackgroundColor,
|
|
3434
|
+
description: "The platform system background color",
|
|
3435
|
+
format: TagFormat.plainText
|
|
3436
|
+
},
|
|
3437
|
+
{
|
|
3438
|
+
key: ConfigKey.property_platformButtonPrimaryColor,
|
|
3439
|
+
description: "The platform section header button primary color",
|
|
3440
|
+
format: TagFormat.plainText
|
|
3441
|
+
},
|
|
3442
|
+
{
|
|
3443
|
+
key: ConfigKey.property_platformButtonBackgroundColor,
|
|
3444
|
+
description: "The platform section header button background color",
|
|
3445
|
+
format: TagFormat.plainText
|
|
3446
|
+
},
|
|
3447
|
+
{
|
|
3448
|
+
key: ConfigKey.property_platformScrollbarColor,
|
|
3449
|
+
description: "The platform main scrollbar color",
|
|
3450
|
+
format: TagFormat.plainText
|
|
3451
|
+
},
|
|
3452
|
+
{
|
|
3453
|
+
key: ConfigKey.property_platformSelectionColor,
|
|
3454
|
+
description: "The platform main selection color",
|
|
3455
|
+
format: TagFormat.plainText
|
|
3456
|
+
},
|
|
3457
|
+
{
|
|
3458
|
+
key: ConfigKey.property_platformTextSelectionColor,
|
|
3459
|
+
description: "The platform main input text selection color",
|
|
3460
|
+
format: TagFormat.plainText
|
|
3461
|
+
},
|
|
3462
|
+
{
|
|
3463
|
+
key: ConfigKey.property_platformSeparatorColor,
|
|
3464
|
+
description: "The platform main separator color",
|
|
3465
|
+
format: TagFormat.plainText
|
|
3466
|
+
},
|
|
3467
|
+
{
|
|
3468
|
+
key: ConfigKey.property_platformPlaceholderColor,
|
|
3469
|
+
description: "The platform main input placeholder color",
|
|
3470
|
+
format: TagFormat.plainText
|
|
3471
|
+
},
|
|
3472
|
+
{
|
|
3473
|
+
key: ConfigKey.property_platformMessageBackgroundColor,
|
|
3474
|
+
description: "The platform section chat message background color",
|
|
3475
|
+
format: TagFormat.plainText
|
|
3476
|
+
}
|
|
3477
|
+
]
|
|
3478
|
+
},
|
|
3319
3479
|
[ConfigKey.group_quizCommon]: {
|
|
3320
3480
|
type: GroupConfigType.standard,
|
|
3321
3481
|
description: "Common quiz tags",
|
|
@@ -7117,6 +7277,23 @@ var BITS = {
|
|
|
7117
7277
|
baseBitType: BitType.interview,
|
|
7118
7278
|
description: "Bot interview bit, used to create bot interviews in articles or books"
|
|
7119
7279
|
},
|
|
7280
|
+
[BitType.brandColor]: {
|
|
7281
|
+
since: "4.12.0",
|
|
7282
|
+
baseBitType: BitType._standard,
|
|
7283
|
+
description: "Brand color bit, used to define brand colors",
|
|
7284
|
+
tags: [
|
|
7285
|
+
{
|
|
7286
|
+
key: ConfigKey.property_brandColor,
|
|
7287
|
+
description: "The brand color",
|
|
7288
|
+
format: TagFormat.plainText
|
|
7289
|
+
},
|
|
7290
|
+
{
|
|
7291
|
+
key: ConfigKey.property_brandColorName,
|
|
7292
|
+
description: "The brand color name",
|
|
7293
|
+
format: TagFormat.plainText
|
|
7294
|
+
}
|
|
7295
|
+
]
|
|
7296
|
+
},
|
|
7120
7297
|
[BitType.learningPathBook]: {
|
|
7121
7298
|
since: "1.3.0",
|
|
7122
7299
|
baseBitType: BitType._standard,
|
|
@@ -7875,6 +8052,160 @@ var BITS = {
|
|
|
7875
8052
|
baseBitType: BitType.image,
|
|
7876
8053
|
description: "Photo bit, used to create photo bits in articles or books"
|
|
7877
8054
|
},
|
|
8055
|
+
[BitType.platform]: {
|
|
8056
|
+
since: "4.12.0",
|
|
8057
|
+
baseBitType: BitType._standard,
|
|
8058
|
+
description: "Platform bit, used to define platform properties",
|
|
8059
|
+
tags: [
|
|
8060
|
+
{
|
|
8061
|
+
key: ConfigKey.property_platformName,
|
|
8062
|
+
description: "The platform name",
|
|
8063
|
+
format: TagFormat.plainText
|
|
8064
|
+
},
|
|
8065
|
+
{
|
|
8066
|
+
key: ConfigKey.resource_platformIcon,
|
|
8067
|
+
description: "The platform icon",
|
|
8068
|
+
chain: [
|
|
8069
|
+
{
|
|
8070
|
+
key: ConfigKey.group_resourceImageCommon,
|
|
8071
|
+
description: "Common image properties for the platform icon resource"
|
|
8072
|
+
}
|
|
8073
|
+
],
|
|
8074
|
+
maxCount: 1
|
|
8075
|
+
}
|
|
8076
|
+
]
|
|
8077
|
+
},
|
|
8078
|
+
[BitType.platformHeader]: {
|
|
8079
|
+
since: "4.12.0",
|
|
8080
|
+
baseBitType: BitType._standard,
|
|
8081
|
+
description: "Platform header bit, used to define platform header properties",
|
|
8082
|
+
tags: [
|
|
8083
|
+
{
|
|
8084
|
+
key: ConfigKey.resource_platformLogo,
|
|
8085
|
+
description: "The platform logo",
|
|
8086
|
+
chain: [
|
|
8087
|
+
{
|
|
8088
|
+
key: ConfigKey.group_resourceImageCommon,
|
|
8089
|
+
description: "Common image properties for the platform logo resource"
|
|
8090
|
+
}
|
|
8091
|
+
],
|
|
8092
|
+
maxCount: 1
|
|
8093
|
+
},
|
|
8094
|
+
{
|
|
8095
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8096
|
+
description: "Common platform colors"
|
|
8097
|
+
}
|
|
8098
|
+
]
|
|
8099
|
+
},
|
|
8100
|
+
[BitType.platformMain]: {
|
|
8101
|
+
since: "4.12.0",
|
|
8102
|
+
baseBitType: BitType._standard,
|
|
8103
|
+
description: "Platform main bit, used to define platform main properties",
|
|
8104
|
+
tags: [
|
|
8105
|
+
{
|
|
8106
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8107
|
+
description: "Common platform colors"
|
|
8108
|
+
}
|
|
8109
|
+
]
|
|
8110
|
+
},
|
|
8111
|
+
[BitType.platformMainButton]: {
|
|
8112
|
+
since: "4.12.0",
|
|
8113
|
+
baseBitType: BitType._standard,
|
|
8114
|
+
description: "Platform main button bit, used to define platform main button properties",
|
|
8115
|
+
tags: [
|
|
8116
|
+
{
|
|
8117
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8118
|
+
description: "Common platform colors"
|
|
8119
|
+
}
|
|
8120
|
+
]
|
|
8121
|
+
},
|
|
8122
|
+
[BitType.platformMainInput]: {
|
|
8123
|
+
since: "4.12.0",
|
|
8124
|
+
baseBitType: BitType._standard,
|
|
8125
|
+
description: "Platform main input bit, used to define platform main input properties",
|
|
8126
|
+
tags: [
|
|
8127
|
+
{
|
|
8128
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8129
|
+
description: "Common platform colors"
|
|
8130
|
+
}
|
|
8131
|
+
]
|
|
8132
|
+
},
|
|
8133
|
+
[BitType.platformSection]: {
|
|
8134
|
+
since: "4.12.0",
|
|
8135
|
+
baseBitType: BitType._standard,
|
|
8136
|
+
description: "Platform section bit, used to define platform section properties",
|
|
8137
|
+
tags: [
|
|
8138
|
+
{
|
|
8139
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8140
|
+
description: "Common platform colors"
|
|
8141
|
+
}
|
|
8142
|
+
]
|
|
8143
|
+
},
|
|
8144
|
+
[BitType.platformSectionButton]: {
|
|
8145
|
+
since: "4.12.0",
|
|
8146
|
+
baseBitType: BitType._standard,
|
|
8147
|
+
description: "Platform section button bit, used to define platform section button properties",
|
|
8148
|
+
tags: [
|
|
8149
|
+
{
|
|
8150
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8151
|
+
description: "Common platform colors"
|
|
8152
|
+
}
|
|
8153
|
+
]
|
|
8154
|
+
},
|
|
8155
|
+
[BitType.platformSectionChat]: {
|
|
8156
|
+
since: "4.12.0",
|
|
8157
|
+
baseBitType: BitType._standard,
|
|
8158
|
+
description: "Platform section chat bit, used to define platform section chat properties",
|
|
8159
|
+
tags: [
|
|
8160
|
+
{
|
|
8161
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8162
|
+
description: "Common platform colors"
|
|
8163
|
+
},
|
|
8164
|
+
{
|
|
8165
|
+
key: ConfigKey.resource_platformBackgroundImage,
|
|
8166
|
+
description: "The platform section chat background image",
|
|
8167
|
+
chain: [
|
|
8168
|
+
{
|
|
8169
|
+
key: ConfigKey.group_resourceImageCommon,
|
|
8170
|
+
description: "Common image properties for the platform background image resource"
|
|
8171
|
+
}
|
|
8172
|
+
]
|
|
8173
|
+
}
|
|
8174
|
+
]
|
|
8175
|
+
},
|
|
8176
|
+
[BitType.platformSectionHeader]: {
|
|
8177
|
+
since: "4.12.0",
|
|
8178
|
+
baseBitType: BitType._standard,
|
|
8179
|
+
description: "Platform section header bit, used to define platform section header properties",
|
|
8180
|
+
tags: [
|
|
8181
|
+
{
|
|
8182
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8183
|
+
description: "Common platform colors"
|
|
8184
|
+
}
|
|
8185
|
+
]
|
|
8186
|
+
},
|
|
8187
|
+
[BitType.platformSectionInput]: {
|
|
8188
|
+
since: "4.12.0",
|
|
8189
|
+
baseBitType: BitType._standard,
|
|
8190
|
+
description: "Platform section input bit, used to define platform section input properties",
|
|
8191
|
+
tags: [
|
|
8192
|
+
{
|
|
8193
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8194
|
+
description: "Common platform colors"
|
|
8195
|
+
}
|
|
8196
|
+
]
|
|
8197
|
+
},
|
|
8198
|
+
[BitType.platformSystemIcon]: {
|
|
8199
|
+
since: "4.12.0",
|
|
8200
|
+
baseBitType: BitType._standard,
|
|
8201
|
+
description: "Platform system icon bit, used to define platform system icon properties",
|
|
8202
|
+
tags: [
|
|
8203
|
+
{
|
|
8204
|
+
key: ConfigKey.group_platformColorsCommon,
|
|
8205
|
+
description: "Common platform colors"
|
|
8206
|
+
}
|
|
8207
|
+
]
|
|
8208
|
+
},
|
|
7878
8209
|
[BitType.quote]: {
|
|
7879
8210
|
since: "1.3.0",
|
|
7880
8211
|
baseBitType: BitType._standard,
|
|
@@ -8242,6 +8573,12 @@ var BITS = {
|
|
|
8242
8573
|
],
|
|
8243
8574
|
cardSet: CardSetConfigKey.table
|
|
8244
8575
|
},
|
|
8576
|
+
[BitType.tableExtended]: {
|
|
8577
|
+
since: "4.14.0",
|
|
8578
|
+
baseBitType: BitType.table,
|
|
8579
|
+
description: "Extended table bit, used to create complex tables with all HTML table features",
|
|
8580
|
+
cardSet: CardSetConfigKey.tableExtended
|
|
8581
|
+
},
|
|
8245
8582
|
[BitType.tableAlt]: {
|
|
8246
8583
|
since: "1.16.0",
|
|
8247
8584
|
baseBitType: BitType.table,
|
|
@@ -9223,7 +9560,7 @@ var instance2 = new Config();
|
|
|
9223
9560
|
// src/generated/package_info.ts
|
|
9224
9561
|
var PACKAGE_INFO = {
|
|
9225
9562
|
"name": "@gmb/bitmark-parser-generator",
|
|
9226
|
-
"version": "4.
|
|
9563
|
+
"version": "4.14.0",
|
|
9227
9564
|
"author": "Get More Brain Ltd",
|
|
9228
9565
|
"license": "ISC",
|
|
9229
9566
|
"description": "A bitmark parser and generator using Peggy.js"
|
|
@@ -9568,6 +9905,10 @@ var NodeType = superenum20({
|
|
|
9568
9905
|
advertisingClickUrl: "advertisingClickUrl",
|
|
9569
9906
|
advertisingClickUrlValue: "advertisingClickUrlValue",
|
|
9570
9907
|
ageRange: "ageRange",
|
|
9908
|
+
brandColor: "brandColor",
|
|
9909
|
+
brandColorValue: "brandColorValue",
|
|
9910
|
+
brandColorName: "brandColorName",
|
|
9911
|
+
brandColorNameValue: "brandColorNameValue",
|
|
9571
9912
|
ageRangeValue: "ageRangeValue",
|
|
9572
9913
|
aiGenerated: "aiGenerated",
|
|
9573
9914
|
aiGeneratedValue: "aiGeneratedValue",
|
|
@@ -9720,6 +10061,7 @@ var NodeType = superenum20({
|
|
|
9720
10061
|
durationValue: "durationValue",
|
|
9721
10062
|
elements: "elements",
|
|
9722
10063
|
elementsValue: "elementsValue",
|
|
10064
|
+
elementsValueValue: "elementsValueValue",
|
|
9723
10065
|
emphasis: "emphasis",
|
|
9724
10066
|
end: "end",
|
|
9725
10067
|
errors: "errors",
|
|
@@ -9748,6 +10090,7 @@ var NodeType = superenum20({
|
|
|
9748
10090
|
focusY: "focusY",
|
|
9749
10091
|
focusYValue: "focusYValue",
|
|
9750
10092
|
footer: "footer",
|
|
10093
|
+
footerValue: "footerValue",
|
|
9751
10094
|
footerText: "footerText",
|
|
9752
10095
|
forKeys: "forKeys",
|
|
9753
10096
|
format: "format",
|
|
@@ -9770,11 +10113,13 @@ var NodeType = superenum20({
|
|
|
9770
10113
|
hasBookNavigationValue: "hasBookNavigationValue",
|
|
9771
10114
|
hasMarkAsDone: "hasMarkAsDone",
|
|
9772
10115
|
hasMarkAsDoneValue: "hasMarkAsDoneValue",
|
|
10116
|
+
head: "head",
|
|
9773
10117
|
heading: "heading",
|
|
9774
10118
|
height: "height",
|
|
9775
10119
|
heightValue: "heightValue",
|
|
9776
10120
|
highlight: "highlight",
|
|
9777
10121
|
hint: "hint",
|
|
10122
|
+
hintValue: "hintValue",
|
|
9778
10123
|
href: "href",
|
|
9779
10124
|
icon: "icon",
|
|
9780
10125
|
iconTag: "iconTag",
|
|
@@ -9796,8 +10141,13 @@ var NodeType = superenum20({
|
|
|
9796
10141
|
ingredients: "ingredients",
|
|
9797
10142
|
ingredientsValue: "ingredientsValue",
|
|
9798
10143
|
instruction: "instruction",
|
|
10144
|
+
instructionValue: "instructionValue",
|
|
9799
10145
|
internalComment: "internalComment",
|
|
9800
10146
|
internalCommentValue: "internalCommentValue",
|
|
10147
|
+
internalPrintPdf: "internalPrintPdf",
|
|
10148
|
+
internalPrintPdfValue: "internalPrintPdfValue",
|
|
10149
|
+
hasPrintRestriction: "hasPrintRestriction",
|
|
10150
|
+
hasPrintRestrictionValue: "hasPrintRestrictionValue",
|
|
9801
10151
|
isCaseSensitive: "isCaseSensitive",
|
|
9802
10152
|
isCommented: "isCommented",
|
|
9803
10153
|
isCorrect: "isCorrect",
|
|
@@ -9816,6 +10166,7 @@ var NodeType = superenum20({
|
|
|
9816
10166
|
isTracked: "isTracked",
|
|
9817
10167
|
isTrackedValue: "isTrackedValue",
|
|
9818
10168
|
item: "item",
|
|
10169
|
+
itemValue: "itemValue",
|
|
9819
10170
|
itemLead: "itemLead",
|
|
9820
10171
|
jobTitle: "jobTitle",
|
|
9821
10172
|
jobTitleValue: "jobTitleValue",
|
|
@@ -9842,6 +10193,7 @@ var NodeType = superenum20({
|
|
|
9842
10193
|
layerRoleValue: "layerRoleValue",
|
|
9843
10194
|
layerValue: "layerValue",
|
|
9844
10195
|
lead: "lead",
|
|
10196
|
+
leadValue: "leadValue",
|
|
9845
10197
|
level: "level",
|
|
9846
10198
|
levelACTFL: "levelACTFL",
|
|
9847
10199
|
levelACTFLValue: "levelACTFLValue",
|
|
@@ -9863,6 +10215,7 @@ var NodeType = superenum20({
|
|
|
9863
10215
|
machineTranslatedValue: "machineTranslatedValue",
|
|
9864
10216
|
mailingList: "mailingList",
|
|
9865
10217
|
marginNumber: "marginNumber",
|
|
10218
|
+
marginNumberValue: "marginNumberValue",
|
|
9866
10219
|
mark: "mark",
|
|
9867
10220
|
markConfig: "markConfig",
|
|
9868
10221
|
markConfigValue: "markConfigValue",
|
|
@@ -9891,6 +10244,7 @@ var NodeType = superenum20({
|
|
|
9891
10244
|
pageNo: "pageNo",
|
|
9892
10245
|
pageNoValue: "pageNoValue",
|
|
9893
10246
|
pageNumber: "pageNumber",
|
|
10247
|
+
pageNumberValue: "pageNumberValue",
|
|
9894
10248
|
pageValue: "pageValue",
|
|
9895
10249
|
pairs: "pairs",
|
|
9896
10250
|
pairsValue: "pairsValue",
|
|
@@ -9900,6 +10254,36 @@ var NodeType = superenum20({
|
|
|
9900
10254
|
partialAnswerValue: "partialAnswerValue",
|
|
9901
10255
|
path: "path",
|
|
9902
10256
|
pathValue: "pathValue",
|
|
10257
|
+
platformName: "platformName",
|
|
10258
|
+
platformNameValue: "platformNameValue",
|
|
10259
|
+
platformIcon: "platformIcon",
|
|
10260
|
+
platformIconValue: "platformIconValue",
|
|
10261
|
+
platformLogo: "platformLogo",
|
|
10262
|
+
platformLogoValue: "platformLogoValue",
|
|
10263
|
+
platformPrimaryColor: "platformPrimaryColor",
|
|
10264
|
+
platformPrimaryColorValue: "platformPrimaryColorValue",
|
|
10265
|
+
platformSecondaryColor: "platformSecondaryColor",
|
|
10266
|
+
platformSecondaryColorValue: "platformSecondaryColorValue",
|
|
10267
|
+
platformBackgroundColor: "platformBackgroundColor",
|
|
10268
|
+
platformBackgroundColorValue: "platformBackgroundColorValue",
|
|
10269
|
+
platformScrollbarColor: "platformScrollbarColor",
|
|
10270
|
+
platformScrollbarColorValue: "platformScrollbarColorValue",
|
|
10271
|
+
platformSelectionColor: "platformSelectionColor",
|
|
10272
|
+
platformSelectionColorValue: "platformSelectionColorValue",
|
|
10273
|
+
platformSeparatorColor: "platformSeparatorColor",
|
|
10274
|
+
platformSeparatorColorValue: "platformSeparatorColorValue",
|
|
10275
|
+
platformPlaceholderColor: "platformPlaceholderColor",
|
|
10276
|
+
platformPlaceholderColorValue: "platformPlaceholderColorValue",
|
|
10277
|
+
platformTextSelectionColor: "platformTextSelectionColor",
|
|
10278
|
+
platformTextSelectionColorValue: "platformTextSelectionColorValue",
|
|
10279
|
+
platformButtonPrimaryColor: "platformButtonPrimaryColor",
|
|
10280
|
+
platformButtonPrimaryColorValue: "platformButtonPrimaryColorValue",
|
|
10281
|
+
platformButtonBackgroundColor: "platformButtonBackgroundColor",
|
|
10282
|
+
platformButtonBackgroundColorValue: "platformButtonBackgroundColorValue",
|
|
10283
|
+
platformMessageBackgroundColor: "platformMessageBackgroundColor",
|
|
10284
|
+
platformMessageBackgroundColorValue: "platformMessageBackgroundColorValue",
|
|
10285
|
+
platformBackgroundImage: "platformBackgroundImage",
|
|
10286
|
+
platformBackgroundImageValue: "platformBackgroundImageValue",
|
|
9903
10287
|
person: "person",
|
|
9904
10288
|
pointerLeft: "pointerLeft",
|
|
9905
10289
|
pointerLeftValue: "pointerLeftValue",
|
|
@@ -9944,6 +10328,7 @@ var NodeType = superenum20({
|
|
|
9944
10328
|
publisherValue: "publisherValue",
|
|
9945
10329
|
quantity: "quantity",
|
|
9946
10330
|
question: "question",
|
|
10331
|
+
questionValue: "questionValue",
|
|
9947
10332
|
questions: "questions",
|
|
9948
10333
|
questionsValue: "questionsValue",
|
|
9949
10334
|
quizCountItems: "quizCountItems",
|
|
@@ -9996,6 +10381,10 @@ var NodeType = superenum20({
|
|
|
9996
10381
|
revealSolutions: "revealSolutions",
|
|
9997
10382
|
root: "root",
|
|
9998
10383
|
// bit type (root)
|
|
10384
|
+
rows: "rows",
|
|
10385
|
+
rowsValue: "rowsValue",
|
|
10386
|
+
rubric: "rubric",
|
|
10387
|
+
rubricValue: "rubricValue",
|
|
9999
10388
|
sampleSolution: "sampleSolution",
|
|
10000
10389
|
sampleSolutionValue: "sampleSolutionValue",
|
|
10001
10390
|
scormSource: "scormSource",
|
|
@@ -10018,7 +10407,8 @@ var NodeType = superenum20({
|
|
|
10018
10407
|
solutionsValue: "solutionsValue",
|
|
10019
10408
|
sourceDocument: "sourceDocument",
|
|
10020
10409
|
sourceDocumentValue: "sourceDocumentValue",
|
|
10021
|
-
|
|
10410
|
+
sourceRL: "sourceRL",
|
|
10411
|
+
sourceRLValue: "sourceRLValue",
|
|
10022
10412
|
spaceId: "spaceId",
|
|
10023
10413
|
spaceIdValue: "spaceIdValue",
|
|
10024
10414
|
src: "src",
|
|
@@ -10600,6 +10990,103 @@ var DeprecatedTextFormat = superenum23({
|
|
|
10600
10990
|
// bitmark-- text format, deprecated
|
|
10601
10991
|
});
|
|
10602
10992
|
|
|
10993
|
+
// src/parser/json/TableUtils.ts
|
|
10994
|
+
function isTableBasicFormat(table) {
|
|
10995
|
+
const t = table;
|
|
10996
|
+
return !!(t.columns || t.data) && !(t.head || t.body || t.foot);
|
|
10997
|
+
}
|
|
10998
|
+
function isTableExtendedFormat(table) {
|
|
10999
|
+
const t = table;
|
|
11000
|
+
return !!(t.head || t.body || t.foot);
|
|
11001
|
+
}
|
|
11002
|
+
function isMixedTableFormat(table) {
|
|
11003
|
+
const t = table;
|
|
11004
|
+
const hasOld = !!(t.columns || t.data);
|
|
11005
|
+
const hasNew = !!(t.head || t.body || t.foot);
|
|
11006
|
+
return hasOld && hasNew;
|
|
11007
|
+
}
|
|
11008
|
+
function convertBasicToExtendedTableFormat(table) {
|
|
11009
|
+
const tableExtended = {};
|
|
11010
|
+
if (table.columns && table.columns.length > 0) {
|
|
11011
|
+
tableExtended.head = {
|
|
11012
|
+
rows: [
|
|
11013
|
+
{
|
|
11014
|
+
cells: table.columns.map((col) => ({
|
|
11015
|
+
content: col,
|
|
11016
|
+
title: true
|
|
11017
|
+
}))
|
|
11018
|
+
}
|
|
11019
|
+
]
|
|
11020
|
+
};
|
|
11021
|
+
}
|
|
11022
|
+
if (table.data && table.data.length > 0) {
|
|
11023
|
+
tableExtended.body = {
|
|
11024
|
+
rows: table.data.map((row) => ({
|
|
11025
|
+
cells: row.map((cell) => ({
|
|
11026
|
+
content: cell
|
|
11027
|
+
}))
|
|
11028
|
+
}))
|
|
11029
|
+
};
|
|
11030
|
+
}
|
|
11031
|
+
return tableExtended;
|
|
11032
|
+
}
|
|
11033
|
+
function convertExtendedToBasicTableFormat(tableExtended) {
|
|
11034
|
+
const table = {};
|
|
11035
|
+
const extractRowCells = (row) => {
|
|
11036
|
+
if (!row || !Array.isArray(row.cells)) {
|
|
11037
|
+
return [];
|
|
11038
|
+
}
|
|
11039
|
+
return row.cells.map((cell) => cell?.content).filter((content) => content !== void 0);
|
|
11040
|
+
};
|
|
11041
|
+
const dataRows = [];
|
|
11042
|
+
const headRows = tableExtended.head?.rows ?? [];
|
|
11043
|
+
if (headRows.length > 0) {
|
|
11044
|
+
const primaryHeader = extractRowCells(headRows[0]);
|
|
11045
|
+
if (primaryHeader.length > 0) {
|
|
11046
|
+
table.columns = primaryHeader;
|
|
11047
|
+
}
|
|
11048
|
+
const remainingHeadRows = headRows.slice(1);
|
|
11049
|
+
remainingHeadRows.forEach((row) => {
|
|
11050
|
+
const cells = extractRowCells(row);
|
|
11051
|
+
if (cells.length > 0) {
|
|
11052
|
+
dataRows.push(cells);
|
|
11053
|
+
}
|
|
11054
|
+
});
|
|
11055
|
+
}
|
|
11056
|
+
const appendSectionRows = (section) => {
|
|
11057
|
+
if (!section || !Array.isArray(section.rows)) {
|
|
11058
|
+
return;
|
|
11059
|
+
}
|
|
11060
|
+
section.rows.forEach((row) => {
|
|
11061
|
+
const cells = extractRowCells(row);
|
|
11062
|
+
if (cells.length > 0) {
|
|
11063
|
+
dataRows.push(cells);
|
|
11064
|
+
}
|
|
11065
|
+
});
|
|
11066
|
+
};
|
|
11067
|
+
appendSectionRows(tableExtended.body);
|
|
11068
|
+
appendSectionRows(tableExtended.foot);
|
|
11069
|
+
if (dataRows.length > 0) {
|
|
11070
|
+
table.data = dataRows;
|
|
11071
|
+
}
|
|
11072
|
+
return table;
|
|
11073
|
+
}
|
|
11074
|
+
function normalizeTableFormat(bitType, table) {
|
|
11075
|
+
if (isMixedTableFormat(table)) {
|
|
11076
|
+
const t = table;
|
|
11077
|
+
delete t.columns;
|
|
11078
|
+
delete t.data;
|
|
11079
|
+
}
|
|
11080
|
+
const isExtended = instance2.isOfBitType(bitType, BitType.tableExtended);
|
|
11081
|
+
if (isExtended && isTableBasicFormat(table)) {
|
|
11082
|
+
return convertBasicToExtendedTableFormat(table);
|
|
11083
|
+
}
|
|
11084
|
+
if (!isExtended && isTableExtendedFormat(table)) {
|
|
11085
|
+
return convertExtendedToBasicTableFormat(table);
|
|
11086
|
+
}
|
|
11087
|
+
return table;
|
|
11088
|
+
}
|
|
11089
|
+
|
|
10603
11090
|
// src/utils/ArrayUtils.ts
|
|
10604
11091
|
var ArrayUtils = class {
|
|
10605
11092
|
/**
|
|
@@ -21417,6 +21904,9 @@ var ResourceBuilder = class extends BaseBuilder {
|
|
|
21417
21904
|
case ResourceType.backgroundWallpaper:
|
|
21418
21905
|
case ResourceType.imagePlaceholder:
|
|
21419
21906
|
case ResourceType.icon:
|
|
21907
|
+
case ResourceType.platformIcon:
|
|
21908
|
+
case ResourceType.platformLogo:
|
|
21909
|
+
case ResourceType.platformBackgroundImage:
|
|
21420
21910
|
node = this.imageResource(context, finalData, type);
|
|
21421
21911
|
break;
|
|
21422
21912
|
// case ResourceType.imageResponsive: {
|
|
@@ -22390,6 +22880,7 @@ var Builder = class extends BaseBuilder {
|
|
|
22390
22880
|
* @returns
|
|
22391
22881
|
*/
|
|
22392
22882
|
buildBit(data, options) {
|
|
22883
|
+
data = structuredClone(data);
|
|
22393
22884
|
const bitType = data.bitType;
|
|
22394
22885
|
const bitConfig = instance2.getBitConfig(bitType);
|
|
22395
22886
|
const deprecatedTextFormat = DeprecatedTextFormat.fromValue(data.textFormat);
|
|
@@ -22453,6 +22944,7 @@ var Builder = class extends BaseBuilder {
|
|
|
22453
22944
|
data.jupyterExecutionCount,
|
|
22454
22945
|
options
|
|
22455
22946
|
),
|
|
22947
|
+
sourceRL: this.toAstProperty(bitType, ConfigKey.property_sourceRL, data.sourceRL, options),
|
|
22456
22948
|
isPublic: this.toAstProperty(bitType, ConfigKey.property_isPublic, data.isPublic, options),
|
|
22457
22949
|
isTemplate: this.toAstProperty(
|
|
22458
22950
|
bitType,
|
|
@@ -22976,6 +23468,18 @@ var Builder = class extends BaseBuilder {
|
|
|
22976
23468
|
data.advertisingClickUrl,
|
|
22977
23469
|
options
|
|
22978
23470
|
),
|
|
23471
|
+
brandColor: this.toAstProperty(
|
|
23472
|
+
bitType,
|
|
23473
|
+
ConfigKey.property_brandColor,
|
|
23474
|
+
data.brandColor,
|
|
23475
|
+
options
|
|
23476
|
+
),
|
|
23477
|
+
brandColorName: this.toAstProperty(
|
|
23478
|
+
bitType,
|
|
23479
|
+
ConfigKey.property_brandColorName,
|
|
23480
|
+
data.brandColorName,
|
|
23481
|
+
options
|
|
23482
|
+
),
|
|
22979
23483
|
caption: this.handleJsonText(context, TextLocation.tag, data.caption),
|
|
22980
23484
|
quotedPerson: this.toAstProperty(
|
|
22981
23485
|
bitType,
|
|
@@ -23039,6 +23543,18 @@ var Builder = class extends BaseBuilder {
|
|
|
23039
23543
|
data.sourceDocument,
|
|
23040
23544
|
options
|
|
23041
23545
|
),
|
|
23546
|
+
internalPrintPdf: this.toAstProperty(
|
|
23547
|
+
bitType,
|
|
23548
|
+
ConfigKey.property_internalPrintPdf,
|
|
23549
|
+
data.internalPrintPdf,
|
|
23550
|
+
options
|
|
23551
|
+
),
|
|
23552
|
+
hasPrintRestriction: this.toAstProperty(
|
|
23553
|
+
bitType,
|
|
23554
|
+
ConfigKey.property_hasPrintRestriction,
|
|
23555
|
+
data.hasPrintRestriction,
|
|
23556
|
+
options
|
|
23557
|
+
),
|
|
23042
23558
|
tocResource: this.toAstProperty(
|
|
23043
23559
|
bitType,
|
|
23044
23560
|
ConfigKey.property_tocResource,
|
|
@@ -23052,6 +23568,81 @@ var Builder = class extends BaseBuilder {
|
|
|
23052
23568
|
options
|
|
23053
23569
|
),
|
|
23054
23570
|
page: this.toAstProperty(bitType, ConfigKey.property_page, data.page, options),
|
|
23571
|
+
platformName: this.toAstProperty(
|
|
23572
|
+
bitType,
|
|
23573
|
+
ConfigKey.property_platformName,
|
|
23574
|
+
data.platformName,
|
|
23575
|
+
options
|
|
23576
|
+
),
|
|
23577
|
+
platformIcon: this.toImageResource(context, data.platformIcon),
|
|
23578
|
+
platformLogo: this.toImageResource(context, data.platformLogo),
|
|
23579
|
+
platformPrimaryColor: this.toAstProperty(
|
|
23580
|
+
bitType,
|
|
23581
|
+
ConfigKey.property_platformPrimaryColor,
|
|
23582
|
+
data.platformPrimaryColor,
|
|
23583
|
+
options
|
|
23584
|
+
),
|
|
23585
|
+
platformSecondaryColor: this.toAstProperty(
|
|
23586
|
+
bitType,
|
|
23587
|
+
ConfigKey.property_platformSecondaryColor,
|
|
23588
|
+
data.platformSecondaryColor,
|
|
23589
|
+
options
|
|
23590
|
+
),
|
|
23591
|
+
platformBackgroundColor: this.toAstProperty(
|
|
23592
|
+
bitType,
|
|
23593
|
+
ConfigKey.property_platformBackgroundColor,
|
|
23594
|
+
data.platformBackgroundColor,
|
|
23595
|
+
options
|
|
23596
|
+
),
|
|
23597
|
+
platformScrollbarColor: this.toAstProperty(
|
|
23598
|
+
bitType,
|
|
23599
|
+
ConfigKey.property_platformScrollbarColor,
|
|
23600
|
+
data.platformScrollbarColor,
|
|
23601
|
+
options
|
|
23602
|
+
),
|
|
23603
|
+
platformSelectionColor: this.toAstProperty(
|
|
23604
|
+
bitType,
|
|
23605
|
+
ConfigKey.property_platformSelectionColor,
|
|
23606
|
+
data.platformSelectionColor,
|
|
23607
|
+
options
|
|
23608
|
+
),
|
|
23609
|
+
platformSeparatorColor: this.toAstProperty(
|
|
23610
|
+
bitType,
|
|
23611
|
+
ConfigKey.property_platformSeparatorColor,
|
|
23612
|
+
data.platformSeparatorColor,
|
|
23613
|
+
options
|
|
23614
|
+
),
|
|
23615
|
+
platformPlaceholderColor: this.toAstProperty(
|
|
23616
|
+
bitType,
|
|
23617
|
+
ConfigKey.property_platformPlaceholderColor,
|
|
23618
|
+
data.platformPlaceholderColor,
|
|
23619
|
+
options
|
|
23620
|
+
),
|
|
23621
|
+
platformTextSelectionColor: this.toAstProperty(
|
|
23622
|
+
bitType,
|
|
23623
|
+
ConfigKey.property_platformTextSelectionColor,
|
|
23624
|
+
data.platformTextSelectionColor,
|
|
23625
|
+
options
|
|
23626
|
+
),
|
|
23627
|
+
platformButtonPrimaryColor: this.toAstProperty(
|
|
23628
|
+
bitType,
|
|
23629
|
+
ConfigKey.property_platformButtonPrimaryColor,
|
|
23630
|
+
data.platformButtonPrimaryColor,
|
|
23631
|
+
options
|
|
23632
|
+
),
|
|
23633
|
+
platformButtonBackgroundColor: this.toAstProperty(
|
|
23634
|
+
bitType,
|
|
23635
|
+
ConfigKey.property_platformButtonBackgroundColor,
|
|
23636
|
+
data.platformButtonBackgroundColor,
|
|
23637
|
+
options
|
|
23638
|
+
),
|
|
23639
|
+
platformMessageBackgroundColor: this.toAstProperty(
|
|
23640
|
+
bitType,
|
|
23641
|
+
ConfigKey.property_platformMessageBackgroundColor,
|
|
23642
|
+
data.platformMessageBackgroundColor,
|
|
23643
|
+
options
|
|
23644
|
+
),
|
|
23645
|
+
platformBackgroundImage: this.toImageResource(context, data.platformBackgroundImage),
|
|
23055
23646
|
productId: this.toAstProperty(bitType, ConfigKey.property_productId, data.productId, options),
|
|
23056
23647
|
product: this.toAstProperty(bitType, ConfigKey.property_product, data.product, options),
|
|
23057
23648
|
// productList: this.toAstProperty(
|
|
@@ -23123,7 +23714,6 @@ var Builder = class extends BaseBuilder {
|
|
|
23123
23714
|
item: this.handleJsonText(context, TextLocation.tag, data.item),
|
|
23124
23715
|
lead: this.handleJsonText(context, TextLocation.tag, data.lead),
|
|
23125
23716
|
pageNumber: this.handleJsonText(context, TextLocation.tag, data.pageNumber),
|
|
23126
|
-
sourcePageNumber: this.handleJsonText(context, TextLocation.tag, data.sourcePageNumber),
|
|
23127
23717
|
marginNumber: this.handleJsonText(context, TextLocation.tag, data.marginNumber),
|
|
23128
23718
|
hint: this.handleJsonText(context, TextLocation.tag, data.hint),
|
|
23129
23719
|
instruction: this.handleJsonText(context, TextLocation.tag, data.instruction),
|
|
@@ -23226,15 +23816,7 @@ var Builder = class extends BaseBuilder {
|
|
|
23226
23816
|
objectUtils.removeUnwantedProperties(node, {
|
|
23227
23817
|
ignoreAllFalse: true,
|
|
23228
23818
|
ignoreUndefined: ["example"],
|
|
23229
|
-
ignoreEmptyArrays: [
|
|
23230
|
-
"item",
|
|
23231
|
-
"lead",
|
|
23232
|
-
"pageNumber",
|
|
23233
|
-
"sourcePageNumber",
|
|
23234
|
-
"marginNumber",
|
|
23235
|
-
"hint",
|
|
23236
|
-
"instruction"
|
|
23237
|
-
]
|
|
23819
|
+
ignoreEmptyArrays: ["item", "lead", "pageNumber", "marginNumber", "hint", "instruction"]
|
|
23238
23820
|
});
|
|
23239
23821
|
return nodeValidator.validateBit(node);
|
|
23240
23822
|
}
|
|
@@ -23742,21 +24324,53 @@ var Builder = class extends BaseBuilder {
|
|
|
23742
24324
|
return node;
|
|
23743
24325
|
}
|
|
23744
24326
|
/**
|
|
23745
|
-
* Build table node
|
|
24327
|
+
* Build table / table extended node
|
|
23746
24328
|
*
|
|
23747
24329
|
* @param data - data for the node
|
|
23748
24330
|
* @returns
|
|
23749
24331
|
*/
|
|
23750
24332
|
buildTable(context, dataIn) {
|
|
23751
24333
|
if (!dataIn) return void 0;
|
|
23752
|
-
const node =
|
|
23753
|
-
|
|
24334
|
+
const node = normalizeTableFormat(context.bitType, dataIn);
|
|
24335
|
+
const nodeTable = node;
|
|
24336
|
+
const nodeTableExtended = node;
|
|
24337
|
+
if (Array.isArray(nodeTable.columns) && nodeTable.columns.length > 0) {
|
|
24338
|
+
nodeTable.columns = nodeTable.columns.map(
|
|
23754
24339
|
(col) => this.handleJsonText(context, TextLocation.tag, col)
|
|
23755
|
-
)
|
|
23756
|
-
|
|
24340
|
+
);
|
|
24341
|
+
}
|
|
24342
|
+
if (Array.isArray(nodeTable.data) && nodeTable.data.length > 0) {
|
|
24343
|
+
nodeTable.data = nodeTable.data.map(
|
|
23757
24344
|
(row) => (row || []).map((cell) => this.handleJsonText(context, TextLocation.tag, cell))
|
|
23758
|
-
)
|
|
24345
|
+
);
|
|
24346
|
+
}
|
|
24347
|
+
const buildSection = (section) => {
|
|
24348
|
+
if (!section || !Array.isArray(section.rows)) return void 0;
|
|
24349
|
+
const rows = section.rows.map((row) => {
|
|
24350
|
+
const cells = (row.cells || []).map((cell) => {
|
|
24351
|
+
const tableCell = {
|
|
24352
|
+
content: this.handleJsonText(context, TextLocation.tag, cell.content)
|
|
24353
|
+
};
|
|
24354
|
+
if (cell.title != null) tableCell.title = cell.title;
|
|
24355
|
+
if (cell.rowspan != null) tableCell.rowspan = cell.rowspan;
|
|
24356
|
+
if (cell.colspan != null) tableCell.colspan = cell.colspan;
|
|
24357
|
+
if (cell.scope) tableCell.scope = cell.scope;
|
|
24358
|
+
return tableCell;
|
|
24359
|
+
});
|
|
24360
|
+
return {
|
|
24361
|
+
cells
|
|
24362
|
+
};
|
|
24363
|
+
});
|
|
24364
|
+
return {
|
|
24365
|
+
rows
|
|
24366
|
+
};
|
|
23759
24367
|
};
|
|
24368
|
+
const head = buildSection(nodeTableExtended.head);
|
|
24369
|
+
if (head && head.rows?.length > 0) nodeTableExtended.head = head;
|
|
24370
|
+
const body = buildSection(nodeTableExtended.body);
|
|
24371
|
+
if (body && body.rows?.length > 0) nodeTableExtended.body = body;
|
|
24372
|
+
const foot = buildSection(nodeTableExtended.foot);
|
|
24373
|
+
if (foot && foot.rows?.length > 0) nodeTableExtended.foot = foot;
|
|
23760
24374
|
return node;
|
|
23761
24375
|
}
|
|
23762
24376
|
/**
|
|
@@ -23780,7 +24394,7 @@ var Builder = class extends BaseBuilder {
|
|
|
23780
24394
|
if (!data) return void 0;
|
|
23781
24395
|
const defaultExample = data.__sampleSolutionAst;
|
|
23782
24396
|
const node = {
|
|
23783
|
-
question: data.question
|
|
24397
|
+
question: this.handleJsonText(context, TextLocation.body, data.question),
|
|
23784
24398
|
partialAnswer: data.partialAnswer ?? "",
|
|
23785
24399
|
sampleSolution: data.sampleSolution ?? "",
|
|
23786
24400
|
additionalSolutions: data.additionalSolutions ?? void 0,
|
|
@@ -23794,9 +24408,9 @@ var Builder = class extends BaseBuilder {
|
|
|
23794
24408
|
};
|
|
23795
24409
|
objectUtils.removeUnwantedProperties(node, {
|
|
23796
24410
|
ignoreAllFalse: true,
|
|
23797
|
-
ignoreEmptyArrays: ["item", "hint", "instruction"],
|
|
24411
|
+
ignoreEmptyArrays: ["question", "item", "hint", "instruction"],
|
|
23798
24412
|
ignoreUndefined: ["example"],
|
|
23799
|
-
ignoreEmptyString: ["
|
|
24413
|
+
ignoreEmptyString: ["partialAnswer", "sampleSolution"]
|
|
23800
24414
|
});
|
|
23801
24415
|
return node;
|
|
23802
24416
|
}
|
|
@@ -24334,7 +24948,7 @@ var Builder = class extends BaseBuilder {
|
|
|
24334
24948
|
buildStatement(context, data) {
|
|
24335
24949
|
if (!data) return void 0;
|
|
24336
24950
|
const node = {
|
|
24337
|
-
statement: data.statement
|
|
24951
|
+
statement: this.handleJsonText(context, TextLocation.tag, data.statement),
|
|
24338
24952
|
isCorrect: !!data.isCorrect,
|
|
24339
24953
|
item: this.handleJsonText(context, TextLocation.tag, data.item),
|
|
24340
24954
|
lead: this.handleJsonText(context, TextLocation.tag, data.lead),
|
|
@@ -24344,7 +24958,7 @@ var Builder = class extends BaseBuilder {
|
|
|
24344
24958
|
};
|
|
24345
24959
|
objectUtils.removeUnwantedProperties(node, {
|
|
24346
24960
|
ignoreAllFalse: true,
|
|
24347
|
-
|
|
24961
|
+
ignoreEmptyArrays: ["statement"],
|
|
24348
24962
|
ignoreUndefined: ["example"]
|
|
24349
24963
|
});
|
|
24350
24964
|
return node;
|
|
@@ -24556,7 +25170,7 @@ var Builder = class extends BaseBuilder {
|
|
|
24556
25170
|
const node = {
|
|
24557
25171
|
heading: this.buildHeading(context, data.heading),
|
|
24558
25172
|
questions: this.buildQuestions(context, data.questions),
|
|
24559
|
-
elements: data.elements,
|
|
25173
|
+
elements: this.handleJsonText(context, TextLocation.body, data.elements),
|
|
24560
25174
|
flashcards: this.buildFlashcards(context, data.flashcards),
|
|
24561
25175
|
definitions: this.buildDefinitionList(context, data.definitions ?? data.legend),
|
|
24562
25176
|
statement: this.buildStatement(context, data.statement),
|
|
@@ -24575,7 +25189,9 @@ var Builder = class extends BaseBuilder {
|
|
|
24575
25189
|
// captionDefinitionList: this.buildCaptionDefinitionList(context, data.captionDefinitionList),
|
|
24576
25190
|
cardBits: this.buildCardBits(context, data.cardBits)
|
|
24577
25191
|
};
|
|
24578
|
-
objectUtils.removeUnwantedProperties(node
|
|
25192
|
+
objectUtils.removeUnwantedProperties(node, {
|
|
25193
|
+
ignoreEmptyObjects: ["table"]
|
|
25194
|
+
});
|
|
24579
25195
|
return Object.keys(node).length > 0 ? node : void 0;
|
|
24580
25196
|
}
|
|
24581
25197
|
/**
|
|
@@ -25079,6 +25695,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
25079
25695
|
__publicField(this, "hasCardSet", false);
|
|
25080
25696
|
__publicField(this, "hasFooter", false);
|
|
25081
25697
|
__publicField(this, "inTag", true);
|
|
25698
|
+
__publicField(this, "skipTableTraversal", false);
|
|
25082
25699
|
this.enter = this.enter.bind(this);
|
|
25083
25700
|
this.between = this.between.bind(this);
|
|
25084
25701
|
this.exit = this.exit.bind(this);
|
|
@@ -25547,7 +26164,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
25547
26164
|
if (this.isEmptyText(item)) return false;
|
|
25548
26165
|
if (!this.isEmptyText(parent?.value?.lead)) return true;
|
|
25549
26166
|
if (!this.isEmptyText(parent?.value?.pageNumber)) return true;
|
|
25550
|
-
if (!this.isEmptyText(parent?.value?.sourcePageNumber)) return true;
|
|
25551
26167
|
if (!this.isEmptyText(parent?.value?.marginNumber)) return true;
|
|
25552
26168
|
this.writeNL_IfNotChain(route);
|
|
25553
26169
|
this.writeOPC();
|
|
@@ -25561,7 +26177,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
25561
26177
|
const parent = this.getParentNode(route);
|
|
25562
26178
|
if (this.isEmptyText(lead)) return false;
|
|
25563
26179
|
if (!this.isEmptyText(parent?.value?.pageNumber)) return true;
|
|
25564
|
-
if (!this.isEmptyText(parent?.value?.sourcePageNumber)) return true;
|
|
25565
26180
|
if (!this.isEmptyText(parent?.value?.marginNumber)) return true;
|
|
25566
26181
|
this.writeNL_IfNotChain(route);
|
|
25567
26182
|
this.writeOPC();
|
|
@@ -25577,7 +26192,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
25577
26192
|
const pageNumber = node.value;
|
|
25578
26193
|
const parent = this.getParentNode(route);
|
|
25579
26194
|
if (this.isEmptyText(pageNumber)) return false;
|
|
25580
|
-
if (!this.isEmptyText(parent?.value?.sourcePageNumber)) return true;
|
|
25581
26195
|
if (!this.isEmptyText(parent?.value?.marginNumber)) return true;
|
|
25582
26196
|
this.writeNL_IfNotChain(route);
|
|
25583
26197
|
this.writeOPC();
|
|
@@ -25591,31 +26205,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
25591
26205
|
this.writeCL();
|
|
25592
26206
|
return true;
|
|
25593
26207
|
}
|
|
25594
|
-
// bitmarkAst -> bits -> bitsValue -> sourcePageNumber
|
|
25595
|
-
enter_sourcePageNumber(node, route) {
|
|
25596
|
-
const sourcePageNumber = node.value;
|
|
25597
|
-
const parent = this.getParentNode(route);
|
|
25598
|
-
if (this.isEmptyText(sourcePageNumber)) return false;
|
|
25599
|
-
if (!this.isEmptyText(parent?.value?.marginNumber)) return true;
|
|
25600
|
-
this.writeNL_IfNotChain(route);
|
|
25601
|
-
this.writeOPC();
|
|
25602
|
-
this.writeTextOrValue(parent?.value?.item ?? "", TextFormat.bitmarkText, TextLocation.tag);
|
|
25603
|
-
this.writeCL();
|
|
25604
|
-
this.writeOPC();
|
|
25605
|
-
this.writeTextOrValue(parent?.value?.lead ?? "", TextFormat.bitmarkText, TextLocation.tag);
|
|
25606
|
-
this.writeCL();
|
|
25607
|
-
this.writeOPC();
|
|
25608
|
-
this.writeTextOrValue(
|
|
25609
|
-
parent?.value?.pageNumber ?? "",
|
|
25610
|
-
TextFormat.bitmarkText,
|
|
25611
|
-
TextLocation.tag
|
|
25612
|
-
);
|
|
25613
|
-
this.writeCL();
|
|
25614
|
-
this.writeOPC();
|
|
25615
|
-
this.writeTextOrValue(sourcePageNumber ?? "", TextFormat.bitmarkText, TextLocation.tag);
|
|
25616
|
-
this.writeCL();
|
|
25617
|
-
return true;
|
|
25618
|
-
}
|
|
25619
26208
|
// bitmarkAst -> bits -> bitsValue -> marginNumber
|
|
25620
26209
|
enter_marginNumber(node, route) {
|
|
25621
26210
|
const marginNumber = node.value;
|
|
@@ -25636,13 +26225,6 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
25636
26225
|
);
|
|
25637
26226
|
this.writeCL();
|
|
25638
26227
|
this.writeOPC();
|
|
25639
|
-
this.writeTextOrValue(
|
|
25640
|
-
parent?.value?.sourcePageNumber ?? "",
|
|
25641
|
-
TextFormat.bitmarkText,
|
|
25642
|
-
TextLocation.tag
|
|
25643
|
-
);
|
|
25644
|
-
this.writeCL();
|
|
25645
|
-
this.writeOPC();
|
|
25646
26228
|
this.writeTextOrValue(marginNumber, TextFormat.bitmarkText, TextLocation.tag);
|
|
25647
26229
|
this.writeCL();
|
|
25648
26230
|
return true;
|
|
@@ -25816,7 +26398,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
25816
26398
|
enter_elements(_node, _route) {
|
|
25817
26399
|
}
|
|
25818
26400
|
between_elements(_node, _left, _right, _route) {
|
|
25819
|
-
this.
|
|
26401
|
+
this.writeCardSetSideDivider();
|
|
25820
26402
|
}
|
|
25821
26403
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> flashcards
|
|
25822
26404
|
between_flashcards(_node, _left, _right, _route) {
|
|
@@ -25943,6 +26525,7 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
25943
26525
|
enter_matrix(_node, _route) {
|
|
25944
26526
|
}
|
|
25945
26527
|
between_matrix(_node, _left, _right, _route) {
|
|
26528
|
+
if (!this.isCardAllowed) return;
|
|
25946
26529
|
this.writeCardSetCardDivider();
|
|
25947
26530
|
}
|
|
25948
26531
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> pairs -> pairsValue -> values
|
|
@@ -25963,12 +26546,83 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
25963
26546
|
this.writeCardSetCardDivider();
|
|
25964
26547
|
}
|
|
25965
26548
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> table
|
|
26549
|
+
enter_table(node, route) {
|
|
26550
|
+
const parent = this.getParentNode(route);
|
|
26551
|
+
if (parent?.key !== NodeType.cardNode) return true;
|
|
26552
|
+
const table = node.value;
|
|
26553
|
+
if (!table) return true;
|
|
26554
|
+
if (this.writeAdvancedTable(table)) {
|
|
26555
|
+
return false;
|
|
26556
|
+
}
|
|
26557
|
+
return true;
|
|
26558
|
+
}
|
|
25966
26559
|
between_table(_node, _left, _right, route) {
|
|
25967
26560
|
const parent = this.getParentNode(route);
|
|
25968
26561
|
if (parent?.key !== NodeType.cardNode) return;
|
|
25969
26562
|
if (!this.isCardAllowed) return;
|
|
25970
26563
|
this.writeCardSetCardDivider();
|
|
25971
26564
|
}
|
|
26565
|
+
writeAdvancedTable(table) {
|
|
26566
|
+
const normalized = normalizeTableFormat(BitType.tableExtended, table);
|
|
26567
|
+
const sections = [
|
|
26568
|
+
{ key: "thead", qualifier: "thead", section: normalized.head },
|
|
26569
|
+
{ key: "tbody", qualifier: void 0, section: normalized.body },
|
|
26570
|
+
{ key: "tfoot", qualifier: "tfoot", section: normalized.foot }
|
|
26571
|
+
];
|
|
26572
|
+
let rowCount = 0;
|
|
26573
|
+
for (const { key, qualifier, section } of sections) {
|
|
26574
|
+
const rows = section?.rows ?? [];
|
|
26575
|
+
if (rows.length === 0) {
|
|
26576
|
+
continue;
|
|
26577
|
+
}
|
|
26578
|
+
for (const row of rows) {
|
|
26579
|
+
this.writeCardSetCardDivider(qualifier);
|
|
26580
|
+
this.writeTableRow(row, key);
|
|
26581
|
+
rowCount++;
|
|
26582
|
+
}
|
|
26583
|
+
}
|
|
26584
|
+
return rowCount > 0;
|
|
26585
|
+
}
|
|
26586
|
+
writeTableRow(row, section) {
|
|
26587
|
+
const cells = row?.cells ?? [];
|
|
26588
|
+
if (cells.length === 0) return;
|
|
26589
|
+
for (let index = 0; index < cells.length; index++) {
|
|
26590
|
+
if (index > 0) {
|
|
26591
|
+
this.writeCardSetSideDivider();
|
|
26592
|
+
}
|
|
26593
|
+
this.writeNL();
|
|
26594
|
+
this.writeTableCell(cells[index], section);
|
|
26595
|
+
}
|
|
26596
|
+
}
|
|
26597
|
+
writeTableCell(cell, section) {
|
|
26598
|
+
const defaultCellType = section === "tbody" ? "td" : "th";
|
|
26599
|
+
const cellType = cell.title ? "th" : "td";
|
|
26600
|
+
if (cellType !== defaultCellType) {
|
|
26601
|
+
this.writeTableCellProperty("tableCellType", cellType);
|
|
26602
|
+
this.writeNL();
|
|
26603
|
+
}
|
|
26604
|
+
if (cell.rowspan && cell.rowspan > 1) {
|
|
26605
|
+
this.writeTableCellProperty("tableRowSpan", cell.rowspan);
|
|
26606
|
+
this.writeNL();
|
|
26607
|
+
}
|
|
26608
|
+
if (cell.colspan && cell.colspan > 1) {
|
|
26609
|
+
this.writeTableCellProperty("tableColSpan", cell.colspan);
|
|
26610
|
+
this.writeNL();
|
|
26611
|
+
}
|
|
26612
|
+
if (cell.scope) {
|
|
26613
|
+
this.writeTableCellProperty("tableScope", cell.scope);
|
|
26614
|
+
this.writeNL();
|
|
26615
|
+
}
|
|
26616
|
+
const content = cell.content ?? instance3.EMPTY_STRING;
|
|
26617
|
+
this.writeTextOrValue(content, this.textFormat, TextLocation.body);
|
|
26618
|
+
}
|
|
26619
|
+
writeTableCellProperty(name, value) {
|
|
26620
|
+
this.writeOPA();
|
|
26621
|
+
this.writeTagKey(name);
|
|
26622
|
+
this.writeColon();
|
|
26623
|
+
this.writeTextOrValue(`${value}`, TextFormat.plainText, TextLocation.tag);
|
|
26624
|
+
this.writeCL();
|
|
26625
|
+
}
|
|
25972
26626
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> table -> data
|
|
25973
26627
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> pronunciationTable -> data
|
|
25974
26628
|
between_data(_node, _left, _right, route) {
|
|
@@ -26197,6 +26851,27 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26197
26851
|
this.writePropertyStyleResource(node.key, resource);
|
|
26198
26852
|
return true;
|
|
26199
26853
|
}
|
|
26854
|
+
// bitmarkAst -> bits -> bitsValue -> platformIcon
|
|
26855
|
+
enter_platformIcon(node, _route) {
|
|
26856
|
+
const resource = node.value;
|
|
26857
|
+
this.writeNL();
|
|
26858
|
+
this.writePropertyStyleResource(node.key, resource);
|
|
26859
|
+
return true;
|
|
26860
|
+
}
|
|
26861
|
+
// bitmarkAst -> bits -> bitsValue -> platformLogo
|
|
26862
|
+
enter_platformLogo(node, _route) {
|
|
26863
|
+
const resource = node.value;
|
|
26864
|
+
this.writeNL();
|
|
26865
|
+
this.writePropertyStyleResource(node.key, resource);
|
|
26866
|
+
return true;
|
|
26867
|
+
}
|
|
26868
|
+
// bitmarkAst -> bits -> bitsValue -> platformBackgroundImage
|
|
26869
|
+
enter_platformBackgroundImage(node, _route) {
|
|
26870
|
+
const resource = node.value;
|
|
26871
|
+
this.writeNL();
|
|
26872
|
+
this.writePropertyStyleResource(node.key, resource);
|
|
26873
|
+
return true;
|
|
26874
|
+
}
|
|
26200
26875
|
exit_imagePlaceholder(_node, _route) {
|
|
26201
26876
|
}
|
|
26202
26877
|
// bitmarkAst -> bits -> bitsValue -> posterImage
|
|
@@ -26469,8 +27144,8 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26469
27144
|
} else {
|
|
26470
27145
|
}
|
|
26471
27146
|
}
|
|
26472
|
-
// bitmarkAst -> bits -> bitsValue -> elements -> elementsValue
|
|
26473
|
-
|
|
27147
|
+
// bitmarkAst -> bits -> bitsValue -> cardNode -> elements -> elementsValue
|
|
27148
|
+
enter_elementsValue(node, _route) {
|
|
26474
27149
|
if (node.value) {
|
|
26475
27150
|
this.writeNL();
|
|
26476
27151
|
this.writeTextOrValue(node.value, this.textFormat, TextLocation.body);
|
|
@@ -26553,10 +27228,19 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
26553
27228
|
}
|
|
26554
27229
|
}
|
|
26555
27230
|
// bitmarkAst -> bits -> bitsValue -> questions -> questionsValue -> question
|
|
27231
|
+
// bitmarkAst -> bits -> bitsValue -> cardNode -> questions -> questionsValue -> question
|
|
27232
|
+
enter_question(node, route) {
|
|
27233
|
+
const parent = this.getParentNode(route);
|
|
27234
|
+
if (parent?.key !== NodeType.questionsValue) return;
|
|
27235
|
+
if (node.value) {
|
|
27236
|
+
this.writeNL();
|
|
27237
|
+
this.writeTextOrValue(node.value, this.textFormat, TextLocation.body);
|
|
27238
|
+
}
|
|
27239
|
+
}
|
|
26556
27240
|
// bitmarkAst -> bits -> bitsValue -> cardNode -> flashcards -> flashcardsValue -> question
|
|
26557
27241
|
leaf_question(node, route) {
|
|
26558
27242
|
const parent = this.getParentNode(route);
|
|
26559
|
-
if (parent?.key !== NodeType.
|
|
27243
|
+
if (parent?.key !== NodeType.flashcardsValue) return;
|
|
26560
27244
|
if (node.value) {
|
|
26561
27245
|
this.writeNL();
|
|
26562
27246
|
this.writeTextOrValue(node.value, this.textFormat, TextLocation.body);
|
|
@@ -27032,12 +27716,12 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
27032
27716
|
} else {
|
|
27033
27717
|
}
|
|
27034
27718
|
}
|
|
27035
|
-
writeCardSetCardDivider() {
|
|
27719
|
+
writeCardSetCardDivider(qualifier) {
|
|
27036
27720
|
this.writeNL();
|
|
27037
|
-
|
|
27038
|
-
|
|
27039
|
-
|
|
27040
|
-
this.
|
|
27721
|
+
const divider = this.getCardDividerMarker();
|
|
27722
|
+
this.write(divider);
|
|
27723
|
+
if (qualifier) {
|
|
27724
|
+
this.appendCardDividerQualifier(qualifier);
|
|
27041
27725
|
}
|
|
27042
27726
|
}
|
|
27043
27727
|
writeCardSetSideDivider() {
|
|
@@ -27056,6 +27740,20 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
27056
27740
|
this.write("++");
|
|
27057
27741
|
}
|
|
27058
27742
|
}
|
|
27743
|
+
getCardDividerMarker() {
|
|
27744
|
+
return this.options.cardSetVersion === CardSetVersion.v1 ? "===" : "====";
|
|
27745
|
+
}
|
|
27746
|
+
appendCardDividerQualifier(qualifier) {
|
|
27747
|
+
const marker = this.getCardDividerMarker();
|
|
27748
|
+
const normalizedQualifier = instance3.breakscape(qualifier, {
|
|
27749
|
+
format: TextFormat.plainText,
|
|
27750
|
+
location: TextLocation.tag
|
|
27751
|
+
});
|
|
27752
|
+
this.write(" ");
|
|
27753
|
+
this.write(normalizedQualifier);
|
|
27754
|
+
this.write(" ");
|
|
27755
|
+
this.write(marker);
|
|
27756
|
+
}
|
|
27059
27757
|
writeNL_IfNotChain(route) {
|
|
27060
27758
|
if (!this.isChain(route)) {
|
|
27061
27759
|
this.writeNL();
|
|
@@ -27160,7 +27858,10 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
|
|
|
27160
27858
|
return !!writeFormat;
|
|
27161
27859
|
}
|
|
27162
27860
|
calculateIsCardAllowed() {
|
|
27163
|
-
return this.isBodyBitmarkText && !this.isOfBitType1();
|
|
27861
|
+
return this.isBodyBitmarkText && !this.isOfBitType1() && !this.isTableBitType();
|
|
27862
|
+
}
|
|
27863
|
+
isTableBitType() {
|
|
27864
|
+
return this.isOfBitType([BitType.table]);
|
|
27164
27865
|
}
|
|
27165
27866
|
isOfBitType1() {
|
|
27166
27867
|
return this.isOfBitType([
|
|
@@ -27467,10 +28168,6 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
27467
28168
|
enter_pageNumber(node, route) {
|
|
27468
28169
|
return this.standardHandler(node, route, NodeType.bitsValue, { array: true });
|
|
27469
28170
|
}
|
|
27470
|
-
// bitmarkAst -> bits -> bitsValue -> sourcePageNumber
|
|
27471
|
-
enter_sourcePageNumber(node, route) {
|
|
27472
|
-
return this.standardHandler(node, route, NodeType.bitsValue, { array: true });
|
|
27473
|
-
}
|
|
27474
28171
|
// bitmarkAst -> bits -> bitsValue -> marginNumber
|
|
27475
28172
|
enter_marginNumber(node, route) {
|
|
27476
28173
|
return this.standardHandler(node, route, NodeType.bitsValue, { array: true });
|
|
@@ -27681,7 +28378,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
27681
28378
|
const parent = this.getParentNode(route);
|
|
27682
28379
|
if (parent?.key !== NodeType.cardNode) return;
|
|
27683
28380
|
if (statement) {
|
|
27684
|
-
this.bitJson.statement = statement.statement ??
|
|
28381
|
+
this.bitJson.statement = statement.statement ?? [];
|
|
27685
28382
|
this.bitJson.isCorrect = statement.isCorrect ?? false;
|
|
27686
28383
|
this.bitJson.example = statement.example;
|
|
27687
28384
|
this.bitJson.isExample = statement.isExample;
|
|
@@ -27757,6 +28454,18 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
27757
28454
|
enter_imagePlaceholder(node, route) {
|
|
27758
28455
|
return this.standardHandler(node, route, NodeType.bitsValue, { array: false });
|
|
27759
28456
|
}
|
|
28457
|
+
// bitmarkAst -> bits -> bitsValue -> platformIcon
|
|
28458
|
+
enter_platformIcon(node, route) {
|
|
28459
|
+
return this.standardHandler(node, route, NodeType.bitsValue, { array: false });
|
|
28460
|
+
}
|
|
28461
|
+
// bitmarkAst -> bits -> bitsValue -> platformLogo
|
|
28462
|
+
enter_platformLogo(node, route) {
|
|
28463
|
+
return this.standardHandler(node, route, NodeType.bitsValue, { array: false });
|
|
28464
|
+
}
|
|
28465
|
+
// bitmarkAst -> bits -> bitsValue -> platformBackgroundImage
|
|
28466
|
+
enter_platformBackgroundImage(node, route) {
|
|
28467
|
+
return this.standardHandler(node, route, NodeType.bitsValue, { array: false });
|
|
28468
|
+
}
|
|
27760
28469
|
// bitmarkAst -> bits -> bitsValue -> resources
|
|
27761
28470
|
enter_resources(node, route) {
|
|
27762
28471
|
const resources = node.value;
|
|
@@ -28193,7 +28902,6 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28193
28902
|
delete bitJson.item;
|
|
28194
28903
|
delete bitJson.lead;
|
|
28195
28904
|
delete bitJson.pageNumber;
|
|
28196
|
-
delete bitJson.sourcePageNumber;
|
|
28197
28905
|
delete bitJson.marginNumber;
|
|
28198
28906
|
delete bitJson.hint;
|
|
28199
28907
|
delete bitJson.instruction;
|
|
@@ -28205,8 +28913,6 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28205
28913
|
if (bitJson.lead == null || bitJson.lead?.length === 0) delete bitJson.lead;
|
|
28206
28914
|
if (bitJson.pageNumber == null || bitJson.pageNumber?.length === 0)
|
|
28207
28915
|
delete bitJson.pageNumber;
|
|
28208
|
-
if (bitJson.sourcePageNumber == null || bitJson.sourcePageNumber?.length === 0)
|
|
28209
|
-
delete bitJson.sourcePageNumber;
|
|
28210
28916
|
if (bitJson.marginNumber == null || bitJson.marginNumber?.length === 0)
|
|
28211
28917
|
delete bitJson.marginNumber;
|
|
28212
28918
|
if (bitJson.hint == null || bitJson.hint?.length === 0) delete bitJson.hint;
|
|
@@ -28218,7 +28924,6 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28218
28924
|
if (bitJson.hint == null) bitJson.hint = this.textDefault;
|
|
28219
28925
|
if (bitJson.instruction == null) bitJson.instruction = this.textDefault;
|
|
28220
28926
|
if (bitJson.pageNumber == null) bitJson.pageNumber = this.textDefault;
|
|
28221
|
-
if (bitJson.sourcePageNumber == null) bitJson.sourcePageNumber = this.textDefault;
|
|
28222
28927
|
if (bitJson.marginNumber == null) bitJson.marginNumber = this.textDefault;
|
|
28223
28928
|
}
|
|
28224
28929
|
if (bitJson.body == null) bitJson.body = this.bodyDefault;
|
|
@@ -28295,6 +29000,9 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28295
29000
|
if (bitJson.footer == null) bitJson.footer = this.textDefault;
|
|
28296
29001
|
if (bitJson.questions == null) bitJson.questions = [];
|
|
28297
29002
|
}
|
|
29003
|
+
if (instance2.isOfBitType(bitType, BitType.sequence)) {
|
|
29004
|
+
if (bitJson.elements == null) bitJson.elements = [];
|
|
29005
|
+
}
|
|
28298
29006
|
if (bitType === BitType.matchMatrix) {
|
|
28299
29007
|
isTopLevelExample = true;
|
|
28300
29008
|
}
|
|
@@ -28355,6 +29063,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
|
|
|
28355
29063
|
}
|
|
28356
29064
|
if (instance2.isOfBitType(bitType, BitType.book)) {
|
|
28357
29065
|
if (bitJson.maxTocChapterLevel == null) bitJson.maxTocChapterLevel = -1;
|
|
29066
|
+
if (bitJson.hasPrintRestriction == null) bitJson.hasPrintRestriction = true;
|
|
28358
29067
|
if (bitJson.hasMarkAsDone == null) bitJson.hasMarkAsDone = false;
|
|
28359
29068
|
if (bitJson.processHandIn == null) bitJson.processHandIn = false;
|
|
28360
29069
|
if (bitJson.isPublic == null) bitJson.isPublic = false;
|
|
@@ -29012,6 +29721,9 @@ var BitmarkPegParserHelper = class {
|
|
|
29012
29721
|
__publicField(this, "cardIndex", 0);
|
|
29013
29722
|
__publicField(this, "cardSideIndex", 0);
|
|
29014
29723
|
__publicField(this, "cardVariantIndex", 0);
|
|
29724
|
+
__publicField(this, "currentCardQualifier");
|
|
29725
|
+
__publicField(this, "currentSideQualifier");
|
|
29726
|
+
__publicField(this, "currentVariantQualifier");
|
|
29015
29727
|
__publicField(this, "parse");
|
|
29016
29728
|
__publicField(this, "parserText");
|
|
29017
29729
|
__publicField(this, "parserLocation");
|
|
@@ -29180,30 +29892,43 @@ var BitmarkPegParserHelper = class {
|
|
|
29180
29892
|
cardIndex,
|
|
29181
29893
|
cardSideIndex,
|
|
29182
29894
|
cardVariantIndex: cardContentIndex,
|
|
29183
|
-
value: value2
|
|
29895
|
+
value: value2,
|
|
29896
|
+
cardQualifier,
|
|
29897
|
+
cardSideQualifier,
|
|
29898
|
+
cardVariantQualifier
|
|
29184
29899
|
} = cardData;
|
|
29185
29900
|
let card = unparsedCardSet.cards[cardIndex];
|
|
29186
29901
|
if (!card) {
|
|
29187
29902
|
card = {
|
|
29188
|
-
sides: []
|
|
29903
|
+
sides: [],
|
|
29904
|
+
qualifier: cardQualifier
|
|
29189
29905
|
};
|
|
29190
29906
|
unparsedCardSet.cards[cardIndex] = card;
|
|
29907
|
+
} else if (cardQualifier && !card.qualifier) {
|
|
29908
|
+
card.qualifier = cardQualifier;
|
|
29191
29909
|
}
|
|
29192
29910
|
let side = card.sides[cardSideIndex];
|
|
29193
29911
|
if (!side) {
|
|
29194
29912
|
side = {
|
|
29195
|
-
variants: []
|
|
29913
|
+
variants: [],
|
|
29914
|
+
qualifier: cardSideQualifier
|
|
29196
29915
|
};
|
|
29197
29916
|
card.sides[cardSideIndex] = side;
|
|
29917
|
+
} else if (cardSideQualifier && !side.qualifier) {
|
|
29918
|
+
side.qualifier = cardSideQualifier;
|
|
29198
29919
|
}
|
|
29199
29920
|
const variant = side.variants[cardContentIndex];
|
|
29200
29921
|
if (!variant) {
|
|
29201
29922
|
side.variants[cardContentIndex] = {
|
|
29202
29923
|
value: value2,
|
|
29203
|
-
parser: parser3
|
|
29924
|
+
parser: parser3,
|
|
29925
|
+
qualifier: cardVariantQualifier
|
|
29204
29926
|
};
|
|
29205
29927
|
} else {
|
|
29206
29928
|
side.variants[cardContentIndex].value += value2;
|
|
29929
|
+
if (cardVariantQualifier && !variant.qualifier) {
|
|
29930
|
+
variant.qualifier = cardVariantQualifier;
|
|
29931
|
+
}
|
|
29207
29932
|
}
|
|
29208
29933
|
}
|
|
29209
29934
|
unparsedCardSet.cards = unparsedCardSet.cards.filter((card) => {
|
|
@@ -29216,12 +29941,14 @@ var BitmarkPegParserHelper = class {
|
|
|
29216
29941
|
});
|
|
29217
29942
|
for (const unparsedCard of unparsedCardSet.cards) {
|
|
29218
29943
|
const card = {
|
|
29219
|
-
sides: []
|
|
29944
|
+
sides: [],
|
|
29945
|
+
qualifier: unparsedCard.qualifier
|
|
29220
29946
|
};
|
|
29221
29947
|
cardSet.cards.push(card);
|
|
29222
29948
|
for (const unparsedSide of unparsedCard.sides) {
|
|
29223
29949
|
const side = {
|
|
29224
|
-
variants: []
|
|
29950
|
+
variants: [],
|
|
29951
|
+
qualifier: unparsedSide.qualifier
|
|
29225
29952
|
};
|
|
29226
29953
|
card.sides.push(side);
|
|
29227
29954
|
for (const unparsedContent of unparsedSide.variants) {
|
|
@@ -29246,7 +29973,8 @@ var BitmarkPegParserHelper = class {
|
|
|
29246
29973
|
if (DEBUG_TRACE_CARD_PARSED) this.debugPrint("parsedCardContent", content);
|
|
29247
29974
|
side.variants.push({
|
|
29248
29975
|
parser: parser2,
|
|
29249
|
-
content
|
|
29976
|
+
content,
|
|
29977
|
+
qualifier: unparsedContent.qualifier
|
|
29250
29978
|
});
|
|
29251
29979
|
}
|
|
29252
29980
|
}
|
|
@@ -29266,12 +29994,18 @@ var BitmarkPegParserHelper = class {
|
|
|
29266
29994
|
this.cardIndex = -1;
|
|
29267
29995
|
this.cardSideIndex = 0;
|
|
29268
29996
|
this.cardVariantIndex = 0;
|
|
29997
|
+
this.currentCardQualifier = void 0;
|
|
29998
|
+
this.currentSideQualifier = void 0;
|
|
29999
|
+
this.currentVariantQualifier = void 0;
|
|
29269
30000
|
}
|
|
29270
30001
|
handleCardSetEnd() {
|
|
29271
30002
|
if (DEBUG_TRACE_CARD_SET_END) this.debugPrint("CardSetEnd");
|
|
29272
30003
|
this.cardIndex = 0;
|
|
29273
30004
|
this.cardSideIndex = 0;
|
|
29274
30005
|
this.cardVariantIndex = 0;
|
|
30006
|
+
this.currentCardQualifier = void 0;
|
|
30007
|
+
this.currentSideQualifier = void 0;
|
|
30008
|
+
this.currentVariantQualifier = void 0;
|
|
29275
30009
|
}
|
|
29276
30010
|
handleCards(value) {
|
|
29277
30011
|
return value;
|
|
@@ -29281,27 +30015,45 @@ var BitmarkPegParserHelper = class {
|
|
|
29281
30015
|
let isCardDivider = false;
|
|
29282
30016
|
let isSideDivider = false;
|
|
29283
30017
|
let isVariantDivider = false;
|
|
30018
|
+
let qualifier;
|
|
29284
30019
|
if (Array.isArray(value) && value.length === 2) {
|
|
29285
|
-
|
|
29286
|
-
if (
|
|
29287
|
-
|
|
29288
|
-
|
|
29289
|
-
|
|
30020
|
+
const [divider, maybeQualifier] = value;
|
|
30021
|
+
if (typeof divider === "string") {
|
|
30022
|
+
value = divider;
|
|
30023
|
+
if (typeof maybeQualifier === "string" && maybeQualifier.trim() === maybeQualifier && maybeQualifier.length > 0) {
|
|
30024
|
+
qualifier = maybeQualifier;
|
|
30025
|
+
}
|
|
29290
30026
|
} else {
|
|
29291
|
-
|
|
29292
|
-
isSideDivider = value === CARD_SIDE_DIVIDER_V2;
|
|
29293
|
-
isVariantDivider = value === CARD_VARIANT_DIVIDER_V2;
|
|
30027
|
+
value = divider;
|
|
29294
30028
|
}
|
|
30029
|
+
} else if (Array.isArray(value) && value.length === 1) {
|
|
30030
|
+
const [divider] = value;
|
|
30031
|
+
value = divider;
|
|
30032
|
+
}
|
|
30033
|
+
if (version === CardSetVersion.v1) {
|
|
30034
|
+
isCardDivider = value === CARD_DIVIDER_V1;
|
|
30035
|
+
isSideDivider = value === CARD_SIDE_DIVIDER_V1;
|
|
30036
|
+
isVariantDivider = value === CARD_VARIANT_DIVIDER_V1;
|
|
30037
|
+
} else {
|
|
30038
|
+
isCardDivider = value === CARD_DIVIDER_V2;
|
|
30039
|
+
isSideDivider = value === CARD_SIDE_DIVIDER_V2;
|
|
30040
|
+
isVariantDivider = value === CARD_VARIANT_DIVIDER_V2;
|
|
29295
30041
|
}
|
|
29296
30042
|
if (isCardDivider) {
|
|
29297
30043
|
this.cardIndex++;
|
|
29298
30044
|
this.cardSideIndex = 0;
|
|
29299
30045
|
this.cardVariantIndex = 0;
|
|
30046
|
+
this.currentCardQualifier = qualifier;
|
|
30047
|
+
this.currentSideQualifier = void 0;
|
|
30048
|
+
this.currentVariantQualifier = void 0;
|
|
29300
30049
|
} else if (isSideDivider) {
|
|
29301
30050
|
this.cardSideIndex++;
|
|
29302
30051
|
this.cardVariantIndex = 0;
|
|
30052
|
+
this.currentSideQualifier = qualifier;
|
|
30053
|
+
this.currentVariantQualifier = void 0;
|
|
29303
30054
|
} else if (isVariantDivider) {
|
|
29304
30055
|
this.cardVariantIndex++;
|
|
30056
|
+
this.currentVariantQualifier = qualifier;
|
|
29305
30057
|
}
|
|
29306
30058
|
if (this.isType(value, TypeKey.Card)) return value;
|
|
29307
30059
|
return {
|
|
@@ -29310,7 +30062,10 @@ var BitmarkPegParserHelper = class {
|
|
|
29310
30062
|
cardIndex: this.cardIndex,
|
|
29311
30063
|
cardSideIndex: this.cardSideIndex,
|
|
29312
30064
|
cardVariantIndex: this.cardVariantIndex,
|
|
29313
|
-
value: ""
|
|
30065
|
+
value: "",
|
|
30066
|
+
cardQualifier: this.currentCardQualifier,
|
|
30067
|
+
cardSideQualifier: this.currentSideQualifier,
|
|
30068
|
+
cardVariantQualifier: this.currentVariantQualifier
|
|
29314
30069
|
},
|
|
29315
30070
|
parser: {
|
|
29316
30071
|
text: this.parserText(),
|
|
@@ -29331,7 +30086,10 @@ var BitmarkPegParserHelper = class {
|
|
|
29331
30086
|
cardIndex: this.cardIndex,
|
|
29332
30087
|
cardSideIndex: this.cardSideIndex,
|
|
29333
30088
|
cardVariantIndex: this.cardVariantIndex,
|
|
29334
|
-
value
|
|
30089
|
+
value,
|
|
30090
|
+
cardQualifier: this.currentCardQualifier,
|
|
30091
|
+
cardSideQualifier: this.currentSideQualifier,
|
|
30092
|
+
cardVariantQualifier: this.currentVariantQualifier
|
|
29335
30093
|
},
|
|
29336
30094
|
parser: {
|
|
29337
30095
|
text: this.parserText(),
|
|
@@ -29691,7 +30449,7 @@ var BitmarkPegParserValidator = class {
|
|
|
29691
30449
|
let tagData = validTypeKeys.get(validTypeKey);
|
|
29692
30450
|
if (!tagData && typeKey === TypeKey.Property) {
|
|
29693
30451
|
const resourceKey = key.replace(/^@/, "&");
|
|
29694
|
-
if (resourceKey === ConfigKey.resource_backgroundWallpaper || resourceKey === ConfigKey.resource_imagePlaceholder) {
|
|
30452
|
+
if (resourceKey === ConfigKey.resource_backgroundWallpaper || resourceKey === ConfigKey.resource_imagePlaceholder || resourceKey === ConfigKey.resource_platformIcon || resourceKey === ConfigKey.resource_platformLogo || resourceKey === ConfigKey.resource_platformBackgroundImage) {
|
|
29695
30453
|
tagData = validTypeKeys.get(resourceKey);
|
|
29696
30454
|
if (tagData) {
|
|
29697
30455
|
typeKey = TypeKey.Resource;
|
|
@@ -30428,6 +31186,7 @@ function buildCards(context, bitType, textFormat, parsedCardSet, statementV1, st
|
|
|
30428
31186
|
result = parsePronunciationTable(context, bitType, processedCardSet);
|
|
30429
31187
|
break;
|
|
30430
31188
|
case CardSetConfigKey.table:
|
|
31189
|
+
case CardSetConfigKey.tableExtended:
|
|
30431
31190
|
result = parseTable(context, bitType, processedCardSet);
|
|
30432
31191
|
break;
|
|
30433
31192
|
case CardSetConfigKey.botActionResponses:
|
|
@@ -30464,20 +31223,23 @@ function processCardSet(context, parsedCardSet) {
|
|
|
30464
31223
|
for (const card of parsedCardSet.cards) {
|
|
30465
31224
|
const processedCard = {
|
|
30466
31225
|
no: cardNo++,
|
|
30467
|
-
sides: []
|
|
31226
|
+
sides: [],
|
|
31227
|
+
qualifier: card.qualifier
|
|
30468
31228
|
};
|
|
30469
31229
|
processedCardSet.cards.push(processedCard);
|
|
30470
31230
|
for (const side of card.sides) {
|
|
30471
31231
|
const processedSide = {
|
|
30472
31232
|
no: sideNo++,
|
|
30473
|
-
variants: []
|
|
31233
|
+
variants: [],
|
|
31234
|
+
qualifier: side.qualifier
|
|
30474
31235
|
};
|
|
30475
31236
|
processedCard.sides.push(processedSide);
|
|
30476
31237
|
for (const variant of side.variants) {
|
|
30477
31238
|
const { parser: parser2, content } = variant;
|
|
30478
31239
|
const processedVariant = {
|
|
30479
31240
|
parser: parser2,
|
|
30480
|
-
no: variantNo
|
|
31241
|
+
no: variantNo++,
|
|
31242
|
+
qualifier: variant.qualifier
|
|
30481
31243
|
};
|
|
30482
31244
|
processedSide.variants.push(processedVariant);
|
|
30483
31245
|
const tagsConfig = instance2.getTagsConfigForCardSet(bitType, sideNo, variantNo);
|
|
@@ -30591,7 +31353,8 @@ function parseElements(_context, _bitType, cardSet) {
|
|
|
30591
31353
|
for (const side of card.sides) {
|
|
30592
31354
|
for (const content of side.variants) {
|
|
30593
31355
|
const tags2 = content.data;
|
|
30594
|
-
|
|
31356
|
+
const element = tags2.cardBody?.body ?? tags2.cardBodyStr ?? instance3.EMPTY_STRING;
|
|
31357
|
+
elements.push(element);
|
|
30595
31358
|
}
|
|
30596
31359
|
}
|
|
30597
31360
|
}
|
|
@@ -30608,7 +31371,7 @@ function parseStatements(_context, _bitType, cardSet, statementV1, statementsV1)
|
|
|
30608
31371
|
if (Array.isArray(chainedStatements)) {
|
|
30609
31372
|
for (const s of chainedStatements) {
|
|
30610
31373
|
const statement = {
|
|
30611
|
-
statement: s.statement ??
|
|
31374
|
+
statement: s.statement ?? [],
|
|
30612
31375
|
isCorrect: s.isCorrect,
|
|
30613
31376
|
item: s.item,
|
|
30614
31377
|
lead: s.lead,
|
|
@@ -30750,7 +31513,7 @@ function parseQuestions(_context, _bitType, cardSet) {
|
|
|
30750
31513
|
for (const content of side.variants) {
|
|
30751
31514
|
const tags2 = content.data;
|
|
30752
31515
|
const q = {
|
|
30753
|
-
question: tags2.cardBodyStr ??
|
|
31516
|
+
question: tags2.cardBody?.body ?? tags2.cardBodyStr ?? instance3.EMPTY_STRING,
|
|
30754
31517
|
...tags2
|
|
30755
31518
|
};
|
|
30756
31519
|
if (q) questions.push(q);
|
|
@@ -30954,37 +31717,158 @@ function parsePronunciationTable(_context, _bitType, cardSet) {
|
|
|
30954
31717
|
};
|
|
30955
31718
|
return { pronunciationTable: table };
|
|
30956
31719
|
}
|
|
30957
|
-
function parseTable(
|
|
30958
|
-
|
|
30959
|
-
|
|
30960
|
-
|
|
30961
|
-
|
|
31720
|
+
function parseTable(context, _bitType, cardSet) {
|
|
31721
|
+
const sectionRows = {
|
|
31722
|
+
thead: [],
|
|
31723
|
+
tbody: [],
|
|
31724
|
+
tfoot: []
|
|
31725
|
+
};
|
|
31726
|
+
const getNormalizedQualifier = (rawQualifier) => {
|
|
31727
|
+
if (!rawQualifier) return void 0;
|
|
31728
|
+
const normalized = rawQualifier.trim().toLowerCase();
|
|
31729
|
+
if (normalized === "thead" || normalized === "tbody" || normalized === "tfoot") {
|
|
31730
|
+
return normalized;
|
|
31731
|
+
}
|
|
31732
|
+
context.addWarning(`Unknown table section qualifier '${rawQualifier}', defaulting to tbody.`);
|
|
31733
|
+
return void 0;
|
|
31734
|
+
};
|
|
31735
|
+
const isLegacyHeadingRow = (card, cardIndex) => {
|
|
31736
|
+
if (cardIndex !== 0) return false;
|
|
31737
|
+
return card.sides.some(
|
|
31738
|
+
(side) => side.variants.some((variant) => {
|
|
31739
|
+
const titles = variant.data.title;
|
|
31740
|
+
return Array.isArray(titles) && titles[1]?.titleAst;
|
|
31741
|
+
})
|
|
31742
|
+
);
|
|
31743
|
+
};
|
|
31744
|
+
const readExtraProperty = (extra, key) => {
|
|
31745
|
+
if (!extra) return void 0;
|
|
31746
|
+
const value = extra[key];
|
|
31747
|
+
return Array.isArray(value) ? value[0] : value;
|
|
31748
|
+
};
|
|
31749
|
+
const cleanupExtraProperties = (tags2, keys) => {
|
|
31750
|
+
const extra = tags2.extraProperties;
|
|
31751
|
+
if (!extra) return;
|
|
31752
|
+
for (const key of keys) {
|
|
31753
|
+
if (Object.prototype.hasOwnProperty.call(extra, key)) delete extra[key];
|
|
31754
|
+
}
|
|
31755
|
+
if (Object.keys(extra).length === 0) {
|
|
31756
|
+
delete tags2.extraProperties;
|
|
31757
|
+
}
|
|
31758
|
+
};
|
|
31759
|
+
const normalizeCellType = (raw, section) => {
|
|
31760
|
+
if (typeof raw === "string") {
|
|
31761
|
+
const normalized = raw.trim().toLowerCase();
|
|
31762
|
+
if (normalized === "th" || normalized === "td") {
|
|
31763
|
+
return normalized;
|
|
31764
|
+
}
|
|
31765
|
+
context.addWarning(
|
|
31766
|
+
`Invalid table cell type '${raw}', using default for section '${section}'.`
|
|
31767
|
+
);
|
|
31768
|
+
}
|
|
31769
|
+
return section === "tbody" ? "td" : "th";
|
|
31770
|
+
};
|
|
31771
|
+
const normalizeSpan = (raw, kind) => {
|
|
31772
|
+
if (raw == null) return 1;
|
|
31773
|
+
const numeric = instance6.asNumber(raw);
|
|
31774
|
+
if (numeric == null || !Number.isInteger(numeric) || numeric < 1) {
|
|
31775
|
+
context.addWarning(`Invalid table ${kind} '${raw}', defaulting to 1.`);
|
|
31776
|
+
return 1;
|
|
31777
|
+
}
|
|
31778
|
+
return numeric;
|
|
31779
|
+
};
|
|
31780
|
+
const normalizeScope = (raw) => {
|
|
31781
|
+
if (raw == null) return void 0;
|
|
31782
|
+
if (typeof raw !== "string") {
|
|
31783
|
+
context.addWarning(`Invalid table scope '${raw}', ignoring.`);
|
|
31784
|
+
return void 0;
|
|
31785
|
+
}
|
|
31786
|
+
const normalized = raw.trim().toLowerCase();
|
|
31787
|
+
switch (normalized) {
|
|
31788
|
+
case "row":
|
|
31789
|
+
case "col":
|
|
31790
|
+
case "rowgroup":
|
|
31791
|
+
case "colgroup":
|
|
31792
|
+
return normalized;
|
|
31793
|
+
default:
|
|
31794
|
+
context.addWarning(`Invalid table scope '${raw}', ignoring.`);
|
|
31795
|
+
return void 0;
|
|
31796
|
+
}
|
|
31797
|
+
};
|
|
31798
|
+
const buildCell = (variant, section) => {
|
|
31799
|
+
const tags2 = variant.data;
|
|
31800
|
+
const heading = tags2.title && tags2.title[1]?.titleAst;
|
|
31801
|
+
const bodyContent = tags2.cardBody?.body ?? tags2.cardBodyStr ?? instance3.EMPTY_STRING;
|
|
31802
|
+
const content = heading ?? bodyContent;
|
|
31803
|
+
const cellTypeRaw = tags2.tableCellType ?? readExtraProperty(tags2.extraProperties, "tableCellType");
|
|
31804
|
+
const rowSpanRaw = tags2.tableRowSpan ?? readExtraProperty(tags2.extraProperties, "tableRowSpan");
|
|
31805
|
+
const colSpanRaw = tags2.tableColSpan ?? readExtraProperty(tags2.extraProperties, "tableColSpan");
|
|
31806
|
+
const scopeRaw = tags2.tableScope ?? readExtraProperty(tags2.extraProperties, "tableScope");
|
|
31807
|
+
cleanupExtraProperties(tags2, ["tableCellType", "tableRowSpan", "tableColSpan", "tableScope"]);
|
|
31808
|
+
const cellType = normalizeCellType(cellTypeRaw, section);
|
|
31809
|
+
const rowspan = normalizeSpan(rowSpanRaw, "rowspan");
|
|
31810
|
+
const colspan = normalizeSpan(colSpanRaw, "colspan");
|
|
31811
|
+
const scope = normalizeScope(scopeRaw);
|
|
31812
|
+
const cell = {
|
|
31813
|
+
content
|
|
31814
|
+
};
|
|
31815
|
+
if (cellType === "th") cell.title = true;
|
|
31816
|
+
if (rowspan > 1) cell.rowspan = rowspan;
|
|
31817
|
+
if (colspan > 1) cell.colspan = colspan;
|
|
31818
|
+
if (scope) cell.scope = scope;
|
|
31819
|
+
return cell;
|
|
31820
|
+
};
|
|
31821
|
+
const resolveSectionQualifier = (card) => {
|
|
31822
|
+
const cardQualifier = getNormalizedQualifier(card.qualifier);
|
|
31823
|
+
if (cardQualifier) return cardQualifier;
|
|
31824
|
+
for (const side of card.sides) {
|
|
31825
|
+
const sideQualifier = getNormalizedQualifier(side.qualifier);
|
|
31826
|
+
if (sideQualifier) return sideQualifier;
|
|
31827
|
+
for (const variant of side.variants) {
|
|
31828
|
+
const variantQualifier = getNormalizedQualifier(variant.qualifier);
|
|
31829
|
+
if (variantQualifier) return variantQualifier;
|
|
31830
|
+
}
|
|
31831
|
+
}
|
|
31832
|
+
return void 0;
|
|
31833
|
+
};
|
|
30962
31834
|
for (let cardIdx = 0; cardIdx < cardSet.cards.length; cardIdx++) {
|
|
30963
31835
|
const card = cardSet.cards[cardIdx];
|
|
30964
|
-
|
|
30965
|
-
|
|
31836
|
+
const qualifier = resolveSectionQualifier(card);
|
|
31837
|
+
const section = qualifier ? qualifier : isLegacyHeadingRow(card, cardIdx) ? "thead" : "tbody";
|
|
31838
|
+
const cells = [];
|
|
30966
31839
|
for (const side of card.sides) {
|
|
30967
|
-
for (const
|
|
30968
|
-
|
|
30969
|
-
const { title, cardBody } = tags2;
|
|
30970
|
-
const heading = title && title[1].titleAst;
|
|
30971
|
-
if (cardIdx === 0 && heading != null) isHeading = true;
|
|
30972
|
-
if (isHeading) {
|
|
30973
|
-
columns.push(heading ?? []);
|
|
30974
|
-
} else {
|
|
30975
|
-
const value = cardBody?.body ?? [];
|
|
30976
|
-
rowValues.push(value);
|
|
30977
|
-
}
|
|
31840
|
+
for (const variant of side.variants) {
|
|
31841
|
+
cells.push(buildCell(variant, section));
|
|
30978
31842
|
}
|
|
30979
31843
|
}
|
|
30980
|
-
|
|
30981
|
-
|
|
30982
|
-
}
|
|
31844
|
+
sectionRows[section].push({
|
|
31845
|
+
cells
|
|
31846
|
+
});
|
|
31847
|
+
}
|
|
31848
|
+
const table = {};
|
|
31849
|
+
const hasHeadRows = sectionRows.thead.length > 0;
|
|
31850
|
+
const hasBodyRows = sectionRows.tbody.length > 0;
|
|
31851
|
+
const hasFootRows = sectionRows.tfoot.length > 0;
|
|
31852
|
+
if (hasHeadRows) {
|
|
31853
|
+
table.head = {
|
|
31854
|
+
rows: sectionRows.thead
|
|
31855
|
+
};
|
|
31856
|
+
}
|
|
31857
|
+
if (hasBodyRows) {
|
|
31858
|
+
table.body = {
|
|
31859
|
+
rows: sectionRows.tbody
|
|
31860
|
+
};
|
|
31861
|
+
}
|
|
31862
|
+
if (hasFootRows) {
|
|
31863
|
+
table.foot = {
|
|
31864
|
+
rows: sectionRows.tfoot
|
|
31865
|
+
};
|
|
31866
|
+
}
|
|
31867
|
+
if (!hasHeadRows && !hasBodyRows && !hasFootRows) {
|
|
31868
|
+
table.head = { rows: [] };
|
|
31869
|
+
table.body = { rows: [] };
|
|
31870
|
+
table.foot = { rows: [] };
|
|
30983
31871
|
}
|
|
30984
|
-
const table = {
|
|
30985
|
-
columns,
|
|
30986
|
-
data: rows
|
|
30987
|
-
};
|
|
30988
31872
|
return { table };
|
|
30989
31873
|
}
|
|
30990
31874
|
function parseBotActionResponses(_context, _bitType, cardSet) {
|
|
@@ -31135,11 +32019,11 @@ function extractHeadingCard(cardSet, valuesIsArray = false) {
|
|
|
31135
32019
|
function defaultTagContentProcessor(context, _contentDepth, _tagsConfig, content, target) {
|
|
31136
32020
|
const { type, value } = content;
|
|
31137
32021
|
const { textFormat } = context;
|
|
31138
|
-
const
|
|
32022
|
+
const textParser10 = new TextParser();
|
|
31139
32023
|
const trimmedStringValue = stringUtils.trimmedString(value);
|
|
31140
32024
|
switch (type) {
|
|
31141
32025
|
case TypeKey.Instruction: {
|
|
31142
|
-
target.instruction =
|
|
32026
|
+
target.instruction = textParser10.toAst(trimmedStringValue, {
|
|
31143
32027
|
format: textFormat,
|
|
31144
32028
|
location: TextLocation.tag
|
|
31145
32029
|
});
|
|
@@ -31150,7 +32034,7 @@ function defaultTagContentProcessor(context, _contentDepth, _tagsConfig, content
|
|
|
31150
32034
|
break;
|
|
31151
32035
|
}
|
|
31152
32036
|
case TypeKey.Hint: {
|
|
31153
|
-
target.hint =
|
|
32037
|
+
target.hint = textParser10.toAst(trimmedStringValue, {
|
|
31154
32038
|
format: textFormat,
|
|
31155
32039
|
location: TextLocation.tag
|
|
31156
32040
|
});
|
|
@@ -31180,7 +32064,7 @@ function defaultTagContentProcessor(context, _contentDepth, _tagsConfig, content
|
|
|
31180
32064
|
format: TextFormat.bitmarkText,
|
|
31181
32065
|
location: TextLocation.tag
|
|
31182
32066
|
});
|
|
31183
|
-
target.__sampleSolutionAst =
|
|
32067
|
+
target.__sampleSolutionAst = textParser10.toAst(trimmedStringValue, {
|
|
31184
32068
|
format: textFormat,
|
|
31185
32069
|
location: TextLocation.tag
|
|
31186
32070
|
});
|
|
@@ -31287,10 +32171,10 @@ function buildGap(context, _contentDepth, tagsConfig, content) {
|
|
|
31287
32171
|
function itemLeadTagContentProcessor(context, _contentDepth, _tagsConfig, content, target) {
|
|
31288
32172
|
const { textFormat } = context;
|
|
31289
32173
|
const { value } = content;
|
|
31290
|
-
const
|
|
32174
|
+
const textParser10 = new TextParser();
|
|
31291
32175
|
const trimmedStringValue = stringUtils.trimmedString(value);
|
|
31292
32176
|
if (!target.itemLead) target.itemLead = [];
|
|
31293
|
-
const text =
|
|
32177
|
+
const text = textParser10.toAst(trimmedStringValue, {
|
|
31294
32178
|
format: textFormat,
|
|
31295
32179
|
location: TextLocation.tag
|
|
31296
32180
|
});
|
|
@@ -31968,7 +32852,7 @@ function resourceContentProcessor(context, _contentDepth, tagsConfig, content, t
|
|
|
31968
32852
|
...tags2
|
|
31969
32853
|
});
|
|
31970
32854
|
if (resource) {
|
|
31971
|
-
if (configKey === ConfigKey.resource_backgroundWallpaper || configKey === ConfigKey.resource_imagePlaceholder) {
|
|
32855
|
+
if (configKey === ConfigKey.resource_backgroundWallpaper || configKey === ConfigKey.resource_imagePlaceholder || configKey === ConfigKey.resource_platformIcon || configKey === ConfigKey.resource_platformLogo || configKey === ConfigKey.resource_platformBackgroundImage) {
|
|
31972
32856
|
if (target.propertyStyleResources) target.propertyStyleResources[resourceType] = resource;
|
|
31973
32857
|
} else {
|
|
31974
32858
|
resources.push(resource);
|
|
@@ -32041,7 +32925,9 @@ function buildTitles(_context, bitType, title) {
|
|
|
32041
32925
|
}
|
|
32042
32926
|
|
|
32043
32927
|
// src/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.ts
|
|
32044
|
-
|
|
32928
|
+
var textParser9 = new TextParser();
|
|
32929
|
+
function trueFalseTagContentProcessor(context, _contentDepth, content, target) {
|
|
32930
|
+
const { textFormat } = context;
|
|
32045
32931
|
const { type, value } = content;
|
|
32046
32932
|
const trueFalse = target.trueFalse;
|
|
32047
32933
|
if (!trueFalse) return;
|
|
@@ -32052,8 +32938,13 @@ function trueFalseTagContentProcessor(_context, _contentDepth, content, target)
|
|
|
32052
32938
|
location: TextLocation.tag
|
|
32053
32939
|
}
|
|
32054
32940
|
);
|
|
32941
|
+
const textAst = textParser9.toAst(trimmedStringValue ?? "", {
|
|
32942
|
+
format: textFormat,
|
|
32943
|
+
location: TextLocation.tag
|
|
32944
|
+
});
|
|
32055
32945
|
trueFalse.push({
|
|
32056
32946
|
text: trimmedStringValue,
|
|
32947
|
+
textAst,
|
|
32057
32948
|
isCorrect: type === TypeKey.True,
|
|
32058
32949
|
__isDefaultExample: false
|
|
32059
32950
|
});
|
|
@@ -32157,7 +33048,7 @@ function buildStatementsChoicesResponses(context, tagsConfig, trueFalseContent)
|
|
|
32157
33048
|
const { statement: _ignore, ...tagsRest } = tags2;
|
|
32158
33049
|
const statement = {
|
|
32159
33050
|
...firstTrueFalse,
|
|
32160
|
-
statement: firstTrueFalse.
|
|
33051
|
+
statement: firstTrueFalse.textAst ?? [],
|
|
32161
33052
|
...tagsRest
|
|
32162
33053
|
};
|
|
32163
33054
|
if (statement) statements.push(statement);
|
|
@@ -32680,8 +33571,7 @@ var BitmarkPegParserProcessor = class {
|
|
|
32680
33571
|
if (l > 0) result.item = result.itemLead[0];
|
|
32681
33572
|
if (l > 1) result.lead = result.itemLead[1];
|
|
32682
33573
|
if (l > 2) result.pageNumber = result.itemLead[2];
|
|
32683
|
-
if (l > 3) result.
|
|
32684
|
-
if (l > 4) result.marginNumber = result.itemLead[l - 1];
|
|
33574
|
+
if (l > 3) result.marginNumber = result.itemLead[l - 1];
|
|
32685
33575
|
}
|
|
32686
33576
|
if (inBit) {
|
|
32687
33577
|
result.body = instance11.process(
|
|
@@ -32943,36 +33833,39 @@ function peg$parse2(input, options) {
|
|
|
32943
33833
|
const peg$c7 = "text";
|
|
32944
33834
|
const peg$c8 = "~~~~";
|
|
32945
33835
|
const peg$c9 = "footer";
|
|
32946
|
-
const peg$c10 = "
|
|
32947
|
-
const peg$c11 = "
|
|
32948
|
-
const peg$c12 = "
|
|
32949
|
-
const peg$c13 = "
|
|
32950
|
-
const peg$c14 = "
|
|
32951
|
-
const peg$c15 = "
|
|
32952
|
-
const peg$c16 = "
|
|
32953
|
-
const peg$c17 = "[\
|
|
32954
|
-
const peg$c18 = "[
|
|
32955
|
-
const peg$c19 = "[
|
|
32956
|
-
const peg$c20 = "[
|
|
32957
|
-
const peg$c21 = "[
|
|
32958
|
-
const peg$c22 = "[
|
|
32959
|
-
const peg$c23 = "[
|
|
32960
|
-
const peg$c24 = "[
|
|
32961
|
-
const peg$c25 = "[
|
|
32962
|
-
const peg$c26 = "[
|
|
32963
|
-
const peg$c27 = "[
|
|
32964
|
-
const peg$c28 = "
|
|
32965
|
-
const peg$c29 = "
|
|
32966
|
-
const peg$c30 = "
|
|
32967
|
-
const peg$c31 = "
|
|
32968
|
-
const peg$c32 = "\
|
|
33836
|
+
const peg$c10 = " ";
|
|
33837
|
+
const peg$c11 = "--";
|
|
33838
|
+
const peg$c12 = "++";
|
|
33839
|
+
const peg$c13 = "===";
|
|
33840
|
+
const peg$c14 = "==";
|
|
33841
|
+
const peg$c15 = "[@id";
|
|
33842
|
+
const peg$c16 = "#";
|
|
33843
|
+
const peg$c17 = "[\u25BC";
|
|
33844
|
+
const peg$c18 = "[\u25BA";
|
|
33845
|
+
const peg$c19 = "[@";
|
|
33846
|
+
const peg$c20 = "[%";
|
|
33847
|
+
const peg$c21 = "[!";
|
|
33848
|
+
const peg$c22 = "[?";
|
|
33849
|
+
const peg$c23 = "[+";
|
|
33850
|
+
const peg$c24 = "[-";
|
|
33851
|
+
const peg$c25 = "[$";
|
|
33852
|
+
const peg$c26 = "[_";
|
|
33853
|
+
const peg$c27 = "[=";
|
|
33854
|
+
const peg$c28 = "[&";
|
|
33855
|
+
const peg$c29 = "^]";
|
|
33856
|
+
const peg$c30 = "id:";
|
|
33857
|
+
const peg$c31 = ".";
|
|
33858
|
+
const peg$c32 = "\n";
|
|
33859
|
+
const peg$c33 = "\r\n";
|
|
32969
33860
|
const peg$r0 = /^[^\]]/;
|
|
32970
|
-
const peg$r1 = /^[
|
|
32971
|
-
const peg$r2 = /^[
|
|
32972
|
-
const peg$r3 = /^[
|
|
32973
|
-
const peg$r4 = /^[
|
|
32974
|
-
const peg$r5 = /^[\r\u2028
|
|
32975
|
-
const peg$r6 = /^[ \t
|
|
33861
|
+
const peg$r1 = /^[a-z]/;
|
|
33862
|
+
const peg$r2 = /^[a-z0-9\-]/;
|
|
33863
|
+
const peg$r3 = /^[^:\]]/;
|
|
33864
|
+
const peg$r4 = /^[^&:\]]/;
|
|
33865
|
+
const peg$r5 = /^[^\n\r\u2028\u2029]/;
|
|
33866
|
+
const peg$r6 = /^[ \t]/;
|
|
33867
|
+
const peg$r7 = /^[\r\u2028-\u2029]/;
|
|
33868
|
+
const peg$r8 = /^[ \t\n\r\u2028\u2029]/;
|
|
32976
33869
|
const peg$e0 = peg$literalExpectation("[.", false);
|
|
32977
33870
|
const peg$e1 = peg$classExpectation(["]"], true, false, false);
|
|
32978
33871
|
const peg$e2 = peg$literalExpectation("]", false);
|
|
@@ -32985,40 +33878,43 @@ function peg$parse2(input, options) {
|
|
|
32985
33878
|
const peg$e9 = peg$literalExpectation("text", false);
|
|
32986
33879
|
const peg$e10 = peg$literalExpectation("~~~~", false);
|
|
32987
33880
|
const peg$e11 = peg$literalExpectation("footer", false);
|
|
32988
|
-
const peg$e12 = peg$literalExpectation("
|
|
32989
|
-
const peg$e13 = peg$literalExpectation("
|
|
32990
|
-
const peg$e14 = peg$literalExpectation("
|
|
32991
|
-
const peg$e15 = peg$literalExpectation("
|
|
32992
|
-
const peg$e16 = peg$literalExpectation("
|
|
32993
|
-
const peg$e17 = peg$
|
|
32994
|
-
const peg$e18 = peg$
|
|
32995
|
-
const peg$e19 = peg$literalExpectation("[
|
|
32996
|
-
const peg$e20 = peg$literalExpectation("
|
|
32997
|
-
const peg$e21 = peg$literalExpectation("[
|
|
32998
|
-
const peg$e22 = peg$literalExpectation("[
|
|
32999
|
-
const peg$e23 = peg$literalExpectation("[
|
|
33000
|
-
const peg$e24 = peg$literalExpectation("[
|
|
33001
|
-
const peg$e25 = peg$literalExpectation("[
|
|
33002
|
-
const peg$e26 = peg$literalExpectation("[
|
|
33003
|
-
const peg$e27 = peg$literalExpectation("[
|
|
33004
|
-
const peg$e28 = peg$literalExpectation("[
|
|
33005
|
-
const peg$e29 = peg$literalExpectation("[
|
|
33006
|
-
const peg$e30 = peg$literalExpectation("
|
|
33007
|
-
const peg$e31 = peg$literalExpectation("
|
|
33008
|
-
const peg$e32 = peg$
|
|
33009
|
-
const peg$e33 = peg$literalExpectation("
|
|
33010
|
-
const peg$e34 = peg$
|
|
33011
|
-
const peg$e35 = peg$
|
|
33012
|
-
const peg$e36 = peg$
|
|
33013
|
-
const peg$e37 = peg$
|
|
33014
|
-
const peg$e38 = peg$
|
|
33015
|
-
const peg$e39 = peg$
|
|
33016
|
-
const peg$e40 = peg$
|
|
33017
|
-
const peg$e41 = peg$
|
|
33018
|
-
const peg$e42 = peg$
|
|
33019
|
-
const peg$e43 = peg$
|
|
33020
|
-
const peg$e44 = peg$
|
|
33021
|
-
const peg$e45 = peg$classExpectation(["
|
|
33881
|
+
const peg$e12 = peg$literalExpectation(" ", false);
|
|
33882
|
+
const peg$e13 = peg$literalExpectation("--", false);
|
|
33883
|
+
const peg$e14 = peg$literalExpectation("++", false);
|
|
33884
|
+
const peg$e15 = peg$literalExpectation("===", false);
|
|
33885
|
+
const peg$e16 = peg$literalExpectation("==", false);
|
|
33886
|
+
const peg$e17 = peg$classExpectation([["a", "z"]], false, false, false);
|
|
33887
|
+
const peg$e18 = peg$classExpectation([["a", "z"], ["0", "9"], "-"], false, false, false);
|
|
33888
|
+
const peg$e19 = peg$literalExpectation("[@id", false);
|
|
33889
|
+
const peg$e20 = peg$literalExpectation("#", false);
|
|
33890
|
+
const peg$e21 = peg$literalExpectation("[\u25BC", false);
|
|
33891
|
+
const peg$e22 = peg$literalExpectation("[\u25BA", false);
|
|
33892
|
+
const peg$e23 = peg$literalExpectation("[@", false);
|
|
33893
|
+
const peg$e24 = peg$literalExpectation("[%", false);
|
|
33894
|
+
const peg$e25 = peg$literalExpectation("[!", false);
|
|
33895
|
+
const peg$e26 = peg$literalExpectation("[?", false);
|
|
33896
|
+
const peg$e27 = peg$literalExpectation("[+", false);
|
|
33897
|
+
const peg$e28 = peg$literalExpectation("[-", false);
|
|
33898
|
+
const peg$e29 = peg$literalExpectation("[$", false);
|
|
33899
|
+
const peg$e30 = peg$literalExpectation("[_", false);
|
|
33900
|
+
const peg$e31 = peg$literalExpectation("[=", false);
|
|
33901
|
+
const peg$e32 = peg$literalExpectation("[&", false);
|
|
33902
|
+
const peg$e33 = peg$literalExpectation("^]", false);
|
|
33903
|
+
const peg$e34 = peg$literalExpectation("id:", false);
|
|
33904
|
+
const peg$e35 = peg$classExpectation([":", "]"], true, false, false);
|
|
33905
|
+
const peg$e36 = peg$literalExpectation(".", false);
|
|
33906
|
+
const peg$e37 = peg$classExpectation(["&", ":", "]"], true, false, false);
|
|
33907
|
+
const peg$e38 = peg$otherExpectation("Character");
|
|
33908
|
+
const peg$e39 = peg$classExpectation(["\n", "\r", "\u2028", "\u2029"], true, false, false);
|
|
33909
|
+
const peg$e40 = peg$otherExpectation("Blank Line");
|
|
33910
|
+
const peg$e41 = peg$classExpectation([" ", " "], false, false, false);
|
|
33911
|
+
const peg$e42 = peg$otherExpectation("Line Terminator");
|
|
33912
|
+
const peg$e43 = peg$literalExpectation("\n", false);
|
|
33913
|
+
const peg$e44 = peg$literalExpectation("\r\n", false);
|
|
33914
|
+
const peg$e45 = peg$classExpectation(["\r", ["\u2028", "\u2029"]], false, false, false);
|
|
33915
|
+
const peg$e46 = peg$otherExpectation("Whitespace, then Line Terminator");
|
|
33916
|
+
const peg$e47 = peg$otherExpectation("whitespace");
|
|
33917
|
+
const peg$e48 = peg$classExpectation([" ", " ", "\n", "\r", "\u2028", "\u2029"], false, false, false);
|
|
33022
33918
|
function peg$f0(firstBit, bits) {
|
|
33023
33919
|
return processor.buildBits([firstBit, ...bits]);
|
|
33024
33920
|
}
|
|
@@ -33091,91 +33987,112 @@ function peg$parse2(input, options) {
|
|
|
33091
33987
|
function peg$f23(value) {
|
|
33092
33988
|
return helper.handleCardLineOrDivider(value, 2);
|
|
33093
33989
|
}
|
|
33094
|
-
function peg$f24(
|
|
33990
|
+
function peg$f24(qualifier) {
|
|
33991
|
+
return ["====", qualifier];
|
|
33992
|
+
}
|
|
33993
|
+
function peg$f25() {
|
|
33994
|
+
return ["===="];
|
|
33995
|
+
}
|
|
33996
|
+
function peg$f26(qualifier) {
|
|
33997
|
+
return ["--", qualifier];
|
|
33998
|
+
}
|
|
33999
|
+
function peg$f27() {
|
|
34000
|
+
return ["--"];
|
|
34001
|
+
}
|
|
34002
|
+
function peg$f28(qualifier) {
|
|
34003
|
+
return ["++", qualifier];
|
|
34004
|
+
}
|
|
34005
|
+
function peg$f29() {
|
|
34006
|
+
return ["++"];
|
|
34007
|
+
}
|
|
34008
|
+
function peg$f30(value) {
|
|
33095
34009
|
return helper.handleCardLine(value);
|
|
33096
34010
|
}
|
|
33097
|
-
function peg$
|
|
34011
|
+
function peg$f31(value) {
|
|
33098
34012
|
return helper.handleCardSet(value[1].flat());
|
|
33099
34013
|
}
|
|
33100
|
-
function peg$
|
|
34014
|
+
function peg$f32() {
|
|
33101
34015
|
helper.handleCardSetStart();
|
|
33102
34016
|
}
|
|
33103
|
-
function peg$
|
|
34017
|
+
function peg$f33() {
|
|
33104
34018
|
helper.handleCardSetEnd();
|
|
33105
34019
|
}
|
|
33106
|
-
function peg$
|
|
34020
|
+
function peg$f34(value) {
|
|
33107
34021
|
return helper.handleCards(value);
|
|
33108
34022
|
}
|
|
33109
|
-
function peg$
|
|
34023
|
+
function peg$f35(value) {
|
|
33110
34024
|
return helper.handleCardLineOrDivider(value, 1);
|
|
33111
34025
|
}
|
|
33112
|
-
function peg$
|
|
34026
|
+
function peg$f36(value) {
|
|
33113
34027
|
return helper.handleCardLine(value);
|
|
33114
34028
|
}
|
|
33115
|
-
function peg$
|
|
34029
|
+
function peg$f37(value) {
|
|
34030
|
+
return value;
|
|
34031
|
+
}
|
|
34032
|
+
function peg$f38(value) {
|
|
33116
34033
|
return helper.handleCardContent(value);
|
|
33117
34034
|
}
|
|
33118
|
-
function peg$
|
|
34035
|
+
function peg$f39(value) {
|
|
33119
34036
|
return { type: TypeKey.CardChar, value };
|
|
33120
34037
|
}
|
|
33121
|
-
function peg$
|
|
34038
|
+
function peg$f40(value) {
|
|
33122
34039
|
return helper.handlePropertyTag("id", value);
|
|
33123
34040
|
}
|
|
33124
|
-
function peg$
|
|
34041
|
+
function peg$f41(level, title) {
|
|
33125
34042
|
return helper.handleTag(TypeKey.Title, { level, title });
|
|
33126
34043
|
}
|
|
33127
|
-
function peg$
|
|
34044
|
+
function peg$f42(value) {
|
|
33128
34045
|
return helper.handleTag(TypeKey.Anchor, value);
|
|
33129
34046
|
}
|
|
33130
|
-
function peg$
|
|
34047
|
+
function peg$f43(value) {
|
|
33131
34048
|
return helper.handleTag(TypeKey.Reference, value);
|
|
33132
34049
|
}
|
|
33133
|
-
function peg$
|
|
34050
|
+
function peg$f44(key, value) {
|
|
33134
34051
|
return helper.handlePropertyTag(key, value);
|
|
33135
34052
|
}
|
|
33136
|
-
function peg$
|
|
34053
|
+
function peg$f45(value) {
|
|
33137
34054
|
return helper.handleTag(TypeKey.ItemLead, value);
|
|
33138
34055
|
}
|
|
33139
|
-
function peg$
|
|
34056
|
+
function peg$f46(value) {
|
|
33140
34057
|
return helper.handleTag(TypeKey.Instruction, value);
|
|
33141
34058
|
}
|
|
33142
|
-
function peg$
|
|
34059
|
+
function peg$f47(value) {
|
|
33143
34060
|
return helper.handleTag(TypeKey.Hint, value);
|
|
33144
34061
|
}
|
|
33145
|
-
function peg$
|
|
34062
|
+
function peg$f48(value) {
|
|
33146
34063
|
return helper.handleTag(TypeKey.True, value);
|
|
33147
34064
|
}
|
|
33148
|
-
function peg$
|
|
34065
|
+
function peg$f49(value) {
|
|
33149
34066
|
return helper.handleTag(TypeKey.False, value);
|
|
33150
34067
|
}
|
|
33151
|
-
function peg$
|
|
34068
|
+
function peg$f50(value) {
|
|
33152
34069
|
return helper.handleTag(TypeKey.SampleSolution, value);
|
|
33153
34070
|
}
|
|
33154
|
-
function peg$
|
|
34071
|
+
function peg$f51(value) {
|
|
33155
34072
|
return helper.handleTag(TypeKey.Gap, value);
|
|
33156
34073
|
}
|
|
33157
|
-
function peg$
|
|
34074
|
+
function peg$f52(value) {
|
|
33158
34075
|
return helper.handleTag(TypeKey.Mark, value);
|
|
33159
34076
|
}
|
|
33160
|
-
function peg$
|
|
34077
|
+
function peg$f53(key, value) {
|
|
33161
34078
|
return helper.handleResourceTag(key, value);
|
|
33162
34079
|
}
|
|
33163
|
-
function peg$
|
|
34080
|
+
function peg$f54(value) {
|
|
33164
34081
|
return value;
|
|
33165
34082
|
}
|
|
33166
|
-
function peg$
|
|
34083
|
+
function peg$f55(value) {
|
|
33167
34084
|
return value ? value.trim() : "";
|
|
33168
34085
|
}
|
|
33169
|
-
function peg$
|
|
34086
|
+
function peg$f56(value) {
|
|
33170
34087
|
return value.length;
|
|
33171
34088
|
}
|
|
33172
|
-
function peg$
|
|
34089
|
+
function peg$f57(value) {
|
|
33173
34090
|
return value ? value.trim() : null;
|
|
33174
34091
|
}
|
|
33175
|
-
function peg$
|
|
34092
|
+
function peg$f58(value) {
|
|
33176
34093
|
return value ? value.trim() : "";
|
|
33177
34094
|
}
|
|
33178
|
-
function peg$
|
|
34095
|
+
function peg$f59() {
|
|
33179
34096
|
return true;
|
|
33180
34097
|
}
|
|
33181
34098
|
let peg$currPos = options.peg$currPos | 0;
|
|
@@ -34093,35 +35010,28 @@ function peg$parse2(input, options) {
|
|
|
34093
35010
|
return s0;
|
|
34094
35011
|
}
|
|
34095
35012
|
function peg$parseCardSetStart_V2() {
|
|
34096
|
-
let s0, s1, s2, s3
|
|
35013
|
+
let s0, s1, s2, s3;
|
|
34097
35014
|
s0 = peg$currPos;
|
|
34098
|
-
s1 =
|
|
35015
|
+
s1 = [];
|
|
35016
|
+
s2 = peg$parseWNL();
|
|
35017
|
+
if (s2 === peg$FAILED) {
|
|
35018
|
+
s2 = peg$parseNL();
|
|
35019
|
+
}
|
|
35020
|
+
if (s2 !== peg$FAILED) {
|
|
35021
|
+
while (s2 !== peg$FAILED) {
|
|
35022
|
+
s1.push(s2);
|
|
35023
|
+
s2 = peg$parseWNL();
|
|
35024
|
+
if (s2 === peg$FAILED) {
|
|
35025
|
+
s2 = peg$parseNL();
|
|
35026
|
+
}
|
|
35027
|
+
}
|
|
35028
|
+
} else {
|
|
35029
|
+
s1 = peg$FAILED;
|
|
35030
|
+
}
|
|
34099
35031
|
if (s1 !== peg$FAILED) {
|
|
34100
35032
|
s2 = peg$currPos;
|
|
34101
35033
|
peg$silentFails++;
|
|
34102
|
-
s3 = peg$
|
|
34103
|
-
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
34104
|
-
s4 = peg$c6;
|
|
34105
|
-
peg$currPos += 4;
|
|
34106
|
-
} else {
|
|
34107
|
-
s4 = peg$FAILED;
|
|
34108
|
-
if (peg$silentFails === 0) {
|
|
34109
|
-
peg$fail(peg$e8);
|
|
34110
|
-
}
|
|
34111
|
-
}
|
|
34112
|
-
if (s4 !== peg$FAILED) {
|
|
34113
|
-
s5 = peg$parseWNL();
|
|
34114
|
-
if (s5 !== peg$FAILED) {
|
|
34115
|
-
s4 = [s4, s5];
|
|
34116
|
-
s3 = s4;
|
|
34117
|
-
} else {
|
|
34118
|
-
peg$currPos = s3;
|
|
34119
|
-
s3 = peg$FAILED;
|
|
34120
|
-
}
|
|
34121
|
-
} else {
|
|
34122
|
-
peg$currPos = s3;
|
|
34123
|
-
s3 = peg$FAILED;
|
|
34124
|
-
}
|
|
35034
|
+
s3 = peg$parseCardDividerLookahead_V2();
|
|
34125
35035
|
peg$silentFails--;
|
|
34126
35036
|
if (s3 !== peg$FAILED) {
|
|
34127
35037
|
peg$currPos = s2;
|
|
@@ -34186,39 +35096,147 @@ function peg$parse2(input, options) {
|
|
|
34186
35096
|
return s0;
|
|
34187
35097
|
}
|
|
34188
35098
|
function peg$parseCardLineOrDivider_V2() {
|
|
34189
|
-
let s0, s1
|
|
35099
|
+
let s0, s1;
|
|
35100
|
+
s0 = peg$currPos;
|
|
35101
|
+
s1 = peg$parseCardDividerToken_V2();
|
|
35102
|
+
if (s1 === peg$FAILED) {
|
|
35103
|
+
s1 = peg$parseCardSideDividerToken_V2();
|
|
35104
|
+
if (s1 === peg$FAILED) {
|
|
35105
|
+
s1 = peg$parseCardVariantDividerToken_V2();
|
|
35106
|
+
if (s1 === peg$FAILED) {
|
|
35107
|
+
s1 = peg$parseCardLine_V2();
|
|
35108
|
+
}
|
|
35109
|
+
}
|
|
35110
|
+
}
|
|
35111
|
+
if (s1 !== peg$FAILED) {
|
|
35112
|
+
peg$savedPos = s0;
|
|
35113
|
+
s1 = peg$f23(s1);
|
|
35114
|
+
}
|
|
35115
|
+
s0 = s1;
|
|
35116
|
+
return s0;
|
|
35117
|
+
}
|
|
35118
|
+
function peg$parseCardDividerToken_V2() {
|
|
35119
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
34190
35120
|
s0 = peg$currPos;
|
|
34191
|
-
s1 = peg$currPos;
|
|
34192
35121
|
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
34193
|
-
|
|
35122
|
+
s1 = peg$c6;
|
|
34194
35123
|
peg$currPos += 4;
|
|
34195
35124
|
} else {
|
|
34196
|
-
|
|
35125
|
+
s1 = peg$FAILED;
|
|
34197
35126
|
if (peg$silentFails === 0) {
|
|
34198
35127
|
peg$fail(peg$e8);
|
|
34199
35128
|
}
|
|
34200
35129
|
}
|
|
34201
|
-
if (
|
|
34202
|
-
|
|
34203
|
-
|
|
34204
|
-
|
|
35130
|
+
if (s1 !== peg$FAILED) {
|
|
35131
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35132
|
+
s2 = peg$c10;
|
|
35133
|
+
peg$currPos++;
|
|
35134
|
+
} else {
|
|
35135
|
+
s2 = peg$FAILED;
|
|
35136
|
+
if (peg$silentFails === 0) {
|
|
35137
|
+
peg$fail(peg$e12);
|
|
35138
|
+
}
|
|
34205
35139
|
}
|
|
34206
|
-
if (
|
|
34207
|
-
|
|
34208
|
-
|
|
35140
|
+
if (s2 !== peg$FAILED) {
|
|
35141
|
+
s3 = peg$parseQualifier();
|
|
35142
|
+
if (s3 !== peg$FAILED) {
|
|
35143
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35144
|
+
s4 = peg$c10;
|
|
35145
|
+
peg$currPos++;
|
|
35146
|
+
} else {
|
|
35147
|
+
s4 = peg$FAILED;
|
|
35148
|
+
if (peg$silentFails === 0) {
|
|
35149
|
+
peg$fail(peg$e12);
|
|
35150
|
+
}
|
|
35151
|
+
}
|
|
35152
|
+
if (s4 !== peg$FAILED) {
|
|
35153
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35154
|
+
s5 = peg$c6;
|
|
35155
|
+
peg$currPos += 4;
|
|
35156
|
+
} else {
|
|
35157
|
+
s5 = peg$FAILED;
|
|
35158
|
+
if (peg$silentFails === 0) {
|
|
35159
|
+
peg$fail(peg$e8);
|
|
35160
|
+
}
|
|
35161
|
+
}
|
|
35162
|
+
if (s5 !== peg$FAILED) {
|
|
35163
|
+
s6 = peg$parseWNL();
|
|
35164
|
+
if (s6 === peg$FAILED) {
|
|
35165
|
+
s6 = peg$parseWEOL();
|
|
35166
|
+
}
|
|
35167
|
+
if (s6 !== peg$FAILED) {
|
|
35168
|
+
peg$savedPos = s0;
|
|
35169
|
+
s0 = peg$f24(s3);
|
|
35170
|
+
} else {
|
|
35171
|
+
peg$currPos = s0;
|
|
35172
|
+
s0 = peg$FAILED;
|
|
35173
|
+
}
|
|
35174
|
+
} else {
|
|
35175
|
+
peg$currPos = s0;
|
|
35176
|
+
s0 = peg$FAILED;
|
|
35177
|
+
}
|
|
35178
|
+
} else {
|
|
35179
|
+
peg$currPos = s0;
|
|
35180
|
+
s0 = peg$FAILED;
|
|
35181
|
+
}
|
|
35182
|
+
} else {
|
|
35183
|
+
peg$currPos = s0;
|
|
35184
|
+
s0 = peg$FAILED;
|
|
35185
|
+
}
|
|
35186
|
+
} else {
|
|
35187
|
+
peg$currPos = s0;
|
|
35188
|
+
s0 = peg$FAILED;
|
|
35189
|
+
}
|
|
35190
|
+
} else {
|
|
35191
|
+
peg$currPos = s0;
|
|
35192
|
+
s0 = peg$FAILED;
|
|
35193
|
+
}
|
|
35194
|
+
if (s0 === peg$FAILED) {
|
|
35195
|
+
s0 = peg$currPos;
|
|
35196
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35197
|
+
s1 = peg$c6;
|
|
35198
|
+
peg$currPos += 4;
|
|
34209
35199
|
} else {
|
|
34210
|
-
peg$currPos = s1;
|
|
34211
35200
|
s1 = peg$FAILED;
|
|
35201
|
+
if (peg$silentFails === 0) {
|
|
35202
|
+
peg$fail(peg$e8);
|
|
35203
|
+
}
|
|
34212
35204
|
}
|
|
35205
|
+
if (s1 !== peg$FAILED) {
|
|
35206
|
+
s2 = peg$parseWNL();
|
|
35207
|
+
if (s2 === peg$FAILED) {
|
|
35208
|
+
s2 = peg$parseWEOL();
|
|
35209
|
+
}
|
|
35210
|
+
if (s2 !== peg$FAILED) {
|
|
35211
|
+
peg$savedPos = s0;
|
|
35212
|
+
s0 = peg$f25();
|
|
35213
|
+
} else {
|
|
35214
|
+
peg$currPos = s0;
|
|
35215
|
+
s0 = peg$FAILED;
|
|
35216
|
+
}
|
|
35217
|
+
} else {
|
|
35218
|
+
peg$currPos = s0;
|
|
35219
|
+
s0 = peg$FAILED;
|
|
35220
|
+
}
|
|
35221
|
+
}
|
|
35222
|
+
return s0;
|
|
35223
|
+
}
|
|
35224
|
+
function peg$parseCardSideDividerToken_V2() {
|
|
35225
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
35226
|
+
s0 = peg$currPos;
|
|
35227
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35228
|
+
s1 = peg$c11;
|
|
35229
|
+
peg$currPos += 2;
|
|
34213
35230
|
} else {
|
|
34214
|
-
peg$currPos = s1;
|
|
34215
35231
|
s1 = peg$FAILED;
|
|
35232
|
+
if (peg$silentFails === 0) {
|
|
35233
|
+
peg$fail(peg$e13);
|
|
35234
|
+
}
|
|
34216
35235
|
}
|
|
34217
|
-
if (s1
|
|
34218
|
-
|
|
34219
|
-
if (input.substr(peg$currPos, 2) === peg$c10) {
|
|
35236
|
+
if (s1 !== peg$FAILED) {
|
|
35237
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
34220
35238
|
s2 = peg$c10;
|
|
34221
|
-
peg$currPos
|
|
35239
|
+
peg$currPos++;
|
|
34222
35240
|
} else {
|
|
34223
35241
|
s2 = peg$FAILED;
|
|
34224
35242
|
if (peg$silentFails === 0) {
|
|
@@ -34226,58 +35244,277 @@ function peg$parse2(input, options) {
|
|
|
34226
35244
|
}
|
|
34227
35245
|
}
|
|
34228
35246
|
if (s2 !== peg$FAILED) {
|
|
34229
|
-
s3 = peg$
|
|
34230
|
-
if (s3 === peg$FAILED) {
|
|
34231
|
-
s3 = peg$parseWEOL();
|
|
34232
|
-
}
|
|
35247
|
+
s3 = peg$parseQualifier();
|
|
34233
35248
|
if (s3 !== peg$FAILED) {
|
|
34234
|
-
|
|
34235
|
-
|
|
35249
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35250
|
+
s4 = peg$c10;
|
|
35251
|
+
peg$currPos++;
|
|
35252
|
+
} else {
|
|
35253
|
+
s4 = peg$FAILED;
|
|
35254
|
+
if (peg$silentFails === 0) {
|
|
35255
|
+
peg$fail(peg$e12);
|
|
35256
|
+
}
|
|
35257
|
+
}
|
|
35258
|
+
if (s4 !== peg$FAILED) {
|
|
35259
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35260
|
+
s5 = peg$c11;
|
|
35261
|
+
peg$currPos += 2;
|
|
35262
|
+
} else {
|
|
35263
|
+
s5 = peg$FAILED;
|
|
35264
|
+
if (peg$silentFails === 0) {
|
|
35265
|
+
peg$fail(peg$e13);
|
|
35266
|
+
}
|
|
35267
|
+
}
|
|
35268
|
+
if (s5 !== peg$FAILED) {
|
|
35269
|
+
s6 = peg$parseWNL();
|
|
35270
|
+
if (s6 === peg$FAILED) {
|
|
35271
|
+
s6 = peg$parseWEOL();
|
|
35272
|
+
}
|
|
35273
|
+
if (s6 !== peg$FAILED) {
|
|
35274
|
+
peg$savedPos = s0;
|
|
35275
|
+
s0 = peg$f26(s3);
|
|
35276
|
+
} else {
|
|
35277
|
+
peg$currPos = s0;
|
|
35278
|
+
s0 = peg$FAILED;
|
|
35279
|
+
}
|
|
35280
|
+
} else {
|
|
35281
|
+
peg$currPos = s0;
|
|
35282
|
+
s0 = peg$FAILED;
|
|
35283
|
+
}
|
|
35284
|
+
} else {
|
|
35285
|
+
peg$currPos = s0;
|
|
35286
|
+
s0 = peg$FAILED;
|
|
35287
|
+
}
|
|
34236
35288
|
} else {
|
|
34237
|
-
peg$currPos =
|
|
34238
|
-
|
|
35289
|
+
peg$currPos = s0;
|
|
35290
|
+
s0 = peg$FAILED;
|
|
34239
35291
|
}
|
|
34240
35292
|
} else {
|
|
34241
|
-
peg$currPos =
|
|
35293
|
+
peg$currPos = s0;
|
|
35294
|
+
s0 = peg$FAILED;
|
|
35295
|
+
}
|
|
35296
|
+
} else {
|
|
35297
|
+
peg$currPos = s0;
|
|
35298
|
+
s0 = peg$FAILED;
|
|
35299
|
+
}
|
|
35300
|
+
if (s0 === peg$FAILED) {
|
|
35301
|
+
s0 = peg$currPos;
|
|
35302
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35303
|
+
s1 = peg$c11;
|
|
35304
|
+
peg$currPos += 2;
|
|
35305
|
+
} else {
|
|
34242
35306
|
s1 = peg$FAILED;
|
|
35307
|
+
if (peg$silentFails === 0) {
|
|
35308
|
+
peg$fail(peg$e13);
|
|
35309
|
+
}
|
|
34243
35310
|
}
|
|
34244
|
-
if (s1
|
|
34245
|
-
|
|
34246
|
-
if (
|
|
34247
|
-
s2 = peg$
|
|
34248
|
-
peg$currPos += 2;
|
|
34249
|
-
} else {
|
|
34250
|
-
s2 = peg$FAILED;
|
|
34251
|
-
if (peg$silentFails === 0) {
|
|
34252
|
-
peg$fail(peg$e13);
|
|
34253
|
-
}
|
|
35311
|
+
if (s1 !== peg$FAILED) {
|
|
35312
|
+
s2 = peg$parseWNL();
|
|
35313
|
+
if (s2 === peg$FAILED) {
|
|
35314
|
+
s2 = peg$parseWEOL();
|
|
34254
35315
|
}
|
|
34255
35316
|
if (s2 !== peg$FAILED) {
|
|
34256
|
-
|
|
34257
|
-
|
|
34258
|
-
|
|
35317
|
+
peg$savedPos = s0;
|
|
35318
|
+
s0 = peg$f27();
|
|
35319
|
+
} else {
|
|
35320
|
+
peg$currPos = s0;
|
|
35321
|
+
s0 = peg$FAILED;
|
|
35322
|
+
}
|
|
35323
|
+
} else {
|
|
35324
|
+
peg$currPos = s0;
|
|
35325
|
+
s0 = peg$FAILED;
|
|
35326
|
+
}
|
|
35327
|
+
}
|
|
35328
|
+
return s0;
|
|
35329
|
+
}
|
|
35330
|
+
function peg$parseCardVariantDividerToken_V2() {
|
|
35331
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
35332
|
+
s0 = peg$currPos;
|
|
35333
|
+
if (input.substr(peg$currPos, 2) === peg$c12) {
|
|
35334
|
+
s1 = peg$c12;
|
|
35335
|
+
peg$currPos += 2;
|
|
35336
|
+
} else {
|
|
35337
|
+
s1 = peg$FAILED;
|
|
35338
|
+
if (peg$silentFails === 0) {
|
|
35339
|
+
peg$fail(peg$e14);
|
|
35340
|
+
}
|
|
35341
|
+
}
|
|
35342
|
+
if (s1 !== peg$FAILED) {
|
|
35343
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35344
|
+
s2 = peg$c10;
|
|
35345
|
+
peg$currPos++;
|
|
35346
|
+
} else {
|
|
35347
|
+
s2 = peg$FAILED;
|
|
35348
|
+
if (peg$silentFails === 0) {
|
|
35349
|
+
peg$fail(peg$e12);
|
|
35350
|
+
}
|
|
35351
|
+
}
|
|
35352
|
+
if (s2 !== peg$FAILED) {
|
|
35353
|
+
s3 = peg$parseQualifier();
|
|
35354
|
+
if (s3 !== peg$FAILED) {
|
|
35355
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35356
|
+
s4 = peg$c10;
|
|
35357
|
+
peg$currPos++;
|
|
35358
|
+
} else {
|
|
35359
|
+
s4 = peg$FAILED;
|
|
35360
|
+
if (peg$silentFails === 0) {
|
|
35361
|
+
peg$fail(peg$e12);
|
|
35362
|
+
}
|
|
34259
35363
|
}
|
|
34260
|
-
if (
|
|
34261
|
-
|
|
34262
|
-
|
|
35364
|
+
if (s4 !== peg$FAILED) {
|
|
35365
|
+
if (input.substr(peg$currPos, 2) === peg$c12) {
|
|
35366
|
+
s5 = peg$c12;
|
|
35367
|
+
peg$currPos += 2;
|
|
35368
|
+
} else {
|
|
35369
|
+
s5 = peg$FAILED;
|
|
35370
|
+
if (peg$silentFails === 0) {
|
|
35371
|
+
peg$fail(peg$e14);
|
|
35372
|
+
}
|
|
35373
|
+
}
|
|
35374
|
+
if (s5 !== peg$FAILED) {
|
|
35375
|
+
s6 = peg$parseWNL();
|
|
35376
|
+
if (s6 === peg$FAILED) {
|
|
35377
|
+
s6 = peg$parseWEOL();
|
|
35378
|
+
}
|
|
35379
|
+
if (s6 !== peg$FAILED) {
|
|
35380
|
+
peg$savedPos = s0;
|
|
35381
|
+
s0 = peg$f28(s3);
|
|
35382
|
+
} else {
|
|
35383
|
+
peg$currPos = s0;
|
|
35384
|
+
s0 = peg$FAILED;
|
|
35385
|
+
}
|
|
35386
|
+
} else {
|
|
35387
|
+
peg$currPos = s0;
|
|
35388
|
+
s0 = peg$FAILED;
|
|
35389
|
+
}
|
|
34263
35390
|
} else {
|
|
34264
|
-
peg$currPos =
|
|
34265
|
-
|
|
35391
|
+
peg$currPos = s0;
|
|
35392
|
+
s0 = peg$FAILED;
|
|
34266
35393
|
}
|
|
34267
35394
|
} else {
|
|
34268
|
-
peg$currPos =
|
|
34269
|
-
|
|
35395
|
+
peg$currPos = s0;
|
|
35396
|
+
s0 = peg$FAILED;
|
|
34270
35397
|
}
|
|
34271
|
-
|
|
34272
|
-
|
|
35398
|
+
} else {
|
|
35399
|
+
peg$currPos = s0;
|
|
35400
|
+
s0 = peg$FAILED;
|
|
35401
|
+
}
|
|
35402
|
+
} else {
|
|
35403
|
+
peg$currPos = s0;
|
|
35404
|
+
s0 = peg$FAILED;
|
|
35405
|
+
}
|
|
35406
|
+
if (s0 === peg$FAILED) {
|
|
35407
|
+
s0 = peg$currPos;
|
|
35408
|
+
if (input.substr(peg$currPos, 2) === peg$c12) {
|
|
35409
|
+
s1 = peg$c12;
|
|
35410
|
+
peg$currPos += 2;
|
|
35411
|
+
} else {
|
|
35412
|
+
s1 = peg$FAILED;
|
|
35413
|
+
if (peg$silentFails === 0) {
|
|
35414
|
+
peg$fail(peg$e14);
|
|
34273
35415
|
}
|
|
34274
35416
|
}
|
|
35417
|
+
if (s1 !== peg$FAILED) {
|
|
35418
|
+
s2 = peg$parseWNL();
|
|
35419
|
+
if (s2 === peg$FAILED) {
|
|
35420
|
+
s2 = peg$parseWEOL();
|
|
35421
|
+
}
|
|
35422
|
+
if (s2 !== peg$FAILED) {
|
|
35423
|
+
peg$savedPos = s0;
|
|
35424
|
+
s0 = peg$f29();
|
|
35425
|
+
} else {
|
|
35426
|
+
peg$currPos = s0;
|
|
35427
|
+
s0 = peg$FAILED;
|
|
35428
|
+
}
|
|
35429
|
+
} else {
|
|
35430
|
+
peg$currPos = s0;
|
|
35431
|
+
s0 = peg$FAILED;
|
|
35432
|
+
}
|
|
35433
|
+
}
|
|
35434
|
+
return s0;
|
|
35435
|
+
}
|
|
35436
|
+
function peg$parseCardDividerLookahead_V2() {
|
|
35437
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
35438
|
+
s0 = peg$currPos;
|
|
35439
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35440
|
+
s1 = peg$c6;
|
|
35441
|
+
peg$currPos += 4;
|
|
35442
|
+
} else {
|
|
35443
|
+
s1 = peg$FAILED;
|
|
35444
|
+
if (peg$silentFails === 0) {
|
|
35445
|
+
peg$fail(peg$e8);
|
|
35446
|
+
}
|
|
34275
35447
|
}
|
|
34276
35448
|
if (s1 !== peg$FAILED) {
|
|
34277
|
-
|
|
34278
|
-
|
|
35449
|
+
s2 = peg$currPos;
|
|
35450
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35451
|
+
s3 = peg$c10;
|
|
35452
|
+
peg$currPos++;
|
|
35453
|
+
} else {
|
|
35454
|
+
s3 = peg$FAILED;
|
|
35455
|
+
if (peg$silentFails === 0) {
|
|
35456
|
+
peg$fail(peg$e12);
|
|
35457
|
+
}
|
|
35458
|
+
}
|
|
35459
|
+
if (s3 !== peg$FAILED) {
|
|
35460
|
+
s4 = peg$parseQualifier();
|
|
35461
|
+
if (s4 !== peg$FAILED) {
|
|
35462
|
+
if (input.charCodeAt(peg$currPos) === 32) {
|
|
35463
|
+
s5 = peg$c10;
|
|
35464
|
+
peg$currPos++;
|
|
35465
|
+
} else {
|
|
35466
|
+
s5 = peg$FAILED;
|
|
35467
|
+
if (peg$silentFails === 0) {
|
|
35468
|
+
peg$fail(peg$e12);
|
|
35469
|
+
}
|
|
35470
|
+
}
|
|
35471
|
+
if (s5 !== peg$FAILED) {
|
|
35472
|
+
if (input.substr(peg$currPos, 4) === peg$c6) {
|
|
35473
|
+
s6 = peg$c6;
|
|
35474
|
+
peg$currPos += 4;
|
|
35475
|
+
} else {
|
|
35476
|
+
s6 = peg$FAILED;
|
|
35477
|
+
if (peg$silentFails === 0) {
|
|
35478
|
+
peg$fail(peg$e8);
|
|
35479
|
+
}
|
|
35480
|
+
}
|
|
35481
|
+
if (s6 !== peg$FAILED) {
|
|
35482
|
+
s3 = [s3, s4, s5, s6];
|
|
35483
|
+
s2 = s3;
|
|
35484
|
+
} else {
|
|
35485
|
+
peg$currPos = s2;
|
|
35486
|
+
s2 = peg$FAILED;
|
|
35487
|
+
}
|
|
35488
|
+
} else {
|
|
35489
|
+
peg$currPos = s2;
|
|
35490
|
+
s2 = peg$FAILED;
|
|
35491
|
+
}
|
|
35492
|
+
} else {
|
|
35493
|
+
peg$currPos = s2;
|
|
35494
|
+
s2 = peg$FAILED;
|
|
35495
|
+
}
|
|
35496
|
+
} else {
|
|
35497
|
+
peg$currPos = s2;
|
|
35498
|
+
s2 = peg$FAILED;
|
|
35499
|
+
}
|
|
35500
|
+
if (s2 === peg$FAILED) {
|
|
35501
|
+
s2 = null;
|
|
35502
|
+
}
|
|
35503
|
+
s3 = peg$parseWNL();
|
|
35504
|
+
if (s3 === peg$FAILED) {
|
|
35505
|
+
s3 = peg$parseWEOL();
|
|
35506
|
+
}
|
|
35507
|
+
if (s3 !== peg$FAILED) {
|
|
35508
|
+
s1 = [s1, s2, s3];
|
|
35509
|
+
s0 = s1;
|
|
35510
|
+
} else {
|
|
35511
|
+
peg$currPos = s0;
|
|
35512
|
+
s0 = peg$FAILED;
|
|
35513
|
+
}
|
|
35514
|
+
} else {
|
|
35515
|
+
peg$currPos = s0;
|
|
35516
|
+
s0 = peg$FAILED;
|
|
34279
35517
|
}
|
|
34280
|
-
s0 = s1;
|
|
34281
35518
|
return s0;
|
|
34282
35519
|
}
|
|
34283
35520
|
function peg$parseCardLine_V2() {
|
|
@@ -34352,7 +35589,7 @@ function peg$parse2(input, options) {
|
|
|
34352
35589
|
}
|
|
34353
35590
|
if (s2 !== peg$FAILED) {
|
|
34354
35591
|
peg$savedPos = s0;
|
|
34355
|
-
s0 = peg$
|
|
35592
|
+
s0 = peg$f30(s2);
|
|
34356
35593
|
} else {
|
|
34357
35594
|
peg$currPos = s0;
|
|
34358
35595
|
s0 = peg$FAILED;
|
|
@@ -34389,7 +35626,7 @@ function peg$parse2(input, options) {
|
|
|
34389
35626
|
}
|
|
34390
35627
|
if (s1 !== peg$FAILED) {
|
|
34391
35628
|
peg$savedPos = s0;
|
|
34392
|
-
s1 = peg$
|
|
35629
|
+
s1 = peg$f31(s1);
|
|
34393
35630
|
}
|
|
34394
35631
|
s0 = s1;
|
|
34395
35632
|
return s0;
|
|
@@ -34397,18 +35634,33 @@ function peg$parse2(input, options) {
|
|
|
34397
35634
|
function peg$parseCardSetStart_V1() {
|
|
34398
35635
|
let s0, s1, s2, s3, s4, s5;
|
|
34399
35636
|
s0 = peg$currPos;
|
|
34400
|
-
s1 =
|
|
35637
|
+
s1 = [];
|
|
35638
|
+
s2 = peg$parseWNL();
|
|
35639
|
+
if (s2 === peg$FAILED) {
|
|
35640
|
+
s2 = peg$parseNL();
|
|
35641
|
+
}
|
|
35642
|
+
if (s2 !== peg$FAILED) {
|
|
35643
|
+
while (s2 !== peg$FAILED) {
|
|
35644
|
+
s1.push(s2);
|
|
35645
|
+
s2 = peg$parseWNL();
|
|
35646
|
+
if (s2 === peg$FAILED) {
|
|
35647
|
+
s2 = peg$parseNL();
|
|
35648
|
+
}
|
|
35649
|
+
}
|
|
35650
|
+
} else {
|
|
35651
|
+
s1 = peg$FAILED;
|
|
35652
|
+
}
|
|
34401
35653
|
if (s1 !== peg$FAILED) {
|
|
34402
35654
|
s2 = peg$currPos;
|
|
34403
35655
|
peg$silentFails++;
|
|
34404
35656
|
s3 = peg$currPos;
|
|
34405
|
-
if (input.substr(peg$currPos, 3) === peg$
|
|
34406
|
-
s4 = peg$
|
|
35657
|
+
if (input.substr(peg$currPos, 3) === peg$c13) {
|
|
35658
|
+
s4 = peg$c13;
|
|
34407
35659
|
peg$currPos += 3;
|
|
34408
35660
|
} else {
|
|
34409
35661
|
s4 = peg$FAILED;
|
|
34410
35662
|
if (peg$silentFails === 0) {
|
|
34411
|
-
peg$fail(peg$
|
|
35663
|
+
peg$fail(peg$e15);
|
|
34412
35664
|
}
|
|
34413
35665
|
}
|
|
34414
35666
|
if (s4 !== peg$FAILED) {
|
|
@@ -34433,7 +35685,7 @@ function peg$parse2(input, options) {
|
|
|
34433
35685
|
}
|
|
34434
35686
|
if (s2 !== peg$FAILED) {
|
|
34435
35687
|
peg$savedPos = s0;
|
|
34436
|
-
s0 = peg$
|
|
35688
|
+
s0 = peg$f32();
|
|
34437
35689
|
} else {
|
|
34438
35690
|
peg$currPos = s0;
|
|
34439
35691
|
s0 = peg$FAILED;
|
|
@@ -34471,7 +35723,7 @@ function peg$parse2(input, options) {
|
|
|
34471
35723
|
}
|
|
34472
35724
|
if (s1 !== peg$FAILED) {
|
|
34473
35725
|
peg$savedPos = s0;
|
|
34474
|
-
s1 = peg$
|
|
35726
|
+
s1 = peg$f33();
|
|
34475
35727
|
}
|
|
34476
35728
|
s0 = s1;
|
|
34477
35729
|
return s0;
|
|
@@ -34482,7 +35734,7 @@ function peg$parse2(input, options) {
|
|
|
34482
35734
|
s1 = peg$parseCardLineOrDivider_V1();
|
|
34483
35735
|
if (s1 !== peg$FAILED) {
|
|
34484
35736
|
peg$savedPos = s0;
|
|
34485
|
-
s1 = peg$
|
|
35737
|
+
s1 = peg$f34(s1);
|
|
34486
35738
|
}
|
|
34487
35739
|
s0 = s1;
|
|
34488
35740
|
return s0;
|
|
@@ -34491,13 +35743,13 @@ function peg$parse2(input, options) {
|
|
|
34491
35743
|
let s0, s1, s2, s3;
|
|
34492
35744
|
s0 = peg$currPos;
|
|
34493
35745
|
s1 = peg$currPos;
|
|
34494
|
-
if (input.substr(peg$currPos, 3) === peg$
|
|
34495
|
-
s2 = peg$
|
|
35746
|
+
if (input.substr(peg$currPos, 3) === peg$c13) {
|
|
35747
|
+
s2 = peg$c13;
|
|
34496
35748
|
peg$currPos += 3;
|
|
34497
35749
|
} else {
|
|
34498
35750
|
s2 = peg$FAILED;
|
|
34499
35751
|
if (peg$silentFails === 0) {
|
|
34500
|
-
peg$fail(peg$
|
|
35752
|
+
peg$fail(peg$e15);
|
|
34501
35753
|
}
|
|
34502
35754
|
}
|
|
34503
35755
|
if (s2 !== peg$FAILED) {
|
|
@@ -34518,13 +35770,13 @@ function peg$parse2(input, options) {
|
|
|
34518
35770
|
}
|
|
34519
35771
|
if (s1 === peg$FAILED) {
|
|
34520
35772
|
s1 = peg$currPos;
|
|
34521
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34522
|
-
s2 = peg$
|
|
35773
|
+
if (input.substr(peg$currPos, 2) === peg$c14) {
|
|
35774
|
+
s2 = peg$c14;
|
|
34523
35775
|
peg$currPos += 2;
|
|
34524
35776
|
} else {
|
|
34525
35777
|
s2 = peg$FAILED;
|
|
34526
35778
|
if (peg$silentFails === 0) {
|
|
34527
|
-
peg$fail(peg$
|
|
35779
|
+
peg$fail(peg$e16);
|
|
34528
35780
|
}
|
|
34529
35781
|
}
|
|
34530
35782
|
if (s2 !== peg$FAILED) {
|
|
@@ -34545,13 +35797,13 @@ function peg$parse2(input, options) {
|
|
|
34545
35797
|
}
|
|
34546
35798
|
if (s1 === peg$FAILED) {
|
|
34547
35799
|
s1 = peg$currPos;
|
|
34548
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34549
|
-
s2 = peg$
|
|
35800
|
+
if (input.substr(peg$currPos, 2) === peg$c11) {
|
|
35801
|
+
s2 = peg$c11;
|
|
34550
35802
|
peg$currPos += 2;
|
|
34551
35803
|
} else {
|
|
34552
35804
|
s2 = peg$FAILED;
|
|
34553
35805
|
if (peg$silentFails === 0) {
|
|
34554
|
-
peg$fail(peg$
|
|
35806
|
+
peg$fail(peg$e13);
|
|
34555
35807
|
}
|
|
34556
35808
|
}
|
|
34557
35809
|
if (s2 !== peg$FAILED) {
|
|
@@ -34577,7 +35829,7 @@ function peg$parse2(input, options) {
|
|
|
34577
35829
|
}
|
|
34578
35830
|
if (s1 !== peg$FAILED) {
|
|
34579
35831
|
peg$savedPos = s0;
|
|
34580
|
-
s1 = peg$
|
|
35832
|
+
s1 = peg$f35(s1);
|
|
34581
35833
|
}
|
|
34582
35834
|
s0 = s1;
|
|
34583
35835
|
return s0;
|
|
@@ -34654,7 +35906,7 @@ function peg$parse2(input, options) {
|
|
|
34654
35906
|
}
|
|
34655
35907
|
if (s2 !== peg$FAILED) {
|
|
34656
35908
|
peg$savedPos = s0;
|
|
34657
|
-
s0 = peg$
|
|
35909
|
+
s0 = peg$f36(s2);
|
|
34658
35910
|
} else {
|
|
34659
35911
|
peg$currPos = s0;
|
|
34660
35912
|
s0 = peg$FAILED;
|
|
@@ -34665,6 +35917,102 @@ function peg$parse2(input, options) {
|
|
|
34665
35917
|
}
|
|
34666
35918
|
return s0;
|
|
34667
35919
|
}
|
|
35920
|
+
function peg$parseQualifier() {
|
|
35921
|
+
let s0, s1, s2;
|
|
35922
|
+
s0 = peg$currPos;
|
|
35923
|
+
s1 = peg$currPos;
|
|
35924
|
+
peg$silentFails++;
|
|
35925
|
+
if (input.substr(peg$currPos, 6) === peg$c9) {
|
|
35926
|
+
s2 = peg$c9;
|
|
35927
|
+
peg$currPos += 6;
|
|
35928
|
+
} else {
|
|
35929
|
+
s2 = peg$FAILED;
|
|
35930
|
+
if (peg$silentFails === 0) {
|
|
35931
|
+
peg$fail(peg$e11);
|
|
35932
|
+
}
|
|
35933
|
+
}
|
|
35934
|
+
if (s2 === peg$FAILED) {
|
|
35935
|
+
if (input.substr(peg$currPos, 4) === peg$c7) {
|
|
35936
|
+
s2 = peg$c7;
|
|
35937
|
+
peg$currPos += 4;
|
|
35938
|
+
} else {
|
|
35939
|
+
s2 = peg$FAILED;
|
|
35940
|
+
if (peg$silentFails === 0) {
|
|
35941
|
+
peg$fail(peg$e9);
|
|
35942
|
+
}
|
|
35943
|
+
}
|
|
35944
|
+
}
|
|
35945
|
+
peg$silentFails--;
|
|
35946
|
+
if (s2 === peg$FAILED) {
|
|
35947
|
+
s1 = void 0;
|
|
35948
|
+
} else {
|
|
35949
|
+
peg$currPos = s1;
|
|
35950
|
+
s1 = peg$FAILED;
|
|
35951
|
+
}
|
|
35952
|
+
if (s1 !== peg$FAILED) {
|
|
35953
|
+
s2 = peg$parseQualifierName();
|
|
35954
|
+
if (s2 !== peg$FAILED) {
|
|
35955
|
+
peg$savedPos = s0;
|
|
35956
|
+
s0 = peg$f37(s2);
|
|
35957
|
+
} else {
|
|
35958
|
+
peg$currPos = s0;
|
|
35959
|
+
s0 = peg$FAILED;
|
|
35960
|
+
}
|
|
35961
|
+
} else {
|
|
35962
|
+
peg$currPos = s0;
|
|
35963
|
+
s0 = peg$FAILED;
|
|
35964
|
+
}
|
|
35965
|
+
return s0;
|
|
35966
|
+
}
|
|
35967
|
+
function peg$parseQualifierName() {
|
|
35968
|
+
let s0, s1, s2, s3, s4;
|
|
35969
|
+
s0 = peg$currPos;
|
|
35970
|
+
s1 = peg$currPos;
|
|
35971
|
+
s2 = input.charAt(peg$currPos);
|
|
35972
|
+
if (peg$r1.test(s2)) {
|
|
35973
|
+
peg$currPos++;
|
|
35974
|
+
} else {
|
|
35975
|
+
s2 = peg$FAILED;
|
|
35976
|
+
if (peg$silentFails === 0) {
|
|
35977
|
+
peg$fail(peg$e17);
|
|
35978
|
+
}
|
|
35979
|
+
}
|
|
35980
|
+
if (s2 !== peg$FAILED) {
|
|
35981
|
+
s3 = [];
|
|
35982
|
+
s4 = input.charAt(peg$currPos);
|
|
35983
|
+
if (peg$r2.test(s4)) {
|
|
35984
|
+
peg$currPos++;
|
|
35985
|
+
} else {
|
|
35986
|
+
s4 = peg$FAILED;
|
|
35987
|
+
if (peg$silentFails === 0) {
|
|
35988
|
+
peg$fail(peg$e18);
|
|
35989
|
+
}
|
|
35990
|
+
}
|
|
35991
|
+
while (s4 !== peg$FAILED) {
|
|
35992
|
+
s3.push(s4);
|
|
35993
|
+
s4 = input.charAt(peg$currPos);
|
|
35994
|
+
if (peg$r2.test(s4)) {
|
|
35995
|
+
peg$currPos++;
|
|
35996
|
+
} else {
|
|
35997
|
+
s4 = peg$FAILED;
|
|
35998
|
+
if (peg$silentFails === 0) {
|
|
35999
|
+
peg$fail(peg$e18);
|
|
36000
|
+
}
|
|
36001
|
+
}
|
|
36002
|
+
}
|
|
36003
|
+
s2 = [s2, s3];
|
|
36004
|
+
s1 = s2;
|
|
36005
|
+
} else {
|
|
36006
|
+
peg$currPos = s1;
|
|
36007
|
+
s1 = peg$FAILED;
|
|
36008
|
+
}
|
|
36009
|
+
if (s1 !== peg$FAILED) {
|
|
36010
|
+
s0 = input.substring(s0, peg$currPos);
|
|
36011
|
+
} else {
|
|
36012
|
+
s0 = s1;
|
|
36013
|
+
}
|
|
36014
|
+
return s0;
|
|
36015
|
+
}
|
|
34668
36016
|
function peg$parsecardContent() {
|
|
34669
36017
|
let s0, s1, s2;
|
|
34670
36018
|
s0 = peg$currPos;
|
|
@@ -34681,7 +36029,7 @@ function peg$parse2(input, options) {
|
|
|
34681
36029
|
}
|
|
34682
36030
|
}
|
|
34683
36031
|
peg$savedPos = s0;
|
|
34684
|
-
s1 = peg$
|
|
36032
|
+
s1 = peg$f38(s1);
|
|
34685
36033
|
s0 = s1;
|
|
34686
36034
|
return s0;
|
|
34687
36035
|
}
|
|
@@ -34699,7 +36047,7 @@ function peg$parse2(input, options) {
|
|
|
34699
36047
|
}
|
|
34700
36048
|
if (s1 !== peg$FAILED) {
|
|
34701
36049
|
peg$savedPos = s0;
|
|
34702
|
-
s1 = peg$
|
|
36050
|
+
s1 = peg$f39(s1);
|
|
34703
36051
|
}
|
|
34704
36052
|
s0 = s1;
|
|
34705
36053
|
return s0;
|
|
@@ -34707,13 +36055,13 @@ function peg$parse2(input, options) {
|
|
|
34707
36055
|
function peg$parseIDTag() {
|
|
34708
36056
|
let s0, s1, s2, s3;
|
|
34709
36057
|
s0 = peg$currPos;
|
|
34710
|
-
if (input.substr(peg$currPos, 4) === peg$
|
|
34711
|
-
s1 = peg$
|
|
36058
|
+
if (input.substr(peg$currPos, 4) === peg$c15) {
|
|
36059
|
+
s1 = peg$c15;
|
|
34712
36060
|
peg$currPos += 4;
|
|
34713
36061
|
} else {
|
|
34714
36062
|
s1 = peg$FAILED;
|
|
34715
36063
|
if (peg$silentFails === 0) {
|
|
34716
|
-
peg$fail(peg$
|
|
36064
|
+
peg$fail(peg$e19);
|
|
34717
36065
|
}
|
|
34718
36066
|
}
|
|
34719
36067
|
if (s1 !== peg$FAILED) {
|
|
@@ -34722,7 +36070,7 @@ function peg$parse2(input, options) {
|
|
|
34722
36070
|
s3 = peg$parseTag_Close();
|
|
34723
36071
|
if (s3 !== peg$FAILED) {
|
|
34724
36072
|
peg$savedPos = s0;
|
|
34725
|
-
s0 = peg$
|
|
36073
|
+
s0 = peg$f40(s2);
|
|
34726
36074
|
} else {
|
|
34727
36075
|
peg$currPos = s0;
|
|
34728
36076
|
s0 = peg$FAILED;
|
|
@@ -34752,24 +36100,24 @@ function peg$parse2(input, options) {
|
|
|
34752
36100
|
if (s1 !== peg$FAILED) {
|
|
34753
36101
|
s2 = [];
|
|
34754
36102
|
if (input.charCodeAt(peg$currPos) === 35) {
|
|
34755
|
-
s3 = peg$
|
|
36103
|
+
s3 = peg$c16;
|
|
34756
36104
|
peg$currPos++;
|
|
34757
36105
|
} else {
|
|
34758
36106
|
s3 = peg$FAILED;
|
|
34759
36107
|
if (peg$silentFails === 0) {
|
|
34760
|
-
peg$fail(peg$
|
|
36108
|
+
peg$fail(peg$e20);
|
|
34761
36109
|
}
|
|
34762
36110
|
}
|
|
34763
36111
|
if (s3 !== peg$FAILED) {
|
|
34764
36112
|
while (s3 !== peg$FAILED) {
|
|
34765
36113
|
s2.push(s3);
|
|
34766
36114
|
if (input.charCodeAt(peg$currPos) === 35) {
|
|
34767
|
-
s3 = peg$
|
|
36115
|
+
s3 = peg$c16;
|
|
34768
36116
|
peg$currPos++;
|
|
34769
36117
|
} else {
|
|
34770
36118
|
s3 = peg$FAILED;
|
|
34771
36119
|
if (peg$silentFails === 0) {
|
|
34772
|
-
peg$fail(peg$
|
|
36120
|
+
peg$fail(peg$e20);
|
|
34773
36121
|
}
|
|
34774
36122
|
}
|
|
34775
36123
|
}
|
|
@@ -34781,7 +36129,7 @@ function peg$parse2(input, options) {
|
|
|
34781
36129
|
s4 = peg$parseTag_CloseOrEOF();
|
|
34782
36130
|
if (s4 !== peg$FAILED) {
|
|
34783
36131
|
peg$savedPos = s0;
|
|
34784
|
-
s0 = peg$
|
|
36132
|
+
s0 = peg$f41(s2, s3);
|
|
34785
36133
|
} else {
|
|
34786
36134
|
peg$currPos = s0;
|
|
34787
36135
|
s0 = peg$FAILED;
|
|
@@ -34799,13 +36147,13 @@ function peg$parse2(input, options) {
|
|
|
34799
36147
|
function peg$parseAnchorTag() {
|
|
34800
36148
|
let s0, s1, s2, s3;
|
|
34801
36149
|
s0 = peg$currPos;
|
|
34802
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34803
|
-
s1 = peg$
|
|
36150
|
+
if (input.substr(peg$currPos, 2) === peg$c17) {
|
|
36151
|
+
s1 = peg$c17;
|
|
34804
36152
|
peg$currPos += 2;
|
|
34805
36153
|
} else {
|
|
34806
36154
|
s1 = peg$FAILED;
|
|
34807
36155
|
if (peg$silentFails === 0) {
|
|
34808
|
-
peg$fail(peg$
|
|
36156
|
+
peg$fail(peg$e21);
|
|
34809
36157
|
}
|
|
34810
36158
|
}
|
|
34811
36159
|
if (s1 !== peg$FAILED) {
|
|
@@ -34813,7 +36161,7 @@ function peg$parse2(input, options) {
|
|
|
34813
36161
|
s3 = peg$parseTag_CloseOrEOF();
|
|
34814
36162
|
if (s3 !== peg$FAILED) {
|
|
34815
36163
|
peg$savedPos = s0;
|
|
34816
|
-
s0 = peg$
|
|
36164
|
+
s0 = peg$f42(s2);
|
|
34817
36165
|
} else {
|
|
34818
36166
|
peg$currPos = s0;
|
|
34819
36167
|
s0 = peg$FAILED;
|
|
@@ -34827,13 +36175,13 @@ function peg$parse2(input, options) {
|
|
|
34827
36175
|
function peg$parseReferenceTag() {
|
|
34828
36176
|
let s0, s1, s2, s3;
|
|
34829
36177
|
s0 = peg$currPos;
|
|
34830
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34831
|
-
s1 = peg$
|
|
36178
|
+
if (input.substr(peg$currPos, 2) === peg$c18) {
|
|
36179
|
+
s1 = peg$c18;
|
|
34832
36180
|
peg$currPos += 2;
|
|
34833
36181
|
} else {
|
|
34834
36182
|
s1 = peg$FAILED;
|
|
34835
36183
|
if (peg$silentFails === 0) {
|
|
34836
|
-
peg$fail(peg$
|
|
36184
|
+
peg$fail(peg$e22);
|
|
34837
36185
|
}
|
|
34838
36186
|
}
|
|
34839
36187
|
if (s1 !== peg$FAILED) {
|
|
@@ -34841,7 +36189,7 @@ function peg$parse2(input, options) {
|
|
|
34841
36189
|
s3 = peg$parseTag_CloseOrEOF();
|
|
34842
36190
|
if (s3 !== peg$FAILED) {
|
|
34843
36191
|
peg$savedPos = s0;
|
|
34844
|
-
s0 = peg$
|
|
36192
|
+
s0 = peg$f43(s2);
|
|
34845
36193
|
} else {
|
|
34846
36194
|
peg$currPos = s0;
|
|
34847
36195
|
s0 = peg$FAILED;
|
|
@@ -34855,13 +36203,13 @@ function peg$parse2(input, options) {
|
|
|
34855
36203
|
function peg$parsePropertyTag() {
|
|
34856
36204
|
let s0, s1, s2, s3, s4;
|
|
34857
36205
|
s0 = peg$currPos;
|
|
34858
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34859
|
-
s1 = peg$
|
|
36206
|
+
if (input.substr(peg$currPos, 2) === peg$c19) {
|
|
36207
|
+
s1 = peg$c19;
|
|
34860
36208
|
peg$currPos += 2;
|
|
34861
36209
|
} else {
|
|
34862
36210
|
s1 = peg$FAILED;
|
|
34863
36211
|
if (peg$silentFails === 0) {
|
|
34864
|
-
peg$fail(peg$
|
|
36212
|
+
peg$fail(peg$e23);
|
|
34865
36213
|
}
|
|
34866
36214
|
}
|
|
34867
36215
|
if (s1 !== peg$FAILED) {
|
|
@@ -34872,7 +36220,7 @@ function peg$parse2(input, options) {
|
|
|
34872
36220
|
s4 = peg$parseTag_CloseOrEOF();
|
|
34873
36221
|
if (s4 !== peg$FAILED) {
|
|
34874
36222
|
peg$savedPos = s0;
|
|
34875
|
-
s0 = peg$
|
|
36223
|
+
s0 = peg$f44(s2, s3);
|
|
34876
36224
|
} else {
|
|
34877
36225
|
peg$currPos = s0;
|
|
34878
36226
|
s0 = peg$FAILED;
|
|
@@ -34894,13 +36242,13 @@ function peg$parse2(input, options) {
|
|
|
34894
36242
|
function peg$parseItemLeadTag() {
|
|
34895
36243
|
let s0, s1, s2, s3;
|
|
34896
36244
|
s0 = peg$currPos;
|
|
34897
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34898
|
-
s1 = peg$
|
|
36245
|
+
if (input.substr(peg$currPos, 2) === peg$c20) {
|
|
36246
|
+
s1 = peg$c20;
|
|
34899
36247
|
peg$currPos += 2;
|
|
34900
36248
|
} else {
|
|
34901
36249
|
s1 = peg$FAILED;
|
|
34902
36250
|
if (peg$silentFails === 0) {
|
|
34903
|
-
peg$fail(peg$
|
|
36251
|
+
peg$fail(peg$e24);
|
|
34904
36252
|
}
|
|
34905
36253
|
}
|
|
34906
36254
|
if (s1 !== peg$FAILED) {
|
|
@@ -34908,7 +36256,7 @@ function peg$parse2(input, options) {
|
|
|
34908
36256
|
s3 = peg$parseTag_CloseOrEOF();
|
|
34909
36257
|
if (s3 !== peg$FAILED) {
|
|
34910
36258
|
peg$savedPos = s0;
|
|
34911
|
-
s0 = peg$
|
|
36259
|
+
s0 = peg$f45(s2);
|
|
34912
36260
|
} else {
|
|
34913
36261
|
peg$currPos = s0;
|
|
34914
36262
|
s0 = peg$FAILED;
|
|
@@ -34922,13 +36270,13 @@ function peg$parse2(input, options) {
|
|
|
34922
36270
|
function peg$parseInstructionTag() {
|
|
34923
36271
|
let s0, s1, s2, s3;
|
|
34924
36272
|
s0 = peg$currPos;
|
|
34925
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34926
|
-
s1 = peg$
|
|
36273
|
+
if (input.substr(peg$currPos, 2) === peg$c21) {
|
|
36274
|
+
s1 = peg$c21;
|
|
34927
36275
|
peg$currPos += 2;
|
|
34928
36276
|
} else {
|
|
34929
36277
|
s1 = peg$FAILED;
|
|
34930
36278
|
if (peg$silentFails === 0) {
|
|
34931
|
-
peg$fail(peg$
|
|
36279
|
+
peg$fail(peg$e25);
|
|
34932
36280
|
}
|
|
34933
36281
|
}
|
|
34934
36282
|
if (s1 !== peg$FAILED) {
|
|
@@ -34936,7 +36284,7 @@ function peg$parse2(input, options) {
|
|
|
34936
36284
|
s3 = peg$parseTag_CloseOrEOF();
|
|
34937
36285
|
if (s3 !== peg$FAILED) {
|
|
34938
36286
|
peg$savedPos = s0;
|
|
34939
|
-
s0 = peg$
|
|
36287
|
+
s0 = peg$f46(s2);
|
|
34940
36288
|
} else {
|
|
34941
36289
|
peg$currPos = s0;
|
|
34942
36290
|
s0 = peg$FAILED;
|
|
@@ -34950,13 +36298,13 @@ function peg$parse2(input, options) {
|
|
|
34950
36298
|
function peg$parseHintTag() {
|
|
34951
36299
|
let s0, s1, s2, s3;
|
|
34952
36300
|
s0 = peg$currPos;
|
|
34953
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34954
|
-
s1 = peg$
|
|
36301
|
+
if (input.substr(peg$currPos, 2) === peg$c22) {
|
|
36302
|
+
s1 = peg$c22;
|
|
34955
36303
|
peg$currPos += 2;
|
|
34956
36304
|
} else {
|
|
34957
36305
|
s1 = peg$FAILED;
|
|
34958
36306
|
if (peg$silentFails === 0) {
|
|
34959
|
-
peg$fail(peg$
|
|
36307
|
+
peg$fail(peg$e26);
|
|
34960
36308
|
}
|
|
34961
36309
|
}
|
|
34962
36310
|
if (s1 !== peg$FAILED) {
|
|
@@ -34964,7 +36312,7 @@ function peg$parse2(input, options) {
|
|
|
34964
36312
|
s3 = peg$parseTag_CloseOrEOF();
|
|
34965
36313
|
if (s3 !== peg$FAILED) {
|
|
34966
36314
|
peg$savedPos = s0;
|
|
34967
|
-
s0 = peg$
|
|
36315
|
+
s0 = peg$f47(s2);
|
|
34968
36316
|
} else {
|
|
34969
36317
|
peg$currPos = s0;
|
|
34970
36318
|
s0 = peg$FAILED;
|
|
@@ -34978,13 +36326,13 @@ function peg$parse2(input, options) {
|
|
|
34978
36326
|
function peg$parseTrueTag() {
|
|
34979
36327
|
let s0, s1, s2, s3;
|
|
34980
36328
|
s0 = peg$currPos;
|
|
34981
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
34982
|
-
s1 = peg$
|
|
36329
|
+
if (input.substr(peg$currPos, 2) === peg$c23) {
|
|
36330
|
+
s1 = peg$c23;
|
|
34983
36331
|
peg$currPos += 2;
|
|
34984
36332
|
} else {
|
|
34985
36333
|
s1 = peg$FAILED;
|
|
34986
36334
|
if (peg$silentFails === 0) {
|
|
34987
|
-
peg$fail(peg$
|
|
36335
|
+
peg$fail(peg$e27);
|
|
34988
36336
|
}
|
|
34989
36337
|
}
|
|
34990
36338
|
if (s1 !== peg$FAILED) {
|
|
@@ -34992,7 +36340,7 @@ function peg$parse2(input, options) {
|
|
|
34992
36340
|
s3 = peg$parseTag_CloseOrEOF();
|
|
34993
36341
|
if (s3 !== peg$FAILED) {
|
|
34994
36342
|
peg$savedPos = s0;
|
|
34995
|
-
s0 = peg$
|
|
36343
|
+
s0 = peg$f48(s2);
|
|
34996
36344
|
} else {
|
|
34997
36345
|
peg$currPos = s0;
|
|
34998
36346
|
s0 = peg$FAILED;
|
|
@@ -35006,13 +36354,13 @@ function peg$parse2(input, options) {
|
|
|
35006
36354
|
function peg$parseFalseTag() {
|
|
35007
36355
|
let s0, s1, s2, s3;
|
|
35008
36356
|
s0 = peg$currPos;
|
|
35009
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35010
|
-
s1 = peg$
|
|
36357
|
+
if (input.substr(peg$currPos, 2) === peg$c24) {
|
|
36358
|
+
s1 = peg$c24;
|
|
35011
36359
|
peg$currPos += 2;
|
|
35012
36360
|
} else {
|
|
35013
36361
|
s1 = peg$FAILED;
|
|
35014
36362
|
if (peg$silentFails === 0) {
|
|
35015
|
-
peg$fail(peg$
|
|
36363
|
+
peg$fail(peg$e28);
|
|
35016
36364
|
}
|
|
35017
36365
|
}
|
|
35018
36366
|
if (s1 !== peg$FAILED) {
|
|
@@ -35020,7 +36368,7 @@ function peg$parse2(input, options) {
|
|
|
35020
36368
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35021
36369
|
if (s3 !== peg$FAILED) {
|
|
35022
36370
|
peg$savedPos = s0;
|
|
35023
|
-
s0 = peg$
|
|
36371
|
+
s0 = peg$f49(s2);
|
|
35024
36372
|
} else {
|
|
35025
36373
|
peg$currPos = s0;
|
|
35026
36374
|
s0 = peg$FAILED;
|
|
@@ -35034,13 +36382,13 @@ function peg$parse2(input, options) {
|
|
|
35034
36382
|
function peg$parseSampleSolutionTag() {
|
|
35035
36383
|
let s0, s1, s2, s3;
|
|
35036
36384
|
s0 = peg$currPos;
|
|
35037
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35038
|
-
s1 = peg$
|
|
36385
|
+
if (input.substr(peg$currPos, 2) === peg$c25) {
|
|
36386
|
+
s1 = peg$c25;
|
|
35039
36387
|
peg$currPos += 2;
|
|
35040
36388
|
} else {
|
|
35041
36389
|
s1 = peg$FAILED;
|
|
35042
36390
|
if (peg$silentFails === 0) {
|
|
35043
|
-
peg$fail(peg$
|
|
36391
|
+
peg$fail(peg$e29);
|
|
35044
36392
|
}
|
|
35045
36393
|
}
|
|
35046
36394
|
if (s1 !== peg$FAILED) {
|
|
@@ -35048,7 +36396,7 @@ function peg$parse2(input, options) {
|
|
|
35048
36396
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35049
36397
|
if (s3 !== peg$FAILED) {
|
|
35050
36398
|
peg$savedPos = s0;
|
|
35051
|
-
s0 = peg$
|
|
36399
|
+
s0 = peg$f50(s2);
|
|
35052
36400
|
} else {
|
|
35053
36401
|
peg$currPos = s0;
|
|
35054
36402
|
s0 = peg$FAILED;
|
|
@@ -35062,13 +36410,13 @@ function peg$parse2(input, options) {
|
|
|
35062
36410
|
function peg$parseGapTag() {
|
|
35063
36411
|
let s0, s1, s2, s3;
|
|
35064
36412
|
s0 = peg$currPos;
|
|
35065
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35066
|
-
s1 = peg$
|
|
36413
|
+
if (input.substr(peg$currPos, 2) === peg$c26) {
|
|
36414
|
+
s1 = peg$c26;
|
|
35067
36415
|
peg$currPos += 2;
|
|
35068
36416
|
} else {
|
|
35069
36417
|
s1 = peg$FAILED;
|
|
35070
36418
|
if (peg$silentFails === 0) {
|
|
35071
|
-
peg$fail(peg$
|
|
36419
|
+
peg$fail(peg$e30);
|
|
35072
36420
|
}
|
|
35073
36421
|
}
|
|
35074
36422
|
if (s1 !== peg$FAILED) {
|
|
@@ -35076,7 +36424,7 @@ function peg$parse2(input, options) {
|
|
|
35076
36424
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35077
36425
|
if (s3 !== peg$FAILED) {
|
|
35078
36426
|
peg$savedPos = s0;
|
|
35079
|
-
s0 = peg$
|
|
36427
|
+
s0 = peg$f51(s2);
|
|
35080
36428
|
} else {
|
|
35081
36429
|
peg$currPos = s0;
|
|
35082
36430
|
s0 = peg$FAILED;
|
|
@@ -35090,13 +36438,13 @@ function peg$parse2(input, options) {
|
|
|
35090
36438
|
function peg$parseMarkTag() {
|
|
35091
36439
|
let s0, s1, s2, s3;
|
|
35092
36440
|
s0 = peg$currPos;
|
|
35093
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35094
|
-
s1 = peg$
|
|
36441
|
+
if (input.substr(peg$currPos, 2) === peg$c27) {
|
|
36442
|
+
s1 = peg$c27;
|
|
35095
36443
|
peg$currPos += 2;
|
|
35096
36444
|
} else {
|
|
35097
36445
|
s1 = peg$FAILED;
|
|
35098
36446
|
if (peg$silentFails === 0) {
|
|
35099
|
-
peg$fail(peg$
|
|
36447
|
+
peg$fail(peg$e31);
|
|
35100
36448
|
}
|
|
35101
36449
|
}
|
|
35102
36450
|
if (s1 !== peg$FAILED) {
|
|
@@ -35104,7 +36452,7 @@ function peg$parse2(input, options) {
|
|
|
35104
36452
|
s3 = peg$parseTag_CloseOrEOF();
|
|
35105
36453
|
if (s3 !== peg$FAILED) {
|
|
35106
36454
|
peg$savedPos = s0;
|
|
35107
|
-
s0 = peg$
|
|
36455
|
+
s0 = peg$f52(s2);
|
|
35108
36456
|
} else {
|
|
35109
36457
|
peg$currPos = s0;
|
|
35110
36458
|
s0 = peg$FAILED;
|
|
@@ -35118,13 +36466,13 @@ function peg$parse2(input, options) {
|
|
|
35118
36466
|
function peg$parseResourceTag() {
|
|
35119
36467
|
let s0, s1, s2, s3, s4;
|
|
35120
36468
|
s0 = peg$currPos;
|
|
35121
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35122
|
-
s1 = peg$
|
|
36469
|
+
if (input.substr(peg$currPos, 2) === peg$c28) {
|
|
36470
|
+
s1 = peg$c28;
|
|
35123
36471
|
peg$currPos += 2;
|
|
35124
36472
|
} else {
|
|
35125
36473
|
s1 = peg$FAILED;
|
|
35126
36474
|
if (peg$silentFails === 0) {
|
|
35127
|
-
peg$fail(peg$
|
|
36475
|
+
peg$fail(peg$e32);
|
|
35128
36476
|
}
|
|
35129
36477
|
}
|
|
35130
36478
|
if (s1 !== peg$FAILED) {
|
|
@@ -35135,7 +36483,7 @@ function peg$parse2(input, options) {
|
|
|
35135
36483
|
s4 = peg$parseTag_CloseOrEOF();
|
|
35136
36484
|
if (s4 !== peg$FAILED) {
|
|
35137
36485
|
peg$savedPos = s0;
|
|
35138
|
-
s0 = peg$
|
|
36486
|
+
s0 = peg$f53(s2, s3);
|
|
35139
36487
|
} else {
|
|
35140
36488
|
peg$currPos = s0;
|
|
35141
36489
|
s0 = peg$FAILED;
|
|
@@ -35159,13 +36507,13 @@ function peg$parse2(input, options) {
|
|
|
35159
36507
|
s0 = peg$currPos;
|
|
35160
36508
|
s1 = peg$currPos;
|
|
35161
36509
|
s2 = [];
|
|
35162
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35163
|
-
s3 = peg$
|
|
36510
|
+
if (input.substr(peg$currPos, 2) === peg$c29) {
|
|
36511
|
+
s3 = peg$c29;
|
|
35164
36512
|
peg$currPos += 2;
|
|
35165
36513
|
} else {
|
|
35166
36514
|
s3 = peg$FAILED;
|
|
35167
36515
|
if (peg$silentFails === 0) {
|
|
35168
|
-
peg$fail(peg$
|
|
36516
|
+
peg$fail(peg$e33);
|
|
35169
36517
|
}
|
|
35170
36518
|
}
|
|
35171
36519
|
if (s3 === peg$FAILED) {
|
|
@@ -35181,13 +36529,13 @@ function peg$parse2(input, options) {
|
|
|
35181
36529
|
}
|
|
35182
36530
|
while (s3 !== peg$FAILED) {
|
|
35183
36531
|
s2.push(s3);
|
|
35184
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35185
|
-
s3 = peg$
|
|
36532
|
+
if (input.substr(peg$currPos, 2) === peg$c29) {
|
|
36533
|
+
s3 = peg$c29;
|
|
35186
36534
|
peg$currPos += 2;
|
|
35187
36535
|
} else {
|
|
35188
36536
|
s3 = peg$FAILED;
|
|
35189
36537
|
if (peg$silentFails === 0) {
|
|
35190
|
-
peg$fail(peg$
|
|
36538
|
+
peg$fail(peg$e33);
|
|
35191
36539
|
}
|
|
35192
36540
|
}
|
|
35193
36541
|
if (s3 === peg$FAILED) {
|
|
@@ -35204,7 +36552,7 @@ function peg$parse2(input, options) {
|
|
|
35204
36552
|
}
|
|
35205
36553
|
s1 = input.substring(s1, peg$currPos);
|
|
35206
36554
|
peg$savedPos = s0;
|
|
35207
|
-
s1 = peg$
|
|
36555
|
+
s1 = peg$f54(s1);
|
|
35208
36556
|
s0 = s1;
|
|
35209
36557
|
return s0;
|
|
35210
36558
|
}
|
|
@@ -35213,13 +36561,13 @@ function peg$parse2(input, options) {
|
|
|
35213
36561
|
s0 = peg$currPos;
|
|
35214
36562
|
s1 = peg$currPos;
|
|
35215
36563
|
peg$silentFails++;
|
|
35216
|
-
if (input.substr(peg$currPos, 3) === peg$
|
|
35217
|
-
s2 = peg$
|
|
36564
|
+
if (input.substr(peg$currPos, 3) === peg$c30) {
|
|
36565
|
+
s2 = peg$c30;
|
|
35218
36566
|
peg$currPos += 3;
|
|
35219
36567
|
} else {
|
|
35220
36568
|
s2 = peg$FAILED;
|
|
35221
36569
|
if (peg$silentFails === 0) {
|
|
35222
|
-
peg$fail(peg$
|
|
36570
|
+
peg$fail(peg$e34);
|
|
35223
36571
|
}
|
|
35224
36572
|
}
|
|
35225
36573
|
peg$silentFails--;
|
|
@@ -35233,29 +36581,29 @@ function peg$parse2(input, options) {
|
|
|
35233
36581
|
s2 = peg$currPos;
|
|
35234
36582
|
s3 = [];
|
|
35235
36583
|
s4 = input.charAt(peg$currPos);
|
|
35236
|
-
if (peg$
|
|
36584
|
+
if (peg$r3.test(s4)) {
|
|
35237
36585
|
peg$currPos++;
|
|
35238
36586
|
} else {
|
|
35239
36587
|
s4 = peg$FAILED;
|
|
35240
36588
|
if (peg$silentFails === 0) {
|
|
35241
|
-
peg$fail(peg$
|
|
36589
|
+
peg$fail(peg$e35);
|
|
35242
36590
|
}
|
|
35243
36591
|
}
|
|
35244
36592
|
while (s4 !== peg$FAILED) {
|
|
35245
36593
|
s3.push(s4);
|
|
35246
36594
|
s4 = input.charAt(peg$currPos);
|
|
35247
|
-
if (peg$
|
|
36595
|
+
if (peg$r3.test(s4)) {
|
|
35248
36596
|
peg$currPos++;
|
|
35249
36597
|
} else {
|
|
35250
36598
|
s4 = peg$FAILED;
|
|
35251
36599
|
if (peg$silentFails === 0) {
|
|
35252
|
-
peg$fail(peg$
|
|
36600
|
+
peg$fail(peg$e35);
|
|
35253
36601
|
}
|
|
35254
36602
|
}
|
|
35255
36603
|
}
|
|
35256
36604
|
s2 = input.substring(s2, peg$currPos);
|
|
35257
36605
|
peg$savedPos = s0;
|
|
35258
|
-
s0 = peg$
|
|
36606
|
+
s0 = peg$f55(s2);
|
|
35259
36607
|
} else {
|
|
35260
36608
|
peg$currPos = s0;
|
|
35261
36609
|
s0 = peg$FAILED;
|
|
@@ -35310,24 +36658,24 @@ function peg$parse2(input, options) {
|
|
|
35310
36658
|
s0 = peg$currPos;
|
|
35311
36659
|
s1 = [];
|
|
35312
36660
|
if (input.charCodeAt(peg$currPos) === 46) {
|
|
35313
|
-
s2 = peg$
|
|
36661
|
+
s2 = peg$c31;
|
|
35314
36662
|
peg$currPos++;
|
|
35315
36663
|
} else {
|
|
35316
36664
|
s2 = peg$FAILED;
|
|
35317
36665
|
if (peg$silentFails === 0) {
|
|
35318
|
-
peg$fail(peg$
|
|
36666
|
+
peg$fail(peg$e36);
|
|
35319
36667
|
}
|
|
35320
36668
|
}
|
|
35321
36669
|
if (s2 !== peg$FAILED) {
|
|
35322
36670
|
while (s2 !== peg$FAILED) {
|
|
35323
36671
|
s1.push(s2);
|
|
35324
36672
|
if (input.charCodeAt(peg$currPos) === 46) {
|
|
35325
|
-
s2 = peg$
|
|
36673
|
+
s2 = peg$c31;
|
|
35326
36674
|
peg$currPos++;
|
|
35327
36675
|
} else {
|
|
35328
36676
|
s2 = peg$FAILED;
|
|
35329
36677
|
if (peg$silentFails === 0) {
|
|
35330
|
-
peg$fail(peg$
|
|
36678
|
+
peg$fail(peg$e36);
|
|
35331
36679
|
}
|
|
35332
36680
|
}
|
|
35333
36681
|
}
|
|
@@ -35336,7 +36684,7 @@ function peg$parse2(input, options) {
|
|
|
35336
36684
|
}
|
|
35337
36685
|
if (s1 !== peg$FAILED) {
|
|
35338
36686
|
peg$savedPos = s0;
|
|
35339
|
-
s1 = peg$
|
|
36687
|
+
s1 = peg$f56(s1);
|
|
35340
36688
|
}
|
|
35341
36689
|
s0 = s1;
|
|
35342
36690
|
return s0;
|
|
@@ -35347,29 +36695,29 @@ function peg$parse2(input, options) {
|
|
|
35347
36695
|
s1 = peg$currPos;
|
|
35348
36696
|
s2 = [];
|
|
35349
36697
|
s3 = input.charAt(peg$currPos);
|
|
35350
|
-
if (peg$
|
|
36698
|
+
if (peg$r4.test(s3)) {
|
|
35351
36699
|
peg$currPos++;
|
|
35352
36700
|
} else {
|
|
35353
36701
|
s3 = peg$FAILED;
|
|
35354
36702
|
if (peg$silentFails === 0) {
|
|
35355
|
-
peg$fail(peg$
|
|
36703
|
+
peg$fail(peg$e37);
|
|
35356
36704
|
}
|
|
35357
36705
|
}
|
|
35358
36706
|
while (s3 !== peg$FAILED) {
|
|
35359
36707
|
s2.push(s3);
|
|
35360
36708
|
s3 = input.charAt(peg$currPos);
|
|
35361
|
-
if (peg$
|
|
36709
|
+
if (peg$r4.test(s3)) {
|
|
35362
36710
|
peg$currPos++;
|
|
35363
36711
|
} else {
|
|
35364
36712
|
s3 = peg$FAILED;
|
|
35365
36713
|
if (peg$silentFails === 0) {
|
|
35366
|
-
peg$fail(peg$
|
|
36714
|
+
peg$fail(peg$e37);
|
|
35367
36715
|
}
|
|
35368
36716
|
}
|
|
35369
36717
|
}
|
|
35370
36718
|
s1 = input.substring(s1, peg$currPos);
|
|
35371
36719
|
peg$savedPos = s0;
|
|
35372
|
-
s1 = peg$
|
|
36720
|
+
s1 = peg$f57(s1);
|
|
35373
36721
|
s0 = s1;
|
|
35374
36722
|
return s0;
|
|
35375
36723
|
}
|
|
@@ -35388,7 +36736,7 @@ function peg$parse2(input, options) {
|
|
|
35388
36736
|
if (s1 !== peg$FAILED) {
|
|
35389
36737
|
s2 = peg$parseTag_Value();
|
|
35390
36738
|
peg$savedPos = s0;
|
|
35391
|
-
s0 = peg$
|
|
36739
|
+
s0 = peg$f58(s2);
|
|
35392
36740
|
} else {
|
|
35393
36741
|
peg$currPos = s0;
|
|
35394
36742
|
s0 = peg$FAILED;
|
|
@@ -35397,7 +36745,7 @@ function peg$parse2(input, options) {
|
|
|
35397
36745
|
s0 = peg$currPos;
|
|
35398
36746
|
s1 = "";
|
|
35399
36747
|
peg$savedPos = s0;
|
|
35400
|
-
s1 = peg$
|
|
36748
|
+
s1 = peg$f59();
|
|
35401
36749
|
s0 = s1;
|
|
35402
36750
|
}
|
|
35403
36751
|
return s0;
|
|
@@ -35434,19 +36782,19 @@ function peg$parse2(input, options) {
|
|
|
35434
36782
|
let s0, s1;
|
|
35435
36783
|
peg$silentFails++;
|
|
35436
36784
|
s0 = input.charAt(peg$currPos);
|
|
35437
|
-
if (peg$
|
|
36785
|
+
if (peg$r5.test(s0)) {
|
|
35438
36786
|
peg$currPos++;
|
|
35439
36787
|
} else {
|
|
35440
36788
|
s0 = peg$FAILED;
|
|
35441
36789
|
if (peg$silentFails === 0) {
|
|
35442
|
-
peg$fail(peg$
|
|
36790
|
+
peg$fail(peg$e39);
|
|
35443
36791
|
}
|
|
35444
36792
|
}
|
|
35445
36793
|
peg$silentFails--;
|
|
35446
36794
|
if (s0 === peg$FAILED) {
|
|
35447
36795
|
s1 = peg$FAILED;
|
|
35448
36796
|
if (peg$silentFails === 0) {
|
|
35449
|
-
peg$fail(peg$
|
|
36797
|
+
peg$fail(peg$e38);
|
|
35450
36798
|
}
|
|
35451
36799
|
}
|
|
35452
36800
|
return s0;
|
|
@@ -35469,23 +36817,23 @@ function peg$parse2(input, options) {
|
|
|
35469
36817
|
s0 = peg$currPos;
|
|
35470
36818
|
s1 = [];
|
|
35471
36819
|
s2 = input.charAt(peg$currPos);
|
|
35472
|
-
if (peg$
|
|
36820
|
+
if (peg$r6.test(s2)) {
|
|
35473
36821
|
peg$currPos++;
|
|
35474
36822
|
} else {
|
|
35475
36823
|
s2 = peg$FAILED;
|
|
35476
36824
|
if (peg$silentFails === 0) {
|
|
35477
|
-
peg$fail(peg$
|
|
36825
|
+
peg$fail(peg$e41);
|
|
35478
36826
|
}
|
|
35479
36827
|
}
|
|
35480
36828
|
while (s2 !== peg$FAILED) {
|
|
35481
36829
|
s1.push(s2);
|
|
35482
36830
|
s2 = input.charAt(peg$currPos);
|
|
35483
|
-
if (peg$
|
|
36831
|
+
if (peg$r6.test(s2)) {
|
|
35484
36832
|
peg$currPos++;
|
|
35485
36833
|
} else {
|
|
35486
36834
|
s2 = peg$FAILED;
|
|
35487
36835
|
if (peg$silentFails === 0) {
|
|
35488
|
-
peg$fail(peg$
|
|
36836
|
+
peg$fail(peg$e41);
|
|
35489
36837
|
}
|
|
35490
36838
|
}
|
|
35491
36839
|
}
|
|
@@ -35501,7 +36849,7 @@ function peg$parse2(input, options) {
|
|
|
35501
36849
|
if (s0 === peg$FAILED) {
|
|
35502
36850
|
s1 = peg$FAILED;
|
|
35503
36851
|
if (peg$silentFails === 0) {
|
|
35504
|
-
peg$fail(peg$
|
|
36852
|
+
peg$fail(peg$e40);
|
|
35505
36853
|
}
|
|
35506
36854
|
}
|
|
35507
36855
|
return s0;
|
|
@@ -35510,32 +36858,32 @@ function peg$parse2(input, options) {
|
|
|
35510
36858
|
let s0, s1;
|
|
35511
36859
|
peg$silentFails++;
|
|
35512
36860
|
if (input.charCodeAt(peg$currPos) === 10) {
|
|
35513
|
-
s0 = peg$
|
|
36861
|
+
s0 = peg$c32;
|
|
35514
36862
|
peg$currPos++;
|
|
35515
36863
|
} else {
|
|
35516
36864
|
s0 = peg$FAILED;
|
|
35517
36865
|
if (peg$silentFails === 0) {
|
|
35518
|
-
peg$fail(peg$
|
|
36866
|
+
peg$fail(peg$e43);
|
|
35519
36867
|
}
|
|
35520
36868
|
}
|
|
35521
36869
|
if (s0 === peg$FAILED) {
|
|
35522
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
35523
|
-
s0 = peg$
|
|
36870
|
+
if (input.substr(peg$currPos, 2) === peg$c33) {
|
|
36871
|
+
s0 = peg$c33;
|
|
35524
36872
|
peg$currPos += 2;
|
|
35525
36873
|
} else {
|
|
35526
36874
|
s0 = peg$FAILED;
|
|
35527
36875
|
if (peg$silentFails === 0) {
|
|
35528
|
-
peg$fail(peg$
|
|
36876
|
+
peg$fail(peg$e44);
|
|
35529
36877
|
}
|
|
35530
36878
|
}
|
|
35531
36879
|
if (s0 === peg$FAILED) {
|
|
35532
36880
|
s0 = input.charAt(peg$currPos);
|
|
35533
|
-
if (peg$
|
|
36881
|
+
if (peg$r7.test(s0)) {
|
|
35534
36882
|
peg$currPos++;
|
|
35535
36883
|
} else {
|
|
35536
36884
|
s0 = peg$FAILED;
|
|
35537
36885
|
if (peg$silentFails === 0) {
|
|
35538
|
-
peg$fail(peg$
|
|
36886
|
+
peg$fail(peg$e45);
|
|
35539
36887
|
}
|
|
35540
36888
|
}
|
|
35541
36889
|
}
|
|
@@ -35544,7 +36892,7 @@ function peg$parse2(input, options) {
|
|
|
35544
36892
|
if (s0 === peg$FAILED) {
|
|
35545
36893
|
s1 = peg$FAILED;
|
|
35546
36894
|
if (peg$silentFails === 0) {
|
|
35547
|
-
peg$fail(peg$
|
|
36895
|
+
peg$fail(peg$e42);
|
|
35548
36896
|
}
|
|
35549
36897
|
}
|
|
35550
36898
|
return s0;
|
|
@@ -35555,23 +36903,23 @@ function peg$parse2(input, options) {
|
|
|
35555
36903
|
s0 = peg$currPos;
|
|
35556
36904
|
s1 = [];
|
|
35557
36905
|
s2 = input.charAt(peg$currPos);
|
|
35558
|
-
if (peg$
|
|
36906
|
+
if (peg$r6.test(s2)) {
|
|
35559
36907
|
peg$currPos++;
|
|
35560
36908
|
} else {
|
|
35561
36909
|
s2 = peg$FAILED;
|
|
35562
36910
|
if (peg$silentFails === 0) {
|
|
35563
|
-
peg$fail(peg$
|
|
36911
|
+
peg$fail(peg$e41);
|
|
35564
36912
|
}
|
|
35565
36913
|
}
|
|
35566
36914
|
while (s2 !== peg$FAILED) {
|
|
35567
36915
|
s1.push(s2);
|
|
35568
36916
|
s2 = input.charAt(peg$currPos);
|
|
35569
|
-
if (peg$
|
|
36917
|
+
if (peg$r6.test(s2)) {
|
|
35570
36918
|
peg$currPos++;
|
|
35571
36919
|
} else {
|
|
35572
36920
|
s2 = peg$FAILED;
|
|
35573
36921
|
if (peg$silentFails === 0) {
|
|
35574
|
-
peg$fail(peg$
|
|
36922
|
+
peg$fail(peg$e41);
|
|
35575
36923
|
}
|
|
35576
36924
|
}
|
|
35577
36925
|
}
|
|
@@ -35587,7 +36935,7 @@ function peg$parse2(input, options) {
|
|
|
35587
36935
|
if (s0 === peg$FAILED) {
|
|
35588
36936
|
s1 = peg$FAILED;
|
|
35589
36937
|
if (peg$silentFails === 0) {
|
|
35590
|
-
peg$fail(peg$
|
|
36938
|
+
peg$fail(peg$e46);
|
|
35591
36939
|
}
|
|
35592
36940
|
}
|
|
35593
36941
|
return s0;
|
|
@@ -35596,19 +36944,19 @@ function peg$parse2(input, options) {
|
|
|
35596
36944
|
let s0, s1;
|
|
35597
36945
|
peg$silentFails++;
|
|
35598
36946
|
s0 = input.charAt(peg$currPos);
|
|
35599
|
-
if (peg$
|
|
36947
|
+
if (peg$r8.test(s0)) {
|
|
35600
36948
|
peg$currPos++;
|
|
35601
36949
|
} else {
|
|
35602
36950
|
s0 = peg$FAILED;
|
|
35603
36951
|
if (peg$silentFails === 0) {
|
|
35604
|
-
peg$fail(peg$
|
|
36952
|
+
peg$fail(peg$e48);
|
|
35605
36953
|
}
|
|
35606
36954
|
}
|
|
35607
36955
|
peg$silentFails--;
|
|
35608
36956
|
if (s0 === peg$FAILED) {
|
|
35609
36957
|
s1 = peg$FAILED;
|
|
35610
36958
|
if (peg$silentFails === 0) {
|
|
35611
|
-
peg$fail(peg$
|
|
36959
|
+
peg$fail(peg$e47);
|
|
35612
36960
|
}
|
|
35613
36961
|
}
|
|
35614
36962
|
return s0;
|