@gmb/bitmark-parser-generator 3.34.0 → 3.36.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/README.md +4 -4
- package/dist/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/index.cjs +33650 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +7733 -0
- package/dist/index.d.ts +7733 -0
- package/dist/index.js +33590 -0
- package/dist/index.js.map +1 -0
- package/package.json +106 -90
- package/dist/cjs/BitmarkParserGenerator.js +0 -776
- package/dist/cjs/BitmarkParserGenerator.js.map +0 -1
- package/dist/cjs/ast/Ast.js +0 -220
- package/dist/cjs/ast/Ast.js.map +0 -1
- package/dist/cjs/ast/BaseBuilder.js +0 -193
- package/dist/cjs/ast/BaseBuilder.js.map +0 -1
- package/dist/cjs/ast/Builder.js +0 -1781
- package/dist/cjs/ast/Builder.js.map +0 -1
- package/dist/cjs/ast/ResourceBuilder.js +0 -963
- package/dist/cjs/ast/ResourceBuilder.js.map +0 -1
- package/dist/cjs/ast/rules/NodeValidator.js +0 -184
- package/dist/cjs/ast/rules/NodeValidator.js.map +0 -1
- package/dist/cjs/ast/writer/FileWriter.js +0 -119
- package/dist/cjs/ast/writer/FileWriter.js.map +0 -1
- package/dist/cjs/ast/writer/StreamWriter.js +0 -89
- package/dist/cjs/ast/writer/StreamWriter.js.map +0 -1
- package/dist/cjs/ast/writer/StringWriter.js +0 -115
- package/dist/cjs/ast/writer/StringWriter.js.map +0 -1
- package/dist/cjs/ast/writer/Writer.js +0 -3
- package/dist/cjs/ast/writer/Writer.js.map +0 -1
- package/dist/cjs/breakscaping/Breakscape.js +0 -80
- package/dist/cjs/breakscaping/Breakscape.js.map +0 -1
- package/dist/cjs/breakscaping/BreakscapeLoop.js +0 -305
- package/dist/cjs/breakscaping/BreakscapeLoop.js.map +0 -1
- package/dist/cjs/breakscaping/BreakscapeOptions.js +0 -3
- package/dist/cjs/breakscaping/BreakscapeOptions.js.map +0 -1
- package/dist/cjs/breakscaping/BreakscapeRegex.js +0 -213
- package/dist/cjs/breakscaping/BreakscapeRegex.js.map +0 -1
- package/dist/cjs/breakscaping/RegexConfigs.js +0 -38
- package/dist/cjs/breakscaping/RegexConfigs.js.map +0 -1
- package/dist/cjs/config/Config.js +0 -352
- package/dist/cjs/config/Config.js.map +0 -1
- package/dist/cjs/config/ConfigHydrator.js +0 -161
- package/dist/cjs/config/ConfigHydrator.js.map +0 -1
- package/dist/cjs/config/raw/bits.js +0 -2615
- package/dist/cjs/config/raw/bits.js.map +0 -1
- package/dist/cjs/config/raw/cardSets.js +0 -549
- package/dist/cjs/config/raw/cardSets.js.map +0 -1
- package/dist/cjs/config/raw/groups.js +0 -1182
- package/dist/cjs/config/raw/groups.js.map +0 -1
- package/dist/cjs/config/raw/properties.js +0 -1006
- package/dist/cjs/config/raw/properties.js.map +0 -1
- package/dist/cjs/config/raw/resources.js +0 -103
- package/dist/cjs/config/raw/resources.js.map +0 -1
- package/dist/cjs/config/raw/tags.js +0 -48
- package/dist/cjs/config/raw/tags.js.map +0 -1
- package/dist/cjs/generated/build-info.js +0 -13
- package/dist/cjs/generated/build-info.js.map +0 -1
- package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js +0 -3168
- package/dist/cjs/generated/parser/bitmark/bitmark-peggy-parser.js.map +0 -1
- package/dist/cjs/generated/parser/text/text-peggy-parser.js +0 -9659
- package/dist/cjs/generated/parser/text/text-peggy-parser.js.map +0 -1
- package/dist/cjs/generator/AstWalkerGenerator.js +0 -86
- package/dist/cjs/generator/AstWalkerGenerator.js.map +0 -1
- package/dist/cjs/generator/Generator.js +0 -3
- package/dist/cjs/generator/Generator.js.map +0 -1
- package/dist/cjs/generator/bitmark/BitmarkFileGenerator.js +0 -49
- package/dist/cjs/generator/bitmark/BitmarkFileGenerator.js.map +0 -1
- package/dist/cjs/generator/bitmark/BitmarkGenerator.js +0 -2601
- package/dist/cjs/generator/bitmark/BitmarkGenerator.js.map +0 -1
- package/dist/cjs/generator/bitmark/BitmarkStringGenerator.js +0 -51
- package/dist/cjs/generator/bitmark/BitmarkStringGenerator.js.map +0 -1
- package/dist/cjs/generator/json/JsonFileGenerator.js +0 -53
- package/dist/cjs/generator/json/JsonFileGenerator.js.map +0 -1
- package/dist/cjs/generator/json/JsonGenerator.js +0 -1584
- package/dist/cjs/generator/json/JsonGenerator.js.map +0 -1
- package/dist/cjs/generator/json/JsonObjectGenerator.js +0 -51
- package/dist/cjs/generator/json/JsonObjectGenerator.js.map +0 -1
- package/dist/cjs/generator/json/JsonStringGenerator.js +0 -50
- package/dist/cjs/generator/json/JsonStringGenerator.js.map +0 -1
- package/dist/cjs/generator/text/TextGenerator.js +0 -1199
- package/dist/cjs/generator/text/TextGenerator.js.map +0 -1
- package/dist/cjs/index.js +0 -79
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/info/InfoBuilder.js +0 -43
- package/dist/cjs/info/InfoBuilder.js.map +0 -1
- package/dist/cjs/init/init.js +0 -15
- package/dist/cjs/init/init.js.map +0 -1
- package/dist/cjs/model/ast/BreakscapedString.js +0 -3
- package/dist/cjs/model/ast/BreakscapedString.js.map +0 -1
- package/dist/cjs/model/ast/NodeType.js +0 -557
- package/dist/cjs/model/ast/NodeType.js.map +0 -1
- package/dist/cjs/model/ast/Nodes.js +0 -3
- package/dist/cjs/model/ast/Nodes.js.map +0 -1
- package/dist/cjs/model/ast/StardardString.js +0 -3
- package/dist/cjs/model/ast/StardardString.js.map +0 -1
- package/dist/cjs/model/ast/TextNodes.js +0 -3
- package/dist/cjs/model/ast/TextNodes.js.map +0 -1
- package/dist/cjs/model/config/AbstractTagConfig.js +0 -18
- package/dist/cjs/model/config/AbstractTagConfig.js.map +0 -1
- package/dist/cjs/model/config/BitConfig.js +0 -72
- package/dist/cjs/model/config/BitConfig.js.map +0 -1
- package/dist/cjs/model/config/CardSetConfig.js +0 -26
- package/dist/cjs/model/config/CardSetConfig.js.map +0 -1
- package/dist/cjs/model/config/CardVariantConfig.js +0 -32
- package/dist/cjs/model/config/CardVariantConfig.js.map +0 -1
- package/dist/cjs/model/config/MarkupTagConfig.js +0 -41
- package/dist/cjs/model/config/MarkupTagConfig.js.map +0 -1
- package/dist/cjs/model/config/PropertyTagConfig.js +0 -50
- package/dist/cjs/model/config/PropertyTagConfig.js.map +0 -1
- package/dist/cjs/model/config/ResourceTagConfig.js +0 -42
- package/dist/cjs/model/config/ResourceTagConfig.js.map +0 -1
- package/dist/cjs/model/config/ResourcesConfig.js +0 -31
- package/dist/cjs/model/config/ResourcesConfig.js.map +0 -1
- package/dist/cjs/model/config/TagConfig.js +0 -3
- package/dist/cjs/model/config/TagConfig.js.map +0 -1
- package/dist/cjs/model/config/TagsConfig.js +0 -3
- package/dist/cjs/model/config/TagsConfig.js.map +0 -1
- package/dist/cjs/model/config/TagsConfigWithInfo.js +0 -3
- package/dist/cjs/model/config/TagsConfigWithInfo.js.map +0 -1
- package/dist/cjs/model/config/_Config.js +0 -3
- package/dist/cjs/model/config/_Config.js.map +0 -1
- package/dist/cjs/model/config/enum/CardSetConfigKey.js +0 -28
- package/dist/cjs/model/config/enum/CardSetConfigKey.js.map +0 -1
- package/dist/cjs/model/config/enum/ConfigKey.js +0 -29
- package/dist/cjs/model/config/enum/ConfigKey.js.map +0 -1
- package/dist/cjs/model/config/enum/GroupConfigKey.js +0 -57
- package/dist/cjs/model/config/enum/GroupConfigKey.js.map +0 -1
- package/dist/cjs/model/config/enum/GroupConfigType.js +0 -14
- package/dist/cjs/model/config/enum/GroupConfigType.js.map +0 -1
- package/dist/cjs/model/config/enum/PropertyConfigKey.js +0 -215
- package/dist/cjs/model/config/enum/PropertyConfigKey.js.map +0 -1
- package/dist/cjs/model/config/enum/ResourceConfigKey.js +0 -40
- package/dist/cjs/model/config/enum/ResourceConfigKey.js.map +0 -1
- package/dist/cjs/model/config/enum/TagConfigKey.js +0 -26
- package/dist/cjs/model/config/enum/TagConfigKey.js.map +0 -1
- package/dist/cjs/model/enum/BitTagType.js +0 -13
- package/dist/cjs/model/enum/BitTagType.js.map +0 -1
- package/dist/cjs/model/enum/BitType.js +0 -576
- package/dist/cjs/model/enum/BitType.js.map +0 -1
- package/dist/cjs/model/enum/BitmarkGeneratorOutput.js +0 -2
- package/dist/cjs/model/enum/BitmarkGeneratorOutput.js.map +0 -1
- package/dist/cjs/model/enum/BitmarkParserType.js +0 -9
- package/dist/cjs/model/enum/BitmarkParserType.js.map +0 -1
- package/dist/cjs/model/enum/BitmarkVersion.js +0 -12
- package/dist/cjs/model/enum/BitmarkVersion.js.map +0 -1
- package/dist/cjs/model/enum/BodyBitType.js +0 -14
- package/dist/cjs/model/enum/BodyBitType.js.map +0 -1
- package/dist/cjs/model/enum/BodyTextFormat.js +0 -14
- package/dist/cjs/model/enum/BodyTextFormat.js.map +0 -1
- package/dist/cjs/model/enum/CardSetVersion.js +0 -10
- package/dist/cjs/model/enum/CardSetVersion.js.map +0 -1
- package/dist/cjs/model/enum/Count.js +0 -9
- package/dist/cjs/model/enum/Count.js.map +0 -1
- package/dist/cjs/model/enum/DeprecatedTextFormat.js +0 -9
- package/dist/cjs/model/enum/DeprecatedTextFormat.js.map +0 -1
- package/dist/cjs/model/enum/ExampleType.js +0 -11
- package/dist/cjs/model/enum/ExampleType.js.map +0 -1
- package/dist/cjs/model/enum/PropertyAstKey.js +0 -18
- package/dist/cjs/model/enum/PropertyAstKey.js.map +0 -1
- package/dist/cjs/model/enum/PropertyFormat.js +0 -14
- package/dist/cjs/model/enum/PropertyFormat.js.map +0 -1
- package/dist/cjs/model/enum/PropertyJsonKey.js +0 -14
- package/dist/cjs/model/enum/PropertyJsonKey.js.map +0 -1
- package/dist/cjs/model/enum/PropertyTag.js +0 -8
- package/dist/cjs/model/enum/PropertyTag.js.map +0 -1
- package/dist/cjs/model/enum/ResourceJsonKey.js +0 -27
- package/dist/cjs/model/enum/ResourceJsonKey.js.map +0 -1
- package/dist/cjs/model/enum/ResourceTag.js +0 -37
- package/dist/cjs/model/enum/ResourceTag.js.map +0 -1
- package/dist/cjs/model/enum/Tag.js +0 -21
- package/dist/cjs/model/enum/Tag.js.map +0 -1
- package/dist/cjs/model/enum/TextFormat.js +0 -16
- package/dist/cjs/model/enum/TextFormat.js.map +0 -1
- package/dist/cjs/model/enum/TextLocation.js +0 -15
- package/dist/cjs/model/enum/TextLocation.js.map +0 -1
- package/dist/cjs/model/enum/TextMarkType.js +0 -54
- package/dist/cjs/model/enum/TextMarkType.js.map +0 -1
- package/dist/cjs/model/enum/TextNodeType.js +0 -35
- package/dist/cjs/model/enum/TextNodeType.js.map +0 -1
- package/dist/cjs/model/enum/TextSection.js +0 -18
- package/dist/cjs/model/enum/TextSection.js.map +0 -1
- package/dist/cjs/model/info/enum/InfoFormat.js +0 -11
- package/dist/cjs/model/info/enum/InfoFormat.js.map +0 -1
- package/dist/cjs/model/info/enum/InfoType.js +0 -12
- package/dist/cjs/model/info/enum/InfoType.js.map +0 -1
- package/dist/cjs/model/json/BitJson.js +0 -3
- package/dist/cjs/model/json/BitJson.js.map +0 -1
- package/dist/cjs/model/json/BitWrapperJson.js +0 -3
- package/dist/cjs/model/json/BitWrapperJson.js.map +0 -1
- package/dist/cjs/model/json/BodyBitJson.js +0 -3
- package/dist/cjs/model/json/BodyBitJson.js.map +0 -1
- package/dist/cjs/model/json/ParserJson.js +0 -3
- package/dist/cjs/model/json/ParserJson.js.map +0 -1
- package/dist/cjs/model/json/ResourceJson.js +0 -3
- package/dist/cjs/model/json/ResourceJson.js.map +0 -1
- package/dist/cjs/model/parser/ParserData.js +0 -3
- package/dist/cjs/model/parser/ParserData.js.map +0 -1
- package/dist/cjs/model/parser/ParserError.js +0 -3
- package/dist/cjs/model/parser/ParserError.js.map +0 -1
- package/dist/cjs/model/parser/ParserInfo.js +0 -3
- package/dist/cjs/model/parser/ParserInfo.js.map +0 -1
- package/dist/cjs/model/parser/ParserLocation.js +0 -3
- package/dist/cjs/model/parser/ParserLocation.js.map +0 -1
- package/dist/cjs/model/parser/ParserLocationRange.js +0 -3
- package/dist/cjs/model/parser/ParserLocationRange.js.map +0 -1
- package/dist/cjs/model/parser/TagValidationData.js +0 -3
- package/dist/cjs/model/parser/TagValidationData.js.map +0 -1
- package/dist/cjs/parser/bitmark/BitmarkParser.js +0 -25
- package/dist/cjs/parser/bitmark/BitmarkParser.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParser.js +0 -7
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParser.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js +0 -614
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserHelper.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js +0 -716
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js +0 -69
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserTypes.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js +0 -745
- package/dist/cjs/parser/bitmark/peg/BitmarkPegParserValidator.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/PeggyGrammarLocation.js +0 -82
- package/dist/cjs/parser/bitmark/peg/PeggyGrammarLocation.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +0 -260
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +0 -50
- package/dist/cjs/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +0 -885
- package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +0 -27
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js +0 -61
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +0 -63
- package/dist/cjs/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +0 -161
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +0 -55
- package/dist/cjs/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +0 -31
- package/dist/cjs/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +0 -59
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js +0 -16
- package/dist/cjs/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js +0 -29
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +0 -20
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js +0 -45
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +0 -44
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js +0 -11
- package/dist/cjs/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +0 -57
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +0 -158
- package/dist/cjs/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +0 -37
- package/dist/cjs/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +0 -24
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +0 -163
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js +0 -27
- package/dist/cjs/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +0 -28
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +0 -53
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +0 -203
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +0 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +0 -24
- package/dist/cjs/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +0 -1
- package/dist/cjs/parser/json/JsonParser.js +0 -270
- package/dist/cjs/parser/json/JsonParser.js.map +0 -1
- package/dist/cjs/parser/text/TextParser.js +0 -148
- package/dist/cjs/parser/text/TextParser.js.map +0 -1
- package/dist/cjs/parser/text/peg/TextPegParser.js +0 -7
- package/dist/cjs/parser/text/peg/TextPegParser.js.map +0 -1
- package/dist/cjs/utils/ArrayUtils.js +0 -43
- package/dist/cjs/utils/ArrayUtils.js.map +0 -1
- package/dist/cjs/utils/BitUtils.js +0 -75
- package/dist/cjs/utils/BitUtils.js.map +0 -1
- package/dist/cjs/utils/BooleanUtils.js +0 -62
- package/dist/cjs/utils/BooleanUtils.js.map +0 -1
- package/dist/cjs/utils/FileUtils.js +0 -75
- package/dist/cjs/utils/FileUtils.js.map +0 -1
- package/dist/cjs/utils/NumberUtils.js +0 -62
- package/dist/cjs/utils/NumberUtils.js.map +0 -1
- package/dist/cjs/utils/ObjectUtils.js +0 -417
- package/dist/cjs/utils/ObjectUtils.js.map +0 -1
- package/dist/cjs/utils/StringUtils.js +0 -183
- package/dist/cjs/utils/StringUtils.js.map +0 -1
- package/dist/cjs/utils/UrlUtils.js +0 -37
- package/dist/cjs/utils/UrlUtils.js.map +0 -1
- package/dist/cjs/utils/env/Env.js +0 -131
- package/dist/cjs/utils/env/Env.js.map +0 -1
- package/dist/cjs/utils/env/Environment.js +0 -15
- package/dist/cjs/utils/env/Environment.js.map +0 -1
- package/dist/cjs/utils/env/Os.js +0 -14
- package/dist/cjs/utils/env/Os.js.map +0 -1
- package/dist/cjs/utils/env/Version.js +0 -12
- package/dist/cjs/utils/env/Version.js.map +0 -1
- package/dist/cjs/utils/env/userAgent.js +0 -88
- package/dist/cjs/utils/env/userAgent.js.map +0 -1
- package/dist/cjs/utils/polyfill/fs.js +0 -14
- package/dist/cjs/utils/polyfill/fs.js.map +0 -1
- package/dist/esm/BitmarkParserGenerator.js +0 -735
- package/dist/esm/BitmarkParserGenerator.js.map +0 -1
- package/dist/esm/ast/Ast.js +0 -217
- package/dist/esm/ast/Ast.js.map +0 -1
- package/dist/esm/ast/BaseBuilder.js +0 -190
- package/dist/esm/ast/BaseBuilder.js.map +0 -1
- package/dist/esm/ast/Builder.js +0 -1775
- package/dist/esm/ast/Builder.js.map +0 -1
- package/dist/esm/ast/ResourceBuilder.js +0 -960
- package/dist/esm/ast/ResourceBuilder.js.map +0 -1
- package/dist/esm/ast/rules/NodeValidator.js +0 -181
- package/dist/esm/ast/rules/NodeValidator.js.map +0 -1
- package/dist/esm/ast/writer/FileWriter.js +0 -80
- package/dist/esm/ast/writer/FileWriter.js.map +0 -1
- package/dist/esm/ast/writer/StreamWriter.js +0 -83
- package/dist/esm/ast/writer/StreamWriter.js.map +0 -1
- package/dist/esm/ast/writer/StringWriter.js +0 -112
- package/dist/esm/ast/writer/StringWriter.js.map +0 -1
- package/dist/esm/ast/writer/Writer.js +0 -2
- package/dist/esm/ast/writer/Writer.js.map +0 -1
- package/dist/esm/breakscaping/Breakscape.js +0 -77
- package/dist/esm/breakscaping/Breakscape.js.map +0 -1
- package/dist/esm/breakscaping/BreakscapeLoop.js +0 -302
- package/dist/esm/breakscaping/BreakscapeLoop.js.map +0 -1
- package/dist/esm/breakscaping/BreakscapeOptions.js +0 -2
- package/dist/esm/breakscaping/BreakscapeOptions.js.map +0 -1
- package/dist/esm/breakscaping/BreakscapeRegex.js +0 -177
- package/dist/esm/breakscaping/BreakscapeRegex.js.map +0 -1
- package/dist/esm/breakscaping/RegexConfigs.js +0 -35
- package/dist/esm/breakscaping/RegexConfigs.js.map +0 -1
- package/dist/esm/config/Config.js +0 -349
- package/dist/esm/config/Config.js.map +0 -1
- package/dist/esm/config/ConfigHydrator.js +0 -158
- package/dist/esm/config/ConfigHydrator.js.map +0 -1
- package/dist/esm/config/raw/bits.js +0 -2612
- package/dist/esm/config/raw/bits.js.map +0 -1
- package/dist/esm/config/raw/cardSets.js +0 -546
- package/dist/esm/config/raw/cardSets.js.map +0 -1
- package/dist/esm/config/raw/groups.js +0 -1179
- package/dist/esm/config/raw/groups.js.map +0 -1
- package/dist/esm/config/raw/properties.js +0 -1003
- package/dist/esm/config/raw/properties.js.map +0 -1
- package/dist/esm/config/raw/resources.js +0 -100
- package/dist/esm/config/raw/resources.js.map +0 -1
- package/dist/esm/config/raw/tags.js +0 -45
- package/dist/esm/config/raw/tags.js.map +0 -1
- package/dist/esm/generated/build-info.js +0 -10
- package/dist/esm/generated/build-info.js.map +0 -1
- package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js +0 -3163
- package/dist/esm/generated/parser/bitmark/bitmark-peggy-parser.js.map +0 -1
- package/dist/esm/generated/parser/text/text-peggy-parser.js +0 -9654
- package/dist/esm/generated/parser/text/text-peggy-parser.js.map +0 -1
- package/dist/esm/generator/AstWalkerGenerator.js +0 -83
- package/dist/esm/generator/AstWalkerGenerator.js.map +0 -1
- package/dist/esm/generator/Generator.js +0 -2
- package/dist/esm/generator/Generator.js.map +0 -1
- package/dist/esm/generator/bitmark/BitmarkFileGenerator.js +0 -46
- package/dist/esm/generator/bitmark/BitmarkFileGenerator.js.map +0 -1
- package/dist/esm/generator/bitmark/BitmarkGenerator.js +0 -2598
- package/dist/esm/generator/bitmark/BitmarkGenerator.js.map +0 -1
- package/dist/esm/generator/bitmark/BitmarkStringGenerator.js +0 -48
- package/dist/esm/generator/bitmark/BitmarkStringGenerator.js.map +0 -1
- package/dist/esm/generator/json/JsonFileGenerator.js +0 -50
- package/dist/esm/generator/json/JsonFileGenerator.js.map +0 -1
- package/dist/esm/generator/json/JsonGenerator.js +0 -1578
- package/dist/esm/generator/json/JsonGenerator.js.map +0 -1
- package/dist/esm/generator/json/JsonObjectGenerator.js +0 -48
- package/dist/esm/generator/json/JsonObjectGenerator.js.map +0 -1
- package/dist/esm/generator/json/JsonStringGenerator.js +0 -47
- package/dist/esm/generator/json/JsonStringGenerator.js.map +0 -1
- package/dist/esm/generator/text/TextGenerator.js +0 -1196
- package/dist/esm/generator/text/TextGenerator.js.map +0 -1
- package/dist/esm/index.js +0 -49
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/info/InfoBuilder.js +0 -40
- package/dist/esm/info/InfoBuilder.js.map +0 -1
- package/dist/esm/init/init.js +0 -13
- package/dist/esm/init/init.js.map +0 -1
- package/dist/esm/model/ast/BreakscapedString.js +0 -2
- package/dist/esm/model/ast/BreakscapedString.js.map +0 -1
- package/dist/esm/model/ast/NodeType.js +0 -554
- package/dist/esm/model/ast/NodeType.js.map +0 -1
- package/dist/esm/model/ast/Nodes.js +0 -2
- package/dist/esm/model/ast/Nodes.js.map +0 -1
- package/dist/esm/model/ast/StardardString.js +0 -2
- package/dist/esm/model/ast/StardardString.js.map +0 -1
- package/dist/esm/model/ast/TextNodes.js +0 -2
- package/dist/esm/model/ast/TextNodes.js.map +0 -1
- package/dist/esm/model/config/AbstractTagConfig.js +0 -15
- package/dist/esm/model/config/AbstractTagConfig.js.map +0 -1
- package/dist/esm/model/config/BitConfig.js +0 -69
- package/dist/esm/model/config/BitConfig.js.map +0 -1
- package/dist/esm/model/config/CardSetConfig.js +0 -23
- package/dist/esm/model/config/CardSetConfig.js.map +0 -1
- package/dist/esm/model/config/CardVariantConfig.js +0 -29
- package/dist/esm/model/config/CardVariantConfig.js.map +0 -1
- package/dist/esm/model/config/MarkupTagConfig.js +0 -38
- package/dist/esm/model/config/MarkupTagConfig.js.map +0 -1
- package/dist/esm/model/config/PropertyTagConfig.js +0 -47
- package/dist/esm/model/config/PropertyTagConfig.js.map +0 -1
- package/dist/esm/model/config/ResourceTagConfig.js +0 -39
- package/dist/esm/model/config/ResourceTagConfig.js.map +0 -1
- package/dist/esm/model/config/ResourcesConfig.js +0 -28
- package/dist/esm/model/config/ResourcesConfig.js.map +0 -1
- package/dist/esm/model/config/TagConfig.js +0 -2
- package/dist/esm/model/config/TagConfig.js.map +0 -1
- package/dist/esm/model/config/TagsConfig.js +0 -2
- package/dist/esm/model/config/TagsConfig.js.map +0 -1
- package/dist/esm/model/config/TagsConfigWithInfo.js +0 -2
- package/dist/esm/model/config/TagsConfigWithInfo.js.map +0 -1
- package/dist/esm/model/config/_Config.js +0 -2
- package/dist/esm/model/config/_Config.js.map +0 -1
- package/dist/esm/model/config/enum/CardSetConfigKey.js +0 -25
- package/dist/esm/model/config/enum/CardSetConfigKey.js.map +0 -1
- package/dist/esm/model/config/enum/ConfigKey.js +0 -26
- package/dist/esm/model/config/enum/ConfigKey.js.map +0 -1
- package/dist/esm/model/config/enum/GroupConfigKey.js +0 -53
- package/dist/esm/model/config/enum/GroupConfigKey.js.map +0 -1
- package/dist/esm/model/config/enum/GroupConfigType.js +0 -11
- package/dist/esm/model/config/enum/GroupConfigType.js.map +0 -1
- package/dist/esm/model/config/enum/PropertyConfigKey.js +0 -211
- package/dist/esm/model/config/enum/PropertyConfigKey.js.map +0 -1
- package/dist/esm/model/config/enum/ResourceConfigKey.js +0 -36
- package/dist/esm/model/config/enum/ResourceConfigKey.js.map +0 -1
- package/dist/esm/model/config/enum/TagConfigKey.js +0 -22
- package/dist/esm/model/config/enum/TagConfigKey.js.map +0 -1
- package/dist/esm/model/enum/BitTagType.js +0 -10
- package/dist/esm/model/enum/BitTagType.js.map +0 -1
- package/dist/esm/model/enum/BitType.js +0 -573
- package/dist/esm/model/enum/BitType.js.map +0 -1
- package/dist/esm/model/enum/BitmarkGeneratorOutput.js +0 -2
- package/dist/esm/model/enum/BitmarkGeneratorOutput.js.map +0 -1
- package/dist/esm/model/enum/BitmarkParserType.js +0 -6
- package/dist/esm/model/enum/BitmarkParserType.js.map +0 -1
- package/dist/esm/model/enum/BitmarkVersion.js +0 -8
- package/dist/esm/model/enum/BitmarkVersion.js.map +0 -1
- package/dist/esm/model/enum/BodyBitType.js +0 -11
- package/dist/esm/model/enum/BodyBitType.js.map +0 -1
- package/dist/esm/model/enum/BodyTextFormat.js +0 -11
- package/dist/esm/model/enum/BodyTextFormat.js.map +0 -1
- package/dist/esm/model/enum/CardSetVersion.js +0 -7
- package/dist/esm/model/enum/CardSetVersion.js.map +0 -1
- package/dist/esm/model/enum/Count.js +0 -6
- package/dist/esm/model/enum/Count.js.map +0 -1
- package/dist/esm/model/enum/DeprecatedTextFormat.js +0 -6
- package/dist/esm/model/enum/DeprecatedTextFormat.js.map +0 -1
- package/dist/esm/model/enum/ExampleType.js +0 -8
- package/dist/esm/model/enum/ExampleType.js.map +0 -1
- package/dist/esm/model/enum/PropertyAstKey.js +0 -15
- package/dist/esm/model/enum/PropertyAstKey.js.map +0 -1
- package/dist/esm/model/enum/PropertyFormat.js +0 -11
- package/dist/esm/model/enum/PropertyFormat.js.map +0 -1
- package/dist/esm/model/enum/PropertyJsonKey.js +0 -11
- package/dist/esm/model/enum/PropertyJsonKey.js.map +0 -1
- package/dist/esm/model/enum/PropertyTag.js +0 -5
- package/dist/esm/model/enum/PropertyTag.js.map +0 -1
- package/dist/esm/model/enum/ResourceJsonKey.js +0 -24
- package/dist/esm/model/enum/ResourceJsonKey.js.map +0 -1
- package/dist/esm/model/enum/ResourceTag.js +0 -34
- package/dist/esm/model/enum/ResourceTag.js.map +0 -1
- package/dist/esm/model/enum/Tag.js +0 -18
- package/dist/esm/model/enum/Tag.js.map +0 -1
- package/dist/esm/model/enum/TextFormat.js +0 -13
- package/dist/esm/model/enum/TextFormat.js.map +0 -1
- package/dist/esm/model/enum/TextLocation.js +0 -12
- package/dist/esm/model/enum/TextLocation.js.map +0 -1
- package/dist/esm/model/enum/TextMarkType.js +0 -51
- package/dist/esm/model/enum/TextMarkType.js.map +0 -1
- package/dist/esm/model/enum/TextNodeType.js +0 -32
- package/dist/esm/model/enum/TextNodeType.js.map +0 -1
- package/dist/esm/model/enum/TextSection.js +0 -15
- package/dist/esm/model/enum/TextSection.js.map +0 -1
- package/dist/esm/model/info/enum/InfoFormat.js +0 -8
- package/dist/esm/model/info/enum/InfoFormat.js.map +0 -1
- package/dist/esm/model/info/enum/InfoType.js +0 -9
- package/dist/esm/model/info/enum/InfoType.js.map +0 -1
- package/dist/esm/model/json/BitJson.js +0 -2
- package/dist/esm/model/json/BitJson.js.map +0 -1
- package/dist/esm/model/json/BitWrapperJson.js +0 -2
- package/dist/esm/model/json/BitWrapperJson.js.map +0 -1
- package/dist/esm/model/json/BodyBitJson.js +0 -2
- package/dist/esm/model/json/BodyBitJson.js.map +0 -1
- package/dist/esm/model/json/ParserJson.js +0 -2
- package/dist/esm/model/json/ParserJson.js.map +0 -1
- package/dist/esm/model/json/ResourceJson.js +0 -2
- package/dist/esm/model/json/ResourceJson.js.map +0 -1
- package/dist/esm/model/parser/ParserData.js +0 -2
- package/dist/esm/model/parser/ParserData.js.map +0 -1
- package/dist/esm/model/parser/ParserError.js +0 -2
- package/dist/esm/model/parser/ParserError.js.map +0 -1
- package/dist/esm/model/parser/ParserInfo.js +0 -2
- package/dist/esm/model/parser/ParserInfo.js.map +0 -1
- package/dist/esm/model/parser/ParserLocation.js +0 -2
- package/dist/esm/model/parser/ParserLocation.js.map +0 -1
- package/dist/esm/model/parser/ParserLocationRange.js +0 -2
- package/dist/esm/model/parser/ParserLocationRange.js.map +0 -1
- package/dist/esm/model/parser/TagValidationData.js +0 -2
- package/dist/esm/model/parser/TagValidationData.js.map +0 -1
- package/dist/esm/parser/bitmark/BitmarkParser.js +0 -22
- package/dist/esm/parser/bitmark/BitmarkParser.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParser.js +0 -4
- package/dist/esm/parser/bitmark/peg/BitmarkPegParser.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js +0 -611
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserHelper.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js +0 -713
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js +0 -59
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserTypes.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js +0 -742
- package/dist/esm/parser/bitmark/peg/BitmarkPegParserValidator.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/PeggyGrammarLocation.js +0 -79
- package/dist/esm/parser/bitmark/peg/PeggyGrammarLocation.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js +0 -257
- package/dist/esm/parser/bitmark/peg/contentProcessors/BodyContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js +0 -48
- package/dist/esm/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +0 -883
- package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js +0 -25
- package/dist/esm/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js +0 -58
- package/dist/esm/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js +0 -61
- package/dist/esm/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js +0 -159
- package/dist/esm/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js +0 -52
- package/dist/esm/parser/bitmark/peg/contentProcessors/FooterContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js +0 -29
- package/dist/esm/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js +0 -57
- package/dist/esm/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js +0 -14
- package/dist/esm/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js +0 -27
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js +0 -18
- package/dist/esm/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js +0 -43
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js +0 -42
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js +0 -9
- package/dist/esm/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js +0 -55
- package/dist/esm/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js +0 -156
- package/dist/esm/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js +0 -35
- package/dist/esm/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js +0 -22
- package/dist/esm/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js +0 -160
- package/dist/esm/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js +0 -25
- package/dist/esm/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js +0 -26
- package/dist/esm/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js +0 -50
- package/dist/esm/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js +0 -201
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.js.map +0 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js +0 -22
- package/dist/esm/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.js.map +0 -1
- package/dist/esm/parser/json/JsonParser.js +0 -267
- package/dist/esm/parser/json/JsonParser.js.map +0 -1
- package/dist/esm/parser/text/TextParser.js +0 -145
- package/dist/esm/parser/text/TextParser.js.map +0 -1
- package/dist/esm/parser/text/peg/TextPegParser.js +0 -4
- package/dist/esm/parser/text/peg/TextPegParser.js.map +0 -1
- package/dist/esm/utils/ArrayUtils.js +0 -40
- package/dist/esm/utils/ArrayUtils.js.map +0 -1
- package/dist/esm/utils/BitUtils.js +0 -72
- package/dist/esm/utils/BitUtils.js.map +0 -1
- package/dist/esm/utils/BooleanUtils.js +0 -59
- package/dist/esm/utils/BooleanUtils.js.map +0 -1
- package/dist/esm/utils/FileUtils.js +0 -36
- package/dist/esm/utils/FileUtils.js.map +0 -1
- package/dist/esm/utils/NumberUtils.js +0 -59
- package/dist/esm/utils/NumberUtils.js.map +0 -1
- package/dist/esm/utils/ObjectUtils.js +0 -411
- package/dist/esm/utils/ObjectUtils.js.map +0 -1
- package/dist/esm/utils/StringUtils.js +0 -180
- package/dist/esm/utils/StringUtils.js.map +0 -1
- package/dist/esm/utils/UrlUtils.js +0 -34
- package/dist/esm/utils/UrlUtils.js.map +0 -1
- package/dist/esm/utils/env/Env.js +0 -127
- package/dist/esm/utils/env/Env.js.map +0 -1
- package/dist/esm/utils/env/Environment.js +0 -12
- package/dist/esm/utils/env/Environment.js.map +0 -1
- package/dist/esm/utils/env/Os.js +0 -11
- package/dist/esm/utils/env/Os.js.map +0 -1
- package/dist/esm/utils/env/Version.js +0 -9
- package/dist/esm/utils/env/Version.js.map +0 -1
- package/dist/esm/utils/env/userAgent.js +0 -86
- package/dist/esm/utils/env/userAgent.js.map +0 -1
- package/dist/esm/utils/polyfill/fs.js +0 -10
- package/dist/esm/utils/polyfill/fs.js.map +0 -1
- package/dist/types/BitmarkParserGenerator.d.ts +0 -478
- package/dist/types/BitmarkParserGenerator.d.ts.map +0 -1
- package/dist/types/ast/Ast.d.ts +0 -137
- package/dist/types/ast/Ast.d.ts.map +0 -1
- package/dist/types/ast/BaseBuilder.d.ts +0 -64
- package/dist/types/ast/BaseBuilder.d.ts.map +0 -1
- package/dist/types/ast/Builder.d.ts +0 -692
- package/dist/types/ast/Builder.d.ts.map +0 -1
- package/dist/types/ast/ResourceBuilder.d.ts +0 -384
- package/dist/types/ast/ResourceBuilder.d.ts.map +0 -1
- package/dist/types/ast/rules/NodeValidator.d.ts +0 -28
- package/dist/types/ast/rules/NodeValidator.d.ts.map +0 -1
- package/dist/types/ast/writer/FileWriter.d.ts +0 -37
- package/dist/types/ast/writer/FileWriter.d.ts.map +0 -1
- package/dist/types/ast/writer/StreamWriter.d.ts +0 -29
- package/dist/types/ast/writer/StreamWriter.d.ts.map +0 -1
- package/dist/types/ast/writer/StringWriter.d.ts +0 -30
- package/dist/types/ast/writer/StringWriter.d.ts.map +0 -1
- package/dist/types/ast/writer/Writer.d.ts +0 -72
- package/dist/types/ast/writer/Writer.d.ts.map +0 -1
- package/dist/types/breakscaping/Breakscape.d.ts +0 -44
- package/dist/types/breakscaping/Breakscape.d.ts.map +0 -1
- package/dist/types/breakscaping/BreakscapeLoop.d.ts +0 -142
- package/dist/types/breakscaping/BreakscapeLoop.d.ts.map +0 -1
- package/dist/types/breakscaping/BreakscapeOptions.d.ts +0 -30
- package/dist/types/breakscaping/BreakscapeOptions.d.ts.map +0 -1
- package/dist/types/breakscaping/BreakscapeRegex.d.ts +0 -96
- package/dist/types/breakscaping/BreakscapeRegex.d.ts.map +0 -1
- package/dist/types/breakscaping/RegexConfigs.d.ts +0 -35
- package/dist/types/breakscaping/RegexConfigs.d.ts.map +0 -1
- package/dist/types/config/Config.d.ts +0 -115
- package/dist/types/config/Config.d.ts.map +0 -1
- package/dist/types/config/ConfigHydrator.d.ts +0 -16
- package/dist/types/config/ConfigHydrator.d.ts.map +0 -1
- package/dist/types/config/raw/bits.d.ts +0 -4
- package/dist/types/config/raw/bits.d.ts.map +0 -1
- package/dist/types/config/raw/cardSets.d.ts +0 -4
- package/dist/types/config/raw/cardSets.d.ts.map +0 -1
- package/dist/types/config/raw/groups.d.ts +0 -4
- package/dist/types/config/raw/groups.d.ts.map +0 -1
- package/dist/types/config/raw/properties.d.ts +0 -4
- package/dist/types/config/raw/properties.d.ts.map +0 -1
- package/dist/types/config/raw/resources.d.ts +0 -4
- package/dist/types/config/raw/resources.d.ts.map +0 -1
- package/dist/types/config/raw/tags.d.ts +0 -4
- package/dist/types/config/raw/tags.d.ts.map +0 -1
- package/dist/types/generated/build-info.d.ts +0 -8
- package/dist/types/generated/build-info.d.ts.map +0 -1
- package/dist/types/generated/parser/bitmark/bitmark-peggy-parser.d.ts +0 -12
- package/dist/types/generated/parser/bitmark/bitmark-peggy-parser.d.ts.map +0 -1
- package/dist/types/generated/parser/text/text-peggy-parser.d.ts +0 -12
- package/dist/types/generated/parser/text/text-peggy-parser.d.ts.map +0 -1
- package/dist/types/generator/AstWalkerGenerator.d.ts +0 -32
- package/dist/types/generator/AstWalkerGenerator.d.ts.map +0 -1
- package/dist/types/generator/Generator.d.ts +0 -6
- package/dist/types/generator/Generator.d.ts.map +0 -1
- package/dist/types/generator/bitmark/BitmarkFileGenerator.d.ts +0 -41
- package/dist/types/generator/bitmark/BitmarkFileGenerator.d.ts.map +0 -1
- package/dist/types/generator/bitmark/BitmarkGenerator.d.ts +0 -401
- package/dist/types/generator/bitmark/BitmarkGenerator.d.ts.map +0 -1
- package/dist/types/generator/bitmark/BitmarkStringGenerator.d.ts +0 -31
- package/dist/types/generator/bitmark/BitmarkStringGenerator.d.ts.map +0 -1
- package/dist/types/generator/json/JsonFileGenerator.d.ts +0 -45
- package/dist/types/generator/json/JsonFileGenerator.d.ts.map +0 -1
- package/dist/types/generator/json/JsonGenerator.d.ts +0 -357
- package/dist/types/generator/json/JsonGenerator.d.ts.map +0 -1
- package/dist/types/generator/json/JsonObjectGenerator.d.ts +0 -32
- package/dist/types/generator/json/JsonObjectGenerator.d.ts.map +0 -1
- package/dist/types/generator/json/JsonStringGenerator.d.ts +0 -30
- package/dist/types/generator/json/JsonStringGenerator.d.ts.map +0 -1
- package/dist/types/generator/text/TextGenerator.d.ts +0 -228
- package/dist/types/generator/text/TextGenerator.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -50
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/info/InfoBuilder.d.ts +0 -18
- package/dist/types/info/InfoBuilder.d.ts.map +0 -1
- package/dist/types/init/init.d.ts +0 -4
- package/dist/types/init/init.d.ts.map +0 -1
- package/dist/types/model/ast/BreakscapedString.d.ts +0 -4
- package/dist/types/model/ast/BreakscapedString.d.ts.map +0 -1
- package/dist/types/model/ast/NodeType.d.ts +0 -1093
- package/dist/types/model/ast/NodeType.d.ts.map +0 -1
- package/dist/types/model/ast/Nodes.d.ts +0 -268
- package/dist/types/model/ast/Nodes.d.ts.map +0 -1
- package/dist/types/model/ast/StardardString.d.ts +0 -4
- package/dist/types/model/ast/StardardString.d.ts.map +0 -1
- package/dist/types/model/ast/TextNodes.d.ts +0 -130
- package/dist/types/model/ast/TextNodes.d.ts.map +0 -1
- package/dist/types/model/config/AbstractTagConfig.d.ts +0 -24
- package/dist/types/model/config/AbstractTagConfig.d.ts.map +0 -1
- package/dist/types/model/config/BitConfig.d.ts +0 -48
- package/dist/types/model/config/BitConfig.d.ts.map +0 -1
- package/dist/types/model/config/CardSetConfig.d.ts +0 -14
- package/dist/types/model/config/CardSetConfig.d.ts.map +0 -1
- package/dist/types/model/config/CardVariantConfig.d.ts +0 -16
- package/dist/types/model/config/CardVariantConfig.d.ts.map +0 -1
- package/dist/types/model/config/MarkupTagConfig.d.ts +0 -17
- package/dist/types/model/config/MarkupTagConfig.d.ts.map +0 -1
- package/dist/types/model/config/PropertyTagConfig.d.ts +0 -23
- package/dist/types/model/config/PropertyTagConfig.d.ts.map +0 -1
- package/dist/types/model/config/ResourceTagConfig.d.ts +0 -18
- package/dist/types/model/config/ResourceTagConfig.d.ts.map +0 -1
- package/dist/types/model/config/ResourcesConfig.d.ts +0 -14
- package/dist/types/model/config/ResourcesConfig.d.ts.map +0 -1
- package/dist/types/model/config/TagConfig.d.ts +0 -5
- package/dist/types/model/config/TagConfig.d.ts.map +0 -1
- package/dist/types/model/config/TagsConfig.d.ts +0 -5
- package/dist/types/model/config/TagsConfig.d.ts.map +0 -1
- package/dist/types/model/config/TagsConfigWithInfo.d.ts +0 -9
- package/dist/types/model/config/TagsConfigWithInfo.d.ts.map +0 -1
- package/dist/types/model/config/_Config.d.ts +0 -119
- package/dist/types/model/config/_Config.d.ts.map +0 -1
- package/dist/types/model/config/enum/CardSetConfigKey.d.ts +0 -43
- package/dist/types/model/config/enum/CardSetConfigKey.d.ts.map +0 -1
- package/dist/types/model/config/enum/ConfigKey.d.ts +0 -578
- package/dist/types/model/config/enum/ConfigKey.d.ts.map +0 -1
- package/dist/types/model/config/enum/GroupConfigKey.d.ts +0 -144
- package/dist/types/model/config/enum/GroupConfigKey.d.ts.map +0 -1
- package/dist/types/model/config/enum/GroupConfigType.d.ts +0 -16
- package/dist/types/model/config/enum/GroupConfigType.d.ts.map +0 -1
- package/dist/types/model/config/enum/PropertyConfigKey.d.ts +0 -618
- package/dist/types/model/config/enum/PropertyConfigKey.d.ts.map +0 -1
- package/dist/types/model/config/enum/ResourceConfigKey.d.ts +0 -87
- package/dist/types/model/config/enum/ResourceConfigKey.d.ts.map +0 -1
- package/dist/types/model/config/enum/TagConfigKey.d.ts +0 -51
- package/dist/types/model/config/enum/TagConfigKey.d.ts.map +0 -1
- package/dist/types/model/enum/BitTagType.d.ts +0 -15
- package/dist/types/model/enum/BitTagType.d.ts.map +0 -1
- package/dist/types/model/enum/BitType.d.ts +0 -1143
- package/dist/types/model/enum/BitType.d.ts.map +0 -1
- package/dist/types/model/enum/BitmarkGeneratorOutput.d.ts +0 -1
- package/dist/types/model/enum/BitmarkGeneratorOutput.d.ts.map +0 -1
- package/dist/types/model/enum/BitmarkParserType.d.ts +0 -7
- package/dist/types/model/enum/BitmarkParserType.d.ts.map +0 -1
- package/dist/types/model/enum/BitmarkVersion.d.ts +0 -12
- package/dist/types/model/enum/BitmarkVersion.d.ts.map +0 -1
- package/dist/types/model/enum/BodyBitType.d.ts +0 -25
- package/dist/types/model/enum/BodyBitType.d.ts.map +0 -1
- package/dist/types/model/enum/BodyTextFormat.d.ts +0 -17
- package/dist/types/model/enum/BodyTextFormat.d.ts.map +0 -1
- package/dist/types/model/enum/CardSetVersion.d.ts +0 -11
- package/dist/types/model/enum/CardSetVersion.d.ts.map +0 -1
- package/dist/types/model/enum/Count.d.ts +0 -7
- package/dist/types/model/enum/Count.d.ts.map +0 -1
- package/dist/types/model/enum/DeprecatedTextFormat.d.ts +0 -7
- package/dist/types/model/enum/DeprecatedTextFormat.d.ts.map +0 -1
- package/dist/types/model/enum/ExampleType.d.ts +0 -13
- package/dist/types/model/enum/ExampleType.d.ts.map +0 -1
- package/dist/types/model/enum/PropertyAstKey.d.ts +0 -22
- package/dist/types/model/enum/PropertyAstKey.d.ts.map +0 -1
- package/dist/types/model/enum/PropertyFormat.d.ts +0 -19
- package/dist/types/model/enum/PropertyFormat.d.ts.map +0 -1
- package/dist/types/model/enum/PropertyJsonKey.d.ts +0 -10
- package/dist/types/model/enum/PropertyJsonKey.d.ts.map +0 -1
- package/dist/types/model/enum/PropertyTag.d.ts +0 -419
- package/dist/types/model/enum/PropertyTag.d.ts.map +0 -1
- package/dist/types/model/enum/ResourceJsonKey.d.ts +0 -45
- package/dist/types/model/enum/ResourceJsonKey.d.ts.map +0 -1
- package/dist/types/model/enum/ResourceTag.d.ts +0 -63
- package/dist/types/model/enum/ResourceTag.d.ts.map +0 -1
- package/dist/types/model/enum/Tag.d.ts +0 -33
- package/dist/types/model/enum/Tag.d.ts.map +0 -1
- package/dist/types/model/enum/TextFormat.d.ts +0 -17
- package/dist/types/model/enum/TextFormat.d.ts.map +0 -1
- package/dist/types/model/enum/TextLocation.d.ts +0 -16
- package/dist/types/model/enum/TextLocation.d.ts.map +0 -1
- package/dist/types/model/enum/TextMarkType.d.ts +0 -93
- package/dist/types/model/enum/TextMarkType.d.ts.map +0 -1
- package/dist/types/model/enum/TextNodeType.d.ts +0 -53
- package/dist/types/model/enum/TextNodeType.d.ts.map +0 -1
- package/dist/types/model/enum/TextSection.d.ts +0 -27
- package/dist/types/model/enum/TextSection.d.ts.map +0 -1
- package/dist/types/model/info/enum/InfoFormat.d.ts +0 -13
- package/dist/types/model/info/enum/InfoFormat.d.ts.map +0 -1
- package/dist/types/model/info/enum/InfoType.d.ts +0 -15
- package/dist/types/model/info/enum/InfoType.d.ts.map +0 -1
- package/dist/types/model/json/BitJson.d.ts +0 -479
- package/dist/types/model/json/BitJson.d.ts.map +0 -1
- package/dist/types/model/json/BitWrapperJson.d.ts +0 -8
- package/dist/types/model/json/BitWrapperJson.d.ts.map +0 -1
- package/dist/types/model/json/BodyBitJson.d.ts +0 -81
- package/dist/types/model/json/BodyBitJson.d.ts.map +0 -1
- package/dist/types/model/json/ParserJson.d.ts +0 -12
- package/dist/types/model/json/ParserJson.d.ts.map +0 -1
- package/dist/types/model/json/ResourceJson.d.ts +0 -244
- package/dist/types/model/json/ResourceJson.d.ts.map +0 -1
- package/dist/types/model/parser/ParserData.d.ts +0 -11
- package/dist/types/model/parser/ParserData.d.ts.map +0 -1
- package/dist/types/model/parser/ParserError.d.ts +0 -17
- package/dist/types/model/parser/ParserError.d.ts.map +0 -1
- package/dist/types/model/parser/ParserInfo.d.ts +0 -10
- package/dist/types/model/parser/ParserInfo.d.ts.map +0 -1
- package/dist/types/model/parser/ParserLocation.d.ts +0 -6
- package/dist/types/model/parser/ParserLocation.d.ts.map +0 -1
- package/dist/types/model/parser/ParserLocationRange.d.ts +0 -10
- package/dist/types/model/parser/ParserLocationRange.d.ts.map +0 -1
- package/dist/types/model/parser/TagValidationData.d.ts +0 -24
- package/dist/types/model/parser/TagValidationData.d.ts.map +0 -1
- package/dist/types/parser/bitmark/BitmarkParser.d.ts +0 -21
- package/dist/types/parser/bitmark/BitmarkParser.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParser.d.ts +0 -8
- package/dist/types/parser/bitmark/peg/BitmarkPegParser.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts +0 -108
- package/dist/types/parser/bitmark/peg/BitmarkPegParserHelper.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts +0 -137
- package/dist/types/parser/bitmark/peg/BitmarkPegParserProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts +0 -333
- package/dist/types/parser/bitmark/peg/BitmarkPegParserTypes.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts +0 -186
- package/dist/types/parser/bitmark/peg/BitmarkPegParserValidator.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/PeggyGrammarLocation.d.ts +0 -61
- package/dist/types/parser/bitmark/peg/PeggyGrammarLocation.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/BodyContentProcessor.d.ts +0 -37
- package/dist/types/parser/bitmark/peg/contentProcessors/BodyContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/BookChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts +0 -7
- package/dist/types/parser/bitmark/peg/contentProcessors/CardContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/ClozeTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.d.ts +0 -15
- package/dist/types/parser/bitmark/peg/contentProcessors/ContentProcessorUtils.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/DefaultTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.d.ts +0 -4
- package/dist/types/parser/bitmark/peg/contentProcessors/ExampleTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/FooterContentProcessor.d.ts +0 -14
- package/dist/types/parser/bitmark/peg/contentProcessors/FooterContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts +0 -6
- package/dist/types/parser/bitmark/peg/contentProcessors/GapChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/ImageSourceChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.d.ts +0 -4
- package/dist/types/parser/bitmark/peg/contentProcessors/InternalCommentTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/ItemLeadTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.d.ts +0 -6
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkConfigChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.d.ts +0 -4
- package/dist/types/parser/bitmark/peg/contentProcessors/MarkTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/PersonChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/PropertyContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/RatingLevelChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/ReferenceTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts +0 -14
- package/dist/types/parser/bitmark/peg/contentProcessors/ResourceContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/ServingsChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.d.ts +0 -5
- package/dist/types/parser/bitmark/peg/contentProcessors/TechnicalTermChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts +0 -11
- package/dist/types/parser/bitmark/peg/contentProcessors/TitleTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts +0 -6
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseChainContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts +0 -4
- package/dist/types/parser/bitmark/peg/contentProcessors/TrueFalseTagContentProcessor.d.ts.map +0 -1
- package/dist/types/parser/json/JsonParser.d.ts +0 -59
- package/dist/types/parser/json/JsonParser.d.ts.map +0 -1
- package/dist/types/parser/text/TextParser.d.ts +0 -55
- package/dist/types/parser/text/TextParser.d.ts.map +0 -1
- package/dist/types/parser/text/peg/TextPegParser.d.ts +0 -8
- package/dist/types/parser/text/peg/TextPegParser.d.ts.map +0 -1
- package/dist/types/utils/ArrayUtils.d.ts +0 -25
- package/dist/types/utils/ArrayUtils.d.ts.map +0 -1
- package/dist/types/utils/BitUtils.d.ts +0 -30
- package/dist/types/utils/BitUtils.d.ts.map +0 -1
- package/dist/types/utils/BooleanUtils.d.ts +0 -30
- package/dist/types/utils/BooleanUtils.d.ts.map +0 -1
- package/dist/types/utils/FileUtils.d.ts +0 -12
- package/dist/types/utils/FileUtils.d.ts.map +0 -1
- package/dist/types/utils/NumberUtils.d.ts +0 -47
- package/dist/types/utils/NumberUtils.d.ts.map +0 -1
- package/dist/types/utils/ObjectUtils.d.ts +0 -197
- package/dist/types/utils/ObjectUtils.d.ts.map +0 -1
- package/dist/types/utils/StringUtils.d.ts +0 -77
- package/dist/types/utils/StringUtils.d.ts.map +0 -1
- package/dist/types/utils/UrlUtils.d.ts +0 -7
- package/dist/types/utils/UrlUtils.d.ts.map +0 -1
- package/dist/types/utils/env/Env.d.ts +0 -39
- package/dist/types/utils/env/Env.d.ts.map +0 -1
- package/dist/types/utils/env/Environment.d.ts +0 -21
- package/dist/types/utils/env/Environment.d.ts.map +0 -1
- package/dist/types/utils/env/Os.d.ts +0 -19
- package/dist/types/utils/env/Os.d.ts.map +0 -1
- package/dist/types/utils/env/Version.d.ts +0 -10
- package/dist/types/utils/env/Version.d.ts.map +0 -1
- package/dist/types/utils/env/userAgent.d.ts +0 -11
- package/dist/types/utils/env/userAgent.d.ts.map +0 -1
- package/dist/types/utils/polyfill/fs.d.ts +0 -6
- package/dist/types/utils/polyfill/fs.d.ts.map +0 -1
|
@@ -1,963 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.ResourceBuilder = void 0;
|
|
15
|
-
const Breakscape_1 = require("../breakscaping/Breakscape");
|
|
16
|
-
const Config_1 = require("../config/Config");
|
|
17
|
-
const BitType_1 = require("../model/enum/BitType");
|
|
18
|
-
const ResourceTag_1 = require("../model/enum/ResourceTag");
|
|
19
|
-
const TextLocation_1 = require("../model/enum/TextLocation");
|
|
20
|
-
const ObjectUtils_1 = require("../utils/ObjectUtils");
|
|
21
|
-
const StringUtils_1 = require("../utils/StringUtils");
|
|
22
|
-
const UrlUtils_1 = require("../utils/UrlUtils");
|
|
23
|
-
const BaseBuilder_1 = require("./BaseBuilder");
|
|
24
|
-
const NodeValidator_1 = require("./rules/NodeValidator");
|
|
25
|
-
/**
|
|
26
|
-
* Builder to build bitmark Resource AST nodes programmatically
|
|
27
|
-
*/
|
|
28
|
-
class ResourceBuilder extends BaseBuilder_1.BaseBuilder {
|
|
29
|
-
/**
|
|
30
|
-
* Build and validate resource JSON object(s) from external resource JSON object(s)
|
|
31
|
-
*
|
|
32
|
-
* Note: a single input resource object can be converted to multiple resource objects
|
|
33
|
-
* (e.g. stillImageFilm -> image + audio)
|
|
34
|
-
*
|
|
35
|
-
* @param bitType
|
|
36
|
-
* @param resource
|
|
37
|
-
* @returns
|
|
38
|
-
*/
|
|
39
|
-
resourceFromResourceJson(context, resource) {
|
|
40
|
-
if (!resource)
|
|
41
|
-
return undefined;
|
|
42
|
-
const nodes = [];
|
|
43
|
-
// Convert single resource to array
|
|
44
|
-
if (!Array.isArray(resource))
|
|
45
|
-
resource = [resource];
|
|
46
|
-
for (const thisResource of resource) {
|
|
47
|
-
// Validate we have a valid resource type
|
|
48
|
-
let type = ResourceTag_1.ResourceTag.fromValue(thisResource.type);
|
|
49
|
-
if (!type)
|
|
50
|
-
return undefined;
|
|
51
|
-
// Get the resource key
|
|
52
|
-
const resourceKey = ResourceTag_1.ResourceTag.keyFromValue(type);
|
|
53
|
-
if (!resourceKey)
|
|
54
|
-
return undefined;
|
|
55
|
-
// Override original type with type alias if present
|
|
56
|
-
const __typeAlias = ResourceTag_1.ResourceTag.fromValue(thisResource.__typeAlias);
|
|
57
|
-
type = __typeAlias !== null && __typeAlias !== void 0 ? __typeAlias : type;
|
|
58
|
-
let data;
|
|
59
|
-
// TODO: This code should use the config to handle the combo resources. For now the logic is hardcoded
|
|
60
|
-
// Handle special cases for multiple resource bits (imageResponsive, stillImageFilm)
|
|
61
|
-
if (type === ResourceTag_1.ResourceTag.imageResponsive) {
|
|
62
|
-
const r = thisResource;
|
|
63
|
-
const imagePortraitNode = this.resourceFromResourceDataJson(context, ResourceTag_1.ResourceTag.imagePortrait, r.imagePortrait);
|
|
64
|
-
const imageLandscapeNode = this.resourceFromResourceDataJson(context, ResourceTag_1.ResourceTag.imageLandscape, r.imageLandscape);
|
|
65
|
-
if (imagePortraitNode)
|
|
66
|
-
nodes.push(imagePortraitNode);
|
|
67
|
-
if (imageLandscapeNode)
|
|
68
|
-
nodes.push(imageLandscapeNode);
|
|
69
|
-
}
|
|
70
|
-
else if (type === ResourceTag_1.ResourceTag.stillImageFilm) {
|
|
71
|
-
const r = thisResource;
|
|
72
|
-
const imageNode = this.resourceFromResourceDataJson(context, ResourceTag_1.ResourceTag.image, r.image);
|
|
73
|
-
const audioNode = this.resourceFromResourceDataJson(context, ResourceTag_1.ResourceTag.audio, r.audio);
|
|
74
|
-
if (imageNode)
|
|
75
|
-
nodes.push(imageNode);
|
|
76
|
-
if (audioNode)
|
|
77
|
-
nodes.push(audioNode);
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
// Standard single resource case
|
|
81
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
82
|
-
data = thisResource[resourceKey];
|
|
83
|
-
if (!data)
|
|
84
|
-
return undefined;
|
|
85
|
-
const node = this.resourceFromResourceDataJson(context, type, data);
|
|
86
|
-
if (node)
|
|
87
|
-
nodes.push(node);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
if (nodes.length === 0)
|
|
91
|
-
return undefined;
|
|
92
|
-
if (nodes.length === 1)
|
|
93
|
-
return nodes[0];
|
|
94
|
-
return nodes;
|
|
95
|
-
}
|
|
96
|
-
resourceFromResourceDataJson(context, type, data) {
|
|
97
|
-
var _a, _b, _c;
|
|
98
|
-
if (!data)
|
|
99
|
-
return undefined;
|
|
100
|
-
type = ResourceTag_1.ResourceTag.fromValue(type);
|
|
101
|
-
if (!type)
|
|
102
|
-
return undefined;
|
|
103
|
-
const dataAsString = StringUtils_1.StringUtils.isString(data) ? data : undefined;
|
|
104
|
-
// url / src / href / app
|
|
105
|
-
const url = data.url || data.src || data.body || dataAsString;
|
|
106
|
-
// Sub resources
|
|
107
|
-
const posterImage = data.posterImage
|
|
108
|
-
? (_a = this.resourceFromResourceDataJson(context, ResourceTag_1.ResourceTag.image, data.posterImage)) === null || _a === void 0 ? void 0 : _a.image
|
|
109
|
-
: undefined;
|
|
110
|
-
const thumbnails = data.thumbnails
|
|
111
|
-
? data.thumbnails.map((t) => {
|
|
112
|
-
var _a;
|
|
113
|
-
return (_a = this.resourceFromResourceDataJson(context, ResourceTag_1.ResourceTag.image, t)) === null || _a === void 0 ? void 0 : _a.image;
|
|
114
|
-
})
|
|
115
|
-
: undefined;
|
|
116
|
-
// Resource
|
|
117
|
-
const node = this.resource(context, {
|
|
118
|
-
type,
|
|
119
|
-
// Generic (except Article / Document)
|
|
120
|
-
value: url,
|
|
121
|
-
// ImageLikeResource / AudioLikeResource / VideoLikeResource / Article / Document
|
|
122
|
-
format: data.format,
|
|
123
|
-
// ImageLikeResource
|
|
124
|
-
src1x: data.src1x,
|
|
125
|
-
src2x: data.src2x,
|
|
126
|
-
src3x: data.src3x,
|
|
127
|
-
src4x: data.src4x,
|
|
128
|
-
caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, data.caption),
|
|
129
|
-
// ImageLikeResource / VideoLikeResource
|
|
130
|
-
width: (_b = data.width) !== null && _b !== void 0 ? _b : undefined,
|
|
131
|
-
height: (_c = data.height) !== null && _c !== void 0 ? _c : undefined,
|
|
132
|
-
alt: data.alt,
|
|
133
|
-
zoomDisabled: data.zoomDisabled,
|
|
134
|
-
// VideoLikeResource
|
|
135
|
-
duration: data.duration,
|
|
136
|
-
mute: data.mute,
|
|
137
|
-
autoplay: data.autoplay,
|
|
138
|
-
allowSubtitles: data.allowSubtitles,
|
|
139
|
-
showSubtitles: data.showSubtitles,
|
|
140
|
-
posterImage,
|
|
141
|
-
thumbnails,
|
|
142
|
-
// WebsiteLinkResource
|
|
143
|
-
siteName: undefined, //data.siteName,
|
|
144
|
-
// Generic Resource
|
|
145
|
-
license: data.license,
|
|
146
|
-
copyright: data.copyright,
|
|
147
|
-
showInIndex: data.showInIndex,
|
|
148
|
-
search: data.search,
|
|
149
|
-
});
|
|
150
|
-
return node;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Build resource node
|
|
154
|
-
*
|
|
155
|
-
* @param data - data for the node
|
|
156
|
-
* @returns
|
|
157
|
-
*/
|
|
158
|
-
/* private */ resource(context, data) {
|
|
159
|
-
let node;
|
|
160
|
-
const { type, value: valueIn, format: formatIn } = data, rest = __rest(data, ["type", "value", "format"]);
|
|
161
|
-
const finalData = Object.assign({ type, value: valueIn !== null && valueIn !== void 0 ? valueIn : Breakscape_1.Breakscape.EMPTY_STRING, format: formatIn !== null && formatIn !== void 0 ? formatIn : Breakscape_1.Breakscape.EMPTY_STRING }, rest);
|
|
162
|
-
// Special case for video like tags - build thumbnails from the srcXx properties
|
|
163
|
-
switch (type) {
|
|
164
|
-
case ResourceTag_1.ResourceTag.video:
|
|
165
|
-
case ResourceTag_1.ResourceTag.videoEmbed:
|
|
166
|
-
case ResourceTag_1.ResourceTag.videoLink:
|
|
167
|
-
case ResourceTag_1.ResourceTag.stillImageFilmEmbed:
|
|
168
|
-
case ResourceTag_1.ResourceTag.stillImageFilmLink: {
|
|
169
|
-
const thumbnailKeys = ['src1x', 'src2x', 'src3x', 'src4x'];
|
|
170
|
-
const thumbnails = [];
|
|
171
|
-
for (const k of thumbnailKeys) {
|
|
172
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
173
|
-
const dataAsAny = data;
|
|
174
|
-
const value = dataAsAny[k];
|
|
175
|
-
if (value) {
|
|
176
|
-
const image = this.resource(context, {
|
|
177
|
-
type: ResourceTag_1.ResourceTag.image,
|
|
178
|
-
value,
|
|
179
|
-
});
|
|
180
|
-
if (image)
|
|
181
|
-
thumbnails.push(image.image);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
// Merge with existing thumbnails
|
|
185
|
-
finalData.thumbnails = [...(finalData.thumbnails || []), ...thumbnails];
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
switch (type) {
|
|
189
|
-
case ResourceTag_1.ResourceTag.image:
|
|
190
|
-
case ResourceTag_1.ResourceTag.imagePortrait:
|
|
191
|
-
case ResourceTag_1.ResourceTag.imageLandscape:
|
|
192
|
-
case ResourceTag_1.ResourceTag.backgroundWallpaper:
|
|
193
|
-
case ResourceTag_1.ResourceTag.imagePlaceholder:
|
|
194
|
-
case ResourceTag_1.ResourceTag.icon:
|
|
195
|
-
node = this.imageResource(context, finalData, type);
|
|
196
|
-
break;
|
|
197
|
-
// case ResourceTag.imageResponsive: {
|
|
198
|
-
// node = this.imageResponsiveResource({
|
|
199
|
-
// imagePortrait: this.imageResource(
|
|
200
|
-
// finalData.imagePortrait ?? {
|
|
201
|
-
// format: '',
|
|
202
|
-
// value: '',
|
|
203
|
-
// },
|
|
204
|
-
// ),
|
|
205
|
-
// imageLandscape: this.imageResource(
|
|
206
|
-
// finalData.imageLandscape ?? {
|
|
207
|
-
// format: '',
|
|
208
|
-
// value: '',
|
|
209
|
-
// },
|
|
210
|
-
// ),
|
|
211
|
-
// });
|
|
212
|
-
// break;
|
|
213
|
-
// }
|
|
214
|
-
case ResourceTag_1.ResourceTag.imageLink:
|
|
215
|
-
node = this.imageLinkResource(context, finalData);
|
|
216
|
-
break;
|
|
217
|
-
case ResourceTag_1.ResourceTag.audio:
|
|
218
|
-
node = this.audioResource(context, finalData);
|
|
219
|
-
break;
|
|
220
|
-
case ResourceTag_1.ResourceTag.audioEmbed:
|
|
221
|
-
node = this.audioEmbedResource(context, finalData);
|
|
222
|
-
break;
|
|
223
|
-
case ResourceTag_1.ResourceTag.audioLink:
|
|
224
|
-
node = this.audioLinkResource(context, finalData);
|
|
225
|
-
break;
|
|
226
|
-
case ResourceTag_1.ResourceTag.video:
|
|
227
|
-
node = this.videoResource(context, finalData);
|
|
228
|
-
break;
|
|
229
|
-
case ResourceTag_1.ResourceTag.videoEmbed:
|
|
230
|
-
node = this.videoEmbedResource(context, finalData);
|
|
231
|
-
break;
|
|
232
|
-
case ResourceTag_1.ResourceTag.videoLink:
|
|
233
|
-
node = this.videoLinkResource(context, finalData);
|
|
234
|
-
break;
|
|
235
|
-
// case ResourceTag.stillImageFilm: {
|
|
236
|
-
// node = this.stillImageFilmResource({
|
|
237
|
-
// image: this.imageResource(context,
|
|
238
|
-
// finalData.image ?? {
|
|
239
|
-
// format: '',
|
|
240
|
-
// value: '',
|
|
241
|
-
// },
|
|
242
|
-
// ),
|
|
243
|
-
// audio: this.audioResource(context,
|
|
244
|
-
// finalData.audio ?? {
|
|
245
|
-
// format: '',
|
|
246
|
-
// value: '',
|
|
247
|
-
// },
|
|
248
|
-
// ),
|
|
249
|
-
// });
|
|
250
|
-
// break;
|
|
251
|
-
// }
|
|
252
|
-
case ResourceTag_1.ResourceTag.stillImageFilmEmbed:
|
|
253
|
-
node = this.stillImageFilmEmbedResource(context, finalData);
|
|
254
|
-
break;
|
|
255
|
-
case ResourceTag_1.ResourceTag.stillImageFilmLink:
|
|
256
|
-
node = this.stillImageFilmLinkResource(context, finalData);
|
|
257
|
-
break;
|
|
258
|
-
case ResourceTag_1.ResourceTag.article:
|
|
259
|
-
node = this.articleResource(context, finalData);
|
|
260
|
-
break;
|
|
261
|
-
case ResourceTag_1.ResourceTag.document:
|
|
262
|
-
node = this.documentResource(context, finalData);
|
|
263
|
-
break;
|
|
264
|
-
case ResourceTag_1.ResourceTag.documentEmbed:
|
|
265
|
-
node = this.documentEmbedResource(context, finalData);
|
|
266
|
-
break;
|
|
267
|
-
case ResourceTag_1.ResourceTag.documentLink:
|
|
268
|
-
node = this.documentLinkResource(context, finalData);
|
|
269
|
-
break;
|
|
270
|
-
case ResourceTag_1.ResourceTag.documentDownload:
|
|
271
|
-
node = this.documentDownloadResource(context, finalData);
|
|
272
|
-
break;
|
|
273
|
-
case ResourceTag_1.ResourceTag.appLink:
|
|
274
|
-
node = this.appLinkResource(context, finalData);
|
|
275
|
-
break;
|
|
276
|
-
case ResourceTag_1.ResourceTag.websiteLink:
|
|
277
|
-
node = this.websiteLinkResource(context, finalData);
|
|
278
|
-
break;
|
|
279
|
-
default:
|
|
280
|
-
}
|
|
281
|
-
return node;
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Build imageResource node
|
|
285
|
-
*
|
|
286
|
-
* @param data - data for the node
|
|
287
|
-
* @returns
|
|
288
|
-
*/
|
|
289
|
-
imageResource(context, data, __typeAlias) {
|
|
290
|
-
var _a, _b;
|
|
291
|
-
const { value, src1x, src2x, src3x, src4x, width, height, alt, zoomDisabled, license, copyright, showInIndex, caption, search, } = data;
|
|
292
|
-
const { bitType } = context;
|
|
293
|
-
let zoomDisabledDefault = false;
|
|
294
|
-
if (Config_1.Config.isOfBitType(bitType, [
|
|
295
|
-
BitType_1.BitType.imageSeparator,
|
|
296
|
-
BitType_1.BitType.pageBanner,
|
|
297
|
-
BitType_1.BitType.imagesLogoGrave,
|
|
298
|
-
BitType_1.BitType.prototypeImages,
|
|
299
|
-
])) {
|
|
300
|
-
zoomDisabledDefault = true;
|
|
301
|
-
}
|
|
302
|
-
// NOTE: Node order is important and is defined here
|
|
303
|
-
const node = {
|
|
304
|
-
type: ResourceTag_1.ResourceTag.image,
|
|
305
|
-
__typeAlias: __typeAlias !== null && __typeAlias !== void 0 ? __typeAlias : ResourceTag_1.ResourceTag.image,
|
|
306
|
-
image: {
|
|
307
|
-
format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
|
|
308
|
-
provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
|
|
309
|
-
src: value !== null && value !== void 0 ? value : '',
|
|
310
|
-
src1x: (src1x !== null && src1x !== void 0 ? src1x : undefined),
|
|
311
|
-
src2x: (src2x !== null && src2x !== void 0 ? src2x : undefined),
|
|
312
|
-
src3x: (src3x !== null && src3x !== void 0 ? src3x : undefined),
|
|
313
|
-
src4x: (src4x !== null && src4x !== void 0 ? src4x : undefined),
|
|
314
|
-
width: (width !== null && width !== void 0 ? width : null),
|
|
315
|
-
height: (height !== null && height !== void 0 ? height : null),
|
|
316
|
-
alt: alt !== null && alt !== void 0 ? alt : '',
|
|
317
|
-
zoomDisabled: zoomDisabled !== null && zoomDisabled !== void 0 ? zoomDisabled : zoomDisabledDefault,
|
|
318
|
-
license: license !== null && license !== void 0 ? license : '',
|
|
319
|
-
copyright: copyright !== null && copyright !== void 0 ? copyright : '',
|
|
320
|
-
showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
|
|
321
|
-
caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
|
|
322
|
-
search: (search !== null && search !== void 0 ? search : undefined),
|
|
323
|
-
},
|
|
324
|
-
};
|
|
325
|
-
// Remove Unset Optionals
|
|
326
|
-
ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.image, {
|
|
327
|
-
ignoreFalse: ['zoomDisabled', 'showInIndex'],
|
|
328
|
-
ignoreEmptyArrays: ['caption'],
|
|
329
|
-
ignoreUndefined: ['width', 'height'],
|
|
330
|
-
ignoreEmptyString: ['src', 'alt', 'license', 'copyright'],
|
|
331
|
-
});
|
|
332
|
-
// Validate and correct invalid bits as much as possible
|
|
333
|
-
return NodeValidator_1.NodeValidator.validateResource(node);
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* Build imageLinkResource node
|
|
337
|
-
*
|
|
338
|
-
* @param data - data for the node
|
|
339
|
-
* @returns
|
|
340
|
-
*/
|
|
341
|
-
imageLinkResource(context, data) {
|
|
342
|
-
var _a, _b;
|
|
343
|
-
const { value, src1x, src2x, src3x, src4x, width, height, alt, zoomDisabled, license, copyright, showInIndex, caption, search, } = data;
|
|
344
|
-
// NOTE: Node order is important and is defined here
|
|
345
|
-
const node = {
|
|
346
|
-
type: ResourceTag_1.ResourceTag.imageLink,
|
|
347
|
-
__typeAlias: ResourceTag_1.ResourceTag.imageLink,
|
|
348
|
-
imageLink: {
|
|
349
|
-
format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
|
|
350
|
-
provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
|
|
351
|
-
// src: value ?? '',
|
|
352
|
-
url: value !== null && value !== void 0 ? value : '',
|
|
353
|
-
src1x: (src1x !== null && src1x !== void 0 ? src1x : undefined),
|
|
354
|
-
src2x: (src2x !== null && src2x !== void 0 ? src2x : undefined),
|
|
355
|
-
src3x: (src3x !== null && src3x !== void 0 ? src3x : undefined),
|
|
356
|
-
src4x: (src4x !== null && src4x !== void 0 ? src4x : undefined),
|
|
357
|
-
width: (width !== null && width !== void 0 ? width : null),
|
|
358
|
-
height: (height !== null && height !== void 0 ? height : null),
|
|
359
|
-
alt: alt !== null && alt !== void 0 ? alt : '',
|
|
360
|
-
zoomDisabled: zoomDisabled !== null && zoomDisabled !== void 0 ? zoomDisabled : false, // TODO: Default depends on the bit(!)
|
|
361
|
-
license: license !== null && license !== void 0 ? license : '',
|
|
362
|
-
copyright: copyright !== null && copyright !== void 0 ? copyright : '',
|
|
363
|
-
showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
|
|
364
|
-
caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
|
|
365
|
-
search: (search !== null && search !== void 0 ? search : undefined),
|
|
366
|
-
},
|
|
367
|
-
};
|
|
368
|
-
// Remove Unset Optionals
|
|
369
|
-
ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.imageLink, {
|
|
370
|
-
ignoreFalse: ['zoomDisabled', 'showInIndex'],
|
|
371
|
-
ignoreEmptyArrays: ['caption'],
|
|
372
|
-
ignoreUndefined: ['width', 'height'],
|
|
373
|
-
ignoreEmptyString: ['url', 'alt', 'license', 'copyright'],
|
|
374
|
-
});
|
|
375
|
-
// Validate and correct invalid bits as much as possible
|
|
376
|
-
return NodeValidator_1.NodeValidator.validateResource(node);
|
|
377
|
-
}
|
|
378
|
-
/**
|
|
379
|
-
* Build audioResource node
|
|
380
|
-
*
|
|
381
|
-
* @param data - data for the node
|
|
382
|
-
* @returns
|
|
383
|
-
*/
|
|
384
|
-
audioResource(context, data) {
|
|
385
|
-
var _a, _b;
|
|
386
|
-
const { value, duration, mute, autoplay, license, copyright, showInIndex, caption, search } = data;
|
|
387
|
-
// NOTE: Node order is important and is defined here
|
|
388
|
-
const node = {
|
|
389
|
-
type: ResourceTag_1.ResourceTag.audio,
|
|
390
|
-
__typeAlias: ResourceTag_1.ResourceTag.audio,
|
|
391
|
-
audio: {
|
|
392
|
-
format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
|
|
393
|
-
provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
|
|
394
|
-
src: value !== null && value !== void 0 ? value : '',
|
|
395
|
-
duration: (duration !== null && duration !== void 0 ? duration : undefined),
|
|
396
|
-
mute: (mute !== null && mute !== void 0 ? mute : undefined),
|
|
397
|
-
autoplay: (autoplay !== null && autoplay !== void 0 ? autoplay : undefined),
|
|
398
|
-
license: license !== null && license !== void 0 ? license : '',
|
|
399
|
-
copyright: copyright !== null && copyright !== void 0 ? copyright : '',
|
|
400
|
-
showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
|
|
401
|
-
caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
|
|
402
|
-
search: (search !== null && search !== void 0 ? search : undefined),
|
|
403
|
-
},
|
|
404
|
-
};
|
|
405
|
-
// Remove Unset Optionals
|
|
406
|
-
ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.audio, {
|
|
407
|
-
ignoreEmptyArrays: ['caption'],
|
|
408
|
-
ignoreEmptyString: ['src', 'alt', 'license', 'copyright'],
|
|
409
|
-
ignoreFalse: ['showInIndex'],
|
|
410
|
-
});
|
|
411
|
-
// Validate and correct invalid bits as much as possible
|
|
412
|
-
return NodeValidator_1.NodeValidator.validateResource(node);
|
|
413
|
-
}
|
|
414
|
-
/**
|
|
415
|
-
* Build audioEmbedResource node
|
|
416
|
-
*
|
|
417
|
-
* @param data - data for the node
|
|
418
|
-
* @returns
|
|
419
|
-
*/
|
|
420
|
-
audioEmbedResource(context, data) {
|
|
421
|
-
var _a, _b;
|
|
422
|
-
const { value, duration, mute, autoplay, license, copyright, showInIndex, caption, search } = data;
|
|
423
|
-
// NOTE: Node order is important and is defined here
|
|
424
|
-
const node = {
|
|
425
|
-
type: ResourceTag_1.ResourceTag.audioEmbed,
|
|
426
|
-
__typeAlias: ResourceTag_1.ResourceTag.audioEmbed,
|
|
427
|
-
audioEmbed: {
|
|
428
|
-
format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
|
|
429
|
-
provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
|
|
430
|
-
src: value !== null && value !== void 0 ? value : '',
|
|
431
|
-
duration: (duration !== null && duration !== void 0 ? duration : undefined),
|
|
432
|
-
mute: (mute !== null && mute !== void 0 ? mute : undefined),
|
|
433
|
-
autoplay: (autoplay !== null && autoplay !== void 0 ? autoplay : undefined),
|
|
434
|
-
license: license !== null && license !== void 0 ? license : '',
|
|
435
|
-
copyright: copyright !== null && copyright !== void 0 ? copyright : '',
|
|
436
|
-
showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
|
|
437
|
-
caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
|
|
438
|
-
search: (search !== null && search !== void 0 ? search : undefined),
|
|
439
|
-
},
|
|
440
|
-
};
|
|
441
|
-
// Remove Unset Optionals
|
|
442
|
-
ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.audioEmbed, {
|
|
443
|
-
ignoreEmptyArrays: ['caption'],
|
|
444
|
-
ignoreEmptyString: ['src', /*'alt',*/ 'license', 'copyright'],
|
|
445
|
-
ignoreFalse: ['showInIndex'],
|
|
446
|
-
});
|
|
447
|
-
// Validate and correct invalid bits as much as possible
|
|
448
|
-
return NodeValidator_1.NodeValidator.validateResource(node);
|
|
449
|
-
}
|
|
450
|
-
/**
|
|
451
|
-
* Build audioLinkResource node
|
|
452
|
-
*
|
|
453
|
-
* @param data - data for the node
|
|
454
|
-
* @returns
|
|
455
|
-
*/
|
|
456
|
-
audioLinkResource(context, data) {
|
|
457
|
-
var _a, _b;
|
|
458
|
-
const { value, duration, mute, autoplay, license, copyright, showInIndex, caption, search } = data;
|
|
459
|
-
// NOTE: Node order is important and is defined here
|
|
460
|
-
const node = {
|
|
461
|
-
type: ResourceTag_1.ResourceTag.audioLink,
|
|
462
|
-
__typeAlias: ResourceTag_1.ResourceTag.audioLink,
|
|
463
|
-
audioLink: {
|
|
464
|
-
format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
|
|
465
|
-
provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
|
|
466
|
-
// src: value ?? '',
|
|
467
|
-
url: value !== null && value !== void 0 ? value : '',
|
|
468
|
-
duration: (duration !== null && duration !== void 0 ? duration : undefined),
|
|
469
|
-
mute: (mute !== null && mute !== void 0 ? mute : undefined),
|
|
470
|
-
autoplay: (autoplay !== null && autoplay !== void 0 ? autoplay : undefined),
|
|
471
|
-
license: license !== null && license !== void 0 ? license : '',
|
|
472
|
-
copyright: copyright !== null && copyright !== void 0 ? copyright : '',
|
|
473
|
-
showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
|
|
474
|
-
caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
|
|
475
|
-
search: (search !== null && search !== void 0 ? search : undefined),
|
|
476
|
-
},
|
|
477
|
-
};
|
|
478
|
-
// Remove Unset Optionals
|
|
479
|
-
ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.audioLink, {
|
|
480
|
-
// ignoreEmptyArrays: ['caption'],
|
|
481
|
-
ignoreEmptyString: ['url' /*'alt', 'license', 'copyright'*/],
|
|
482
|
-
});
|
|
483
|
-
// Validate and correct invalid bits as much as possible
|
|
484
|
-
return NodeValidator_1.NodeValidator.validateResource(node);
|
|
485
|
-
}
|
|
486
|
-
/**
|
|
487
|
-
* Build videoResource node
|
|
488
|
-
*
|
|
489
|
-
* @param data - data for the node
|
|
490
|
-
* @returns
|
|
491
|
-
*/
|
|
492
|
-
videoResource(context, data) {
|
|
493
|
-
var _a, _b;
|
|
494
|
-
const { value, width, height, duration, mute, autoplay, allowSubtitles, showSubtitles, alt, posterImage, thumbnails, license, copyright, showInIndex, caption, search, } = data;
|
|
495
|
-
// NOTE: Node order is important and is defined here
|
|
496
|
-
const node = {
|
|
497
|
-
type: ResourceTag_1.ResourceTag.video,
|
|
498
|
-
__typeAlias: ResourceTag_1.ResourceTag.video,
|
|
499
|
-
video: {
|
|
500
|
-
format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
|
|
501
|
-
provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
|
|
502
|
-
src: value !== null && value !== void 0 ? value : '',
|
|
503
|
-
width: (width !== null && width !== void 0 ? width : null),
|
|
504
|
-
height: (height !== null && height !== void 0 ? height : null),
|
|
505
|
-
duration: (duration !== null && duration !== void 0 ? duration : undefined),
|
|
506
|
-
mute: (mute !== null && mute !== void 0 ? mute : undefined),
|
|
507
|
-
autoplay: (autoplay !== null && autoplay !== void 0 ? autoplay : undefined),
|
|
508
|
-
allowSubtitles: (allowSubtitles !== null && allowSubtitles !== void 0 ? allowSubtitles : undefined),
|
|
509
|
-
showSubtitles: (showSubtitles !== null && showSubtitles !== void 0 ? showSubtitles : undefined),
|
|
510
|
-
alt: alt !== null && alt !== void 0 ? alt : '',
|
|
511
|
-
license: license !== null && license !== void 0 ? license : '',
|
|
512
|
-
copyright: copyright !== null && copyright !== void 0 ? copyright : '',
|
|
513
|
-
showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
|
|
514
|
-
caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
|
|
515
|
-
search: (search !== null && search !== void 0 ? search : undefined),
|
|
516
|
-
// Have sub-chains so must be at end of chain
|
|
517
|
-
posterImage: (posterImage !== null && posterImage !== void 0 ? posterImage : undefined),
|
|
518
|
-
thumbnails: (thumbnails !== null && thumbnails !== void 0 ? thumbnails : undefined),
|
|
519
|
-
},
|
|
520
|
-
};
|
|
521
|
-
// Remove Unset Optionals
|
|
522
|
-
ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.video, {
|
|
523
|
-
ignoreEmptyArrays: ['caption'],
|
|
524
|
-
ignoreUndefined: ['width', 'height'],
|
|
525
|
-
ignoreEmptyString: ['src', /*'alt',*/ 'license', 'copyright'],
|
|
526
|
-
ignoreFalse: ['showInIndex'],
|
|
527
|
-
});
|
|
528
|
-
// Validate and correct invalid bits as much as possible
|
|
529
|
-
return NodeValidator_1.NodeValidator.validateResource(node);
|
|
530
|
-
}
|
|
531
|
-
/**
|
|
532
|
-
* Build videoEmbedResource node
|
|
533
|
-
*
|
|
534
|
-
* @param data - data for the node
|
|
535
|
-
* @returns
|
|
536
|
-
*/
|
|
537
|
-
videoEmbedResource(context, data) {
|
|
538
|
-
var _a, _b;
|
|
539
|
-
const { value, width, height, duration, mute, autoplay, allowSubtitles, showSubtitles, alt, posterImage, thumbnails, license, copyright, showInIndex, caption, search, } = data;
|
|
540
|
-
// NOTE: Node order is important and is defined here
|
|
541
|
-
const node = {
|
|
542
|
-
type: ResourceTag_1.ResourceTag.videoEmbed,
|
|
543
|
-
__typeAlias: ResourceTag_1.ResourceTag.videoEmbed,
|
|
544
|
-
videoEmbed: {
|
|
545
|
-
format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
|
|
546
|
-
provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
|
|
547
|
-
// src: value ?? '',
|
|
548
|
-
url: value !== null && value !== void 0 ? value : '',
|
|
549
|
-
width: (width !== null && width !== void 0 ? width : null),
|
|
550
|
-
height: (height !== null && height !== void 0 ? height : null),
|
|
551
|
-
duration: (duration !== null && duration !== void 0 ? duration : undefined),
|
|
552
|
-
mute: (mute !== null && mute !== void 0 ? mute : undefined),
|
|
553
|
-
autoplay: (autoplay !== null && autoplay !== void 0 ? autoplay : undefined),
|
|
554
|
-
allowSubtitles: (allowSubtitles !== null && allowSubtitles !== void 0 ? allowSubtitles : undefined),
|
|
555
|
-
showSubtitles: (showSubtitles !== null && showSubtitles !== void 0 ? showSubtitles : undefined),
|
|
556
|
-
alt: alt !== null && alt !== void 0 ? alt : '',
|
|
557
|
-
posterImage: (posterImage !== null && posterImage !== void 0 ? posterImage : undefined),
|
|
558
|
-
thumbnails: (thumbnails !== null && thumbnails !== void 0 ? thumbnails : undefined),
|
|
559
|
-
license: license !== null && license !== void 0 ? license : '',
|
|
560
|
-
copyright: copyright !== null && copyright !== void 0 ? copyright : '',
|
|
561
|
-
showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
|
|
562
|
-
caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
|
|
563
|
-
search: (search !== null && search !== void 0 ? search : undefined),
|
|
564
|
-
},
|
|
565
|
-
};
|
|
566
|
-
// Remove Unset Optionals
|
|
567
|
-
ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.videoEmbed, {
|
|
568
|
-
ignoreEmptyArrays: ['caption'],
|
|
569
|
-
ignoreUndefined: ['width', 'height'],
|
|
570
|
-
ignoreEmptyString: ['url', /*'alt',*/ 'license', 'copyright'],
|
|
571
|
-
ignoreFalse: ['showInIndex'],
|
|
572
|
-
});
|
|
573
|
-
// Validate and correct invalid bits as much as possible
|
|
574
|
-
return NodeValidator_1.NodeValidator.validateResource(node);
|
|
575
|
-
}
|
|
576
|
-
/**
|
|
577
|
-
* Build videoLinkResource node
|
|
578
|
-
*
|
|
579
|
-
* @param data - data for the node
|
|
580
|
-
* @returns
|
|
581
|
-
*/
|
|
582
|
-
videoLinkResource(context, data) {
|
|
583
|
-
var _a, _b;
|
|
584
|
-
const { value, width, height, duration, mute, autoplay, allowSubtitles, showSubtitles, alt, posterImage, thumbnails, license, copyright, showInIndex, caption, search, } = data;
|
|
585
|
-
// NOTE: Node order is important and is defined here
|
|
586
|
-
const node = {
|
|
587
|
-
type: ResourceTag_1.ResourceTag.videoLink,
|
|
588
|
-
__typeAlias: ResourceTag_1.ResourceTag.videoLink,
|
|
589
|
-
videoLink: {
|
|
590
|
-
format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
|
|
591
|
-
provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
|
|
592
|
-
// src: value ?? '',
|
|
593
|
-
url: value !== null && value !== void 0 ? value : '',
|
|
594
|
-
width: (width !== null && width !== void 0 ? width : null),
|
|
595
|
-
height: (height !== null && height !== void 0 ? height : null),
|
|
596
|
-
duration: (duration !== null && duration !== void 0 ? duration : undefined),
|
|
597
|
-
mute: (mute !== null && mute !== void 0 ? mute : undefined),
|
|
598
|
-
autoplay: (autoplay !== null && autoplay !== void 0 ? autoplay : undefined),
|
|
599
|
-
allowSubtitles: (allowSubtitles !== null && allowSubtitles !== void 0 ? allowSubtitles : undefined),
|
|
600
|
-
showSubtitles: (showSubtitles !== null && showSubtitles !== void 0 ? showSubtitles : undefined),
|
|
601
|
-
alt: alt !== null && alt !== void 0 ? alt : '',
|
|
602
|
-
posterImage: (posterImage !== null && posterImage !== void 0 ? posterImage : undefined),
|
|
603
|
-
thumbnails: (thumbnails !== null && thumbnails !== void 0 ? thumbnails : undefined),
|
|
604
|
-
license: license !== null && license !== void 0 ? license : '',
|
|
605
|
-
copyright: copyright !== null && copyright !== void 0 ? copyright : '',
|
|
606
|
-
showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
|
|
607
|
-
caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
|
|
608
|
-
search: (search !== null && search !== void 0 ? search : undefined),
|
|
609
|
-
},
|
|
610
|
-
};
|
|
611
|
-
// Remove Unset Optionals
|
|
612
|
-
ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.videoLink, {
|
|
613
|
-
ignoreEmptyArrays: ['caption'],
|
|
614
|
-
ignoreUndefined: ['width', 'height'],
|
|
615
|
-
ignoreEmptyString: ['url', /*'alt',*/ 'license', 'copyright'],
|
|
616
|
-
ignoreFalse: ['showInIndex'],
|
|
617
|
-
});
|
|
618
|
-
// Validate and correct invalid bits as much as possible
|
|
619
|
-
return NodeValidator_1.NodeValidator.validateResource(node);
|
|
620
|
-
}
|
|
621
|
-
// /**
|
|
622
|
-
// * Build stillImageFilmResource node
|
|
623
|
-
// *
|
|
624
|
-
// * @param data - data for the node
|
|
625
|
-
// * @returns
|
|
626
|
-
// */
|
|
627
|
-
// stillImageFilmResource(context: BuildContext, data: { image?: ImageResource; audio?: AudioResource }): StillImageFilmResource {
|
|
628
|
-
// const { image, audio } = data;
|
|
629
|
-
// // NOTE: Node order is important and is defined here
|
|
630
|
-
// const node: StillImageFilmResource = {
|
|
631
|
-
// type: ResourceTag.stillImageFilm,
|
|
632
|
-
// __typeAlias: ResourceTag.stillImageFilm,
|
|
633
|
-
// image: image ?? this.imageResource({ format: '', value: '' }),
|
|
634
|
-
// audio: audio ?? this.audioResource({ format: '', value: '' }),
|
|
635
|
-
// };
|
|
636
|
-
// // Remove Unset Optionals
|
|
637
|
-
// ObjectUtils.removeUnwantedProperties(node);
|
|
638
|
-
// // Validate and correct invalid bits as much as possible
|
|
639
|
-
// return NodeValidator.validateResource(node) ;
|
|
640
|
-
// }
|
|
641
|
-
/**
|
|
642
|
-
* Build stillImageFilmEmbedResource node
|
|
643
|
-
*
|
|
644
|
-
* @param data - data for the node
|
|
645
|
-
* @returns
|
|
646
|
-
*/
|
|
647
|
-
stillImageFilmEmbedResource(context, data) {
|
|
648
|
-
var _a, _b;
|
|
649
|
-
const { value, width, height, duration, mute, autoplay, allowSubtitles, showSubtitles, alt, posterImage, thumbnails, license, copyright, showInIndex, caption, search, } = data;
|
|
650
|
-
// NOTE: Node order is important and is defined here
|
|
651
|
-
const node = {
|
|
652
|
-
type: ResourceTag_1.ResourceTag.stillImageFilmEmbed,
|
|
653
|
-
__typeAlias: ResourceTag_1.ResourceTag.stillImageFilmEmbed,
|
|
654
|
-
stillImageFilmEmbed: {
|
|
655
|
-
format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
|
|
656
|
-
provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
|
|
657
|
-
// src: value ?? '',
|
|
658
|
-
url: value !== null && value !== void 0 ? value : '',
|
|
659
|
-
width: (width !== null && width !== void 0 ? width : null),
|
|
660
|
-
height: (height !== null && height !== void 0 ? height : null),
|
|
661
|
-
duration: (duration !== null && duration !== void 0 ? duration : undefined),
|
|
662
|
-
mute: (mute !== null && mute !== void 0 ? mute : undefined),
|
|
663
|
-
autoplay: (autoplay !== null && autoplay !== void 0 ? autoplay : undefined),
|
|
664
|
-
allowSubtitles: (allowSubtitles !== null && allowSubtitles !== void 0 ? allowSubtitles : undefined),
|
|
665
|
-
showSubtitles: (showSubtitles !== null && showSubtitles !== void 0 ? showSubtitles : undefined),
|
|
666
|
-
alt: alt !== null && alt !== void 0 ? alt : '',
|
|
667
|
-
posterImage: (posterImage !== null && posterImage !== void 0 ? posterImage : undefined),
|
|
668
|
-
thumbnails: (thumbnails !== null && thumbnails !== void 0 ? thumbnails : undefined),
|
|
669
|
-
license: license !== null && license !== void 0 ? license : '',
|
|
670
|
-
copyright: copyright !== null && copyright !== void 0 ? copyright : '',
|
|
671
|
-
showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
|
|
672
|
-
caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
|
|
673
|
-
search: (search !== null && search !== void 0 ? search : undefined),
|
|
674
|
-
},
|
|
675
|
-
};
|
|
676
|
-
// Remove Unset Optionals
|
|
677
|
-
ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.stillImageFilmEmbed, {
|
|
678
|
-
ignoreEmptyArrays: ['caption'],
|
|
679
|
-
ignoreUndefined: ['width', 'height'],
|
|
680
|
-
ignoreEmptyString: ['url', /*'alt',*/ 'license', 'copyright'],
|
|
681
|
-
ignoreFalse: ['showInIndex'],
|
|
682
|
-
});
|
|
683
|
-
// Validate and correct invalid bits as much as possible
|
|
684
|
-
return NodeValidator_1.NodeValidator.validateResource(node);
|
|
685
|
-
}
|
|
686
|
-
/**
|
|
687
|
-
* Build stillImageFilmLinkResource node
|
|
688
|
-
*
|
|
689
|
-
* @param data - data for the node
|
|
690
|
-
* @returns
|
|
691
|
-
*/
|
|
692
|
-
stillImageFilmLinkResource(context, data) {
|
|
693
|
-
var _a, _b;
|
|
694
|
-
const { value, width, height, duration, mute, autoplay, allowSubtitles, showSubtitles, alt, posterImage, thumbnails, license, copyright, showInIndex, caption, search, } = data;
|
|
695
|
-
// NOTE: Node order is important and is defined here
|
|
696
|
-
const node = {
|
|
697
|
-
type: ResourceTag_1.ResourceTag.stillImageFilmLink,
|
|
698
|
-
__typeAlias: ResourceTag_1.ResourceTag.stillImageFilmLink,
|
|
699
|
-
stillImageFilmLink: {
|
|
700
|
-
format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
|
|
701
|
-
provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
|
|
702
|
-
// src: value ?? '',
|
|
703
|
-
url: value !== null && value !== void 0 ? value : '',
|
|
704
|
-
width: (width !== null && width !== void 0 ? width : null),
|
|
705
|
-
height: (height !== null && height !== void 0 ? height : null),
|
|
706
|
-
duration: (duration !== null && duration !== void 0 ? duration : undefined),
|
|
707
|
-
mute: (mute !== null && mute !== void 0 ? mute : undefined),
|
|
708
|
-
autoplay: (autoplay !== null && autoplay !== void 0 ? autoplay : undefined),
|
|
709
|
-
allowSubtitles: (allowSubtitles !== null && allowSubtitles !== void 0 ? allowSubtitles : undefined),
|
|
710
|
-
showSubtitles: (showSubtitles !== null && showSubtitles !== void 0 ? showSubtitles : undefined),
|
|
711
|
-
alt: alt !== null && alt !== void 0 ? alt : '',
|
|
712
|
-
posterImage: (posterImage !== null && posterImage !== void 0 ? posterImage : undefined),
|
|
713
|
-
thumbnails: (thumbnails !== null && thumbnails !== void 0 ? thumbnails : undefined),
|
|
714
|
-
license: license !== null && license !== void 0 ? license : '',
|
|
715
|
-
copyright: copyright !== null && copyright !== void 0 ? copyright : '',
|
|
716
|
-
showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
|
|
717
|
-
caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
|
|
718
|
-
search: (search !== null && search !== void 0 ? search : undefined),
|
|
719
|
-
},
|
|
720
|
-
};
|
|
721
|
-
// Remove Unset Optionals
|
|
722
|
-
ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.stillImageFilmLink, {
|
|
723
|
-
ignoreEmptyArrays: ['caption'],
|
|
724
|
-
ignoreUndefined: ['width', 'height'],
|
|
725
|
-
ignoreEmptyString: ['url', /*'alt',*/ 'license', 'copyright'],
|
|
726
|
-
ignoreFalse: ['showInIndex'],
|
|
727
|
-
});
|
|
728
|
-
// Validate and correct invalid bits as much as possible
|
|
729
|
-
return NodeValidator_1.NodeValidator.validateResource(node);
|
|
730
|
-
}
|
|
731
|
-
/**
|
|
732
|
-
* Build articleResource node
|
|
733
|
-
*
|
|
734
|
-
* @param data - data for the node
|
|
735
|
-
* @returns
|
|
736
|
-
*/
|
|
737
|
-
articleResource(context, data) {
|
|
738
|
-
var _a, _b;
|
|
739
|
-
const { value, license, copyright, showInIndex, caption, search } = data;
|
|
740
|
-
// NOTE: Node order is important and is defined here
|
|
741
|
-
const node = {
|
|
742
|
-
type: ResourceTag_1.ResourceTag.article,
|
|
743
|
-
__typeAlias: ResourceTag_1.ResourceTag.article,
|
|
744
|
-
article: {
|
|
745
|
-
format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
|
|
746
|
-
provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
|
|
747
|
-
body: value !== null && value !== void 0 ? value : '',
|
|
748
|
-
license: license !== null && license !== void 0 ? license : '',
|
|
749
|
-
copyright: copyright !== null && copyright !== void 0 ? copyright : '',
|
|
750
|
-
showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
|
|
751
|
-
caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
|
|
752
|
-
search: (search !== null && search !== void 0 ? search : undefined),
|
|
753
|
-
},
|
|
754
|
-
};
|
|
755
|
-
// Remove Unset Optionals
|
|
756
|
-
ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.article, {
|
|
757
|
-
ignoreEmptyArrays: ['caption'],
|
|
758
|
-
ignoreEmptyString: ['body', 'alt', 'license', 'copyright'],
|
|
759
|
-
});
|
|
760
|
-
// Validate and correct invalid bits as much as possible
|
|
761
|
-
return NodeValidator_1.NodeValidator.validateResource(node);
|
|
762
|
-
}
|
|
763
|
-
/**
|
|
764
|
-
* Build documentResource node
|
|
765
|
-
*
|
|
766
|
-
* @param data - data for the node
|
|
767
|
-
* @returns
|
|
768
|
-
*/
|
|
769
|
-
documentResource(context, data) {
|
|
770
|
-
var _a, _b;
|
|
771
|
-
const { value, license, copyright, showInIndex, caption, search } = data;
|
|
772
|
-
// NOTE: Node order is important and is defined here
|
|
773
|
-
const node = {
|
|
774
|
-
type: ResourceTag_1.ResourceTag.document,
|
|
775
|
-
__typeAlias: ResourceTag_1.ResourceTag.document,
|
|
776
|
-
document: {
|
|
777
|
-
format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
|
|
778
|
-
provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
|
|
779
|
-
url: value !== null && value !== void 0 ? value : '',
|
|
780
|
-
license: license !== null && license !== void 0 ? license : '',
|
|
781
|
-
copyright: copyright !== null && copyright !== void 0 ? copyright : '',
|
|
782
|
-
showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
|
|
783
|
-
caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
|
|
784
|
-
search: (search !== null && search !== void 0 ? search : undefined),
|
|
785
|
-
},
|
|
786
|
-
};
|
|
787
|
-
// Remove Unset Optionals
|
|
788
|
-
ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.document, {
|
|
789
|
-
ignoreEmptyArrays: ['caption'],
|
|
790
|
-
ignoreEmptyString: ['url', 'alt', 'license', 'copyright'],
|
|
791
|
-
ignoreFalse: ['showInIndex'],
|
|
792
|
-
});
|
|
793
|
-
// Validate and correct invalid bits as much as possible
|
|
794
|
-
return NodeValidator_1.NodeValidator.validateResource(node);
|
|
795
|
-
}
|
|
796
|
-
/**
|
|
797
|
-
* Build documentEmbedResource node
|
|
798
|
-
*
|
|
799
|
-
* @param data - data for the node
|
|
800
|
-
* @returns
|
|
801
|
-
*/
|
|
802
|
-
documentEmbedResource(context, data) {
|
|
803
|
-
var _a, _b;
|
|
804
|
-
const { value, license, copyright, showInIndex, caption, search } = data;
|
|
805
|
-
// NOTE: Node order is important and is defined here
|
|
806
|
-
const node = {
|
|
807
|
-
type: ResourceTag_1.ResourceTag.documentEmbed,
|
|
808
|
-
__typeAlias: ResourceTag_1.ResourceTag.documentEmbed,
|
|
809
|
-
documentEmbed: {
|
|
810
|
-
format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
|
|
811
|
-
provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
|
|
812
|
-
url: value !== null && value !== void 0 ? value : '',
|
|
813
|
-
license: license !== null && license !== void 0 ? license : '',
|
|
814
|
-
copyright: copyright !== null && copyright !== void 0 ? copyright : '',
|
|
815
|
-
showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
|
|
816
|
-
caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
|
|
817
|
-
search: (search !== null && search !== void 0 ? search : undefined),
|
|
818
|
-
},
|
|
819
|
-
};
|
|
820
|
-
// Remove Unset Optionals
|
|
821
|
-
ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.documentEmbed, {
|
|
822
|
-
ignoreEmptyArrays: ['caption'],
|
|
823
|
-
ignoreEmptyString: ['url', 'alt', 'license', 'copyright'],
|
|
824
|
-
ignoreFalse: ['showInIndex'],
|
|
825
|
-
});
|
|
826
|
-
// Validate and correct invalid bits as much as possible
|
|
827
|
-
return NodeValidator_1.NodeValidator.validateResource(node);
|
|
828
|
-
}
|
|
829
|
-
/**
|
|
830
|
-
* Build documentLinkResource node
|
|
831
|
-
*
|
|
832
|
-
* @param data - data for the node
|
|
833
|
-
* @returns
|
|
834
|
-
*/
|
|
835
|
-
documentLinkResource(context, data) {
|
|
836
|
-
var _a, _b;
|
|
837
|
-
const { value, license, copyright, showInIndex, caption, search } = data;
|
|
838
|
-
// NOTE: Node order is important and is defined here
|
|
839
|
-
const node = {
|
|
840
|
-
type: ResourceTag_1.ResourceTag.documentLink,
|
|
841
|
-
__typeAlias: ResourceTag_1.ResourceTag.documentLink,
|
|
842
|
-
documentLink: {
|
|
843
|
-
format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
|
|
844
|
-
provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
|
|
845
|
-
url: value !== null && value !== void 0 ? value : '',
|
|
846
|
-
license: license !== null && license !== void 0 ? license : '',
|
|
847
|
-
copyright: copyright !== null && copyright !== void 0 ? copyright : '',
|
|
848
|
-
showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
|
|
849
|
-
caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
|
|
850
|
-
search: (search !== null && search !== void 0 ? search : undefined),
|
|
851
|
-
},
|
|
852
|
-
};
|
|
853
|
-
// Remove Unset Optionals
|
|
854
|
-
ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.documentLink, {
|
|
855
|
-
ignoreEmptyArrays: ['caption'],
|
|
856
|
-
ignoreEmptyString: ['url', 'alt', 'license', 'copyright'],
|
|
857
|
-
ignoreFalse: ['showInIndex'],
|
|
858
|
-
});
|
|
859
|
-
// Validate and correct invalid bits as much as possible
|
|
860
|
-
return NodeValidator_1.NodeValidator.validateResource(node);
|
|
861
|
-
}
|
|
862
|
-
/**
|
|
863
|
-
* Build documentDownloadResource node
|
|
864
|
-
*
|
|
865
|
-
* @param data - data for the node
|
|
866
|
-
* @returns
|
|
867
|
-
*/
|
|
868
|
-
documentDownloadResource(context, data) {
|
|
869
|
-
var _a, _b;
|
|
870
|
-
const { value, license, copyright, showInIndex, caption, search } = data;
|
|
871
|
-
// NOTE: Node order is important and is defined here
|
|
872
|
-
const node = {
|
|
873
|
-
type: ResourceTag_1.ResourceTag.documentDownload,
|
|
874
|
-
__typeAlias: ResourceTag_1.ResourceTag.documentDownload,
|
|
875
|
-
documentDownload: {
|
|
876
|
-
format: ((_a = UrlUtils_1.UrlUtils.fileExtensionFromUrl(value)) !== null && _a !== void 0 ? _a : undefined),
|
|
877
|
-
provider: ((_b = UrlUtils_1.UrlUtils.domainFromUrl(value)) !== null && _b !== void 0 ? _b : undefined),
|
|
878
|
-
url: value !== null && value !== void 0 ? value : '',
|
|
879
|
-
license: license !== null && license !== void 0 ? license : '',
|
|
880
|
-
copyright: copyright !== null && copyright !== void 0 ? copyright : '',
|
|
881
|
-
showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
|
|
882
|
-
caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
|
|
883
|
-
search: (search !== null && search !== void 0 ? search : undefined),
|
|
884
|
-
},
|
|
885
|
-
};
|
|
886
|
-
// Remove Unset Optionals
|
|
887
|
-
ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.documentDownload, {
|
|
888
|
-
ignoreEmptyArrays: ['caption'],
|
|
889
|
-
ignoreEmptyString: ['url', 'alt', 'license', 'copyright'],
|
|
890
|
-
ignoreFalse: ['showInIndex'],
|
|
891
|
-
});
|
|
892
|
-
// Validate and correct invalid bits as much as possible
|
|
893
|
-
return NodeValidator_1.NodeValidator.validateResource(node);
|
|
894
|
-
}
|
|
895
|
-
/**
|
|
896
|
-
* Build appLinkResource node
|
|
897
|
-
*
|
|
898
|
-
* @param data - data for the node
|
|
899
|
-
* @returns
|
|
900
|
-
*/
|
|
901
|
-
appLinkResource(context, data) {
|
|
902
|
-
const { value, license, copyright, showInIndex, caption, search } = data;
|
|
903
|
-
// NOTE: Node order is important and is defined here
|
|
904
|
-
const node = {
|
|
905
|
-
type: ResourceTag_1.ResourceTag.appLink,
|
|
906
|
-
__typeAlias: ResourceTag_1.ResourceTag.appLink,
|
|
907
|
-
appLink: {
|
|
908
|
-
// format: (UrlUtils.fileExtensionFromUrl(value) ?? undefined) as string,
|
|
909
|
-
// provider: (UrlUtils.domainFromUrl(value) ?? undefined) as string,
|
|
910
|
-
provider: undefined,
|
|
911
|
-
url: value !== null && value !== void 0 ? value : '',
|
|
912
|
-
license: license !== null && license !== void 0 ? license : '',
|
|
913
|
-
copyright: copyright !== null && copyright !== void 0 ? copyright : '',
|
|
914
|
-
showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
|
|
915
|
-
caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
|
|
916
|
-
search: (search !== null && search !== void 0 ? search : undefined),
|
|
917
|
-
},
|
|
918
|
-
};
|
|
919
|
-
// Remove Unset Optionals
|
|
920
|
-
ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.appLink, {
|
|
921
|
-
ignoreEmptyArrays: ['caption'],
|
|
922
|
-
ignoreEmptyString: ['url', /*'alt',*/ 'license', 'copyright'],
|
|
923
|
-
ignoreFalse: ['showInIndex'],
|
|
924
|
-
});
|
|
925
|
-
// Validate and correct invalid bits as much as possible
|
|
926
|
-
return NodeValidator_1.NodeValidator.validateResource(node);
|
|
927
|
-
}
|
|
928
|
-
/**
|
|
929
|
-
* Build websiteLinkResource node
|
|
930
|
-
*
|
|
931
|
-
* @param data - data for the node
|
|
932
|
-
* @returns
|
|
933
|
-
*/
|
|
934
|
-
websiteLinkResource(context, data) {
|
|
935
|
-
const { value, /*siteName,*/ license, copyright, showInIndex, caption, search } = data;
|
|
936
|
-
// NOTE: Node order is important and is defined here
|
|
937
|
-
const node = {
|
|
938
|
-
type: ResourceTag_1.ResourceTag.websiteLink,
|
|
939
|
-
__typeAlias: ResourceTag_1.ResourceTag.websiteLink,
|
|
940
|
-
websiteLink: {
|
|
941
|
-
// provider: (UrlUtils.domainFromUrl(value) ?? undefined) as string,
|
|
942
|
-
provider: undefined,
|
|
943
|
-
url: value !== null && value !== void 0 ? value : '',
|
|
944
|
-
// siteName,
|
|
945
|
-
license: license !== null && license !== void 0 ? license : '',
|
|
946
|
-
copyright: copyright !== null && copyright !== void 0 ? copyright : '',
|
|
947
|
-
showInIndex: showInIndex !== null && showInIndex !== void 0 ? showInIndex : false,
|
|
948
|
-
caption: this.handleJsonText(context, TextLocation_1.TextLocation.tag, caption),
|
|
949
|
-
search: (search !== null && search !== void 0 ? search : undefined),
|
|
950
|
-
},
|
|
951
|
-
};
|
|
952
|
-
// Remove Unset Optionals
|
|
953
|
-
ObjectUtils_1.ObjectUtils.removeUnwantedProperties(node.websiteLink, {
|
|
954
|
-
ignoreEmptyArrays: ['caption'],
|
|
955
|
-
ignoreEmptyString: ['url', 'alt', 'license', 'copyright'],
|
|
956
|
-
ignoreFalse: ['showInIndex'],
|
|
957
|
-
});
|
|
958
|
-
// Validate and correct invalid bits as much as possible
|
|
959
|
-
return NodeValidator_1.NodeValidator.validateResource(node);
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
exports.ResourceBuilder = ResourceBuilder;
|
|
963
|
-
//# sourceMappingURL=ResourceBuilder.js.map
|