@gmb/bitmark-parser-generator 3.29.0 → 3.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/bitmark-parser-generator.min.js +1 -1
- package/dist/browser/bundle-report.html +2 -2
- package/dist/cjs/ast/Builder.js +13 -10
- package/dist/cjs/ast/Builder.js.map +1 -1
- package/dist/cjs/breakscaping/Breakscape.js +3 -3
- package/dist/cjs/breakscaping/Breakscape.js.map +1 -1
- package/dist/cjs/config/raw/bits.js +2 -0
- package/dist/cjs/config/raw/bits.js.map +1 -1
- package/dist/cjs/config/raw/properties.js +2 -2
- package/dist/cjs/config/raw/properties.js.map +1 -1
- package/dist/cjs/generated/build-info.js +1 -1
- package/dist/cjs/generator/bitmark/BitmarkGenerator.js +5 -5
- package/dist/cjs/generator/bitmark/BitmarkGenerator.js.map +1 -1
- package/dist/cjs/model/enum/BitType.js +2 -0
- package/dist/cjs/model/enum/BitType.js.map +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +1 -1
- package/dist/cjs/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +1 -1
- package/dist/esm/ast/Builder.js +13 -10
- package/dist/esm/ast/Builder.js.map +1 -1
- package/dist/esm/breakscaping/Breakscape.js +3 -3
- package/dist/esm/breakscaping/Breakscape.js.map +1 -1
- package/dist/esm/config/raw/bits.js +2 -0
- package/dist/esm/config/raw/bits.js.map +1 -1
- package/dist/esm/config/raw/properties.js +2 -2
- package/dist/esm/config/raw/properties.js.map +1 -1
- package/dist/esm/generated/build-info.js +1 -1
- package/dist/esm/generator/bitmark/BitmarkGenerator.js +5 -5
- package/dist/esm/generator/bitmark/BitmarkGenerator.js.map +1 -1
- package/dist/esm/model/enum/BitType.js +2 -0
- package/dist/esm/model/enum/BitType.js.map +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js +1 -1
- package/dist/esm/parser/bitmark/peg/contentProcessors/CardContentProcessor.js.map +1 -1
- package/dist/types/ast/Builder.d.ts +1 -1
- package/dist/types/ast/Builder.d.ts.map +1 -1
- package/dist/types/breakscaping/Breakscape.d.ts +1 -1
- package/dist/types/breakscaping/Breakscape.d.ts.map +1 -1
- package/dist/types/config/raw/bits.d.ts.map +1 -1
- package/dist/types/model/enum/BitType.d.ts +4 -0
- package/dist/types/model/enum/BitType.d.ts.map +1 -1
- package/dist/types/model/json/BitJson.d.ts +4 -1
- package/dist/types/model/json/BitJson.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.bitmarkParserGenerator=t():e.bitmarkParserGenerator=t()}(this,(()=>(()=>{"use strict";var e={4:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AstWalkerGenerator=void 0;const r=i(5126);t.AstWalkerGenerator=class{constructor(){this.ast=new r.Ast,this.debugGenerationInline=!1,this.printed=!1}enter(e,t,i){let r;const o=this,n=`enter_${e.key}`;return this.printed||(this.printed=!0),this.debugGenerationInline&&this.writeInlineDebug(e.key,{open:!0}),"function"==typeof o[n]&&(r=o[n](e,t,i)),r}between(e,t,i,r,o){let n;const a=this,s=`between_${e.key}`;return this.debugGenerationInline&&this.writeInlineDebug(e.key,{single:!0}),"function"==typeof a[s]&&(n=a[s](e,t,i,r,o)),n}exit(e,t,i){const r=this,o=`exit_${e.key}`;this.debugGenerationInline&&this.writeInlineDebug(e.key,{close:!0}),"function"==typeof r[o]&&r[o](e,t,i)}leaf(e,t,i){const r=this,o=`leaf_${e.key}`;this.debugGenerationInline&&this.writeInlineDebug(e.key,{open:!0}),"function"==typeof r[o]&&r[o](e,t,i),this.debugGenerationInline&&this.writeInlineDebug(e.key,{close:!0})}getParentNode(e,t=1){if(e.length>t)return e[e.length-t-1]}}},21:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.personChainContentProcessor=function(e,t,i,p,c){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("person content",p);const u=e.bitContentProcessor(l.BitContentLevel.Chain,i,p.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("person TAGS",u);const{propertyTitle:y,resources:g}=u,d=r.Breakscape.unbreakscape(s.StringUtils.trimmedString(p.value),{textFormat:n.TextFormat.bitmarkText,textLocation:a.TextLocation.tag}),T=s.StringUtils.trimmedString(y),f=function(e,t){let i;const r=[];if(t)for(const e of t.reverse())i||o.ResourceTag.image!==e.type?r.push(e):i=e;r.length>0&&(e.parser.excessResources=r,e.addWarning(`${r.length} excess resource(s) present in the [@person] chain.`));return i}(e,g),m={name:d,title:T,avatarImage:f};c.person=m};const r=i(7735),o=i(6149),n=i(385),a=i(6877),s=i(9681),l=i(3029)},98:function(e,t,i){var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(o,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function s(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonStringGenerator=void 0;const o=i(6772),n=i(2497);t.JsonStringGenerator=class{constructor(e){this.writer=new o.StringWriter,this.generator=new n.JsonGenerator(this.writer,e)}generate(e){return r(this,void 0,void 0,(function*(){return yield this.generator.generate(e),this.writer.getString()}))}generateSync(e){return this.generator.generateSync(e),this.writer.getString()}}},126:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeType=void 0;const r=(0,i(4718).superenum)({unknown:"unknown",action:"action",actionValue:"actionValue",activityType:"activityType",activityTypeValue:"activityTypeValue",additionalSolutions:"additionalSolutions",additionalSolutionsValue:"additionalSolutionsValue",ageRange:"ageRange",ageRangeValue:"ageRangeValue",aiGenerated:"aiGenerated",aiGeneratedValue:"aiGeneratedValue",alias:"alias",alignment:"alignment",allowedBit:"allowedBit",allowedBitValue:"allowedBitValue",alt:"alt",alternativeAnswers:"alternativeAnswers",alternativeAnswersValue:"alternativeAnswersValue",alternativeDefinitions:"alternativeDefinitions",alternativeDefinitionsValue:"alternativeDefinitionsValue",altLangTag:"altLangTag",altLangTagValue:"altLangTagValue",analyticsTag:"analyticsTag",analyticsTagValue:"analyticsTagValue",anchor:"anchor",answer:"answer",appLink:"appLink",attrs:"attrs",audio:"audio",audioEmbed:"audioEmbed",audioLink:"audioLink",author:"author",authorValue:"authorValue",availableClassifications:"availableClassifications",availableClassificationsValue:"availableClassificationsValue",avatarImage:"avatarImage",backgroundWallpaper:"backgroundWallpaper",backgroundWallpaperValue:"backgroundWallpaperValue",bitLevel:"bitLevel",bitmarkAst:"bitmarkAst",bitmarkVersion:"bitmarkVersion",bits:"bits",bitsValue:"bitsValue",bitType:"bitType",blockId:"blockId",blockIdValue:"blockIdValue",body:"body",bodyValue:"bodyValue",bodyBit:"bodyBit",bodyBits:"bodyBits",bodyJson:"bodyJson",bodyParts:"bodyParts",bodyPartsValue:"bodyPartsValue",bodyPartText:"bodyPartText",bodyText:"bodyText",book:"book",bookValue:"bookValue",bookAlias:"bookAlias",bookAliasValue:"bookAliasValue",bookDiff:"bookDiff",bookDiffValue:"bookDiffValue",bot:"bot",botResponses:"botResponses",botResponsesValue:"botResponsesValue",botValue:"botValue",bubbleTag:"bubbleTag",bubbleTagValue:"bubbleTagValue",buttonCaption:"buttonCaption",buttonCaptionValue:"buttonCaptionValue",callToActionUrl:"callToActionUrl",callToActionUrlValue:"callToActionUrlValue",caption:"caption",captionDefinitionList:"captionDefinitionList",captionValue:"captionValue",cardBits:"cardBits",cardBitsValue:"cardBitsValue",cardNode:"cardNode",categoryTag:"categoryTag",categoryTagValue:"categoryTagValue",cells:"cells",cellsValue:"cellsValue",chatWithBook:"chatWithBook",chatWithBookValue:"chatWithBookValue",chatWithBookBrainKey:"chatWithBookBrainKey",chatWithBookBrainKeyValue:"chatWithBookBrainKeyValue",checked:"checked",choice:"choice",choices:"choices",choicesValue:"choicesValue",class:"class",classification:"classification",classificationValue:"classificationValue",codeLineNumbers:"codeLineNumbers",codeLineNumbersValue:"codeLineNumbersValue",codeMinimap:"codeMinimap",codeMinimapValue:"codeMinimapValue",color:"color",colorTag:"colorTag",colorTagValue:"colorTagValue",column:"column",columns:"columns",columnsValue:"columnsValue",comment:"comment",commentedBitType:"commentedBitType",computerLanguage:"computerLanguage",computerLanguageValue:"computerLanguageValue",content:"contentValue",content2Buy:"content2Buy",contentValue:"contentValue",contentValueValue:"contentValueValue",copyright:"copyright",coverColor:"coverColor",coverColorValue:"coverColorValue",coverImage:"coverImage",coverImageValue:"coverImageValue",customerExternalId:"customerExternalId",customerId:"customerId",customerIdValue:"customerIdValue",data:"data",dataValue:"dataValue",dataValueValue:"dataValueValue",date:"date",dateEnd:"dateEnd",dateEndValue:"dateEndValue",dateValue:"dateValue",decimalPlaces:"decimalPlaces",deeplink:"deeplink",deeplinkValue:"deeplinkValue",definition:"definition",definitions:"definitions",definitionsValue:"definitionsValue",disableCalculation:"disableCalculation",disableFeedback:"disableFeedback",disableFeedbackValue:"disableFeedbackValue",diffTo:"diffTo",diffToValue:"diffToValue",diffOp:"diffOp",diffOpValue:"diffOpValue",diffRef:"diffRef",diffRefValue:"diffRefValue",diffContext:"diffContext",diffContextValue:"diffContextValue",diffTime:"diffTime",diffTimeValue:"diffTimeValue",document:"document",documentDownload:"documentDownload",documentEmbed:"documentEmbed",documentLink:"documentLink",duration:"duration",durationValue:"durationValue",elements:"elements",elementsValue:"elementsValue",emphasis:"emphasis",end:"end",errors:"errors",errorsValue:"errorsValue",example:"example",exampleValue:"exampleValue",externalId:"externalId",externalIdValue:"externalIdValue",externalLink:"externalLink",externalLinkText:"externalLinkText",extraProperties:"extraProperties",feedbacks:"feedbacks",feedbacksValue:"feedbacksValue",feedback:"feedback",feedbackEngine:"feedbackEngine",feedbackEngineValue:"feedbackEngineValue",feedbackType:"feedbackType",flashcards:"flashcards",flashcardSet:"flashcardSet",flashcardSetValue:"flashcardSetValue",flashcardsValue:"flashcardsValue",focusX:"focusX",focusXValue:"focusXValue",focusY:"focusY",focusYValue:"focusYValue",footer:"footer",footerText:"footerText",forKeys:"forKeys",format:"format",forValues:"forValues",forValuesValue:"forValuesValue",gap:"gap",handInAcceptFileType:"handInAcceptFileType",handInAcceptFileTypeValue:"handInAcceptFileTypeValue",handInRequirement:"handInRequirement",handInRequirementValue:"handInRequirementValue",handInInstruction:"handInInstruction",handInInstructionValue:"handInInstructionValue",hasBookNavigation:"hasBookNavigation",hasBookNavigationValue:"hasBookNavigationValue",hasMarkAsDone:"hasMarkAsDone",hasMarkAsDoneValue:"hasMarkAsDoneValue",heading:"heading",height:"height",heightValue:"heightValue",highlight:"highlight",hint:"hint",href:"href",icon:"icon",iconTag:"iconTag",iconTagValue:"iconTagValue",iconValue:"iconValue",id:"id",idValue:"idValue",image:"image",imageFirst:"imageFirst",imageFirstValue:"imageFirstValue",imageLandscape:"imageLandscape",imageLink:"imageLink",imagePlaceholder:"imagePlaceholder",imagePlaceholderValue:"imagePlaceholderValue",imagePortrait:"imagePortrait",imageSource:"imageSource",index:"index",indexValue:"indexValue",ingredients:"ingredients",ingredientsValue:"ingredientsValue",instruction:"instruction",internalComment:"internalComment",internalCommentValue:"internalCommentValue",isCaseSensitive:"isCaseSensitive",isCommented:"isCommented",isCorrect:"isCorrect",__isDefaultExample:"__isDefaultExample",isExample:"isExample",isInfoOnly:"isInfoOnly",isInfoOnlyValue:"isInfoOnlyValue",isPlain:"isPlain",isPublic:"isPublic",isPublicValue:"isPublicValue",isTracked:"isTracked",isTrackedValue:"isTrackedValue",item:"item",itemLead:"itemLead",jupyterExecutionCount:"jupyterExecutionCount",jupyterExecutionCountValue:"jupyterExecutionCountValue",jupyterId:"jupyterId",jupyterIdValue:"jupyterIdValue",key:"key",keyAudio:"keyAudio",keyImage:"keyImage",kind:"kind",kindValue:"kindValue",label:"label",labelFalse:"labelFalse",labelFalseValue:"labelFalseValue",labelTrue:"labelTrue",labelTrueValue:"labelTrueValue",lang:"lang",language:"language",languageValue:"languageValue",langValue:"langValue",layer:"layer",layerValue:"layerValue",layerRole:"layerRole",layerRoleValue:"layerRoleValue",lead:"lead",level:"level",levelACTFL:"levelACTFL",levelACTFLValue:"levelACTFLValue",levelCEFR:"levelCEFR",levelCEFRp:"levelCEFRp",levelCEFRpValue:"levelCEFRpValue",levelCEFRValue:"levelCEFRValue",levelILR:"levelILR",levelILRValue:"levelILRValue",license:"license",line:"line",list:"list",listItemIndent:"listItemIndent",listItemIndentValue:"listItemIndentValue",listValue:"listValue",location:"location",locationValue:"locationValue",machineTranslated:"machineTranslated",machineTranslatedValue:"machineTranslatedValue",mailingList:"mailingList",marginNumber:"marginNumber",mark:"mark",markConfig:"markConfig",markConfigValue:"markConfigValue",marks:"marks",marksValue:"marksValue",markup:"markup",matrix:"matrix",matrixValue:"matrixValue",maxCreatedBits:"maxCreatedBits",maxCreatedBitsValue:"maxCreatedBitsValue",maxDisplayLevel:"maxDisplayLevel",maxDisplayLevelValue:"maxDisplayLevelValue",maxTocChapterLevel:"maxTocChapterLevel",maxTocChapterLevelValue:"maxTocChapterLevelValue",message:"message",mockupId:"mockupId",name:"name",offset:"offset",options:"options",optionsValue:"optionsValue",original:"original",padletId:"padletId",padletIdValue:"padletIdValue",page:"page",pageNo:"pageNo",pageNoValue:"pageNoValue",pageNumber:"pageNumber",pageValue:"pageValue",pairs:"pairs",pairsValue:"pairsValue",parent:"parent",parser:"parser",partialAnswer:"partialAnswer",partialAnswerValue:"partialAnswerValue",person:"person",path:"path",pathValue:"pathValue",pointerLeft:"pointerLeft",pointerLeftValue:"pointerLeftValue",pointerTop:"pointerTop",pointerTopValue:"pointerTopValue",posterImage:"posterImage",posterImageValue:"posterImageValue",postfix:"postfix",prefix:"prefix",processHandIn:"processHandIn",processHandInValue:"processHandInValue",product:"product",productFolder:"productFolder",productFolderValue:"productFolderValue",productId:"productId",productIdValue:"productIdValue",productList:"productList",productListValue:"productListValue",productValue:"productValue",productVideo:"productVideo",productVideoList:"productVideoList",productVideoListValue:"productVideoListValue",productVideoValue:"productVideoValue",progress:"progress",progressValue:"progressValue",pronunciationTable:"pronunciationTable",properties:"properties",property:"property",propertyKey:"propertyKey",propertyValue:"propertyValue",propertyValues:"propertyValues",provider:"provider",publications:"publications",publicationsValue:"publicationsValue",publisher:"publisher",publisherName:"publisherName",publisherNameValue:"publisherNameValue",publisherValue:"publisherValue",quantity:"quantity",question:"question",questions:"questions",questionsValue:"questionsValue",quizCountItems:"quizCountItems",quizCountItemsValue:"quizCountItemsValue",quizStrikethroughSolutions:"quizStrikethroughSolutions",quizStrikethroughSolutionsValue:"quizStrikethroughSolutionsValue",quizzes:"quizzes",quizzesValue:"quizzesValue",quotedPerson:"quotedPerson",ratingLevelEnd:"ratingLevelEnd",ratingLevelSelected:"ratingLevelSelected",ratingLevelSelectedValue:"ratingLevelSelectedValue",ratingLevelStart:"ratingLevelStart",reaction:"reaction",reason:"reason",reasonableNumOfChars:"reasonableNumOfChars",reasonableNumOfCharsValue:"reasonableNumOfCharsValue",reductionTag:"reductionTag",reductionTagValue:"reductionTagValue",refAuthor:"refAuthor",refBookTitle:"refBookTitle",reference:"reference",referenceEnd:"referenceEnd",referenceProperty:"referenceProperty",referencePropertyValue:"referencePropertyValue",refPublisher:"refPublisher",refPublicationYear:"refPublicationYear",citationStyle:"citationStyle",citationStyleValue:"citationStyleValue",releaseDate:"releaseDate",releaseDateValue:"releaseDateValue",releaseKind:"releaseKind",releaseKindValue:"releaseKindValue",releaseVersion:"releaseVersion",releaseVersionValue:"releaseVersionValue",resolved:"resolved",resolvedBy:"resolvedBy",resolvedByValue:"resolvedByValue",resolvedDate:"resolvedDate",resolvedDateValue:"resolvedDateValue",resolvedValue:"resolvedValue",resources:"resources",resourcesValue:"resourcesValue",resourceType:"resourceType",response:"response",responses:"responses",responsesValue:"responsesValue",revealSolutions:"revealSolutions",root:"root",sampleSolution:"sampleSolution",sampleSolutionValue:"sampleSolutionValue",scormSource:"scormSource",scormSourceValue:"scormSourceValue",search:"search",searchValue:"searchValue",searchIndex:"searchIndex",searchIndexValue:"searchIndexValue",section:"section",select:"select",servings:"servings",servingsValue:"servingsValue",showInIndex:"showInIndex",showInIndexValue:"showInIndexValue",size:"size",slug:"slug",slugValue:"slugValue",solution:"solution",solutions:"solutions",solutionsValue:"solutionsValue",spaceId:"spaceId",spaceIdValue:"spaceIdValue",src:"src",src1x:"src1x",src2x:"src2x",src3x:"src3x",src4x:"src4x",start:"start",statement:"statement",statements:"statements",statementsValue:"statementsValue",statementText:"statementText",stillImageFilmEmbed:"stillImageFilmEmbed",stillImageFilmLink:"stillImageFilmLink",stripePricingTableId:"stripePricingTableId",stripePricingTableIdValue:"stripePricingTableIdValue",stripePublishableKey:"stripePublishableKey",stripePublishableKeyValue:"stripePublishableKeyValue",subject:"subject",subjectValue:"subjectValue",subtitle:"subtitle",subtype:"subtype",subtypeValue:"subtypeValue",table:"table",tableAutoWidth:"tableAutoWidth",tableAutoWidthValue:"tableAutoWidthValue",tableFixedHeader:"tableFixedHeader",tableFixedHeaderValue:"tableFixedHeaderValue",tableHeight:"tableHeight",tableHeightValue:"tableHeightValue",tablePagination:"tablePagination",tablePaginationLimit:"tablePaginationLimit",tablePaginationLimitValue:"tablePaginationLimitValue",tablePaginationValue:"tablePaginationValue",tableResizableColumns:"tableResizableColumns",tableResizableColumnsValue:"tableResizableColumnsValue",tableColumnMinWidth:"tableColumnMinWidth",tableColumnMinWidthValue:"tableColumnMinWidthValue",tableSearch:"tableSearch",tableSearchValue:"tableSearchValue",tableSort:"tableSort",tableSortValue:"tableSortValue",tableWhitespaceNoWrap:"tableWhitespaceNoWrap",tableWhitespaceNoWrapValue:"tableWhitespaceNoWrapValue",tag:"tag",tagValue:"tagValue",target:"target",targetValue:"targetValue",technicalTerm:"technicalTerm",technicalTermValue:"technicalTermValue",term:"term",text:"text",textAlign:"textAlign",textAst:"textAst",textAstValue:"textAstValue",textFormat:"textFormat",textReference:"textReference",textReferenceValue:"textReferenceValue",texts:"texts",textsValue:"textsValue",theme:"theme",themeValue:"themeValue",thumbImage:"thumbImage",thumbImageValue:"thumbImageValue",thumbnails:"thumbnails",thumbnailsValue:"thumbnailsValue",title:"title",toc:"toc",tocValue:"tocValue",topicTag:"topicTag",topicTagValue:"topicTagValue",trim:"trim",type:"type",__typeAlias:"__typeAlias",unit:"unit",unitAbbr:"unitAbbr",url:"url",value:"value",values:"values",valuesValue:"valuesValue",vendorDashboardId:"vendorDashboardId",vendorDashboardIdValue:"vendorDashboardIdValue",vendorSurveyId:"vendorSurveyId",vendorSurveyIdValue:"vendorSurveyIdValue",vendorUrl:"vendorUrl",vendorUrlValue:"vendorUrlValue",version:"version",video:"video",videoCallLink:"videoCallLink",videoCallLinkValue:"videoCallLinkValue",videoEmbed:"videoEmbed",videoLink:"videoLink",warnings:"warnings",warningsValue:"warningsValue",websiteLink:"websiteLink",width:"width",widthValue:"widthValue",x:"x",xValue:"xValue",y:"y",yValue:"yValue",zoomDisabled:"zoomDisabled"});t.NodeType=r},166:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyTag=void 0;const r=i(4718),o=i(9888),n=(0,r.superenum)(Object.assign(Object.assign({},o.propertyConfigKeys),{tag_mark:"mark",tag_reference:"reference",tag_sampleSolution:"sampleSolution",tag_title:"title"}));t.PropertyTag=n},168:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RESOURCES=void 0;const r=i(5051),o=i(9984),n=i(6149),a={[r.ResourceConfigKey.image]:{tag:n.ResourceTag.image},[r.ResourceConfigKey.imagePortrait]:{tag:n.ResourceTag.imagePortrait,jsonKey:o.ResourceJsonKey.imagePortrait},[r.ResourceConfigKey.imageLandscape]:{tag:n.ResourceTag.imageLandscape,jsonKey:o.ResourceJsonKey.imageLandscape},[r.ResourceConfigKey.imageEmbed]:{tag:n.ResourceTag.imageEmbed,jsonKey:o.ResourceJsonKey.imageEmbed},[r.ResourceConfigKey.imageLink]:{tag:n.ResourceTag.imageLink,jsonKey:o.ResourceJsonKey.imageLink},[r.ResourceConfigKey.audio]:{tag:n.ResourceTag.audio},[r.ResourceConfigKey.audioEmbed]:{tag:n.ResourceTag.audioEmbed,jsonKey:o.ResourceJsonKey.audioEmbed},[r.ResourceConfigKey.audioLink]:{tag:n.ResourceTag.audioLink,jsonKey:o.ResourceJsonKey.audioLink},[r.ResourceConfigKey.video]:{tag:n.ResourceTag.video},[r.ResourceConfigKey.videoEmbed]:{tag:n.ResourceTag.videoEmbed,jsonKey:o.ResourceJsonKey.videoEmbed},[r.ResourceConfigKey.videoLink]:{tag:n.ResourceTag.videoLink,jsonKey:o.ResourceJsonKey.videoLink},[r.ResourceConfigKey.stillImageFilmEmbed]:{tag:n.ResourceTag.stillImageFilmEmbed,jsonKey:o.ResourceJsonKey.stillImageFilmEmbed},[r.ResourceConfigKey.stillImageFilmLink]:{tag:n.ResourceTag.stillImageFilmLink,jsonKey:o.ResourceJsonKey.stillImageFilmLink},[r.ResourceConfigKey.article]:{tag:n.ResourceTag.article},[r.ResourceConfigKey.articleEmbed]:{tag:n.ResourceTag.articleEmbed,jsonKey:o.ResourceJsonKey.articleEmbed},[r.ResourceConfigKey.articleLink]:{tag:n.ResourceTag.articleLink,jsonKey:o.ResourceJsonKey.articleLink},[r.ResourceConfigKey.document]:{tag:n.ResourceTag.document},[r.ResourceConfigKey.documentEmbed]:{tag:n.ResourceTag.documentEmbed,jsonKey:o.ResourceJsonKey.documentEmbed},[r.ResourceConfigKey.documentLink]:{tag:n.ResourceTag.documentLink,jsonKey:o.ResourceJsonKey.documentLink},[r.ResourceConfigKey.documentDownload]:{tag:n.ResourceTag.documentDownload,jsonKey:o.ResourceJsonKey.documentDownload},[r.ResourceConfigKey.appLink]:{tag:n.ResourceTag.appLink,jsonKey:o.ResourceJsonKey.appLink},[r.ResourceConfigKey.websiteLink]:{tag:n.ResourceTag.websiteLink,jsonKey:o.ResourceJsonKey.websiteLink},[r.ResourceConfigKey.icon]:{tag:n.ResourceTag.icon},[r.ResourceConfigKey.backgroundWallpaper]:{tag:n.ResourceTag.backgroundWallpaper},[r.ResourceConfigKey.imagePlaceholder]:{tag:n.ResourceTag.imagePlaceholder}};t.RESOURCES=a},201:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UrlUtils=void 0;const i=new class{fileExtensionFromUrl(e){let t;if(e)try{const i=new URL(e).pathname.split(".");i.length>1&&(t=i[i.length-1])}catch(e){}return t}domainFromUrl(e){let t;if(e)try{t=new URL(e).hostname}catch(e){}return t}};t.UrlUtils=i},363:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExampleType=void 0;const r=(0,i(4718).superenum)({none:"none",string:"string",boolean:"boolean"});t.ExampleType=r},385:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextFormat=void 0;const r=(0,i(4718).superenum)({plainText:"text",latex:"latex",json:"json",xml:"xml",bitmarkText:"bitmark++"});t.TextFormat=r},431:function(e,t,i){var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(o,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function s(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TextGenerator=void 0;const o=i(5126),n=i(7735),a=i(126),s=i(3811),l=i(385),p=i(6877),c=i(2483),u=i(9554),y=i(9681),g=i(4),d={bodyBitCallback:void 0,debugGenerationInline:!1},T="==",f=["*","`","_","!","="],m={[c.TextMarkType.bold]:"**",[c.TextMarkType.light]:"``",[c.TextMarkType.italic]:"__",[c.TextMarkType.highlight]:"!!"},h=[c.TextMarkType.bold,c.TextMarkType.light,c.TextMarkType.italic,c.TextMarkType.highlight],b=[c.TextMarkType.strike,c.TextMarkType.subscript,c.TextMarkType.superscript,c.TextMarkType.ins,c.TextMarkType.del,c.TextMarkType.underline,c.TextMarkType.doubleUnderline,c.TextMarkType.circle,c.TextMarkType.languageEm,c.TextMarkType.userUnderline,c.TextMarkType.userDoubleUnderline,c.TextMarkType.userStrike,c.TextMarkType.userCircle,c.TextMarkType.userHighlight,c.TextMarkType.notranslate,c.TextMarkType.link,c.TextMarkType.ref,c.TextMarkType.xref,c.TextMarkType.extref,c.TextMarkType.footnote,c.TextMarkType.footnoteStar,c.TextMarkType.symbol,c.TextMarkType.var,c.TextMarkType.code,c.TextMarkType.timer,c.TextMarkType.duration,c.TextMarkType.color,c.TextMarkType.comment],B=new RegExp(/(\n|\r\n)/,"g"),v=new RegExp(/https?:\/\/|mailto:(.*)/,"g"),C=new RegExp(/\]/,"g"),x="enter",P="between",k="exit";class K extends g.AstWalkerGenerator{constructor(e,t){var i,r;super(),this.ast=new o.Ast,this.generateOptions={},this.textFormat=l.TextFormat.bitmarkText,this.textLocation=p.TextLocation.body,this.writerText="",this.nodeIndex=0,this.currentIndent=0,this.prevIndent=0,this.indentationStringCache="",this.inParagraph=!1,this.inHeading=!1,this.inCodeBlock=!1,this.exitedCodeBlock=!1,this.inBulletList=!1,this.inInline=!1,this.textDepth=0,this.placeholderIndex=0,this.placeholders={},this.rootParagraphNodeContentIndex=0,this.previousRootParagraphContextType=u.TextNodeType.text,this.inPreText=!1,this.thisNodeIsPreText=!1,this.preTextIndexTemp=-1,this.havePreText=!1,this.preTextIndex=-1,this.bitmarkVersion=null!==(i=s.BitmarkVersion.fromValue(e))&&void 0!==i?i:s.DEFAULT_BITMARK_VERSION,this.options=Object.assign(Object.assign({},d),t),this.debugGenerationInline=null!==(r=this.options.debugGenerationInline)&&void 0!==r&&r,this.bitmarkVersion,s.BitmarkVersion.v2,this.enter=this.enter.bind(this),this.between=this.between.bind(this),this.exit=this.exit.bind(this),this.leaf=this.leaf.bind(this)}generate(e,t,i,o){return r(this,void 0,void 0,(function*(){return this.generateSync(e,t,i,o)}))}generateSync(e,t,i,r){if(this.generateOptions=Object.assign({},r),this.validateGenerateOptions(e),this.generateOptions.plainTextDividerAllowed){const r=this.options.writeCallback,o=this.options.bodyBitCallback;this.options.writeCallback=void 0,this.options.bodyBitCallback=void 0,this.resetState(t,i),this.walkAndWrite(e),this.options.writeCallback=r,this.options.bodyBitCallback=o;const n=this.havePreText,a=this.preTextIndex;this.resetState(t,i),this.havePreText=n,this.preTextIndex=a,this.walkAndWrite(e)}else this.resetState(t,i),this.walkAndWrite(e);return this.writerText}getPlaceholders(){return this.placeholders}resetState(e,t){this.printed=!1,this.textFormat=null!=e?e:l.TextFormat.bitmarkText,this.textLocation=t,this.writerText="",this.nodeIndex=0,this.currentIndent=0,this.prevIndent=0,this.indentationStringCache="",this.inParagraph=!1,this.inHeading=!1,this.inCodeBlock=!1,this.exitedCodeBlock=!1,this.inBulletList=!1,this.inInline=!1,this.textDepth=0,this.placeholderIndex=0,this.placeholders={},this.rootParagraphNodeContentIndex=0,this.previousRootParagraphContextType=u.TextNodeType.hardBreak,this.inPreText=!1,this.thisNodeIsPreText=!1,this.preTextIndexTemp=-1,this.havePreText=!1,this.preTextIndex=-1}walkAndWrite(e){this.ast.walk(e,a.NodeType.textAst,this,void 0)}enter_textAstValue(e,t){return this.handleEnterNode(e.value,t)}between_textAstValue(e,t,i,r){return this.handleBetweenNode(e.value,t,i,r)}exit_textAstValue(e,t){return this.handleExitNode(e.value,t)}enter_contentValue(e,t){return this.handleEnterContentValueNode(e,t)}between_contentValue(e,t,i,r){this.handleBetweenContentValueNode(e,t,i,r)}exit_contentValue(e,t){this.handleExitContentValueNode(e,t)}enter_contentValueValue(e,t){return this.handleEnterNode(e.value,t)}between_contentValueValue(e,t,i,r){this.handleBetweenNode(e.value,t,i,r)}exit_contentValueValue(e,t){return this.handleExitNode(e.value,t)}handleEnterNode(e,t){switch(this.handleEnterNodePreTextCheck(e,t),this.handleIndent(e),e.type){case u.TextNodeType.paragraph:this.inParagraph=!0,this.writeParagraph(e);break;case u.TextNodeType.hardBreak:this.writeHardBreak(e);break;case u.TextNodeType.text:this.writeMarks(e,x),this.writeText(e),this.writeMarks(e,P),0===this.textDepth&&(this.inInline=!0),this.textDepth++;break;case u.TextNodeType.heading:this.writeHeading(e),this.inHeading=!0;break;case u.TextNodeType.section:this.writeSection(e);break;case u.TextNodeType.listItem:case u.TextNodeType.taskItem:this.writeBullet(e,t);break;case u.TextNodeType.image:case u.TextNodeType.imageInline:this.writeImage(e);break;case u.TextNodeType.codeBlock:this.inCodeBlock=!0,this.writeCodeBlock(e);break;case u.TextNodeType.latex:this.writeLatex(e);break;case u.TextNodeType.noBulletList:case u.TextNodeType.bulletList:case u.TextNodeType.orderedList:case u.TextNodeType.orderedListRoman:case u.TextNodeType.orderedListRomanLower:case u.TextNodeType.letteredList:case u.TextNodeType.letteredListLower:case u.TextNodeType.taskList:this.inBulletList=!0;break;case u.TextNodeType.gap:case u.TextNodeType.select:case u.TextNodeType.highlight:case u.TextNodeType.mark:return this.writeBodyBit(e,t),!1}this.exitedCodeBlock=!1}handleBetweenNode(e,t,i,r){e.type}handleExitNode(e,t){switch(e.type){case u.TextNodeType.text:this.textDepth--,0===this.textDepth&&(this.inInline=!1),this.writeMarks(e,k);break;case u.TextNodeType.paragraph:this.writeNL(),this.inParagraph=!1;break;case u.TextNodeType.heading:this.inHeading=!1;case u.TextNodeType.section:case u.TextNodeType.image:this.inParagraph||(this.writeNL(),this.writeNL());break;case u.TextNodeType.codeBlock:this.writeNL(),this.writeNL(),this.inCodeBlock=!1,this.exitedCodeBlock=!0;break;case u.TextNodeType.noBulletList:case u.TextNodeType.bulletList:case u.TextNodeType.orderedList:case u.TextNodeType.orderedListRoman:case u.TextNodeType.orderedListRomanLower:case u.TextNodeType.letteredList:case u.TextNodeType.letteredListLower:case u.TextNodeType.taskList:this.currentIndent<=1&&(this.writeNL(),this.inBulletList=!1)}this.handleDedent(e),this.nodeIndex++}handleIndent(e){switch(e.type){case u.TextNodeType.noBulletList:case u.TextNodeType.bulletList:case u.TextNodeType.orderedList:case u.TextNodeType.orderedListRoman:case u.TextNodeType.orderedListRomanLower:case u.TextNodeType.letteredList:case u.TextNodeType.letteredListLower:case u.TextNodeType.taskList:this.currentIndent++}}handleDedent(e){switch(e.type){case u.TextNodeType.noBulletList:case u.TextNodeType.bulletList:case u.TextNodeType.orderedList:case u.TextNodeType.orderedListRoman:case u.TextNodeType.orderedListRomanLower:case u.TextNodeType.letteredList:case u.TextNodeType.letteredListLower:case u.TextNodeType.taskList:this.currentIndent--}}handleEnterContentValueNode(e,t){3===t.length&&(this.thisNodeIsPreText=!0,this.inPreText=!1,this.previousRootParagraphContextType=u.TextNodeType.hardBreak)}handleBetweenContentValueNode(e,t,i,r){if(3===r.length){const e=t.value;this.updatePreTextState(),this.thisNodeIsPreText=!0,this.previousRootParagraphContextType=e.type,this.rootParagraphNodeContentIndex++}}handleExitContentValueNode(e,t){3===t.length&&(this.updatePreTextState(),this.thisNodeIsPreText=!1,this.generateOptions.plainTextDividerAllowed&&this.inPreText&&(this.havePreText=!0,this.preTextIndex=this.preTextIndexTemp),this.inPreText=!1)}updatePreTextState(){!this.inPreText&&this.thisNodeIsPreText&&this.previousRootParagraphContextType===u.TextNodeType.hardBreak?(this.inPreText=!0,this.preTextIndexTemp=this.rootParagraphNodeContentIndex):this.inPreText&&!this.thisNodeIsPreText&&(this.inPreText=!1,this.preTextIndexTemp=-1)}handleEnterNodePreTextCheck(e,t){if(4===t.length){if(this.inPreText&&e.type===u.TextNodeType.hardBreak)return;if(e.type===u.TextNodeType.text)return}this.thisNodeIsPreText=!1}getLinkHref(e){if(e.type===u.TextNodeType.text&&e.marks){const t=e.marks.reduce(((e,t)=>{var i;if(t.type===c.TextMarkType.link){const e=null===(i=t.attrs)||void 0===i?void 0:i.href;if(e)return e}return e}),"");if(t)return t}return!1}getIndentationString(){if(this.currentIndent===this.prevIndent)return this.indentationStringCache;let e="";for(let t=1;t<this.currentIndent;t++)e+="\t";return this.indentationStringCache=e,this.prevIndent=this.currentIndent,e}writeBodyBit(e,t){const i=`[!${this.placeholderIndex}]`;if(this.placeholders[i]=e,this.options.bodyBitCallback){const i=this.options.bodyBitCallback(e,this.placeholderIndex,t);this.write(i)}else this.write(i);this.placeholderIndex++}writeText(e){if(null==e.text)return;const t=this.inCodeBlock;let i=e.text;const r=this.getLinkText(e);if(r&&(i=r),i=r||this.breakscape(i,{textFormat:this.textFormat,textLocation:this.textLocation}),this.currentIndent>1){const e=this.getIndentationString();i=i.replace(B,`$1${e}`)}if(this.havePreText&&this.rootParagraphNodeContentIndex===this.preTextIndex&&(this.writePlainTextDivider(),this.writeNL()),this.havePreText&&this.rootParagraphNodeContentIndex>=this.preTextIndex){const t=this.breakscape(e.text,{textFormat:l.TextFormat.plainText,textLocation:this.textLocation});this.write(t)}else this.write(i);(this.currentIndent>1||t)&&(this.thisNodeIsPreText=!1),this.inPreText||e.text!==i||(this.thisNodeIsPreText=!1)}isSimpleLink(e){var t;if(null==e.text)return!1;if(1!==(null===(t=e.marks)||void 0===t?void 0:t.length))return!1;const i=this.getLinkHref(e);if(i){return i.replace(v,"$1")===e.text}return!1}getLinkText(e){if(null==e.text)return!1;const t=this.getLinkHref(e);if(t){let i;return i=t.replace(v,"$1")===e.text?t:e.text,i=(null!=i?i:"").replace(C,"^]"),i}return!1}getInterTextBreakscape(e){if(this.bitmarkVersion===s.BitmarkVersion.v2)return"";if(this.textFormat===l.TextFormat.plainText)return"";const t=this.writerText.slice(-1),i=e.slice(0,1);return t===i&&-1!==f.indexOf(t)||this.textLocation===p.TextLocation.body&&"["===t&&-1!=="@#▼►%!?+-$_=&".indexOf(i)?"^":""}validateGenerateOptions(e){this.generateOptions.plainTextDividerAllowed&&(1!==e.length||1===e.length&&e[0].type!==u.TextNodeType.paragraph)&&(this.generateOptions.plainTextDividerAllowed=!1)}writeMarks(e,t){if(e.marks){const i=!(!this.inInline&&!this.inHeading);this.thisNodeIsPreText=!1;if(0===e.marks.length)return void this.writeMarkTextWrapper(T);const r=1===e.marks.length&&i,o=e.marks.reduce(((e,t)=>e||(-1!==h.indexOf(t.type)?r?m[t.type]:T:-1!==b.indexOf(t.type)?T:e)),void 0),n=this.isSimpleLink(e);if(null!=o&&!n){if(t!=x&&t!=P||this.writeMarkTextWrapper(o),t==P)for(const t of e.marks)-1!==h.indexOf(t.type)?r||(this.writeInlineMarkStartEnd(),this.writeInlineMark(t)):c.TextMarkType.comment===t.type?(this.writeInlineMarkStartEnd(),this.writeCommentMark(t)):c.TextMarkType.link===t.type?(this.writeInlineMarkStartEnd(),this.writeLinkMark(t)):c.TextMarkType.ref===t.type?(this.writeInlineMarkStartEnd(),this.writeRefMark(t)):c.TextMarkType.xref===t.type?(this.writeInlineMarkStartEnd(),this.writeXRefMark(t)):c.TextMarkType.extref===t.type?(this.writeInlineMarkStartEnd(),this.writeExtRefMark(t)):c.TextMarkType.footnote===t.type?(this.writeInlineMarkStartEnd(),this.writeFootnoteMark(t)):c.TextMarkType.footnoteStar===t.type?(this.writeInlineMarkStartEnd(),this.writeFootnoteStarMark(t)):c.TextMarkType.symbol===t.type?(this.writeInlineMarkStartEnd(),this.writeSymbolMark(t)):-1!==b.indexOf(t.type)&&(this.writeInlineMarkStartEnd(),this.writeInlineMark(t));if(t==k){let t=!1;for(const i of e.marks)-1!==h.indexOf(i.type)?r||(t=!0):c.TextMarkType.comment!==i.type&&c.TextMarkType.link!==i.type&&c.TextMarkType.ref!==i.type&&c.TextMarkType.xref!==i.type&&c.TextMarkType.footnote!==i.type&&c.TextMarkType.footnoteStar!==i.type&&-1===b.indexOf(i.type)||(t=!0);t&&this.writeInlineMarkStartEnd()}}}}writeParagraph(e){var t,i,r,o,n;if(this.textFormat===l.TextFormat.bitmarkText){if(this.inBulletList)return;const a=null!==(i=null===(t=e.content)||void 0===t?void 0:t.length)&&void 0!==i?i:0;if(0===this.nodeIndex){if(1===a){const t=(null===(r=e.content)||void 0===r?void 0:r[0].type)===u.TextNodeType.text,i=null!==(n=null===(o=e.content)||void 0===o?void 0:o[0].text)&&void 0!==n?n:"";if(!t||""!==i)return}if(a>1)return}this.write("|"),this.writeNL(),this.exitedCodeBlock&&this.writeNL()}}writeHardBreak(e){if(this.writeNL(),this.currentIndent>1){const e=this.getIndentationString();this.write(e)}}writeHeading(e){var t,i;let r="";const o=null!==(i=null===(t=e.attrs)||void 0===t?void 0:t.level)&&void 0!==i?i:1;for(let e=0;e<+o;e++)r+="#";r+=" ",this.write(r)}writeSection(e){let t="";t=e.section?`|${e.section}: `:"|",this.write(t)}writeBullet(e,t){var i,r,o,n;let a=this.getIndentationString();const s=this.getParentNode(t,2),l=null==s?void 0:s.value,p=null==l?void 0:l.type,c=null!==(r=null===(i=null==l?void 0:l.attrs)||void 0===i?void 0:i.start)&&void 0!==r?r:1;if(p===u.TextNodeType.bulletList)a+="• ";else if(p===u.TextNodeType.noBulletList)a+="•_ ";else if(p===u.TextNodeType.orderedList)a+=`•${c} `;else if(p===u.TextNodeType.orderedListRoman)a+=`•${c}I `;else if(p===u.TextNodeType.orderedListRomanLower)a+=`•${c}i `;else if(p===u.TextNodeType.letteredList)a+="•A ";else if(p===u.TextNodeType.letteredListLower)a+="•a ";else if(p===u.TextNodeType.taskList){a+=null!==(n=null===(o=e.attrs)||void 0===o?void 0:o.checked)&&void 0!==n&&n?"•+ ":"•- "}a&&this.write(a)}writeImage(e){var t;if(null==e.attrs||!e.attrs.src)return;const i=e.attrs,r=this.inParagraph,o=this.getMediaAttrs(r?"imageInline":"image",i,{ignoreAttributes:r?new Set(["alt","zoomDisabled","title"]):void 0});let n="";r&&(n=`==${null!==(t=i.alt)&&void 0!==t?t:""}==`),n+=o?`|${o}|`:"",this.write(n)}writeCodeBlock(e){if(null==e.attrs||!e.attrs.language)return;const t=`|code:${e.attrs.language}\n`;this.write(t)}writeLatex(e){if(null==e.attrs||!e.attrs.formula)return;const t=e.attrs,i=`==${this.breakscape(t.formula,{textFormat:this.textFormat,textLocation:this.textLocation})}==|latex|`;this.write(i)}writeMarkTextWrapper(e){e&&this.write(e)}writeInlineMark(e){let t=`${e.type}`;if(e.attrs)for(const[i,r]of Object.entries(e.attrs))("language"===i&&"plain text"!==r||"color"===i||"name"===i||"duration"===i)&&(t=`${t}:${r}`);this.write(t)}writeCommentMark(e){const t=`#${e.comment||""}`;this.write(t)}writeLinkMark(e){var t;const i=(null===(t=e.attrs)||void 0===t?void 0:t.href)||"",r=`link:${(null!=i?i:"").replace(C,"^]")}`;this.write(r)}writeRefMark(e){var t,i;const r=`►${null!==(i=null===(t=e.attrs)||void 0===t?void 0:t.reference)&&void 0!==i?i:""}`;this.write(r)}writeXRefMark(e){var t,i,r,o;const n=null!==(i=null===(t=e.attrs)||void 0===t?void 0:t.xref)&&void 0!==i?i:"",a=null!==(o=null===(r=e.attrs)||void 0===r?void 0:r.reference)&&void 0!==o?o:"";let s=`xref:${n}`;a&&(s+=`|►${a}`),this.write(s)}writeExtRefMark(e){var t,i,r,o,n,a;const s=null!==(i=null===(t=e.attrs)||void 0===t?void 0:t.extref)&&void 0!==i?i:"",l=null!==(o=null===(r=e.attrs)||void 0===r?void 0:r.references)&&void 0!==o?o:[],p=null!==(a=null===(n=e.attrs)||void 0===n?void 0:n.provider)&&void 0!==a?a:"";let c=`extref:${s}`;for(const e of l)c+=`|►${null!=e?e:""}`;c+=`|provider:${p}`,this.write(c)}writeFootnoteMark(e){this.write("footnote:")}writeFootnoteStarMark(e){this.write("footnote*:")}writeSymbolMark(e){if(null==e.attrs)return;const t=e.attrs,i=this.getMediaAttrs("symbol",t),r=null!=i?i:"";this.write(r)}writeInlineMarkStartEnd(){this.write("|")}writePlainTextDivider(){this.write("==== text ====")}writeString(e){null!=e&&this.write(`${e}`)}writeNL(){this.options.debugGenerationInline?this.write("\\n"):this.write("\n")}writeInlineDebug(e,t){let i=e;t.open?i=`<${e}>`:t.close?i=`</${e}>`:t.single&&(i=`<${e} />`),this.writeString(i)}getMediaAttrs(e,t,i){var r,o;if(!e)return;const n=null!==(r=Object.assign({},i).ignoreAttributes)&&void 0!==r?r:new Set;let a=`${e}:${null!==(o=null==t?void 0:t.src)&&void 0!==o?o:""}`;const s=Object.entries(t).filter((([e,t])=>"src"!==e));for(let e=0;e<s.length;e++){const[t,i]=s[e];if(!n.has(t))switch(t){case"textAlign":"left"!==i&&(a+=`|captionAlign:${i}`);break;case"alignment":"center"!==i&&i&&(a+=`|alignment:${i}`);break;case"title":i&&(a+=`|caption:${i}`);break;case"class":"center"!==i&&i&&(a+=`|align:${i}`);break;case"comment":i&&(a+=`|#${i}`);break;case"":y.StringUtils.isString(i)?a+=`|:${i}`:a+="|";break;default:t&&i&&(a+=`|${t}:${i}`)}}return a}breakscape(e,t){return this.generateOptions.noBreakscaping?e:n.Breakscape.breakscape(e,t)}getBitType(e){for(const t of e)if(t.key===a.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.bitType}}write(e){return e=this.getInterTextBreakscape(e)+e,this.options.writeCallback&&this.options.writeCallback(e),this.writerText+=e,this}writeLine(e){return this.write(`${e}\n`),this}writeLines(e,t){for(const i of e)this.write(`${i}${null!=t?t:""}\n`);return this}writeWhiteSpace(){return this.write(" "),this}}t.TextGenerator=K},486:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InfoType=void 0;const r=(0,i(4718).superenum)({list:"list",deprecated:"deprecated",all:"all",bit:"bit"});t.InfoType=r},554:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.clozeTagContentProcessor=function(e,t,i,l,p){const{textFormat:c}=e,{value:u}=l,y=p.solutions,g=p.__solutionsAst;if(!y||!g)return;if(a.StringUtils.isString(u)){const e=a.StringUtils.trimmedString(u);y.push(r.Breakscape.unbreakscape(e,{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag}));const t=s.toAst(e,{textFormat:c,textLocation:n.TextLocation.tag});g.push(t)}};const r=i(7735),o=i(385),n=i(6877),a=i(9681),s=new(i(777).TextParser)},777:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextParser=void 0;const r=i(6877),o=i(9554),n=i(9681),a=i(2220);t.TextParser=class{version(){return(0,a.parse)("",{startRule:"version"})}preprocessAst(e){if(n.StringUtils.isString(e)){const t=e;try{e=JSON.parse(t)}catch(e){return}}if(this.isAst(e))return e}isAst(e){if(Array.isArray(e)){if(0===e.length)return!0;if(Object.prototype.hasOwnProperty.call(e[0],"type"))return!0}return!1}toAst(e,t){var i;if(Array.isArray(e))return e;let o=null!==(i=e)&&void 0!==i?i:"";if(!o)return[];let n="bitmarkPlusPlus";return Object.assign({},t).textLocation===r.TextLocation.tag&&(n="bitmarkPlus"),o=o.trim(),(0,a.parse)(o,{startRule:n})}extractBodyBits(e){if(!Array.isArray(e))return[];const t=[],i=e;for(const e of i)switch(e.type){case o.TextNodeType.gap:case o.TextNodeType.select:case o.TextNodeType.highlight:case o.TextNodeType.mark:t.push(e);break;default:{const i=this.extractBodyBits(e.content);for(const e of i)t.push(e)}}return t}walkBodyBits(e,t){if(!Array.isArray(e))return;const i=e;for(let e=0;e<i.length;e++){const r=i[e];switch(r.type){case o.TextNodeType.gap:case o.TextNodeType.select:case o.TextNodeType.highlight:case o.TextNodeType.mark:t(i,e,r);break;default:this.walkBodyBits(r.content,t)}}}}},955:function(e,t,i){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUtils=void 0;const o=r(i(7678));const n=new class{isFunction(e){return"[object Function]"===Object.prototype.toString.call(e)}isArray(e){return Array.isArray(e)}isDate(e){return"[object Date]"===Object.prototype.toString.call(e)}isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}isValue(e){return!this.isObject(e)&&!this.isArray(e)}getViaPath(e,t){if(!e)return;if(!t)return;Array.isArray(t)||(t=[t]),t=t.flatMap((e=>e.split(".")));let i=e;for(const e of t){if(null==i)return;i=i[e]}return i}setViaPath(e,t,i,r){if(!e)return!1;if(!t)return!1;Array.isArray(t)||(t=[t]),t=t.flatMap((e=>e.split(".")));let o=e;for(let e=0;e<t.length-1;e++){const i=t[e];if(null==o[i]){if(!r)return!1;o[i]={}}o=o[i]}return o[t[t.length-1]]=i,!0}flatMapPath(e,t){if(!e)return[];if(!t)return[];Array.isArray(t)||(t=[t]);const i=e,r=t.shift();if(null==r)return i;const o=i[r];return o?Array.isArray(o)?o.flatMap((e=>this.flatMapPath(e,t.slice()))):[this.flatMapPath(o,t)].flat():[]}orderProperties(e,t){const i=e,r=Object.assign({},i);for(const e of Object.keys(i))delete i[e];for(const e of t)Object.prototype.hasOwnProperty.call(r,e)&&(i[e]=r[e])}removeUndefinedProperties(e,t){const i=e;for(const[e,r]of Object.entries(i))t&&t.indexOf(e)>=0||null==r&&delete i[e]}removeFalseProperties(e,t){const i=e;for(const[e,r]of Object.entries(i))t&&t.indexOf(e)>=0||!1===r&&delete i[e]}removeEmptyStringProperties(e,t){const i=e;for(const[e,r]of Object.entries(i))t&&t.indexOf(e)>=0||""===r&&delete i[e]}removeEmptyArrayProperties(e,t){const i=e;for(const[e,r]of Object.entries(i))t&&t.indexOf(e)>=0||Array.isArray(r)&&0===r.length&&delete i[e]}removeEmptyObjectProperties(e,t){const i=e;for(const[e,r]of Object.entries(i))t&&t.indexOf(e)>=0||this.isObject(r)&&0===Object.keys(r).length&&delete i[e]}removeUnwantedProperties(e,t){(t=Object.assign({},t)).ignoreAllUndefined||this.removeUndefinedProperties(e,t.ignoreUndefined),t.ignoreAllFalse||this.removeFalseProperties(e,t.ignoreFalse),t.ignoreAllEmptyString||this.removeEmptyStringProperties(e,t.ignoreEmptyString),t.ignoreAllEmptyArrays||this.removeEmptyArrayProperties(e,t.ignoreEmptyArrays),t.ignoreAllEmptyObjects||this.removeEmptyObjectProperties(e,t.ignoreEmptyObjects)}extractSingleValue(e,t){if(!e)return;const i=e;if(null==i[t])return;let r=i[t];if(Array.isArray(r)){if(0===r.length)return;r=r[r.length-1]}return r}deepMerge(...e){return function e(...t){function i(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function r(t,r){for(const[n,a]of Object.entries(r)){const r=i(a);void 0!==t[n]&&i(t[n])===r&&["array","object"].includes(r)?t[n]=e(t[n],a):t[n]=(0,o.default)(a)}}let n=(0,o.default)(t.shift());for(const e of t){const t=i(e);i(n)===t?"array"===t?n=[...n,...(0,o.default)(e)]:"object"===t?r(n,e):n=e:n=(0,o.default)(e)}return n}(...e)}};t.ObjectUtils=n},1083:function(e,t,i){var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.buildCards=function(e,t,i,d,T,f,m,h){var b;const{bitConfig:B}=e;e.DEBUG_CARD_SET&&e.debugPrint("card set",d);let v={};const C=function(e,t){var i;const r={cards:[],internalComments:[]};if(!t)return r;const{bitType:o}=e;let a=0,s=0,l=0;for(const p of t.cards){const t={no:a++,sides:[]};r.cards.push(t);for(const a of p.sides){const p={no:s++,variants:[]};t.sides.push(p);for(const c of a.variants){const{parser:a,content:g}=c,d={parser:a,no:l++};p.variants.push(d);const T=n.Config.getTagsConfigForCardSet(o,s,l),f=e.bitContentProcessor(y.BitContentLevel.Card,T,g);e.DEBUG_CARD_TAGS&&e.debugPrint("card tags",f),f.cardBody=u.BitmarkPegParserValidator.checkCardBody(e,y.BitContentLevel.Card,o,f.cardBody,t.no,p.no,d.no),f.cardBodyStr=null===(i=f.cardBody)||void 0===i?void 0:i.bodyString,d.data=f,f.internalComments&&r.internalComments.push(...f.internalComments)}l=0}s=0}return r}(e,d);switch(null===(b=B.cardSet)||void 0===b?void 0:b.configKey){case a.CardSetConfigKey._flashcard:case a.CardSetConfigKey._definitionList:v=function(e,t,i){var o;const a=[],l=[];let p,c,u,y="",d=[],T=0,f={};const m=t===s.BitType.flashcard1,h=g(i);for(let g=0;g<i.cards.length;g++){const b=i.cards[g];if(!h||0!==g){p=void 0,c=void 0,d=[],T=0,f={};for(const e of b.sides)for(const t of e.variants){const e=t.data,{cardBody:i,resources:n}=e,a=r(e,["cardBody","resources"]);f=Object.assign(Object.assign({},f),a);const s=n&&n.length>0?n[0]:void 0,l=null==i?void 0:i.body,g=null!==(o=null==i?void 0:i.bodyString)&&void 0!==o?o:"";0===T?(u=t,y=g,p={text:l,icon:s}):1===T?c={text:l,icon:s}:d.push({text:l,icon:s}),T++}if(0!==g&&m){e.addWarning(`Bit '${t}' should only contain one card. Ignore subsequent card: '${y}'`,u);break}if(n.Config.isOfBitType(t,[s.BitType.flashcard])){const e=Object.assign({question:p,answer:c,alternativeAnswers:d},f);e&&a.push(e)}else{const e=Object.assign({term:p,definition:c,alternativeDefinitions:d},f);e&&l.push(e)}}}return{heading:null==h?void 0:h.heading,flashcards:a.length>0?a:void 0,definitions:l.length>0?l:void 0}}(e,t,C);break;case a.CardSetConfigKey._elements:v=function(e,t,i){var r;const o=[];for(const e of i.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data;o.push(null!==(r=t.cardBodyStr)&&void 0!==r?r:"")}return{elements:o.length>0?o:void 0}}(0,0,C);break;case a.CardSetConfigKey._statements:v=function(e,t,i,o,n){var a;const s=[];for(const e of i.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{statements:i,statement:o}=t,n=r(t,["statements","statement"]);if(Array.isArray(i))for(const e of i){const t=Object.assign({statement:null!==(a=e.statement)&&void 0!==a?a:"",isCorrect:e.isCorrect,item:e.item,lead:e.lead,hint:e.hint,instruction:e.instruction,example:e.example},n);t&&s.push(t)}}o&&s.push(o);Array.isArray(n)&&n.length>0&&s.push(...n);return{statements:s.length>0?s:void 0}}(0,0,C,T,f);break;case a.CardSetConfigKey._feedback:v=function(e,t,i){let o;const n=[],a=g(i);for(let e=0;e<i.cards.length;e++){const t=i.cards[e];if(!a||0!==e){o=void 0;for(let e=0;e<t.sides.length;e++){const i=t.sides[e];for(const t of i.variants){const i=t.data,{cardBody:a,cardBodyStr:s,choices:l}=i,p=r(i,["cardBody","cardBodyStr","choices"]);if(0===e){const e=[];if(l&&l.length>0)for(const t of l){const{__isDefaultExample:i,example:o}=t,n=r(t,["__isDefaultExample","example"]),a={choice:n.choice,requireReason:n.isCorrect,__isDefaultExample:i,example:o};e.push(a)}o=Object.assign(Object.assign({},i),{choices:e}),o&&n.push(o)}else if(1===e){const e=Object.assign({text:null!=s?s:"",__textAst:null==a?void 0:a.body},p);o&&(o.reason=e)}}}}}return{heading:null==a?void 0:a.heading,feedbacks:n.length>0?n:void 0}}(0,0,C);break;case a.CardSetConfigKey._quiz:v=function(e,t,i,o,a){const l=[],p=n.Config.isOfBitType(t,s.BitType.multipleChoice),c=n.Config.isOfBitType(t,s.BitType.multipleResponse);if(!p&&!c)return{};let u,y=!1;for(const e of i.cards){y=!1,u=void 0;for(const t of e.sides)for(const e of t.variants){const t=e.data,{__isDefaultExample:i,example:o}=t,n=r(t,["__isDefaultExample","example"]);if(y=!0===i||y,u=o||u,n.trueFalse&&n.trueFalse.length>0){const e=[];for(const t of n.trueFalse){const{__isDefaultExample:i,example:o}=t,n=r(t,["__isDefaultExample","example"]),a=i||y,s=o||u,l={isCorrect:n.isCorrect,__isDefaultExample:a,example:s};c?l.response=n.text:l.choice=n.text,l&&e.push(l)}c?n.responses=e:n.choices=e}const a=Object.assign(Object.assign({},n),{choices:n.choices,responses:n.responses,__isDefaultExample:y,__defaultExample:u});a&&l.push(a)}}if(p&&Array.isArray(o)&&o.length>0){const e={choices:o};e&&l.push(e)}if(c&&Array.isArray(a)&&a.length>0){const e={responses:a};e&&l.push(e)}return{quizzes:l.length>0?l:void 0}}(0,t,C,m,h);break;case a.CardSetConfigKey._questions:v=function(e,t,i){var r;const o=[];for(const e of i.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,i=Object.assign({question:null!==(r=t.cardBodyStr)&&void 0!==r?r:""},t);i&&o.push(i)}return{questions:o.length>0?o:void 0}}(0,0,C);break;case a.CardSetConfigKey._matchPairs:v=function(e,t,i){var o;const a=[];let l,c,u,y,d=[],T=[],f={},m=!1;const h=n.Config.isOfBitType(t,s.BitType.matchMatrix),b=g(i,h),B=null!==(o=null==b?void 0:b.isDefaultExampleCardSet)&&void 0!==o&&o;let v=null==b?void 0:b.exampleCardSet;for(let e=0;e<i.cards.length;e++){const t=i.cards[e];if(b&&0===e)continue;l=void 0,d=[],T=[],c=void 0,u=void 0,f={},m=!1,y=void 0;for(let e=0;e<t.sides.length;e++){const i=t.sides[e];for(const t of i.variants){const i=t.data,{cardBody:o,cardBodyStr:n,resources:a,__isDefaultExample:s,example:g}=i,h=r(i,["cardBody","cardBodyStr","resources","__isDefaultExample","example"]);if(m=!0===s||m,y=g||y,0===e)if(Array.isArray(a)&&a.length>0){const e=a[0];e.type===p.ResourceTag.audio?c=e:e.type===p.ResourceTag.image&&(u=e)}else l=n;else{const e=null!=n?n:"",t=null==o?void 0:o.body;d.push(e),T.push(t),!B&&!m||y||(y=t),delete h.item,delete h.lead}f=Object.assign(Object.assign({},f),h)}}m&&(v=void 0);const o=m||B,n=y||v,s=Object.assign(Object.assign({key:null!=l?l:"",keyAudio:c,keyImage:u,values:d,__valuesAst:T},f),{__isDefaultExample:o,example:n});s&&a.push(s)}return{heading:null==b?void 0:b.heading,pairs:a.length>0?a:void 0}}(0,t,C);break;case a.CardSetConfigKey._matchMatrix:v=function(e,t,i){var n;let a,s;const l=[];let p,c,u,y,d=[],T=[],f=[],m={},h=!1,b=!1;const B=g(i,!0),v=null!==(n=null==B?void 0:B.isDefaultExampleCardSet)&&void 0!==n&&n;let C=null==B?void 0:B.exampleCardSet;for(let e=0;e<i.cards.length;e++){const t=i.cards[e];if(B&&0===e)continue;a=void 0,s=void 0,d=[],T=[],f=[],h=!1,p=void 0,u=void 0;for(let e=0;e<t.sides.length;e++){const i=t.sides[e];T=[],f=[],m={},b=!1,c=void 0,y=void 0;for(const t of i.variants){const i=t.data,{cardBody:n,cardBodyStr:l,__isDefaultExample:g,example:d,isCaseSensitive:B}=i,C=r(i,["cardBody","cardBodyStr","__isDefaultExample","example","isCaseSensitive"]);if(b=!0===g||b,c=d||c,Object.assign(m,C),0===e)a=l,s=C,h=!0===g||h,p=d||p,u=null!=B?B:u;else{const e=null!=l?l:o.Breakscape.EMPTY_STRING,t=null==n?void 0:n.body;T.push(e),f.push(t),!v&&!b||c||(c=t),y=null!=B?B:u}}if(e>0){b&&(p=C=void 0),h&&(C=void 0);const e=b||h||v,t=c||p||C,i=Object.assign(Object.assign({values:T,__valuesAst:f},m),{__isDefaultExample:e,example:t,isCaseSensitive:y});i&&d.push(i)}}const n=Object.assign({key:null!=a?a:o.Breakscape.EMPTY_STRING,cells:d},s);n&&l.push(n)}return{heading:null==B?void 0:B.heading,matrix:l.length>0?l:void 0}}(0,0,C);break;case a.CardSetConfigKey._pronunciationTable:v=function(e,t,i){var r;const o=[];let n=[];for(const e of i.cards){n=[];for(const t of e.sides)for(const e of t.variants){const t=e.data,{title:i,cardBody:o,resources:a}=t,s=i&&i[1].titleAst,l=a&&a.length>0?a.find((e=>e.type===p.ResourceTag.audio)):void 0,c={title:null!=s?s:[],body:null!==(r=null==o?void 0:o.body)&&void 0!==r?r:[],audio:l};n.push(c)}o.push(n)}return{pronunciationTable:{data:o}}}(0,0,C);break;case a.CardSetConfigKey._table:v=function(e,t,i){var r;let o=!1;const n=[],a=[];let s=[];for(let e=0;e<i.cards.length;e++){const t=i.cards[e];o=!1,s=[];for(const i of t.sides)for(const t of i.variants){const i=t.data,{title:a,cardBody:l}=i,p=a&&a[1].titleAst;if(0===e&&null!=p&&(o=!0),o)n.push(null!=p?p:[]);else{const e=null!==(r=null==l?void 0:l.body)&&void 0!==r?r:[];s.push(e)}}o||a.push(s)}return{table:{columns:n,data:a}}}(0,0,C);break;case a.CardSetConfigKey._botActionResponses:v=function(e,t,i){const n=[];for(const e of i.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{__instructionString:i,reaction:a,cardBodyStr:s}=t,l=r(t,["__instructionString","reaction","cardBodyStr"]),p=Object.assign({response:null!=i?i:o.Breakscape.EMPTY_STRING,reaction:null!=a?a:o.Breakscape.EMPTY_STRING,feedback:null!=s?s:o.Breakscape.EMPTY_STRING},l);p&&n.push(p)}return{botResponses:n.length>0?n:void 0}}(0,0,C);break;case a.CardSetConfigKey._ingredients:v=function(e,t,i){const n=[];for(const e of i.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{title:i,__instructionString:a,unit:s,unitAbbr:p,decimalPlaces:u,disableCalculation:y,cardBodyStr:g,cardBody:d}=t,T=r(t,["title","__instructionString","unit","unitAbbr","decimalPlaces","disableCalculation","cardBodyStr","cardBody"]),f=Array.isArray(i)&&i.length>0?i[i.length-1].titleString:void 0;let m=!1,h=c.NumberUtils.asNumber(a);if(d&&d.bodyBits){const e=d.bodyBits.find((e=>e.type===l.BodyBitType.select));e&&(h=e.__instructionString?c.NumberUtils.asNumber(e.__instructionString):h,e.options&&e.options.length>0&&(m=e.options[0].isCorrect))}const b=Object.assign({title:f,checked:m,item:g,quantity:h,unit:null!=s?s:o.Breakscape.EMPTY_STRING,unitAbbr:null!=p?p:o.Breakscape.EMPTY_STRING,decimalPlaces:null!=u?u:1,disableCalculation:y},T);b&&n.push(b)}return{ingredients:n.length>0?n:void 0}}(0,0,C);break;case a.CardSetConfigKey._clozeList:case a.CardSetConfigKey._exampleBitList:case a.CardSetConfigKey._bookReferenceList:v=function(e,t,i,o){const n=[];for(const e of o.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{cardBody:i}=t,o=r(t,["cardBody"]),a=Object.assign({body:i},o);a&&n.push(a)}return{cardBits:n.length>0?n:void 0}}(0,0,0,C)}return v.internalComments=C.internalComments.length>0?C.internalComments:void 0,v};const o=i(7735),n=i(2028),a=i(8199),s=i(5854),l=i(4410),p=i(6149),c=i(8025),u=i(4266),y=i(3029);function g(e,t=!1){let i,r,o=!1;const n=[];let a,s=!1;if(0===e.cards.length)return;const l=e.cards[0];for(let e=0;e<l.sides.length;e++){const t=l.sides[e];if(0===t.variants.length)continue;const i=t.variants[0].data,{title:p,__isDefaultExample:c,example:u}=i,y=p&&p[1].titleString;null!=y&&(o=!0),0===e?o&&(r=y,s=!0===c||s,a=u||a):o&&(n.push(null!=y?y:""),s=!0===c||s,a=u||a)}if(o){let e=n;e=t?n:n.length>=1?n[n.length-1]:"",i={forKeys:null!=r?r:"",forValues:e}}return i?{heading:i,isDefaultExampleCardSet:s,exampleCardSet:a}:void 0}},1163:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardSetVersion=void 0;const r=(0,i(4718).superenum)({v1:1,v2:2});t.CardSetVersion=r},1412:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(){if(n)return;(0,o.initEnv)(r.buildInfo.name,r.buildInfo.version),n=!0};const r=i(1464),o=i(6936);i(2028);let n=!1},1457:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourcesConfig=void 0;t.ResourcesConfig=class{constructor(e,t,i,r){this.tags=e,this.resourceAttachmentAllowed=null!=t&&t,this.resourceTypeAttachment=i,this.comboResourceTagTypesMap=r}getCountsMin(){const e=new Map;for(const t of Object.values(this.tags))null!=t.minCount&&e.set(t.tag,t.minCount);return e}getCountsMax(){const e=new Map;for(const t of Object.values(this.tags))null!=t.maxCount&&e.set(t.tag,t.maxCount);return e}}},1464:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.buildInfo=void 0,t.buildInfo={name:"@gmb/bitmark-parser-generator",version:"3.29.0",author:"Get More Brain Ltd",license:"ISC",description:"A bitmark parser and generator using Peggy.js"}},1519:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyTagConfig=void 0;const r=i(5512),o=i(6634);class n extends o.AbstractTagConfig{constructor(e,t,i,o,n,a,s,l,p,c,u){super(r.BitTagType.property,e,t,i,o,n,a,s,u),this.type=r.BitTagType.property,this.single=l,this.format=p,this.defaultValue=c}toString(e){const t=Object.assign({},e);let i=`PTY[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(i+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(i+=`, max=${this.maxCount}`),null!=this.minCount&&(i+=`, min=${this.minCount}`),null!=this.single&&(i+=`, sgl=${this.single}`),null!=this.format&&(i+=`, fmt=${this.format}`),null!=this.defaultValue&&(i+=`, def=${this.defaultValue}`),null!=this.jsonKey&&(i+=`, json=${this.jsonKey}`),null!=this.astKey&&(i+=`, ast=${this.astKey}`)),i+="]",this.chain&&t.includeChains){i+="\n|__";let e=!0;for(const r of Object.values(this.chain))e||(i+=" "),i+=`${r.toString(t)}`,e=!1}return i}}t.PropertyTagConfig=n},1731:(e,t)=>{t.VOID=-1;t.PRIMITIVE=0;t.ARRAY=1;t.OBJECT=2;t.DATE=3;t.REGEXP=4;t.MAP=5;t.SET=6;t.ERROR=7;t.BIGINT=8},1791:function(e,t,i){var r,o=this&&this.__createBinding||(Object.create?function(e,t,i,r){void 0===r&&(r=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,r,o)}:function(e,t,i,r){void 0===r&&(r=i),e[r]=t[i]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=(this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},r(e)}),this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(o,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function s(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))});this&&this.__importDefault;Object.defineProperty(t,"__esModule",{value:!0}),t.Output=t.Input=t.BitmarkParserGenerator=void 0;const s=i(4718),l=i(5126),p=i(3968),c=i(7984),u=i(8588),y=i(5633),g=i(5663),d=i(6936),T=i(3881),f=i(486),m=i(3069),h=i(2028),b=i(431),B=i(777),v=(0,s.superenum)({string:"string",file:"file"});t.Input=v;const C=(0,s.superenum)({bitmark:"bitmark",json:"json",ast:"ast"});t.Output=C;t.BitmarkParserGenerator=class{constructor(){this.ast=new l.Ast,this.jsonParser=new g.JsonParser,this.bitmarkParser=new y.BitmarkParser,this.textParser=new B.TextParser,this.textGenerator=new b.TextGenerator,this.jsonStringifyPrettify=(e,t,i)=>{const r=!0===t.prettify?2:t.prettify||void 0;return i||!0===t.stringify||void 0!==r?JSON.stringify(e,null,r):e}}version(){return d.env.appVersion.full}info(e){const t=Object.assign({},e),i=new T.InfoBuilder;let r;const o=!t.outputFormat||t.outputFormat===m.InfoFormat.text,n=t.outputFormat===m.InfoFormat.json,a=t.type===f.InfoType.all,s=t.type===f.InfoType.deprecated,l=a||!s,p=a||s;if(t.type===f.InfoType.bit){const e=i.getSupportedBitConfigs().filter((e=>{if(!t.bit)return!0;return h.Config.getBitType(t.bit)===e.bitType}));r=o?e.map((e=>e.toString({includeChains:!0,includeConfigs:!0}))).join("\n\n--------------\n\n"):e}else{const e=i.getSupportedBits({includeNonDeprecated:l,includeDeprecated:p}).filter((e=>{if(!t.bit)return!0;const i=h.Config.getBitType(t.bit);return e.name===i||void 0}));r=o?this.supportedBitsAsString(e):e}if(n){const e=!0===t.prettify?2:t.prettify||void 0;r=JSON.stringify(r,null,e)}return r}convert(e,t){return a(this,void 0,void 0,(function*(){let i;const r=Object.assign({},t),o=Object.assign({},r.jsonOptions),n=r.outputFormat,s=n===C.bitmark,l=n===C.json,y=n===C.ast,g=u.BitmarkParserType.peggy;let T=e;if(d.env.isBrowser&&r.outputFile)throw new Error("Cannot write to file in browser environment");r.inputFormat&&r.inputFormat!==v.file||d.env.isNode&&fs.existsSync(T)&&(T=fs.readFileSync(T,{encoding:"utf8"}));let f=this.ast.preprocessAst(T);const m=!!f;m||(f=this.jsonParser.toAst(T));const h=!!(null==f?void 0:f.bits),b=e=>a(this,void 0,void 0,(function*(){yield B(e),yield P(i)})),B=e=>a(this,void 0,void 0,(function*(){i=this.bitmarkParser.toAst(e,{parserType:g})})),x=e=>a(this,void 0,void 0,(function*(){if(g===u.BitmarkParserType.peggy)if(f=this.bitmarkParser.toAst(e,{parserType:g}),r.outputFile){const e=new JsonFileGenerator_1.JsonFileGenerator(r.outputFile,r);yield e.generate(f)}else{const e=new c.JsonObjectGenerator(r),t=yield e.generate(f);i=this.jsonStringifyPrettify(t,o)}})),P=e=>a(this,void 0,void 0,(function*(){if(r.outputFile){const t=new BitmarkFileGenerator_1.BitmarkFileGenerator(r.outputFile,r);yield t.generate(e)}else{const t=new p.BitmarkStringGenerator(r);i=yield t.generate(e)}})),k=e=>a(this,void 0,void 0,(function*(){i=this.jsonStringifyPrettify(e,o)})),K=e=>a(this,void 0,void 0,(function*(){if(r.outputFile){const t=new JsonFileGenerator_1.JsonFileGenerator(r.outputFile,r);yield t.generate(e)}else{const t=new c.JsonObjectGenerator(r),n=yield t.generate(e);i=this.jsonStringifyPrettify(n,o)}})),w=e=>a(this,void 0,void 0,(function*(){if(r.outputFile){const t=new BitmarkFileGenerator_1.BitmarkFileGenerator(r.outputFile,r);yield t.generate(e)}else{const t=new p.BitmarkStringGenerator(r);i=yield t.generate(e)}})),_=e=>a(this,void 0,void 0,(function*(){i=this.jsonStringifyPrettify(e,o)})),A=e=>a(this,void 0,void 0,(function*(){yield K(e)}));return!h&&!m?s?yield b(T):y?yield B(T):yield x(T):m?y?yield k(f):l?yield K(f):yield P(f):l?yield A(f):y?yield _(f):yield w(f),i}))}upgrade(e,t){return a(this,void 0,void 0,(function*(){let i;const r=Object.assign({},t),o=Object.assign({},r.jsonOptions),n=r.bitmarkParserType;let s=e;if(d.env.isBrowser&&r.outputFile)throw new Error("Cannot write to file in browser environment");r.inputFormat&&r.inputFormat!==v.file||d.env.isNode&&fs.existsSync(s)&&(s=fs.readFileSync(s,{encoding:"utf8"}));let l=this.jsonParser.toAst(s);const u=e=>a(this,void 0,void 0,(function*(){const t=this.bitmarkParser.toAst(e,{parserType:n});if(r.outputFile){const e=new BitmarkFileGenerator_1.BitmarkFileGenerator(r.outputFile,r);yield e.generate(t)}else{const e=new p.BitmarkStringGenerator(r);i=yield e.generate(t)}})),y=e=>a(this,void 0,void 0,(function*(){if(r.outputFile){const t=new JsonFileGenerator_1.JsonFileGenerator(r.outputFile,r);yield t.generate(e)}else{const t=new c.JsonObjectGenerator(r),n=yield t.generate(e);i=this.jsonStringifyPrettify(n,o)}}));return!!!(null==l?void 0:l.bits)?yield u(s):yield y(l),i}))}createAst(e,t){let i,r=e;const o=Object.assign({},t);o.inputFormat&&o.inputFormat!==v.file||d.env.isNode&&fs.existsSync(r)&&(r=fs.readFileSync(r,{encoding:"utf8"}));let n=this.ast.preprocessAst(r);const a=!!n;a||(n=this.jsonParser.toAst(r));return i=!!!(null==n?void 0:n.bits)&&!a?this.bitmarkParser.toAst(r):n,i}convertText(e,t){return a(this,void 0,void 0,(function*(){var i,r;let o,n;const a=Object.assign({},t),s=Object.assign({},a.fileOptions),l=Object.assign({},a.jsonOptions),p=null!==(i=TextFormat_1.TextFormat.fromValue(a.textFormat))&&void 0!==i?i:TextFormat_1.TextFormat.bitmarkText,c=null!==(r=a.textLocation)&&void 0!==r?r:TextLocation_1.TextLocation.body;let u=e;if(d.env.isBrowser&&a.outputFile)throw new Error("Cannot write to file in browser environment");a.inputFormat&&a.inputFormat!==v.file||d.env.isNode&&fs.existsSync(u)&&(u=fs.readFileSync(u,{encoding:"utf8"}));const y=this.textParser.preprocessAst(u),g=!!y;if(n=g?yield this.textGenerator.generate(y,p,c):this.textParser.toAst(u,{textFormat:p,textLocation:TextLocation_1.TextLocation.body}),a.outputFile){const e=a.outputFile.toString();let t=n;g||(t=this.jsonStringifyPrettify(n,l,!0));const i=s.append?"a":"w";fs.ensureDirSync(path_1.default.dirname(e)),fs.writeFileSync(e,t,{flag:i})}else o=g?n:this.jsonStringifyPrettify(n,l);return o}))}breakscapeText(e,t){var i,r;if(!e)return e;const o=Object.assign({},t),n=Object.assign({},o.fileOptions),a=null!==(i=TextFormat_1.TextFormat.fromValue(o.textFormat))&&void 0!==i?i:TextFormat_1.TextFormat.bitmarkText,s=null!==(r=o.textLocation)&&void 0!==r?r:TextLocation_1.TextLocation.body;let l=e;if(d.env.isBrowser&&o.outputFile)throw new Error("Cannot write to file in browser environment");o.inputFormat&&o.inputFormat!==v.file||d.env.isNode&&fs.existsSync(l)&&(l=fs.readFileSync(l,{encoding:"utf8"}));const p=Breakscape_1.Breakscape.breakscape(l,{textFormat:a,textLocation:s});if(!o.outputFile)return p;{const e=o.outputFile.toString(),t=n.append?"a":"w";fs.ensureDirSync(path_1.default.dirname(e)),fs.writeFileSync(e,p,{flag:t})}}unbreakscapeText(e,t){var i,r;if(!e)return e;const o=Object.assign({},t),n=Object.assign({},o.fileOptions),a=null!==(i=TextFormat_1.TextFormat.fromValue(o.textFormat))&&void 0!==i?i:TextFormat_1.TextFormat.bitmarkText,s=null!==(r=o.textLocation)&&void 0!==r?r:TextLocation_1.TextLocation.body;let l=e;if(d.env.isBrowser&&o.outputFile)throw new Error("Cannot write to file in browser environment");o.inputFormat&&o.inputFormat!==v.file||d.env.isNode&&fs.existsSync(l)&&(l=fs.readFileSync(l,{encoding:"utf8"}));const p=Breakscape_1.Breakscape.unbreakscape(l,{textFormat:a,textLocation:s});if(!o.outputFile)return p;{const e=o.outputFile.toString(),t=n.append?"a":"w";fs.ensureDirSync(path_1.default.dirname(e)),fs.writeFileSync(e,p,{flag:t})}}supportedBitsAsString(e){let t="";for(const i of e)t+=`${i.name} (since: ${i.since}`,i.deprecated&&(t+=`, deprecated: ${i.deprecated}`),t+=")\n";return t}}},2028:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Config=void 0;const r=i(3619),o=i(9600),n=i(1457),a=i(6915),s=i(5512),l=i(5854),p=i(385),c=i(955),u=i(4445),y=i(6853),g=i(5837),d=i(9916);const T=new class{constructor(){this.bitLevelMin=1,this.bitLevelMax=7,this.bitCache=new Map,this.comboResourcesCache=new Map}getBitType(e){var t;return(null==e?void 0:e.startsWith("|"))&&(e=e.substring(1)),null!==(t=l.BitType.fromValue(e))&&void 0!==t?t:l.BitType._error}isOfBitType(e,t){if(!e)return!1;if(e===t)return!0;const i=this.getBitConfig(e);if(!i)return!1;if(Array.isArray(t)){for(const e of t)if(i.inheritedBitTypesSet.has(e))return!0;return!1}return i.inheritedBitTypesSet.has(t)}isBitTypeCommented(e){return!!(null==e?void 0:e.startsWith("|"))}getBitConfig(e){var t;let i=this.bitCache.get(e);if(!i){const o=()=>{throw new Error(`No config found for bit: ${e}`)},n=[],a=[];let s=e;for(;s;){const e=y.BITS[s];e||o(),n.push(s),a.push(e),s=e.baseBitType}a.reverse();const l=a.reduce(((e,t)=>e=c.ObjectUtils.deepMerge(e,t)),{}),{since:g,textFormatDefault:d,quizBit:T,tags:f,cardSet:m,deprecated:h,bodyAllowed:b,bodyRequired:B,footerAllowed:v,footerRequired:C,resourceAttachmentAllowed:x,rootExampleType:P}=l,k=this.getAllResourcesTagsWithZeroCounts(),K=u.ConfigHydrator.hydrateTagsConfig(null!=f?f:[]),w=u.ConfigHydrator.hydrateCardSetConfig(m),_=null===(t=K.info)||void 0===t?void 0:t.comboResourceType,A=Object.assign({},K.tags);for(const[e,t]of Object.entries(k))A[e]||(A[e]=t);i=new r.BitConfig({since:g,bitType:e,inheritedBitTypes:n,textFormatDefault:null!=d?d:p.TextFormat.bitmarkText,tags:A,cardSet:w,quizBit:T,deprecated:h,bodyAllowed:b,bodyRequired:B,footerAllowed:v,footerRequired:C,resourceAttachmentAllowed:x,rootExampleType:P,comboResourceType:_}),this.bitCache.set(e,i)}return i}getRawPropertiesConfig(){return d.PROPERTIES}getTagConfigForTag(e,t){if(e)for(const[,i]of Object.entries(e))if(i.tag===t)return i}getTagsConfigForCardSet(e,t,i){const r=this.getBitConfig(e);if(!r)return;const o=r.cardSet;if(!o)return;t=Math.min(t,o.variants.length-1);const n=o.variants[t];return n[i=Math.min(i,n.length-1)].tags}getBitResourcesConfig(e,t){var i;let r={};const a=new Map,l=this.getBitConfig(e),p={};for(const[e,t]of Object.entries(l.tags))t.type===s.BitTagType.resource&&(p[e]=t);const c=null!==(i=l.comboResourceType)&&void 0!==i?i:l.resourceAttachmentAllowed&&t;if(c){const e=new Map,i=this.getComboResource(c);if(i){const t=Object.values(i).filter((e=>e.type===s.BitTagType.resource));t.map((e=>e.tag)).forEach((i=>{const r=t.find((e=>e.tag===i));r&&e.set(i,r)}));const r=this.getComboResourceTagTypes(c);r&&r.length>0&&a.set(c,r)}if(t)for(const[t,i]of Object.entries(p)){const n=c===i.tag,a=!!e&&e.has(i.tag);if(n){const e=new o.ResourceTagConfig(i.configKey,i.tag,1,1,i.chain,i.jsonKey,i.deprecated);r[t]=e}else if(a){if(e){const o=e.get(i.tag);o&&(r[t]=o)}}else r[t]=i}else r=p}else r=p;return new n.ResourcesConfig(r,l.resourceAttachmentAllowed,t,a)}getComboResourceTagTypes(e){const t=this.getComboResource(e);if(t){return Object.values(t).filter((e=>e.type===s.BitTagType.resource)).map((e=>e.tag))}}getComboResource(e){if(!e)return;let t=this.comboResourcesCache.get(e);return t||(t={},Object.values(g.GROUPS).filter((t=>t.type===a.GroupConfigType.comboResource&&t.comboResourceType===e)).forEach((e=>{t=Object.assign(Object.assign({},t),u.ConfigHydrator.hydrateTagsConfig(e.tags).tags)})),0===Object.keys(t).length&&(t=void 0),this.comboResourcesCache.set(e,t)),t}getAllResourcesTagsWithZeroCounts(){let e=this.allResourcesCache;if(!e){e={},Object.values(g.GROUPS).filter((e=>e.type===a.GroupConfigType.resource)).forEach((t=>{e=Object.assign(Object.assign({},e),u.ConfigHydrator.hydrateTagsConfig(t.tags).tags)}));for(const t of Object.values(e)){const e=t;e.maxCount=0,e.minCount=0}this.allResourcesCache=e}return e}};t.Config=T},2220:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;const r=i(8321).parse;t.parse=r},2287:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_VERSION=void 0;t.EMPTY_VERSION={full:"",major:"",minor:"",patch:"",build:""}},2483:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextMarkType=void 0;const r=(0,i(4718).superenum)({bold:"bold",light:"light",italic:"italic",highlight:"highlight",strike:"strike",subscript:"subscript",superscript:"superscript",ins:"ins",del:"del",underline:"underline",doubleUnderline:"doubleUnderline",circle:"circle",languageEm:"languageEm",userUnderline:"userUnderline",userDoubleUnderline:"userDoubleUnderline",userStrike:"userStrike",userCircle:"userCircle",userHighlight:"userHighlight",notranslate:"notranslate",link:"link",ref:"ref",xref:"xref",extref:"extref",footnote:"footnote",footnoteStar:"footnote*",symbol:"symbol",var:"var",code:"code",timer:"timer",duration:"duration",color:"color",comment:"comment"});t.TextMarkType=r},2497:function(e,t,i){var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(o,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function s(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonGenerator=void 0;const a=n(i(7678)),s=i(5126),l=i(7735),p=i(2028),c=i(126),u=i(5854),y=i(3811),g=i(4410),d=i(363),T=i(6149),f=i(385),m=i(6877),h=i(9554),b=i(777),B=i(4078),v=i(8025),C=i(4),x=i(431),P={};class k extends C.AstWalkerGenerator{constructor(e,t){var i,r;super(),this.ast=new s.Ast,this.textParser=new b.TextParser,this.json=[],this.bitWrapperJson={},this.bitJson={},this.textDefault=l.Breakscape.EMPTY_STRING,this.bodyDefault=l.Breakscape.EMPTY_STRING,this.bodyJson=this.bodyDefault,this.placeholderIndex=0,this.enter=this.enter.bind(this),this.between=this.between.bind(this),this.exit=this.exit.bind(this),this.leaf=this.leaf.bind(this),this.bodyBitCallback=this.bodyBitCallback.bind(this),this.bitmarkVersion=null!==(i=y.BitmarkVersion.fromValue(null==t?void 0:t.bitmarkVersion))&&void 0!==i?i:y.DEFAULT_BITMARK_VERSION,this.textParserVersion=this.textParser.version(),this.options=Object.assign(Object.assign({},P),null==t?void 0:t.jsonOptions),this.debugGenerationInline=null!==(r=this.options.debugGenerationInline)&&void 0!==r&&r,this.jsonPrettifySpace=!0===this.options.prettify?2:this.options.prettify||void 0,this.bitmarkVersion===y.BitmarkVersion.v2?void 0===this.options.textAsPlainText&&(this.options.textAsPlainText=!0):void 0===this.options.textAsPlainText&&(this.options.textAsPlainText=!1),this.textGenerator=new x.TextGenerator(y.BitmarkVersion.v2,{bodyBitCallback:this.bodyBitCallback,debugGenerationInline:this.debugGenerationInline}),this.writer=e,this.generatePropertyHandlers()}generate(e){return r(this,void 0,void 0,(function*(){this.resetState(),yield this.writer.open(),this.walkAndWrite(e),this.write(JSON.stringify(this.json,null,this.jsonPrettifySpace)),yield this.writer.close()}))}generateSync(e){this.resetState(),this.writer.openSync(),this.walkAndWrite(e),this.writer.closeSync()}resetState(){this.json=[],this.bitWrapperJson={},this.bitJson={},this.textDefault=this.options.textAsPlainText?l.Breakscape.EMPTY_STRING:[],this.bodyDefault=this.options.textAsPlainText?l.Breakscape.EMPTY_STRING:[],this.bodyJson=this.bodyDefault,this.listItem=void 0,this.placeholderIndex=0,this.printed=!1}walkAndWrite(e){this.ast.walk(e,c.NodeType.bitmarkAst,this,void 0)}enter_bitmarkAst(e,t){this.json=[]}exit_bitmarkAst(e,t){this.options.textAsPlainText&&this.convertAllBitmarkTextsToStringsForPlainText(this.json),this.removeTemporaryProperties(this.json)}enter_bitsValue(e,t){var i,r;const o=e.value;this.bitWrapperJson={},this.json.push(this.bitWrapperJson),this.bitJson=this.createBitJson(o),this.bitWrapperJson.bit=this.bitJson;const n=p.Config.getBitConfig(o.bitType),a=this.getTextFormat(t),s=!!n.rootExampleType,l=n.rootExampleType===d.ExampleType.boolean;if(s){let e;l?(e=!0,p.Config.isOfBitType(o.bitType,u.BitType.trueFalse1)&&void 0!==(null===(r=null===(i=o.cardNode)||void 0===i?void 0:i.statement)||void 0===r?void 0:r.isCorrect)&&(e=o.cardNode.statement.isCorrect)):e="true";const t=this.toExample(o,{defaultExample:e,isBoolean:l,textFormat:a});this.bitJson.isExample=t.isExample,this.bitJson.example=t.example}else o.isExample&&(this.bitJson.isExample=!0);this.placeholderIndex=0}exit_bitsValue(e,t){const i=this.bitJson.isExample,r=this.bitJson.example;delete this.bitJson.isExample,delete this.bitJson.example,this.bitJson.isExample=i,this.bitJson.example=r,this.cleanBitJson(this.bitJson)}enter_imageSource(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_person(e,t){const i=this.getBitType(t);let r="person";return p.Config.isOfBitType(i,u.BitType.conversationLeft1)&&(r="partner"),this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1,keyOverride:r})}enter_ratingLevelStart(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_ratingLevelEnd(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_productId(e,t){const i=e.value,r=this.getParentNode(t);if((null==r?void 0:r.key)!==c.NodeType.bitsValue)return!0;return this.getBitType(t)===u.BitType.module?this.addProperty(this.bitJson,"productId",i,{array:!0}):i.length>0&&this.addProperty(this.bitJson,"productId",i[i.length-1],{array:!1}),!1}enter_markConfig(e,t){return!0}enter_markConfigValue(e,t){const i=e.value,r=this.getParentNode(t);return(null==r?void 0:r.key)!==c.NodeType.markConfig||(this.bitJson.marks||(this.bitJson.marks=[]),this.bitJson.marks.push(i),!1)}enter_item(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_lead(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_pageNumber(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_marginNumber(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_hint(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_instruction(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_title(e,t){return this.standardHandler(e,t,[c.NodeType.bitsValue,c.NodeType.cardNode],{array:!0})}enter_subtitle(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_caption(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_width(e,t){var i;let r=e.value;const o=this.getBitType(t),n=this.getParentNode(t);return(null==n?void 0:n.key)===c.NodeType.bitsValue&&p.Config.isOfBitType(o,u.BitType.extractorBlock)&&(r=null!==(i=v.NumberUtils.asNumber(r,0))&&void 0!==i?i:0),this.standardHandler(e,t,void 0,{array:!1,valueOverride:r})}enter_height(e,t){var i;let r=e.value;const o=this.getBitType(t),n=this.getParentNode(t);return(null==n?void 0:n.key)===c.NodeType.bitsValue&&p.Config.isOfBitType(o,u.BitType.extractorBlock)&&(r=null!==(i=v.NumberUtils.asNumber(r,0))&&void 0!==i?i:0),this.standardHandler(e,t,void 0,{array:!1,valueOverride:r})}enter_extraProperties(e,t){const i=e.value;if(!this.options.excludeUnknownProperties&&i)for(const[e,t]of Object.entries(i)){let i=e;Object.prototype.hasOwnProperty.call(this.bitJson,e)&&(i=`_${e}`),this.addProperty(this.bitJson,i,t,{array:!0})}}enter_cardBitsValue(e,t){var i,r,o,n,a,s,l,p,c;const y=e.value,g=this.getBitType(t);if(!g)return;let d;if(g===u.BitType.bookReferenceList){this.bitJson.bookReferences||(this.bitJson.bookReferences=[]);const e={};this.addProperty(e,"lang",y.lang,{array:!1}),this.addProperty(e,"refAuthor",null!==(i=y.refAuthor)&&void 0!==i?i:[],{array:!0}),this.addProperty(e,"refBookTitle",null!==(r=y.refBookTitle)&&void 0!==r?r:[],{array:!1}),this.addProperty(e,"refPublisher",null!==(o=y.refPublisher)&&void 0!==o?o:[],{array:!0}),this.addProperty(e,"refPublicationYear",null!==(n=y.refPublicationYear)&&void 0!==n?n:[],{array:!1}),this.addProperty(e,"citationStyle",null!==(a=y.citationStyle)&&void 0!==a?a:[],{array:!1}),this.bitJson.bookReferences.push(e)}else g===u.BitType.pageFooter?(this.bitJson.sections||(this.bitJson.sections=[]),d=this.bitJson.sections):(this.bitJson.listItems||(this.bitJson.listItems=[]),d=this.bitJson.listItems),this.listItem={item:null!==(s=y.item)&&void 0!==s?s:[],lead:null!==(l=y.lead)&&void 0!==l?l:[],hint:null!==(p=y.hint)&&void 0!==p?p:[],instruction:null!==(c=y.instruction)&&void 0!==c?c:[],body:this.bodyDefault},d.push(this.listItem)}exit_cardBitsValue(e,t){this.listItem=void 0}enter_body(e,t){const i=e.value,r=this.getParentNode(t);if(!r)return!1;const o=this.getTextFormat(t),n=o===f.TextFormat.bitmarkText;if(this.bodyJson=i.body,r.key===c.NodeType.bitsValue){this.bitJson.body=this.bodyJson;const e=n&&this.isBitmarkText(this.bodyJson);if(this.options.textAsPlainText&&e){const e=this.textGenerator.generateSync(this.bodyJson,o,m.TextLocation.body,{noBreakscaping:!0});this.bitJson.body=(null!=e?e:"").trim()}else e&&(this.bitJson.body=this.moveBodyBitPropertiesToAttrs(this.bodyJson))}else r.key===c.NodeType.cardBitsValue&&this.listItem&&(this.listItem.body=this.bodyJson);return!1}bodyBitCallback(e,t,i){var r;const o=`{${this.placeholderIndex}}`;return this.placeholderIndex++,this.bitJson.placeholders=null!==(r=this.bitJson.placeholders)&&void 0!==r?r:{},this.bitJson.placeholders[o]=e,o}moveBodyBitPropertiesToAttrs(e,t=0){if(0===t)e=(0,a.default)(e);else if(t>5e3)throw new Error("Recursion limit exceeded");for(const i of e)if(i.type!==g.BodyBitType.text&&g.BodyBitType.values().includes(i.type)){const e=i;e.attrs={};for(const[t,i]of Object.entries(e))"type"!==t&&"attrs"!==t&&(e.attrs[t]=i,delete e[t])}else Array.isArray(i.content)&&(t++,this.moveBodyBitPropertiesToAttrs(i.content,t));return e}enter_footer(e,t){return this.standardHandler(e,t,void 0,{array:!0,valueOverride:e.value.footer})}enter_elements(e,t){return this.standardHandler(e,t,void 0,{array:!0})}enter_flashcards(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0,keyOverride:"cards"})}enter_definitions(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_statement(e,t){var i,r;const o=e.value,n=this.getParentNode(t);(null==n?void 0:n.key)===c.NodeType.cardNode&&o&&(this.bitJson.statement=null!==(i=o.statement)&&void 0!==i?i:"",this.bitJson.isCorrect=null!==(r=o.isCorrect)&&void 0!==r&&r,this.bitJson.example=o.example,this.bitJson.isExample=o.isExample)}enter_statements(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_choices(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_responses(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_feedbacks(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_quizzes(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_heading(e,t){return this.standardHandler(e,t,void 0,{array:!1})}enter_pairs(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_matrix(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_pronunciationTable(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!1})}enter_table(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!1})}enter_questions(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_botResponses(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0,keyOverride:"responses"})}enter_ingredients(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_captionDefinitionList(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!1})}enter_backgroundWallpaper(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_imagePlaceholder(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_resources(e,t){var i,r;const o=e.value,n=this.getBitType(t),a=this.getResourceType(t);if(!o||!n)return!0;let s;const l=p.Config.getBitConfig(n),c=p.Config.getBitResourcesConfig(n,a),y=c.comboResourceTagTypesMap;if(c.comboResourceTagTypesMap.size>0)for(const[e,t]of y.entries()){const n={type:e,__typeAlias:e};for(const e of t){const t=o.find((t=>t.__typeAlias===e));if(t){const e=p.Config.getTagConfigForTag(l.tags,t.__typeAlias),o=null!==(i=null==e?void 0:e.jsonKey)&&void 0!==i?i:t.__typeAlias,a=null!==(r=null==e?void 0:e.tag)&&void 0!==r?r:t.__typeAlias,s=t.__typeAlias===a?t:void 0;if(s)for(const[e,t]of Object.entries(s))"type"!==e&&(n[o]=t)}}s=n}else if(p.Config.isOfBitType(n,[u.BitType.imagesLogoGrave,u.BitType.prototypeImages])){const e=[];for(const t of o)t.type===T.ResourceTag.image&&e.push(t);n===u.BitType.imagesLogoGrave?this.bitJson.logos=e:this.bitJson.images=e}else o.length>=1&&(s=o[0]);return this.bitJson.resource=s,!1}leaf_level(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_book(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}leaf_book(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}leaf_anchor(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}leaf_reference(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}leaf_referenceEnd(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}leaf_markup(e,t){const i=e.value;return i&&(this.bitWrapperJson.bitmark=i),!1}enter_internalComment(e,t){return!1}enter_parser(e,t){const i=e.value,r=this.getBitType(t),n=this.getParentNode(t);if(i&&r){const{version:e,excessResources:r,warnings:a,errors:s}=i,l=o(i,["version","excessResources","warnings","errors"]),p=`${this.bitmarkVersion}`,u=this.textParserVersion;let y;if(Array.isArray(r)&&r.length>0){y=[];for(const e of r)y.push(e)}const g=this.getInternalComments(t);(null==n?void 0:n.key)===c.NodeType.bitsValue&&(this.bitWrapperJson.parser=Object.assign(Object.assign({version:e,bitmarkVersion:p,textParserVersion:u,internalComments:g},l),{warnings:a,errors:s,excessResources:y}),this.options.enableWarnings||delete this.bitWrapperJson.parser.warnings)}}generatePropertyHandlers(){var e;const t=p.Config.getRawPropertiesConfig();for(const i of Object.values(t)){const t=null!==(e=i.astKey)&&void 0!==e?e:i.tag,r=`enter_${t}`;"function"!=typeof this[r]&&("example"!==t&&(this[r]=(e,t)=>{var r;const o=e.value;if(null==o)return;const n=this.getParentNode(t);if((null==n?void 0:n.key)!==c.NodeType.bitsValue)return;const a=null!==(r=i.jsonKey)&&void 0!==r?r:i.tag;this.addProperty(this.bitJson,a,o,{array:!i.single})},this[r]=this[r].bind(this)))}}standardHandler(e,t,i,r){var o,n;if(i){const e=Array.isArray(i)?i:[i],r=this.getParentNode(t);if(!(null==r?void 0:r.key)||!e.includes(null==r?void 0:r.key))return!0}return this.addProperty(this.bitJson,null!==(o=r.keyOverride)&&void 0!==o?o:e.key,null!==(n=r.valueOverride)&&void 0!==n?n:e.value,r),!1}addProperty(e,t,i,r){if(void 0!==i){let o;Array.isArray(i)||(i=[i]);const n=i;o=!r.array&&n.length>=1?n[n.length-1]:n,(r.allowNull||null!=o)&&(e[t]=o)}}toExample(e,t){const{isExample:i,example:r,__isDefaultExample:o}=e,{defaultExample:n,isBoolean:a}=t;if(!i)return{isExample:!1,example:null};let s;return s=o?a?B.BooleanUtils.toBoolean(n):this.convertBreakscapedStringToJsonText(n,t.textFormat,m.TextLocation.tag):a?B.BooleanUtils.toBoolean(r):this.convertBreakscapedStringToJsonText(r,t.textFormat,m.TextLocation.tag),{isExample:!0,example:s}}getBitType(e){for(const t of e)if(t.key===c.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.bitType}}getTextFormat(e){var t;const i=this.getBitType(e);if(i){const r=p.Config.getBitConfig(i);for(const i of e)if(i.key===c.NodeType.bitsValue){const e=i.value;return null!==(t=f.TextFormat.fromValue(null==e?void 0:e.textFormat))&&void 0!==t?t:r.textFormatDefault}}return f.TextFormat.bitmarkText}getResourceType(e){for(const t of e)if(t.key===c.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.resourceType}}getInternalComments(e){if(this.getBitType(e))for(const t of e)if(t.key===c.NodeType.bitsValue){return t.value.internalComment}}convertBreakscapedStringToJsonText(e,t,i){if(!(t===f.TextFormat.bitmarkText))return e||"";if(this.options.textAsPlainText)return e||"";return this.textParser.toAst(e,{textFormat:t,textLocation:i})}concatenatePlainTextWithJsonTexts(e,t,i){var r;if(Array.isArray(e)){if(i=i.trim()){const o=i.split("\n"),n=[];for(let e=0;e<t;e++)n.push({type:h.TextNodeType.hardBreak});for(let e=0;e<o.length;e++){const t=o[e];t&&n.push({text:t,type:h.TextNodeType.text}),e<o.length-1&&n.push({type:h.TextNodeType.hardBreak})}const a=e[e.length-1];a&&a.type===h.TextNodeType.paragraph?a.content=[...null!==(r=a.content)&&void 0!==r?r:[],...n]:e.push({type:h.TextNodeType.paragraph,content:n,attrs:{}})}return e}return`${null!=e?e:""}${"\n".repeat(t)}${null!=i?i:""}`}isBitmarkText(e){return null!=e&&(!!Array.isArray(e)&&"text"===e.__tag)}writeInlineDebug(e,t){let i=e;t.open?i=`<${e}>`:t.close?i=`</${e}>`:t.single&&(i=`<${e} />`),this.writeString(i)}writeString(e){null!=e&&this.write(`${e}`)}createBitJson(e){const t=e.textFormat;return{type:e.isCommented?u.BitType._comment:e.bitType,originalType:e.isCommented?e.bitType:void 0,format:t,bitLevel:e.bitLevel}}cleanBitJson(e){var t,i,r,o,n,a;const s=p.Config.getBitType(e.type),l=p.Config.getBitConfig(s);if(null==e.originalType&&(e.originalType=void 0),e.item||(e.item=void 0),p.Config.isOfBitType(s,[u.BitType._error,u.BitType._comment]))delete e.format,delete e.item,delete e.lead,delete e.pageNumber,delete e.marginNumber,delete e.hint,delete e.instruction;else{let c=!1,y=!1;p.Config.isOfBitType(s,[u.BitType.page])?(null!=e.item&&0!==(null===(t=e.item)||void 0===t?void 0:t.length)||delete e.item,null!=e.lead&&0!==(null===(i=e.lead)||void 0===i?void 0:i.length)||delete e.lead,null!=e.pageNumber&&0!==(null===(r=e.pageNumber)||void 0===r?void 0:r.length)||delete e.pageNumber,null!=e.marginNumber&&0!==(null===(o=e.marginNumber)||void 0===o?void 0:o.length)||delete e.marginNumber,null!=e.hint&&0!==(null===(n=e.hint)||void 0===n?void 0:n.length)||delete e.hint,null!=e.instruction&&0!==(null===(a=e.instruction)||void 0===a?void 0:a.length)||delete e.instruction):(null==e.item&&(e.item=this.textDefault),null==e.lead&&(e.lead=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.instruction&&(e.instruction=this.textDefault),null==e.pageNumber&&(e.pageNumber=this.textDefault),null==e.marginNumber&&(e.marginNumber=this.textDefault)),null==e.body&&(e.body=this.bodyDefault),p.Config.isOfBitType(s,[u.BitType.article]),p.Config.isOfBitType(s,[u.BitType.example])&&(c=!0,y=!0),p.Config.isOfBitType(s,[u.BitType.multipleChoice1,u.BitType.multipleResponse1,u.BitType.multipleChoiceText,u.BitType.highlightText,u.BitType.gapText,u.BitType.gapTextInstructionGrouped,u.BitType.clozeAndMultipleChoiceText,u.BitType.sequence,u.BitType.mark,u.BitType.flashcard,u.BitType.definitionList])&&(c=!0,null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,[u.BitType.sequence])&&(c=!0,y=!0,null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,u.BitType.cloze)&&(c=!0,p.Config.isOfBitType(s,u.BitType.clozeSolutionGrouped)?(null==e.quizCountItems&&(e.quizCountItems=!0),null==e.quizStrikethroughSolutions&&(e.quizStrikethroughSolutions=!0)):p.Config.isOfBitType(s,u.BitType.clozeInstructionGrouped)&&(null==e.quizCountItems&&(e.quizCountItems=!0),null==e.quizStrikethroughSolutions&&(e.quizStrikethroughSolutions=!1))),p.Config.isOfBitType(s,[u.BitType.multipleChoice,u.BitType.multipleResponse])&&(c=!0,null==e.body&&(e.body=this.bodyDefault),null==e.footer&&(e.footer=this.textDefault)),p.Config.isOfBitType(s,u.BitType.essay)&&(c=!0,y=!0,null==e.body&&(e.body=this.bodyDefault),null==e.partialAnswer&&(e.partialAnswer="")),p.Config.isOfBitType(s,u.BitType.trueFalse1)&&(c=!0,y=!0,null==e.isCorrect&&(e.isCorrect=!1),null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,u.BitType.trueFalse)&&(c=!0,null==e.labelFalse&&(e.labelFalse=""),null==e.labelTrue&&(e.labelTrue=""),null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,u.BitType.chapter)&&(null==e.toc&&(e.toc=!0),null==e.progress&&(e.progress=!0),null==e.level&&(e.level=1),null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,u.BitType.interview)&&(c=!0,null==e.body&&(e.body=this.bodyDefault),null==e.footer&&(e.footer=this.textDefault),null==e.questions&&(e.questions=[])),s===u.BitType.matchMatrix&&(c=!0),p.Config.isOfBitType(s,u.BitType.match)&&(c=!0,null==e.heading&&(e.heading={})),p.Config.isOfBitType(s,u.BitType.learningPathBook)&&(null==e.isTracked&&(e.isTracked=!0),null==e.isInfoOnly&&(e.isInfoOnly=!1)),p.Config.isOfBitType(s,u.BitType.table)&&(null==e.tableFixedHeader&&(e.tableFixedHeader=!1),null==e.tableSearch&&(e.tableSearch=!1),null==e.tableSort&&(e.tableSort=!1),null==e.tablePagination&&(e.tablePagination=!1),null==e.tablePaginationLimit&&(e.tablePaginationLimit=0),null==e.tableHeight&&(e.tableHeight=0),null==e.tableWhitespaceNoWrap&&(e.tableWhitespaceNoWrap=!1),null==e.tableAutoWidth&&(e.tableAutoWidth=!0),null==e.tableResizableColumns&&(e.tableResizableColumns=!1),null==e.tableColumnMinWidth&&(e.tableColumnMinWidth=0)),p.Config.isOfBitType(s,u.BitType.bookReference)&&(null==e.refAuthor&&(e.refAuthor=[]),null==e.refBookTitle&&(e.refBookTitle=""),null==e.refPublisher&&(e.refPublisher=[]),null==e.refPublicationYear&&(e.refPublicationYear="")),p.Config.isOfBitType(s,[u.BitType.pageBanner,u.BitType.pageBuyButton,u.BitType.pageBuyButtonAlt,u.BitType.pageBuyButtonPromotion,u.BitType.pageFooter,u.BitType.pageOpenBook,u.BitType.pagePerson,u.BitType.pageProduct,u.BitType.pageProductList,u.BitType.pageProductVideo,u.BitType.pageProductVideoList,u.BitType.pageSectionFolder,u.BitType.pageSubscribe,u.BitType.pageSubpage])&&(null==e.slug&&(e.slug=""),null==e.body&&(e.body=this.bodyDefault),p.Config.isOfBitType(s,u.BitType.pageBuyButton)&&null==e.content2Buy&&(e.content2Buy="")),p.Config.isOfBitType(s,u.BitType.book)&&(null==e.maxTocChapterLevel&&(e.maxTocChapterLevel=-1),null==e.hasMarkAsDone&&(e.hasMarkAsDone=!1),null==e.processHandIn&&(e.processHandIn=!1),null==e.isPublic&&(e.isPublic=!1),null==e.chatWithBook&&(e.chatWithBook=!1),null==e.chatWithBookBrainKey&&(e.chatWithBookBrainKey="")),s!==u.BitType.articleAi&&s!==u.BitType.noteAi&&s!==u.BitType.summaryAi||null==e.aiGenerated&&(e.aiGenerated=!0),p.Config.isOfBitType(s,[u.BitType.articleResponsive,u.BitType.pageArticleResponsive])&&null==e.imageFirst&&(e.imageFirst=!0),p.Config.isOfBitType(s,u.BitType.reviewNote)&&(null==e.resolved&&(e.resolved=!1),null==e.resolvedDate&&(e.resolvedDate=""),null==e.resolvedBy&&(e.resolvedBy="")),p.Config.isOfBitType(s,[u.BitType.imagesLogoGrave,u.BitType.prototypeImages])&&(s===u.BitType.imagesLogoGrave?null==e.logos&&(e.logos=[]):null==e.images&&(e.images=[])),p.Config.isOfBitType(s,[u.BitType.stepImageScreenshotWithPointer,u.BitType.surveyMatrix])&&(null==e.pointerTop&&(e.pointerTop=""),null==e.pointerLeft&&(e.pointerLeft=""),p.Config.isOfBitType(s,[u.BitType.surveyMatrix])&&null==e.buttonCaption&&(e.buttonCaption="")),p.Config.isOfBitType(s,[u.BitType.listItem])&&null==e.listItemIndent&&(e.listItemIndent=0),p.Config.isOfBitType(s,u.BitType.surveyRating)&&(null==e.ratingLevelStart&&(e.ratingLevelStart={level:0}),null==e.ratingLevelEnd&&(e.ratingLevelEnd={level:0})),p.Config.isOfBitType(s,u.BitType.vendorStripePricingTable)&&(null==e.stripePricingTableId&&(e.stripePricingTableId=""),null==e.stripePublishableKey&&(e.stripePublishableKey="")),p.Config.isOfBitType(s,u.BitType.callToAction)&&(null==e.buttonCaption&&(e.buttonCaption=""),null==e.callToActionUrl&&(e.callToActionUrl="")),p.Config.isOfBitType(s,u.BitType.handInFile)&&null==e.handInAcceptFileType&&(e.handInAcceptFileType=[]),p.Config.isOfBitType(s,u.BitType.handInSubmit)&&(null==e.handInRequirement&&(e.handInRequirement=[]),null==e.handInInstruction&&(e.handInInstruction=""),null==e.buttonCaption&&(e.buttonCaption="")),p.Config.isOfBitType(s,u.BitType.module)&&null==e.hasBookNavigation&&(e.hasBookNavigation=!0),p.Config.isOfBitType(s,u.BitType.container)&&null==e.allowedBit&&(e.allowedBit=[]),l.quizBit&&null==e.revealSolutions&&(e.revealSolutions=!1),p.Config.isOfBitType(s,u.BitType.platformPath)&&null==e.path&&(e.path=""),c?null==e.isExample&&(e.isExample=!1):(delete e.isExample,delete e.example),y?null==e.example&&(e.example=null):delete e.example}return e}convertAllBitmarkTextsToStringsForPlainText(e){if(!this.options.textAsPlainText)return;const t=e;for(const e in t){const i=t[e];if(this.isBitmarkText(i)){const r=this.textGenerator.generateSync(i,f.TextFormat.bitmarkText,m.TextLocation.tag,{noBreakscaping:!0});t[e]=(null!=r?r:"").trim()}else"object"==typeof t[e]&&this.convertAllBitmarkTextsToStringsForPlainText(t[e])}}removeTemporaryProperties(e){const t=e;for(const e in t)e.startsWith("__")?delete t[e]:"object"==typeof t[e]&&this.removeTemporaryProperties(t[e])}write(e){return this.writer.write(e),this}writeLine(e){return this.writer.writeLine(e),this}writeLines(e,t){return this.writer.writeLines(e,t),this}writeWhiteSpace(){return this.writer.writeWhiteSpace(),this}}t.JsonGenerator=k},3029:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CARD_VARIANT_DIVIDER_V1=t.CARD_SIDE_DIVIDER_V1=t.CARD_DIVIDER_V1=t.CARD_VARIANT_DIVIDER_V2=t.CARD_SIDE_DIVIDER_V2=t.CARD_DIVIDER_V2=t.BitContentLevel=t.TypeKey=void 0;const r=i(4718),o=i(9917);t.CARD_DIVIDER_V2="====";t.CARD_SIDE_DIVIDER_V2="--";t.CARD_VARIANT_DIVIDER_V2="++";t.CARD_DIVIDER_V1="===";t.CARD_SIDE_DIVIDER_V1="==";t.CARD_VARIANT_DIVIDER_V1="--";const n=(0,r.superenum)({TextFormat:"TextFormat",ResourceType:"ResourceType",Title:o.Tag.tag_title,Anchor:o.Tag.tag_anchor,Reference:o.Tag.tag_reference,ItemLead:o.Tag.tag_itemLead,Instruction:o.Tag.tag_instruction,Hint:o.Tag.tag_hint,True:o.Tag.tag_true,False:o.Tag.tag_false,Gap:o.Tag.tag_gap,Mark:o.Tag.tag_mark,SampleSolution:o.Tag.tag_sampleSolution,Property:"Property",Resource:"Resource",TagChain:"TagChain",BodyChar:"BodyChar",BodyText:"BodyText",BodyTextPlain:"BodyTextPlain",CardSet:"CardSet",Card:"Card",CardChar:"CardChar",CardText:"CardText",GapChain:"GapChain",TrueFalseChain:"TrueFalseChain",PlainTextDivider:"PlainTextDivider",FooterDivider:"FooterDivider"});t.TypeKey=n;const a=(0,r.superenum)({Bit:"Bit",Card:"Card",Chain:"Chain"});t.BitContentLevel=a},3045:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.bookChainContentProcessor=function(e,t,i,c,u){t===p.BitContentLevel.Chain||function(e,t,i,c,u){const{bitConfig:y}=e;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("book content",c);const g=e.bitContentProcessor(p.BitContentLevel.Chain,i,c.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("book TAGS",g);const{reference:d,referenceEnd:T}=g,f=r.Breakscape.unbreakscape(l.StringUtils.trimmedString(c.value),{textFormat:a.TextFormat.bitmarkText,textLocation:s.TextLocation.tag}),m=y.tags[o.PropertyConfigKey.book];if(m&&(m.maxCount===n.Count.infinity||m.maxCount>1))return Array.isArray(u.book)||(u.book=[]),void u.book.push({book:f,reference:null!=d?d:"",referenceEnd:null!=T?T:void 0});u.book=f,u.reference=d,u.referenceEnd=T}(e,0,i,c,u)};const r=i(7735),o=i(9888),n=i(3778),a=i(385),s=i(6877),l=i(9681),p=i(3029)},3063:function(e,t,i){var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.markConfigChainContentProcessor=function(e,t,i,u,y){var g;const{key:d}=u;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("mark content",u);const T=y.markConfig;if(!T)return;const f=n.Config.getTagConfigForTag(i,a.PropertyTag.fromValue(d)),m=e.bitContentProcessor(c.BitContentLevel.Chain,null==f?void 0:f.chain,u.chain),{mark:h}=m,b=r(m,["mark"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("mark TAGS",b);const B=o.Breakscape.unbreakscape(null!==(g=p.StringUtils.trimmedString(u.value))&&void 0!==g?g:"unknown",{textFormat:s.TextFormat.bitmarkText,textLocation:l.TextLocation.tag}),v=Object.assign({mark:B,emphasis:"underline"},b);v&&T.push(v)};const o=i(7735),n=i(2028),a=i(166),s=i(385),l=i(6877),p=i(9681),c=i(3029)},3069:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InfoFormat=void 0;const r=(0,i(4718).superenum)({text:"text",json:"json",pojo:"pojo"});t.InfoFormat=r},3206:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkPegParserHelper=void 0;const r=i(7735),o=i(1163),n=i(385),a=i(6877),s=i(9681),l=i(7461),p=i(3029);i(2028);t.BitmarkPegParserHelper=class{constructor(e){this.cardIndex=0,this.cardSideIndex=0,this.cardVariantIndex=0,this.parse=e.parse,this.parserText=e.parserText,this.parserLocation=e.parserLocation}handleRawBit(e){var t,i;const r=e.trim();if(this.debugPrint("RAW BIT",r),!r)return;const o=null!==(i=null===(t=this.parserLocation())||void 0===t?void 0:t.start)&&void 0!==i?i:{line:1,column:1,offset:0},n=this.parse(e,{startRule:"bit",grammarSource:new l.PeggyGrammarLocation("bit",o)});return n.value&&(n.value.markup=r),n}handleTextFormat(e){return{type:p.TypeKey.TextFormat,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleResourceType(e){return{type:p.TypeKey.ResourceType,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleBitContent(e){let t=this.reduceToArrayOfTypes(e);return t=this.mergeCharToText(t),t}handleBitTag(e){return e}handleTag(e,t){return{type:e,value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handlePropertyTag(e,t){return{type:p.TypeKey.Property,key:r.Breakscape.unbreakscape(e,{textFormat:n.TextFormat.plainText,textLocation:a.TextLocation.tag}),value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handleResourceTag(e,t){return{type:p.TypeKey.Resource,key:r.Breakscape.unbreakscape(e,{textFormat:n.TextFormat.plainText,textLocation:a.TextLocation.tag}),value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handleTagChain(e){const t=this.reduceToArrayOfTypes(e);let i=t;if(t.length>1){const e=t[0];e.chain=t.slice(1),i=[e]}return i}handlePlainTextDivider(e){return e=this.reduceToString(e),{type:p.TypeKey.PlainTextDivider,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleFooterDivider(e){return e=this.reduceToString(e),{type:p.TypeKey.FooterDivider,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardSet(e){const t=e,i={cards:[]},r={cards:[]};if(t){const e={text:this.parserText(),location:this.parserLocation()};for(const e of t){if(!e)continue;const{type:t,value:r,parser:o}=e;if(!t||t!==p.TypeKey.Card)continue;const{cardIndex:n,cardSideIndex:a,cardVariantIndex:s,value:l}=r;let c=i.cards[n];c||(c={sides:[]},i.cards[n]=c);let u=c.sides[a];u||(u={variants:[]},c.sides[a]=u);u.variants[s]?u.variants[s].value+=l:u.variants[s]={value:l,parser:o}}i.cards=i.cards.filter((e=>e.sides.some((e=>e.variants.some((e=>0!==s.StringUtils.trimmedString(e.value).length))))));for(const t of i.cards){const i={sides:[]};r.cards.push(i);for(const r of t.sides){const t={variants:[]};i.sides.push(t);for(const i of r.variants){let r={line:1,column:1,offset:0};if(i.parser.location){r=i.parser.location.start;const e=i.parser.text,t=e?e.length:0,o=1;r.offset+=t,r.line+=o}let o=this.parse(i.value,{startRule:"cardContent",grammarSource:new l.PeggyGrammarLocation("card-content",r)});o=this.reduceToArrayOfTypes(o),this.debugPrint("parsedCardContent",o),t.variants.push({parser:e,content:o})}}}}return{type:p.TypeKey.CardSet,value:r,parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardSetStart(){this.cardIndex=-1,this.cardSideIndex=0,this.cardVariantIndex=0}handleCardSetEnd(){this.cardIndex=0,this.cardSideIndex=0,this.cardVariantIndex=0}handleCards(e){return e}handleCardLineOrDivider(e,t){let i=!1,r=!1,n=!1;return Array.isArray(e)&&2===e.length&&(e=e[0],t===o.CardSetVersion.v1?(i=e===p.CARD_DIVIDER_V1,r=e===p.CARD_SIDE_DIVIDER_V1,n=e===p.CARD_VARIANT_DIVIDER_V1):(i=e===p.CARD_DIVIDER_V2,r=e===p.CARD_SIDE_DIVIDER_V2,n=e===p.CARD_VARIANT_DIVIDER_V2)),i?(this.cardIndex++,this.cardSideIndex=0,this.cardVariantIndex=0):r?(this.cardSideIndex++,this.cardVariantIndex=0):n&&this.cardVariantIndex++,this.isType(e,p.TypeKey.Card)?e:{type:p.TypeKey.Card,value:{cardIndex:this.cardIndex,cardSideIndex:this.cardSideIndex,cardVariantIndex:this.cardVariantIndex,value:""},parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardLine(e){return{type:p.TypeKey.Card,value:{cardIndex:this.cardIndex,cardSideIndex:this.cardSideIndex,cardVariantIndex:this.cardVariantIndex,value:e},parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardContent(e){return this.mergeCharToText(e)}handleCardTags(e){return e}mergeCharToText(e){var t,i,r,o,n,a;const s=[];let l,c;for(const u of e)switch(u.type){case p.TypeKey.BodyChar:if(l){const e=`${null!==(t=l.value)&&void 0!==t?t:""}${null!==(i=u.value)&&void 0!==i?i:""}`;l.value=e}else l={type:p.TypeKey.BodyText,value:null!==(r=u.value)&&void 0!==r?r:"",parser:{text:this.parserText(),location:this.parserLocation()}};break;case p.TypeKey.CardChar:if(c){const e=`${null!==(o=c.value)&&void 0!==o?o:""}${null!==(n=u.value)&&void 0!==n?n:""}`;c.value=e}else c={type:p.TypeKey.CardText,value:null!==(a=u.value)&&void 0!==a?a:"",parser:{text:this.parserText(),location:this.parserLocation()}};break;default:l&&(s.push(l),l=void 0),c&&(s.push(c),c=void 0),s.push(u)}return l&&s.push(l),c&&s.push(c),s}isType(e,t){if(!e)return!1;const{type:i}=e;return t?Array.isArray(t)?t.indexOf(i)>=0:t===i:!!p.TypeKey.fromValue(i)}reduceToArrayOfTypes(e,t,i){if(!Array.isArray(e))return[];return e.reduce(((e,r,o)=>{if(null==r)return e;const{type:n,value:a}=r;if(Array.isArray(r)){const i=this.reduceToArrayOfTypes(r,t);e.push(...i)}else{if(!this.isType(r,t))return e;if(i&&Array.isArray(a)){const i=this.reduceToArrayOfTypes(a,t);e.push(...i)}else n&&e.push(r)}return e}),[])}reduceToString(e){if(!Array.isArray(e))return"";return e.reduce(((e,t,i)=>{if(null==t)return e;if(Array.isArray(t)){e+=this.reduceToString(t)}else e+=t;return e}),[])}debugPrint(e,t){}}},3619:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitConfig=void 0;const r=i(3778);t.BitConfig=class{constructor(e){this.tags={};const{since:t,bitType:i,inheritedBitTypes:r,textFormatDefault:o,tags:n,cardSet:a,quizBit:s,deprecated:l,bodyAllowed:p,bodyRequired:c,footerAllowed:u,footerRequired:y,resourceAttachmentAllowed:g,rootExampleType:d,comboResourceType:T}=e;this.since=t,this.bitType=i,this.inheritedBitTypes=r,this.inheritedBitTypesSet=new Set(r),this.textFormatDefault=o,this.tags=n,this.cardSet=a,this.quizBit=s,this.deprecated=l,this.bodyAllowed=p??!0,this.bodyRequired=c,this.footerAllowed=u??!0,this.footerRequired=y,this.resourceAttachmentAllowed=g??!0,this.rootExampleType=d,this.comboResourceType=T}toString(e){const t=Object.assign({},e);let i=`[Bit]\n${this.bitType}`;this.inheritedBitTypes.length>0&&(i+="\n\n[Inheritance]",i+=`\n${this.inheritedBitTypes.join(" => ")}`),i+=`\n\n[Default text format]\n${this.textFormatDefault}`;const o=[];null!=this.since&&o.push(`since=${this.since}`),null!=this.deprecated&&o.push(`deprecated=${this.deprecated}`),this.bodyAllowed&&o.push("bodyAllowed"),this.bodyRequired&&o.push("bodyRequired"),this.footerAllowed&&o.push("footerAllowed"),this.footerRequired&&o.push("footerRequired"),this.resourceAttachmentAllowed&&o.push("resourceAttachmentAllowed"),null!=this.rootExampleType&&o.push(`rootExampleType=${this.rootExampleType}`),null!=this.comboResourceType&&o.push(`comboResourceType=${this.comboResourceType}`),i+=`\n\n[Flags]\n${o.join(", ")}`,i+="\n\n[Tags]";for(const e of Object.values(this.tags))(e.maxCount===r.Count.infinity||e.maxCount>0)&&(i+=`\n${e.toString(t)}`);return this.cardSet&&(i+=`\n\n${this.cardSet.toString(t)}`),i}}},3778:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Count=void 0;const r=(0,i(4718).superenum)({infinity:"infinity"});t.Count=r},3811:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_BITMARK_VERSION=t.BitmarkVersion=void 0;const r=(0,i(4718).superenum)({v2:2,v3:3});t.BitmarkVersion=r;const o=r.v3;t.DEFAULT_BITMARK_VERSION=o},3881:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InfoBuilder=void 0;const r=i(2028),o=i(5854);t.InfoBuilder=class{getSupportedBits(e){var t,i;const n=null===(t=null==e?void 0:e.includeNonDeprecated)||void 0===t||t,a=null!==(i=null==e?void 0:e.includeDeprecated)&&void 0!==i&&i,s=[];for(const e of o.BitType.values()){if(e===o.BitType._error||e===o.BitType._comment)continue;const t=r.Config.getBitType(e),i=r.Config.getBitConfig(t),l=i.inheritedBitTypes.length>0?i.inheritedBitTypes:void 0;(n&&!i.deprecated||a&&i.deprecated)&&s.push({name:e,since:i.since,deprecated:i.deprecated,inheritedBitTypes:l})}return s}getSupportedBitConfigs(){const e=[];for(const t of o.BitType.values()){if(t===o.BitType._error||t===o.BitType._comment)continue;const i=r.Config.getBitType(t),n=r.Config.getBitConfig(i);e.push(n)}return e}}},3904:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.gapChainContentProcessor=function(e,t,i,l,p,c){if(t===s.BitContentLevel.Chain)(0,a.clozeTagContentProcessor)(e,t,i,l,p);else{const t=function(e,t,i,a){var l;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("gap content",a);const p=r.Config.getTagConfigForTag(i,n.Tag.fromValue(a.type)),c=[a,...null!==(l=a.chain)&&void 0!==l?l:[]],u=e.bitContentProcessor(s.BitContentLevel.Chain,null==p?void 0:p.chain,c);e.DEBUG_CHAIN_TAGS&&e.debugPrint("gap TAGS",u);const y=Object.assign({type:o.BodyBitType.gap},u);return y}(e,0,i,l);t&&c.push(t)}};const r=i(2028),o=i(4410),n=i(9917),a=i(554),s=i(3029)},3967:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ratingLevelChainContentProcessor=function(e,t,i,a,p){var c;const{textFormat:u}=e,{key:y,value:g}=a;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("ratingLevel content",a);const d=e.bitContentProcessor(s.BitContentLevel.Chain,i,a.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("ratingLevel TAGS",d);const{label:T}=d,f={level:null!==(c=n.NumberUtils.asNumber(g))&&void 0!==c?c:0,label:T?l.toAst(T,{textFormat:u,textLocation:o.TextLocation.tag}):void 0};switch(y){case r.PropertyTag.ratingLevelStart:p.ratingLevelStart=f;break;case r.PropertyTag.ratingLevelEnd:p.ratingLevelEnd=f}};const r=i(166),o=i(6877),n=i(8025),a=i(777),s=i(3029),l=new a.TextParser},3968:function(e,t,i){var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(o,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function s(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkStringGenerator=void 0;const o=i(6772),n=i(5087);t.BitmarkStringGenerator=class{constructor(e){this.writer=new o.StringWriter,this.generator=new n.BitmarkGenerator(this.writer,e)}generate(e){return r(this,void 0,void 0,(function*(){return yield this.generator.generate(e),this.writer.getString()}))}generateSync(e){return this.generator.generateSync(e),this.writer.getString()}}},3990:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.referenceTagContentProcessor=function(e,t,i,s,l,p){const{value:c}=s,u=a.StringUtils.trimmedString(c);p?l.referenceEnd=r.Breakscape.unbreakscape(u,{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag}):l.reference=r.Breakscape.unbreakscape(u,{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag})};const r=i(7735),o=i(385),n=i(6877),a=i(9681)},4020:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.trueFalseTagContentProcessor=function(e,t,i,l){const{type:p,value:c}=i,u=l.trueFalse;if(!u)return;const y=r.Breakscape.unbreakscape(a.StringUtils.trimmedString(c),{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag});u.push({text:y,isCorrect:p===s.TypeKey.True,__isDefaultExample:!1})};const r=i(7735),o=i(385),n=i(6877),a=i(9681),s=i(3029)},4078:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanUtils=void 0;const i=new class{isBoolean(e){return!0===e||!1===e}isBooleanString(e){return!!this.isBoolean(e)||("true"===e||"false"===e)}toBoolean(e,t){return t?!1!==e&&"false"!==e:!0===e||"true"===e}};t.BooleanUtils=i},4091:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exampleTagContentProcessor=function(e,t,i,u){const{bitType:y}=e,{value:g}=i,d=g;o.Config.isOfBitType(y,[n.BitType.cloze,n.BitType.clozeAndMultipleChoiceText,n.BitType.multipleChoiceText,n.BitType.highlightText,n.BitType.trueFalse,n.BitType.trueFalse1,n.BitType.multipleResponse,n.BitType.multipleResponse1,n.BitType.multipleChoice,n.BitType.multipleChoice1])?function(e,t,i,u){var y,g;const{bitType:d,textFormat:T}=e;let f;Array.isArray(u.trueFalse)&&u.trueFalse.length>0&&(f=null!==(y=u.trueFalse[u.trueFalse.length-1])&&void 0!==y?y:void 0);f?!0===i?(f.__isDefaultExample=!0,f.example=!!f.isCorrect):l.BooleanUtils.isBooleanString(i)?f.example=l.BooleanUtils.toBoolean(i):(f.__isDefaultExample=!0,f.example=void 0,e.addWarning("Only 'true' / 'false' / default are allowed here, using default",t)):Array.isArray(u.__solutionsAst)&&u.__solutionsAst.length>0?u.example=!0===i?null!==(g=u.__solutionsAst[u.__solutionsAst.length-1])&&void 0!==g?g:void 0:i?p.toAst(i,{textFormat:T,textLocation:s.TextLocation.tag}):void 0:o.Config.isOfBitType(d,[n.BitType.multipleChoiceText,n.BitType.highlightText,n.BitType.trueFalse,n.BitType.trueFalse1,n.BitType.multipleResponse,n.BitType.multipleResponse1])?function(e,t,i,o){if(!0===i)o.__isDefaultExample=!0,o.example=void 0;else{const n=i?r.Breakscape.unbreakscape(i,{textFormat:a.TextFormat.bitmarkText,textLocation:s.TextLocation.tag}):void 0;l.BooleanUtils.isBooleanString(n)?o.example=l.BooleanUtils.toBoolean(n):(o.__isDefaultExample=!0,o.example=void 0,e.addWarning("Only 'true' / 'false' / default are allowed here, using default",t))}}(e,t,i,u):o.Config.isOfBitType(d,[n.BitType.clozeAndMultipleChoiceText,n.BitType.multipleChoice,n.BitType.multipleChoice1])?(u.__isDefaultExample=!0,u.example=void 0,!0!==i&&e.addWarning("At this level, only default [@example] is allowed, using default",t)):c(e,t,i,u)}(e,i,d,u):o.Config.isOfBitType(y,n.BitType.mark)?function(e,t,i,r){r.__isDefaultExample=!0,r.example=void 0,!0!==i&&e.addWarning("Only default [@example] is allowed, using default",t)}(e,i,d,u):c(e,i,d,u)};const r=i(7735),o=i(2028),n=i(5854),a=i(385),s=i(6877),l=i(4078),p=new(i(777).TextParser);function c(e,t,i,r){const{textFormat:o}=e;!0===i||"true"===i?(r.__isDefaultExample=!0,r.example=void 0):r.example=i?p.toAst(i,{textFormat:o,textLocation:s.TextLocation.tag}):void 0}},4266:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkPegParserValidator=void 0;const r=i(2028),o=i(5512),n=i(3778),a=i(166),s=i(6149),l=i(9917),p=i(3029),c=["----","\n==\n","\n---\n"],u=["==\n","--\n"],y=["\n==","\n--"];const g=new class{validateBitTags(e,t){if(!t)return[];const{bitConfig:i,bitType:o,resourceType:n}=e,{tags:a,cardSet:s}=i,l=r.Config.getBitResourcesConfig(o,n),c=Object.assign(Object.assign({},a),l.tags);return this.validateTagChainsRecursive(e,p.BitContentLevel.Bit,o,t,c,s).validated}checkBody(e,t,i,r,o){if(!o)return o;const{bitConfig:n}=e,{bodyAllowed:a}=n;return o.length>0&&!a&&e.addWarning(`Bit '${i}' should not have a body.`),o}checkBodyPart(e,t,i){return i?(this.checkBodyForCommonPotentialMistakes(e,t,i),i):i}checkFooter(e,t,i){if(!i)return i;const{bitConfig:r,bitType:o}=e,{footerAllowed:n}=r;return this.checkBodyForCommonPotentialMistakes(e,t,i),n||e.addWarning(`Bit '${o}' should not have a footer.`),i}checkCardBody(e,t,i,r,o,n,a){if(!r||!r.body)return r;const{bitConfig:s}=e;if(!s.cardSet)return r;const l=this.getVariantConfig(s.cardSet.variants,n,a);if(!l)return r;const{bodyAllowed:p}=l;return r.bodyString.length>0&&!p&&e.addWarning(`Bit '${i}' should not have a card body at card:${o+1}, side:${n+1}, variant:${a+1}.`),r}validateTagChainsRecursive(e,t,i,r,c,u,y){var g;if(!r)return{validated:[]};let d;const T=[...r],f=this.convertTagsToTypeKeyMap(e,t,i,c),m=(e,t,i)=>{f.set(e,{maxCount:t,minCount:i,_type:e,_tag:e,_seenCount:0})};var h,b,B;h=a.PropertyTag.internalComment,b=n.Count.infinity,B=0,f.set(`${p.TypeKey.Property}:${h}`,{maxCount:b,minCount:B,_type:o.BitTagType.property,_tag:l.Tag.tag_property,_seenCount:0}),t===p.BitContentLevel.Bit?(u&&m(p.TypeKey.CardSet,1,0),m(p.TypeKey.TextFormat,1,0),m(p.TypeKey.BodyText,n.Count.infinity,0),m(p.TypeKey.BodyTextPlain,n.Count.infinity,0),m(p.TypeKey.PlainTextDivider,n.Count.infinity,0),m(p.TypeKey.FooterDivider,n.Count.infinity,0)):t===p.BitContentLevel.Card&&m(p.TypeKey.CardText,n.Count.infinity,0);for(let r=0;r<T.length;r++){const o=T[r];if(!o)continue;const{type:n,key:a}=o;let l=p.TypeKey.fromValue(n);if(!l)continue;let c=l;l!==p.TypeKey.Property&&l!==p.TypeKey.Resource||(c=`${l}:${a}`);let m=f.get(c);if(!m&&l===p.TypeKey.Property&&(a===s.ResourceTag.backgroundWallpaper||a===s.ResourceTag.imagePlaceholder)&&(m=f.get(`${p.TypeKey.Resource}:${a}`),m)){l=p.TypeKey.Resource,o.type=p.TypeKey.Resource;const t=`Falling back to '[&${a}]' from '[@${a}]'. Replace '[@${a}]' with '[&${a}]' to avoid this warning.`;e.addWarning(t)}const{validated:h,warning:b}=this.validateSingleTag(e,t,i,o,l,m,u);l===p.TypeKey.Resource&&(y=p.TypeKey.Resource);let B=!0;if(!h)if(t===p.BitContentLevel.Chain&&y!==p.TypeKey.Resource){d=o;const e=T.slice(r+1);e.length>0&&(d.chain=e),T.splice(r),B=!1}else T.splice(r,1,null);if(b&&B&&e.addWarning(null!==(g=b.warning)&&void 0!==g?g:"",b.content,b.previousContent),t===p.BitContentLevel.Chain&&m&&m.chain&&h&&!h.chain){const e=T.slice(r+1);e.length>0&&(h.chain=e),T.splice(r+1)}if(h&&Array.isArray(h.chain)&&h.chain.length>0)if(m&&m.chain){const{validated:t,remaining:o}=this.validateTagChainsRecursive(e,p.BitContentLevel.Chain,i,h.chain,m.chain,void 0,h.type);t&&t.length>0?h.chain=t:h.chain=void 0,o&&T.splice(r+1,0,o)}else if(h.type!==p.TypeKey.Resource){const e=h.chain[0];h.chain.length>1&&(e.chain=h.chain.slice(1)),T.splice(r+1,0,e),h.chain=void 0}}for(const t of f.values()){const{minCount:i,_seenCount:r}=t;if(null!=i&&r<i){const r=`${this.getTagSignature(t)} is required at least ${i} time(s)`;e.addWarning(r)}}return{validated:T.filter((e=>null!=e)),remaining:d}}validateSingleTag(e,t,i,r,o,n,a){const{type:s,key:l}=r,c=n?this.getTagSignature(n):this.getUnknownTagSignature(s,l),u=" It will be ignored";let y,g,d="";if(n)switch(n._seenCount++,o){case p.TypeKey.Property:{const{content:o,warning:a}=this.validatePropertyTag(e,t,i,n,r);y=o,g=a;break}case p.TypeKey.Resource:{const{content:o,warning:a}=this.validateResourceTag(e,t,i,n,r);y=o,g=a;break}case p.TypeKey.CardSet:{const{content:t,warning:o}=this.validateCardSet(e,i,n,r,a);y=t,g=o;break}default:{const{content:o,warning:a}=this.validateStandardTag(e,t,i,n,r);y=o,g=a}}else switch(o){case p.TypeKey.Property:g={extraProperty:!0},t!==p.BitContentLevel.Chain&&(y=r);break;case p.TypeKey.Resource:g={excessResource:!0},y=r;break;default:g={invalid:!0}}if(g){const e=null==n?void 0:n._previous;g.invalid||g.excessResource?d=`${c} is not valid here (incorrectly chained?).${u}`:null!=g.tooMany?(d=`${c} is included more than ${g.tooMany} time(s).`,g.tooMany>0&&(d+=" The earlier ones will be ignored")):g.extraProperty?d=`${c} is an unknown property. It can be excluded from the output using the 'excludeUnknownProperties' flag`:g.unexpectedCardSet?d=`${c} is not expected here.${u}`:g.unexpectedCardSideVariant&&(d=`${c} has a card / side / variant that is not expected here.${u}`),g.warning=d,g.content=y,g.previousContent=e}return n&&(n._previous=r),{validated:y,warning:g}}validateStandardTag(e,t,i,r,o){const a=null==r.maxCount?1:r.maxCount;return a!==n.Count.infinity&&r._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validatePropertyTag(e,t,i,r,o){const a=null==r.maxCount?1:r.maxCount;return a!==n.Count.infinity&&r._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validateResourceTag(e,t,i,r,o){const a=null==r.maxCount?1:r.maxCount;return a!==n.Count.infinity&&r._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validateCardSet(e,t,i,r,o){if(!o||!o.variants||0===o.variants.length)return{warning:{unexpectedCardSet:!0}};const{value:n}=r,a=n;let s,l=0,c=0;for(const i of a.cards){l=0;for(const r of i.sides){c=0;for(const i of r.variants){const n=i.content;let a;const u=this.getVariantConfig(o.variants,l,c);if(u){a=this.validateTagChainsRecursive(e,p.BitContentLevel.Card,t,n,u.tags).validated}else s={unexpectedCardSideVariant:!0};a&&a.length>0?r.variants[c]={parser:i.parser,content:a}:r.variants[c]={parser:i.parser,content:[]},c++}l++}}return{content:r,warning:s}}checkBodyForCommonPotentialMistakes(e,t,i){if(!i)return;const{bitType:r}=e;for(const t of c)i.includes(t)&&e.addWarning(`Bit '${r}' might contain a mistake: ${t}`);for(const t of u)i.startsWith(t)&&e.addWarning(`Bit '${r}' might contain a mistake: ${t}`);for(const t of y)i.endsWith(t)&&e.addWarning(`Bit '${r}' might contain a mistake: ${t}`)}convertTagsToTypeKeyMap(e,t,i,r){const n=new Map;for(const e of Object.values(r)){const t={minCount:e.minCount,maxCount:e.maxCount,isTag:e.type===o.BitTagType.tag,isProperty:e.type===o.BitTagType.property,isResource:e.type===o.BitTagType.resource,chain:e.chain,_configKey:e.configKey,_type:e.type,_tag:e.tag,_seenCount:0,_previous:void 0};if(t.isProperty)n.set(`${p.TypeKey.Property}:${e.tag}`,t);else if(t.isResource)n.set(`${p.TypeKey.Resource}:${e.tag}`,t);else{const i=p.TypeKey.fromValue(e.tag);i&&n.set(i,t)}}return n}getVariantConfig(e,t,i){let r;if(0===e.length)return;const o=e[Math.min(t,e.length-1)],a=o.length-1;if(i>a){if(r=o[a],r.repeatCount!==n.Count.infinity)return}else r=o[i];return r}getTagSignature(e){switch(e._type){case o.BitTagType.tag:return`[${e._tag}]`;case o.BitTagType.property:return`[@${e._tag}]`;case o.BitTagType.resource:return`[&${e._tag}]`;default:return`'${e._type}' tag '${e._tag}'`}}getUnknownTagSignature(e,t){switch(e){case p.TypeKey.Property:return`[@${t}]`;case p.TypeKey.Resource:return`[&${t}]`;default:return t?`'${e}' tag '${t}'`:`'${e}' tag`}}};t.BitmarkPegParserValidator=g},4382:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FooterContentProcessor=void 0;const r=i(7735),o=i(385),n=i(6877),a=i(9681),s=i(777),l=i(4266),p=i(6128),c=new s.TextParser;const u=new class{process(e,t,i,s,u,y){const{textFormat:g}=e;let d;u=u.trimStart(),y=y.trimEnd();const T=!!u.trim(),f=!!y.trim();let m=0;if(T&&f&&(m=a.StringUtils.countOccurrencesAtEnd(u,"\n")+a.StringUtils.countOccurrencesAtStart(y,"\n")),u||y){const i=g===o.TextFormat.bitmarkText;u&&(u=l.BitmarkPegParserValidator.checkFooter(e,t,u));const a=i?c.toAst(u,{textFormat:g,textLocation:n.TextLocation.body}):r.Breakscape.unbreakscape(u,{textFormat:o.TextFormat.plainText,textLocation:n.TextLocation.body}),s=r.Breakscape.unbreakscape(y,{textFormat:o.TextFormat.plainText,textLocation:n.TextLocation.body});d=p.ContentProcessorUtils.concatenatePlainTextWithAstTexts(a,m,s)}return d?{footer:d}:void 0}};t.FooterContentProcessor=u},4402:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.defaultTagContentProcessor=function(e,t,i,p,c){const{type:u,value:y}=p,{textFormat:g}=e,d=new s.TextParser,T=a.StringUtils.trimmedString(y);switch(u){case l.TypeKey.Instruction:c.instruction=d.toAst(T,{textFormat:g,textLocation:n.TextLocation.tag}),c.__instructionString=r.Breakscape.unbreakscape(T,{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag});break;case l.TypeKey.Hint:c.hint=d.toAst(T,{textFormat:g,textLocation:n.TextLocation.tag}),c.__hintString=r.Breakscape.unbreakscape(T,{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag});break;case l.TypeKey.Anchor:c.anchor=r.Breakscape.unbreakscape(T,{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag});break;case l.TypeKey.Reference:c.reference=r.Breakscape.unbreakscape(T,{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag});break;case l.TypeKey.SampleSolution:c.sampleSolution=r.Breakscape.unbreakscape(T,{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag}),c.__sampleSolutionAst=d.toAst(T,{textFormat:g,textLocation:n.TextLocation.tag}),e.addWarning("[$...] tag is deprecated, use [@sampleSolution:...] instead",p)}};const r=i(7735),o=i(385),n=i(6877),a=i(9681),s=i(777),l=i(3029)},4410:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BodyBitType=void 0;const r=(0,i(4718).superenum)({text:"text",gap:"gap",mark:"mark",select:"select",highlight:"highlight"});t.BodyBitType=r},4445:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigHydrator=void 0;const r=i(5814),o=i(9371),n=i(9788),a=i(1519),s=i(9600),l=i(5591),p=i(7112),c=i(9888),u=i(5051),y=i(7797),g=i(5512),d=i(5554),T=i(5837),f=i(9916),m=i(168),h=i(9248);const b=new class{hydrateTagsConfig(e){var t;const i={tags:{}};for(const r of e){let e;switch(r.type){case g.BitTagType.tag:e=this.hydrateTagConfig(r);break;case g.BitTagType.property:e=this.hydratePropertyTagConfig(r);break;case g.BitTagType.resource:e=this.hydrateResourceTagConfig(r);break;case g.BitTagType.group:e=this.hydrateTagGroupConfig(r)}e&&(i.tags=Object.assign(Object.assign({},i.tags),e.tags),i.info=Object.assign(null!==(t=i.info)&&void 0!==t?t:{},e.info))}return i}hydrateCardSetConfig(e){if(!e)return;const t=d.CARDS[e];if(!t)throw new Error(`No config found for card set config key '${e}'`);const i=[];for(const e of t.variants){const t=[];for(const i of e){const e=this.hydrateCardVariantConfig(i);t.push(e)}i.push(t)}return new r.CardSetConfig(e,i)}hydrateTagConfig(e){const{configKey:t,maxCount:i,minCount:r,chain:o}=e,a=y.TagConfigKey.fromKey(t)||l.ConfigKey._unknown,s=h.TAGS[a];if(!s)throw new Error(`No config found for tag config key '${t}'`);const{tag:p,deprecated:c}=s;let u;o&&(u=this.hydrateTagsConfig(o).tags);const g=new n.MarkupTagConfig(a,p,null!=i?i:1,null!=r?r:0,u,c);return{tags:{[a]:g}}}hydratePropertyTagConfig(e){const{configKey:t,maxCount:i,minCount:r,chain:o}=e,n=c.PropertyConfigKey.fromKey(t)||l.ConfigKey._unknown,s=f.PROPERTIES[n];if(!s)throw new Error(`No config found for property config key '${t}'`);const{tag:p,deprecated:u,single:y,format:g,defaultValue:d,jsonKey:T,astKey:m}=s;let h;o&&(h=this.hydrateTagsConfig(o).tags);const b=new a.PropertyTagConfig(n,p,null!=i?i:1,null!=r?r:0,h,T,m,y,g,d,u);return{tags:{[n]:b}}}hydrateResourceTagConfig(e){const{configKey:t,maxCount:i,minCount:r,chain:o}=e,n=u.ResourceConfigKey.fromKey(t)||l.ConfigKey._unknown,a=m.RESOURCES[n];if(!a)throw new Error(`No config found for resource config key '${t}'`);const{tag:p,deprecated:c,jsonKey:y}=a;let g;o&&(g=this.hydrateTagsConfig(o).tags);const d=new s.ResourceTagConfig(n,p,null!=i?i:1,null!=r?r:0,g,y,c);return{tags:{[n]:d}}}hydrateTagGroupConfig(e){var t,i;const{configKey:r}=e,o=p.GroupConfigKey.fromKey(r)||l.ConfigKey._unknown,n=T.GROUPS[o];if(!n)throw new Error(`No config found for group config key '${r}'`);const{tags:a}=n,s=this.hydrateTagsConfig(a).tags,c=Object.values(s);if(c.length>0){const r=c[0],o=r;o.maxCount=null!==(t=e.maxCount)&&void 0!==t?t:r.maxCount,o.minCount=null!==(i=e.minCount)&&void 0!==i?i:r.minCount}return{tags:s,info:{comboResourceType:n.comboResourceType}}}hydrateCardVariantConfig(e){const{tags:t,bodyAllowed:i,bodyRequired:r,repeatCount:n}=e,a=this.hydrateTagsConfig(t);return new o.CardVariantConfig(a.tags,i,r,n)}};t.ConfigHydrator=b},4470:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseBuilder=void 0;const r=i(7735),o=i(2028),n=i(431),a=i(9727),s=i(6877),l=i(777),p=i(6989),c=i(4078),u=i(8025),y=i(9681);t.BaseBuilder=class{constructor(){this.textParser=new l.TextParser,this.textGenerator=new n.TextGenerator}toExample(e,t,i){if(null!=t){let e;return e=c.BooleanUtils.isBoolean(i)?c.BooleanUtils.toBoolean(t):t,{isExample:!0,example:e,__defaultExample:null!=i?i:null}}return e?{isExample:!0,example:null!=i?i:null,__defaultExample:null!=i?i:null}:{isExample:!1,example:null,__defaultExample:null!=i?i:null}}toAstProperty(e,t){if(null==t)return;const i=o.Config.getRawPropertiesConfig()[e],r=e=>{if(null!=e){switch(i.format){case a.PropertyFormat.plainText:return null!=u.NumberUtils.asNumber(e)&&(e=`${e}`),y.StringUtils.isString(e)?y.StringUtils.trimmedString(e):void 0;case a.PropertyFormat.number:return u.NumberUtils.asNumber(e);case a.PropertyFormat.boolean:return c.BooleanUtils.toBoolean(e,!0);case a.PropertyFormat.invertedBoolean:return!c.BooleanUtils.toBoolean(e,!0)}return e}};if(Array.isArray(t)){const e=t;for(let t=0,i=e.length;t<i;t++)e[t]=r(e[t])}else t=r(t);return p.ArrayUtils.asArray(t)}getEmptyTextAst(e){return this.handleJsonText(e,s.TextLocation.tag," ")}handleJsonText(e,t,i){let o;const{textFormat:n}=e;if(null==i)o=[];else if(this.textParser.isAst(i))o=i;else{if(Array.isArray(i)){const e=[];for(let o=0,a=i.length;o<a;o++){const a=i[o];this.textParser.isAst(a)?e[o]=a:y.StringUtils.isString(a)?(e[o]=this.textParser.toAst(r.Breakscape.breakscape(a,{textFormat:n,textLocation:t}),{textFormat:n,textLocation:t}),e[o].__tag="text"):e[o]=[]}return e}o=y.StringUtils.isString(i)?this.textParser.toAst(r.Breakscape.breakscape(i,{textFormat:n,textLocation:t,v2:!0}),{textFormat:n,textLocation:t}):[]}return o.__tag="text",o}}},4475:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.technicalTermChainContentProcessor=function(e,t,i,l,p){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("technicalTerm content",l);const c=e.bitContentProcessor(s.BitContentLevel.Chain,i,l.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("technicalTerm TAGS",c);const{lang:u}=c,y={technicalTerm:r.Breakscape.unbreakscape(a.StringUtils.trimmedString(l.value),{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag}),lang:u};p.technicalTerm=y};const r=i(7735),o=i(385),n=i(6877),a=i(9681),s=i(3029)},4564:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValidator=void 0;const r=i(6149),o=i(9681);const n=new class{validateBit(e){if(!e)return e;return e}validateCardBit(e){if(!e)return e;return e}validateResource(e){if(!e)return;let t=e,i=!1;switch(e.type){case r.ResourceTag.image:i=!!e.image.src;break;case r.ResourceTag.imageLink:i=!!e.imageLink.url;break;case r.ResourceTag.audio:i=!!e.audio.src;break;case r.ResourceTag.audioEmbed:i=!!e.audioEmbed.src;break;case r.ResourceTag.audioLink:i=!!e.audioLink.url;break;case r.ResourceTag.video:i=!!e.video.src;break;case r.ResourceTag.videoEmbed:i=!!e.videoEmbed.url;break;case r.ResourceTag.videoLink:i=!!e.videoLink.url;break;case r.ResourceTag.stillImageFilm:i=!!e.image.src&&!!e.audio.src;break;case r.ResourceTag.stillImageFilmEmbed:i=!!e.stillImageFilmEmbed.url;break;case r.ResourceTag.stillImageFilmLink:i=!!e.stillImageFilmLink.url;break;case r.ResourceTag.article:i=!!e.article.body;break;case r.ResourceTag.document:i=!!e.document.url;break;case r.ResourceTag.documentEmbed:i=!!e.documentEmbed.url;break;case r.ResourceTag.documentLink:i=!!e.documentLink.url;break;case r.ResourceTag.documentDownload:i=!!e.documentDownload.url;break;case r.ResourceTag.appLink:i=!!e.appLink.url;break;case r.ResourceTag.websiteLink:i=!!e.websiteLink.url;break;default:i=!1}return i||e.type&&(t={type:e.type}),t}isRequired(e,t){if(!e)throw new Error(`${t} is required but is not set`)}isOneOfRequired(e,t){if(Array.isArray(e))for(const t of e)if(t)return;throw new Error(`One of '${t.join(", ")}' is required but none is set`)}isString(e,t){if(!o.StringUtils.isString(e))throw new Error(`${t} is required to be a string`)}isNonEmptyString(e,t){if(!o.StringUtils.isString(e)||""===e)throw new Error(`${t} is required to be a non-empty string`)}isStringOrBoolean(e,t){if(!o.StringUtils.isString(e)&&!0!==e&&!1!==e)throw new Error(`${t} is required to be a string or a boolean`)}isNonEmptyStringOrBoolean(e,t){if((!o.StringUtils.isString(e)||""===e)&&!0!==e&&!1!==e)throw new Error(`${t} is required to be a non-empty string or a boolean`)}isArray(e,t){if(!Array.isArray(e))throw new Error(`${t} is required to be a array`)}isNonEmptyArray(e,t){if(!(Array.isArray(e)&&e.length>0))throw new Error(`${t} is required to be a non-empty array`)}isNumber(e,t){if(!Number.isFinite(e))throw new Error(`${t} is required to be a number`)}isBoolean(e,t){if(!0!==e&&!1!==e)throw new Error(`${t} is required to be a boolean`)}isStringOrNumberOrBooleanOrNullOrUndefined(e,t){if(!o.StringUtils.isString(e)&&!Number.isFinite(e)&&!0!==e&&!1!==e&&null!=e)throw new Error(`${t} is required to be a string or a number or a boolean or null or undefined`)}};t.NodeValidator=n},4718:(e,t,i)=>{function r(e,t){var i;const r=Object.freeze,o=Object.defineProperty,n=Object.assign,a={enumerable:!1},s=new Map,l=new Map,p=new Map,c=new Map,u=new Map,y=(null!==(i=null==t?void 0:t.iterationKeys)&&void 0!==i?i:Object.keys(e)).map((e=>`${e}`));for(const[t,i]of Object.entries(e))s.set(t,i),p.set(t.toLowerCase(),i);for(const[e,t]of s){const i="string"==typeof t?t.toLowerCase():t;l.set(t,e),c.set(i,e)}const g=y.map((e=>s.get(e))),d=y.map((e=>[e,s.get(e)]));return(t=>{let i=e;function T(e,t){return(null==t?void 0:t.ignoreCase)&&"string"==typeof e?s.get(c.get(e.toLowerCase())):l.has(e)?e:void 0}Object.isExtensible(e)||(i=n({},e)),o(i,"fromKey",n({value:function(e,t){return(null==t?void 0:t.ignoreCase)&&"string"==typeof e?p.get(e.toLowerCase()):s.get(`${e}`)}},a)),o(i,"fromValue",n({value:T},a)),o(i,"keyFromValue",n({value:function(e,t){return(null==t?void 0:t.ignoreCase)&&"string"==typeof e?c.get(e.toLowerCase()):l.get(e)}},a)),o(i,"setMetadata",n({value:function(e,t,i){const r=T(e);null!=r&&u.set(r,t)}},a)),o(i,"getMetadata",n({value:function(e,t){return u.get(e)}},a)),o(i,Symbol.iterator,n({value:function(){let e=0;return{next:()=>e<y.length?{value:s.get(`${y[e++]}`),done:!1}:{done:!0}}}},a)),o(i,"values",n({value:()=>g},a)),o(i,"keys",n({value:()=>y},a)),o(i,"entries",n({value:()=>d},a));let f=i;return(null==t?void 0:t.noFreeze)||(f=r(i),r(y),r(g),r(d)),f})(t)}i.r(t),i.d(t,{superenum:()=>o});const o=r;o.fromObject=r,o.fromArray=function(e,t){Array.isArray(e)||(e=[]);const i=e.reduce(((e,t)=>(e[`${t}`]=t,e)),{});return(!t||t&&!t.iterationKeys)&&((t=Object.assign({},t)).iterationKeys=e),r(i,t)}},4953:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.servingsChainContentProcessor=function(e,t,i,n,a){var s;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("servings content",n);const l=e.bitContentProcessor(o.BitContentLevel.Chain,i,n.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("servings TAGS",l);const{unit:p,unitAbbr:c,decimalPlaces:u,disableCalculation:y,__hintString:g}=l,d={servings:null!==(s=r.NumberUtils.asNumber(n.value))&&void 0!==s?s:1,unit:p,unitAbbr:c,decimalPlaces:null!=u?u:1,disableCalculation:y,hint:g};a.servings=d};const r=i(8025),o=i(3029)},5005:(e,t,i)=>{const{VOID:r,PRIMITIVE:o,ARRAY:n,OBJECT:a,DATE:s,REGEXP:l,MAP:p,SET:c,ERROR:u,BIGINT:y}=i(1731),g="object"==typeof self?self:globalThis;t.deserialize=e=>((e,t)=>{const i=(t,i)=>(e.set(i,t),t),d=T=>{if(e.has(T))return e.get(T);const[f,m]=t[T];switch(f){case o:case r:return i(m,T);case n:{const e=i([],T);for(const t of m)e.push(d(t));return e}case a:{const e=i({},T);for(const[t,i]of m)e[d(t)]=d(i);return e}case s:return i(new Date(m),T);case l:{const{source:e,flags:t}=m;return i(new RegExp(e,t),T)}case p:{const e=i(new Map,T);for(const[t,i]of m)e.set(d(t),d(i));return e}case c:{const e=i(new Set,T);for(const t of m)e.add(d(t));return e}case u:{const{name:e,message:t}=m;return i(new g[e](t),T)}case y:return i(BigInt(m),T);case"BigInt":return i(Object(BigInt(m)),T);case"ArrayBuffer":return i(new Uint8Array(m).buffer,m);case"DataView":{const{buffer:e}=new Uint8Array(m);return i(new DataView(e),m)}}return i(new g[f](m),T)};return d})(new Map,e)(0)},5033:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BodyContentProcessor=void 0;const r=i(7735),o=i(4410),n=i(385),a=i(6877),s=i(9681),l=i(777),p=i(4266),c=i(6128),u=new l.TextParser;const y=new class{process(e,t,i,l,y,g,d,T){const f=[];let m,h;const b=d.length>0?this.trimBodyParts(d):void 0,B=T?b:p.BitmarkPegParserValidator.checkBody(e,t,i,l,b);if(l===n.TextFormat.json&&B){m=B.reduce(((e,t)=>{var i;if(t.type===o.BodyBitType.text&&t.data){return e+(null!==(i=t.data.bodyText)&&void 0!==i?i:"")}return e}),"");try{m=JSON.parse(m)}catch(t){m=null,e.addError("Body JSON is invalid.")}}else{let e="",t="",i="",p=0;const y=e=>`[!${e}]`;if(B)for(let n=0;n<B.length;n++){const a=B[n];if(a.type===o.BodyBitType.text){const o=a,n=o.data.bodyText;o.data.isPlain?t=r.Breakscape.concatenate(t,n):e=r.Breakscape.concatenate(e,n),i=r.Breakscape.concatenate(i,n)}else{const t=y(p);e=r.Breakscape.concatenate(e,t),f.push(a),p++}}const g=l===n.TextFormat.bitmarkText?u.toAst(e,{textFormat:l,textLocation:a.TextLocation.body}):r.Breakscape.unbreakscape(e,{textFormat:n.TextFormat.plainText,textLocation:a.TextLocation.body}),d=r.Breakscape.unbreakscape(t,{textFormat:n.TextFormat.plainText,textLocation:a.TextLocation.body}),T=s.StringUtils.countOccurrencesAtEnd(e,"\n")+s.StringUtils.countOccurrencesAtStart(t,"\n");m=c.ContentProcessorUtils.concatenatePlainTextWithAstTexts(g,T,d),h=r.Breakscape.unbreakscape(i,{textFormat:l,textLocation:a.TextLocation.body}).trim();const b=Array.isArray(m)?m:void 0;if(b&&B){p=0;for(let e=0;e<B.length;e++){const t=B[e];if(t.type===o.BodyBitType.text)continue;const i=t;let r;switch(t.type){case o.BodyBitType.gap:case o.BodyBitType.mark:case o.BodyBitType.select:case o.BodyBitType.highlight:r=i}r&&this.replacePlaceholderWithBodyBit(b,r,p),p++}}}return{body:m,bodyBits:f.length>0?f:void 0,bodyString:h}}buildBodyText(e,t){return{type:o.BodyBitType.text,data:{bodyText:e,isPlain:t}}}replacePlaceholderWithBodyBit(e,t,i){const r=(e,o,n)=>{if(Array.isArray(e))for(let t=0;t<e.length;t++){const i=e[t];if(r(i,e,t))return!0}else{if("bit"===e.type&&e.index===i)return o[n]=t,!0;if(e.content){if(r(e.content,e,"content"))return!0}}return!1};r(e,null,null)}trimBodyParts(e){let t=!1,i=e.reduce(((e,i)=>{const r=i;if(t||r.type!==o.BodyBitType.text)t=!0,e.push(i);else{const i=r.data.bodyText.trimStart();i&&(t=!0,r.data.bodyText=i,e.push(r))}return e}),[]);return t=!1,i=i.reduceRight(((e,i)=>{const r=i;if(t||r.type!==o.BodyBitType.text)t=!0,e.unshift(i);else{const i=r.data.bodyText.trimEnd();i&&(t=!0,r.data.bodyText=i,e.unshift(r))}return e}),[]),i}};t.BodyContentProcessor=y},5051:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resourceConfigKeys=t.ResourceConfigKey=void 0;const r=i(4718),o={image:"image",imagePortrait:"imagePortrait",imageLandscape:"imageLandscape",imageEmbed:"imageEmbed",imageLink:"imageLink",audio:"audio",audioEmbed:"audioEmbed",audioLink:"audioLink",video:"video",videoEmbed:"videoEmbed",videoLink:"videoLink",stillImageFilmEmbed:"stillImageFilmEmbed",stillImageFilmLink:"stillImageFilmLink",article:"article",articleEmbed:"articleEmbed",articleLink:"articleLink",document:"document",documentEmbed:"documentEmbed",documentLink:"documentLink",documentDownload:"documentDownload",appLink:"appLink",websiteLink:"websiteLink",icon:"icon",backgroundWallpaper:"backgroundWallpaper",imagePlaceholder:"imagePlaceholder"};t.resourceConfigKeys=o;const n=(0,r.superenum)(o);t.ResourceConfigKey=n},5057:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StartRules=void 0,t.SyntaxError=a,t.parse=function e(t,i){i=void 0!==i?i:{};var s,l={},p=i.grammarSource,c={bitmark:ni,bit:function(){var e,t,i,r,o;e=$t,t=[],i=Si();for(;i!==l;)t.push(i),i=Si();if((i=li())!==l){for(r=[],o=Si();o!==l;)r.push(o),o=Si();Wt=e,e=Xe(i)}else $t=e,e=l;return e},cardContent:function(){var e,t,i;e=$t,t=[],(i=yi())===l&&(i=Ci());for(;i!==l;)t.push(i),(i=yi())===l&&(i=Ci());return Wt=e,t=xt(t),e=t}},u=ni,y="[.",g="]",d="[",T=":",f="&",m="$$$$",h="====",b="text",B="~~~~",v="footer",C="--",x="++",P="===",k="==",K="[@id",w="#",_="[▼",A="[►",S="[@",L="[%",I="[!",F="[?",N="[+",O="[-",E="[$",R="[_",V="[=",j="[&",D="^]",G="id:",M=".",U="\n",J="\r\n",$=/^[^\]]/,W=/^[^:\]]/,z=/^[^&:\]]/,q=/^[ \t]/,H=/^[^\n\r\u2028\u2029]/,Y=/^[\r\u2028-\u2029]/,X=/^[ \t\n\r\u2028\u2029]/,Q=Qt("[.",!1),Z=Zt(["]"],!0,!1),ee=Qt("]",!1),te=Qt("[",!1),ie=Qt(":",!1),re=Qt("&",!1),oe={type:"any"},ne=Qt("$$$$",!1),ae=Qt("====",!1),se=Qt("text",!1),le=Qt("~~~~",!1),pe=Qt("footer",!1),ce=Qt("--",!1),ue=Qt("++",!1),ye=Qt("===",!1),ge=Qt("==",!1),de=Qt("[@id",!1),Te=Qt("#",!1),fe=Qt("[▼",!1),me=Qt("[►",!1),he=Qt("[@",!1),be=Qt("[%",!1),Be=Qt("[!",!1),ve=Qt("[?",!1),Ce=Qt("[+",!1),xe=Qt("[-",!1),Pe=Qt("[$",!1),ke=Qt("[_",!1),Ke=Qt("[=",!1),we=Qt("[&",!1),_e=Qt("^]",!1),Ae=Qt("id:",!1),Se=Zt([":","]"],!0,!1),Le=Qt(".",!1),Ie=Zt(["&",":","]"],!0,!1),Fe=(ei("Empty"),Zt([" ","\t"],!1,!1)),Ne=ei("Anything"),Oe=ei("Character"),Ee=Zt(["\n","\r","\u2028","\u2029"],!0,!1),Re=ei("Line"),Ve=(ei("whitespace in line"),ei("Blank Line")),je=ei("Line Terminator"),De=Qt("\n",!1),Ge=Qt("\r\n",!1),Me=Zt(["\r",["\u2028","\u2029"]],!1,!1),Ue=ei("Whitespace, then Line Terminator"),Je=ei("whitespace"),$e=Zt([" ","\t","\n","\r","\u2028","\u2029"],!1,!1),We=function(e,t){return Vi.buildBits([e,...t])},ze=function(e){return Ri.handleRawBit(e)},qe=function(e){return e},He=function(e){return Ri.handleRawBit(e)},Ye=function(e){return e},Xe=function(e){return e},Qe=function(e,t){return Vi.buildBit(e,t)},Ze=function(e){return Vi.invalidBit(e)},et=function(e,t,i){return Vi.buildBitHeader(t,e,i)},tt=function(e,t){return Vi.buildTextAndResourceType(e,t)},it=function(e){return Ri.handleTextFormat(e)},rt=function(e){return Ri.handleResourceType(e)},ot=function(e){return Ri.handleBitContent(e)},nt=function(e){return Ri.handleTagChain(e)},at=function(e){return e},st=function(e){return Ri.handleBitTag(e)},lt=function(e){return{type:r.TypeKey.BodyChar,value:e}},pt=function(e){return Ri.handlePlainTextDivider(e)},ct=function(e){return Ri.handleFooterDivider(e)},ut=function(e){return Ri.handleCardSet(e[1].flat())},yt=function(){Ri.handleCardSetStart()},gt=function(){Ri.handleCardSetEnd()},dt=function(e){return Ri.handleCards(e)},Tt=function(e){return Ri.handleCardLineOrDivider(e,2)},ft=function(e){return Ri.handleCardLine(e)},mt=function(e){return Ri.handleCardSet(e[1].flat())},ht=function(){Ri.handleCardSetStart()},bt=function(){Ri.handleCardSetEnd()},Bt=function(e){return Ri.handleCards(e)},vt=function(e){return Ri.handleCardLineOrDivider(e,1)},Ct=function(e){return Ri.handleCardLine(e)},xt=function(e){return Ri.handleCardContent(e)},Pt=function(e){return{type:r.TypeKey.CardChar,value:e}},kt=function(e){return Ri.handlePropertyTag("id",e)},Kt=function(e,t){return Ri.handleTag(r.TypeKey.Title,{level:e,title:t})},wt=function(e){return Ri.handleTag(r.TypeKey.Anchor,e)},_t=function(e){return Ri.handleTag(r.TypeKey.Reference,e)},At=function(e,t){return Ri.handlePropertyTag(e,t)},St=function(e){return Ri.handleTag(r.TypeKey.ItemLead,e)},Lt=function(e){return Ri.handleTag(r.TypeKey.Instruction,e)},It=function(e){return Ri.handleTag(r.TypeKey.Hint,e)},Ft=function(e){return Ri.handleTag(r.TypeKey.True,e)},Nt=function(e){return Ri.handleTag(r.TypeKey.False,e)},Ot=function(e){return Ri.handleTag(r.TypeKey.SampleSolution,e)},Et=function(e){return Ri.handleTag(r.TypeKey.Gap,e)},Rt=function(e){return Ri.handleTag(r.TypeKey.Mark,e)},Vt=function(e,t){return Ri.handleResourceTag(e,t)},jt=function(e){return e},Dt=function(e){return e?e.trim():""},Gt=function(e){return e.length},Mt=function(e){return e?e.trim():null},Ut=function(e){return e?e.trim():""},Jt=function(){return!0},$t=0|i.peg$currPos,Wt=$t,zt=[{line:1,column:1}],qt=$t,Ht=i.peg$maxFailExpected||[],Yt=0|i.peg$silentFails;if(i.startRule){if(!(i.startRule in c))throw new Error("Can't start parsing from rule \""+i.startRule+'".');u=c[i.startRule]}function Xt(){return t.substring(Wt,$t)}function Qt(e,t){return{type:"literal",text:e,ignoreCase:t}}function Zt(e,t,i){return{type:"class",parts:e,inverted:t,ignoreCase:i}}function ei(e){return{type:"other",description:e}}function ti(e){var i,r=zt[e];if(r)return r;if(e>=zt.length)i=zt.length-1;else for(i=e;!zt[--i];);for(r={line:(r=zt[i]).line,column:r.column};i<e;)10===t.charCodeAt(i)?(r.line++,r.column=1):r.column++,i++;return zt[e]=r,r}function ii(e,t,i){var r=ti(e),o=ti(t),n={source:p,start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:o.line,column:o.column}};return i&&p&&"function"==typeof p.offset&&(n.start=p.offset(n.start),n.end=p.offset(n.end)),n}function ri(e){$t<qt||($t>qt&&(qt=$t,Ht=[]),Ht.push(e))}function oi(e,t,i){return new a(a.buildMessage(e,t),e,t,i)}function ni(){return function(){var e,i,r,o;e=$t,i=[],r=Fi();for(;r!==l;)i.push(r),r=Fi();return r=function(){var e,i,r,o;e=$t,i=$t,r=[],o=si();for(;o!==l;)r.push(o),o=si();return i=t.substring(i,$t),Wt=e,i=ze(i),e=i,e}(),o=function(){var e,t;e=[],t=ai();for(;t!==l;)e.push(t),t=ai();return e}(),Wt=e,e=We(r,o),e}()}function ai(){var e,i,r,o;for(e=$t,i=[],r=Si();r!==l;)i.push(r),r=Si();return(r=Li())===l&&(r=null),o=function(){var e,i,r,o,n,a;if(e=$t,i=$t,r=$t,o=function(){var e,i,r,o;e=$t,t.substr($t,2)===y?(i=y,$t+=2):(i=l,0===Yt&&ri(Q));if(i!==l){for(r=[],o=t.charAt($t),$.test(o)?$t++:(o=l,0===Yt&&ri(Z));o!==l;)r.push(o),o=t.charAt($t),$.test(o)?$t++:(o=l,0===Yt&&ri(Z));93===t.charCodeAt($t)?(o=g,$t++):(o=l,0===Yt&&ri(ee)),o!==l?(Wt=e,e=Ye(i)):($t=e,e=l)}else $t=e,e=l;return e}(),o!==l){for(n=[],a=si();a!==l;)n.push(a),a=si();r=o=[o,n]}else $t=r,r=l;i=r!==l?t.substring(i,$t):r;i!==l&&(Wt=e,i=He(i));return e=i,e}(),o!==l?(Wt=e,e=qe(o)):($t=e,e=l),e}function si(){var e,t,i,r;if(e=$t,(t=Li())!==l?(i=$t,Yt++,r=pi(),Yt--,r===l?i=void 0:($t=i,i=l),i!==l?e=t=[t,i]:($t=e,e=l)):($t=e,e=l),e===l)if(e=[],(t=_i())!==l)for(;t!==l;)e.push(t),t=_i();else e=l;return e}function li(){var e,i,r;return e=$t,(i=pi())!==l?(r=function(){var e,t,i;e=$t,t=[],i=fi(),i===l&&(i=hi())===l&&(i=Bi())===l&&(i=yi())===l&&(i=Ti());for(;i!==l;)t.push(i),(i=fi())===l&&(i=hi())===l&&(i=Bi())===l&&(i=yi())===l&&(i=Ti());return Wt=e,t=ot(t),e=t,e}(),Wt=e,e=Qe(i,r)):($t=e,e=l),e===l&&(e=$t,i=$t,r=function(){var e,i;Yt++,e=[],t.length>$t?(i=t.charAt($t),$t++):(i=l,0===Yt&&ri(oe));for(;i!==l;)e.push(i),t.length>$t?(i=t.charAt($t),$t++):(i=l,0===Yt&&ri(oe));Yt--,i=l,0===Yt&&ri(Ne);return e}(),i=t.substring(i,$t),Wt=e,e=i=Ze(i)),e}function pi(){var e,i,r,o,n,a;return e=$t,91===t.charCodeAt($t)?(i=d,$t++):(i=l,0===Yt&&ri(te)),i!==l?(r=function(){var e,i,r;e=$t,i=[],46===t.charCodeAt($t)?(r=M,$t++):(r=l,0===Yt&&ri(Le));if(r!==l)for(;r!==l;)i.push(r),46===t.charCodeAt($t)?(r=M,$t++):(r=l,0===Yt&&ri(Le));else i=l;i!==l&&(Wt=e,i=Gt(i));return e=i,e}(),r!==l?(o=Ki(),n=function(){var e,t,i;e=$t,t=ci(),t===l&&(t=ui());t===l&&(t=null);i=ci(),i===l&&(i=ui());i===l&&(i=null);return Wt=e,e=tt(t,i),e}(),93===t.charCodeAt($t)?(a=g,$t++):(a=l,0===Yt&&ri(ee)),a!==l?(Wt=e,e=et(r,o,n)):($t=e,e=l)):($t=e,e=l)):($t=e,e=l),e}function ci(){var e,i,r;return e=$t,58===t.charCodeAt($t)?(i=T,$t++):(i=l,0===Yt&&ri(ie)),i!==l?(r=Ki(),Wt=e,e=it(r)):($t=e,e=l),e}function ui(){var e,i,r;return e=$t,38===t.charCodeAt($t)?(i=f,$t++):(i=l,0===Yt&&ri(re)),i!==l?(r=Ki(),Wt=e,e=rt(r)):($t=e,e=l),e}function yi(){var e,t,i,r,o;if(e=$t,t=$t,(i=di())!==l){for(r=[],o=gi();o!==l;)r.push(o),o=gi();t=i=[i,r]}else $t=t,t=l;return t!==l&&(Wt=e,t=nt(t)),e=t}function gi(){var e,t;return e=$t,(t=di())!==l&&(Wt=e,t=at(t)),e=t}function di(){var e,i;return e=$t,i=function(){var e,i,r,o;e=$t,t.substr($t,4)===K?(i=K,$t+=4):(i=l,0===Yt&&ri(de));i!==l&&(r=wi())!==l?(o=function(){var e;93===t.charCodeAt($t)?(e=g,$t++):(e=l,0===Yt&&ri(ee));return e}(),o!==l?(Wt=e,e=kt(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r,o;e=$t,t.substr($t,2)===S?(i=S,$t+=2):(i=l,0===Yt&&ri(he));i!==l&&(r=Pi())!==l&&(o=wi())!==l&&ki()!==l?(Wt=e,e=At(r,o)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r,o;e=$t,91===t.charCodeAt($t)?(i=d,$t++):(i=l,0===Yt&&ri(te));if(i!==l){if(r=[],35===t.charCodeAt($t)?(o=w,$t++):(o=l,0===Yt&&ri(Te)),o!==l)for(;o!==l;)r.push(o),35===t.charCodeAt($t)?(o=w,$t++):(o=l,0===Yt&&ri(Te));else r=l;r!==l?(o=xi(),ki()!==l?(Wt=e,e=Kt(r,o)):($t=e,e=l)):($t=e,e=l)}else $t=e,e=l;return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===_?(i=_,$t+=2):(i=l,0===Yt&&ri(fe));i!==l?(r=xi(),ki()!==l?(Wt=e,e=wt(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===A?(i=A,$t+=2):(i=l,0===Yt&&ri(me));i!==l?(r=xi(),ki()!==l?(Wt=e,e=_t(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===L?(i=L,$t+=2):(i=l,0===Yt&&ri(be));i!==l?(r=xi(),ki()!==l?(Wt=e,e=St(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===I?(i=I,$t+=2):(i=l,0===Yt&&ri(Be));i!==l?(r=xi(),ki()!==l?(Wt=e,e=Lt(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===F?(i=F,$t+=2):(i=l,0===Yt&&ri(ve));i!==l?(r=xi(),ki()!==l?(Wt=e,e=It(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===R?(i=R,$t+=2):(i=l,0===Yt&&ri(ke));i!==l?(r=xi(),ki()!==l?(Wt=e,e=Et(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===V?(i=V,$t+=2):(i=l,0===Yt&&ri(Ke));i!==l?(r=xi(),ki()!==l?(Wt=e,e=Rt(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===E?(i=E,$t+=2):(i=l,0===Yt&&ri(Pe));i!==l?(r=xi(),ki()!==l?(Wt=e,e=Ot(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===N?(i=N,$t+=2):(i=l,0===Yt&&ri(Ce));i!==l?(r=xi(),ki()!==l?(Wt=e,e=Ft(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===O?(i=O,$t+=2):(i=l,0===Yt&&ri(xe));i!==l?(r=xi(),ki()!==l?(Wt=e,e=Nt(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r,o;e=$t,t.substr($t,2)===j?(i=j,$t+=2):(i=l,0===Yt&&ri(we));i!==l&&(r=Pi())!==l&&(o=wi())!==l&&ki()!==l?(Wt=e,e=Vt(r,o)):($t=e,e=l);return e}()))))))))))))),i!==l&&(Wt=e,i=st(i)),e=i}function Ti(){var e,i;return e=$t,t.length>$t?(i=t.charAt($t),$t++):(i=l,0===Yt&&ri(oe)),i!==l&&(Wt=e,i=lt(i)),e=i}function fi(){var e;return(e=function(){var e,t,i,r,o;e=$t,t=$t,(i=Li())!==l&&(r=mi())!==l&&(o=Ii())!==l?t=i=[i,r,o]:($t=t,t=l);t!==l&&(Wt=e,t=ct(t));return e=t,e}())===l&&(e=function(){var e,i,r,o,n;e=$t,i=$t,(r=Li())!==l?(o=function(){var e,i,r,o,n,a;t.substr($t,4)===m?(e=m,$t+=4):(e=l,0===Yt&&ri(ne));if(e===l)if(e=$t,t.substr($t,4)===h?(i=h,$t+=4):(i=l,0===Yt&&ri(ae)),i!==l){if(r=[],(o=Fi())!==l)for(;o!==l;)r.push(o),o=Fi();else r=l;if(r!==l)if(t.substr($t,4)===b?(o=b,$t+=4):(o=l,0===Yt&&ri(se)),o!==l){if(n=[],(a=Fi())!==l)for(;a!==l;)n.push(a),a=Fi();else n=l;n!==l?(t.substr($t,4)===h?(a=h,$t+=4):(a=l,0===Yt&&ri(ae)),a!==l?e=i=[i,r,o,n,a]:($t=e,e=l)):($t=e,e=l)}else $t=e,e=l;else $t=e,e=l}else $t=e,e=l;return e}(),o!==l&&(n=Ii())!==l?i=r=[r,o,n]:($t=i,i=l)):($t=i,i=l);i!==l&&(Wt=e,i=pt(i));return e=i,e}()),e}function mi(){var e,i,r,o,n,a;if(t.substr($t,4)===B?(e=B,$t+=4):(e=l,0===Yt&&ri(le)),e===l)if(e=$t,t.substr($t,4)===h?(i=h,$t+=4):(i=l,0===Yt&&ri(ae)),i!==l){if(r=[],(o=Fi())!==l)for(;o!==l;)r.push(o),o=Fi();else r=l;if(r!==l)if(t.substr($t,6)===v?(o=v,$t+=6):(o=l,0===Yt&&ri(pe)),o!==l){if(n=[],(a=Fi())!==l)for(;a!==l;)n.push(a),a=Fi();else n=l;n!==l?(t.substr($t,4)===h?(a=h,$t+=4):(a=l,0===Yt&&ri(ae)),a!==l?e=i=[i,r,o,n,a]:($t=e,e=l)):($t=e,e=l)}else $t=e,e=l;else $t=e,e=l}else $t=e,e=l;return e}function hi(){var e,i,r,o,n;if(e=$t,i=$t,r=function(){var e,i,r,o,n,a;e=$t,i=Li(),i!==l?(r=$t,Yt++,o=$t,t.substr($t,4)===h?(n=h,$t+=4):(n=l,0===Yt&&ri(ae)),n!==l&&(a=Ii())!==l?o=n=[n,a]:($t=o,o=l),Yt--,o!==l?($t=r,r=void 0):r=l,r!==l?(Wt=e,e=yt()):($t=e,e=l)):($t=e,e=l);return e}(),r!==l){for(o=[],n=bi();n!==l;)o.push(n),n=bi();n=function(){var e,t,i,r,o;e=$t,t=$t,i=mi(),i===l&&(i=null);r=$t,Yt++,o=Oi(),Yt--,o!==l?($t=r,r=void 0):r=l;r!==l?t=i=[i,r]:($t=t,t=l);t!==l&&(Wt=e,t=gt());return e=t,e}(),n!==l?i=r=[r,o,n]:($t=i,i=l)}else $t=i,i=l;return i!==l&&(Wt=e,i=ut(i)),e=i}function bi(){var e,i;return e=$t,i=function(){var e,i,r,o;e=$t,i=$t,t.substr($t,4)===h?(r=h,$t+=4):(r=l,0===Yt&&ri(ae));r!==l?((o=Ii())===l&&(o=Oi()),o!==l?i=r=[r,o]:($t=i,i=l)):($t=i,i=l);i===l&&(i=$t,t.substr($t,2)===C?(r=C,$t+=2):(r=l,0===Yt&&ri(ce)),r!==l?((o=Ii())===l&&(o=Oi()),o!==l?i=r=[r,o]:($t=i,i=l)):($t=i,i=l),i===l&&(i=$t,t.substr($t,2)===x?(r=x,$t+=2):(r=l,0===Yt&&ri(ue)),r!==l?((o=Ii())===l&&(o=Oi()),o!==l?i=r=[r,o]:($t=i,i=l)):($t=i,i=l),i===l&&(i=function(){var e,i,r,o,n,a;e=$t,i=$t,Yt++,r=$t,o=mi(),o!==l&&(n=Oi())!==l?r=o=[o,n]:($t=r,r=l);Yt--,r===l?i=void 0:($t=i,i=l);if(i!==l){if(r=$t,o=$t,n=Ai(),(a=Li())!==l?o=n=[n,a]:($t=o,o=l),o===l){if(o=$t,n=[],(a=_i())!==l)for(;a!==l;)n.push(a),a=_i();else n=l;n!==l&&(a=Ni())!==l?o=n=[n,a]:($t=o,o=l)}(r=o!==l?t.substring(r,$t):o)!==l?(Wt=e,e=ft(r)):($t=e,e=l)}else $t=e,e=l;return e}())));i!==l&&(Wt=e,i=Tt(i));return e=i,e}(),i!==l&&(Wt=e,i=dt(i)),e=i}function Bi(){var e,i,r,o,n;if(e=$t,i=$t,r=function(){var e,i,r,o,n,a;e=$t,i=Li(),i!==l?(r=$t,Yt++,o=$t,t.substr($t,3)===P?(n=P,$t+=3):(n=l,0===Yt&&ri(ye)),n!==l&&(a=Ii())!==l?o=n=[n,a]:($t=o,o=l),Yt--,o!==l?($t=r,r=void 0):r=l,r!==l?(Wt=e,e=ht()):($t=e,e=l)):($t=e,e=l);return e}(),r!==l){for(o=[],n=vi();n!==l;)o.push(n),n=vi();n=function(){var e,t,i,r,o;e=$t,t=$t,i=mi(),i===l&&(i=null);r=$t,Yt++,o=Oi(),Yt--,o!==l?($t=r,r=void 0):r=l;r!==l?t=i=[i,r]:($t=t,t=l);t!==l&&(Wt=e,t=bt());return e=t,e}(),n!==l?i=r=[r,o,n]:($t=i,i=l)}else $t=i,i=l;return i!==l&&(Wt=e,i=mt(i)),e=i}function vi(){var e,i;return e=$t,i=function(){var e,i,r,o;e=$t,i=$t,t.substr($t,3)===P?(r=P,$t+=3):(r=l,0===Yt&&ri(ye));r!==l?((o=Ii())===l&&(o=Oi()),o!==l?i=r=[r,o]:($t=i,i=l)):($t=i,i=l);i===l&&(i=$t,t.substr($t,2)===k?(r=k,$t+=2):(r=l,0===Yt&&ri(ge)),r!==l?((o=Ii())===l&&(o=Oi()),o!==l?i=r=[r,o]:($t=i,i=l)):($t=i,i=l),i===l&&(i=$t,t.substr($t,2)===C?(r=C,$t+=2):(r=l,0===Yt&&ri(ce)),r!==l?((o=Ii())===l&&(o=Oi()),o!==l?i=r=[r,o]:($t=i,i=l)):($t=i,i=l),i===l&&(i=function(){var e,i,r,o,n,a;e=$t,i=$t,Yt++,r=$t,o=mi(),o!==l&&(n=Oi())!==l?r=o=[o,n]:($t=r,r=l);Yt--,r===l?i=void 0:($t=i,i=l);if(i!==l){if(r=$t,o=$t,n=Ai(),(a=Li())!==l?o=n=[n,a]:($t=o,o=l),o===l){if(o=$t,n=[],(a=_i())!==l)for(;a!==l;)n.push(a),a=_i();else n=l;n!==l&&(a=Ni())!==l?o=n=[n,a]:($t=o,o=l)}(r=o!==l?t.substring(r,$t):o)!==l?(Wt=e,e=Ct(r)):($t=e,e=l)}else $t=e,e=l;return e}())));i!==l&&(Wt=e,i=vt(i));return e=i,e}(),i!==l&&(Wt=e,i=Bt(i)),e=i}function Ci(){var e,i;return e=$t,t.length>$t?(i=t.charAt($t),$t++):(i=l,0===Yt&&ri(oe)),i!==l&&(Wt=e,i=Pt(i)),e=i}function xi(){var e,i,r,o;for(e=$t,i=$t,r=[],t.substr($t,2)===D?(o=D,$t+=2):(o=l,0===Yt&&ri(_e)),o===l&&(o=t.charAt($t),$.test(o)?$t++:(o=l,0===Yt&&ri(Z)));o!==l;)r.push(o),t.substr($t,2)===D?(o=D,$t+=2):(o=l,0===Yt&&ri(_e)),o===l&&(o=t.charAt($t),$.test(o)?$t++:(o=l,0===Yt&&ri(Z)));return i=t.substring(i,$t),Wt=e,e=i=jt(i)}function Pi(){var e,i,r,o,n;if(e=$t,i=$t,Yt++,t.substr($t,3)===G?(r=G,$t+=3):(r=l,0===Yt&&ri(Ae)),Yt--,r===l?i=void 0:($t=i,i=l),i!==l){for(r=$t,o=[],n=t.charAt($t),W.test(n)?$t++:(n=l,0===Yt&&ri(Se));n!==l;)o.push(n),n=t.charAt($t),W.test(n)?$t++:(n=l,0===Yt&&ri(Se));r=t.substring(r,$t),Wt=e,e=Dt(r)}else $t=e,e=l;return e}function ki(){var e,i,r;if(93===t.charCodeAt($t)?(e=g,$t++):(e=l,0===Yt&&ri(ee)),e===l){for(e=$t,i=[],r=Fi();r!==l;)i.push(r),r=Fi();(r=Ei())!==l?e=i=[i,r]:($t=e,e=l)}return e}function Ki(){var e,i,r,o;for(e=$t,i=$t,r=[],o=t.charAt($t),z.test(o)?$t++:(o=l,0===Yt&&ri(Ie));o!==l;)r.push(o),o=t.charAt($t),z.test(o)?$t++:(o=l,0===Yt&&ri(Ie));return i=t.substring(i,$t),Wt=e,e=i=Mt(i)}function wi(){var e,i,r;return e=$t,58===t.charCodeAt($t)?(i=T,$t++):(i=l,0===Yt&&ri(ie)),i!==l?(r=xi(),Wt=e,e=Ut(r)):($t=e,e=l),e===l&&(i="",Wt=e=$t,e=i=Jt()),e}function _i(){var e;return Yt++,e=t.charAt($t),H.test(e)?$t++:(e=l,0===Yt&&ri(Ee)),Yt--,e===l&&(0===Yt&&ri(Oe)),e}function Ai(){var e,t;for(Yt++,e=[],t=_i();t!==l;)e.push(t),t=_i();return Yt--,t=l,0===Yt&&ri(Re),e}function Si(){var e,i,r;for(Yt++,e=$t,i=[],r=t.charAt($t),q.test(r)?$t++:(r=l,0===Yt&&ri(Fe));r!==l;)i.push(r),r=t.charAt($t),q.test(r)?$t++:(r=l,0===Yt&&ri(Fe));return(r=Li())!==l?e=i=[i,r]:($t=e,e=l),Yt--,e===l&&(i=l,0===Yt&&ri(Ve)),e}function Li(){var e;return Yt++,10===t.charCodeAt($t)?(e=U,$t++):(e=l,0===Yt&&ri(De)),e===l&&(t.substr($t,2)===J?(e=J,$t+=2):(e=l,0===Yt&&ri(Ge)),e===l&&(e=t.charAt($t),Y.test(e)?$t++:(e=l,0===Yt&&ri(Me)))),Yt--,e===l&&(0===Yt&&ri(je)),e}function Ii(){var e,i,r;for(Yt++,e=$t,i=[],r=t.charAt($t),q.test(r)?$t++:(r=l,0===Yt&&ri(Fe));r!==l;)i.push(r),r=t.charAt($t),q.test(r)?$t++:(r=l,0===Yt&&ri(Fe));return(r=Li())!==l?e=i=[i,r]:($t=e,e=l),Yt--,e===l&&(i=l,0===Yt&&ri(Ue)),e}function Fi(){var e;return Yt++,e=t.charAt($t),X.test(e)?$t++:(e=l,0===Yt&&ri($e)),Yt--,e===l&&(0===Yt&&ri(Je)),e}function Ni(){var e,i;return(e=Li())===l&&(e=$t,Yt++,t.length>$t?(i=t.charAt($t),$t++):(i=l,0===Yt&&ri(oe)),Yt--,i===l?e=void 0:($t=e,e=l)),e}function Oi(){var e,i;return(e=Ii())===l&&(e=$t,Yt++,t.length>$t?(i=t.charAt($t),$t++):(i=l,0===Yt&&ri(oe)),Yt--,i===l?e=void 0:($t=e,e=l)),e}function Ei(){var e,i;return e=$t,Yt++,t.length>$t?(i=t.charAt($t),$t++):(i=l,0===Yt&&ri(oe)),Yt--,i===l?e=void 0:($t=e,e=l),e}const Ri=new o.BitmarkPegParserHelper({parse:e,parserText:Xt,parserLocation:ji}),Vi=new n.BitmarkPegParserProcessor({parse:e,parserText:Xt,parserLocation:ji});function ji(){const e=ii(Wt,$t);return e?(delete e.source,e):e}function ii(e,t,i){var r=ti(e),o=ti(t),n={source:p,start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:o.line,column:o.column}};return p&&"function"==typeof p.offset&&(n.start=p.offset(n.start),n.end=p.offset(n.end)),n}if(s=u(),i.peg$library)return{peg$result:s,peg$currPos:$t,peg$FAILED:l,peg$maxFailExpected:Ht,peg$maxFailPos:qt};if(s!==l&&$t===t.length)return s;throw s!==l&&$t<t.length&&ri({type:"end"}),oi(Ht,qt<t.length?t.charAt(qt):null,qt<t.length?ii(qt,qt+1):ii(qt,qt))};const r=i(3029),o=i(3206),n=i(7124);i(7735);function a(e,t,i,r){var o=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(o,a.prototype),o.expected=t,o.found=i,o.location=r,o.name="SyntaxError",o}function s(e,t,i){return i=i||" ",e.length>t?e:(t-=e.length,e+(i+=i.repeat(t)).slice(0,t))}!function(e,t){function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i}(a,Error),a.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var i,r=null;for(i=0;i<e.length;i++)if(e[i].source===this.location.source){r=e[i].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,n=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,a=this.location.source+":"+n.line+":"+n.column;if(r){var l=this.location.end,p=s("",n.line.toString().length," "),c=r[o.line-1],u=(o.line===l.line?l.column:c.length+1)-o.column||1;t+="\n --\x3e "+a+"\n"+p+" |\n"+n.line+" | "+c+"\n"+p+" | "+s("",o.column-1," ")+s("",u,"^")}else t+="\n at "+a}return t},a.buildMessage=function(e,t){var i={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?n(e[0])+"-"+n(e[1]):n(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function r(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}function n(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}function a(e){return i[e.type](e)}return"Expected "+function(e){var t,i,r=e.map(a);if(r.sort(),r.length>0){for(t=1,i=1;t<r.length;t++)r[t-1]!==r[t]&&(r[i]=r[t],i++);r.length=i}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."};t.StartRules=["bitmark","bit","cardContent"]},5078:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;const r=i(5057).parse;t.parse=r},5087:function(e,t,i){var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(o,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function s(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkGenerator=void 0;const o=i(5126),n=i(6772),a=i(7735),s=i(2028),l=i(126),p=i(5854),c=i(3811),u=i(4410),y=i(1163),g=i(9727),d=i(166),T=i(6149),f=i(385),m=i(6877),h=i(4078),b=i(955),B=i(9681),v=i(4),C=i(431),x={debugGenerationInline:!1};class P extends v.AstWalkerGenerator{constructor(e,t){var i,r;super(),this.ast=new o.Ast,this.bitType=p.BitType._error,this.textFormat=f.TextFormat.bitmarkText,this.isBodyBitmarkText=!1,this.isCardAllowed=!1,this.firstBit=!0,this.hasCardSet=!1,this.hasFooter=!1,this.inTag=!0,this.inTag,this.enter=this.enter.bind(this),this.between=this.between.bind(this),this.exit=this.exit.bind(this),this.leaf=this.leaf.bind(this),this.write=this.write.bind(this),this.bodyBitCallback=this.bodyBitCallback.bind(this),this.bitmarkVersion=null!==(i=c.BitmarkVersion.fromValue(null==t?void 0:t.bitmarkVersion))&&void 0!==i?i:c.DEFAULT_BITMARK_VERSION,this.options=Object.assign(Object.assign({},x),null==t?void 0:t.bitmarkOptions),this.debugGenerationInline=null!==(r=this.options.debugGenerationInline)&&void 0!==r&&r,this.bitmarkVersion===c.BitmarkVersion.v2?void 0===this.options.cardSetVersion&&(this.options.cardSetVersion=y.CardSetVersion.v1):void 0===this.options.cardSetVersion&&(this.options.cardSetVersion=y.CardSetVersion.v2),this.prettifySpace=!0===this.options.prettifyJson?2:this.options.prettifyJson||void 0,this.spacesAroundValues=this.calcSpacesAroundValues(),this.spacesAroundValuesStr=" ".repeat(this.spacesAroundValues),this.textGenerator=new C.TextGenerator(this.bitmarkVersion,{writeCallback:this.write,bodyBitCallback:this.bodyBitCallback,debugGenerationInline:this.debugGenerationInline}),this.mainWriter=e,this.partWriter=new n.StringWriter,this.writer=this.mainWriter,this.generateResourceHandlers(),this.generatePropertyHandlers()}generate(e){return r(this,void 0,void 0,(function*(){this.resetState(),yield this.writer.open(),this.walkAndWrite(e),this.writeLine(),yield this.writer.close()}))}generateSync(e){this.resetState(),this.writer.openSync(),this.walkAndWrite(e),this.writer.closeSync()}resetState(){this.bitType=p.BitType._error,this.textFormat=f.TextFormat.bitmarkText,this.isBodyBitmarkText=!1,this.isCardAllowed=!1,this.firstBit=!0,this.hasCardSet=!1,this.hasFooter=!1,this.inTag=!0,this.printed=!1}walkAndWrite(e){this.ast.walk(e,l.NodeType.bitmarkAst,this,void 0),this.writeLine()}enter_bitsValue(e,t){var i;const r=e.value,o=s.Config.getBitConfig(r.bitType),n=s.Config.getBitResourcesConfig(r.bitType,r.resourceType);if(this.bitType=r.bitType,this.textFormat=null!==(i=r.textFormat)&&void 0!==i?i:o.textFormatDefault,this.isBodyBitmarkText=this.textFormat===f.TextFormat.bitmarkText,this.isCardAllowed=this.calculateIsCardAllowed(),this.hasCardSet=this.haveValidCardSet(r),this.hasFooter=this.haveValidFooter(r),this.firstBit||(this.writeNL(),this.writeNL(),this.writeNL()),this.writeOPD(r.bitLevel),r.isCommented&&this.writeString("|"),this.writeTagKey(r.bitType),r.textFormat){this.isWriteTextFormat(r.textFormat,o.textFormatDefault)&&(this.writeColon(),this.writeTagKey(r.textFormat))}let a;if(o.resourceAttachmentAllowed&&r.resources&&r.resources.length>0){const e=n.comboResourceTagTypesMap;if(n.comboResourceTagTypesMap.size>0)for(const t of e.keys())a=t;else a=r.resources[0].type}return a&&(this.writeAmpersand(),this.writeTagKey(a)),this.writeCL(),!0}exit_bitsValue(e,t){this.firstBit=!1}enter_internalComment(e,t){const i=e.value,r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;for(let e=0;e<i.length;e++){const t=i[e];this.writeNL(),this.writeProperty("internalComment",t,{format:g.PropertyFormat.plainText,single:!1,ignoreEmpty:!0})}return!1}enter_labelTrue(e,t){const i=e.value,r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const o=null==r?void 0:r.value;if(o){const e=""!=i,t=o.labelFalse&&""!=o.labelFalse[0];(e||t)&&this.writeNL(),e&&this.writeProperty(d.PropertyTag.labelTrue,i,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),t&&this.writeProperty(d.PropertyTag.labelFalse,o.labelFalse,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}return!1}enter_labelFalse(e,t){return!0}enter_imageSource(e,t){const i=e.value,r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const{url:o,mockupId:n,size:a,format:s,trim:p}=i;return this.writeNL(),this.writeProperty("imageSource",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),o&&(n&&this.writeProperty("mockupId",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),a&&this.writeProperty("size",a,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),s&&this.writeProperty("format",s,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),h.BooleanUtils.isBoolean(p)&&this.writeProperty("trim",p,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}enter_technicalTerm(e,t){const i=e.value,r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const{technicalTerm:o,lang:n}=i;return this.writeNL(),this.writeProperty("technicalTerm",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=n&&this.writeProperty("lang",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),!1}enter_servings(e,t){const i=e.value,r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const{servings:o,unit:n,unitAbbr:a,decimalPlaces:s,disableCalculation:p,hint:c}=i;return this.writeNL(),this.writeProperty("servings",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=n&&this.writeProperty("unit",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=a&&this.writeProperty("unitAbbr",a,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=s&&this.writeProperty("decimalPlaces",s,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=p&&this.writeProperty("disableCalculation",p,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=c&&(this.writeOPQ(),this.writeTextOrValue(c,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()),!1}enter_person(e,t){const i=e.value,r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const{name:o,title:n,avatarImage:a}=i;return this.writeNL(),this.writeProperty("person",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),n&&this.writeProperty("title",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),a&&this.writeResource(T.ResourceTag.image,a.image.src),!1}enter_text(e,t){const i=this.getParentNode(t);return!i||i.key!==l.NodeType.term&&i.key!==l.NodeType.definition&&i.key!==l.NodeType.alternativeDefinitionsValue&&i.key!==l.NodeType.question&&i.key!==l.NodeType.answer&&i.key!==l.NodeType.alternativeAnswersValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)),!1)}leaf_text(e,t){const i=this.getParentNode(t);return!i||i.key!==l.NodeType.term&&i.key!==l.NodeType.definition&&i.key!==l.NodeType.alternativeDefinitionsValue&&i.key!==l.NodeType.question&&i.key!==l.NodeType.answer&&i.key!==l.NodeType.alternativeAnswersValue&&i.key!==l.NodeType.reason||(B.StringUtils.isString(e.value)&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)),!1)}enter_icon(e,t){const i=e.value,r=this.getParentNode(t);return!r||(r.key!==l.NodeType.term&&r.key!==l.NodeType.definition&&r.key!==l.NodeType.alternativeDefinitionsValue&&r.key!==l.NodeType.question&&r.key!==l.NodeType.answer&&r.key!==l.NodeType.alternativeAnswersValue||(this.writeNL(),this.writeResource(T.ResourceTag.icon,i.image.src)),!0)}leaf_iconValue(e,t){return this.writeNL(),this.writeProperty("icon",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),!1}enter_ratingLevelStart(e,t){return this.enterRatingLevelStartEndCommon(e,t),!1}enter_ratingLevelEnd(e,t){return this.enterRatingLevelStartEndCommon(e,t),!1}enterRatingLevelStartEndCommon(e,t){const i=e.value,r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const{level:o,label:n}=i,a=e.key===l.NodeType.ratingLevelStart?d.PropertyTag.ratingLevelStart:d.PropertyTag.ratingLevelEnd;return this.writeNL(),this.writeProperty(a,o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),n&&this.writeProperty("label",n,{format:g.PropertyFormat.bitmarkText,single:!0,ignoreEmpty:!0}),!1}enter_markConfig(e,t){return!0}enter_markConfigValue(e,t){const i=e.value,r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.markConfig)return!0;const{mark:o,color:n,emphasis:a}=i;return o&&(this.writeNL(),this.writeProperty("mark",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),n&&this.writeProperty("color",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),a&&this.writeProperty("emphasis",a,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}enter_partialAnswer(e,t){return e.value&&(this.writeNL(),this.writeProperty("partialAnswer",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}leaf_partialAnswer(e,t){return e.value&&(this.writeNL(),this.writeProperty("partialAnswer",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}enter_sampleSolution(e,t){return e.value&&(this.writeNL(),this.writeProperty("sampleSolution",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}leaf_sampleSolution(e,t){return e.value&&(this.writeNL(),this.writeProperty("sampleSolution",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}leaf_reasonableNumOfChars(e,t){this.writeNL(),this.writeProperty("reasonableNumOfChars",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_additionalSolutionsValue(e,t){const i=this.getParentNode(t,2);(null==i?void 0:i.key)===l.NodeType.questionsValue&&(this.writeNL(),this.writeProperty("additionalSolutions",e.value,{format:g.PropertyFormat.plainText,single:!1}))}enter_item(e,t){var i,r,o;const n=e.value,a=this.getParentNode(t);return!this.isEmptyText(n)&&(!this.isEmptyText(null===(i=null==a?void 0:a.value)||void 0===i?void 0:i.lead)||(!this.isEmptyText(null===(r=null==a?void 0:a.value)||void 0===r?void 0:r.pageNumber)||(!this.isEmptyText(null===(o=null==a?void 0:a.value)||void 0===o?void 0:o.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(n,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),!0))))}enter_lead(e,t){var i,r,o,n;const a=e.value,s=this.getParentNode(t);return!this.isEmptyText(a)&&(!this.isEmptyText(null===(i=null==s?void 0:s.value)||void 0===i?void 0:i.pageNumber)||(!this.isEmptyText(null===(r=null==s?void 0:s.value)||void 0===r?void 0:r.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(null!==(n=null===(o=null==s?void 0:s.value)||void 0===o?void 0:o.item)&&void 0!==n?n:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(a,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),!0)))}enter_pageNumber(e,t){var i,r,o,n,a;const s=e.value,l=this.getParentNode(t);return!this.isEmptyText(s)&&(!this.isEmptyText(null===(i=null==l?void 0:l.value)||void 0===i?void 0:i.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(null!==(o=null===(r=null==l?void 0:l.value)||void 0===r?void 0:r.item)&&void 0!==o?o:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(null!==(a=null===(n=null==l?void 0:l.value)||void 0===n?void 0:n.lead)&&void 0!==a?a:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(null!=s?s:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),!0))}enter_marginNumber(e,t){var i,r,o,n,a,s;const l=e.value,p=this.getParentNode(t);return!this.isEmptyText(l)&&(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(null!==(r=null===(i=null==p?void 0:p.value)||void 0===i?void 0:i.item)&&void 0!==r?r:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(null!==(n=null===(o=null==p?void 0:p.value)||void 0===o?void 0:o.lead)&&void 0!==n?n:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(null!==(s=null===(a=null==p?void 0:p.value)||void 0===a?void 0:a.pageNumber)&&void 0!==s?s:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(l,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),!0)}enter_body(e,t){var i;const r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue&&(null==r?void 0:r.key)!==l.NodeType.cardBitsValue)return!0;this.inTag=!1;const o=e.value;if(this.textFormat===f.TextFormat.json){const e=null!==(i=o.body)&&void 0!==i?i:null;if(Array.isArray(e)||b.ObjectUtils.isObject(e)){const t=JSON.stringify(e,null,this.prettifySpace);t&&(this.writePlainTextDivider(),this.writeNL(),this.writeTextOrValue(t,f.TextFormat.plainText,m.TextLocation.body))}}else if(this.isBodyBitmarkText){const e=!(this.hasCardSet||this.hasFooter);this.writeNL();const t=Array.isArray(o.body)?o.body:[];this.writeTextOrValue(t,this.textFormat,m.TextLocation.body,{plainTextDividerAllowed:e})}else{this.writePlainTextDivider(),this.writeNL();const e=B.StringUtils.isString(o.body)?o.body:"";this.writeTextOrValue(`${e}`,f.TextFormat.plainText,m.TextLocation.body)}return!1}exit_body(e,t){this.inTag=!0}bodyBitCallback(e,t,i){var r;const o=null!==(r=l.NodeType.fromValue(e.type))&&void 0!==r?r:l.NodeType.bodyBit;return this.ast.walk(e,o,this,void 0),""}enter_gap(e,t){const i=e.value;if(i.solutions&&0===i.solutions.length)this.writeOPU(),this.writeCL();else for(const e of i.solutions)this.writeOPU(),this.writeTextOrValue(e,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL();return!0}enter_mark(e,t){const i=e.value;return this.writeOPE(),this.writeTextOrValue(i.solution,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_select(e,t){return!0}enter_highlight(e,t){return!0}enter_footer(e,t){const i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const r=e.value;return this.textFormat===f.TextFormat.json||r.footer&&r.footer.length>0&&this.isBodyBitmarkText&&(this.writeNL(),this.writeTextOrValue("==== footer ====",f.TextFormat.plainText,m.TextLocation.body),this.writeNL(),this.writeTextOrValue(r.footer,this.textFormat,m.TextLocation.body,{plainTextDividerAllowed:!0})),!1}enter_solutions(e,t){const i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const r=e.value;return r&&0===r.length&&(this.writeOPU(),this.writeCL()),!0}leaf_solution(e,t){var i;const r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return;const o=e.value,n=null===(i=this.getParentNode(t,2))||void 0===i?void 0:i.value;(null==n?void 0:n.type)===u.BodyBitType.mark&&o&&(this.writeOPE(),this.writeTextOrValue(o,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_mark(e,t){const i=t[0];if((null==i?void 0:i.key)!==l.NodeType.mark)return;const r=e.value;r&&this.writeProperty("mark",r,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}enter_optionsValue(e,t){const i=e.value;return i.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(i.text,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_textsValue(e,t){const i=e.value;return i.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(i.text,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_cardNode(e,t){return!this.isCardAllowed||(this.writeCardSetStart(),!0)}between_cardNode(e,t,i,r){this.isCardAllowed&&this.writeCardSetCardDivider()}exit_cardNode(e,t){this.isCardAllowed&&(this.writeCardSetEnd(),this.options.cardSetVersion,y.CardSetVersion.v1)}enter_elements(e,t){}between_elements(e,t,i,r){this.writeCardSetVariantDivider()}between_flashcards(e,t,i,r){this.writeCardSetCardDivider()}between_flashcardsValue(e,t,i,r){var o;this.isCardAllowed&&(i.key===l.NodeType.answer?this.writeCardSetSideDivider():i.key===l.NodeType.alternativeAnswers&&0!==(null===(o=i.value)||void 0===o?void 0:o.length)&&this.writeCardSetVariantDivider())}between_alternativeAnswers(e,t){this.writeCardSetVariantDivider()}between_alternativeDefinitions(e,t){this.writeCardSetVariantDivider()}enter_statements(e,t){}between_statements(e,t,i,r){this.isOfBitType(p.BitType.trueFalse1)||this.writeCardSetCardDivider()}enter_statementsValue(e,t){const i=e.value;return this.writeNL(),i.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(i.statement,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_choicesValue(e,t){const i=e.value;return this.writeNL(),i.isCorrect||i.requireReason?this.writeOPP():this.writeOPM(),this.writeTextOrValue(i.choice,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_responsesValue(e,t){const i=e.value;return this.writeNL(),i.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(i.response,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}between_feedbacks(e,t,i,r){this.writeCardSetCardDivider()}enter_reason(e,t){return this.writeCardSetSideDivider(),!0}enter_quizzes(e,t){}between_quizzes(e,t,i,r){this.writeCardSetCardDivider()}enter_heading(e,t){}between_heading(e,t,i,r){this.isCardAllowed&&this.writeCardSetSideDivider()}enter_forValues(e,t){}between_forValues(e,t,i,r){this.isCardAllowed&&this.writeCardSetSideDivider()}enter_pairs(e,t){}between_pairs(e,t,i,r){this.writeCardSetCardDivider()}enter_keyAudio(e,t){const i=e.value;return this.writeNL(),this.writeResource(T.ResourceTag.audio,i.audio.src),!1}enter_keyImage(e,t){const i=e.value;return this.writeNL(),this.writeResource(T.ResourceTag.image,i.image.src),!1}enter_matrix(e,t){}between_matrix(e,t,i,r){this.writeCardSetCardDivider()}enter_values(e,t){this.isCardAllowed&&this.writeCardSetSideDivider()}between_values(e,t,i,r){this.isCardAllowed&&this.writeCardSetVariantDivider()}between_pronunciationTable(e,t,i,r){const o=this.getParentNode(r);(null==o?void 0:o.key)===l.NodeType.cardNode&&this.isCardAllowed&&this.writeCardSetCardDivider()}between_table(e,t,i,r){const o=this.getParentNode(r);(null==o?void 0:o.key)===l.NodeType.cardNode&&this.isCardAllowed&&this.writeCardSetCardDivider()}between_data(e,t,i,r){const o=this.getParentNode(r);(null==o?void 0:o.key)!==l.NodeType.table&&(null==o?void 0:o.key)!==l.NodeType.pronunciationTable||this.writeCardSetCardDivider()}between_columns(e,t,i,r){const o=this.getParentNode(r),n=null==o?void 0:o.key;n!==l.NodeType.table&&n!==l.NodeType.captionDefinitionList||this.isCardAllowed&&this.writeCardSetSideDivider()}leaf_columnsValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}enter_columnsValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()}between_dataValue(e,t,i,r){const o=this.getParentNode(r,2);(null==o?void 0:o.key)!==l.NodeType.table&&(null==o?void 0:o.key)!==l.NodeType.pronunciationTable||this.isCardAllowed&&this.writeCardSetSideDivider()}leaf_dataValueValue(e,t){const i=this.getParentNode(t,3);(null==i?void 0:i.key)===l.NodeType.table&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}enter_dataValueValue(e,t){const i=this.getParentNode(t,3);if(((null==i?void 0:i.key)===l.NodeType.table||(null==i?void 0:i.key)===l.NodeType.pronunciationTable)&&e.value){if((null==i?void 0:i.key)===l.NodeType.pronunciationTable){const t=e.value;return t.title&&(this.writeNL(),this.writeOP(),this.writeHash(),this.writeTextOrValue(t.title,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()),t.audio&&(this.writeNL(),this.writeResource(T.ResourceTag.audio,t.audio.audio.src)),t.body&&(this.writeNL(),this.writeTextOrValue(t.body,this.textFormat,m.TextLocation.body)),!1}this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)}}between_captionDefinitionList(e,t,i,r){const o=this.getParentNode(r);(null==o?void 0:o.key)===l.NodeType.cardNode&&this.writeCardSetCardDivider()}leaf_term(e,t){const i=this.getParentNode(t);return(null==i?void 0:i.key)!==l.NodeType.definitionsValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)),!1)}leaf_definition(e,t){const i=this.getParentNode(t);return(null==i?void 0:i.key)!==l.NodeType.definitionsValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)),!1)}between_definitions(e,t,i,r){const o=this.getParentNode(r);(null==o?void 0:o.key)!==l.NodeType.cardNode&&(null==o?void 0:o.key)!==l.NodeType.captionDefinitionList||this.writeCardSetCardDivider()}between_definitionsValue(e,t,i,r){var o;const n=this.getParentNode(r);(null==n?void 0:n.key)===l.NodeType.definitions&&this.isCardAllowed&&(i.key===l.NodeType.definition?this.writeCardSetSideDivider():i.key===l.NodeType.alternativeDefinitions&&(null===(o=i.value)||void 0===o?void 0:o.length)>0&&this.writeCardSetVariantDivider())}enter_questions(e,t){}between_questions(e,t,i,r){this.writeCardSetCardDivider()}enter_ingredients(e,t){}between_ingredients(e,t,i,r){this.writeCardSetCardDivider()}enter_ingredientsValue(e,t){const i=e.value;return null!=i.title&&(this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(i.title,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()),this.writeNL(),i.checked?this.writeOPP():this.writeOPM(),this.writeCL(),null!=i.quantity&&(this.writeOPB(),this.writeTextOrValue(`${i.quantity}`,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()),null!=i.unit&&this.writeProperty("unit",i.unit,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=i.unitAbbr&&this.writeProperty("unitAbbr",i.unitAbbr,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=i.decimalPlaces&&this.writeProperty("decimalPlaces",i.decimalPlaces,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),i.disableCalculation&&this.writeProperty("disableCalculation",!0,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=i.item&&(this.writeNL(),this.writeTextOrValue(i.item,this.textFormat,m.TextLocation.body)),!1}enter_botResponses(e,t){}between_botResponses(e,t,i,r){this.writeCardSetCardDivider()}enter_cardBits(e,t){}between_cardBits(e,t,i,r){this.writeCardSetCardDivider()}leaf_response(e,t){const i=this.getParentNode(t);(null==i?void 0:i.key)===l.NodeType.botResponsesValue&&(this.writeNL(),this.writeOPB(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_reaction(e,t){const i=this.getParentNode(t);(null==i?void 0:i.key)===l.NodeType.botResponsesValue&&(this.writeNL(),this.writeProperty("reaction",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}leaf_feedback(e,t){const i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.botResponsesValue)return;const r=e.value;r&&(this.writeNL(),this.writeTextOrValue(r,this.textFormat,m.TextLocation.body))}enter_backgroundWallpaper(e,t){const i=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,i),!0}enter_imagePlaceholder(e,t){const i=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,i),!0}exit_imagePlaceholder(e,t){}enter_posterImage(e,t){const i=this.getParentNode(t);if((null==i?void 0:i.key)===l.NodeType.bitsValue){const t=e.value;t&&this.writeProperty("posterImage",t,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}else{const t=e.value;t&&t.src&&this.writeProperty("posterImage",t.src,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}return!0}enter_thumbnails(e,t){const i=e.value;if(Array.isArray(i)){const e=["src1x","src2x","src3x","src4x"];for(let t=0;t<i.length&&t!==e.length;t++){const r=i[t],o=e[t];this.writeProperty(o,r.src,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}}return!1}leaf_level(e,t){const i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;if(!s.Config.isOfBitType(this.bitType,[p.BitType.chapter]))return!0;const r=e.value,o=null==i?void 0:i.value;if(r>0&&null==o.title){this.writeNL(),this.writeOP();for(let e=0;e<+r;e++)this.writeHash();this.writeCL()}return!1}enter_title(e,t){const i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const r=e.value,o=(null==i?void 0:i.value).level||1;if(o&&r){this.writeNL(),this.writeOP();for(let e=0;e<+o;e++)this.writeHash();this.writeTextOrValue(r,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()}return!1}enter_subtitle(e,t){const i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const r=e.value;if(r){this.writeNL(),this.writeOP();for(let e=0;e<2;e++)this.writeHash();this.writeTextOrValue(r,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()}return!1}enter_book(e,t){}enter_bookValue(e,t){const i=e.value;return i&&(this.writeNL(),this.writeProperty("book",i.book,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!1}),i.reference&&(this.writeOPRANGLE(),this.writeTextOrValue(i.reference,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),i.referenceEnd&&(this.writeOPRANGLE(),this.writeTextOrValue(i.referenceEnd,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()))),!1}leaf_book(e,t){const i=this.getParentNode(t),r=null==i?void 0:i.value;r&&e.value&&(this.writeNL(),this.writeProperty("book",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!1}),r.reference&&(this.writeOPRANGLE(),this.writeTextOrValue(r.reference,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),r.referenceEnd&&(this.writeOPRANGLE(),this.writeTextOrValue(r.referenceEnd,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())))}leaf_anchor(e,t){e.value&&(this.writeNL(),this.writeOPDANGLE(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_reference(e,t){const i=this.getParentNode(t),r=null==i?void 0:i.value;r&&e.value&&(r.book||(this.writeNL(),this.writeOPRANGLE(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()))}enter_hint(e,t){const i=e.value;return this.isEmptyText(i)||(this.writeNL_IfNotChain(t),this.writeOPQ(),this.writeTextOrValue(i,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()),!1}enter_instruction(e,t){const i=e.value;return this.isEmptyText(i)||(this.writeNL_IfNotChain(t),this.writeOPB(),this.writeTextOrValue(i,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()),!1}enter_lang(e,t){e.value&&(this.writeNL(),this.writeProperty("lang",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0}))}enter_refAuthor(e,t){e.value&&(this.writeNL(),this.writeProperty("refAuthor",e.value,{format:g.PropertyFormat.plainText,single:!1,ignoreEmpty:!0}))}enter_refBookTitle(e,t){e.value&&(this.writeNL(),this.writeProperty("refBookTitle",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}enter_refPublisher(e,t){e.value&&(this.writeNL(),this.writeProperty("refPublisher",e.value,{format:g.PropertyFormat.plainText,single:!1,ignoreEmpty:!0}))}enter_refPublicationYear(e,t){e.value&&(this.writeNL(),this.writeProperty("refPublicationYear",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}enter_citationStyle(e,t){e.value&&(this.writeNL(),this.writeProperty("citationStyle",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}leaf_isExample(e,t){var i;if(!e.value)return;const r=this.getParentNode(t),o=null!==(i=null==r?void 0:r.value.example)&&void 0!==i?i:null;null!=o&&""!==o&&(this.writeNL_IfNotChain(t),this.writeOPA(),this.writeString("example"),this.writeColon(),!0===o?this.writeString(" true "):!1===o?this.writeString(" false "):Array.isArray(o)?this.writeTextOrValue(o,f.TextFormat.bitmarkText,m.TextLocation.tag):this.writeTextOrValue(o,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_elementsValue(e,t){e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}leaf_solutionsValue(e,t){const i=this.getParentNode(t,2);(null==i?void 0:i.key)===l.NodeType.bitsValue&&null!=e.value&&(this.writeOPU(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_prefix(e,t){e.value&&(this.writeOPPRE(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_postfix(e,t){e.value&&(this.writeOPPOST(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_isCaseSensitive(e,t){this.writeProperty("isCaseSensitive",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreFalse:!1,ignoreTrue:!0})}leaf_forKeys(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}leaf_forValues(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}leaf_forValuesValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}leaf_key(e,t){e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}leaf_valuesValue(e,t){e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}leaf_question(e,t){const i=this.getParentNode(t);(null==i?void 0:i.key)!==l.NodeType.questionsValue&&(null==i?void 0:i.key)!==l.NodeType.flashcardsValue||e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}leaf_src1x(e,t){this.writeProperty("src1x",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_src2x(e,t){this.writeProperty("src2x",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_src3x(e,t){this.writeProperty("src3x",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_src4x(e,t){this.writeProperty("src4x",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_width(e,t){this.writeProperty("width",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_height(e,t){this.writeProperty("height",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_alt(e,t){this.writeProperty("alt",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_zoomDisabled(e,t){s.Config.isOfBitType(this.bitType,[p.BitType.imageSeparator,p.BitType.pageBanner,p.BitType.imagesLogoGrave,p.BitType.prototypeImages])?this.writeProperty("zoomDisabled",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreFalse:!1,ignoreTrue:!0}):this.writeProperty("zoomDisabled",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreFalse:!0,ignoreTrue:!1})}leaf_license(e,t){this.writeProperty("license",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_copyright(e,t){this.writeProperty("copyright",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_provider(e,t){}leaf_showInIndex(e,t){null!=e.value&&(this.writeNL_IfNotChain(t),this.writeProperty("showInIndex",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0,ignoreFalse:!0}))}enter_caption(e,t){const i=e.value;return this.writeNL_IfNotChain(t),this.writeProperty("caption",i,{format:g.PropertyFormat.bitmarkText,single:!0,ignoreEmpty:!0}),!1}leaf_search(e,t){const i=e.value;i&&(this.writeNL_IfNotChain(t),this.writeProperty("search",i,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}leaf_duration(e,t){const i=this.getParentNode(t);(null==i?void 0:i.key)!==l.NodeType.bitsValue&&this.writeProperty("duration",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_mute(e,t){this.writeProperty("mute",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0})}leaf_autoplay(e,t){this.writeProperty("autoplay",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0})}leaf_allowSubtitles(e,t){this.writeProperty("allowSubtitles",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0})}leaf_showSubtitles(e,t){this.writeProperty("showSubtitles",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0})}generateResourceHandlers(){for(const e of T.ResourceTag.keys()){if(e===T.ResourceTag.keyFromValue(T.ResourceTag.unknown))continue;const t=`enter_${e}`;"function"!=typeof this[t]&&(this[t]=(e,t)=>{const i=e.value;if(null==i)return!1;const r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.resourcesValue)return!0;const o=T.ResourceTag.fromValue(r.value.__typeAlias),n=null!=o?o:T.ResourceTag.fromValue(r.value.type);if(!n)return!1;const a=i.url||i.src||i.body||"";return this.writeNL(),this.writeResource(n,a),!0},this[t]=this[t].bind(this))}}generatePropertyHandlers(){var e;const t=s.Config.getRawPropertiesConfig();for(const i of Object.values(t)){const t=null!==(e=i.astKey)&&void 0!==e?e:i.tag,r=`enter_${t}`;"function"!=typeof this[r]&&("example"!==t&&(this[r]=(e,t)=>{var r,o;if(null==e.value)return;const n=this.getParentNode(t);(null==n?void 0:n.key)===l.NodeType.bitsValue&&(this.writeNL_IfNotChain(t),this.writeProperty(i.tag,e.value,{format:null!==(r=i.format)&&void 0!==r?r:g.PropertyFormat.plainText,single:null!==(o=i.single)&&void 0!==o&&o,ignoreFalse:"false"===i.defaultValue,ignoreTrue:"true"===i.defaultValue}))},this[r]=this[r].bind(this)))}}isChain(e){const t=this.getParentNode(e);return(null==t?void 0:t.key)!==l.NodeType.bitsValue&&((null==t?void 0:t.key)!==l.NodeType.cardBitsValue&&((null==t?void 0:t.key)!==l.NodeType.feedbacksValue&&((null==t?void 0:t.key)!==l.NodeType.quizzesValue&&((null==t?void 0:t.key)!==l.NodeType.pairsValue&&((null==t?void 0:t.key)!==l.NodeType.matrixValue&&((null==t?void 0:t.key)!==l.NodeType.definitionsValue&&((null==t?void 0:t.key)!==l.NodeType.questionsValue&&(null==t?void 0:t.key)!==l.NodeType.reason)))))))}haveValidCardSet(e){const t=s.Config.getBitConfig(e.bitType);return!!t&&!!t.cardSet}haveValidFooter(e){const t=e.footer;if(!t)return!1;return e.textFormat!==f.TextFormat.json&&(!!(t.footer&&t.footer.length>0)&&!!this.isBodyBitmarkText)}calcSpacesAroundValues(){const e=this.options.spacesAroundValues;let t=1;return null!=e&&(t=!0===e?1:!1===e?0:e),t=Math.min(Math.max(t,0),10),t}writeTagKey(e){null!=e&&this.write(a.Breakscape.breakscape(`${e}`,{textFormat:f.TextFormat.plainText,textLocation:m.TextLocation.tag}))}writeTextOrValue(e,t,i,r){const o=i===m.TextLocation.tag,n="string"==typeof e?e:void 0,s=Array.isArray(e)?e:void 0,l=o?this.spacesAroundValuesStr:"",p=t===f.TextFormat.bitmarkText?t:f.TextFormat.plainText,c=e=>o?`${l}${e}${l}`:e,u=e=>{const t=this.writer;this.writer=this.partWriter,this.partWriter.openSync(),e(),this.partWriter.closeSync();const i=this.partWriter.getString().trim();return this.writer=t,i};if(null==n){if(null!=s){const e=()=>this.textGenerator.generateSync(s,t,i,r);if(o){const t=u(e);t&&this.write(c(t))}else e()}}else{const e=()=>this.write(a.Breakscape.breakscape(n,{textFormat:p,textLocation:i}));if(o){const t=u(e);t&&this.write(c(t))}else e()}}writeString(e){null!=e&&this.write(`${e}`)}writeOPBUL(){this.write("[•")}writeOPESC(){this.write("[^")}writeOPRANGLE(){this.write("[►")}writeOPDANGLE(){this.write("[▼")}writeOPD(e){this.write(`[${".".repeat(e)}`)}writeOPU(){this.write("[_")}writeOPE(){this.write("[=")}writeOPB(){this.write("[!")}writeOPQ(){this.write("[?")}writeOPA(){this.write("[@")}writeOPP(){this.write("[+")}writeOPM(){this.write("[-")}writeOPS(){this.write("[\\")}writeOPR(){this.write("[*")}writeOPC(){this.write("[%")}writeOPAMP(){this.write("[&")}writeOPDOLLAR(){this.write("[$")}writeOPHASH(){this.write("[#")}writeOPPRE(){this.write("['")}writeOPPOST(){this.write("[")}writeOP(){this.write("[")}writeCL(){0===this.spacesAroundValues&&this.writer.getLastWrite().endsWith("^")?this.write(" ]"):this.write("]")}writeAmpersand(){this.write("&")}writeColon(){this.write(":")}writeHash(){this.write("#")}writeSpacesAroundValues(){this.write(this.spacesAroundValuesStr)}writePlainTextDivider(){this.writeNL(),this.write("==== text ====")}writeCardSetStart(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1?this.write("==="):this.write("====")}writeCardSetEnd(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1&&this.write("===")}writeCardSetCardDivider(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1?this.write("==="):this.write("====")}writeCardSetSideDivider(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1?this.write("=="):this.write("--")}writeCardSetVariantDivider(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1?this.write("--"):this.write("++")}writeNL_IfNotChain(e){this.isChain(e)||this.writeNL()}writeNL(){this.options.debugGenerationInline?this.write("\\n"):this.write("\n")}writePropertyStyleResource(e,t,i=!1){var r;if(e&&t){const o=t[null!==(r=T.ResourceTag.keyFromValue(t.type))&&void 0!==r?r:""],n=o&&(o.src||o.url||o.body)||"";i?this.writeOPA():this.writeOPAMP(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(n,f.TextFormat.plainText,m.TextLocation.tag),t.type,T.ResourceTag.article,this.writeCL()}}writeResource(e,t){e&&(this.writeOPAMP(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(t,f.TextFormat.plainText,m.TextLocation.tag),T.ResourceTag.article,this.writeCL())}writeProperty(e,t,i){let r;if(void 0!==t){const o=i.format===g.PropertyFormat.bitmarkText;if(o){if(i.ignoreEmpty&&o&&this.isEmptyText(t))return;this.writeOPA(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(t,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()}else if(r=Array.isArray(t)?t:[t],r.length>0){i.single&&(r=r.slice(r.length-1));for(const t of r)if(void 0!==t){if(i.ignoreFalse&&!1===t)continue;if(i.ignoreTrue&&!0===t)continue;if(i.ignoreEmpty&&""===t)continue;this.writeOPA(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(`${t}`,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}}}}writeInlineDebug(e,t){let i=e;t.open?i=`<${e}>`:t.close?i=`</${e}>`:t.single&&(i=`<${e} />`),this.writeString(i)}isEmptyText(e){return!e||(!Array.isArray(e)||0===e.length)}isWriteTextFormat(e,t){return!!(!(f.TextFormat.fromValue(e)===t)||this.options.explicitTextFormat)}calculateIsCardAllowed(){return this.isBodyBitmarkText&&!this.isOfBitType1()}isOfBitType1(){return this.isOfBitType([p.BitType.trueFalse1,p.BitType.multipleChoice1,p.BitType.multipleResponse1])}isOfBitType(e){return s.Config.isOfBitType(this.bitType,e)}write(e){return this.writer.write(e),this}writeLine(e){return this.writer.writeLine(e),this}writeLines(e,t){return this.writer.writeLines(e,t),this}writeWhiteSpace(){return this.writer.writeWhiteSpace(),this}}t.BitmarkGenerator=P},5126:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Ast=void 0;const r=i(1412),o=i(126),n=i(9681);t.Ast=class{constructor(){(0,r.init)()}walk(e,t,i,r){this.walkRecursive(e,[{index:0,key:t,value:e}],i,r)}getRouteKey(e){return e.reduce(((t,i,r)=>(+i.key!==i.index&&(t+=`${i.key}`,r<e.length-1&&(t+="_")),t)),"")}printTree(e,t=o.NodeType.bitmarkAst){this.walkRecursive(e,[{index:0,key:t,value:e}],{enter:(e,t)=>(console.log("Enter: "+this.getRouteKey(t)),t[t.length-1].key!==o.NodeType.bodyJson),between:(e,t,i,r)=>{console.log("Between: "+this.getRouteKey(r))},exit:(e,t)=>{console.log("Exit: "+this.getRouteKey(t))},leaf:(e,t)=>{console.log("Leaf: "+this.getRouteKey(t))}},void 0)}preprocessAst(e){if(n.StringUtils.isString(e)){const t=e;try{e=JSON.parse(t)}catch(e){return}}if(this.isAst(e))return e}isAst(e){return!(!Object.prototype.hasOwnProperty.call(e,"bits")||!Array.isArray(e.bits))}walkRecursive(e,t,i,r){const{enter:o,between:n,exit:a,leaf:s}=i,l=t[t.length-1].key,p=!this.isValue(e),c=t[t.length-1];if(p){if(o){if(!1===o(c,t,r))return}}else s&&s(c,t,r);if(p){const o=this.isArray(e),a=Object.keys(e);for(let s=0,p=a.length;s<p;s++){const u=a[s],y=s===p-1,g=e,d=g[u];if(null!=d){const e={key:this.getAstKey(u,l,o),index:s,value:d},p=t.slice();if(p.push(e),this.walkRecursive(d,p,i,r),!y){const i=a[s+1],p=g[i],u={key:this.getAstKey(i,l,o),index:s+1,value:p};if(n){if(!1===n(c,e,u,t,r))break}}}}}p&&a&&a(c,t,r)}getAstKey(e,t,i){let r=e;return i&&t&&(r=`${t}Value`),o.NodeType.fromKey(r)||`unknown(${r})`}isArray(e){return Array.isArray(e)}isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}isValue(e){return!this.isObject(e)&&!this.isArray(e)}}},5189:function(e,t,i){var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.markChainContentProcessor=function(e,t,i,c,u,y){if(t===p.BitContentLevel.Chain)(0,l.markTagContentProcessor)(e,p.BitContentLevel.Chain,c,u);else{const t=function(e,t,i,l){var c;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("mark content",l);const u=o.Config.getTagConfigForTag(i,a.Tag.fromValue(l.type)),y=e.bitContentProcessor(p.BitContentLevel.Chain,i,[l]),g=e.bitContentProcessor(p.BitContentLevel.Chain,null==u?void 0:u.chain,l.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("mark TAGS",g);const{solution:d}=y,{mark:T}=g,f=r(g,["mark"]),m=Object.assign({type:n.BodyBitType.mark,solution:null!=d?d:"",mark:null!==(c=s.ArrayUtils.asSingle(T))&&void 0!==c?c:""},f);return m}(e,0,i,c);t&&y.push(t)}};const o=i(2028),n=i(4410),a=i(9917),s=i(6989),l=i(5980),p=i(3029)},5416:(e,t,i)=>{const{VOID:r,PRIMITIVE:o,ARRAY:n,OBJECT:a,DATE:s,REGEXP:l,MAP:p,SET:c,ERROR:u,BIGINT:y}=i(1731),g="",{toString:d}={},{keys:T}=Object,f=e=>{const t=typeof e;if("object"!==t||!e)return[o,t];const i=d.call(e).slice(8,-1);switch(i){case"Array":return[n,g];case"Object":return[a,g];case"Date":return[s,g];case"RegExp":return[l,g];case"Map":return[p,g];case"Set":return[c,g];case"DataView":return[n,i]}return i.includes("Array")?[n,i]:i.includes("Error")?[u,i]:[a,i]},m=([e,t])=>e===o&&("function"===t||"symbol"===t);t.serialize=(e,{json:t,lossy:i}={})=>{const u=[];return((e,t,i,u)=>{const g=(e,t)=>{const r=u.push(e)-1;return i.set(t,r),r},d=u=>{if(i.has(u))return i.get(u);let[h,b]=f(u);switch(h){case o:{let t=u;switch(b){case"bigint":h=y,t=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+b);t=null;break;case"undefined":return g([r],u)}return g([h,t],u)}case n:{if(b){let e=u;return"DataView"===b?e=new Uint8Array(u.buffer):"ArrayBuffer"===b&&(e=new Uint8Array(u)),g([b,[...e]],u)}const e=[],t=g([h,e],u);for(const t of u)e.push(d(t));return t}case a:{if(b)switch(b){case"BigInt":return g([b,u.toString()],u);case"Boolean":case"Number":case"String":return g([b,u.valueOf()],u)}if(t&&"toJSON"in u)return d(u.toJSON());const i=[],r=g([h,i],u);for(const t of T(u))!e&&m(f(u[t]))||i.push([d(t),d(u[t])]);return r}case s:return g([h,u.toISOString()],u);case l:{const{source:e,flags:t}=u;return g([h,{source:e,flags:t}],u)}case p:{const t=[],i=g([h,t],u);for(const[i,r]of u)(e||!m(f(i))&&!m(f(r)))&&t.push([d(i),d(r)]);return i}case c:{const t=[],i=g([h,t],u);for(const i of u)!e&&m(f(i))||t.push(d(i));return i}}const{message:B}=u;return g([h,{name:b,message:B}],u)};return d})(!(t||i),!!t,new Map,u)(e),u}},5512:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitTagType=void 0;const r=(0,i(4718).superenum)({tag:"tag",property:"property",resource:"resource",group:"group"});t.BitTagType=r},5533:function(e,t,i){var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceBuilder=void 0;const o=i(7735),n=i(2028),a=i(5854),s=i(6149),l=i(6877),p=i(955),c=i(9681),u=i(201),y=i(4470),g=i(4564);class d extends y.BaseBuilder{resourceFromResourceJson(e,t){if(!t)return;const i=[];Array.isArray(t)||(t=[t]);for(const r of t){let t=s.ResourceTag.fromValue(r.type);if(!t)return;const o=s.ResourceTag.keyFromValue(t);if(!o)return;const n=s.ResourceTag.fromValue(r.__typeAlias);let a;if(t=null!=n?n:t,t===s.ResourceTag.imageResponsive){const t=r,o=this.resourceFromResourceDataJson(e,s.ResourceTag.imagePortrait,t.imagePortrait),n=this.resourceFromResourceDataJson(e,s.ResourceTag.imageLandscape,t.imageLandscape);o&&i.push(o),n&&i.push(n)}else if(t===s.ResourceTag.stillImageFilm){const t=r,o=this.resourceFromResourceDataJson(e,s.ResourceTag.image,t.image),n=this.resourceFromResourceDataJson(e,s.ResourceTag.audio,t.audio);o&&i.push(o),n&&i.push(n)}else{if(a=r[o],!a)return;const n=this.resourceFromResourceDataJson(e,t,a);n&&i.push(n)}}return 0!==i.length?1===i.length?i[0]:i:void 0}resourceFromResourceDataJson(e,t,i){var r,o,n;if(!i)return;if(!(t=s.ResourceTag.fromValue(t)))return;const a=c.StringUtils.isString(i)?i:void 0,p=i.url||i.src||i.body||a,u=i.posterImage?null===(r=this.resourceFromResourceDataJson(e,s.ResourceTag.image,i.posterImage))||void 0===r?void 0:r.image:void 0,y=i.thumbnails?i.thumbnails.map((t=>{var i;return null===(i=this.resourceFromResourceDataJson(e,s.ResourceTag.image,t))||void 0===i?void 0:i.image})):void 0;return this.resource(e,{type:t,value:p,format:i.format,src1x:i.src1x,src2x:i.src2x,src3x:i.src3x,src4x:i.src4x,caption:this.handleJsonText(e,l.TextLocation.tag,i.caption),width:null!==(o=i.width)&&void 0!==o?o:void 0,height:null!==(n=i.height)&&void 0!==n?n:void 0,alt:i.alt,zoomDisabled:i.zoomDisabled,duration:i.duration,mute:i.mute,autoplay:i.autoplay,allowSubtitles:i.allowSubtitles,showSubtitles:i.showSubtitles,posterImage:u,thumbnails:y,siteName:void 0,license:i.license,copyright:i.copyright,showInIndex:i.showInIndex,search:i.search})}resource(e,t){var i;let n;const{type:a,value:l,format:p}=t,c=r(t,["type","value","format"]),u=Object.assign({type:a,value:null!=l?l:o.Breakscape.EMPTY_STRING,format:null!=p?p:o.Breakscape.EMPTY_STRING},c);switch(a){case s.ResourceTag.video:case s.ResourceTag.videoEmbed:case s.ResourceTag.videoLink:case s.ResourceTag.stillImageFilmEmbed:case s.ResourceTag.stillImageFilmLink:{const r=["src1x","src2x","src3x","src4x"],o=[];for(const i of r){const r=t[i];if(r){const t=this.resource(e,{type:s.ResourceTag.image,value:r});t&&o.push(t.image)}}u.thumbnails=[...null!==(i=u.thumbnails)&&void 0!==i?i:[],...o]}}switch(a){case s.ResourceTag.image:case s.ResourceTag.imagePortrait:case s.ResourceTag.imageLandscape:case s.ResourceTag.backgroundWallpaper:case s.ResourceTag.imagePlaceholder:case s.ResourceTag.icon:n=this.imageResource(e,u,a);break;case s.ResourceTag.imageLink:n=this.imageLinkResource(e,u);break;case s.ResourceTag.audio:n=this.audioResource(e,u);break;case s.ResourceTag.audioEmbed:n=this.audioEmbedResource(e,u);break;case s.ResourceTag.audioLink:n=this.audioLinkResource(e,u);break;case s.ResourceTag.video:n=this.videoResource(e,u);break;case s.ResourceTag.videoEmbed:n=this.videoEmbedResource(e,u);break;case s.ResourceTag.videoLink:n=this.videoLinkResource(e,u);break;case s.ResourceTag.stillImageFilmEmbed:n=this.stillImageFilmEmbedResource(e,u);break;case s.ResourceTag.stillImageFilmLink:n=this.stillImageFilmLinkResource(e,u);break;case s.ResourceTag.article:n=this.articleResource(e,u);break;case s.ResourceTag.document:n=this.documentResource(e,u);break;case s.ResourceTag.documentEmbed:n=this.documentEmbedResource(e,u);break;case s.ResourceTag.documentLink:n=this.documentLinkResource(e,u);break;case s.ResourceTag.documentDownload:n=this.documentDownloadResource(e,u);break;case s.ResourceTag.appLink:n=this.appLinkResource(e,u);break;case s.ResourceTag.websiteLink:n=this.websiteLinkResource(e,u)}return n}imageResource(e,t,i){var r,o;const{value:c,src1x:y,src2x:d,src3x:T,src4x:f,width:m,height:h,alt:b,zoomDisabled:B,license:v,copyright:C,showInIndex:x,caption:P,search:k}=t,{bitType:K}=e;let w=!1;n.Config.isOfBitType(K,[a.BitType.imageSeparator,a.BitType.pageBanner,a.BitType.imagesLogoGrave,a.BitType.prototypeImages])&&(w=!0);const _={type:s.ResourceTag.image,__typeAlias:null!=i?i:s.ResourceTag.image,image:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(c))&&void 0!==r?r:void 0,provider:null!==(o=u.UrlUtils.domainFromUrl(c))&&void 0!==o?o:void 0,src:null!=c?c:"",src1x:null!=y?y:void 0,src2x:null!=d?d:void 0,src3x:null!=T?T:void 0,src4x:null!=f?f:void 0,width:null!=m?m:null,height:null!=h?h:null,alt:null!=b?b:"",zoomDisabled:null!=B?B:w,license:null!=v?v:"",copyright:null!=C?C:"",showInIndex:null!=x&&x,caption:this.handleJsonText(e,l.TextLocation.tag,P),search:null!=k?k:void 0}};return p.ObjectUtils.removeUnwantedProperties(_.image,{ignoreFalse:["zoomDisabled","showInIndex"],ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["src","alt","license","copyright"]}),g.NodeValidator.validateResource(_)}imageLinkResource(e,t){var i,r;const{value:o,src1x:n,src2x:a,src3x:c,src4x:y,width:d,height:T,alt:f,zoomDisabled:m,license:h,copyright:b,showInIndex:B,caption:v,search:C}=t,x={type:s.ResourceTag.imageLink,__typeAlias:s.ResourceTag.imageLink,imageLink:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",src1x:null!=n?n:void 0,src2x:null!=a?a:void 0,src3x:null!=c?c:void 0,src4x:null!=y?y:void 0,width:null!=d?d:null,height:null!=T?T:null,alt:null!=f?f:"",zoomDisabled:null!=m&&m,license:null!=h?h:"",copyright:null!=b?b:"",showInIndex:null!=B&&B,caption:this.handleJsonText(e,l.TextLocation.tag,v),search:null!=C?C:void 0}};return p.ObjectUtils.removeUnwantedProperties(x.imageLink,{ignoreFalse:["zoomDisabled","showInIndex"],ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","alt","license","copyright"]}),g.NodeValidator.validateResource(x)}audioResource(e,t){var i,r;const{value:o,duration:n,mute:a,autoplay:c,license:y,copyright:d,showInIndex:T,caption:f,search:m}=t,h={type:s.ResourceTag.audio,__typeAlias:s.ResourceTag.audio,audio:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,src:null!=o?o:"",duration:null!=n?n:void 0,mute:null!=a?a:void 0,autoplay:null!=c?c:void 0,license:null!=y?y:"",copyright:null!=d?d:"",showInIndex:null!=T&&T,caption:this.handleJsonText(e,l.TextLocation.tag,f),search:null!=m?m:void 0}};return p.ObjectUtils.removeUnwantedProperties(h.audio,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["src","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(h)}audioEmbedResource(e,t){var i,r;const{value:o,duration:n,mute:a,autoplay:c,license:y,copyright:d,showInIndex:T,caption:f,search:m}=t,h={type:s.ResourceTag.audioEmbed,__typeAlias:s.ResourceTag.audioEmbed,audioEmbed:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,src:null!=o?o:"",duration:null!=n?n:void 0,mute:null!=a?a:void 0,autoplay:null!=c?c:void 0,license:null!=y?y:"",copyright:null!=d?d:"",showInIndex:null!=T&&T,caption:this.handleJsonText(e,l.TextLocation.tag,f),search:null!=m?m:void 0}};return p.ObjectUtils.removeUnwantedProperties(h.audioEmbed,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["src","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(h)}audioLinkResource(e,t){var i,r;const{value:o,duration:n,mute:a,autoplay:c,license:y,copyright:d,showInIndex:T,caption:f,search:m}=t,h={type:s.ResourceTag.audioLink,__typeAlias:s.ResourceTag.audioLink,audioLink:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",duration:null!=n?n:void 0,mute:null!=a?a:void 0,autoplay:null!=c?c:void 0,license:null!=y?y:"",copyright:null!=d?d:"",showInIndex:null!=T&&T,caption:this.handleJsonText(e,l.TextLocation.tag,f),search:null!=m?m:void 0}};return p.ObjectUtils.removeUnwantedProperties(h.audioLink,{ignoreEmptyString:["url"]}),g.NodeValidator.validateResource(h)}videoResource(e,t){var i,r;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.video,__typeAlias:s.ResourceTag.video,video:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,src:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0,posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.video,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["src","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}videoEmbedResource(e,t){var i,r;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.videoEmbed,__typeAlias:s.ResourceTag.videoEmbed,videoEmbed:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0,license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.videoEmbed,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}videoLinkResource(e,t){var i,r;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.videoLink,__typeAlias:s.ResourceTag.videoLink,videoLink:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0,license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.videoLink,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}stillImageFilmEmbedResource(e,t){var i,r;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.stillImageFilmEmbed,__typeAlias:s.ResourceTag.stillImageFilmEmbed,stillImageFilmEmbed:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0,license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.stillImageFilmEmbed,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}stillImageFilmLinkResource(e,t){var i,r;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.stillImageFilmLink,__typeAlias:s.ResourceTag.stillImageFilmLink,stillImageFilmLink:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0,license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.stillImageFilmLink,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}articleResource(e,t){var i,r;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.article,__typeAlias:s.ResourceTag.article,article:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,body:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.article,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["body","alt","license","copyright"]}),g.NodeValidator.validateResource(T)}documentResource(e,t){var i,r;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.document,__typeAlias:s.ResourceTag.document,document:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.document,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(T)}documentEmbedResource(e,t){var i,r;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.documentEmbed,__typeAlias:s.ResourceTag.documentEmbed,documentEmbed:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.documentEmbed,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(T)}documentLinkResource(e,t){var i,r;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.documentLink,__typeAlias:s.ResourceTag.documentLink,documentLink:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.documentLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(T)}documentDownloadResource(e,t){var i,r;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.documentDownload,__typeAlias:s.ResourceTag.documentDownload,documentDownload:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.documentDownload,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(T)}appLinkResource(e,t){const{value:i,license:r,copyright:o,showInIndex:n,caption:a,search:c}=t,u={type:s.ResourceTag.appLink,__typeAlias:s.ResourceTag.appLink,appLink:{provider:void 0,url:null!=i?i:"",license:null!=r?r:"",copyright:null!=o?o:"",showInIndex:null!=n&&n,caption:this.handleJsonText(e,l.TextLocation.tag,a),search:null!=c?c:void 0}};return p.ObjectUtils.removeUnwantedProperties(u.appLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(u)}websiteLinkResource(e,t){const{value:i,license:r,copyright:o,showInIndex:n,caption:a,search:c}=t,u={type:s.ResourceTag.websiteLink,__typeAlias:s.ResourceTag.websiteLink,websiteLink:{provider:void 0,url:null!=i?i:"",license:null!=r?r:"",copyright:null!=o?o:"",showInIndex:null!=n&&n,caption:this.handleJsonText(e,l.TextLocation.tag,a),search:null!=c?c:void 0}};return p.ObjectUtils.removeUnwantedProperties(u.websiteLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(u)}}t.ResourceBuilder=d},5554:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CARDS=void 0;const r=i(8199),o=i(7112),n=i(9888),a=i(5051),s=i(7797),l=i(5512),p=i(3778),c={[r.CardSetConfigKey._definitionList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceIcon}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._flashcard]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceIcon}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._elements]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._statements]:{variants:[[{tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:1},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:1},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],bodyAllowed:!1}]]},[r.CardSetConfigKey._quiz]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],bodyAllowed:!1}]]},[r.CardSetConfigKey._feedback]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],bodyAllowed:!1}],[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],bodyAllowed:!0}]]},[r.CardSetConfigKey._questions]:{variants:[[{tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars},{type:l.BitTagType.tag,configKey:s.TagConfigKey.sampleSolution},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_sampleSolution},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.additionalSolutions,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.partialAnswer},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._matchPairs]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._matchAudioPairs]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audio}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._matchImagePairs]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.image}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._matchMatrix]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._table]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._pronunciationTable]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audio}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._botActionResponses]:{variants:[[{tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reaction},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}]}]]},[r.CardSetConfigKey._clozeList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_gap}]}]]},[r.CardSetConfigKey._exampleBitList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._ingredients]:{variants:[[{tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unit},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unitAbbr},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.decimalPlaces},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.disableCalculation}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._bookReferenceList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refAuthor,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refBookTitle},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refPublisher,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refPublicationYear},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.citationStyle}],repeatCount:p.Count.infinity}]]}};t.CARDS=c},5591:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigKey=void 0;const r=i(4718),o=i(7112),n=i(9888),a=i(5051),s=i(7797),l=(0,r.superenum)(Object.assign(Object.assign(Object.assign(Object.assign({_unknown:"_unknown"},s.tagConfigKeys),n.propertyConfigKeys),a.resourceConfigKeys),o.groupConfigKeys));t.ConfigKey=l,function(){const e=new Set,t=[s.tagConfigKeys,n.propertyConfigKeys,a.resourceConfigKeys,o.groupConfigKeys];for(const i of t)for(const t in i)e.add(t)}()},5633:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkParser=void 0;const r=i(5663),o=i(5078);t.BitmarkParser=class{constructor(){this.jsonParser=new r.JsonParser}toAst(e,t){return(0,o.parse)(e)}}},5659:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseUserAgent=function(){if("undefined"==typeof window||!window.navigator||!window.navigator.userAgent)return;const e={browser:r.Environment.unknown,os:o.Os.unknown},t=function(e){const t=e.toLowerCase().split(new RegExp("[ /,;()]","g")).reduce(((e,t)=>(t&&e.push(t),e)),[]),i={keys:new Set,versions:{}};let r="";for(let e=0,o=t.length;e<o;e++){const o=t[e];let n=!1;for(let e=0;e<=9;e++)if(o.startsWith(`${e}`)){n=!0;break}n?i.versions[r]=o.replace("_","."):i.keys.add(o),r=o}return i}(window.navigator.userAgent),i=t.keys.has("firefox"),n=t.keys.has("chrome"),a=t.keys.has("chromium"),s=t.keys.has("safari"),l=t.keys.has("macintosh"),p=n,c=i,u=l;!s||n||a?p?(e.browser=r.Environment.chrome,e.browserVersion=t.versions.chrome):c&&(e.browser=r.Environment.firefox,e.browserVersion=t.versions.firefox):(e.browser=r.Environment.safari,e.browserVersion=t.versions.version);u&&(e.os=o.Os.macos,e.osVersion=t.versions.x);return e};const r=i(6278),o=i(9561)},5663:function(e,t,i){var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonParser=void 0;const o=i(5809),n=i(2028),a=i(5854),s=i(6220),l=i(6149),p=i(385),c=i(9681),u=new o.Builder;t.JsonParser=class{toAst(e){const t=this.preprocessJson(e),i=[];for(const e of t){const{bit:t,parser:r}=e,o=this.bitToAst(t,null==r?void 0:r.internalComments);o&&i.push(o)}const r=i.length>0?{bits:i}:{};return u.buildBitmark(r)}preprocessJson(e){const t=[];if(c.StringUtils.isString(e)){const t=e;try{e=JSON.parse(t)}catch(e){return[]}}const i=e=>{if(this.isBitWrapper(e)){const i=e;t.push(i)}else if(this.isBit(e)){const i=e;t.push(this.bitToBitWrapper(i))}};if(Array.isArray(e))for(const t of e)i(t);else i(e);return t}isBitWrapper(e){if(Object.prototype.hasOwnProperty.call(e,"bit")){const t=e;return this.isBit(t.bit)}return!1}isBit(e){if(Object.prototype.hasOwnProperty.call(e,"type")){const t=e;return n.Config.getBitType(t.type)!==a.BitType._error}return!1}bitToBitWrapper(e){return{bit:e}}bitToAst(e,t){var i,o,l,c,y;const{statement:g,product:d,productVideo:T,reference:f}=e,m=r(e,["statement","product","productVideo","reference"]),h=e.type===a.BitType._comment&&void 0!==e.originalType,b=n.Config.getBitType(h?e.originalType:e.type),B=n.Config.getBitConfig(b),v=s.DeprecatedTextFormat.fromValue(e.format);let C=null!==(i=p.TextFormat.fromValue(e.format))&&void 0!==i?i:B.textFormatDefault;v===s.DeprecatedTextFormat.bitmarkMinusMinus&&(C=p.TextFormat.bitmarkText);return u.buildBit(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},m),{bitType:b,bitLevel:Math.max(Math.min(null!==(o=e.bitLevel)&&void 0!==o?o:1,n.Config.bitLevelMax),n.Config.bitLevelMin),textFormat:e.format,resourceType:this.getResourceType(e.resource),isCommented:h,internalComment:t,productList:d,productVideoList:T}),this.processReference(f)),this.parseExample(e.example)),{person:null!==(l=e.partner)&&void 0!==l?l:e.person,markConfig:e.marks,resources:this.processResources(b,e.resource,e.images,e.logos),body:this.processBody(e.body,e.placeholders),flashcards:e.cards,statements:this.processStatements(g,e.isCorrect,e.statements,e.example),responses:this.processResponses(b,e.responses),botResponses:this.processBotResponse(b,e.responses),cardBits:this.processListItems(null!==(y=null!==(c=e.listItems)&&void 0!==c?c:e.sections)&&void 0!==y?y:e.bookReferences,e.placeholders),footer:this.processFooter(e.footer)}))}processStatements(e,t,i,r){const o=[];if(e){const i=Object.assign({statement:null!=e?e:"",isCorrect:null!=t&&t},this.parseExample(r));i&&o.push(i)}if(Array.isArray(i))for(const e of i)o.push(e);if(0!==o.length)return o}processResponses(e,t){if(!n.Config.isOfBitType(e,a.BitType.botActionResponse)&&Array.isArray(t))return t}processBotResponse(e,t){if(n.Config.isOfBitType(e,a.BitType.botActionResponse)&&Array.isArray(t))return t}processListItems(e,t){const i=[];if(Array.isArray(e))for(const r of e){const e=Object.assign({},r);e.body&&(e.body={body:e.body,placeholders:t}),e&&i.push(e)}if(0!==i.length)return i}getResourceType(e){if(e){return l.ResourceTag.fromValue(e.type)}}processResources(e,t,i,r){const o=[];if(t&&o.push(t),n.Config.isOfBitType(e,[a.BitType.prototypeImages])&&Array.isArray(i))for(const e of i)e&&o.push(e);if(n.Config.isOfBitType(e,[a.BitType.imagesLogoGrave])&&Array.isArray(r))for(const e of r)e&&o.push(e);return o}processBody(e,t){return{body:e,placeholders:t}}processFooter(e){if(e)return{footer:e}}processReference(e){return Array.isArray(e)&&e.length>0?{reference:void 0,referenceProperty:e}:{reference:e,referenceProperty:void 0}}parseExample(e){if(null==e)return;if(!0===e)return{example:!0};if(!1===e)return{example:!1};const t=c.StringUtils.isString(e)||Array.isArray(e)?e:void 0;return t?{example:t}:{example:!!e}}}},5809:function(e,t,i){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Builder=void 0;const o=r(i(7678)),n=i(7735),a=i(2028),s=i(9888),l=i(5854),p=i(4410),c=i(6220),u=i(6149),y=i(385),g=i(6877),d=i(6989),T=i(8903),f=i(4078),m=i(8025),h=i(955),b=i(9681),B=i(6936),v=i(4470),C=i(5533),x=i(4564);class P extends v.BaseBuilder{constructor(){super(...arguments),this.resourceBuilder=new C.ResourceBuilder}buildBitmark(e){const{bits:t,errors:i}=e,r={bits:t,errors:i};return h.ObjectUtils.removeUnwantedProperties(r),r}buildBit(e){var t,i,r,o,n,T,f;const b=a.Config.getBitConfig(e.bitType),B=e.bitType,v=c.DeprecatedTextFormat.fromValue(e.textFormat);let C=null!==(t=y.TextFormat.fromValue(e.textFormat))&&void 0!==t?t:b.textFormatDefault;v===c.DeprecatedTextFormat.bitmarkMinusMinus&&(C=y.TextFormat.bitmarkText);const P={bitConfig:b,bitType:B,textFormat:C},k=this.buildCardNode(P,e),K=a.Config.isOfBitType(e.bitType,l.BitType.essay)?this.toAstProperty(s.PropertyConfigKey.reasonableNumOfChars,e.reasonableNumOfChars):void 0,w=Object.assign({},this.toExample(e.__isDefaultExample,e.example)),_=Object.assign(Object.assign({bitType:B,bitLevel:e.bitLevel,textFormat:C,resourceType:u.ResourceTag.fromValue(e.resourceType),isCommented:e.isCommented,id:this.toAstProperty(s.PropertyConfigKey.id,e.id),internalComment:this.toAstProperty(s.PropertyConfigKey.internalComment,e.internalComment),customerId:this.toAstProperty(s.PropertyConfigKey.customerId,e.customerId),customerExternalId:this.toAstProperty(s.PropertyConfigKey.customerExternalId,e.customerExternalId),externalId:this.toAstProperty(s.PropertyConfigKey.externalId,e.externalId),spaceId:this.toAstProperty(s.PropertyConfigKey.spaceId,e.spaceId),padletId:this.toAstProperty(s.PropertyConfigKey.padletId,e.padletId),jupyterId:this.toAstProperty(s.PropertyConfigKey.jupyterId,e.jupyterId),jupyterExecutionCount:this.toAstProperty(s.PropertyConfigKey.jupyterExecutionCount,e.jupyterExecutionCount),isPublic:this.toAstProperty(s.PropertyConfigKey.isPublic,e.isPublic),aiGenerated:this.toAstProperty(s.PropertyConfigKey.aiGenerated,e.aiGenerated),machineTranslated:this.toAstProperty(s.PropertyConfigKey.machineTranslated,e.machineTranslated),searchIndex:this.toAstProperty(s.PropertyConfigKey.searchIndex,e.searchIndex),analyticsTag:this.toAstProperty(s.PropertyConfigKey.analyticsTag,e.analyticsTag),categoryTag:this.toAstProperty(s.PropertyConfigKey.categoryTag,e.categoryTag),topicTag:this.toAstProperty(s.PropertyConfigKey.topicTag,e.topicTag),altLangTag:this.toAstProperty(s.PropertyConfigKey.altLangTag,e.altLangTag),feedbackEngine:this.toAstProperty(s.PropertyConfigKey.feedbackEngine,e.feedbackEngine),feedbackType:this.toAstProperty(s.PropertyConfigKey.feedbackType,e.feedbackType),disableFeedback:this.toAstProperty(s.PropertyConfigKey.disableFeedback,e.disableFeedback),diffTo:this.toAstProperty(s.PropertyConfigKey.diffTo,e.diffTo),diffOp:this.toAstProperty(s.PropertyConfigKey.diffOp,e.diffOp),diffRef:this.toAstProperty(s.PropertyConfigKey.diffRef,e.diffRef),diffContext:this.toAstProperty(s.PropertyConfigKey.diffContext,e.diffContext),diffTime:this.toAstProperty(s.PropertyConfigKey.diffTime,e.diffTime),path:this.toAstProperty(s.PropertyConfigKey.path,e.path),releaseVersion:this.toAstProperty(s.PropertyConfigKey.releaseVersion,e.releaseVersion),releaseKind:this.toAstProperty(s.PropertyConfigKey.releaseKind,e.releaseKind),releaseDate:this.toAstProperty(s.PropertyConfigKey.releaseDate,e.releaseDate),book:this.buildBooks(P,e.book),ageRange:this.toAstProperty(s.PropertyConfigKey.ageRange,e.ageRange),lang:this.toAstProperty(s.PropertyConfigKey.lang,e.lang),language:this.toAstProperty(s.PropertyConfigKey.language,e.language),publisher:this.toAstProperty(s.PropertyConfigKey.publisher,e.publisher),publisherName:this.toAstProperty(s.PropertyConfigKey.publisherName,e.publisherName),theme:this.toAstProperty(s.PropertyConfigKey.theme,e.theme),computerLanguage:this.toAstProperty(s.PropertyConfigKey.computerLanguage,e.computerLanguage),target:this.toAstProperty(s.PropertyConfigKey.target,e.target),slug:this.toAstProperty(s.PropertyConfigKey.slug,e.slug),tag:this.toAstProperty(s.PropertyConfigKey.tag,e.tag),reductionTag:this.toAstProperty(s.PropertyConfigKey.reductionTag,e.reductionTag),bubbleTag:this.toAstProperty(s.PropertyConfigKey.bubbleTag,e.bubbleTag),levelCEFRp:this.toAstProperty(s.PropertyConfigKey.levelCEFRp,e.levelCEFRp),levelCEFR:this.toAstProperty(s.PropertyConfigKey.levelCEFR,e.levelCEFR),levelILR:this.toAstProperty(s.PropertyConfigKey.levelILR,e.levelILR),levelACTFL:this.toAstProperty(s.PropertyConfigKey.levelACTFL,e.levelACTFL),icon:this.toAstProperty(s.PropertyConfigKey.icon,e.icon),iconTag:this.toAstProperty(s.PropertyConfigKey.iconTag,e.iconTag),colorTag:this.toAstProperty(s.PropertyConfigKey.colorTag,e.colorTag),flashcardSet:this.toAstProperty(s.PropertyConfigKey.flashcardSet,e.flashcardSet),subtype:this.toAstProperty(s.PropertyConfigKey.subtype,e.subtype),bookAlias:this.toAstProperty(s.PropertyConfigKey.bookAlias,e.bookAlias),bookDiff:this.toAstProperty(s.PropertyConfigKey.bookDiff,e.bookDiff),coverImage:this.toAstProperty(s.PropertyConfigKey.coverImage,e.coverImage),coverColor:this.toAstProperty(s.PropertyConfigKey.coverColor,e.coverColor),publications:this.toAstProperty(s.PropertyConfigKey.publications,e.publications),author:this.toAstProperty(s.PropertyConfigKey.author,e.author),subject:this.toAstProperty(s.PropertyConfigKey.subject,e.subject),date:this.toAstProperty(s.PropertyConfigKey.date,e.date),dateEnd:this.toAstProperty(s.PropertyConfigKey.dateEnd,e.dateEnd),location:this.toAstProperty(s.PropertyConfigKey.location,e.location),kind:this.toAstProperty(s.PropertyConfigKey.kind,e.kind),hasMarkAsDone:this.toAstProperty(s.PropertyConfigKey.hasMarkAsDone,e.hasMarkAsDone),processHandIn:this.toAstProperty(s.PropertyConfigKey.processHandIn,e.processHandIn),chatWithBook:this.toAstProperty(s.PropertyConfigKey.chatWithBook,e.chatWithBook),chatWithBookBrainKey:this.toAstProperty(s.PropertyConfigKey.chatWithBookBrainKey,e.chatWithBookBrainKey),action:this.toAstProperty(s.PropertyConfigKey.action,e.action),showInIndex:this.toAstProperty(s.PropertyConfigKey.showInIndex,e.showInIndex),refAuthor:this.toAstProperty(s.PropertyConfigKey.refAuthor,e.refAuthor),refBookTitle:this.toAstProperty(s.PropertyConfigKey.refBookTitle,e.refBookTitle),refPublisher:this.toAstProperty(s.PropertyConfigKey.refPublisher,e.refPublisher),refPublicationYear:this.toAstProperty(s.PropertyConfigKey.refPublicationYear,e.refPublicationYear),citationStyle:this.toAstProperty(s.PropertyConfigKey.citationStyle,e.citationStyle),blockId:this.toAstProperty(s.PropertyConfigKey.blockId,e.blockId),pageNo:this.toAstProperty(s.PropertyConfigKey.pageNo,e.pageNo),x:this.toAstProperty(s.PropertyConfigKey.x,e.x),y:this.toAstProperty(s.PropertyConfigKey.y,e.y),width:this.toAstProperty(s.PropertyConfigKey.width,e.width),height:this.toAstProperty(s.PropertyConfigKey.height,e.height),index:this.toAstProperty(s.PropertyConfigKey.index,e.index),classification:this.toAstProperty(s.PropertyConfigKey.classification,e.classification),availableClassifications:this.toAstProperty(s.PropertyConfigKey.availableClassifications,e.availableClassifications),allowedBit:this.toAstProperty(s.PropertyConfigKey.allowedBit,e.allowedBit),tableFixedHeader:this.toAstProperty(s.PropertyConfigKey.tableFixedHeader,e.tableFixedHeader),tableSearch:this.toAstProperty(s.PropertyConfigKey.tableSearch,e.tableSearch),tableSort:this.toAstProperty(s.PropertyConfigKey.tableSort,e.tableSort),tablePagination:this.toAstProperty(s.PropertyConfigKey.tablePagination,e.tablePagination),tablePaginationLimit:this.toAstProperty(s.PropertyConfigKey.tablePaginationLimit,e.tablePaginationLimit),tableHeight:this.toAstProperty(s.PropertyConfigKey.tableHeight,e.tableHeight),tableWhitespaceNoWrap:this.toAstProperty(s.PropertyConfigKey.tableWhitespaceNoWrap,e.tableWhitespaceNoWrap),tableAutoWidth:this.toAstProperty(s.PropertyConfigKey.tableAutoWidth,e.tableAutoWidth),tableResizableColumns:this.toAstProperty(s.PropertyConfigKey.tableResizableColumns,e.tableResizableColumns),tableColumnMinWidth:this.toAstProperty(s.PropertyConfigKey.tableColumnMinWidth,e.tableColumnMinWidth),quizCountItems:this.toAstProperty(s.PropertyConfigKey.quizCountItems,e.quizCountItems),quizStrikethroughSolutions:this.toAstProperty(s.PropertyConfigKey.quizStrikethroughSolutions,e.quizStrikethroughSolutions),codeLineNumbers:this.toAstProperty(s.PropertyConfigKey.codeLineNumbers,e.codeLineNumbers),codeMinimap:this.toAstProperty(s.PropertyConfigKey.codeMinimap,e.codeMinimap),stripePricingTableId:this.toAstProperty(s.PropertyConfigKey.stripePricingTableId,e.stripePricingTableId),stripePublishableKey:this.toAstProperty(s.PropertyConfigKey.stripePublishableKey,e.stripePublishableKey),thumbImage:this.toAstProperty(s.PropertyConfigKey.thumbImage,e.thumbImage),scormSource:this.toAstProperty(s.PropertyConfigKey.scormSource,e.scormSource),posterImage:this.toAstProperty(s.PropertyConfigKey.posterImage,e.posterImage),focusX:this.toAstProperty(s.PropertyConfigKey.focusX,e.focusX),focusY:this.toAstProperty(s.PropertyConfigKey.focusY,e.focusY),pointerLeft:this.toAstProperty(s.PropertyConfigKey.pointerLeft,e.pointerLeft),pointerTop:this.toAstProperty(s.PropertyConfigKey.pointerTop,e.pointerTop),listItemIndent:this.toAstProperty(s.PropertyConfigKey.listItemIndent,e.listItemIndent),backgroundWallpaper:this.toImageResource(P,e.backgroundWallpaper),hasBookNavigation:this.toAstProperty(s.PropertyConfigKey.hasBookNavigation,e.hasBookNavigation),duration:this.toAstProperty(s.PropertyConfigKey.duration,e.duration),deeplink:this.toAstProperty(s.PropertyConfigKey.deeplink,e.deeplink),externalLink:this.toAstProperty(s.PropertyConfigKey.externalLink,e.externalLink),externalLinkText:this.toAstProperty(s.PropertyConfigKey.externalLinkText,e.externalLinkText),videoCallLink:this.toAstProperty(s.PropertyConfigKey.videoCallLink,e.videoCallLink),vendorDashboardId:this.toAstProperty(s.PropertyConfigKey.vendorDashboardId,e.vendorDashboardId),vendorSurveyId:this.toAstProperty(s.PropertyConfigKey.vendorSurveyId,e.vendorSurveyId),vendorUrl:this.toAstProperty(s.PropertyConfigKey.vendorUrl,e.vendorUrl),search:this.toAstProperty(s.PropertyConfigKey.search,e.search),list:this.toAstProperty(s.PropertyConfigKey.list,e.list),layer:this.toAstProperty(s.PropertyConfigKey.layer,e.layer),layerRole:this.toAstProperty(s.PropertyConfigKey.layerRole,e.layerRole),textReference:this.toAstProperty(s.PropertyConfigKey.textReference,e.textReference),isTracked:this.toAstProperty(s.PropertyConfigKey.isTracked,e.isTracked),isInfoOnly:this.toAstProperty(s.PropertyConfigKey.isInfoOnly,e.isInfoOnly),imageFirst:this.toAstProperty(s.PropertyConfigKey.imageFirst,e.imageFirst),activityType:this.toAstProperty(s.PropertyConfigKey.activityType,e.activityType),labelTrue:this.toAstProperty(s.PropertyConfigKey.labelTrue,e.labelTrue),labelFalse:this.toAstProperty(s.PropertyConfigKey.labelFalse,e.labelFalse),content2Buy:this.toAstProperty(s.PropertyConfigKey.content2Buy,e.content2Buy),mailingList:this.toAstProperty(s.PropertyConfigKey.mailingList,e.mailingList),buttonCaption:this.toAstProperty(s.PropertyConfigKey.buttonCaption,e.buttonCaption),callToActionUrl:this.toAstProperty(s.PropertyConfigKey.callToActionUrl,e.callToActionUrl),caption:this.handleJsonText(P,g.TextLocation.tag,e.caption),quotedPerson:this.toAstProperty(s.PropertyConfigKey.quotedPerson,e.quotedPerson),reasonableNumOfChars:K,resolved:this.toAstProperty(s.PropertyConfigKey.resolved,e.resolved),resolvedDate:this.toAstProperty(s.PropertyConfigKey.resolvedDate,e.resolvedDate),resolvedBy:this.toAstProperty(s.PropertyConfigKey.resolvedBy,e.resolvedBy),handInAcceptFileType:this.toAstProperty(s.PropertyConfigKey.handInAcceptFileType,e.handInAcceptFileType),handInRequirement:this.toAstProperty(s.PropertyConfigKey.handInRequirement,e.handInRequirement),handInInstruction:this.toAstProperty(s.PropertyConfigKey.handInInstruction,e.handInInstruction),maxCreatedBits:this.toAstProperty(s.PropertyConfigKey.maxCreatedBits,e.maxCreatedBits),maxDisplayLevel:this.toAstProperty(s.PropertyConfigKey.maxDisplayLevel,e.maxDisplayLevel),maxTocChapterLevel:this.toAstProperty(s.PropertyConfigKey.maxTocChapterLevel,e.maxTocChapterLevel),page:this.toAstProperty(s.PropertyConfigKey.page,e.page),productId:this.toAstProperty(s.PropertyConfigKey.productId,e.productId),product:this.toAstProperty(s.PropertyConfigKey.product,e.product),productList:this.toAstProperty(s.PropertyConfigKey.productList,e.productList),productVideo:this.toAstProperty(s.PropertyConfigKey.productVideo,e.productVideo),productVideoList:this.toAstProperty(s.PropertyConfigKey.productVideoList,e.productVideoList),productFolder:this.toAstProperty(s.PropertyConfigKey.productFolder,e.productFolder),technicalTerm:this.buildTechnicalTerm(P,e.technicalTerm),servings:this.buildServings(P,e.servings),ratingLevelStart:this.buildRatingLevelStartEnd(P,e.ratingLevelStart),ratingLevelEnd:this.buildRatingLevelStartEnd(P,e.ratingLevelEnd),ratingLevelSelected:this.toAstProperty(s.PropertyConfigKey.ratingLevelSelected,e.ratingLevelSelected),markConfig:this.buildMarkConfigs(P,e.markConfig),imageSource:this.buildImageSource(P,e.imageSource),person:this.buildPerson(P,e.person),bot:this.toAstProperty(s.PropertyConfigKey.bot,e.bot),referenceProperty:this.toAstProperty(s.PropertyConfigKey.property_reference,e.referenceProperty),title:this.handleJsonText(P,g.TextLocation.tag,e.title),subtitle:this.handleJsonText(P,g.TextLocation.tag,e.subtitle),level:m.NumberUtils.asNumber(e.level),toc:this.toAstProperty(s.PropertyConfigKey.toc,e.toc),progress:this.toAstProperty(s.PropertyConfigKey.progress,e.progress),anchor:e.anchor,reference:e.reference,referenceEnd:e.referenceEnd,revealSolutions:this.toAstProperty(s.PropertyConfigKey.revealSolutions,e.revealSolutions),item:this.handleJsonText(P,g.TextLocation.tag,e.item),lead:this.handleJsonText(P,g.TextLocation.tag,e.lead),pageNumber:this.handleJsonText(P,g.TextLocation.tag,e.pageNumber),marginNumber:this.handleJsonText(P,g.TextLocation.tag,e.marginNumber),hint:this.handleJsonText(P,g.TextLocation.tag,e.hint),instruction:this.handleJsonText(P,g.TextLocation.tag,e.instruction),partialAnswer:this.toAstProperty(s.PropertyConfigKey.partialAnswer,e.partialAnswer),sampleSolution:this.toAstProperty(s.PropertyConfigKey.property_sampleSolution,e.sampleSolution),additionalSolutions:this.toAstProperty(s.PropertyConfigKey.additionalSolutions,e.additionalSolutions)},this.toExample(e.__isDefaultExample,e.example)),{imagePlaceholder:this.toImageResource(P,e.imagePlaceholder),resources:d.ArrayUtils.asArray(this.resourceBuilder.resourceFromResourceJson(P,e.resources)),body:this.buildBody(P,e.body),cardNode:k,footer:this.buildFooter(P,e.footer),extraProperties:this.parseExtraProperties(e.extraProperties),markup:e.markup,parser:e.parser,__isDefaultExample:null!==(i=e.__isDefaultExample)&&void 0!==i&&i});return a.Config.isOfBitType(_.bitType,l.BitType.interview)&&this.pushDownTree(P,void 0,void 0,k,"questions",s.PropertyConfigKey.reasonableNumOfChars,e.reasonableNumOfChars),a.Config.isOfBitType(_.bitType,l.BitType.feedback)&&this.pushDownTree(P,void 0,void 0,k,["feedbacks","reason"],s.PropertyConfigKey.reasonableNumOfChars,e.reasonableNumOfChars),this.pushDownTree(P,[_.body,...null!==(o=null===(r=null==k?void 0:k.cardBits)||void 0===r?void 0:r.map((e=>e.body)))&&void 0!==o?o:[]],[p.BodyBitType.gap],void 0,void 0,s.PropertyConfigKey.isCaseSensitive,null===(n=e.isCaseSensitive)||void 0===n||n),this.pushDownTree(P,void 0,void 0,k,"pairs",s.PropertyConfigKey.isCaseSensitive,null===(T=e.isCaseSensitive)||void 0===T||T),this.pushDownTree(P,void 0,void 0,k,["matrix","cells"],s.PropertyConfigKey.isCaseSensitive,null===(f=e.isCaseSensitive)||void 0===f||f),this.pushExampleDownTree(P,_.body,k,_.__isDefaultExample,w.example),this.setDefaultBitValues(_),this.setIsExampleFlags(_),this.addVersionToParserInfo(_),h.ObjectUtils.removeUnwantedProperties(_,{ignoreAllFalse:!0,ignoreUndefined:["example"],ignoreEmptyArrays:["item","lead","pageNumber","marginNumber","hint","instruction"]}),x.NodeValidator.validateBit(_)}buildBooks(e,t){if(b.StringUtils.isString(t))return t;if(!Array.isArray(t))return;const i=t.map((t=>this.buildBook(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildBook(e,t){var i,r,o;if(!t)return;const n={book:null!==(i=t.book)&&void 0!==i?i:"",reference:null!==(r=t.reference)&&void 0!==r?r:"",referenceEnd:null!==(o=t.referenceEnd)&&void 0!==o?o:void 0};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreEmptyString:["book","reference"]}),n}buildFeedbackChoices(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildFeedbackChoice(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildFeedbackChoice(e,t){var i;if(!t)return;const r=Object.assign({choice:null!==(i=t.choice)&&void 0!==i?i:"",requireReason:!!t.requireReason,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!0));return h.ObjectUtils.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),r}buildFeedbackReason(e,t){var i,r;if(!t)return;const o=this.handleJsonText(e,g.TextLocation.tag,"true"),n=Object.assign(Object.assign({text:null!==(i=t.text)&&void 0!==i?i:"",reasonableNumOfChars:null!==(r=t.reasonableNumOfChars)&&void 0!==r?r:void 0,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,o)),{__textAst:t.__textAst});return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example","reasonableNumOfChars"]}),n}buildChoices(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildChoice(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildChoice(e,t){var i;if(!t)return;const r=Object.assign({choice:null!==(i=t.choice)&&void 0!==i?i:"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),r}buildResponses(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildResponse(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildResponse(e,t){var i;if(!t)return;const r=Object.assign({response:null!==(i=t.response)&&void 0!==i?i:"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),r}buildBotResponses(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.botResponse(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}botResponse(e,t){var i,r,o;if(!t)return;const n={response:null!==(i=t.response)&&void 0!==i?i:"",reaction:null!==(r=t.reaction)&&void 0!==r?r:"",feedback:null!==(o=t.feedback)&&void 0!==o?o:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint)};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreEmptyString:["response","reaction","feedback"],ignoreAllFalse:!0,ignoreEmptyArrays:["item"],ignoreUndefined:["example"]}),n}buildFeedbacks(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildFeedback(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildFeedback(e,t){if(!t)return;let i,r;if(!t.choices)return;i=this.buildFeedbackChoices(e,t.choices),t.reason&&(r=this.buildFeedbackReason(e,t.reason));const o={item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),choices:i,reason:r};return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"]}),o}buildQuizzes(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildQuiz(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildQuiz(e,t){if(!t)return;const i=Object.assign({},this.toExample(t.__isDefaultExample,t.__defaultExample));let r,o;if(t.choices)r=this.buildChoices(e,t.choices),this.pushExampleDownTreeBoolean(e,t.__isDefaultExample,i.example,!0,r);else{if(!t.responses)return;o=this.buildResponses(e,t.responses),this.pushExampleDownTreeBoolean(e,t.__isDefaultExample,i.example,!1,o)}const n={item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isExample:!!t.__defaultExample,choices:r,responses:o};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"]}),n}buildHeading(e,t){var i,r,o;if(!t)return;if(null==t.forKeys)return;const n={forKeys:null!==(i=t.forKeys)&&void 0!==i?i:"",forValues:null!==(o=null!==(r=t.forValues)&&void 0!==r?r:t.__forValuesDefault)&&void 0!==o?o:""};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreEmptyString:["forKeys","forValues"],ignoreEmptyArrays:["forValues"]}),n}buildPairs(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildPair(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildPair(e,t){var i,r;if(!t)return;const o=Array.isArray(t.__valuesAst)&&t.__valuesAst.length>0?t.__valuesAst[0]:null,n=this.resourceBuilder.resourceFromResourceJson(e,t.keyAudio),a=this.resourceBuilder.resourceFromResourceJson(e,t.keyImage),s=Object.assign(Object.assign({key:null!==(i=t.key)&&void 0!==i?i:"",keyAudio:n,keyImage:a,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isCaseSensitive:t.isCaseSensitive},this.toExample(t.__isDefaultExample,t.example,o)),{values:null!==(r=t.values)&&void 0!==r?r:[],__valuesAst:t.__valuesAst});return h.ObjectUtils.removeUnwantedProperties(s,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction","values"],ignoreUndefined:["example","isCaseSensitive"]}),s}buildMatricies(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildMatrix(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildMatrix(e,t){var i,r,o;if(!t)return;let n=!1;for(const e of null!==(i=t.cells)&&void 0!==i?i:[])t.__isDefaultExample&&!e.isExample&&(e.isExample=!0),n=!!e.isExample||n;const a={key:null!==(r=t.key)&&void 0!==r?r:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isExample:n,cells:(null!==(o=t.cells)&&void 0!==o?o:[]).map((t=>this.buildMatrixCell(e,t))).filter((e=>null!=e))};return h.ObjectUtils.removeUnwantedProperties(a,{ignoreAllFalse:!0,ignoreEmptyArrays:["hint","item","cells"],ignoreUndefined:["isCaseSensitive"]}),a}buildMatrixCell(e,t){var i;if(!t)return;const r=Array.isArray(t.__valuesAst)&&t.__valuesAst.length>0?t.__valuesAst[0]:null,o=Object.assign(Object.assign({values:null!==(i=t.values)&&void 0!==i?i:[],item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isCaseSensitive:t.isCaseSensitive},this.toExample(t.__isDefaultExample,t.example,r)),{__valuesAst:t.__valuesAst});return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreEmptyArrays:["instruction","item","values"],ignoreUndefined:["example","isCaseSensitive"]}),o}buildPronunciationTable(e,t){var i;if(!t)return;return{data:(null!==(i=t.data)&&void 0!==i?i:[]).map((t=>(null!=t?t:[]).map((t=>{const i=this.resourceBuilder.resourceFromResourceJson(e,t.audio);return{title:this.handleJsonText(e,g.TextLocation.tag,t.title),body:this.handleJsonText(e,g.TextLocation.tag,t.body),audio:i}}))))}}buildTable(e,t){var i,r;if(!t)return;return{columns:(null!==(i=t.columns)&&void 0!==i?i:[]).map((t=>this.handleJsonText(e,g.TextLocation.tag,t))),data:(null!==(r=t.data)&&void 0!==r?r:[]).map((t=>(null!=t?t:[]).map((t=>this.handleJsonText(e,g.TextLocation.tag,t)))))}}buildQuestions(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildQuestion(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildQuestion(e,t){var i,r,o,n,a;if(!t)return;const s=t.__sampleSolutionAst,l=Object.assign(Object.assign({question:null!==(i=t.question)&&void 0!==i?i:"",partialAnswer:null!==(r=t.partialAnswer)&&void 0!==r?r:"",sampleSolution:null!==(o=t.sampleSolution)&&void 0!==o?o:"",additionalSolutions:null!==(n=t.additionalSolutions)&&void 0!==n?n:void 0,reasonableNumOfChars:null!==(a=t.reasonableNumOfChars)&&void 0!==a?a:void 0,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,s)),{__sampleSolutionAst:t.__sampleSolutionAst});return h.ObjectUtils.removeUnwantedProperties(l,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"],ignoreEmptyString:["question","partialAnswer","sampleSolution"]}),l}buildIngredients(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildIngredient(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildIngredient(e,t){var i,r,o,n,a,s,l,p;if(!t)return;const c={title:null!==(i=t.title)&&void 0!==i?i:"",checked:null!==(r=t.checked)&&void 0!==r&&r,item:null!==(o=t.item)&&void 0!==o?o:"",quantity:null!==(n=t.quantity)&&void 0!==n?n:0,unit:null!==(a=t.unit)&&void 0!==a?a:"",unitAbbr:null!==(s=t.unitAbbr)&&void 0!==s?s:"",decimalPlaces:null!==(l=t.decimalPlaces)&&void 0!==l?l:1,disableCalculation:null!==(p=t.disableCalculation)&&void 0!==p&&p};return h.ObjectUtils.removeUnwantedProperties(c,{ignoreAllFalse:!0,ignoreEmptyString:["item","unit"]}),c}buildBody(e,t){if(!t)return;let i;const r=[],a=t.placeholders,s=t.bodyString,{textFormat:l}=e,c=()=>{var s;let c,u=t.body;const y={};if(b.StringUtils.isString(t.body)?(c=(null!==(s=t.body)&&void 0!==s?s:"").trim(),u=[]):Array.isArray(t.body)||(u=[]),a)for(const[e,t]of Object.entries(a))y[e]=t;if(c){c=n.Breakscape.breakscape(c,{textFormat:l,textLocation:g.TextLocation.body,v2:!0});let e=0;const t=[];for(const[i,r]of Object.entries(y))if(c){const o=`[!${e}]`;c=c.replace(`${i}`,o),t.push(r),e++}u=this.textParser.toAst(c,{textFormat:l,textLocation:g.TextLocation.body});const i=e=>{for(let r=0,o=e.length;r<o;r++){const o=e[r];if("bit"===o.type){const i=o.index;null!=t[i]&&(e[r]=t[i])}else o.content&&i(o.content)}};i(u)}u=(0,o.default)(u),this.textParser.walkBodyBits(u,((t,i,o)=>{let n;switch(o.type){case p.BodyBitType.gap:n=this.buildGap(e,o);break;case p.BodyBitType.mark:n=this.buildMark(e,o);break;case p.BodyBitType.select:n=this.buildSelect(e,o);break;case p.BodyBitType.highlight:n=this.buildHighlight(e,o)}null!=n&&(t[i]=n,r.push(n))})),i=u,i.__tag="text"},u=l===y.TextFormat.bitmarkText;l===y.TextFormat.json?(()=>{if("string"==typeof t.body)try{i=JSON.parse(t.body)}catch(e){i=null}else i=t.body})():u?c():i=t.body;return{body:i,bodyBits:r,bodyString:s}}buildFooter(e,t){if(!t)return;return{footer:this.handleJsonText(e,g.TextLocation.body,t.footer)}}buildGap(e,t){var i;if(!t)return;const r=Array.isArray(t.__solutionsAst)&&t.__solutionsAst.length>0?t.__solutionsAst[0]:null;t=this.bodyBitCopyFromAttrs(t);const o=Object.assign(Object.assign({type:p.BodyBitType.gap,solutions:null!==(i=t.solutions)&&void 0!==i?i:[],item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isCaseSensitive:t.isCaseSensitive},this.toExample(t.__isDefaultExample,t.example,r)),{__solutionsAst:t.__solutionsAst,attrs:{}});return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example","isCaseSensitive"]}),o}buildMarkConfigs(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildMarkConfig(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildMarkConfig(e,t){var i,r,o;if(!t)return;const n={mark:null!==(i=t.mark)&&void 0!==i?i:"unknown",color:null!==(r=t.color)&&void 0!==r?r:"",emphasis:null!==(o=t.emphasis)&&void 0!==o?o:""};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllEmptyString:!0}),n}buildMark(e,t){var i,r;if(!t)return;t=this.bodyBitCopyFromAttrs(t);const o=Object.assign(Object.assign({type:p.BodyBitType.mark,solution:null!==(i=t.solution)&&void 0!==i?i:"",mark:null!==(r=t.mark)&&void 0!==r?r:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!0)),{attrs:{}});return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"],ignoreEmptyString:["solution","mark"]}),o}buildSelect(e,t){var i,r,o;if(!t)return;t=this.bodyBitCopyFromAttrs(t);const n=Object.assign(Object.assign({type:p.BodyBitType.select,options:null!==(i=this.buildSelectOptions(e,t.options))&&void 0!==i?i:[],prefix:null!==(r=t.prefix)&&void 0!==r?r:"",postfix:null!==(o=t.postfix)&&void 0!==o?o:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(!1,void 0,void 0)),{__hintString:t.__hintString,__instructionString:t.__instructionString,attrs:{}});return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreEmptyString:["prefix","postfix"]}),n}buildSelectOptions(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildSelectOption(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildSelectOption(e,t){var i;if(!t)return;const r=Object.assign({text:null!==(i=t.text)&&void 0!==i?i:"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"]}),r}buildHighlight(e,t){var i,r,o;if(!t)return;t=this.bodyBitCopyFromAttrs(t);const n=Object.assign(Object.assign({type:p.BodyBitType.highlight,texts:null!==(i=this.buildHighlightTexts(e,t.texts))&&void 0!==i?i:[],prefix:null!==(r=t.prefix)&&void 0!==r?r:"",postfix:null!==(o=t.postfix)&&void 0!==o?o:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(!1,void 0,void 0)),{attrs:{}});return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreEmptyString:["prefix","postfix"]}),n}buildHighlightTexts(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildHighlightText(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildHighlightText(e,t){var i;if(!t)return;const r=Object.assign({text:null!==(i=t.text)&&void 0!==i?i:"",isCorrect:!!t.isCorrect,isHighlighted:!!t.isHighlighted,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"]}),r}buildFlashcards(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildFlashcard(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildFlashcard(e,t){var i;if(!t)return;const r=Object.assign({question:this.buildTextAndIcon(e,t.question),answer:this.buildTextAndIcon(e,t.answer),alternativeAnswers:(null!==(i=t.alternativeAnswers)&&void 0!==i?i:[]).map((t=>this.buildTextAndIcon(e,t))).filter((e=>null!=e)),item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!0));return h.ObjectUtils.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["question","answer","alternativeAnswers","item","hint","instruction"],ignoreUndefined:["example"]}),r}buildDefinitionList(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildDefinitionListItem(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildDefinitionListItem(e,t){var i;if(!t)return;const{bitType:r}=e,o=a.Config.isOfBitType(r,[l.BitType.metaSearchDefaultTerms]),n=Object.assign({term:this.buildTextAndIcon(e,t.term,o),definition:this.buildTextAndIcon(e,t.definition,o),alternativeDefinitions:(null!==(i=t.alternativeDefinitions)&&void 0!==i?i:[]).map((t=>this.buildTextAndIcon(e,t,o))).filter((e=>null!=e)),item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!0));return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreEmptyArrays:["question","answer","alternativeDefinitions","item","hint","instruction"],ignoreUndefined:["example"]}),n}buildTextAndIcon(e,t,i=!1){const r=this.resourceBuilder.resourceFromResourceJson(e,null==t?void 0:t.icon);let o=this.handleJsonText(e,g.TextLocation.tag,null==t?void 0:t.text);i&&(o=this.textGenerator.generateSync(o,y.TextFormat.plainText,g.TextLocation.body,{noBreakscaping:!0}).trim());const n={text:o,icon:r};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreEmptyArrays:["text"],ignoreUndefined:["icon"]}),n}buildStatements(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildStatement(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildStatement(e,t){var i;if(!t)return;const r=Object.assign({statement:null!==(i=t.statement)&&void 0!==i?i:"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreUndefined:["example"]}),r}buildImageSource(e,t){if(!t)return;const{url:i,mockupId:r,size:o,format:n,trim:a}=t,s={url:null!=i?i:"",mockupId:null!=r?r:"",size:null!=o?o:null,format:null!=n?n:null,trim:f.BooleanUtils.isBoolean(a)?a:null};return h.ObjectUtils.removeUnwantedProperties(s,{ignoreFalse:["trim"],ignoreEmptyString:["url","mockupId"],ignoreAllUndefined:!0}),s}buildPerson(e,t){if(!t)return;const{name:i,title:r,avatarImage:o}=t,n={name:null!=i?i:"",title:null!=r?r:void 0,avatarImage:this.resourceBuilder.resourceFromResourceJson(e,o)};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreEmptyString:["name"],ignoreAllUndefined:!0}),n}buildTechnicalTerm(e,t){if(!t)return;const{technicalTerm:i,lang:r}=t,o={technicalTerm:null!=i?i:"",lang:null!=r?r:""};return h.ObjectUtils.removeUnwantedProperties(o,{ignoreEmptyString:["technicalTerm"]}),o}buildServings(e,t){if(!t)return;const{servings:i,unit:r,unitAbbr:o,decimalPlaces:n,disableCalculation:a,hint:s}=t,l={servings:null!=i?i:0,unit:null!=r?r:"",unitAbbr:null!=o?o:"",decimalPlaces:null!=n?n:1,disableCalculation:null!=a&&a,hint:null!=s?s:""};return h.ObjectUtils.removeUnwantedProperties(l,{ignoreEmptyString:["servings","unit"]}),l}buildRatingLevelStartEnd(e,t){if(!t)return;const{level:i,label:r}=t,o={level:null!=i?i:0,label:this.handleJsonText(e,g.TextLocation.tag,r)};return h.ObjectUtils.removeUnwantedProperties(o,{}),o}buildCardBits(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildCardBit(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildCardBit(e,t){if(!t)return;const{bitType:i,textFormat:r}=e,o=this.buildBit(Object.assign(Object.assign({},t),{bitType:i,textFormat:r}));return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreUndefined:["example"]}),x.NodeValidator.validateCardBit(o)}toImageResource(e,t){return d.ArrayUtils.asSingle(this.resourceBuilder.resourceFromResourceDataJson(e,u.ResourceTag.image,null==t?void 0:t.image))}buildCardNode(e,t){var i;const r={heading:this.buildHeading(e,t.heading),questions:this.buildQuestions(e,t.questions),elements:t.elements,flashcards:this.buildFlashcards(e,t.flashcards),definitions:this.buildDefinitionList(e,null!==(i=t.definitions)&&void 0!==i?i:t.legend),statement:this.buildStatement(e,t.statement),statements:this.buildStatements(e,t.statements),choices:this.buildChoices(e,t.choices),responses:this.buildResponses(e,t.responses),feedbacks:this.buildFeedbacks(e,t.feedbacks),quizzes:this.buildQuizzes(e,t.quizzes),pairs:this.buildPairs(e,t.pairs),matrix:this.buildMatricies(e,t.matrix),pronunciationTable:this.buildPronunciationTable(e,t.pronunciationTable),table:this.buildTable(e,t.table),botResponses:this.buildBotResponses(e,t.botResponses),ingredients:this.buildIngredients(e,t.ingredients),cardBits:this.buildCardBits(e,t.cardBits)};return h.ObjectUtils.removeUnwantedProperties(r),Object.keys(r).length>0?r:void 0}bodyBitCopyFromAttrs(e){const t=Object.assign({},e);if(e.attrs)for(const[i,r]of Object.entries(e.attrs))t[i]=r;return t}pushExampleDownTree(e,t,i,r,o){if(r||null!=o){if(i){if(this.pushExampleDownTreeString(e,r,o,i.pairs),this.pushExampleDownTreeBoolean(e,r,o,!1,i.flashcards),this.pushExampleDownTreeBoolean(e,r,o,!1,i.definitions),this.pushExampleDownTreeBoolean(e,r,o,!0,i.choices),this.pushExampleDownTreeBoolean(e,r,o,!1,i.responses,i.statements,i.statement),i.quizzes)for(const t of i.quizzes)this.pushExampleDownTreeBoolean(e,r,o,!0,t.choices),this.pushExampleDownTreeBoolean(e,r,o,!1,t.responses);if(i.matrix)for(const t of i.matrix)this.pushExampleDownTreeString(e,r,o,t.cells)}t&&this.pushExampleDownTreeBodyBits(e,r,o,t)}}pushExampleDownTreeBoolean(e,t,i,r,...o){if((t||null!=i)&&Array.isArray(o))for(const e of o)if(e){const o=Array.isArray(e)?e:[e];T.BitUtils.fillBooleanExample(o,t,i,r)}}pushExampleDownTreeString(e,t,i,...r){if((t||i)&&Array.isArray(r))for(const o of r)if(o){const r=Array.isArray(o)?o:[o];T.BitUtils.fillStringExample(e.textFormat,r,t,i,!1)}}pushExampleDownTreeBodyBits(e,t,i,r){if(!t&&!i)return;const o=this.textParser.extractBodyBits(null==r?void 0:r.body);for(const r of o)if(r)switch(r.type){case p.BodyBitType.gap:{const o=r;T.BitUtils.fillStringExample(e.textFormat,[o],t,i,!1);break}case p.BodyBitType.mark:{const e=r;T.BitUtils.fillBooleanExample([e],t,i,!1);break}case p.BodyBitType.select:{const e=r;T.BitUtils.fillBooleanExample(e.options,t,i,!0);break}case p.BodyBitType.highlight:{const e=r;T.BitUtils.fillBooleanExample(e.texts,t,i,!0);break}}}pushDownTree(e,t,i,r,o,n,a){if(void 0!==a){if(r&&o){Array.isArray(o)||(o=[o]);const e=h.ObjectUtils.flatMapPath(r,o);for(const t of e)null==t[n]&&(t[n]=a)}if(t){const e=Array.isArray(t)?t:[t];for(const t of e)if(t&&t.body&&i){const e=this.textParser.extractBodyBits(t.body);if(i&&e&&e.length>0)for(const t of e)if(t&&-1!==i.indexOf(t.type)){const e=t;null==e[n]&&(e[n]=a)}}}}}parseExtraProperties(e){if(!e)return;const t=Object.entries(e);if(0===t.length)return;const i={};for(const[e,r]of t)i[e]=d.ArrayUtils.asArray(r)||[r];return i}setIsExampleFlags(e){var t,i,r,o,n,a,s,l,c,u,y,g,d,T;const f=t=>!!t&&(t.isExample||null!=t.example?(t.isExample=!0,e.isExample=!0):t.isExample=t===e&&!!e.isExample,t.isExample),{body:m,cardNode:h}=e,b=this.textParser.extractBodyBits(null==m?void 0:m.body);for(const e of b)switch(e.type){case p.BodyBitType.gap:case p.BodyBitType.mark:f(e);break;case p.BodyBitType.select:{const t=e;let i=!1;for(const e of t.options)i=!!f(e)||i;t.isExample=i;break}case p.BodyBitType.highlight:{const t=e;let i=!1;for(const e of t.texts)i=!!f(e)||i;t.isExample=i;break}}if(h){for(const e of null!==(t=h.flashcards)&&void 0!==t?t:[])f(e);for(const e of null!==(i=h.definitions)&&void 0!==i?i:[])f(e);for(const e of null!==(r=h.pairs)&&void 0!==r?r:[])f(e);for(const e of null!==(o=h.matrix)&&void 0!==o?o:[]){let t=!1;for(const i of null!==(n=e.cells)&&void 0!==n?n:[])t=!!f(i)||t;e.isExample=t}for(const e of null!==(a=h.quizzes)&&void 0!==a?a:[]){let t=!1;for(const i of null!==(s=e.responses)&&void 0!==s?s:[])t=!!f(i)||t;for(const i of null!==(l=e.choices)&&void 0!==l?l:[])t=!!f(i)||t;e.isExample=t}for(const e of null!==(c=h.responses)&&void 0!==c?c:[])f(e);for(const e of null!==(u=h.choices)&&void 0!==u?u:[])f(e);for(const e of null!==(y=h.statements)&&void 0!==y?y:[])f(e);f(h.statement);for(const e of null!==(g=h.questions)&&void 0!==g?g:[])f(e)}f(e.statement);for(const t of null!==(d=e.responses)&&void 0!==d?d:[])f(t);for(const t of null!==(T=e.choices)&&void 0!==T?T:[])f(t);f(e)}setDefaultBitValues(e){switch(e.bitType){case l.BitType.articleAi:case l.BitType.noteAi:case l.BitType.summaryAi:e.aiGenerated=this.toAstProperty(s.PropertyConfigKey.aiGenerated,!0)}}addVersionToParserInfo(e){var t;const i=null!==(t=e.parser)&&void 0!==t?t:{};i.version=B.env.appVersion.full,e.parser=i}}t.Builder=P},5814:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardSetConfig=void 0;t.CardSetConfig=class{constructor(e,t){this.configKey=e,this.variants=t}toString(e){const t=Object.assign({},e);let i="",r=0,o=0;for(const e of this.variants){for(const n of e)i+=`[Card - Side ${r}, Variant ${o}]`,i+=`\n${n.toString(t)}`,o++;r++}return i}}},5837:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GROUPS=void 0;const r=i(7112),o=i(6915),n=i(9888),a=i(5051),s=i(7797),l=i(5512),p=i(3778),c=i(6149),u={[r.GroupConfigKey.group_standardAllBits]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.id,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.customerId},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.externalId,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.aiGenerated},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.machineTranslated},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.searchIndex,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.analyticsTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.categoryTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.topicTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.altLangTag},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.feedbackEngine},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.feedbackType},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.disableFeedback},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffTo},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffOp},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffRef},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffContext},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffTime},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.ageRange,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.lang},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.publisher,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.publisherName,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.theme,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.target,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reductionTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.bubbleTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.levelCEFRp},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.levelCEFR},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.levelILR},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.levelACTFL},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.icon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.iconTag},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.colorTag,maxCount:p.Count.infinity},{type:l.BitTagType.tag,configKey:s.TagConfigKey.anchor},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.search},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.showInIndex},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.layer,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.layerRole,maxCount:p.Count.infinity}]},[r.GroupConfigKey.group_standardItemLeadInstructionHint]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.itemLead,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.itemLead,maxCount:3}]},{type:l.BitTagType.tag,configKey:s.TagConfigKey.instruction},{type:l.BitTagType.tag,configKey:s.TagConfigKey.hint}]},[r.GroupConfigKey.group_standardExample]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.example}]},[r.GroupConfigKey.group_standardTags]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardAllBits},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardExample}]},[r.GroupConfigKey.group_imageSource]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.imageSource,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mockupId},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.size},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.format},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.trim}]}]},[r.GroupConfigKey.group_technicalTerm]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.technicalTerm,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.lang}]}]},[r.GroupConfigKey.group_person]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.person,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_title},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImage}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.partner,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_title},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImage}]}]},[r.GroupConfigKey.group_gap]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.gap,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.gap,maxCount:p.Count.infinity},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardExample},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}]}]},[r.GroupConfigKey.group_trueFalse]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:p.Count.infinity},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:p.Count.infinity},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardExample}]},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:p.Count.infinity},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:p.Count.infinity},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardExample}]}]},[r.GroupConfigKey.group_markConfig]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.markConfig,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.color},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.emphasis}]}]},[r.GroupConfigKey.group_mark]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_mark,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_mark},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardExample}]}]},[r.GroupConfigKey.group_bookCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.language,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.customerExternalId,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.spaceId,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.kind},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.hasMarkAsDone},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.processHandIn},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isPublic},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.chatWithBook},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.chatWithBookBrainKey},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title,maxCount:2},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.subtype,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.coverImage,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.coverColor},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.subject,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.author,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.publications,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.maxTocChapterLevel}]},[r.GroupConfigKey.group_learningPathCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.action},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.date},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.dateEnd},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.location},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.list,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.textReference},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isTracked},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isInfoOnly},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.deeplink},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.book,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference,maxCount:2}]}]},[r.GroupConfigKey.group_quizCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.revealSolutions}]},[r.GroupConfigKey.group_resourceBitTags]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imagePlaceholder,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImageCommon}],maxCount:1}]},[r.GroupConfigKey.group_resourceCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.license},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.copyright},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.caption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.showInIndex},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.search}]},[r.GroupConfigKey.group_resourceImageCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src1x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src2x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src3x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src4x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.alt},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.zoomDisabled}]},[r.GroupConfigKey.group_resourceAudioCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mute},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.autoplay}]},[r.GroupConfigKey.group_resourceVideoCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mute},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.autoplay},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.allowSubtitles},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.showSubtitles},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.alt},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.posterImage,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImageCommon}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src1x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src2x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src3x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src4x}]},[r.GroupConfigKey.group_resourceIcon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.icon,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImageCommon}]}]},[r.GroupConfigKey.group_resourceImage]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.image,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImageCommon}]}]},[r.GroupConfigKey.group_resourceImagePortrait]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imagePortrait,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImageCommon}]}]},[r.GroupConfigKey.group_resourceImageLandscape]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imageLandscape,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImageCommon}]}]},[r.GroupConfigKey.group_resourceImageEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imageEmbed,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImageCommon}]}]},[r.GroupConfigKey.group_resourceImageLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imageLink,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImageCommon}]}]},[r.GroupConfigKey.group_resourceAudio]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audio,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceAudioCommon}]}]},[r.GroupConfigKey.group_resourceAudioEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audioEmbed,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceAudioCommon}]}]},[r.GroupConfigKey.group_resourceAudioLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audioLink,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceAudioCommon}]}]},[r.GroupConfigKey.group_resourceVideo]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.video,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceVideoCommon}]}]},[r.GroupConfigKey.group_resourceVideoEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.videoEmbed,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceVideoCommon}]}]},[r.GroupConfigKey.group_resourceVideoLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.videoLink,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceVideoCommon}]}]},[r.GroupConfigKey.group_resourceStillImageFilmEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.stillImageFilmEmbed,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceVideoCommon}]}]},[r.GroupConfigKey.group_resourceStillImageFilmLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.stillImageFilmLink,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceVideoCommon}]}]},[r.GroupConfigKey.group_resourceArticle]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.article,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon}]}]},[r.GroupConfigKey.group_resourceArticleEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.articleEmbed,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon}]}]},[r.GroupConfigKey.group_resourceArticleLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.articleLink,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon}]}]},[r.GroupConfigKey.group_resourceDocument]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.document,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon}]}]},[r.GroupConfigKey.group_resourceDocumentEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.documentEmbed,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon}]}]},[r.GroupConfigKey.group_resourceDocumentLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.documentLink,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon}]}]},[r.GroupConfigKey.group_resourceDocumentDownload]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.documentDownload,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon}]}]},[r.GroupConfigKey.group_resourceAppLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.appLink,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon}]}]},[r.GroupConfigKey.group_resourceWebsiteLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.websiteLink,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon}]}]},[r.GroupConfigKey.group_resourceStillImageFilm]:{type:o.GroupConfigType.comboResource,comboResourceType:c.ResourceTag.stillImageFilm,tags:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImage,maxCount:1,minCount:1},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceAudio,maxCount:1,minCount:1}]},[r.GroupConfigKey.group_resourceImageResponsive]:{type:o.GroupConfigType.comboResource,comboResourceType:c.ResourceTag.imageResponsive,tags:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImagePortrait,maxCount:1,minCount:1},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImageLandscape,maxCount:1,minCount:1}]}};t.GROUPS=u},5854:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitType=void 0;const r=(0,i(4718).superenum)({_error:"_error",_comment:"_comment",_standard:"_standard",aiPrompt:"ai-prompt",anchor:"anchor",appAiPrompt:"app-ai-prompt",appBitmarkFromEditor:"app-bitmark-from-editor",appBitmarkFromJavascript:"app-bitmark-from-javascript",appCodeCell:"app-code-cell",appCodeEditor:"app-code-editor",appCodeIde:"app-code-ide",appCreateBitsFromImage:"app-create-bits-from-image",appFlashcards:"app-flashcards",appFlashcardsLearn:"app-flashcards-learn",appFlashcardsQuiz:"app-flashcards-quiz",appGetScreenshot:"app-get-screenshot",appLink:"app-link",article:"article",articleAi:"article-ai",articleAlt:"article-alt",articleAttachment:"article-attachment",articleEmbed:"article-embed",articleLink:"article-link",articleResponsive:"article-responsive",articleResponsiveAlt:"article-responsive-alt",assignment:"assignment",assignmentList:"assignment-list",audio:"audio",audioEmbed:"audio-embed",audioLink:"audio-link",audioTranscript:"audio-transcript",bitAlias:"bit-alias",bitBookEnding:"bit-book-ending",bitBookSummary:"bit-book-summary",bitmarkExample:"bitmark-example",blogArticle:"blog-article",book:"book",bookAcknowledgements:"book-acknowledgements",bookAddendum:"book-addendum",bookAfterword:"book-afterword",bookAlias:"book-alias",bookAppendix:"book-appendix",bookArticle:"book-article",bookAutherBio:"book-author-bio",bookBibliography:"book-bibliography",bookClose:"book-close",bookComingSoon:"book-coming-soon",bookConclusion:"book-conclusion",bookCopyright:"book-copyright",bookCopyrightPermissions:"book-copyright-permissions",bookCover:"book-cover",bookDedication:"book-dedication",bookDiff:"book-diff",bookEnd:"book-end",bookEndnotes:"book-endnotes",bookEpigraph:"book-epigraph",bookEpilogue:"book-epilogue",bookForword:"book-foreword",bookFrontispiece:"book-frontispiece",bookImprint:"book-imprint",bookIncitingIncident:"book-inciting-incident",bookIntroduction:"book-introduction",bookLink:"book-link",bookLinkNext:"book-link-next",bookLinkPrev:"book-link-prev",bookListOfContributors:"book-list-of-contributors",bookNotes:"book-notes",bookPostscript:"book-postscript",bookPreface:"book-preface",bookPrologue:"book-prologue",bookReadMore:"book-read-more",bookReference:"book-reference",bookReferenceList:"book-reference-list",bookRequestForABookReview:"book-request-for-a-book-review",bookSummary:"book-summary",bookTeaser:"book-teaser",bookTitle:"book-title",botActionAnnounce:"bot-action-announce",botActionRatingNumber:"bot-action-rating-number",botActionRemind:"bot-action-remind",botActionResponse:"bot-action-response",botActionSave:"bot-action-save",botActionSend:"bot-action-send",botActionTrueFalse:"bot-action-true-false",botInterview:"bot-interview",browserImage:"browser-image",bug:"bug",bugAlt:"bug-alt",bugCollapsible:"bug-collapsible",buttonCopyText:"button-copy-text",callToAction:"call-to-action",callToActionBookNow:"call-to-action-book-now",callToActionContact:"call-to-action-contact",callToActionCreateAccount:"call-to-action-create-account",callToActionDownload:"call-to-action-download",callToActionGetNow:"call-to-action-get-now",callToActionGetOffer:"call-to-action-get-offer",callToActionJoin:"call-to-action-join",callToActionLearnMore:"call-to-action-learn-more",callToActionMail:"call-to-action-mail",callToActionSeeMore:"call-to-action-see-more",callToActionShopNow:"call-to-action-shop-now",callToActionStartNow:"call-to-action-start-now",callToActionSubscribe:"call-to-action-subscribe",callToActionWatch:"call-to-action-watch",card1:"card-1",chapter:"chapter",chapterSubjectMatter:"chapter-subject-matter",chat:"chat",checklist:"checklist",cloze:"cloze",clozeAndMultipleChoiceText:"cloze-and-multiple-choice-text",clozeInstructionGrouped:"cloze-instruction-grouped",clozeList:"cloze-list",clozeSeveral:"cloze-several",clozeSolutionGrouped:"cloze-solution-grouped",coachAudioTranscript:"coach-audio-transcript",coachCallToActionChecklist:"coach-call-to-action-checklist",coachCallToActionCloze:"coach-call-to-action-cloze",coachCallToActionClozeAndMultipleChoiceText:"coach-call-to-action-cloze-and-multiple-choice-text",coachCallToActionEssay:"coach-call-to-action-essay",coachCallToActionMultipleChoiceText:"coach-call-to-action-multiple-choice-text",coachHomeRules:"coach-home-rules",coachSelfReflectionCloze:"coach-self-reflection-cloze",coachSelfReflectionEssay:"coach-self-reflection-essay",coachSelfReflectionMultipleChoice:"coach-self-reflection-multiple-choice",coachSelfReflectionMultipleChoice1:"coach-self-reflection-multiple-choice-1",coachSelfReflectionMultipleChoiceText:"coach-self-reflection-multiple-choice-text",coachSelfReflectionMultipleResponse:"coach-self-reflection-multiple-response",coachSelfReflectionMultipleResponse1:"coach-self-reflection-multiple-response-1",coachSelfReflectionRating:"coach-self-reflection-rating",coachVideoTranscript:"coach-video-transcript",code:"code",codeRuntime:"code-runtime",collapsible:"collapsible",conclusion:"conclusion",conclusionAlt:"conclusion-alt",consoleLog:"console-log",container:"container",containerAccordionTabs:"container-accordion-tabs",containerBits2:"container-bits-2",containerCards:"container-cards",containerCarousel:"container-carousel",containerCookRecipe:"container-cook-recipe",containerFolder:"container-folder",containerFolderAll:"container-folder-all",containerGallery:"container-gallery",containerGrid:"container-grid",containerGroup:"container-group",containerNewsArticle:"container-news-article",containerNowrap:"container-nowrap",containerNowrapStretch:"container-nowrap-stretch",containerPreview:"container-preview",containerScroller:"container-scroller",containerSlides:"container-slides",containerStack:"container-stack",containerTabs:"container-tabs",containerWrap:"container-wrap",conversationLeft1:"conversation-left-1",conversationLeft1Scream:"conversation-left-1-scream",conversationLeft1Thought:"conversation-left-1-thought",conversationRight1:"conversation-right-1",conversationRight1Scream:"conversation-right-1-scream",conversationRight1Thought:"conversation-right-1-thought",cookArrangement:"cook-arrangement",cookIngredients:"cook-ingredients",cookInsert:"cook-insert",cookNoteOnQuantity:"cook-note-on-quantity",cookPersonalRecommendation:"cook-personal-recommendation",cookPlate:"cook-plate",cookPracticeAdvise:"cook-practice-advise",cookPreparation:"cook-preparation",cookRecommendation:"cook-recommendation",cookRemark:"cook-remark",cookSideDish:"cook-side-dish",cookSideDrink:"cook-side-drink",cookStep:"cook-step",cookTimer:"cook-timer",cookVariation:"cook-variation",correction:"correction",danger:"danger",dangerAlt:"danger-alt",dangerCollapsible:"danger-collapsible",definitionList:"definition-list",definitionTerm:"definition-term",deleted:"deleted",details:"details",details1:"details-1",detailsImage:"details-image",diff:"diff",document:"document",documentDownload:"document-download",documentEmbed:"document-embed",documentLink:"document-link",documentUpload:"document-upload",editorial:"editorial",editorNote:"editor-note",essay:"essay",example:"example",exampleAlt:"example-alt",exampleCollapsible:"example-collapsible",exampleList:"example-list",extractorAiChat:"extractor-ai-chat",extractorBlock:"extractor-block",extractorConfiguration:"extractor-configuration",extractorInformation:"extractor-information",extractorPage:"extractor-page",extractorPageCollapsible:"extractor-page-collapsible",extractorPageFooter:"extractor-page-footer",extractorPageFooterCollapsible:"extractor-page-footer-collapsible",extractorPageHeader:"extractor-page-header",extractorPageHeaderCollapsible:"extractor-page-header-collapsible",extractorPageNumber:"extractor-page-number",extractorPageNumberCollapsible:"extractor-page-number-collapsible",extractorPageWithBlocks:"extractor-page-with-blocks",extractorPageWithBlocksCollapsible:"extractor-page-with-blocks-collapsible",extractorRepeatedText:"extractor-repeated-text",featured:"featured",feedback:"feedback",figure:"figure",flashcard:"flashcard",flashcard1:"flashcard-1",focusImage:"focus-image",footNote:"foot-note",formula:"formula",gapText:"gap-text",gapTextInstructionGrouped:"gap-text-instruction-grouped",glossaryTerm:"glossary-term",groupBorn:"group-born",groupDied:"group-died",handInAudio:"hand-in-audio",handInContact:"hand-in-contact",handInDocument:"hand-in-document",handInFile:"hand-in-file",handInLocation:"hand-in-location",handInPhoto:"hand-in-photo",handInScan:"hand-in-scan",handInSubmit:"hand-in-submit",handInVideo:"hand-in-video",handInVoice:"hand-in-voice",help:"help",helpAlt:"help-alt",highlightText:"highlight-text",hint:"hint",hintAlt:"hint-alt",hintCollapsible:"hint-collapsible",image:"image",imageBanner:"image-banner",imageFigure:"image-figure",imageFigureAlt:"image-figure-alt",imageLandscape:"image-landscape",imageLink:"image-link",imageMood:"image-mood",imageOnDevice:"image-on-device",imagePortrait:"image-portrait",imagePrototype:"image-prototype",imageResponsive:"image-responsive",imageScreenshot:"image-screenshot",imageSeparator:"image-separator",imageSeparatorAlt:"image-separator-alt",imagesLogoGrave:"images-logo-grave",imageStyled:"image-styled",imageSuperWide:"image-super-wide",imageZoom:"image-zoom",indexTerm:"index-term",info:"info",infoAlt:"info-alt",infoCollapsible:"info-collapsible",internalLink:"internal-link",interview:"interview",interviewInstructionGrouped:"interview-instruction-grouped",langAudioScript:"lang-audio-script",langEnablingLanguageSkills:"lang-enabling-language-skills",langEnglishAroundWorld:"lang-english-around-world",langExtraActivity:"lang-extra-activity",langGoodToKnow:"lang-good-to-know",langHomework:"lang-homework",langLearningGoal:"lang-learning-goal",langLearningOutcomes:"lang-learning-outcomes",langLearningStrategy:"lang-learning-strategy",langLevelDown:"lang-level-down",langLevelUp:"lang-level-up",langLifeSkillIcon:"lang-life-skill-icon",langLifeSkills:"lang-life-skills",langLikeALocal:"lang-like-a-local",langMaterial:"lang-material",langTeacherNote:"lang-teacher-note",langTeacherPronunciation:"lang-teacher-pronunciation",langUsefulPhrases:"lang-useful-phrases",langVideoScript:"lang-video-script",langVocabulary:"lang-vocabulary",learningDocumentationFeedback:"learning-documentation-feedback",learningPathBook:"learning-path-book",learningPathBotTraining:"learning-path-bot-training",learningPathClassroomEvent:"learning-path-classroom-event",learningPathClassroomTraining:"learning-path-classroom-training",learningPathClosing:"learning-path-closing",learningPathExternalLink:"learning-path-external-link",learningPathFeedback:"learning-path-feedback",learningPathLearningGoal:"learning-path-learning-goal",learningPathLti:"learning-path-lti",learningPathSign:"learning-path-sign",learningPathStep:"learning-path-step",learningPathVideoCall:"learning-path-video-call",leAssignment:"le-assignment",leClassroomEvent:"le-classroom-event",leCompletion:"le-completion",leExternalLink:"le-external-link",leFinishingTask:"le-finishing-task",leFollowUpTask:"le-follow-up-task",legend:"legend",leDocumentDownload:"le-document-download",leLearningObjectives:"le-learning-objectives",leLearningStep:"le-learning-step",leListenAudioEmbed:"le-listen-audio-embed",lePreparationTask:"le-preparation-task",leRead:"le-read",leReadBook:"le-read-book",leTask:"le-task",leTodo:"le-todo",leVideoCall:"le-video-call",leWatchVideoEmbed:"le-watch-video-embed",lifeSkillSticker:"life-skill-sticker",list:"list",listItem:"list-item",mark:"mark",match:"match",matchAll:"match-all",matchAllReverse:"match-all-reverse",matchAudio:"match-audio",matchMatrix:"match-matrix",matchPicture:"match-picture",matchReverse:"match-reverse",matchSolutionGrouped:"match-solution-grouped",message:"message",metalevelExplanation:"metalevel-explanation",metaSearchDefaultTerms:"meta-search-default-terms",metaSearchDefaultTopics:"meta-search-default-topics",milestone:"milestone",module:"module",moduleProduct:"module-product",multipleChoice:"multiple-choice",multipleChoice1:"multiple-choice-1",multipleChoiceText:"multiple-choice-text",multipleResponse:"multiple-response",multipleResponse1:"multiple-response-1",newspaperArticle:"newspaper-article",note:"note",noteAi:"note-ai",noteAlt:"note-alt",notebookArticle:"notebook-article",noteCollapsible:"note-collapsible",output:"output",page:"page",pageAcademy:"page-academy",pageArticle:"page-article",pageArticleAlt:"page-article-alt",pageArticleResponsive:"page-article-responsive",pageBanner:"page-banner",pageBuyButton:"page-buy-button",pageBuyButtonAlt:"page-buy-button-alt",pageBuyButtonPromotion:"page-buy-button-promotion",pageCategory:"page-category",pageCollapsible:"page-collapsible",pageContainer:"page-container",pageContainerFolder:"page-container-folder",pageContainerGroup:"page-container-group",pageContainerNowrap:"page-container-nowrap",pageContainerNowrapStretch:"page-container-nowrap-stretch",pageContainerWrap:"page-container-wrap",pageCoverImage:"page-cover-image",pageFooter:"page-footer",pageHero:"page-hero",pageOpenBook:"page-open-book",pageOpenBookList:"page-open-book-list",pagePerson:"page-person",pageProduct:"page-product",pageProductList:"page-product-list",pageProductVideo:"page-product-video",pageProductVideoList:"page-product-video-list",pagePromotion:"page-promotion",pageSectionFolder:"page-section-folder",pageShopInShop:"page-shop-in-shop",pageSpecial:"page-special",pageSubpage:"page-subpage",pageSubscribe:"page-subscribe",parameters:"parameters",photo:"photo",platformPath:"platform-path",preparationNote:"preparation-note",pronunciationTable:"pronunciation-table",prototypeImages:"prototype-images",qAndA:"q-and-a",qAndACard:"q-and-a-card",question1:"question-1",quote:"quote",rating:"rating",recipe:"recipe",recordAudio:"record-audio",recordVideo:"record-video",releaseNote:"release-note",releaseNotesSummary:"release-notes-summary",remark:"remark",remarkAlt:"remark-alt",remarkCollapsible:"remark-collapsible",reviewApprovedNote:"review-approved-note",reviewAuthorNote:"review-author-note",reviewCustomerNote:"review-customer-note",reviewNote:"review-note",reviewRequestForReviewNote:"review-request-for-review-note",reviewReviewerNote:"review-reviewer-note",sampleSolution:"sample-solution",scorm:"scorm",screenshot:"screenshot",selfAssessment:"self-assessment",separator:"separator",separatorAlt:"separator-alt",sequence:"sequence",sideNote:"side-note",sideNoteCollapsible:"side-note-collapsible",smartStandardArticleNonNormative:"smart-standard-article-non-normative",smartStandardArticleNonNormativeCollapsible:"smart-standard-article-non-normative-collapsible",smartStandardArticleNormative:"smart-standard-article-normative",smartStandardArticleNormativeCollapsible:"smart-standard-article-normative-collapsible",smartStandardExampleNonNormative:"smart-standard-example-non-normative",smartStandardExampleNonNormativeCollapsible:"smart-standard-example-non-normative-collapsible",smartStandardExampleNormative:"smart-standard-example-normative",smartStandardExampleNormativeCollapsible:"smart-standard-example-normative-collapsible",smartStandardFormula:"smart-standard-formula",smartStandardFormulaNonNormative:"smart-standard-formula-non-normative",smartStandardFormulaNormative:"smart-standard-formula-normative",smartStandardImageFigureNonNormative:"smart-standard-image-figure-non-normative",smartStandardImageFigureNonNormativeCollapsible:"smart-standard-image-figure-non-normative-collapsible",smartStandardImageFigureNormative:"smart-standard-image-figure-normative",smartStandardImageFigureNormativeCollapsible:"smart-standard-image-figure-normative-collapsible",smartStandardLegend:"smart-standard-legend",smartStandardLegendNonNormative:"smart-standard-legend-non-normative",smartStandardLegendNormative:"smart-standard-legend-normative",smartStandardList:"smart-standard-list",smartStandardListCollapsible:"smart-standard-list-collapsible",smartStandardListItem:"smart-standard-list-item",smartStandardListItemCollapsible:"smart-standard-list-item-collapsible",smartStandardNoteNonNormative:"smart-standard-note-non-normative",smartStandardNoteNonNormativeCollapsible:"smart-standard-note-non-normative-collapsible",smartStandardNoteNormative:"smart-standard-note-normative",smartStandardNoteNormativeCollapsible:"smart-standard-note-normative-collapsible",smartStandardRemarkLegend:"smart-standard-remark-legend",smartStandardRemarkLegendNonNormative:"smart-standard-remark-legend-non-normative",smartStandardRemarkLegendNormative:"smart-standard-remark-legend-normative",smartStandardRemarkFormula:"smart-standard-remark-formula",smartStandardRemarkFormulaNonNormative:"smart-standard-remark-formula-non-normative",smartStandardRemarkFormulaNormative:"smart-standard-remark-formula-normative",smartStandardRemarkNonNormative:"smart-standard-remark-non-normative",smartStandardRemarkNonNormativeCollapsible:"smart-standard-remark-non-normative-collapsible",smartStandardRemarkNormative:"smart-standard-remark-normative",smartStandardRemarkNormativeCollapsible:"smart-standard-remark-normative-collapsible",smartStandardRemarkTableImageNonNormative:"smart-standard-remark-table-image-non-normative",smartStandardRemarkTableImageNonNormativeCollapsible:"smart-standard-remark-table-image-non-normative-collapsible",smartStandardRemarkTableImageNormative:"smart-standard-remark-table-image-normative",smartStandardRemarkTableImageNormativeCollapsible:"smart-standard-remark-table-image-normative-collapsible",smartStandardRemarkTableNonNormative:"smart-standard-remark-table-non-normative",smartStandardRemarkTableNonNormativeCollapsible:"smart-standard-remark-table-non-normative-collapsible",smartStandardRemarkTableNormative:"smart-standard-remark-table-normative",smartStandardRemarkTableNormativeCollapsible:"smart-standard-remark-table-normative-collapsible",smartStandardTableImageNonNormative:"smart-standard-table-image-non-normative",smartStandardTableImageNonNormativeCollapsible:"smart-standard-table-image-non-normative-collapsible",smartStandardTableImageNormative:"smart-standard-table-image-normative",smartStandardTableImageNormativeCollapsible:"smart-standard-table-image-normative-collapsible",smartStandardTableNonNormative:"smart-standard-table-non-normative",smartStandardTableNonNormativeCollapsible:"smart-standard-table-non-normative-collapsible",smartStandardTableNormative:"smart-standard-table-normative",smartStandardTableNormativeCollapsible:"smart-standard-table-normative-collapsible",standardArticleNonNormative:"standard-article-non-normative",standardArticleNormative:"standard-article-normative",standardExampleNonNormative:"standard-example-non-normative",standardExampleNormative:"standard-example-normative",standardImageFigureNonNormative:"standard-image-figure-non-normative",standardImageFigureNormative:"standard-image-figure-normative",standardList:"standard-list",standardListItem:"standard-list-item",standardNoteNonNormative:"standard-note-non-normative",standardNoteNormative:"standard-note-normative",standardRemarkNonNormative:"standard-remark-non-normative",standardRemarkNormative:"standard-remark-normative",standardRemarkTableImageNonNormative:"standard-remark-table-image-non-normative",standardRemarkTableImageNormative:"standard-remark-table-image-normative",standardRemarkTableNonNormative:"standard-remark-table-non-normative",standardRemarkTableNormative:"standard-remark-table-normative",standardTableImageNonNormative:"standard-table-image-non-normative",standardTableImageNormative:"standard-table-image-normative",standardTableNonNormative:"standard-table-non-normative",standardTableNormative:"standard-table-normative",statement:"statement",stdout:"stdout",step:"step",stepImageScreenshot:"step-image-screenshot",stepImageScreenshotWithPointer:"step-image-screenshot-with-pointer",sticker:"sticker",stickyNote:"sticky-note",stillImageFilm:"still-image-film",stillImageFilmEmbed:"still-image-film-embed",stillImageFilmLink:"still-image-film-link",summary:"summary",summaryAi:"summary-ai",survey:"survey",survey1:"survey-1",surveyAnonymous:"survey-anonymous",surveyAnonymous1:"survey-anonymous-1",surveyMatrix:"survey-matrix",surveyMatrixMe:"survey-matrix-me",surveyRating:"survey-rating",surveyRatingDisplay:"survey-rating-display",surveyRatingOnce:"survey-rating-once",table:"table",tableAlt:"table-alt",tableImage:"table-image",tableImageAlt:"table-image-alt",takePicture:"take-picture",toc:"toc",tocChapter:"toc-chapter",tocInline:"toc-inline",trueFalse:"true-false",trueFalse1:"true-false-1",vendorAmcharts5Chart:"vendor-amcharts-5-chart",vendorDatadogDashboardEmbed:"vendor-datadog-dashboard-embed",vendorFormbricksEmbed:"vendor-formbricks-embed",vendorFormbricksLink:"vendor-formbricks-link",vendorFormbricksEmbedAnonymous:"vendor-formbricks-embed-anonymous",vendorFormbricksLinkAnonymous:"vendor-formbricks-link-anonymous",vendorHighchartsChart:"vendor-highcharts-chart",vendorIframelyCard:"vendor-iframely-card",vendorIframelyEmbed:"vendor-iframely-embed",vendorIframelyPreview:"vendor-iframely-preview",vendorIframelyPreviewMini:"vendor-iframely-preview-mini",vendorJupyterCellCode:"vendor-jupyter-cell-code",vendorJupyterCellMarkdown:"vendor-jupyter-cell-markdown",vendorJupyterCellRaw:"vendor-jupyter-cell-raw",vendorJupyterIpynb:"vendor-jupyter-ipynb",vendorJupyterOutput:"vendor-jupyter-output",vendorPadletEmbed:"vendor-padlet-embed",vendorStripePricingTable:"vendor-stripe-pricing-table",vendorStripePricingTableExternal:"vendor-stripe-pricing-table-external",video:"video",videoEmbed:"video-embed",videoEmbedLandscape:"video-embed-landscape",videoEmbedPortrait:"video-embed-portrait",videoLandscape:"video-landscape",videoLink:"video-link",videoLinkLandscape:"video-link-landscape",videoLinkPortrait:"video-link-portrait",videoPortrait:"video-portrait",videoTranscript:"video-transcript",warning:"warning",warningAlt:"warning-alt",warningCollapsible:"warning-collapsible",websiteLink:"website-link",workbookArticle:"workbook-article"});t.BitType=r},5980:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.markTagContentProcessor=function(e,t,i,o){const{value:n}=i;r.StringUtils.isString(n)&&(o.solution=r.StringUtils.trimmedString(n))};const r=i(9681)},6128:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ContentProcessorUtils=void 0;const r=i(9554);const o=new class{concatenatePlainTextWithAstTexts(e,t,i){var o;if(Array.isArray(e)){if(i=i&&i.trim()){const n=i.split("\n"),a=[];for(let e=0;e<t;e++)a.push({type:r.TextNodeType.hardBreak});for(let e=0;e<n.length;e++){const t=n[e];t&&a.push({text:t,type:r.TextNodeType.text}),e<n.length-1&&a.push({type:r.TextNodeType.hardBreak})}const s=e[e.length-1];s&&s.type===r.TextNodeType.paragraph?s.content=[...null!==(o=s.content)&&void 0!==o?o:[],...a]:e.push({type:r.TextNodeType.paragraph,content:a,attrs:{}})}return e}return`${null!=e?e:""}${"\n".repeat(t)}${null!=i?i:""}`}};t.ContentProcessorUtils=o},6149:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceTag=void 0;const r=(0,i(4718).superenum)({unknown:"unknown",image:"image",imageResponsive:"image-responsive",imagePortrait:"image-portrait",imageLandscape:"image-landscape",imageEmbed:"image-embed",imageLink:"image-link",audio:"audio",audioEmbed:"audio-embed",audioLink:"audio-link",video:"video",videoEmbed:"video-embed",videoLink:"video-link",stillImageFilm:"still-image-film",stillImageFilmEmbed:"still-image-film-embed",stillImageFilmLink:"still-image-film-link",article:"article",articleEmbed:"article-embed",articleLink:"article-link",document:"document",documentEmbed:"document-embed",documentLink:"document-link",documentDownload:"document-download",appLink:"app-link",websiteLink:"website-link",icon:"icon",backgroundWallpaper:"backgroundWallpaper",imagePlaceholder:"imagePlaceholder"});t.ResourceTag=r},6220:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DeprecatedTextFormat=void 0;const r=(0,i(4718).superenum)({bitmarkMinusMinus:"bitmark--"});t.DeprecatedTextFormat=r},6278:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Environment=void 0;const r=(0,i(4718).superenum)({unknown:"",node:"node",chrome:"chrome",safari:"safari",firefox:"firefox",edge:"edge",ie:"ie"});t.Environment=r},6521:function(e,t,i){var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.buildResources=function(e,t,i){var r,o;const{bitType:n}=e,p=[],c=[],u=l.ResourceTag.fromValue(t),y=a.Config.getBitResourcesConfig(n,u),g=y.resourceAttachmentAllowed,d=y.getCountsMin(),T=y.getCountsMax();if(i)for(const e of i.reverse()){let t=null!==(r=d.get(e.__typeAlias))&&void 0!==r?r:0,i=null!==(o=T.get(e.__typeAlias))&&void 0!==o?o:0;t=Math.max(0,t-1),i===s.Count.infinity?p.unshift(e):i>0?(p.unshift(e),i--):c.unshift(e),d.set(e.__typeAlias,t),T.set(e.__typeAlias,i)}if(!g&&t){const i=`Resource type [&${t}] is specified in the bit header, but no extra resource is allowed for this bit.`;e.addWarning(i)}else 0===p.length&&t&&e.addWarning(`Resource type [&${t}] is specified in the bit header, but no such a resource is present`);c.length>0&&(e.parser.excessResources=c);return p},t.resourceContentProcessor=function(e,t,i,o,s){const{type:g,key:d,value:T,chain:f}=o,m=s.resources;if(!m)return;const h=l.ResourceTag.fromValue(d);if(h){const t=a.Config.getTagConfigForTag(i,h),o=e.bitContentProcessor(u.BitContentLevel.Chain,null==t?void 0:t.chain,f),{posterImage:g}=o,d=r(o,["posterImage"]);let b;if(g){const{subConfig:i,subChain:o}=function(e,t,i){var r;let o;e&&(o=null===(r=e[i])||void 0===r?void 0:r.chain);const n=null==t?void 0:t.reduce(((e,t)=>{if(e)return e;const i=t;return"posterImage"===i.key?i.chain:void 0}),void 0);return{subConfig:o,subChain:n}}(null==t?void 0:t.chain,f,"posterImage"),n=e.bitContentProcessor(u.BitContentLevel.Chain,i,o),{posterImage:a}=n,s=r(n,["posterImage"]);b=y.resource(e,Object.assign({type:l.ResourceTag.image,value:g},s)).image}const B=y.resource(e,Object.assign({type:h,value:n.Breakscape.unbreakscape(T,{textFormat:p.TextFormat.bitmarkText,textLocation:c.TextLocation.tag}),posterImage:b},d));B&&(h===l.ResourceTag.backgroundWallpaper||h===l.ResourceTag.imagePlaceholder?s.propertyStyleResources&&(s.propertyStyleResources[h]=B):m.push(B))}};const o=i(5533),n=i(7735),a=i(2028),s=i(3778),l=i(6149),p=i(385),c=i(6877),u=i(3029),y=new o.ResourceBuilder},6634:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractTagConfig=void 0;t.AbstractTagConfig=class{constructor(e,t,i,r,o,n,a,s,l){this.type=e,this.configKey=t,this.tag=i,this.maxCount=r,this.minCount=o,this.chain=n,this.jsonKey=a,this.astKey=s,this.deprecated=l}}},6772:function(e,t){var i=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(o,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function s(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StringWriter=void 0;t.StringWriter=class{constructor(){this._string="",this.endOfLineString="\n",this.lastWrite=""}get isSync(){return!0}getString(){return this._string}open(){return i(this,void 0,void 0,(function*(){return this.openSync(),Promise.resolve()}))}close(){return i(this,void 0,void 0,(function*(){try{this.closeSync()}catch(e){return Promise.reject(e)}return Promise.resolve()}))}openSync(){this._buffer=[],this._string=""}closeSync(){if(!this._buffer)throw new Error("open() or openSync() never called");this._string=this._buffer.join(""),this._buffer=[]}writeLine(e){return this._buffer?(null!=e?(this._buffer.push(e+this.endOfLineString),this.lastWrite=e+this.endOfLineString):(this._buffer.push(this.endOfLineString),this.lastWrite=this.endOfLineString),this):this}writeLines(e,t){if(!this._buffer)return this;if(!e)return this;let i="";for(let r=0,o=e.length;r<o;r++){const n=e[r];this._buffer.push(n),i+=n,t&&r<o-1&&(this._buffer.push(t),i+=t),this._buffer.push(this.endOfLineString),i+=this.endOfLineString}return this.lastWrite=i,this}write(e){return this._buffer?(null==e||(e&&(this.lastWrite=e),this._buffer.push(e)),this):this}writeWhiteSpace(){return this.write(" "),this}getLastWrite(){return this.lastWrite}}},6853:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BITS=void 0;const r=i(8199),o=i(7112),n=i(9888),a=i(5051),s=i(7797),l=i(5512),p=i(5854),c=i(3778),u=i(363),y=i(385),g={[p.BitType._error]:{since:"1.3.0",tags:[]},[p.BitType._comment]:{since:"1.4.12",tags:[]},[p.BitType._standard]:{since:"3.2.0",tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}]},[p.BitType.appFlashcards]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.flashcardSet,maxCount:c.Count.infinity}],rootExampleType:u.ExampleType.string},[p.BitType.appFlashcardsQuiz]:{since:"1.3.0",baseBitType:p.BitType.appFlashcards},[p.BitType.appFlashcardsLearn]:{since:"1.3.0",baseBitType:p.BitType.appFlashcards},[p.BitType.appLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAppLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.article]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}]},[p.BitType.articleAlt]:{since:"1.15.0",baseBitType:p.BitType.article},[p.BitType.articleResponsive]:{since:"1.21.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.imageFirst}]},[p.BitType.articleResponsiveAlt]:{since:"2.0.0",baseBitType:p.BitType.articleResponsive},[p.BitType.standardArticleNormative]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.standardArticleNonNormative]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.smartStandardArticleNormative]:{since:"1.28.0",baseBitType:p.BitType.standardArticleNormative},[p.BitType.smartStandardArticleNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardArticleNonNormative},[p.BitType.smartStandardArticleNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardArticleNormative},[p.BitType.smartStandardArticleNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardArticleNonNormative},[p.BitType.statement]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.pageArticle]:{since:"1.15.0",baseBitType:p.BitType.article},[p.BitType.pageArticleAlt]:{since:"1.15.0",baseBitType:p.BitType.article},[p.BitType.pageArticleResponsive]:{since:"1.21.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.imageFirst}]},[p.BitType.buttonCopyText]:{since:"1.4.3",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.callToAction]:{since:"1.15.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.callToActionUrl,minCount:1}]},[p.BitType.callToActionSubscribe]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionContact]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionJoin]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionMail]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionLearnMore]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionSeeMore]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionWatch]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionStartNow]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionGetOffer]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionBookNow]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionShopNow]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionGetNow]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionDownload]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionCreateAccount]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.appBitmarkFromJavascript]:{since:"1.4.5",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.maxCreatedBits}],textFormatDefault:y.TextFormat.plainText},[p.BitType.appBitmarkFromEditor]:{since:"1.4.5",baseBitType:p.BitType.appBitmarkFromJavascript},[p.BitType.articleEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceArticleEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.articleLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceArticleLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.audio]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudio,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.audioEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudioEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.audioLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudioLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.bitAlias]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference},{type:l.BitTagType.tag,configKey:s.TagConfigKey.anchor}]},[p.BitType.diff]:{since:"3.13.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffTo}]},[p.BitType.book]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_bookCommon}]},[p.BitType.bookEnd]:{since:"3.27.0",baseBitType:p.BitType.article},[p.BitType.bookAcknowledgements]:{since:"1.17.0",baseBitType:p.BitType.article},[p.BitType.bookAddendum]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookAfterword]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookAppendix]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookAutherBio]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookBibliography]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookComingSoon]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookConclusion]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookCopyright]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookCopyrightPermissions]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookDedication]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookEndnotes]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookEpigraph]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookEpilogue]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookForword]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookFrontispiece]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookImprint]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookIncitingIncident]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookIntroduction]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookListOfContributors]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookNotes]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookPostscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookPreface]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookPrologue]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookReadMore]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookReferenceList]:{since:"3.2.0",baseBitType:p.BitType._standard,cardSet:r.CardSetConfigKey._bookReferenceList},[p.BitType.bookRequestForABookReview]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookSummary]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookTeaser]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookTitle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookCover]:{since:"3.27.0",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title,maxCount:2},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.coverColor}]},[p.BitType.bookAlias]:{since:"1.4.3",baseBitType:p.BitType.book,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.bookAlias,maxCount:c.Count.infinity}]},[p.BitType.bookDiff]:{since:"3.10.0",baseBitType:p.BitType.book,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.bookDiff}]},[p.BitType.bookClose]:{since:"1.18.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.bookReference]:{since:"2.2.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refAuthor,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refBookTitle},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refPublisher,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refPublicationYear},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.citationStyle}]},[p.BitType.botActionResponse]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[],cardSet:r.CardSetConfigKey._botActionResponses},[p.BitType.botActionSend]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.date}]},[p.BitType.browserImage]:{since:"1.3.0",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.focusX},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.focusY}]},[p.BitType.card1]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon}]},[p.BitType.question1]:{since:"1.3.0",baseBitType:p.BitType.card1},[p.BitType.survey1]:{since:"1.3.0",baseBitType:p.BitType.card1},[p.BitType.surveyAnonymous1]:{since:"1.3.0",baseBitType:p.BitType.card1},[p.BitType.chapter]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.anchor},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.toc},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.progress}]},[p.BitType.clozeAndMultipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_gap},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.coachCallToActionClozeAndMultipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType.clozeAndMultipleChoiceText},[p.BitType.cloze]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.quizCountItems},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.quizStrikethroughSolutions},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.quizStrikethroughSolutions},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.additionalSolutions,maxCount:c.Count.infinity},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_gap}]},[p.BitType.clozeInstructionGrouped]:{since:"1.3.0",baseBitType:p.BitType.cloze},[p.BitType.clozeSolutionGrouped]:{since:"1.3.0",baseBitType:p.BitType.cloze},[p.BitType.clozeSeveral]:{since:"3.5.0",baseBitType:p.BitType.cloze},[p.BitType.gapText]:{since:"1.5.15",baseBitType:p.BitType.cloze},[p.BitType.gapTextInstructionGrouped]:{since:"1.5.15",baseBitType:p.BitType.clozeInstructionGrouped},[p.BitType.coachSelfReflectionCloze]:{since:"1.3.0",baseBitType:p.BitType.cloze},[p.BitType.coachCallToActionCloze]:{since:"1.3.0",baseBitType:p.BitType.cloze},[p.BitType.clozeList]:{since:"1.4.13",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon}],cardSet:r.CardSetConfigKey._clozeList},[p.BitType.code]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.computerLanguage},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.codeLineNumbers},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.codeMinimap}],textFormatDefault:y.TextFormat.plainText},[p.BitType.formula]:{since:"1.35.0",baseBitType:p.BitType._standard,tags:[],textFormatDefault:y.TextFormat.latex},[p.BitType.smartStandardFormula]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardFormulaNonNormative]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardFormulaNormative]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardRemarkFormula]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardRemarkFormulaNonNormative]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardRemarkFormulaNormative]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.appCodeCell]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.appCodeEditor]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.appCodeIde]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.codeRuntime]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.consoleLog]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.output]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.stdout]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.step]:{since:"1.5.1",baseBitType:p.BitType.article},[p.BitType.stepImageScreenshot]:{since:"1.5.1",baseBitType:p.BitType.image},[p.BitType.stepImageScreenshotWithPointer]:{since:"1.5.1",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pointerTop,minCount:1,maxCount:1},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pointerLeft,minCount:1,maxCount:1}]},[p.BitType.milestone]:{since:"1.20.0",baseBitType:p.BitType.step},[p.BitType.conversationLeft1]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_person}]},[p.BitType.conversationLeft1Scream]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.conversationLeft1Thought]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.conversationRight1]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.conversationRight1Scream]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.conversationRight1Thought]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.cookPreparation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookStep]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookIngredients]:{since:"1.5.16",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_technicalTerm},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.servings,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unit},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unitAbbr},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.decimalPlaces},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.disableCalculation},{type:l.BitTagType.tag,configKey:s.TagConfigKey.hint}]}],cardSet:r.CardSetConfigKey._ingredients},[p.BitType.recipe]:{since:"1.5.24",baseBitType:p.BitType.cookIngredients},[p.BitType.cookRemark]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookVariation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookInsert]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookNoteOnQuantity]:{since:"3.27.0",baseBitType:p.BitType.article},[p.BitType.cookArrangement]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookPracticeAdvise]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookPlate]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookRecommendation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookPersonalRecommendation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookSideDrink]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookSideDish]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookTimer]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.document]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocument,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.documentDownload]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocumentDownload,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.leDocumentDownload]:{since:"3.18.0",baseBitType:p.BitType.documentDownload},[p.BitType.documentEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocumentEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.documentLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocumentLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.essay]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_sampleSolution},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.additionalSolutions,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.partialAnswer},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_reference,maxCount:c.Count.infinity}],rootExampleType:u.ExampleType.string},[p.BitType.coachSelfReflectionEssay]:{since:"1.3.0",baseBitType:p.BitType.essay},[p.BitType.coachCallToActionEssay]:{since:"1.3.0",baseBitType:p.BitType.essay},[p.BitType.example]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],rootExampleType:u.ExampleType.string},[p.BitType.exampleAlt]:{since:"1.16.0",baseBitType:p.BitType.example},[p.BitType.standardExampleNormative]:{since:"1.16.0",baseBitType:p.BitType.example},[p.BitType.standardExampleNonNormative]:{since:"1.16.0",baseBitType:p.BitType.example},[p.BitType.smartStandardExampleNormative]:{since:"1.28.0",baseBitType:p.BitType.standardExampleNormative},[p.BitType.smartStandardExampleNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardExampleNonNormative},[p.BitType.smartStandardExampleNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardExampleNormative},[p.BitType.smartStandardExampleNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardExampleNonNormative},[p.BitType.appAiPrompt]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.aiPrompt]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.articleAi]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.articleAttachment]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.assignment]:{since:"1.3.0",baseBitType:p.BitType.essay},[p.BitType.audioTranscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bitmarkExample]:{since:"1.3.0",baseBitType:p.BitType.example},[p.BitType.blogArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bug]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bugAlt]:{since:"1.16.0",baseBitType:p.BitType.bug},[p.BitType.checklist]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.coachAudioTranscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.coachCallToActionChecklist]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.coachHomeRules]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.coachVideoTranscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.correction]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.danger]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.dangerAlt]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.definitionTerm]:{since:"1.34.0",baseBitType:p.BitType.article},[p.BitType.deleted]:{since:"3.9.0",baseBitType:p.BitType.article},[p.BitType.details1]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.details]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.qAndA]:{since:"3.5.0",baseBitType:p.BitType.article},[p.BitType.editorial]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.editorNote]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.featured]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.glossaryTerm]:{since:"1.33.0",baseBitType:p.BitType.article},[p.BitType.help]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.helpAlt]:{since:"1.16.0",baseBitType:p.BitType.help},[p.BitType.hint]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.hintAlt]:{since:"1.16.0",baseBitType:p.BitType.hint},[p.BitType.indexTerm]:{since:"1.33.0",baseBitType:p.BitType.article},[p.BitType.info]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.infoAlt]:{since:"1.16.0",baseBitType:p.BitType.info},[p.BitType.langLearningOutcomes]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langEnablingLanguageSkills]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLifeSkills]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langEnglishAroundWorld]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langGoodToKnow]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLearningGoal]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLearningStrategy]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLikeALocal]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langMaterial]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langUsefulPhrases]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLevelDown]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLevelUp]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langExtraActivity]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langVideoScript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langAudioScript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langVocabulary]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langHomework]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langTeacherNote]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langTeacherPronunciation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.list]:{since:"1.22.0",baseBitType:p.BitType.article},[p.BitType.standardList]:{since:"1.22.0",baseBitType:p.BitType.article},[p.BitType.smartStandardList]:{since:"1.28.0",baseBitType:p.BitType.standardList},[p.BitType.smartStandardListCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardList},[p.BitType.message]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.newspaperArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.note]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.noteAlt]:{since:"1.16.0",baseBitType:p.BitType.note},[p.BitType.standardNoteNormative]:{since:"1.16.0",baseBitType:p.BitType.note},[p.BitType.standardNoteNonNormative]:{since:"1.16.0",baseBitType:p.BitType.note},[p.BitType.smartStandardNoteNormative]:{since:"1.28.0",baseBitType:p.BitType.standardNoteNormative},[p.BitType.smartStandardNoteNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardNoteNonNormative},[p.BitType.smartStandardNoteNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardNoteNormative},[p.BitType.smartStandardNoteNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardNoteNonNormative},[p.BitType.noteAi]:{since:"1.3.0",baseBitType:p.BitType.note},[p.BitType.notebookArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.preparationNote]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.releaseNotesSummary]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.remark]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.remarkAlt]:{since:"1.16.0",baseBitType:p.BitType.remark},[p.BitType.standardRemarkNormative]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.standardRemarkNonNormative]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.smartStandardRemarkNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkNormative},[p.BitType.smartStandardRemarkNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkNonNormative},[p.BitType.smartStandardRemarkNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkNormative},[p.BitType.smartStandardRemarkNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkNonNormative},[p.BitType.selfAssessment]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.separator]:{since:"1.4.15",baseBitType:p.BitType.article},[p.BitType.separatorAlt]:{since:"1.16.0",baseBitType:p.BitType.separator},[p.BitType.sticker]:{since:"1.5.28",baseBitType:p.BitType.article},[p.BitType.sideNote]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.summary]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.summaryAi]:{since:"1.3.0",baseBitType:p.BitType.summary},[p.BitType.videoTranscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.warning]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.warningAlt]:{since:"1.16.0",baseBitType:p.BitType.warning},[p.BitType.workbookArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.collapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.sideNoteCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.infoCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.remarkCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.warningCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.dangerCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.noteCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.exampleCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.hintCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.bugCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.platformPath]:{since:"3.14.1",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.path}]},[p.BitType.container]:{since:"1.9.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.allowedBit,maxCount:c.Count.infinity}]},[p.BitType.containerWrap]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerNowrap]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerNowrapStretch]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerGroup]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerFolder]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerCarousel]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerCards]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerGrid]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerStack]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerSlides]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerGallery]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerScroller]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerTabs]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerAccordionTabs]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerFolderAll]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerBits2]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerCookRecipe]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerNewsArticle]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerPreview]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.pageContainer]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.pageContainerWrap]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.pageContainerNowrap]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.pageContainerNowrapStretch]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.pageContainerFolder]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.pageContainerGroup]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.metalevelExplanation]:{since:"1.10.0",baseBitType:p.BitType.article},[p.BitType.module]:{since:"1.5.26",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.hasBookNavigation},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productId,minCount:1,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration}]},[p.BitType.moduleProduct]:{since:"1.9.0",baseBitType:p.BitType.module,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productId,minCount:1}]},[p.BitType.exampleList]:{since:"1.4.13",baseBitType:p.BitType.example,cardSet:r.CardSetConfigKey._exampleBitList,rootExampleType:u.ExampleType.string},[p.BitType.extractorPage]:{since:"1.5.17",baseBitType:p.BitType.image},[p.BitType.extractorPageCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPage},[p.BitType.extractorPageWithBlocks]:{since:"1.5.21",baseBitType:p.BitType.image},[p.BitType.extractorPageWithBlocksCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPageWithBlocks},[p.BitType.extractorConfiguration]:{since:"1.7.1",baseBitType:p.BitType._standard,tags:[],textFormatDefault:y.TextFormat.plainText},[p.BitType.extractorInformation]:{since:"3.8.0",baseBitType:p.BitType._standard,tags:[],textFormatDefault:y.TextFormat.json},[p.BitType.extractorAiChat]:{since:"3.19.0",baseBitType:p.BitType._standard},[p.BitType.extractorBlock]:{since:"1.5.16",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.blockId},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pageNo},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.y},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.index},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.classification},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.availableClassifications,maxCount:c.Count.infinity},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.extractorRepeatedText]:{since:"1.5.21",baseBitType:p.BitType.article},[p.BitType.extractorPageNumber]:{since:"1.5.21",baseBitType:p.BitType.article},[p.BitType.extractorPageNumberCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPageNumber},[p.BitType.extractorPageHeader]:{since:"1.5.21",baseBitType:p.BitType.article},[p.BitType.extractorPageHeaderCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPageHeader},[p.BitType.extractorPageFooter]:{since:"1.5.21",baseBitType:p.BitType.article},[p.BitType.extractorPageFooterCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPageFooter},[p.BitType.pageOpenBook]:{since:"1.5.10",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.book,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference,maxCount:2}]},{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.pageOpenBookList]:{since:"2.1.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.book,maxCount:c.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference,maxCount:2}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.pageSubscribe]:{since:"1.5.10",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mailingList}]},[p.BitType.assignmentList]:{since:"1.4.13",baseBitType:p.BitType.exampleList},[p.BitType.pageFooter]:{since:"1.4.13",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug}],cardSet:r.CardSetConfigKey._exampleBitList},[p.BitType.legend]:{since:"3.12.0",baseBitType:p.BitType._standard,tags:[],cardSet:r.CardSetConfigKey._definitionList},[p.BitType.smartStandardLegend]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardLegendNonNormative]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardLegendNormative]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardRemarkLegend]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardRemarkLegendNonNormative]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardRemarkLegendNormative]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.definitionList]:{since:"1.34.0",baseBitType:p.BitType._standard,tags:[],cardSet:r.CardSetConfigKey._definitionList},[p.BitType.metaSearchDefaultTerms]:{since:"3.12.0",baseBitType:p.BitType._standard,tags:[],cardSet:r.CardSetConfigKey._definitionList},[p.BitType.metaSearchDefaultTopics]:{since:"3.12.0",baseBitType:p.BitType.metaSearchDefaultTerms},[p.BitType.flashcard]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon}],cardSet:r.CardSetConfigKey._flashcard},[p.BitType.flashcard1]:{since:"1.3.0",baseBitType:p.BitType.flashcard},[p.BitType.qAndACard]:{since:"3.25.0",baseBitType:p.BitType.flashcard1},[p.BitType.focusImage]:{since:"1.3.0",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.focusX},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.focusY}]},[p.BitType.highlightText]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.image]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.backgroundWallpaper,chain:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImageCommon}]},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.appCreateBitsFromImage]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.appGetScreenshot]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.detailsImage]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.figure]:{since:"1.3.0",baseBitType:p.BitType.image,cardSet:r.CardSetConfigKey._definitionList},[p.BitType.imageBanner]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageFigure]:{since:"1.3.0",baseBitType:p.BitType.image,cardSet:r.CardSetConfigKey._definitionList},[p.BitType.imageFigureAlt]:{since:"1.16.0",baseBitType:p.BitType.imageFigure},[p.BitType.standardImageFigureNormative]:{since:"1.16.0",baseBitType:p.BitType.imageFigure},[p.BitType.standardImageFigureNonNormative]:{since:"1.16.0",baseBitType:p.BitType.imageFigure},[p.BitType.smartStandardImageFigureNormative]:{since:"1.28.0",baseBitType:p.BitType.standardImageFigureNormative},[p.BitType.smartStandardImageFigureNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardImageFigureNonNormative},[p.BitType.smartStandardImageFigureNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardImageFigureNormative},[p.BitType.smartStandardImageFigureNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardImageFigureNonNormative},[p.BitType.imageLandscape]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageMood]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imagePortrait]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imagePrototype]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageSeparator]:{since:"1.4.15",baseBitType:p.BitType.image},[p.BitType.imageSeparatorAlt]:{since:"1.16.0",baseBitType:p.BitType.imageSeparator},[p.BitType.imageScreenshot]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageStyled]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageSuperWide]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageZoom]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.langLifeSkillIcon]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.lifeSkillSticker]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.pageBanner]:{since:"1.4.3",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug}]},[p.BitType.pageHero]:{since:"1.11.0",baseBitType:p.BitType.pageBanner},[p.BitType.screenshot]:{since:"1.3.0",deprecated:"1.4.0",baseBitType:p.BitType.image},[p.BitType.tableImage]:{since:"1.5.15",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.caption}]},[p.BitType.tableImageAlt]:{since:"1.16.0",baseBitType:p.BitType.tableImage},[p.BitType.standardTableImageNormative]:{since:"1.16.0",baseBitType:p.BitType.tableImage},[p.BitType.standardTableImageNonNormative]:{since:"1.16.0",baseBitType:p.BitType.tableImage},[p.BitType.standardRemarkTableImageNormative]:{since:"1.17.0",baseBitType:p.BitType.tableImage},[p.BitType.standardRemarkTableImageNonNormative]:{since:"1.17.0",baseBitType:p.BitType.tableImage},[p.BitType.smartStandardTableImageNormative]:{since:"1.28.0",baseBitType:p.BitType.standardTableImageNormative},[p.BitType.smartStandardTableImageNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardTableImageNonNormative},[p.BitType.smartStandardRemarkTableImageNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkTableImageNormative},[p.BitType.smartStandardRemarkTableImageNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkTableImageNonNormative},[p.BitType.smartStandardTableImageNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardTableImageNormative},[p.BitType.smartStandardTableImageNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardTableImageNonNormative},[p.BitType.smartStandardRemarkTableImageNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkTableImageNormative},[p.BitType.smartStandardRemarkTableImageNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkTableImageNonNormative},[p.BitType.imageLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImageLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.imageOnDevice]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_imageSource}],resourceAttachmentAllowed:!1},[p.BitType.imageResponsive]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImageResponsive}],resourceAttachmentAllowed:!1},[p.BitType.imagesLogoGrave]:{since:"1.5.11",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage,minCount:1,maxCount:c.Count.infinity}],resourceAttachmentAllowed:!1},[p.BitType.prototypeImages]:{since:"1.6.1",baseBitType:p.BitType.imagesLogoGrave},[p.BitType.internalLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference}]},[p.BitType.interview]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars}],cardSet:r.CardSetConfigKey._questions},[p.BitType.interviewInstructionGrouped]:{since:"1.3.0",baseBitType:p.BitType.interview},[p.BitType.botInterview]:{since:"1.3.0",baseBitType:p.BitType.interview},[p.BitType.learningPathBook]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_learningPathCommon}]},[p.BitType.bookLink]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.bookLinkNext]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.bookLinkPrev]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathClassroomEvent]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathClassroomTraining]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathClosing]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathFeedback]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathLearningGoal]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathLti]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathSign]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathStep]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathBotTraining]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.bot}]},[p.BitType.learningPathExternalLink]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.externalLink},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.externalLinkText}]},[p.BitType.learningPathVideoCall]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.videoCallLink}]},[p.BitType.leLearningObjectives]:{since:"1.25.0",baseBitType:p.BitType.learningPathLearningGoal,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leVideoCall]:{since:"1.25.0",baseBitType:p.BitType.learningPathVideoCall,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leClassroomEvent]:{since:"1.25.0",baseBitType:p.BitType.learningPathClassroomEvent,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leCompletion]:{since:"1.25.0",baseBitType:p.BitType.learningPathClosing,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leExternalLink]:{since:"1.25.0",baseBitType:p.BitType.learningPathExternalLink,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leReadBook]:{since:"1.25.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leLearningStep]:{since:"1.25.0",baseBitType:p.BitType.learningPathStep,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.lePreparationTask]:{since:"1.26.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leRead]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leTask]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leTodo]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leFollowUpTask]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leFinishingTask]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leAssignment]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leWatchVideoEmbed]:{since:"1.27.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideoEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.leListenAudioEmbed]:{since:"1.27.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudioEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.listItem]:{since:"1.22.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.listItemIndent}]},[p.BitType.standardListItem]:{since:"1.22.0",baseBitType:p.BitType.listItem},[p.BitType.smartStandardListItem]:{since:"1.28.0",baseBitType:p.BitType.standardListItem},[p.BitType.smartStandardListItemCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardListItem},[p.BitType.mark]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_markConfig},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_mark}]},[p.BitType.match]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}],cardSet:r.CardSetConfigKey._matchPairs},[p.BitType.matchAll]:{since:"1.3.0",baseBitType:p.BitType.match},[p.BitType.matchReverse]:{since:"1.3.0",baseBitType:p.BitType.match},[p.BitType.matchAllReverse]:{since:"1.3.0",baseBitType:p.BitType.match},[p.BitType.matchSolutionGrouped]:{since:"1.3.0",baseBitType:p.BitType.match},[p.BitType.matchMatrix]:{since:"1.3.0",baseBitType:p.BitType.match,cardSet:r.CardSetConfigKey._matchMatrix},[p.BitType.matchAudio]:{since:"1.3.0",baseBitType:p.BitType.match,cardSet:r.CardSetConfigKey._matchAudioPairs},[p.BitType.matchPicture]:{since:"1.3.0",baseBitType:p.BitType.match,cardSet:r.CardSetConfigKey._matchImagePairs},[p.BitType.feedback]:{since:"3.13.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars}],cardSet:r.CardSetConfigKey._feedback},[p.BitType.learningDocumentationFeedback]:{since:"3.13.0",baseBitType:p.BitType.feedback},[p.BitType.multipleChoice1]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.coachSelfReflectionMultipleChoice1]:{since:"1.3.0",baseBitType:p.BitType.multipleChoice1},[p.BitType.multipleChoice]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}],cardSet:r.CardSetConfigKey._quiz},[p.BitType.coachSelfReflectionMultipleChoice]:{since:"1.3.0",baseBitType:p.BitType.multipleChoice},[p.BitType.multipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.coachCallToActionMultipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType.multipleChoiceText},[p.BitType.coachSelfReflectionMultipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType.multipleChoiceText},[p.BitType.multipleResponse1]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.coachSelfReflectionMultipleResponse1]:{since:"1.3.0",baseBitType:p.BitType.multipleResponse1},[p.BitType.multipleResponse]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}],cardSet:r.CardSetConfigKey._quiz},[p.BitType.coachSelfReflectionMultipleResponse]:{since:"1.3.0",baseBitType:p.BitType.multipleResponse},[p.BitType.page]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.thumbImage}]},[p.BitType.pageCollapsible]:{since:"1.30.0",baseBitType:p.BitType.page},[p.BitType.pageCoverImage]:{since:"1.22.0",baseBitType:p.BitType.page},[p.BitType.pageBuyButton]:{since:"1.4.3",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.content2Buy},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.pageBuyButtonAlt]:{since:"1.31.0",baseBitType:p.BitType.pageBuyButton},[p.BitType.pageBuyButtonPromotion]:{since:"1.5.11",baseBitType:p.BitType.pageBuyButton},[p.BitType.pageSubpage]:{since:"1.6.6",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.page}]},[p.BitType.pageShopInShop]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pageCategory]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pageAcademy]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pagePromotion]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pageSpecial]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pagePerson]:{since:"1.5.16",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_person},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.pageProduct]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.product}]},[p.BitType.pageProductList]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productList,maxCount:c.Count.infinity}]},[p.BitType.pageProductVideo]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productVideo}]},[p.BitType.pageProductVideoList]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productVideoList,maxCount:c.Count.infinity}]},[p.BitType.pageSectionFolder]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productFolder}]},[p.BitType.photo]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.quote]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.quotedPerson}]},[p.BitType.rating]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[]},[p.BitType.coachSelfReflectionRating]:{since:"1.3.0",baseBitType:p.BitType.rating},[p.BitType.releaseNote]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.releaseVersion},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.releaseKind},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.releaseDate}]},[p.BitType.reviewNote]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.resolved},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.resolvedDate},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.resolvedBy}],rootExampleType:u.ExampleType.string},[p.BitType.reviewAuthorNote]:{since:"1.3.0",baseBitType:p.BitType.reviewNote},[p.BitType.reviewCustomerNote]:{since:"3.5.0",baseBitType:p.BitType.reviewNote},[p.BitType.reviewReviewerNote]:{since:"1.3.0",baseBitType:p.BitType.reviewNote},[p.BitType.reviewRequestForReviewNote]:{since:"1.3.0",baseBitType:p.BitType.reviewNote},[p.BitType.reviewApprovedNote]:{since:"1.3.0",baseBitType:p.BitType.reviewNote},[p.BitType.sampleSolution]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.anchor},{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference}]},[p.BitType.sequence]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon}],cardSet:r.CardSetConfigKey._elements,rootExampleType:u.ExampleType.boolean},[p.BitType.stillImageFilm]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceStillImageFilm}],resourceAttachmentAllowed:!1},[p.BitType.stillImageFilmEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceStillImageFilmEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.stillImageFilmLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceStillImageFilmLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.surveyAnonymous]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[]},[p.BitType.survey]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[]},[p.BitType.surveyMatrix]:{since:"1.6.2",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pointerTop,minCount:1,maxCount:1},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pointerLeft,minCount:1,maxCount:1},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption,minCount:1,maxCount:1}]},[p.BitType.surveyMatrixMe]:{since:"1.6.2",baseBitType:p.BitType.surveyMatrix},[p.BitType.surveyRating]:{since:"1.6.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.ratingLevelStart,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.label}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.ratingLevelEnd,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.label}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.ratingLevelSelected},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.surveyRatingOnce]:{since:"1.6.0",baseBitType:p.BitType.surveyRating},[p.BitType.surveyRatingDisplay]:{since:"1.6.0",baseBitType:p.BitType.surveyRating},[p.BitType.scorm]:{since:"1.5.11",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.scormSource},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.posterImage}]},[p.BitType.pronunciationTable]:{since:"3.1.0",baseBitType:p.BitType._standard,tags:[],cardSet:r.CardSetConfigKey._pronunciationTable},[p.BitType.table]:{since:"1.5.19",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.caption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableFixedHeader},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableSearch},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableSort},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tablePagination},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tablePaginationLimit},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableHeight},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableWhitespaceNoWrap},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableAutoWidth},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableResizableColumns},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableColumnMinWidth}],cardSet:r.CardSetConfigKey._table},[p.BitType.tableAlt]:{since:"1.16.0",baseBitType:p.BitType.table},[p.BitType.standardTableNormative]:{since:"1.16.0",baseBitType:p.BitType.table},[p.BitType.standardTableNonNormative]:{since:"1.16.0",baseBitType:p.BitType.table},[p.BitType.standardRemarkTableNormative]:{since:"1.17.0",baseBitType:p.BitType.table},[p.BitType.standardRemarkTableNonNormative]:{since:"1.17.0",baseBitType:p.BitType.table},[p.BitType.smartStandardTableNormative]:{since:"1.28.0",baseBitType:p.BitType.standardTableNormative},[p.BitType.smartStandardTableNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardTableNonNormative},[p.BitType.smartStandardRemarkTableNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkTableNormative},[p.BitType.smartStandardRemarkTableNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkTableNonNormative},[p.BitType.smartStandardTableNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardTableNormative},[p.BitType.smartStandardTableNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardTableNonNormative},[p.BitType.smartStandardRemarkTableNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkTableNormative},[p.BitType.smartStandardRemarkTableNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkTableNonNormative},[p.BitType.parameters]:{since:"1.18.0",baseBitType:p.BitType.table},[p.BitType.toc]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[]},[p.BitType.tocChapter]:{since:"1.5.5",baseBitType:p.BitType.toc,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.maxDisplayLevel}]},[p.BitType.tocInline]:{since:"3.24.0",baseBitType:p.BitType.toc,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.maxTocChapterLevel}]},[p.BitType.anchor]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.bitBookEnding]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.bitBookSummary]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionAnnounce]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionRatingNumber]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionRemind]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionSave]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionTrueFalse]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.chapterSubjectMatter]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.chat]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.conclusion]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.conclusionAlt]:{since:"1.16.0",baseBitType:p.BitType.conclusion},[p.BitType.documentUpload]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.footNote]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.groupBorn]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.groupDied]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.recordAudio]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.recordVideo]:{since:"1.5.24",baseBitType:p.BitType._standard},[p.BitType.stickyNote]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.takePicture]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.handInAudio]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInContact]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInDocument]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInFile]:{since:"3.2.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.handInAcceptFileType,maxCount:c.Count.infinity}]},[p.BitType.handInLocation]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInPhoto]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInScan]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInSubmit]:{since:"3.2.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.handInRequirement,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.handInInstruction},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.handInVideo]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInVoice]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.trueFalse1]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.labelTrue},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.labelFalse},{type:l.BitTagType.tag,configKey:s.TagConfigKey.true},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false}],rootExampleType:u.ExampleType.boolean},[p.BitType.trueFalse]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.labelTrue},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.labelFalse}],cardSet:r.CardSetConfigKey._statements},[p.BitType.vendorAmcharts5Chart]:{since:"1.5.8",baseBitType:p.BitType.code,tags:[],textFormatDefault:y.TextFormat.json},[p.BitType.vendorDatadogDashboardEmbed]:{since:"3.12.0",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.vendorDashboardId}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorFormbricksEmbed]:{since:"3.8.0",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.vendorSurveyId}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorFormbricksEmbedAnonymous]:{since:"3.9.0",baseBitType:p.BitType.vendorFormbricksEmbed},[p.BitType.vendorFormbricksLink]:{since:"3.8.0",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.vendorSurveyId}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorFormbricksLinkAnonymous]:{since:"3.9.0",baseBitType:p.BitType.vendorFormbricksLink},[p.BitType.vendorHighchartsChart]:{since:"1.5.28",baseBitType:p.BitType.vendorAmcharts5Chart},[p.BitType.vendorIframelyEmbed]:{since:"1.5.10",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.vendorUrl}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorIframelyCard]:{since:"1.5.10",baseBitType:p.BitType.vendorIframelyEmbed},[p.BitType.vendorIframelyPreview]:{since:"1.5.10",baseBitType:p.BitType.vendorIframelyEmbed},[p.BitType.vendorIframelyPreviewMini]:{since:"1.5.10",baseBitType:p.BitType.vendorIframelyEmbed},[p.BitType.vendorJupyterOutput]:{since:"1.4.3",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.jupyterId},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.jupyterExecutionCount}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorJupyterCellCode]:{since:"1.4.3",baseBitType:p.BitType.vendorJupyterOutput},[p.BitType.vendorJupyterCellMarkdown]:{since:"1.4.3",baseBitType:p.BitType.vendorJupyterOutput},[p.BitType.vendorJupyterCellRaw]:{since:"1.4.3",baseBitType:p.BitType.vendorJupyterOutput},[p.BitType.vendorJupyterIpynb]:{since:"1.4.3",baseBitType:p.BitType.vendorJupyterOutput},[p.BitType.vendorPadletEmbed]:{since:"1.3.0",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.padletId}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorStripePricingTable]:{since:"1.20.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.stripePricingTableId,minCount:1},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.stripePublishableKey,minCount:1}]},[p.BitType.vendorStripePricingTableExternal]:{since:"3.13.0",baseBitType:p.BitType.vendorStripePricingTable},[p.BitType.video]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideo,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.videoLandscape]:{since:"1.3.0",baseBitType:p.BitType.video},[p.BitType.videoPortrait]:{since:"1.3.0",baseBitType:p.BitType.video},[p.BitType.videoEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideoEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.videoEmbedLandscape]:{since:"1.3.0",baseBitType:p.BitType.videoEmbed},[p.BitType.videoEmbedPortrait]:{since:"1.3.0",baseBitType:p.BitType.videoEmbed},[p.BitType.videoLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideoLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.videoLinkLandscape]:{since:"1.3.0",baseBitType:p.BitType.videoLink},[p.BitType.videoLinkPortrait]:{since:"1.3.0",baseBitType:p.BitType.videoLink},[p.BitType.websiteLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceWebsiteLink,minCount:1}],resourceAttachmentAllowed:!1}};t.BITS=g},6877:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextLocation=void 0;const r=(0,i(4718).superenum)({tag:"tag",body:"body"});t.TextLocation=r},6915:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GroupConfigType=void 0;const r=(0,i(4718).superenum)({standard:"standard",resource:"resource",comboResource:"comboResource"});t.GroupConfigType=r},6936:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.initEnv=t.env=void 0;const r=i(6278),o=i(9561),n=i(2287),a=i(5659);const s=new class{constructor(){Object.defineProperty(this,"userAgentInfo",{value:(0,a.parseUserAgent)(),enumerable:!1}),this.bootTimestamp=Date.now(),this.app="",this.appVersion=n.EMPTY_VERSION,this.environment=this.getEnvironment(),this.environmentVersion=this.getEnvironmentVersion(),this.isBrowser=this.getIsBrowser(),this.isNode=this.environment===r.Environment.node,this.isCI=this.getIsCI(),this.NODE_ENV=this.getNodeEnv(),this.os=this.getOs(),this.osVersion=this.getOsVersion()}init(e,t){this.app=e,this.appVersion=this.parseMMBVersion(t)}get upTimestamp(){return Date.now()-this.bootTimestamp}getEnvironment(){return this.userAgentInfo?this.userAgentInfo.browser:"undefined"!=typeof process&&void 0!==process.versions&&process.versions.node?r.Environment.node:r.Environment.unknown}getEnvironmentVersion(){return this.userAgentInfo?this.parseMMBVersion(this.userAgentInfo.browserVersion):"undefined"!=typeof process?this.parseMMBVersion(process.version):n.EMPTY_VERSION}getOs(){return this.userAgentInfo?this.userAgentInfo.os:("undefined"!=typeof process&&void 0!==process.versions&&process.versions.node,o.Os.unknown)}getOsVersion(){return this.userAgentInfo?this.parseMMBVersion(this.userAgentInfo.osVersion):"undefined"!=typeof process?this.parseMMBVersion(""):n.EMPTY_VERSION}getIsBrowser(){return!("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof navigator||!navigator.userAgent)}getIsCI(){return!("undefined"==typeof process||!process.env||!process.env.CI)}getNodeEnv(){return"undefined"!=typeof process&&process.env?"production":""}parseMMBVersion(e){if(!e)return n.EMPTY_VERSION;e.startsWith("v")&&(e=e.substring(1));const t=e.split(".",1e3);let i="",r="",o="",a="";for(let e=0,n=t.length;e<n;e++){const n=t[e];0===e?i=n:1===e?r=n:2===e?a=n:3===e&&(o=n)}return{full:e,major:i,minor:r,patch:a,build:o}}};t.env=s;const l=s.init.bind(s);t.initEnv=l},6989:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayUtils=void 0;const i=new class{asArray(e){if(null!=e)return Array.isArray(e)?e:[e]}asSingle(e,t){if(null!=e)return Array.isArray(e)?e.length>0?t?e[e.length-1]:e[0]:void 0:e}};t.ArrayUtils=i},6991:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.commentTagContentProcessor=function(e,t,i,o){if(!o.internalComments)return;const{value:n}=i,a=r.StringUtils.isString(n)?r.StringUtils.trimmedString(n):void 0;if(!a)return;o.internalComments.push(a)};const r=i(9681)},7112:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.groupConfigKeys=t.GroupConfigKey=void 0;const r=i(4718),o={group_standardAllBits:"group_standardAllBits",group_standardItemLeadInstructionHint:"group_standardItemLeadInstructionHint",group_standardExample:"group_standardExample",group_standardTags:"group_standardTags",group_imageSource:"group_imageSource",group_technicalTerm:"group_technicalTerm",group_person:"group_person",group_gap:"group_gap",group_trueFalse:"group_trueFalse",group_markConfig:"group_markConfig",group_mark:"group_mark",group_bookCommon:"group_bookCommon",group_learningPathCommon:"group_learningPathCommon",group_quizCommon:"group_quizCommon",group_resourceBitTags:"group_resourceBitTags",group_resourceCommon:"group_resourceCommon",group_resourceImageCommon:"group_resourceImageCommon",group_resourceAudioCommon:"group_resourceAudioCommon",group_resourceVideoCommon:"group_resourceVideoCommon",group_resourceIcon:"group_resourceIcon",group_resourceImage:"group_resourceImage",group_resourceImageEmbed:"group_resourceImageEmbed",group_resourceImageLink:"group_resourceImageLink",group_resourceImageResponsive:"group_resourceImageResponsive",group_resourceImagePortrait:"group_resourceImagePortrait",group_resourceImageLandscape:"group_resourceImageLandscape",group_resourceAudio:"group_resourceAudio",group_resourceAudioEmbed:"group_resourceAudioEmbed",group_resourceAudioLink:"group_resourceAudioLink",group_resourceVideo:"group_resourceVideo",group_resourceVideoEmbed:"group_resourceVideoEmbed",group_resourceVideoLink:"group_resourceVideoLink",group_resourceStillImageFilm:"group_resourceStillImageFilm",group_resourceStillImageFilmEmbed:"group_resourceStillImageFilmEmbed",group_resourceStillImageFilmLink:"group_resourceStillImageFilmLink",group_resourceArticle:"group_resourceArticle",group_resourceArticleEmbed:"group_resourceArticleEmbed",group_resourceArticleLink:"group_resourceArticleLink",group_resourceDocument:"group_resourceDocument",group_resourceDocumentEmbed:"group_resourceDocumentEmbed",group_resourceDocumentLink:"group_resourceDocumentLink",group_resourceDocumentDownload:"group_resourceDocumentDownload",group_resourceAppLink:"group_resourceAppLink",group_resourceWebsiteLink:"group_resourceWebsiteLink"};t.groupConfigKeys=o;const n=(0,r.superenum)(o);t.GroupConfigKey=n},7124:function(e,t,i){var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkPegParserProcessor=void 0;const o=i(5809),n=i(7735),a=i(2028),s=i(5854),l=i(8453),p=i(6220),c=i(6149),u=i(385),y=i(6877),g=i(9681),d=i(4266),T=i(5033),f=i(1083),m=i(4402),h=i(4382),b=i(3904),B=i(9289),v=i(5189),C=i(9647),x=i(3990),P=i(6521),k=i(7667),K=i(9885),w=i(3029),_=!1,A=!0,S=!0,L=!0,I=!0,F=new o.Builder;t.BitmarkPegParserProcessor=class{constructor(e){this.nonFatalWarnings=[],this.nonFatalErrors=[],this.parser={},this.parse=e.parse,this.parserText=e.parserText,this.parserLocation=e.parserLocation,this.context={bitConfig:a.Config.getBitConfig(s.BitType._error),bitType:s.BitType._error,textFormat:u.TextFormat.bitmarkText,DEBUG_BIT_RAW:true,DEBUG_BIT_CONTENT_RAW:_,DEBUG_BIT_CONTENT:A,DEBUG_BIT_TAGS:S,DEBUG_BODY:L,DEBUG_FOOTER:I,DEBUG_CHAIN_CONTENT:true,DEBUG_CHAIN_TAGS:true,DEBUG_CARD_SET_CONTENT:true,DEBUG_CARD_SET:true,DEBUG_CARD_TAGS:true,parser:this.parser,parse:this.parse,bitContentProcessor:this.bitContentProcessor.bind(this),splitBitContent:this.splitBitContent.bind(this),addWarning:this.addWarning.bind(this),addError:this.addError.bind(this),debugPrint:this.debugPrint.bind(this),state:{}}}buildBits(e){var t;const i=[];let r=[];for(const o of e){if(!o)continue;const e=o.value;e?i.push(e):r=r.concat(null!==(t=o.errors)&&void 0!==t?t:[])}return F.buildBitmark({bits:i,errors:r.length>0?r:void 0})}buildBit(e,t){var i;const{bitType:o,textFormat:n,resourceType:l,bitLevel:p,isCommented:c}=e;if(!o||a.Config.isOfBitType(o,s.BitType._error))return this.invalidBit();const u=a.Config.getBitConfig(o);this.context.bitConfig=u,this.context.bitType=o,this.context.textFormat=n,this.context.resourceType=l;const y=a.Config.isOfBitType(o,s.BitType.trueFalse1),g=a.Config.isOfBitType(o,s.BitType.multipleChoice1),T=a.Config.isOfBitType(o,s.BitType.multipleResponse1);this.debugPrint("BIT CONTENT",t),this.resetParserState(),t=this.squashUnwantedInlineBodyBits(t),t=d.BitmarkPegParserValidator.validateBitTags(this.context,t);const m=this.bitContentProcessor(w.BitContentLevel.Bit,u.tags,t),{body:h,footer:b,cardSet:B,title:v,statement:C,statements:x,choices:K,responses:_,propertyStyleResources:A,resources:S,posterImage:L,internalComments:I}=m,N=r(m,["body","footer","cardSet","title","statement","statements","choices","responses","propertyStyleResources","resources","posterImage","internalComments"]);this.debugPrint("BIT TAGS",N),this.debugPrint("BIT BODY",h),this.debugPrint("BIT FOOTER",b);const O=(0,k.buildTitles)(this.context,o,v),E=(0,f.buildCards)(this.context,o,n,B,C,x,K,_),R=(0,P.buildResources)(this.context,l,S),V=[...null!=I?I:[],...null!==(i=E.internalComments)&&void 0!==i?i:[]],j=this.buildBitLevelWarnings(),D=this.buildBitLevelErrors();j&&(this.parser.warnings=j),D&&(this.parser.errors=D);return{value:F.buildBit(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({bitType:o,bitLevel:p,isCommented:c,textFormat:n,resourceType:l},O),{posterImage:L,statement:y?C:void 0,choices:g?K:void 0,responses:T?_:void 0}),N),A),{resources:R}),E),{body:h,footer:b,internalComment:V,parser:this.parser}))}}invalidBit(e){e&&this.addError("Invalid bit"),this.parser.errors=this.buildBitLevelErrors();return{value:F.buildBit({bitType:a.Config.getBitType(s.BitType._error),bitLevel:1,parser:this.parser})}}buildBitHeader(e,t,i){const r=n.Breakscape.unbreakscape(e,{textFormat:u.TextFormat.plainText,textLocation:y.TextLocation.tag}),o=a.Config.getBitType(r),g=a.Config.isBitTypeCommented(r);a.Config.isOfBitType(o,s.BitType._error)&&this.addError(`Invalid bit type: '${r}'`);const d=a.Config.getBitConfig(o);t>a.Config.bitLevelMax?(this.addWarning(`Bit level of ${t} too high, setting to max value of ${a.Config.bitLevelMax}`),t=a.Config.bitLevelMax):t<a.Config.bitLevelMin&&(this.addWarning(`Bit level of ${t} too low, setting to min value of ${a.Config.bitLevelMin}`),t=a.Config.bitLevelMin);let T=u.TextFormat.fromValue(i.textFormat);i.textFormat&&!T&&this.addWarning(`Invalid text format '${i.textFormat}', defaulting to '${l.BodyTextFormat.bitmarkPlusPlus}'`);const f=p.DeprecatedTextFormat.fromValue(i.textFormat);f&&(T=u.TextFormat.bitmarkText,this.addWarning(`${f} text format is deprecated. Bit will be parsed as '${l.BodyTextFormat.bitmarkPlusPlus}'`)),T=null!=T?T:d.textFormatDefault;const m=c.ResourceTag.fromValue(i.resourceType);return i.resourceType&&!m&&this.addWarning(`Invalid resource type '${i.resourceType}', it will be ignored`),{bitType:o,bitLevel:t,textFormat:null!=T?T:d.textFormatDefault,resourceType:m,isCommented:g}}buildTextAndResourceType(e,t){const i={},r=e=>{if(e){const t=n.Breakscape.unbreakscape(g.StringUtils.string(e.value),{textFormat:u.TextFormat.plainText,textLocation:y.TextLocation.tag});e.type===w.TypeKey.TextFormat?i.textFormat=t:i.resourceType=t}};return r(e),r(t),i}resetParserState(){this.context.state={}}squashUnwantedInlineBodyBits(e){const t=[];if(!e)return t;const{textFormat:i}=this.context,r=i===u.TextFormat.bitmarkText,o=(e,t="")=>{const{chain:i,parser:r}=e;if(t+=r.text,i)for(const e of i)t=o(e,t);return t};let n=!1;for(const i of e){const{type:e,value:a}=i,s=null!=a?a:"";let l=!1;if(n||(e===w.TypeKey.BodyText&&!r&&s&&s.trim()&&(n=!0),e===w.TypeKey.PlainTextDivider&&(n=!0,l=!0)),l)t.push({type:w.TypeKey.BodyText,value:"\n"});else if(n)if(e===w.TypeKey.BodyText)t.push({type:w.TypeKey.BodyTextPlain,value:a});else{const e=o(i);t.push({type:w.TypeKey.BodyTextPlain,value:e})}else t.push(i)}return t}bitContentProcessor(e,t,i){const r={};if(!i)return r;const{bitType:o,textFormat:a}=this.context;r.title=[],r.solutions=[],r.__solutionsAst=[],r.statements=[],r.choices=[],r.responses=[],r.propertyStyleResources={},r.resources=[],r.trueFalse=[],r.markConfig=[],r.extraProperties={},r.internalComments=[];let s=!1,l=!1;const p=[];let c=n.Breakscape.EMPTY_STRING,u=n.Breakscape.EMPTY_STRING,y=n.Breakscape.EMPTY_STRING,g=n.Breakscape.EMPTY_STRING;const f=e===w.BitContentLevel.Bit,_=e===w.BitContentLevel.Card,A=e===w.BitContentLevel.Chain,S=()=>{if(c){c=d.BitmarkPegParserValidator.checkBodyPart(this.context,e,c);const t=T.BodyContentProcessor.buildBodyText(c,!1);p.push(t)}c=n.Breakscape.EMPTY_STRING};for(const o of i){const{type:i,value:a}=o;switch(i){case w.TypeKey.ItemLead:(0,B.itemLeadChainContentProcessor)(this.context,e,t,o,r);break;case w.TypeKey.Instruction:case w.TypeKey.Hint:case w.TypeKey.Anchor:case w.TypeKey.SampleSolution:(0,m.defaultTagContentProcessor)(this.context,e,t,o,r);break;case w.TypeKey.Reference:(0,x.referenceTagContentProcessor)(this.context,e,t,o,r,s),s=!0;break;case w.TypeKey.Title:(0,k.titleTagContentProcessor)(this.context,e,t,o,r);break;case w.TypeKey.Property:(0,C.propertyContentProcessor)(this.context,e,t,o,r);break;case w.TypeKey.Gap:A||S(),(0,b.gapChainContentProcessor)(this.context,e,t,o,r,p);break;case w.TypeKey.Mark:A||S(),(0,v.markChainContentProcessor)(this.context,e,t,o,r,p);break;case w.TypeKey.True:case w.TypeKey.False:A||S(),(0,K.trueFalseChainContentProcessor)(this.context,e,t,o,r,p);break;case w.TypeKey.Resource:(0,P.resourceContentProcessor)(this.context,e,t,o,r);break;case w.TypeKey.CardSet:r.cardSet=a,l=!0;break;case w.TypeKey.BodyText:case w.TypeKey.CardText:l?u=n.Breakscape.concatenate(u,a):c=n.Breakscape.concatenate(c,a);break;case w.TypeKey.BodyTextPlain:l?g=n.Breakscape.concatenate(g,a):y=n.Breakscape.concatenate(y,a);break;case w.TypeKey.FooterDivider:l&&(u=n.Breakscape.concatenate(u,a)),l=!0}}S();const L=y?T.BodyContentProcessor.buildBodyText(y,!0):void 0;if(L&&p.push(L),r.itemLead){const e=r.itemLead.length;e>0&&(r.item=r.itemLead[0]),e>1&&(r.lead=r.itemLead[1]),e>2&&(r.pageNumber=r.itemLead[2]),e>3&&(r.marginNumber=r.itemLead[e-1])}return f?r.body=T.BodyContentProcessor.process(this.context,e,o,a,t,r,p,!1):_&&(r.cardBody=T.BodyContentProcessor.process(this.context,e,o,a,t,r,p,!0)),r.footer=h.FooterContentProcessor.process(this.context,e,t,r,u,g),0===Object.keys(r.extraProperties).length&&delete r.extraProperties,0===r.title.length&&delete r.title,0===r.solutions.length&&delete r.solutions,0===r.statements.length&&delete r.statements,0===r.choices.length&&delete r.choices,0===r.responses.length&&delete r.responses,0===r.trueFalse.length&&delete r.trueFalse,0===r.markConfig.length&&delete r.markConfig,0===Object.keys(r.propertyStyleResources).length&&delete r.propertyStyleResources,0===r.resources.length&&delete r.resources,0===r.internalComments.length&&delete r.internalComments,r}buildBitLevelWarnings(){let e;return this.nonFatalWarnings.length>0&&(e=this.nonFatalWarnings,this.nonFatalWarnings=[]),e}buildBitLevelErrors(){let e;return this.nonFatalErrors.length>0&&(e=this.nonFatalErrors,this.nonFatalErrors=[]),e}splitBitContent(e,t){const i=[];let r=[];for(const o of e)t.includes(o.type)&&(r.length>0&&i.push(r),r=[]),r.push(o);return r.length>0&&i.push(r),i}addWarning(e,t,i){var r,o,n;const a={message:e,text:null!==(r=null==t?void 0:t.parser.text)&&void 0!==r?r:this.parserText(),location:null!==(o=null==t?void 0:t.parser.location)&&void 0!==o?o:this.parserLocation(),original:null!==(n=null==i?void 0:i.parser)&&void 0!==n?n:void 0};a.original||delete a.original,this.nonFatalWarnings.push(a)}addError(e,t,i){var r,o,n;const a={message:e,text:null!==(r=null==t?void 0:t.parser.text)&&void 0!==r?r:this.parserText(),location:null!==(o=null==t?void 0:t.parser.location)&&void 0!==o?o:this.parserLocation(),original:null!==(n=null==i?void 0:i.parser)&&void 0!==n?n:void 0};a.original||delete a.original,this.nonFatalErrors.push(a)}debugPrint(e,t){}}},7203:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyAstKey=void 0;const r=(0,i(4718).superenum)({ast_isCaseSensitive:"isCaseSensitive",ast_referenceProperty:"referenceProperty",ast_markConfig:"markConfig",ast_productList:"productList",ast_productVideoList:"productVideoList"});t.PropertyAstKey=r},7461:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PeggyGrammarLocation=void 0;t.PeggyGrammarLocation=class{constructor(e,t){this.source=e,this.start=t}toString(){return String(this.source)}offset(e){return{line:e.line+this.start.line-1,column:1===e.line?e.column+this.start.column-1:e.column,offset:e.offset+this.start.offset}}static offsetStart(e){return e.source&&"function"==typeof e.source.offset?e.source.offset(e.start):e.start}static offsetEnd(e){return e.source&&"function"==typeof e.source.offset?e.source.offset(e.end):e.end}}},7667:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.titleTagContentProcessor=function(e,t,i,r,o){const{textFormat:l}=e,{value:p}=r,c=o.title;if(!c)return;const u=p,y=a.StringUtils.trimmedString(u.title),g=u.level.length;c[g]={titleAst:s.toAst(null!=y?y:"",{textFormat:l,textLocation:n.TextLocation.tag}),titleString:null!=y?y:""}},t.buildTitles=function(e,t,i){var n,a,s,l,p,c,u,y,g,d;if(i=null!=i?i:[],r.Config.isOfBitType(t,o.BitType.chapter)){let e;return i.length>0&&(e=i[i.length-1]),{title:null!==(n=null==e?void 0:e.titleAst)&&void 0!==n?n:[],titleString:null!==(a=null==e?void 0:e.titleString)&&void 0!==a?a:"",level:i.length>0?i.length-1:void 0}}return{title:null!==(l=null===(s=i[1])||void 0===s?void 0:s.titleAst)&&void 0!==l?l:void 0,titleString:null!==(c=null===(p=i[1])||void 0===p?void 0:p.titleString)&&void 0!==c?c:void 0,subtitle:null!==(y=null===(u=i[2])||void 0===u?void 0:u.titleAst)&&void 0!==y?y:void 0,subtitleString:null!==(d=null===(g=i[2])||void 0===g?void 0:g.titleString)&&void 0!==d?d:void 0}};const r=i(2028),o=i(5854),n=i(6877),a=i(9681),s=new(i(777).TextParser)},7678:(e,t,i)=>{const{deserialize:r}=i(5005),{serialize:o}=i(5416);Object.defineProperty(t,"__esModule",{value:!0}).default="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?r(o(e,t)):structuredClone(e):(e,t)=>r(o(e,t)),t.deserialize=r,t.serialize=o},7735:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Breakscape=void 0;const r=i(385),o=i(6877),n=i(9681),a=/([*`_!=])(?=\1)/,s=/(\^*])/,l=/(\^+)/,p=`${s.source}|${l.source}`,c=`${a.source}|${/^(\|)(code[\s]*|code:|image:|[\s]*$)/.source}|${/^([#]{1,3})([^\S\r\n]+)/.source}|${/^(•)([0-9]+[iI]*|[a-zA-Z]{1}|_|\+|-|)([^\S\r\n]+)/.source}|${/(\[)([.@#▼►%!?+\-$_=&])/.source}|${/^(~)(~~~[ \t]*)$/.source}|${/^(\$)(\$\$\$[ \t]*)$/.source}|${l.source}`,u=`${/^(\[)(\^*)(\.)/.source}`,y=new RegExp(`${a.source}|${s.source}|${l.source}`,"gm"),g=new RegExp(p,"gm"),d=new RegExp(c,"gm"),T=new RegExp(u,"gm"),f=new RegExp("^(?:(\\[)(\\^*)(\\.))|(\\^+)","gm"),m=new RegExp("\\^([\\^]*)","gm"),h=new RegExp("^(\\[)\\^(\\^*)(\\.)","gm"),b=new RegExp("^(\\||•|#)","gm"),B={textFormat:r.TextFormat.bitmarkText,textLocation:o.TextLocation.body};const v=new class{constructor(){this.EMPTY_STRING=""}breakscape(e,t){if(null==e)return e;const i=Object.assign({},B,t),{regex:r,replacer:o}=this.selectBreakscapeRegexAndReplacer(i.textFormat,i.textLocation,i.v2),a=e=>e?e=e.replace(r,o):e;if(Array.isArray(e)){const t=i.modifyArray?e:new Array(e.length);for(let i=0,r=e.length;i<r;i++){const r=e[i];n.StringUtils.isString(r)&&(t[i]=a(r))}e=t}else n.StringUtils.isString(e)&&(e=a(e));return e}unbreakscape(e,t){if(null==e)return e;const i=Object.assign({},B,t),{regex:r,replacer:o}=this.selectUnbreakscapeRegexAndReplacer(i.textFormat,i.textLocation),a=e=>e?e=e.replace(r,o):e;if(Array.isArray(e)){const t=i.modifyArray?e:new Array(e.length);for(let i=0,r=e.length;i<r;i++){const r=e[i];n.StringUtils.isString(r)?t[i]=a(r):t[i]=r}e=t}else n.StringUtils.isString(e)&&(e=a(e));return e}breakscapeCode(e,t){if(null==e)return e;const i=Object.assign({},B,t),r=e=>e?e.replace(b,"$1^"):e;if(Array.isArray(e)){const t=i.modifyArray?e:[e.length];for(let t=0,i=e.length;t<i;t++){const i=e[t];n.StringUtils.isString(i)&&(e[t]=r(i))}e=t}else n.StringUtils.isString(e)&&(e=r(e));return e}selectBreakscapeRegexAndReplacer(e,t,i){let n,a;return t===o.TextLocation.tag?(n=g,a="$2^$1",i||e!==r.TextFormat.bitmarkText||(n=y,a="$1$3^$2")):(n=T,a="$1^$2$3",e===r.TextFormat.bitmarkText&&(i?(n=f,a="$1$4^$2$3"):(n=d,a="$1$2$4$6$9$11$13$15^$3$5$7$8$10$12$14"))),{regex:n,replacer:a}}selectUnbreakscapeRegexAndReplacer(e,t){const i=!(e===r.TextFormat.bitmarkText);let n=m,a="$1";return t===o.TextLocation.body&&i&&(n=h,a="$1$2$3"),{regex:n,replacer:a}}concatenate(e,t){return e+t}};t.Breakscape=v},7797:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tagConfigKeys=t.TagConfigKey=void 0;const r=i(4718),o={title:"title",anchor:"anchor",tag_reference:"tag_reference",property:"property",itemLead:"itemLead",instruction:"instruction",hint:"hint",true:"true",false:"false",sampleSolution:"sampleSolution",gap:"gap",tag_mark:"tag_mark",resource:"resource"};t.tagConfigKeys=o;const n=(0,r.superenum)(o);t.TagConfigKey=n},7984:function(e,t,i){var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(o,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function s(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonObjectGenerator=void 0;const o=i(6772),n=i(2497);t.JsonObjectGenerator=class{constructor(e){this.writer=new o.StringWriter,this.generator=new n.JsonGenerator(this.writer,e)}generate(e){return r(this,void 0,void 0,(function*(){return yield this.generator.generate(e),JSON.parse(this.writer.getString())}))}generateSync(e){return this.generator.generateSync(e),JSON.parse(this.writer.getString())}}},8025:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NumberUtils=void 0;const i=new class{asNumber(e,t){if(null==e)return null!=t?t:void 0;const i=+e;return Number.isNaN(i)||!isFinite(i)?null!=t?t:void 0:i}isNumeric(e){if(null==e)return!1;const t=+e;return!Number.isNaN(t)&&isFinite(t)}};t.NumberUtils=i},8199:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardSetConfigKey=void 0;const r=(0,i(4718).superenum)({_flashcard:"_flashcard",_definitionList:"_definitionList",_elements:"_elements",_statements:"_statements",_quiz:"_quiz",_feedback:"_feedback",_questions:"_questions",_matchPairs:"_matchPairs",_matchAudioPairs:"_matchAudioPairs",_matchImagePairs:"_matchImagePairs",_matchMatrix:"_matchMatrix",_table:"_table",_pronunciationTable:"_pronunciationTable",_botActionResponses:"_botActionResponses",_exampleBitList:"_exampleBitList",_clozeList:"_clozeList",_ingredients:"_ingredients",_bookReferenceList:"_bookReferenceList"});t.CardSetConfigKey=r},8216:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.itemLeadTagContentProcessor=function(e,t,i,a,s){const{textFormat:l}=e,{value:p}=a,c=new n.TextParser,u=o.StringUtils.trimmedString(p);s.itemLead||(s.itemLead=[]);const y=c.toAst(u,{textFormat:l,textLocation:r.TextLocation.tag});s.itemLead.push(y)};const r=i(6877),o=i(9681),n=i(777)},8321:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StartRules=void 0,t.SyntaxError=p,t.parse=u;const r=i(7735),o="8.32.2";function n(e){return"string"!=typeof e?null:r.Breakscape.unbreakscape(e)}function a(e){e&&"object"==typeof e&&(delete e._tempParsingParent,delete e._tempListStart,Object.keys(e).forEach((t=>{a(e[t])})))}function s(e){function t(e){for(let r=e.length-1;r>=0;r--){const o=e[r];(i=o)&&"text"===i.type&&!i.text?e.splice(r,1):o&&Array.isArray(o.content)&&t(o.content)}var i}return Array.isArray(e)?t(e):e&&Array.isArray(e.content)&&t(e.content),e}function l(e){return"undefined"!=typeof parser?parser.parse(e,{startRule:"bitmarkPlusString"}):u(e,{startRule:"bitmarkPlusString"})}function p(e,t,i,r){var o=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(o,p.prototype),o.expected=t,o.found=i,o.location=r,o.name="SyntaxError",o}function c(e,t,i){return i=i||" ",e.length>t?e:(t-=e.length,e+(i+=i.repeat(t)).slice(0,t))}function u(e,t){var i,r={},c=(t=void 0!==t?t:{}).grammarSource,u={version:qn,bitmarkPlusPlus:function(){var e,t;if(Dn++,e=[],(t=Hn())!==r)for(;t!==r;)e.push(t),t=Hn();else e=r;e===r&&(e=function(){var e,t;return e=En,t="",t=Xr(),e=t,e}());Dn--,e===r&&(t=r,0===Dn&&Wn(wt));return e},bitmarkPlus:function(){var e,t;Dn++,e=En,t=xa(),t=Go(t),e=t,Dn--,t=r,0===Dn&&Wn(wt);return e},bitmarkMinusMinus:function(){var e,t;Dn++,e=En,t=Ia(),t=Kn(t),e=t,Dn--,t=r,0===Dn&&Wn(wr);return e},bitmarkPlusString:function(){var e;Dn++,e=xa(),Dn--,0===Dn&&Wn(si);return e},bitmarkMinusMinusString:Ia},y=qn,g="|",d="### ",T="## ",f="# ",m="code",h=":",b="bitmark++",B="bitmark--",v="JavaScript",C="• ",x="•_ ",P="•",k=" ",K="I ",w="i ",_="•A ",A="•a ",S="•+ ",L="•- ",I="\t",F="image",N="#",O="@",E="width",R="height",V="alignment",j="captionAlign",D="left",G="center",M="right",U="=",J="|latex|",$="|imageInline:",W="alignmentVertical",z="size",q="top",H="middle",Y="bottom",X="baseline",Q="sub",Z="super",ee="text-bottom",te="text-top",ie="line-height",re="font-height",oe="explicit",ne="link:",ae="extref:",se="provider:",le="xref:",pe="►",ce="symbol:",ue="footnote:",ye="footnote*:",ge="var:",de="code:",Te="timer",fe="timer:",me="duration:",he="P",be="color:",Be="|►",ve="bold",Ce="italic",xe="light",Pe="highlight",ke="strike",Ke="subscript",we="superscript",_e="ins",Ae="del",Se="underline",Le="doubleUnderline",Ie="circle",Fe="languageEm",Ne="userUnderline",Oe="userDoubleUnderline",Ee="userStrike",Re="userCircle",Ve="userHighlight",je="notranslate",De="aqua",Ge="black",Me="blue",Ue="pink",Je="fuchsia",$e="lightgrey",We="gray",ze="darkgray",qe="green",He="lime",Ye="magenta",Xe="maroon",Qe="navy",Ze="olive",et="orange",tt="purple",it="red",rt="silver",ot="teal",nt="violet",at="white",st="yellow",lt="*",pt="_",ct="`",ut="!",yt="[!",gt="]",dt="\n",Tt="\r\n",ft="http",mt="s",ht="://",bt="mailto:",Bt=/^[ \t]/,vt=/^[0-9]/,Ct=/^[:|]/,xt=/^[\r\u2028-\u2029]/,Pt=/^[^\n\r\u2028\u2029]/,kt=/^[!#-;=?-[\]-_a-{}-~]/,Kt={type:"any"},wt=Un("StyledText"),_t=Gn("|",!1),At=Gn("### ",!1),St=Gn("## ",!1),Lt=Gn("# ",!1),It=Gn("code",!1),Ft=Mn([" ","\t"],!1,!1),Nt=Gn(":",!1),Ot=Gn("bitmark++",!1),Et=Gn("bitmark--",!1),Rt=Gn("JavaScript",!1),Vt=Gn("• ",!1),jt=Gn("•_ ",!1),Dt=Gn("•",!1),Gt=Mn([["0","9"]],!1,!1),Mt=Gn(" ",!1),Ut=Gn("I ",!1),Jt=Gn("i ",!1),$t=Gn("•A ",!1),Wt=Gn("•a ",!1),zt=Gn("•+ ",!1),qt=Gn("•- ",!1),Ht=Gn("\t",!1),Yt=Gn("image",!1),Xt=Gn("#",!1),Qt=Gn("@",!1),Zt=Mn([":","|"],!1,!1),ei=Gn("width",!1),ti=Gn("height",!1),ii=Gn("alignment",!1),ri=Gn("captionAlign",!1),oi=Gn("left",!1),ni=Gn("center",!1),ai=Gn("right",!1),si=Un("StyledString"),li=Gn("=",!1),pi=Gn("|latex|",!1),ci=Gn("|imageInline:",!1),ui=Gn("alignmentVertical",!1),yi=Gn("size",!1),gi=Gn("top",!1),di=Gn("middle",!1),Ti=Gn("bottom",!1),fi=Gn("baseline",!1),mi=Gn("sub",!1),hi=Gn("super",!1),bi=Gn("text-bottom",!1),Bi=Gn("text-top",!1),vi=Gn("line-height",!1),Ci=Gn("font-height",!1),xi=Gn("explicit",!1),Pi=Gn("link:",!1),ki=Gn("extref:",!1),Ki=Gn("provider:",!1),wi=Gn("xref:",!1),_i=Gn("►",!1),Ai=Gn("symbol:",!1),Si=Gn("footnote:",!1),Li=Gn("footnote*:",!1),Ii=Gn("var:",!1),Fi=Gn("code:",!1),Ni=Gn("timer",!1),Oi=Gn("timer:",!1),Ei=Gn("duration:",!1),Ri=Gn("P",!1),Vi=Gn("color:",!1),ji=Gn("|►",!1),Di=Gn("bold",!1),Gi=Gn("italic",!1),Mi=Gn("light",!1),Ui=Gn("highlight",!1),Ji=Gn("strike",!1),$i=Gn("subscript",!1),Wi=Gn("superscript",!1),zi=Gn("ins",!1),qi=Gn("del",!1),Hi=Gn("underline",!1),Yi=Gn("doubleUnderline",!1),Xi=Gn("circle",!1),Qi=Gn("languageEm",!1),Zi=Gn("userUnderline",!1),er=Gn("userDoubleUnderline",!1),tr=Gn("userStrike",!1),ir=Gn("userCircle",!1),rr=Gn("userHighlight",!1),or=Gn("notranslate",!1),nr=Gn("aqua",!1),ar=Gn("black",!1),sr=Gn("blue",!1),lr=Gn("pink",!1),pr=Gn("fuchsia",!1),cr=Gn("lightgrey",!1),ur=Gn("gray",!1),yr=Gn("darkgray",!1),gr=Gn("green",!1),dr=Gn("lime",!1),Tr=Gn("magenta",!1),fr=Gn("maroon",!1),mr=Gn("navy",!1),hr=Gn("olive",!1),br=Gn("orange",!1),Br=Gn("purple",!1),vr=Gn("red",!1),Cr=Gn("silver",!1),xr=Gn("teal",!1),Pr=Gn("violet",!1),kr=Gn("white",!1),Kr=Gn("yellow",!1),wr=Un("MinimalStyledText"),_r=Un("MinimalStyledString"),Ar=Gn("*",!1),Sr=Gn("_",!1),Lr=Gn("`",!1),Ir=Gn("!",!1),Fr=Gn("[!",!1),Nr=Gn("]",!1),Or=Un("Line Terminator"),Er=Gn("\n",!1),Rr=Gn("\r\n",!1),Vr=Mn(["\r",["\u2028","\u2029"]],!1,!1),jr=(Un("whitespace in line"),Un("space"),Un("language tag separator"),Un("white space, separator"),Mn(["\t","\v","\f"," "," ","\ufeff"," "," "," ",[" "," "]," "," "," "],!1,!1),Mn(["\n","\r","\u2028","\u2029"],!1,!1),Mn(["\n","\r","\u2028","\u2029"],!0,!1)),Dr=(Mn(["\n","\r","\u2028","\u2029","\t","\v","\f"," "," ","\ufeff"," "," "," ",[" "," "]," "," "," "],!0,!1),Gn("http",!1)),Gr=Gn("s",!1),Mr=Gn("://",!1),Ur=Gn("mailto:",!1),Jr=Mn(["!",["#",";"],"=",["?","["],["]","_"],["a","{"],["}","~"]],!1,!1),$r=function(){return o},Wr=function(e){return s(Object.assign({},e))},zr=function(e){let t=Object.assign({},e);a(t);return s(t)},qr=function(e){return Object.assign({},e)},Hr=function(e){return Object.assign({},e)},Yr=function(e){return s(Object.assign({},e))},Xr=function(){return[]},Qr=function(e,t){return{type:"heading",content:l(t),attrs:{level:e.length-1}}},Zr=function(e){return e},eo=function(e,t){return Object.assign(Object.assign({},e),{content:t})},to=function(){return{type:"codeBlock",language:""}},io=function(e){return{type:"codeBlock",attrs:{language:e.trim().toLowerCase()}}},ro=function(e){return[{type:"text",text:n(e.trim())}]},oo=function(e){return e},no=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},ao=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},so=function(e,t){let i=t[0]._tempListStart;return Object.assign(Object.assign({},e),{attrs:{start:i},content:t})},lo=function(e,t){let i=t[0]._tempListStart;return Object.assign(Object.assign({},e),{attrs:{start:i},content:t})},po=function(e,t){let i=t[0]._tempListStart;return Object.assign(Object.assign({},e),{attrs:{start:i},content:t})},co=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},uo=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},yo=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},go=function(){return{type:"bulletList"}},To=function(){return{type:"noBulletList"}},fo=function(){return{type:"orderedList"}},mo=function(){return{type:"orderedListRoman"}},ho=function(){return{type:"orderedListRomanLower"}},bo=function(){return{type:"letteredList"}},Bo=function(){return{type:"letteredListLower"}},vo=function(){return{type:"taskList"}},Co=function(e,t,i,r){return r},xo=function(e,t,i,r){let o="bulletList";const n=e.match(/•([0-9]+)([Ii]?) /);let a=1;if(n&&(o="orderedList",n.length>1&&(a=Number(n[1])),n.length>2)){let e=n[2];"I"==e&&(o="orderedListRoman"),"i"==e&&(o="orderedListRomanLower")}"•_ "==e&&(o="noBulletList"),"•A "==e&&(o="letteredList"),"•a "==e&&(o="letteredListLower"),"•+ "!=e&&"•- "!=e||(o="taskList");let s=[{type:"paragraph",attrs:{},content:l((t+i.join("")).trim())}];if(r&&r[0]&&r[0]._tempParsingParent){let e={type:r[0]._tempParsingParent,attrs:{start:a},content:r};if((e.type.startsWith("orderedList")||e.type.startsWith("letteredList"))&&r[0]._tempListStart){const t=r[0]._tempListStart;t>1&&(e.attrs.start=t)}s.push(e)}let p="listItem",c=null;if("taskList"==o){p="taskItem";let t=!1;"•+ "==e&&(t=!0),c={checked:t}}return c?{type:p,attrs:c,content:s,_tempParsingParent:o,_tempListStart:a}:{type:p,content:s,_tempParsingParent:o,_tempListStart:a}},Po=function(e){return e},ko=function(e){return e.join("")===Qa},Ko=function(e){return e.length>Qa.length},wo=function(e){Xa.push(Qa),Qa=e.join("")},_o=function(){return Qa=Xa.pop(),!0},Ao=function(e){return{type:"paragraph",content:l(e.trim()),attrs:{}}},So=function(e){return{type:"paragraph",content:l(e.trim()),attrs:{}}},Lo=function(e){return{type:"paragraph",content:l(e.trim()),attrs:{}}},Io=function(e){return e},Fo=function(e,t,i){const r=Object.assign({},...i);let o=r.alignment||"center";delete r.alignment;let a=r.captionAlign||"left";delete r.captionAlign;let s=r.alt||null;delete r.alt;let l=r.caption||null;delete r.caption;let p=r.align||"center";delete r.align;let c=r.zoomDisabled||Boolean(r.zoomDisabled);return delete r.zoomDisabled,{type:e,attrs:Object.assign({alignment:o,textAlign:a,src:t,alt:n(s),title:n(l),class:p,zoomDisabled:c},r)}},No=function(e){return e},Oo=function(e){return{comment:e}},Eo=function(e,t){return{[e]:parseInt(t)}},Ro=function(e,t){return{type:"error",msg:e+" must be an positive integer.",found:t}},Vo=function(e,t){return{[e]:t}},jo=function(e,t){return{[e]:t}},Do=function(e){return{[e]:!0}},Go=function(e){return[{type:"paragraph",content:e,attrs:{}}]},Mo=function(e,t){return s(e?[e,...t.flat()]:t.flat())},Uo=function(){return{type:"hardBreak"}},Jo=function(e){return{text:n(e),type:"text"}},$o=function(e){return{index:+e,type:"bit"}},Wo=function(e){return{attrs:{formula:n(e)},type:"latex"}},zo=function(e,t,i){return{attrs:Object.assign(Object.assign({alt:e,src:(t.pr+t.t).trim()},Object.assign({},...i)),{zoomDisabled:!0}),type:"imageInline"}},qo=function(e,t){return t||(t=[]),{marks:t,text:n(e),type:"text"}},Ho=function(e){return{marks:[{type:"bold"}],text:n(e),type:"text"}},Yo=function(e){return{marks:[{type:"italic"}],text:n(e),type:"text"}},Xo=function(e){return{marks:[{type:"light"}],text:n(e),type:"text"}},Qo=function(e){return{marks:[{type:"highlight"}],text:n(e),type:"text"}},Zo=function(e){return{marks:[{type:"link",attrs:{href:(e.pr+e.t).trim(),target:"_blank"}}],text:e.t,type:"text"}},en=function(e){return e},tn=function(e){return e},rn=function(e){return{comment:e}},on=function(e,t){return{[e]:parseInt(t)}},nn=function(e,t){return{type:"error",msg:e+" must be an positive integer.",found:t}},an=function(e,t){return{[e]:t}},sn=function(e,t){return{[e]:t}},ln=function(e){return{type:"link",attrs:{href:e.trim(),target:"_blank"}}},pn=function(e,t,i){return{type:"extref",attrs:{extref:e.trim(),references:t,provider:i.trim()}}},cn=function(e,t){return{type:"xref",attrs:{xref:e.trim(),reference:t.trim()}}},un=function(e){return{type:"xref",attrs:{xref:e.trim(),reference:""}}},yn=function(e){return{type:"ref",attrs:{reference:e.trim()}}},gn=function(e,t){const i=Object.assign({},...t);return{type:"symbol",attrs:Object.assign({src:e.trim()},i)}},dn=function(e){return{type:"footnote",attrs:{content:l(e.trim())}}},Tn=function(e){return{type:"footnote*",attrs:{content:l(e.trim())}}},fn=function(e){return{type:"var",attrs:{name:e.trim()}}},mn=function(){return{type:"code",attrs:{language:"plain text"}}},hn=function(e){return{type:"code",attrs:{language:e.trim().toLowerCase()}}},bn=function(){return{type:"timer",attrs:{name:""}}},Bn=function(e){return{type:"timer",attrs:{name:e.trim()}}},vn=function(e){return{type:"duration",attrs:{duration:e}}},Cn=function(e){return{type:"color",attrs:{color:e}}},xn=function(e){return{type:e}},Pn=function(e){return{type:"comment",comment:e}},kn=function(e){return e.trim()},Kn=function(e){return[{type:"paragraph",content:e,attrs:{}}]},wn=function(e,t){return s(e?[e,...t.flat()]:t.flat())},_n=function(){return{type:"hardBreak"}},An=function(e){return{text:n(e),type:"text"}},Sn=function(e){return{index:+e,type:"bit"}},Ln=function(e){return{marks:[{type:"bold"}],text:n(e),type:"text"}},In=function(e){return{marks:[{type:"italic"}],text:n(e),type:"text"}},Fn=function(e){return{marks:[{type:"light"}],text:n(e),type:"text"}},Nn=function(e){return{marks:[{type:"highlight"}],text:n(e),type:"text"}},On=function(e,t){return{pr:e,t}},En=0|t.peg$currPos,Rn=[{line:1,column:1}],Vn=En,jn=t.peg$maxFailExpected||[],Dn=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in u))throw new Error("Can't start parsing from rule \""+t.startRule+'".');y=u[t.startRule]}function Gn(e,t){return{type:"literal",text:e,ignoreCase:t}}function Mn(e,t,i){return{type:"class",parts:e,inverted:t,ignoreCase:i}}function Un(e){return{type:"other",description:e}}function Jn(t){var i,r=Rn[t];if(r)return r;if(t>=Rn.length)i=Rn.length-1;else for(i=t;!Rn[--i];);for(r={line:(r=Rn[i]).line,column:r.column};i<t;)10===e.charCodeAt(i)?(r.line++,r.column=1):r.column++,i++;return Rn[t]=r,r}function $n(e,t,i){var r=Jn(e),o=Jn(t),n={source:c,start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:o.line,column:o.column}};return i&&c&&"function"==typeof c.offset&&(n.start=c.offset(n.start),n.end=c.offset(n.end)),n}function Wn(e){En<Vn||(En>Vn&&(Vn=En,jn=[]),jn.push(e))}function zn(e,t,i){return new p(p.buildMessage(e,t),e,t,i)}function qn(){var t,i,o;for(t=En,i=[],e.length>En?(o=e.charAt(En),En++):(o=r,0===Dn&&Wn(Kt));o!==r;)i.push(o),e.length>En?(o=e.charAt(En),En++):(o=r,0===Dn&&Wn(Kt));return t=i=$r()}function Hn(){var t,i;return t=En,i=function(){var t,i,o,n,a;if(t=En,i=Qn(),i!==r){for(o=En,n=[],a=za();a!==r;)n.push(a),a=za();o=e.substring(o,En),(n=qa())!==r?((a=Wa())===r&&(a=null),t=Qr(i,o)):(En=t,t=r)}else En=t,t=r;return t}(),i!==r&&(i=Wr(i)),(t=i)===r&&(t=En,i=function(){var e,t,i,o;if(e=En,t=function(){var e,t,i;e=En,t=En,Dn++,i=ia(),Dn--,i!==r?(En=t,t=void 0):t=r;t!==r&&(t=go());return e=t,e}(),t!==r){if(i=[],(o=ua())!==r)for(;o!==r;)i.push(o),o=ua();else i=r;i!==r?((o=Wa())===r&&(o=null),e=no(t,i)):(En=e,e=r)}else En=e,e=r;if(e===r){if(e=En,t=function(){var e,t,i;e=En,t=En,Dn++,i=ra(),Dn--,i!==r?(En=t,t=void 0):t=r;t!==r&&(t=To());return e=t,e}(),t!==r){if(i=[],(o=ua())!==r)for(;o!==r;)i.push(o),o=ua();else i=r;i!==r?((o=Wa())===r&&(o=null),e=ao(t,i)):(En=e,e=r)}else En=e,e=r;if(e===r){if(e=En,t=function(){var e,t,i;e=En,t=En,Dn++,i=oa(),Dn--,i!==r?(En=t,t=void 0):t=r;t!==r&&(t=fo());return e=t,e}(),t!==r){if(i=[],(o=ua())!==r)for(;o!==r;)i.push(o),o=ua();else i=r;i!==r?((o=Wa())===r&&(o=null),e=so(t,i)):(En=e,e=r)}else En=e,e=r;if(e===r){if(e=En,t=function(){var e,t,i;e=En,t=En,Dn++,i=na(),Dn--,i!==r?(En=t,t=void 0):t=r;t!==r&&(t=mo());return e=t,e}(),t!==r){if(i=[],(o=ua())!==r)for(;o!==r;)i.push(o),o=ua();else i=r;i!==r?((o=Wa())===r&&(o=null),e=lo(t,i)):(En=e,e=r)}else En=e,e=r;if(e===r){if(e=En,t=function(){var e,t,i;e=En,t=En,Dn++,i=aa(),Dn--,i!==r?(En=t,t=void 0):t=r;t!==r&&(t=ho());return e=t,e}(),t!==r){if(i=[],(o=ua())!==r)for(;o!==r;)i.push(o),o=ua();else i=r;i!==r?((o=Wa())===r&&(o=null),e=po(t,i)):(En=e,e=r)}else En=e,e=r;if(e===r){if(e=En,t=function(){var e,t,i;e=En,t=En,Dn++,i=sa(),Dn--,i!==r?(En=t,t=void 0):t=r;t!==r&&(t=bo());return e=t,e}(),t!==r){if(i=[],(o=ua())!==r)for(;o!==r;)i.push(o),o=ua();else i=r;i!==r?((o=Wa())===r&&(o=null),e=co(t,i)):(En=e,e=r)}else En=e,e=r;if(e===r){if(e=En,t=function(){var e,t,i;e=En,t=En,Dn++,i=la(),Dn--,i!==r?(En=t,t=void 0):t=r;t!==r&&(t=Bo());return e=t,e}(),t!==r){if(i=[],(o=ua())!==r)for(;o!==r;)i.push(o),o=ua();else i=r;i!==r?((o=Wa())===r&&(o=null),e=uo(t,i)):(En=e,e=r)}else En=e,e=r;if(e===r)if(e=En,t=function(){var e,t,i;e=En,t=En,Dn++,i=pa(),Dn--,i!==r?(En=t,t=void 0):t=r;t!==r&&(t=vo());return e=t,e}(),t!==r){if(i=[],(o=ua())!==r)for(;o!==r;)i.push(o),o=ua();else i=r;i!==r?((o=Wa())===r&&(o=null),e=yo(t,i)):(En=e,e=r)}else En=e,e=r}}}}}}return e}(),i!==r&&(i=zr(i)),(t=i)===r&&(t=En,(i=ha())!==r&&(i=qr(i)),(t=i)===r&&(t=En,i=function(){var t,i,o;t=En,i=ea(),i!==r?(o=function(){var t,i,o,n;t=En,i=En,o=[],n=ta();for(;n!==r;)o.push(n),n=ta();return i=e.substring(i,En),i=ro(i),t=i,t}(),t=eo(i,o)):(En=t,t=r);return t}(),i!==r&&(i=Hr(i)),(t=i)===r&&(t=En,i=function(){var e,t,i;e=En,t=En,Dn++,i=Yn(),Dn--,i===r?t=void 0:(En=t,t=r);t!==r&&(i=da())!==r?e=Ao(i):(En=e,e=r);e===r&&(e=En,(t=fa())!==r&&(i=da())!==r?e=So(i):(En=e,e=r),e===r&&(e=En,(t=fa())!==r?e=Lo(i=""):(En=e,e=r)));return e}(),i!==r&&(i=Yr(i)),t=i)))),t}function Yn(){var e;return(e=Qn())===r&&(e=ca())===r&&(e=ha())===r&&(e=ea())===r&&(e=fa()),e}function Xn(){var t;return 124===e.charCodeAt(En)?(t=g,En++):(t=r,0===Dn&&Wn(_t)),t}function Qn(){var t;return e.substr(En,4)===d?(t=d,En+=4):(t=r,0===Dn&&Wn(At)),t===r&&(e.substr(En,3)===T?(t=T,En+=3):(t=r,0===Dn&&Wn(St)),t===r&&(e.substr(En,2)===f?(t=f,En+=2):(t=r,0===Dn&&Wn(Lt)))),t}function Zn(){var t,i;return t=En,Xn()!==r?(i=function(){var t;return e.substr(En,4)===m?(t=m,En+=4):(t=r,0===Dn&&Wn(It)),t}(),i!==r?t=Zr(i):(En=t,t=r)):(En=t,t=r),t}function ea(){var t,i,o,n,a,s,l;if(t=En,Zn()!==r){for(i=En,o=En,n=[],a=e.charAt(En),Bt.test(a)?En++:(a=r,0===Dn&&Wn(Ft));a!==r;)n.push(a),a=e.charAt(En),Bt.test(a)?En++:(a=r,0===Dn&&Wn(Ft));(a=qa())!==r?o=n=[n,a]:(En=o,o=r),(i=o!==r?e.substring(i,En):o)!==r?t=to():(En=t,t=r)}else En=t,t=r;if(t===r)if(t=En,Zn()!==r)if(58===e.charCodeAt(En)?(i=h,En++):(i=r,0===Dn&&Wn(Nt)),i!==r)if(o=function(){var t,i,o;e.substr(En,9)===b?(t=b,En+=9):(t=r,0===Dn&&Wn(Ot));if(t===r&&(e.substr(En,9)===B?(t=B,En+=9):(t=r,0===Dn&&Wn(Et)),t===r&&(e.substr(En,10)===v?(t=v,En+=10):(t=r,0===Dn&&Wn(Rt)),t===r))){if(t=En,i=[],(o=za())!==r)for(;o!==r;)i.push(o),o=za();else i=r;(t=i!==r?e.substring(t,En):i)===r&&(t="")}return t}(),o!==r){for(n=En,a=En,s=[],l=e.charAt(En),Bt.test(l)?En++:(l=r,0===Dn&&Wn(Ft));l!==r;)s.push(l),l=e.charAt(En),Bt.test(l)?En++:(l=r,0===Dn&&Wn(Ft));(l=qa())!==r?a=s=[s,l]:(En=a,a=r),(n=a!==r?e.substring(n,En):a)!==r?t=io(o):(En=t,t=r)}else En=t,t=r;else En=t,t=r;else En=t,t=r;return t}function ta(){var t,i,o,n,a,s;if(t=En,i=En,Dn++,o=Yn(),Dn--,o===r?i=void 0:(En=i,i=r),i!==r){if(o=En,n=En,a=[],(s=za())!==r)for(;s!==r;)a.push(s),s=za();else a=r;a!==r&&(s=qa())!==r?n=a=[a,s]:(En=n,n=r),(o=n!==r?e.substring(o,En):n)!==r?t=oo(o):(En=t,t=r)}else En=t,t=r;return t===r&&(t=Wa()),t}function ia(){var t;return e.substr(En,2)===C?(t=C,En+=2):(t=r,0===Dn&&Wn(Vt)),t}function ra(){var t;return e.substr(En,3)===x?(t=x,En+=3):(t=r,0===Dn&&Wn(jt)),t}function oa(){var t,i,o,n,a;if(t=En,i=En,8226===e.charCodeAt(En)?(o=P,En++):(o=r,0===Dn&&Wn(Dt)),o!==r){if(n=[],a=e.charAt(En),vt.test(a)?En++:(a=r,0===Dn&&Wn(Gt)),a!==r)for(;a!==r;)n.push(a),a=e.charAt(En),vt.test(a)?En++:(a=r,0===Dn&&Wn(Gt));else n=r;n!==r?(32===e.charCodeAt(En)?(a=k,En++):(a=r,0===Dn&&Wn(Mt)),a!==r?i=o=[o,n,a]:(En=i,i=r)):(En=i,i=r)}else En=i,i=r;return t=i!==r?e.substring(t,En):i}function na(){var t,i,o,n,a;if(t=En,i=En,8226===e.charCodeAt(En)?(o=P,En++):(o=r,0===Dn&&Wn(Dt)),o!==r){if(n=[],a=e.charAt(En),vt.test(a)?En++:(a=r,0===Dn&&Wn(Gt)),a!==r)for(;a!==r;)n.push(a),a=e.charAt(En),vt.test(a)?En++:(a=r,0===Dn&&Wn(Gt));else n=r;n!==r?(e.substr(En,2)===K?(a=K,En+=2):(a=r,0===Dn&&Wn(Ut)),a!==r?i=o=[o,n,a]:(En=i,i=r)):(En=i,i=r)}else En=i,i=r;return t=i!==r?e.substring(t,En):i}function aa(){var t,i,o,n,a;if(t=En,i=En,8226===e.charCodeAt(En)?(o=P,En++):(o=r,0===Dn&&Wn(Dt)),o!==r){if(n=[],a=e.charAt(En),vt.test(a)?En++:(a=r,0===Dn&&Wn(Gt)),a!==r)for(;a!==r;)n.push(a),a=e.charAt(En),vt.test(a)?En++:(a=r,0===Dn&&Wn(Gt));else n=r;n!==r?(e.substr(En,2)===w?(a=w,En+=2):(a=r,0===Dn&&Wn(Jt)),a!==r?i=o=[o,n,a]:(En=i,i=r)):(En=i,i=r)}else En=i,i=r;return t=i!==r?e.substring(t,En):i}function sa(){var t;return e.substr(En,3)===_?(t=_,En+=3):(t=r,0===Dn&&Wn($t)),t}function la(){var t;return e.substr(En,3)===A?(t=A,En+=3):(t=r,0===Dn&&Wn(Wt)),t}function pa(){var t;return e.substr(En,3)===S?(t=S,En+=3):(t=r,0===Dn&&Wn(zt)),t===r&&(e.substr(En,3)===L?(t=L,En+=3):(t=r,0===Dn&&Wn(qt))),t}function ca(){var e;return(e=ia())===r&&(e=ra())===r&&(e=oa())===r&&(e=na())===r&&(e=aa())===r&&(e=sa())===r&&(e=la())===r&&(e=pa()),e}function ua(){var t,i,o,n,a,s,l,p;if(t=En,ga()!==r)if((i=ca())!==r){for(o=En,n=En,a=[],s=En,l=En,Dn++,p=Wa(),Dn--,p===r?l=void 0:(En=l,l=r),l!==r?(e.length>En?(p=e.charAt(En),En++):(p=r,0===Dn&&Wn(Kt)),p!==r?s=l=[l,p]:(En=s,s=r)):(En=s,s=r);s!==r;)a.push(s),s=En,l=En,Dn++,p=Wa(),Dn--,p===r?l=void 0:(En=l,l=r),l!==r?(e.length>En?(p=e.charAt(En),En++):(p=r,0===Dn&&Wn(Kt)),p!==r?s=l=[l,p]:(En=s,s=r)):(En=s,s=r);for((s=Wa())===r&&(s=null),n=a=[a,s],o=e.substring(o,En),n=[],a=ya();a!==r;)n.push(a),a=ya();if(a=En,s=function(){var t,i,o,n;t=En,Dn++,i=En,o=[],9===e.charCodeAt(En)?(n=I,En++):(n=r,0===Dn&&Wn(Ht));if(n!==r)for(;n!==r;)o.push(n),9===e.charCodeAt(En)?(n=I,En++):(n=r,0===Dn&&Wn(Ht));else o=r;o!==r?(n=(n=Ko(o))?void 0:r)!==r?i=wo(o):(En=i,i=r):(En=i,i=r);Dn--,i!==r?(En=t,t=void 0):t=r;return t}(),s!==r){for(l=[],p=ua();p!==r;)l.push(p),p=ua();p=function(){var e;e=_o(),e=e?void 0:r;return e}(),p!==r?a=Co(i,o,n,l):(En=a,a=r)}else En=a,a=r;a===r&&(a=null),t=xo(i,o,n,a)}else En=t,t=r;else En=t,t=r;return t}function ya(){var t,i,o,n,a,s,l,p,c,u;if(t=En,i=En,Dn++,o=function(){var t,i,o;t=En,i=[],o=e.charAt(En),Bt.test(o)?En++:(o=r,0===Dn&&Wn(Ft));for(;o!==r;)i.push(o),o=e.charAt(En),Bt.test(o)?En++:(o=r,0===Dn&&Wn(Ft));o=Wa(),o!==r?t=i=[i,o]:(En=t,t=r);return t}(),Dn--,o===r?i=void 0:(En=i,i=r),i!==r)if((o=ga())!==r)if(n=En,Dn++,a=ca(),Dn--,a===r?n=void 0:(En=n,n=r),n!==r){if(a=En,s=En,l=[],p=En,c=En,Dn++,u=Wa(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r?(e.length>En?(u=e.charAt(En),En++):(u=r,0===Dn&&Wn(Kt)),u!==r?p=c=[c,u]:(En=p,p=r)):(En=p,p=r),p!==r)for(;p!==r;)l.push(p),p=En,c=En,Dn++,u=Wa(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r?(e.length>En?(u=e.charAt(En),En++):(u=r,0===Dn&&Wn(Kt)),u!==r?p=c=[c,u]:(En=p,p=r)):(En=p,p=r);else l=r;l!==r&&(p=qa())!==r?s=l=[l,p]:(En=s,s=r),(a=s!==r?e.substring(a,En):s)!==r?t=Po(a):(En=t,t=r)}else En=t,t=r;else En=t,t=r;else En=t,t=r;return t}function ga(){var t,i,o;for(t=En,i=[],9===e.charCodeAt(En)?(o=I,En++):(o=r,0===Dn&&Wn(Ht));o!==r;)i.push(o),9===e.charCodeAt(En)?(o=I,En++):(o=r,0===Dn&&Wn(Ht));return(o=(o=ko(i))?void 0:r)!==r?t=i=[i,o]:(En=t,t=r),t}function da(){var t,i,o;if(t=En,i=[],(o=Ta())!==r)for(;o!==r;)i.push(o),o=Ta();else i=r;return t=i!==r?e.substring(t,En):i}function Ta(){var t,i,o,n,a,s;if(t=En,i=En,Dn++,o=Yn(),Dn--,o===r?i=void 0:(En=i,i=r),i!==r){if(o=En,n=En,a=[],(s=za())!==r)for(;s!==r;)a.push(s),s=za();else a=r;a!==r&&(s=qa())!==r?n=a=[a,s]:(En=n,n=r),(o=n!==r?e.substring(o,En):n)!==r?t=i=[i,o]:(En=t,t=r)}else En=t,t=r;return t===r&&(t=Wa()),t}function fa(){var t,i,o,n,a,s;if(t=En,(i=Xn())!==r){for(o=En,n=En,a=[],s=e.charAt(En),Bt.test(s)?En++:(s=r,0===Dn&&Wn(Ft));s!==r;)a.push(s),s=e.charAt(En),Bt.test(s)?En++:(s=r,0===Dn&&Wn(Ft));(s=qa())!==r?n=a=[a,s]:(En=n,n=r),(o=n!==r?e.substring(o,En):n)!==r?((n=Wa())===r&&(n=null),t=i=[i,o,n]):(En=t,t=r)}else En=t,t=r;return t}function ma(){var t,i;return t=En,Xn()!==r?(i=function(){var t;return e.substr(En,5)===F?(t=F,En+=5):(t=r,0===Dn&&Wn(Yt)),t}(),i!==r?t=Io(i):(En=t,t=r)):(En=t,t=r),t}function ha(){var t,i,o,n,a,s,l,p,c,u;if(t=En,(i=ma())!==r)if(58===e.charCodeAt(En)?(o=h,En++):(o=r,0===Dn&&Wn(Nt)),o!==r)if(32===e.charCodeAt(En)?(n=k,En++):(n=r,0===Dn&&Wn(Mt)),n===r&&(n=null),a=function(){var t,i,o,n,a,s,l,p,c;t=En,i=En,e.substr(En,4)===ft?(o=ft,En+=4):(o=r,0===Dn&&Wn(Dr));if(o!==r)if(115===e.charCodeAt(En)?(n=mt,En++):(n=r,0===Dn&&Wn(Gr)),n===r&&(n=null),e.substr(En,3)===ht?(a=ht,En+=3):(a=r,0===Dn&&Wn(Mr)),a!==r){for(s=[],l=En,p=En,Dn++,c=Xn(),Dn--,c===r?p=void 0:(En=p,p=r),p!==r&&(c=Ya())!==r?l=p=[p,c]:(En=l,l=r);l!==r;)s.push(l),l=En,p=En,Dn++,c=Xn(),Dn--,c===r?p=void 0:(En=p,p=r),p!==r&&(c=Ya())!==r?l=p=[p,c]:(En=l,l=r);i=o=[o,n,a,s]}else En=i,i=r;else En=i,i=r;t=i!==r?e.substring(t,En):i;return t}(),a!==r)if(Xn()!==r){for(s=ba(),l=En,p=En,c=[],u=e.charAt(En),Bt.test(u)?En++:(u=r,0===Dn&&Wn(Ft));u!==r;)c.push(u),u=e.charAt(En),Bt.test(u)?En++:(u=r,0===Dn&&Wn(Ft));(u=qa())!==r?p=c=[c,u]:(En=p,p=r),(l=p!==r?e.substring(l,En):p)!==r?((p=Wa())===r&&(p=null),t=Fo(i,a,s)):(En=t,t=r)}else En=t,t=r;else En=t,t=r;else En=t,t=r;else En=t,t=r;return t}function ba(){var e,t,i;for(e=En,t=[],i=Ba();i!==r;)t.push(i),i=Ba();return e=t=No(t)}function Ba(){var t,i,o,n,a,s,l,p,c,u;if(t=En,35===e.charCodeAt(En)?(i=N,En++):(i=r,0===Dn&&Wn(Xt)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=Oo(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,64===e.charCodeAt(En)?(i=O,En++):(i=r,0===Dn&&Wn(Qt)),i===r&&(i=null),(o=va())!==r)if(58===e.charCodeAt(En)?(n=h,En++):(n=r,0===Dn&&Wn(Nt)),n!==r){for(a=[],32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s!==r;)a.push(s),32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));if(s=En,l=[],p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r?(u=e.charAt(En),vt.test(u)?En++:(u=r,0===Dn&&Wn(Gt)),u!==r?p=c=[c,u]:(En=p,p=r)):(En=p,p=r),p!==r)for(;p!==r;)l.push(p),p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r?(u=e.charAt(En),vt.test(u)?En++:(u=r,0===Dn&&Wn(Gt)),u!==r?p=c=[c,u]:(En=p,p=r)):(En=p,p=r);else l=r;(s=l!==r?e.substring(s,En):l)!==r&&(l=Xn())!==r?t=Eo(o,s):(En=t,t=r)}else En=t,t=r;else En=t,t=r;if(t===r){if(t=En,64===e.charCodeAt(En)?(i=O,En++):(i=r,0===Dn&&Wn(Qt)),i===r&&(i=null),(o=va())!==r)if(58===e.charCodeAt(En)?(n=h,En++):(n=r,0===Dn&&Wn(Nt)),n!==r){for(a=[],32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s!==r;)a.push(s),32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));for(s=En,l=[],p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);p!==r;)l.push(p),p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);s=e.substring(s,En),(l=Xn())!==r?t=Ro(o,s):(En=t,t=r)}else En=t,t=r;else En=t,t=r;if(t===r){if(t=En,64===e.charCodeAt(En)?(i=O,En++):(i=r,0===Dn&&Wn(Qt)),i===r&&(i=null),(o=Ca())!==r)if(58===e.charCodeAt(En)?(n=h,En++):(n=r,0===Dn&&Wn(Nt)),n!==r){for(a=[],32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s!==r;)a.push(s),32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s=function(){var t;e.substr(En,4)===D?(t=D,En+=4):(t=r,0===Dn&&Wn(oi));t===r&&(e.substr(En,6)===G?(t=G,En+=6):(t=r,0===Dn&&Wn(ni)),t===r&&(e.substr(En,5)===M?(t=M,En+=5):(t=r,0===Dn&&Wn(ai))));return t}(),s!==r&&(l=Xn())!==r?t=Vo(o,s):(En=t,t=r)}else En=t,t=r;else En=t,t=r;if(t===r){for(t=En,64===e.charCodeAt(En)?(i=O,En++):(i=r,0===Dn&&Wn(Qt)),i===r&&(i=null),o=En,n=[],a=En,s=En,Dn++,l=e.charAt(En),Ct.test(l)?En++:(l=r,0===Dn&&Wn(Zt)),l===r&&(l=En,(p=Ca())!==r?(58===e.charCodeAt(En)?(c=h,En++):(c=r,0===Dn&&Wn(Nt)),c!==r?l=p=[p,c]:(En=l,l=r)):(En=l,l=r)),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=e.charAt(En),Ct.test(l)?En++:(l=r,0===Dn&&Wn(Zt)),l===r&&(l=En,(p=Ca())!==r?(58===e.charCodeAt(En)?(c=h,En++):(c=r,0===Dn&&Wn(Nt)),c!==r?l=p=[p,c]:(En=l,l=r)):(En=l,l=r)),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);if(o=e.substring(o,En),58===e.charCodeAt(En)?(n=h,En++):(n=r,0===Dn&&Wn(Nt)),n!==r){for(32===e.charCodeAt(En)?(a=k,En++):(a=r,0===Dn&&Wn(Mt)),a===r&&(a=null),s=En,l=[],p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);p!==r;)l.push(p),p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);s=e.substring(s,En),(l=Xn())!==r?t=jo(o,s):(En=t,t=r)}else En=t,t=r;if(t===r){for(t=En,64===e.charCodeAt(En)?(i=O,En++):(i=r,0===Dn&&Wn(Qt)),i===r&&(i=null),o=En,n=[],a=En,s=En,Dn++,(l=Xn())===r&&(l=En,(p=Ca())!==r?(58===e.charCodeAt(En)?(c=h,En++):(c=r,0===Dn&&Wn(Nt)),c!==r?l=p=[p,c]:(En=l,l=r)):(En=l,l=r)),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,(l=Xn())===r&&(l=En,(p=Ca())!==r?(58===e.charCodeAt(En)?(c=h,En++):(c=r,0===Dn&&Wn(Nt)),c!==r?l=p=[p,c]:(En=l,l=r)):(En=l,l=r)),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=Do(o):(En=t,t=r)}}}}}return t}function va(){var t;return e.substr(En,5)===E?(t=E,En+=5):(t=r,0===Dn&&Wn(ei)),t===r&&(e.substr(En,6)===R?(t=R,En+=6):(t=r,0===Dn&&Wn(ti))),t}function Ca(){var t;return e.substr(En,9)===V?(t=V,En+=9):(t=r,0===Dn&&Wn(ii)),t===r&&(e.substr(En,12)===j?(t=j,En+=12):(t=r,0===Dn&&Wn(ri))),t}function xa(){var e,t,i,o;for(e=En,(t=Pa())===r&&(t=null),i=[],(o=wa())===r&&(o=Pa());o!==r;)i.push(o),(o=wa())===r&&(o=Pa());return e=Mo(t,i)}function Pa(){var t,i,o,n,a,s,l;if(t=En,(i=Wa())!==r&&(i=Uo()),(t=i)===r){if(t=En,i=En,o=[],n=En,(a=_a())===r&&(a=null),s=En,Dn++,l=wa(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?n=a=[a,s,l]:(En=n,n=r),n===r&&(n=En,(a=_a())!==r?(s=En,Dn++,l=wa(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r)),n!==r)for(;n!==r;)o.push(n),n=En,(a=_a())===r&&(a=null),s=En,Dn++,l=wa(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?n=a=[a,s,l]:(En=n,n=r),n===r&&(n=En,(a=_a())!==r?(s=En,Dn++,l=wa(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r));else o=r;(i=o!==r?e.substring(i,En):o)!==r&&(i=Jo(i)),t=i}return t}function ka(){var t;return 61===e.charCodeAt(En)?(t=U,En++):(t=r,0===Dn&&Wn(li)),t}function Ka(){var e,t,i;return e=En,(t=ka())!==r&&(i=ka())!==r?e=t=[t,i]:(En=e,e=r),e}function wa(){var t,i,o,n,a,s,l,p;if(t=En,(i=Ma())!==r){if(o=En,n=[],a=e.charAt(En),vt.test(a)?En++:(a=r,0===Dn&&Wn(Gt)),a!==r)for(;a!==r;)n.push(a),a=e.charAt(En),vt.test(a)?En++:(a=r,0===Dn&&Wn(Gt));else n=r;(o=n!==r?e.substring(o,En):n)!==r&&(n=Ua())!==r?t=$o(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,(i=Ka())!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Ka(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Ka(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);o=e.substring(o,En),(n=Ka())!==r?(e.substr(En,7)===J?(a=J,En+=7):(a=r,0===Dn&&Wn(pi)),a!==r?t=Wo(o):(En=t,t=r)):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,(i=Ka())!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Ka(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Ka(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);o=e.substring(o,En),(n=Ka())!==r?(e.substr(En,13)===$?(a=$,En+=13):(a=r,0===Dn&&Wn(ci)),a!==r&&(s=Ha())!==r?(124===e.charCodeAt(En)?(l=g,En++):(l=r,0===Dn&&Wn(_t)),l!==r?(p=function(){var e,t,i;e=En,t=[],i=Aa();for(;i!==r;)t.push(i),i=Aa();return t=tn(t),e=t,e}(),t=zo(o,s,p)):(En=t,t=r)):(En=t,t=r)):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,(i=Ka())!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Ka(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Ka(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);o=e.substring(o,En),(n=Ka())!==r?(a=function(){var t,i,o,n;t=En,124===e.charCodeAt(En)?(i=g,En++):(i=r,0===Dn&&Wn(_t));if(i!==r){if(o=[],(n=Sa())!==r)for(;n!==r;)o.push(n),n=Sa();else o=r;o!==r?t=en(o):(En=t,t=r)}else En=t,t=r;return t}(),a!==r?t=qo(o,a):(En=t,t=r)):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,(i=Va())!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Va(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Va(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);o=e.substring(o,En),(n=Va())!==r?t=Ho(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,(i=ja())!==r){for(o=En,n=[],a=En,s=En,Dn++,l=ja(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=ja(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);o=e.substring(o,En),(n=ja())!==r?t=Yo(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,(i=Da())!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Da(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Da(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);o=e.substring(o,En),(n=Da())!==r?t=Xo(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,(i=Ga())!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Ga(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Ga(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);o=e.substring(o,En),(n=Ga())!==r?t=Qo(o):(En=t,t=r)}else En=t,t=r;t===r&&(t=En,(i=Ha())!==r&&(i=Zo(i)),t=i)}}}}}}}return t}function _a(){var t,i,o,n,a;if(t=En,i=En,(o=Ka())!==r){if(n=[],(a=ka())!==r)for(;a!==r;)n.push(a),a=ka();else n=r;n!==r?i=o=[o,n]:(En=i,i=r)}else En=i,i=r;if((t=i!==r?e.substring(t,En):i)===r){if(t=En,i=En,(o=Da())!==r){if(n=[],(a=Ea())!==r)for(;a!==r;)n.push(a),a=Ea();else n=r;n!==r?i=o=[o,n]:(En=i,i=r)}else En=i,i=r;if((t=i!==r?e.substring(t,En):i)===r){if(t=En,i=En,(o=Ga())!==r){if(n=[],(a=Ra())!==r)for(;a!==r;)n.push(a),a=Ra();else n=r;n!==r?i=o=[o,n]:(En=i,i=r)}else En=i,i=r;t=i!==r?e.substring(t,En):i}}return t}function Aa(){var t,i,o,n,a,s,l,p,c,u;if(t=En,35===e.charCodeAt(En)?(i=N,En++):(i=r,0===Dn&&Wn(Xt)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=rn(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,64===e.charCodeAt(En)?(i=O,En++):(i=r,0===Dn&&Wn(Qt)),i===r&&(i=null),(o=va())!==r)if(58===e.charCodeAt(En)?(n=h,En++):(n=r,0===Dn&&Wn(Nt)),n!==r){for(a=[],32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s!==r;)a.push(s),32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));if(s=En,l=[],p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r?(u=e.charAt(En),vt.test(u)?En++:(u=r,0===Dn&&Wn(Gt)),u!==r?p=c=[c,u]:(En=p,p=r)):(En=p,p=r),p!==r)for(;p!==r;)l.push(p),p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r?(u=e.charAt(En),vt.test(u)?En++:(u=r,0===Dn&&Wn(Gt)),u!==r?p=c=[c,u]:(En=p,p=r)):(En=p,p=r);else l=r;(s=l!==r?e.substring(s,En):l)!==r&&(l=Xn())!==r?t=on(o,s):(En=t,t=r)}else En=t,t=r;else En=t,t=r;if(t===r){if(t=En,64===e.charCodeAt(En)?(i=O,En++):(i=r,0===Dn&&Wn(Qt)),i===r&&(i=null),(o=va())!==r)if(58===e.charCodeAt(En)?(n=h,En++):(n=r,0===Dn&&Wn(Nt)),n!==r){for(a=[],32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s!==r;)a.push(s),32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));for(s=En,l=[],p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);p!==r;)l.push(p),p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);s=e.substring(s,En),(l=Xn())!==r?t=nn(o,s):(En=t,t=r)}else En=t,t=r;else En=t,t=r;if(t===r){if(t=En,64===e.charCodeAt(En)?(i=O,En++):(i=r,0===Dn&&Wn(Qt)),i===r&&(i=null),e.substr(En,17)===W?(o=W,En+=17):(o=r,0===Dn&&Wn(ui)),o!==r)if(58===e.charCodeAt(En)?(n=h,En++):(n=r,0===Dn&&Wn(Nt)),n!==r){for(a=[],32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s!==r;)a.push(s),32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s=function(){var t;e.substr(En,3)===q?(t=q,En+=3):(t=r,0===Dn&&Wn(gi));t===r&&(e.substr(En,6)===H?(t=H,En+=6):(t=r,0===Dn&&Wn(di)),t===r&&(e.substr(En,6)===Y?(t=Y,En+=6):(t=r,0===Dn&&Wn(Ti)),t===r&&(e.substr(En,8)===X?(t=X,En+=8):(t=r,0===Dn&&Wn(fi)),t===r&&(e.substr(En,3)===Q?(t=Q,En+=3):(t=r,0===Dn&&Wn(mi)),t===r&&(e.substr(En,5)===Z?(t=Z,En+=5):(t=r,0===Dn&&Wn(hi)),t===r&&(e.substr(En,11)===ee?(t=ee,En+=11):(t=r,0===Dn&&Wn(bi)),t===r&&(e.substr(En,8)===te?(t=te,En+=8):(t=r,0===Dn&&Wn(Bi)))))))));return t}(),s!==r&&(l=Xn())!==r?t=an(o,s):(En=t,t=r)}else En=t,t=r;else En=t,t=r;if(t===r)if(t=En,64===e.charCodeAt(En)?(i=O,En++):(i=r,0===Dn&&Wn(Qt)),i===r&&(i=null),e.substr(En,4)===z?(o=z,En+=4):(o=r,0===Dn&&Wn(yi)),o!==r)if(58===e.charCodeAt(En)?(n=h,En++):(n=r,0===Dn&&Wn(Nt)),n!==r){for(a=[],32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s!==r;)a.push(s),32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s=function(){var t;e.substr(En,11)===ie?(t=ie,En+=11):(t=r,0===Dn&&Wn(vi));t===r&&(e.substr(En,11)===re?(t=re,En+=11):(t=r,0===Dn&&Wn(Ci)),t===r&&(e.substr(En,5)===Z?(t=Z,En+=5):(t=r,0===Dn&&Wn(hi)),t===r&&(e.substr(En,3)===Q?(t=Q,En+=3):(t=r,0===Dn&&Wn(mi)),t===r&&(e.substr(En,8)===oe?(t=oe,En+=8):(t=r,0===Dn&&Wn(xi))))));return t}(),s!==r&&(l=Xn())!==r?t=sn(o,s):(En=t,t=r)}else En=t,t=r;else En=t,t=r}}}return t}function Sa(){var t,i,o,n,a,s,l,p,c,u,y;if(t=En,e.substr(En,5)===ne?(i=ne,En+=5):(i=r,0===Dn&&Wn(Pi)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=ln(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,e.substr(En,7)===ae?(i=ae,En+=7):(i=r,0===Dn&&Wn(ki)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);if(o=e.substring(o,En),n=function(){var e,t;e=[],t=La();for(;t!==r;)e.push(t),t=La();return e}(),(a=Xn())!==r)if(e.substr(En,9)===se?(s=se,En+=9):(s=r,0===Dn&&Wn(Ki)),s!==r){for(l=En,p=[],c=En,u=En,Dn++,y=Xn(),Dn--,y===r?u=void 0:(En=u,u=r),u!==r&&(y=za())!==r?c=u=[u,y]:(En=c,c=r);c!==r;)p.push(c),c=En,u=En,Dn++,y=Xn(),Dn--,y===r?u=void 0:(En=u,u=r),u!==r&&(y=za())!==r?c=u=[u,y]:(En=c,c=r);l=e.substring(l,En),(p=Xn())!==r?t=pn(o,n,l):(En=t,t=r)}else En=t,t=r;else En=t,t=r}else En=t,t=r;if(t===r){if(t=En,e.substr(En,5)===le?(i=le,En+=5):(i=r,0===Dn&&Wn(wi)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);if(o=e.substring(o,En),(n=Xn())!==r)if(9658===e.charCodeAt(En)?(a=pe,En++):(a=r,0===Dn&&Wn(_i)),a!==r){for(s=En,l=[],p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);p!==r;)l.push(p),p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);s=e.substring(s,En),(l=Xn())!==r?t=cn(o,s):(En=t,t=r)}else En=t,t=r;else En=t,t=r}else En=t,t=r;if(t===r){if(t=En,e.substr(En,5)===le?(i=le,En+=5):(i=r,0===Dn&&Wn(wi)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=un(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,9658===e.charCodeAt(En)?(i=pe,En++):(i=r,0===Dn&&Wn(_i)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=yn(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,e.substr(En,7)===ce?(i=ce,En+=7):(i=r,0===Dn&&Wn(Ai)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?(a=ba(),t=gn(o,a)):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,e.substr(En,9)===ue?(i=ue,En+=9):(i=r,0===Dn&&Wn(Si)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=dn(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,e.substr(En,10)===ye?(i=ye,En+=10):(i=r,0===Dn&&Wn(Li)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=Tn(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,e.substr(En,4)===ge?(i=ge,En+=4):(i=r,0===Dn&&Wn(Ii)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=fn(o):(En=t,t=r)}else En=t,t=r;if(t===r&&(t=En,e.substr(En,4)===m?(i=m,En+=4):(i=r,0===Dn&&Wn(It)),i!==r&&(o=Xn())!==r?t=mn():(En=t,t=r),t===r)){if(t=En,e.substr(En,5)===de?(i=de,En+=5):(i=r,0===Dn&&Wn(Fi)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=hn(o):(En=t,t=r)}else En=t,t=r;if(t===r&&(t=En,e.substr(En,5)===Te?(i=Te,En+=5):(i=r,0===Dn&&Wn(Ni)),i!==r&&(o=Xn())!==r?t=bn():(En=t,t=r),t===r)){if(t=En,e.substr(En,6)===fe?(i=fe,En+=6):(i=r,0===Dn&&Wn(Oi)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=Bn(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,e.substr(En,9)===me?(i=me,En+=9):(i=r,0===Dn&&Wn(Ei)),i!==r){if(o=En,n=En,80===e.charCodeAt(En)?(a=he,En++):(a=r,0===Dn&&Wn(Ri)),a!==r){for(s=En,l=[],p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);p!==r;)l.push(p),p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);n=a=[a,s=e.substring(s,En)]}else En=n,n=r;(o=n!==r?e.substring(o,En):n)!==r&&(n=Xn())!==r?t=vn(o):(En=t,t=r)}else En=t,t=r;if(t===r&&(t=En,e.substr(En,6)===be?(i=be,En+=6):(i=r,0===Dn&&Wn(Vi)),i!==r?(o=function(){var t;e.substr(En,4)===De?(t=De,En+=4):(t=r,0===Dn&&Wn(nr));t===r&&(e.substr(En,5)===Ge?(t=Ge,En+=5):(t=r,0===Dn&&Wn(ar)),t===r&&(e.substr(En,4)===Me?(t=Me,En+=4):(t=r,0===Dn&&Wn(sr)),t===r&&(e.substr(En,4)===Ue?(t=Ue,En+=4):(t=r,0===Dn&&Wn(lr)),t===r&&(e.substr(En,7)===Je?(t=Je,En+=7):(t=r,0===Dn&&Wn(pr)),t===r&&(e.substr(En,9)===$e?(t=$e,En+=9):(t=r,0===Dn&&Wn(cr)),t===r&&(e.substr(En,4)===We?(t=We,En+=4):(t=r,0===Dn&&Wn(ur)),t===r&&(e.substr(En,8)===ze?(t=ze,En+=8):(t=r,0===Dn&&Wn(yr)),t===r&&(e.substr(En,5)===qe?(t=qe,En+=5):(t=r,0===Dn&&Wn(gr)),t===r&&(e.substr(En,4)===He?(t=He,En+=4):(t=r,0===Dn&&Wn(dr)),t===r&&(e.substr(En,7)===Ye?(t=Ye,En+=7):(t=r,0===Dn&&Wn(Tr)),t===r&&(e.substr(En,6)===Xe?(t=Xe,En+=6):(t=r,0===Dn&&Wn(fr)),t===r&&(e.substr(En,4)===Qe?(t=Qe,En+=4):(t=r,0===Dn&&Wn(mr)),t===r&&(e.substr(En,5)===Ze?(t=Ze,En+=5):(t=r,0===Dn&&Wn(hr)),t===r&&(e.substr(En,6)===et?(t=et,En+=6):(t=r,0===Dn&&Wn(br)),t===r&&(e.substr(En,6)===tt?(t=tt,En+=6):(t=r,0===Dn&&Wn(Br)),t===r&&(e.substr(En,3)===it?(t=it,En+=3):(t=r,0===Dn&&Wn(vr)),t===r&&(e.substr(En,6)===rt?(t=rt,En+=6):(t=r,0===Dn&&Wn(Cr)),t===r&&(e.substr(En,4)===ot?(t=ot,En+=4):(t=r,0===Dn&&Wn(xr)),t===r&&(e.substr(En,6)===nt?(t=nt,En+=6):(t=r,0===Dn&&Wn(Pr)),t===r&&(e.substr(En,5)===at?(t=at,En+=5):(t=r,0===Dn&&Wn(kr)),t===r&&(e.substr(En,6)===st?(t=st,En+=6):(t=r,0===Dn&&Wn(Kr)))))))))))))))))))))));return t}(),o!==r&&(n=Xn())!==r?t=Cn(o):(En=t,t=r)):(En=t,t=r),t===r&&(t=En,i=function(){var t;e.substr(En,4)===ve?(t=ve,En+=4):(t=r,0===Dn&&Wn(Di));t===r&&(e.substr(En,6)===Ce?(t=Ce,En+=6):(t=r,0===Dn&&Wn(Gi)),t===r&&(e.substr(En,5)===xe?(t=xe,En+=5):(t=r,0===Dn&&Wn(Mi)),t===r&&(e.substr(En,9)===Pe?(t=Pe,En+=9):(t=r,0===Dn&&Wn(Ui)),t===r&&(e.substr(En,6)===ke?(t=ke,En+=6):(t=r,0===Dn&&Wn(Ji)),t===r&&(e.substr(En,9)===Ke?(t=Ke,En+=9):(t=r,0===Dn&&Wn($i)),t===r&&(e.substr(En,11)===we?(t=we,En+=11):(t=r,0===Dn&&Wn(Wi)),t===r&&(e.substr(En,3)===_e?(t=_e,En+=3):(t=r,0===Dn&&Wn(zi)),t===r&&(e.substr(En,3)===Ae?(t=Ae,En+=3):(t=r,0===Dn&&Wn(qi)),t===r&&(e.substr(En,9)===Se?(t=Se,En+=9):(t=r,0===Dn&&Wn(Hi)),t===r&&(e.substr(En,15)===Le?(t=Le,En+=15):(t=r,0===Dn&&Wn(Yi)),t===r&&(e.substr(En,6)===Ie?(t=Ie,En+=6):(t=r,0===Dn&&Wn(Xi)),t===r&&(e.substr(En,10)===Fe?(t=Fe,En+=10):(t=r,0===Dn&&Wn(Qi)),t===r&&(e.substr(En,13)===Ne?(t=Ne,En+=13):(t=r,0===Dn&&Wn(Zi)),t===r&&(e.substr(En,19)===Oe?(t=Oe,En+=19):(t=r,0===Dn&&Wn(er)),t===r&&(e.substr(En,10)===Ee?(t=Ee,En+=10):(t=r,0===Dn&&Wn(tr)),t===r&&(e.substr(En,10)===Re?(t=Re,En+=10):(t=r,0===Dn&&Wn(ir)),t===r&&(e.substr(En,13)===Ve?(t=Ve,En+=13):(t=r,0===Dn&&Wn(rr)),t===r&&(e.substr(En,11)===je?(t=je,En+=11):(t=r,0===Dn&&Wn(or))))))))))))))))))));return t}(),i!==r&&(o=Xn())!==r?t=xn(i):(En=t,t=r),t===r)))if(t=En,35===e.charCodeAt(En)?(i=N,En++):(i=r,0===Dn&&Wn(Xt)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=Pn(o):(En=t,t=r)}else En=t,t=r}}}}}}}}}}}return t}function La(){var t,i,o,n,a,s,l;if(t=En,e.substr(En,2)===Be?(i=Be,En+=2):(i=r,0===Dn&&Wn(ji)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),t=kn(o)}else En=t,t=r;return t}function Ia(){var e,t,i,o;for(Dn++,e=En,(t=Fa())===r&&(t=null),i=[],(o=Ja())===r&&(o=Fa());o!==r;)i.push(o),(o=Ja())===r&&(o=Fa());return e=wn(t,i),Dn--,t=r,0===Dn&&Wn(_r),e}function Fa(){var t,i,o,n,a,s,l;if(t=En,(i=Wa())!==r&&(i=_n()),(t=i)===r){if(t=En,i=En,o=[],n=En,(a=$a())===r&&(a=null),s=En,Dn++,l=Ja(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?n=a=[a,s,l]:(En=n,n=r),n===r&&(n=En,(a=$a())!==r?(s=En,Dn++,l=Ja(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r)),n!==r)for(;n!==r;)o.push(n),n=En,(a=$a())===r&&(a=null),s=En,Dn++,l=Ja(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?n=a=[a,s,l]:(En=n,n=r),n===r&&(n=En,(a=$a())!==r?(s=En,Dn++,l=Ja(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r));else o=r;(i=o!==r?e.substring(i,En):o)!==r&&(i=An(i)),t=i}return t}function Na(){var t;return 42===e.charCodeAt(En)?(t=lt,En++):(t=r,0===Dn&&Wn(Ar)),t}function Oa(){var t;return 95===e.charCodeAt(En)?(t=pt,En++):(t=r,0===Dn&&Wn(Sr)),t}function Ea(){var t;return 96===e.charCodeAt(En)?(t=ct,En++):(t=r,0===Dn&&Wn(Lr)),t}function Ra(){var t;return 33===e.charCodeAt(En)?(t=ut,En++):(t=r,0===Dn&&Wn(Ir)),t}function Va(){var e,t,i;return e=En,(t=Na())!==r&&(i=Na())!==r?e=t=[t,i]:(En=e,e=r),e}function ja(){var e,t,i;return e=En,(t=Oa())!==r&&(i=Oa())!==r?e=t=[t,i]:(En=e,e=r),e}function Da(){var e,t,i;return e=En,(t=Ea())!==r&&(i=Ea())!==r?e=t=[t,i]:(En=e,e=r),e}function Ga(){var e,t,i;return e=En,(t=Ra())!==r&&(i=Ra())!==r?e=t=[t,i]:(En=e,e=r),e}function Ma(){var t;return e.substr(En,2)===yt?(t=yt,En+=2):(t=r,0===Dn&&Wn(Fr)),t}function Ua(){var t;return 93===e.charCodeAt(En)?(t=gt,En++):(t=r,0===Dn&&Wn(Nr)),t}function Ja(){var t,i,o,n,a,s;if(t=En,Ma()!==r){if(i=En,o=[],n=e.charAt(En),vt.test(n)?En++:(n=r,0===Dn&&Wn(Gt)),n!==r)for(;n!==r;)o.push(n),n=e.charAt(En),vt.test(n)?En++:(n=r,0===Dn&&Wn(Gt));else o=r;(i=o!==r?e.substring(i,En):o)!==r&&(o=Ua())!==r?t=Sn(i):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,Va()!==r){for(i=En,o=[],n=En,a=En,Dn++,s=Va(),Dn--,s===r?a=void 0:(En=a,a=r),a!==r?(e.length>En?(s=e.charAt(En),En++):(s=r,0===Dn&&Wn(Kt)),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r);n!==r;)o.push(n),n=En,a=En,Dn++,s=Va(),Dn--,s===r?a=void 0:(En=a,a=r),a!==r?(e.length>En?(s=e.charAt(En),En++):(s=r,0===Dn&&Wn(Kt)),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r);i=e.substring(i,En),(o=Va())!==r?t=Ln(i):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,ja()!==r){for(i=En,o=[],n=En,a=En,Dn++,s=ja(),Dn--,s===r?a=void 0:(En=a,a=r),a!==r?(e.length>En?(s=e.charAt(En),En++):(s=r,0===Dn&&Wn(Kt)),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r);n!==r;)o.push(n),n=En,a=En,Dn++,s=ja(),Dn--,s===r?a=void 0:(En=a,a=r),a!==r?(e.length>En?(s=e.charAt(En),En++):(s=r,0===Dn&&Wn(Kt)),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r);i=e.substring(i,En),(o=ja())!==r?t=In(i):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,Da()!==r){for(i=En,o=[],n=En,a=En,Dn++,s=Da(),Dn--,s===r?a=void 0:(En=a,a=r),a!==r?(e.length>En?(s=e.charAt(En),En++):(s=r,0===Dn&&Wn(Kt)),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r);n!==r;)o.push(n),n=En,a=En,Dn++,s=Da(),Dn--,s===r?a=void 0:(En=a,a=r),a!==r?(e.length>En?(s=e.charAt(En),En++):(s=r,0===Dn&&Wn(Kt)),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r);i=e.substring(i,En),(o=Da())!==r?t=Fn(i):(En=t,t=r)}else En=t,t=r;if(t===r)if(t=En,Ga()!==r){for(i=En,o=[],n=En,a=En,Dn++,s=Ga(),Dn--,s===r?a=void 0:(En=a,a=r),a!==r?(e.length>En?(s=e.charAt(En),En++):(s=r,0===Dn&&Wn(Kt)),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r);n!==r;)o.push(n),n=En,a=En,Dn++,s=Ga(),Dn--,s===r?a=void 0:(En=a,a=r),a!==r?(e.length>En?(s=e.charAt(En),En++):(s=r,0===Dn&&Wn(Kt)),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r);i=e.substring(i,En),(o=Ga())!==r?t=Nn(i):(En=t,t=r)}else En=t,t=r}}}return t}function $a(){var t,i,o,n,a;if(t=En,i=En,(o=Da())!==r){if(n=[],(a=Ea())!==r)for(;a!==r;)n.push(a),a=Ea();else n=r;n!==r?i=o=[o,n]:(En=i,i=r)}else En=i,i=r;if((t=i!==r?e.substring(t,En):i)===r){if(t=En,i=En,(o=Ga())!==r){if(n=[],(a=Ra())!==r)for(;a!==r;)n.push(a),a=Ra();else n=r;n!==r?i=o=[o,n]:(En=i,i=r)}else En=i,i=r;t=i!==r?e.substring(t,En):i}return t}function Wa(){var t;return Dn++,10===e.charCodeAt(En)?(t=dt,En++):(t=r,0===Dn&&Wn(Er)),t===r&&(e.substr(En,2)===Tt?(t=Tt,En+=2):(t=r,0===Dn&&Wn(Rr)),t===r&&(t=e.charAt(En),xt.test(t)?En++:(t=r,0===Dn&&Wn(Vr)))),Dn--,t===r&&(0===Dn&&Wn(Or)),t}function za(){var t;return t=e.charAt(En),Pt.test(t)?En++:(t=r,0===Dn&&Wn(jr)),t}function qa(){var t,i;return(t=Wa())===r&&(t=En,Dn++,e.length>En?(i=e.charAt(En),En++):(i=r,0===Dn&&Wn(Kt)),Dn--,i===r?t=void 0:(En=t,t=r)),t}function Ha(){var t,i,o,n,a,s,l;if(t=En,i=En,o=En,e.substr(En,4)===ft?(n=ft,En+=4):(n=r,0===Dn&&Wn(Dr)),n!==r?(115===e.charCodeAt(En)?(a=mt,En++):(a=r,0===Dn&&Wn(Gr)),a===r&&(a=null),e.substr(En,3)===ht?(s=ht,En+=3):(s=r,0===Dn&&Wn(Mr)),s!==r?o=n=[n,a,s]:(En=o,o=r)):(En=o,o=r),o===r&&(e.substr(En,7)===bt?(o=bt,En+=7):(o=r,0===Dn&&Wn(Ur))),(i=o!==r?e.substring(i,En):o)!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=Ya())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=Ya())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),t=On(i,o)}else En=t,t=r;return t}function Ya(){var t;return t=e.charAt(En),kt.test(t)?En++:(t=r,0===Dn&&Wn(Jr)),t}var Xa=[],Qa="";if(e=e.trimStart(),i=y(),t.peg$library)return{peg$result:i,peg$currPos:En,peg$FAILED:r,peg$maxFailExpected:jn,peg$maxFailPos:Vn};if(i!==r&&En===e.length)return i;throw i!==r&&En<e.length&&Wn({type:"end"}),zn(jn,Vn<e.length?e.charAt(Vn):null,Vn<e.length?$n(Vn,Vn+1):$n(Vn,Vn))}!function(e,t){function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i}(p,Error),p.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var i,r=null;for(i=0;i<e.length;i++)if(e[i].source===this.location.source){r=e[i].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,n=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,a=this.location.source+":"+n.line+":"+n.column;if(r){var s=this.location.end,l=c("",n.line.toString().length," "),p=r[o.line-1],u=(o.line===s.line?s.column:p.length+1)-o.column||1;t+="\n --\x3e "+a+"\n"+l+" |\n"+n.line+" | "+p+"\n"+l+" | "+c("",o.column-1," ")+c("",u,"^")}else t+="\n at "+a}return t},p.buildMessage=function(e,t){var i={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?n(e[0])+"-"+n(e[1]):n(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function r(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}function n(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}function a(e){return i[e.type](e)}return"Expected "+function(e){var t,i,r=e.map(a);if(r.sort(),r.length>0){for(t=1,i=1;t<r.length;t++)r[t-1]!==r[t]&&(r[i]=r[t],i++);r.length=i}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."};t.StartRules=["version","bitmarkPlusPlus","bitmarkPlus","bitmarkMinusMinus","bitmarkPlusString","bitmarkMinusMinusString"]},8453:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BodyTextFormat=void 0;const r=(0,i(4718).superenum)({plainText:"text",latex:"latex",json:"json",xml:"xml",bitmarkPlusPlus:"bitmark++"});t.BodyTextFormat=r},8588:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkParserType=void 0;const r=(0,i(4718).superenum)({peggy:"peggy"});t.BitmarkParserType=r},8848:function(e,t,i){var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.imageSourceChainContentProcessor=function(e,t,i,u,y){t===c.BitContentLevel.Chain?function(e,t,i,r,n){const{value:a}=r,c=o.Breakscape.unbreakscape(p.StringUtils.trimmedString(a),{textFormat:s.TextFormat.bitmarkText,textLocation:l.TextLocation.tag});n.imageSourceUrl=c}(0,0,0,u,y):function(e,t,i,o,s){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("imageSource content",o);const{key:l}=o,p=n.Config.getTagConfigForTag(i,a.PropertyTag.fromValue(l)),u=e.bitContentProcessor(c.BitContentLevel.Chain,i,[o]),y=e.bitContentProcessor(c.BitContentLevel.Chain,null==p?void 0:p.chain,o.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("imageSource TAGS",y);const{imageSourceUrl:g}=u,{mockupId:d}=y,T=r(y,["mockupId"]);g||e.addWarning("[@imageSource] is missing the image url",o);d||e.addWarning("[@mockupId:xxx] is missing from [@imageSource]",o);const f=Object.assign({url:null!=g?g:"",mockupId:null!=d?d:""},T);s.imageSource=f}(e,0,i,u,y)};const o=i(7735),n=i(2028),a=i(166),s=i(385),l=i(6877),p=i(9681),c=i(3029)},8903:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitUtils=void 0;const r=i(6877),o=i(777),n=i(4078),a=new o.TextParser;const s=new class{fillStringExample(e,t,i,o,n){if(t){Array.isArray(t)||(t=[t]);for(const s of t)if(!s.isExample&&(i?(s.example=s.__defaultExample,s.isExample=!0):s.example=o?a.toAst(o,{textFormat:e,textLocation:r.TextLocation.tag}):void 0,n))break}}fillBooleanExample(e,t,i,r){if(e){Array.isArray(e)||(e=[e]);for(const o of e)if(!o.isExample&&(!r||o.isCorrect)&&(t?(o.example=o.__defaultExample,o.isExample=!0):o.example=n.BooleanUtils.toBoolean(i),r))break}}};t.BitUtils=s},9248:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TAGS=void 0;const r=i(7797),o=i(9917),n={[r.TagConfigKey.title]:{tag:o.Tag.tag_title},[r.TagConfigKey.anchor]:{tag:o.Tag.tag_anchor},[r.TagConfigKey.tag_reference]:{tag:o.Tag.tag_reference},[r.TagConfigKey.property]:{tag:o.Tag.tag_property},[r.TagConfigKey.itemLead]:{tag:o.Tag.tag_itemLead},[r.TagConfigKey.instruction]:{tag:o.Tag.tag_instruction},[r.TagConfigKey.hint]:{tag:o.Tag.tag_hint},[r.TagConfigKey.true]:{tag:o.Tag.tag_true},[r.TagConfigKey.false]:{tag:o.Tag.tag_false},[r.TagConfigKey.sampleSolution]:{tag:o.Tag.tag_sampleSolution},[r.TagConfigKey.gap]:{tag:o.Tag.tag_gap},[r.TagConfigKey.tag_mark]:{tag:o.Tag.tag_mark},[r.TagConfigKey.resource]:{tag:o.Tag.tag_resource}};t.TAGS=n},9289:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.itemLeadChainContentProcessor=function(e,t,i,s,l){t===a.BitContentLevel.Chain?(0,n.itemLeadTagContentProcessor)(e,t,i,s,l):function(e,t,i,n,s){var l;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("item lead content",n);const p=r.Config.getTagConfigForTag(i,o.Tag.fromValue(n.type)),c=[n,...null!==(l=n.chain)&&void 0!==l?l:[]],u=e.bitContentProcessor(a.BitContentLevel.Chain,null==p?void 0:p.chain,c);e.DEBUG_CHAIN_TAGS&&e.debugPrint("item lead TAGS",u);s.itemLead=u.itemLead}(e,0,i,s,l)};const r=i(2028),o=i(9917),n=i(8216),a=i(3029)},9371:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardVariantConfig=void 0;t.CardVariantConfig=class{constructor(e,t,i,r){this.tags=e,this.bodyAllowed=t??!0,this.bodyRequired=i,this.repeatCount=r}toString(e){const t=Object.assign({},e);let i="";const r=[];this.bodyAllowed&&r.push("bodyAllowed"),this.bodyRequired&&r.push("bodyRequired"),null!=this.repeatCount&&r.push(`repeatCount=${this.repeatCount}`),i+=`[Flags]\n${r.join(", ")}`,i+="\n\n[Tags]";for(const e of Object.values(this.tags))i+=`\n${e.toString(t)}`;return i}}},9554:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextNodeType=void 0;const r=(0,i(4718).superenum)({text:"text",hardBreak:"hardBreak",paragraph:"paragraph",heading:"heading",section:"section",noBulletList:"noBulletList",bulletList:"bulletList",orderedList:"orderedList",orderedListRoman:"orderedListRoman",orderedListRomanLower:"orderedListRomanLower",letteredList:"letteredList",letteredListLower:"letteredListLower",taskList:"taskList",listItem:"listItem",taskItem:"taskItem",image:"image",imageInline:"imageInline",codeBlock:"codeBlock",latex:"latex",gap:"gap",select:"select",highlight:"highlight",mark:"mark"});t.TextNodeType=r},9561:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Os=void 0;const r=(0,i(4718).superenum)({unknown:"",macos:"macos",windows:"windows",linux:"linux",android:"android",ios:"ios"});t.Os=r},9600:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceTagConfig=void 0;const r=i(5512),o=i(6634);class n extends o.AbstractTagConfig{constructor(e,t,i,o,n,a,s){super(r.BitTagType.resource,e,t,i,o,n,a,void 0,s),this.type=r.BitTagType.resource}toString(e){const t=Object.assign({},e);let i=`RES[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(i+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(i+=`, max=${this.maxCount}`),null!=this.minCount&&(i+=`, min=${this.minCount}`),null!=this.jsonKey&&(i+=`, json=${this.jsonKey}`)),i+="]",this.chain&&t.includeChains){i+="\n|__";let e=!0;for(const r of Object.values(this.chain))e||(i+=" "),i+=`${r.toString(t)}`,e=!1}return i}}t.ResourceTagConfig=n},9647:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.propertyContentProcessor=function(e,t,i,T,w){const{value:_}=T;let{key:A}=T;const S=t===k.BitContentLevel.Chain,L=o.Config.getTagConfigForTag(i,p.PropertyTag.fromValue(A)),I=L?L.configKey:void 0;if(A===p.PropertyTag.internalComment)return void(0,b.commentTagContentProcessor)(e,t,T,w);if(L){if(I===s.PropertyConfigKey.example)return void(0,m.exampleTagContentProcessor)(e,t,T,w);if(I===s.PropertyConfigKey.ratingLevelStart||I===s.PropertyConfigKey.ratingLevelEnd)return void(0,C.ratingLevelChainContentProcessor)(e,t,L.chain,T,w);if(I===s.PropertyConfigKey.technicalTerm)return void(0,P.technicalTermChainContentProcessor)(e,t,L.chain,T,w);if(I===s.PropertyConfigKey.servings)return void(0,x.servingsChainContentProcessor)(e,t,L.chain,T,w);if(I===s.PropertyConfigKey.person||I===s.PropertyConfigKey.partner)return void(0,v.personChainContentProcessor)(e,t,L.chain,T,w);if(I===s.PropertyConfigKey.imageSource)return void(0,h.imageSourceChainContentProcessor)(e,t,i,T,w);if(I===s.PropertyConfigKey.book)return void(0,f.bookChainContentProcessor)(e,t,L.chain,T,w);if(I===s.PropertyConfigKey.markConfig&&!S)return void(0,B.markConfigChainContentProcessor)(e,t,i,T,w);I===s.PropertyConfigKey.property_title&&S&&(A="propertyTitle")}const F=(e,t,i,o)=>{if(i=(e=>{if(null!=e){if(o)switch(o.format){case l.PropertyFormat.plainText:return r.Breakscape.unbreakscape(d.StringUtils.isString(e)?d.StringUtils.trimmedString(e):void 0,{textFormat:c.TextFormat.plainText,textLocation:u.TextLocation.tag});case l.PropertyFormat.number:return g.NumberUtils.asNumber(r.Breakscape.unbreakscape(e,{textFormat:c.TextFormat.plainText,textLocation:u.TextLocation.tag}));case l.PropertyFormat.boolean:return y.BooleanUtils.toBoolean(r.Breakscape.unbreakscape(e,{textFormat:c.TextFormat.plainText,textLocation:u.TextLocation.tag}),!0);case l.PropertyFormat.invertedBoolean:return!y.BooleanUtils.toBoolean(r.Breakscape.unbreakscape(e,{textFormat:c.TextFormat.plainText,textLocation:u.TextLocation.tag}),!0);case l.PropertyFormat.bitmarkText:return e=d.StringUtils.isString(e)?e:"",K.toAst(e,{textFormat:c.TextFormat.bitmarkText,textLocation:u.TextLocation.tag})}return r.Breakscape.unbreakscape(e,{textFormat:c.TextFormat.plainText,textLocation:u.TextLocation.tag})}})(i),(null==o?void 0:o.astKey)&&(t=o.astKey),null==o?void 0:o.single)e[t]=i;else if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t];e[t]=[...r,i]}else e[t]=[i]};F(L?w:w.extraProperties,A,_,L);A===p.PropertyTag.tag_sampleSolution&&F(w,"__sampleSolutionAst",_,new n.PropertyTagConfig(a.ConfigKey.sampleSolution,p.PropertyTag.tag_sampleSolution,1,1,void 0,void 0,void 0,!0,l.PropertyFormat.bitmarkText,void 0,void 0))};const r=i(7735),o=i(2028),n=i(1519),a=i(5591),s=i(9888),l=i(9727),p=i(166),c=i(385),u=i(6877),y=i(4078),g=i(8025),d=i(9681),T=i(777),f=i(3045),m=i(4091),h=i(8848),b=i(6991),B=i(3063),v=i(21),C=i(3967),x=i(4953),P=i(4475),k=i(3029),K=new T.TextParser},9681:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StringUtils=void 0;const i=new class{isString(e){return"string"==typeof e||e instanceof String}string(e){return e?`${e}`:""}trimmedString(e){return this.string(e).trim()}countOccurrences(e,t){return e.split(t).length-1}countOccurrencesAtStart(e,t){let i=0;for(;e.startsWith(t);)i++,e=e.substring(t.length);return i}countOccurrencesAtEnd(e,t){let i=0;for(;e.endsWith(t);)i++,e=e.substring(0,e.length-t.length);return i}splitPlaceholders(e,t){let i=[e];const r=(e,t)=>{const i=[];for(const r of e){const e=r.split(t);for(let r=0,o=e.length;r<o;r++){const n=e[r],a=r===o-1;i.push(n),a||i.push(t)}}return i};for(const e of t)i=r(i,e);return i}firstLine(e,t){const i=e;if(null==t&&(t=e.length),t<1||null==e||e.length<=t)return i;const r=e.split("\n");return r.length>0?r[0].substring(0,t):i}wordWrap(e,t){const i=[];if(t<1||null==e||e.length<=t)return i;const r=e.length,o=r-t;let n,a=0;for(;a<o;){let r;const o=a+t,s=e.indexOf("\n",a);if(s>-1&&s>a&&s<o){r=s-a,n=e.substr(a,r),a=a+r+1,i.push(n);continue}const l=e.lastIndexOf(" ",o);let p=0;l>-1&&l!=a-1?(r=l-a,r>0&&(p=a+r+1)):(r=t,p=a+t),n=e.substr(a,r),a=p,i.push(n.trim())}return a<r&&(n=e.substr(a),i.push(n)),i}};t.StringUtils=i},9727:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyFormat=void 0;const r=(0,i(4718).superenum)({none:"none",plainText:"plainText",bitmarkText:"bitmarkText",number:"number",boolean:"boolean",invertedBoolean:"invertedBoolean"});t.PropertyFormat=r},9788:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MarkupTagConfig=void 0;const r=i(5512),o=i(6634);class n extends o.AbstractTagConfig{constructor(e,t,i,o,n,a){super(r.BitTagType.tag,e,t,i,o,n,void 0,void 0,a),this.type=r.BitTagType.tag}toString(e){const t=Object.assign({},e);let i=`TAG[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(i+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(i+=`, max=${this.maxCount}`),null!=this.minCount&&(i+=`, min=${this.minCount}`)),i+="]",this.chain&&t.includeChains){i+="\n|__";let e=!0;for(const r of Object.values(this.chain))e||(i+=" "),i+=`${r.toString(t)}`,e=!1}return i}}t.MarkupTagConfig=n},9885:function(e,t,i){var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.trueFalseChainContentProcessor=function(e,t,i,p,c,u){t===l.BitContentLevel.Chain?(0,s.trueFalseTagContentProcessor)(e,l.BitContentLevel.Chain,p,c):function(e,t,i,s,p,c){var u;const{bitType:y}=e,g=[s,...null!==(u=s.chain)&&void 0!==u?u:[]],d=p.statements,T=p.choices,f=p.responses;if(!(d&&T&&f&&c))return;if(o.Config.isOfBitType(y,n.BitType.trueFalse1))p.statement=function(e,t,i){const{bitType:a}=e;if(!o.Config.isOfBitType(a,n.BitType.trueFalse1))return;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("trueFalse V1 content (statement)",i);const s=e.bitContentProcessor(l.BitContentLevel.Chain,t,i),{trueFalse:p}=s,c=r(s,["trueFalse"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("trueFalse V1 tags (statement)",c);let u,y;p&&p.length>0&&(y=p[0]);if(y){const{statement:e}=c,t=r(c,["statement"]);u=Object.assign(Object.assign(Object.assign({},y),{statement:y.text}),t)}return u}(e,i,g);else if(o.Config.isOfBitType(y,[n.BitType.trueFalse,n.BitType.multipleChoice,n.BitType.multipleChoice1,n.BitType.multipleResponse,n.BitType.multipleResponse1,n.BitType.feedback])){const t=function(e,t,i){const{bitType:a}=e,s=o.Config.isOfBitType(a,n.BitType.trueFalse),p=o.Config.isOfBitType(a,[n.BitType.multipleChoice,n.BitType.multipleChoice1,n.BitType.feedback]),c=o.Config.isOfBitType(a,[n.BitType.multipleResponse,n.BitType.multipleResponse1]);if(!s&&!p&&!c)return{};const u=[],y=[],g=[],d=e.splitBitContent(i,[l.TypeKey.True,l.TypeKey.False]);e.DEBUG_CHAIN_CONTENT&&e.debugPrint("trueFalse V1 content (choices/responses)",d);for(const i of d){const o=e.bitContentProcessor(l.BitContentLevel.Chain,t,i),{trueFalse:n}=o,a=r(o,["trueFalse"]);let d;if(e.DEBUG_CHAIN_TAGS&&e.debugPrint("trueFalse V1 tags (choices/responses)",a),n&&n.length>0&&(d=n[0]),d)if(s){const{statement:e}=a,t=r(a,["statement"]),i=Object.assign(Object.assign(Object.assign({},d),{statement:d.text}),t);i&&u.push(i)}else if(p){const e=Object.assign(Object.assign(Object.assign({},d),{choice:d.text}),a);e&&y.push(e)}else if(c){const e=Object.assign(Object.assign(Object.assign({},d),{response:d.text}),a);e&&g.push(e)}}const T={};s?T.statements=u:p?T.choices=y:c&&(T.responses=g);return T}(e,i,g);t.statements&&d.push(...t.statements),t.choices&&T.push(...t.choices),t.responses&&f.push(...t.responses)}else if(o.Config.isOfBitType(y,n.BitType.highlightText)){const t=function(e,t,i){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("highlight content",i);const o=e.bitContentProcessor(l.BitContentLevel.Chain,t,i),{trueFalse:n}=o,s=r(o,["trueFalse"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("highlight TAGS",Object.assign({trueFalse:n},s));const p=[];if(n)for(const e of n){const t=Object.assign(Object.assign({},e),{isHighlighted:!1});t&&p.push(t)}const c=Object.assign({type:a.BodyBitType.highlight,texts:p},s);return c}(e,i,g);t&&c.push(t)}else{const t=function(e,t,i){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("select content",i);const o=e.bitContentProcessor(l.BitContentLevel.Chain,t,i),{trueFalse:n}=o,s=r(o,["trueFalse"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("select TAGS",Object.assign({trueFalse:n},s));const p=[];if(n)for(const e of n){const t=e;t&&p.push(t)}const c=Object.assign({type:a.BodyBitType.select,options:p},s);return c}(e,i,g);t&&c.push(t)}}(e,0,i,p,c,u)};const o=i(2028),n=i(5854),a=i(4410),s=i(4020),l=i(3029)},9888:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.propertyConfigKeys=t.PropertyConfigKey=void 0;const r=i(4718),o={action:"action",activityType:"activityType",additionalSolutions:"additionalSolutions",ageRange:"ageRange",aiGenerated:"aiGenerated",analyticsTag:"analyticsTag",allowedBit:"allowedBit",allowSubtitles:"allowSubtitles",alt:"alt",altLangTag:"altLangTag",author:"author",autoplay:"autoplay",availableClassifications:"availableClassifications",blockId:"blockId",book:"book",bookAlias:"bookAlias",bookDiff:"bookDiff",bot:"bot",bubbleTag:"bubbleTag",buttonCaption:"buttonCaption",callToActionUrl:"callToActionUrl",caption:"caption",categoryTag:"categoryTag",chatWithBook:"chatWithBook",chatWithBookBrainKey:"chatWithBookBrainKey",citationStyle:"citationStyle",classification:"classification",codeLineNumbers:"codeLineNumbers",codeMinimap:"codeMinimap",color:"color",colorTag:"colorTag",computerLanguage:"computerLanguage",content2Buy:"content2Buy",copyright:"copyright",coverColor:"coverColor",coverImage:"coverImage",customerExternalId:"customerExternalId",customerId:"customerId",date:"date",dateEnd:"dateEnd",decimalPlaces:"decimalPlaces",deeplink:"deeplink",disableCalculation:"disableCalculation",disableFeedback:"disableFeedback",diffTo:"diffTo",diffOp:"diffOp",diffRef:"diffRef",diffContext:"diffContext",diffTime:"diffTime",duration:"duration",emphasis:"emphasis",example:"example",externalId:"externalId",externalLink:"externalLink",externalLinkText:"externalLinkText",feedbackEngine:"feedbackEngine",feedbackType:"feedbackType",flashcardSet:"flashcardSet",focusX:"focusX",focusY:"focusY",format:"format",handInAcceptFileType:"handInAcceptFileType",handInRequirement:"handInRequirement",handInInstruction:"handInInstruction",hasBookNavigation:"hasBookNavigation",hasMarkAsDone:"hasMarkAsDone",height:"height",icon:"icon",iconTag:"iconTag",id:"id",imageFirst:"imageFirst",imageSource:"imageSource",index:"index",internalComment:"internalComment",isCaseSensitive:"isCaseSensitive",isInfoOnly:"isInfoOnly",isPublic:"isPublic",isTracked:"isTracked",jupyterExecutionCount:"jupyterExecutionCount",jupyterId:"jupyterId",kind:"kind",label:"label",labelFalse:"labelFalse",labelTrue:"labelTrue",lang:"lang",language:"language",layer:"layer",layerRole:"layerRole",levelCEFRp:"levelCEFRp",levelCEFR:"levelCEFR",levelILR:"levelILR",levelACTFL:"levelACTFL",license:"license",list:"list",listItemIndent:"listItemIndent",location:"location",machineTranslated:"machineTranslated",mailingList:"mailingList",markConfig:"markConfig",maxCreatedBits:"maxCreatedBits",maxDisplayLevel:"maxDisplayLevel",maxTocChapterLevel:"maxTocChapterLevel",mockupId:"mockupId",mute:"mute",padletId:"padletId",pageNo:"pageNo",partialAnswer:"partialAnswer",partner:"partner",person:"person",path:"path",pointerLeft:"pointerLeft",pointerTop:"pointerTop",posterImage:"posterImage",page:"page",processHandIn:"processHandIn",product:"product",productFolder:"productFolder",productId:"productId",productList:"productList",productVideo:"productVideo",productVideoList:"productVideoList",progress:"progress",property_mark:"property_mark",property_reference:"property_reference",property_sampleSolution:"property_sampleSolution",property_title:"property_title",publications:"publications",publisher:"publisher",publisherName:"publisherName",quizCountItems:"quizCountItems",quizStrikethroughSolutions:"quizStrikethroughSolutions",quotedPerson:"quotedPerson",ratingLevelEnd:"ratingLevelEnd",ratingLevelSelected:"ratingLevelSelected",ratingLevelStart:"ratingLevelStart",reaction:"reaction",reasonableNumOfChars:"reasonableNumOfChars",reductionTag:"reductionTag",refAuthor:"refAuthor",refBookTitle:"refBookTitle",refPublisher:"refPublisher",refPublicationYear:"refPublicationYear",releaseDate:"releaseDate",releaseKind:"releaseKind",releaseVersion:"releaseVersion",resolved:"resolved",resolvedBy:"resolvedBy",resolvedDate:"resolvedDate",revealSolutions:"revealSolutions",scormSource:"scormSource",search:"search",searchIndex:"searchIndex",servings:"servings",showInIndex:"showInIndex",showSubtitles:"showSubtitles",siteName:"siteName",size:"size",slug:"slug",spaceId:"spaceId",src1x:"src1x",src2x:"src2x",src3x:"src3x",src4x:"src4x",stripePricingTableId:"stripePricingTableId",stripePublishableKey:"stripePublishableKey",subject:"subject",subtype:"subtype",tableAutoWidth:"tableAutoWidth",tableFixedHeader:"tableFixedHeader",tableHeight:"tableHeight",tablePagination:"tablePagination",tablePaginationLimit:"tablePaginationLimit",tableResizableColumns:"tableResizableColumns",tableColumnMinWidth:"tableColumnMinWidth",tableSearch:"tableSearch",tableSort:"tableSort",tableWhitespaceNoWrap:"tableWhitespaceNoWrap",tag:"tag",target:"target",technicalTerm:"technicalTerm",textReference:"textReference",theme:"theme",thumbImage:"thumbImage",toc:"toc",topicTag:"topicTag",trim:"trim",unit:"unit",unitAbbr:"unitAbbr",vendorDashboardId:"vendorDashboardId",vendorSurveyId:"vendorSurveyId",vendorUrl:"vendorUrl",videoCallLink:"videoCallLink",width:"width",x:"x",y:"y",zoomDisabled:"zoomDisabled"};t.propertyConfigKeys=o;const n=(0,r.superenum)(o);t.PropertyConfigKey=n},9916:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTIES=void 0;const r=i(9888),o=i(7203),n=i(9727),a=i(166),s={[r.PropertyConfigKey.id]:{tag:a.PropertyTag.id,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.internalComment]:{tag:a.PropertyTag.internalComment,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.customerId]:{tag:a.PropertyTag.customerId,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.customerExternalId]:{tag:a.PropertyTag.customerExternalId,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.externalId]:{tag:a.PropertyTag.externalId,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.spaceId]:{tag:a.PropertyTag.spaceId,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.padletId]:{tag:a.PropertyTag.padletId,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.jupyterId]:{tag:a.PropertyTag.jupyterId,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.jupyterExecutionCount]:{tag:a.PropertyTag.jupyterExecutionCount,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.aiGenerated]:{tag:a.PropertyTag.aiGenerated,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.machineTranslated]:{tag:a.PropertyTag.machineTranslated,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.searchIndex]:{tag:a.PropertyTag.searchIndex,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.analyticsTag]:{tag:a.PropertyTag.analyticsTag,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.categoryTag]:{tag:a.PropertyTag.categoryTag,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.topicTag]:{tag:a.PropertyTag.topicTag,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.altLangTag]:{tag:a.PropertyTag.altLangTag,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.feedbackEngine]:{tag:a.PropertyTag.feedbackEngine,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.disableFeedback]:{tag:a.PropertyTag.disableFeedback,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.diffTo]:{tag:a.PropertyTag.diffTo,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.diffOp]:{tag:a.PropertyTag.diffOp,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.diffRef]:{tag:a.PropertyTag.diffRef,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.diffContext]:{tag:a.PropertyTag.diffContext,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.diffTime]:{tag:a.PropertyTag.diffTime,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.path]:{tag:a.PropertyTag.path,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.releaseVersion]:{tag:a.PropertyTag.releaseVersion,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.releaseKind]:{tag:a.PropertyTag.releaseKind,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.releaseDate]:{tag:a.PropertyTag.releaseDate,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.resolved]:{tag:a.PropertyTag.resolved,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.resolvedDate]:{tag:a.PropertyTag.resolvedDate,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.resolvedBy]:{tag:a.PropertyTag.resolvedBy,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.handInAcceptFileType]:{tag:a.PropertyTag.handInAcceptFileType,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.handInRequirement]:{tag:a.PropertyTag.handInRequirement,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.handInInstruction]:{tag:a.PropertyTag.handInInstruction,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.ageRange]:{tag:a.PropertyTag.ageRange,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.lang]:{tag:a.PropertyTag.lang,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.language]:{tag:a.PropertyTag.language,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.computerLanguage]:{tag:a.PropertyTag.computerLanguage,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.target]:{tag:a.PropertyTag.target,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.slug]:{tag:a.PropertyTag.slug,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.tag]:{tag:a.PropertyTag.tag,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.reductionTag]:{tag:a.PropertyTag.reductionTag,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.bubbleTag]:{tag:a.PropertyTag.bubbleTag,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.levelCEFRp]:{tag:a.PropertyTag.levelCEFRp,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.levelCEFR]:{tag:a.PropertyTag.levelCEFR,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.levelILR]:{tag:a.PropertyTag.levelILR,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.levelACTFL]:{tag:a.PropertyTag.levelACTFL,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.icon]:{tag:a.PropertyTag.icon,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.iconTag]:{tag:a.PropertyTag.iconTag,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.colorTag]:{tag:a.PropertyTag.colorTag,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.flashcardSet]:{tag:a.PropertyTag.flashcardSet,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.subtype]:{tag:a.PropertyTag.subtype,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.bookAlias]:{tag:a.PropertyTag.bookAlias,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.bookDiff]:{tag:a.PropertyTag.bookDiff,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.refAuthor]:{tag:a.PropertyTag.refAuthor,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.refBookTitle]:{tag:a.PropertyTag.refBookTitle,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.refPublisher]:{tag:a.PropertyTag.refPublisher,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.refPublicationYear]:{tag:a.PropertyTag.refPublicationYear,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.citationStyle]:{tag:a.PropertyTag.citationStyle,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.coverImage]:{tag:a.PropertyTag.coverImage,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.coverColor]:{tag:a.PropertyTag.coverColor,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.publisher]:{tag:a.PropertyTag.publisher,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.publisherName]:{tag:a.PropertyTag.publisherName,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.publications]:{tag:a.PropertyTag.publications,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.author]:{tag:a.PropertyTag.author,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.subject]:{tag:a.PropertyTag.subject,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.date]:{tag:a.PropertyTag.date,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.dateEnd]:{tag:a.PropertyTag.dateEnd,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.location]:{tag:a.PropertyTag.location,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.theme]:{tag:a.PropertyTag.theme,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.kind]:{tag:a.PropertyTag.kind,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.hasMarkAsDone]:{tag:a.PropertyTag.hasMarkAsDone,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.processHandIn]:{tag:a.PropertyTag.processHandIn,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.isPublic]:{tag:a.PropertyTag.isPublic,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.chatWithBook]:{tag:a.PropertyTag.chatWithBook,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.chatWithBookBrainKey]:{tag:a.PropertyTag.chatWithBookBrainKey,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.action]:{tag:a.PropertyTag.action,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.thumbImage]:{tag:a.PropertyTag.thumbImage,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.scormSource]:{tag:a.PropertyTag.scormSource,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.posterImage]:{tag:a.PropertyTag.posterImage,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.focusX]:{tag:a.PropertyTag.focusX,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.focusY]:{tag:a.PropertyTag.focusY,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.deeplink]:{tag:a.PropertyTag.deeplink,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.externalLink]:{tag:a.PropertyTag.externalLink,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.externalLinkText]:{tag:a.PropertyTag.externalLinkText,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.videoCallLink]:{tag:a.PropertyTag.videoCallLink,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.vendorDashboardId]:{tag:a.PropertyTag.vendorDashboardId,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.vendorSurveyId]:{tag:a.PropertyTag.vendorSurveyId,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.vendorUrl]:{tag:a.PropertyTag.vendorUrl,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.search]:{tag:a.PropertyTag.search,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.bot]:{tag:a.PropertyTag.bot,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.duration]:{tag:a.PropertyTag.duration,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.property_reference]:{tag:a.PropertyTag.tag_reference,format:n.PropertyFormat.plainText,astKey:o.PropertyAstKey.ast_referenceProperty},[r.PropertyConfigKey.list]:{tag:a.PropertyTag.list,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.layer]:{tag:a.PropertyTag.layer,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.layerRole]:{tag:a.PropertyTag.layerRole,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.textReference]:{tag:a.PropertyTag.textReference,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.isTracked]:{tag:a.PropertyTag.isTracked,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.isInfoOnly]:{tag:a.PropertyTag.isInfoOnly,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.labelTrue]:{tag:a.PropertyTag.labelTrue,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.labelFalse]:{tag:a.PropertyTag.labelFalse,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.content2Buy]:{tag:a.PropertyTag.content2Buy,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.quotedPerson]:{tag:a.PropertyTag.quotedPerson,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.partialAnswer]:{tag:a.PropertyTag.partialAnswer,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.reasonableNumOfChars]:{tag:a.PropertyTag.reasonableNumOfChars,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.maxCreatedBits]:{tag:a.PropertyTag.maxCreatedBits,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.maxDisplayLevel]:{tag:a.PropertyTag.maxDisplayLevel,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.maxTocChapterLevel]:{tag:a.PropertyTag.maxTocChapterLevel,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.technicalTerm]:{tag:a.PropertyTag.technicalTerm,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.servings]:{tag:a.PropertyTag.servings,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.unit]:{tag:a.PropertyTag.unit,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.unitAbbr]:{tag:a.PropertyTag.unitAbbr,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.decimalPlaces]:{tag:a.PropertyTag.decimalPlaces,single:!0,format:n.PropertyFormat.number,defaultValue:"1"},[r.PropertyConfigKey.disableCalculation]:{tag:a.PropertyTag.disableCalculation,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.example]:{tag:a.PropertyTag.example,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.toc]:{tag:a.PropertyTag.toc,single:!0,format:n.PropertyFormat.boolean,defaultValue:"true"},[r.PropertyConfigKey.page]:{tag:a.PropertyTag.page,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.product]:{tag:a.PropertyTag.product,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.productId]:{tag:a.PropertyTag.productId,single:!1,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.productList]:{tag:a.PropertyTag.product,single:!1,format:n.PropertyFormat.plainText,astKey:o.PropertyAstKey.ast_productList},[r.PropertyConfigKey.productVideo]:{tag:a.PropertyTag.productVideo,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.productVideoList]:{tag:a.PropertyTag.productVideo,single:!1,format:n.PropertyFormat.plainText,astKey:o.PropertyAstKey.ast_productVideoList},[r.PropertyConfigKey.productFolder]:{tag:a.PropertyTag.productFolder,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.progress]:{tag:a.PropertyTag.progress,single:!0,format:n.PropertyFormat.boolean,defaultValue:"true"},[r.PropertyConfigKey.book]:{tag:a.PropertyTag.book,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.person]:{tag:a.PropertyTag.person,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.partner]:{tag:a.PropertyTag.partner,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.property_sampleSolution]:{tag:a.PropertyTag.tag_sampleSolution,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.additionalSolutions]:{tag:a.PropertyTag.additionalSolutions,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.markConfig]:{tag:a.PropertyTag.tag_mark,format:n.PropertyFormat.plainText,astKey:o.PropertyAstKey.ast_markConfig},[r.PropertyConfigKey.property_mark]:{tag:a.PropertyTag.tag_mark,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.color]:{tag:a.PropertyTag.color,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.emphasis]:{tag:a.PropertyTag.emphasis,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.isCaseSensitive]:{tag:a.PropertyTag.isCaseSensitive,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.reaction]:{tag:a.PropertyTag.reaction,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.imageSource]:{tag:a.PropertyTag.imageSource,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.mockupId]:{tag:a.PropertyTag.mockupId,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.size]:{tag:a.PropertyTag.size,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.format]:{tag:a.PropertyTag.format,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.property_title]:{tag:a.PropertyTag.tag_title,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.trim]:{tag:a.PropertyTag.trim,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.width]:{tag:a.PropertyTag.width,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.height]:{tag:a.PropertyTag.height,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.license]:{tag:a.PropertyTag.license,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.copyright]:{tag:a.PropertyTag.copyright,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.mailingList]:{tag:a.PropertyTag.mailingList,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.buttonCaption]:{tag:a.PropertyTag.buttonCaption,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.callToActionUrl]:{tag:a.PropertyTag.callToActionUrl,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.feedbackType]:{tag:a.PropertyTag.feedbackType,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.caption]:{tag:a.PropertyTag.caption,single:!0,format:n.PropertyFormat.bitmarkText},[r.PropertyConfigKey.showInIndex]:{tag:a.PropertyTag.showInIndex,single:!0,format:n.PropertyFormat.boolean,defaultValue:"false"},[r.PropertyConfigKey.alt]:{tag:a.PropertyTag.alt,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.zoomDisabled]:{tag:a.PropertyTag.zoomDisabled,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.src1x]:{tag:a.PropertyTag.src1x,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.src2x]:{tag:a.PropertyTag.src2x,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.src3x]:{tag:a.PropertyTag.src3x,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.src4x]:{tag:a.PropertyTag.src4x,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.mute]:{tag:a.PropertyTag.mute,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.autoplay]:{tag:a.PropertyTag.autoplay,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.allowSubtitles]:{tag:a.PropertyTag.allowSubtitles,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.showSubtitles]:{tag:a.PropertyTag.showSubtitles,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.siteName]:{tag:a.PropertyTag.siteName,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.pointerLeft]:{tag:a.PropertyTag.pointerLeft,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.pointerTop]:{tag:a.PropertyTag.pointerTop,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.listItemIndent]:{tag:a.PropertyTag.listItemIndent,single:!0,defaultValue:"0",format:n.PropertyFormat.number},[r.PropertyConfigKey.hasBookNavigation]:{tag:a.PropertyTag.hasBookNavigation,single:!0,defaultValue:"true",format:n.PropertyFormat.boolean},[r.PropertyConfigKey.blockId]:{tag:a.PropertyTag.blockId,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.pageNo]:{tag:a.PropertyTag.pageNo,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.x]:{tag:a.PropertyTag.x,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.y]:{tag:a.PropertyTag.y,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.index]:{tag:a.PropertyTag.index,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.classification]:{tag:a.PropertyTag.classification,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.availableClassifications]:{tag:a.PropertyTag.availableClassifications,single:!1,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.allowedBit]:{tag:a.PropertyTag.allowedBit,single:!1,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.tableFixedHeader]:{tag:a.PropertyTag.tableFixedHeader,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.tableSearch]:{tag:a.PropertyTag.tableSearch,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.tableSort]:{tag:a.PropertyTag.tableSort,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.tablePagination]:{tag:a.PropertyTag.tablePagination,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.tablePaginationLimit]:{tag:a.PropertyTag.tablePaginationLimit,single:!0,format:n.PropertyFormat.number,defaultValue:"0"},[r.PropertyConfigKey.tableHeight]:{tag:a.PropertyTag.tableHeight,single:!0,format:n.PropertyFormat.number,defaultValue:"0"},[r.PropertyConfigKey.tableWhitespaceNoWrap]:{tag:a.PropertyTag.tableWhitespaceNoWrap,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.tableAutoWidth]:{tag:a.PropertyTag.tableAutoWidth,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.tableResizableColumns]:{tag:a.PropertyTag.tableResizableColumns,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.tableColumnMinWidth]:{tag:a.PropertyTag.tableColumnMinWidth,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.quizCountItems]:{tag:a.PropertyTag.quizCountItems,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.quizStrikethroughSolutions]:{tag:a.PropertyTag.quizStrikethroughSolutions,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.codeLineNumbers]:{tag:a.PropertyTag.codeLineNumbers,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.codeMinimap]:{tag:a.PropertyTag.codeMinimap,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.stripePricingTableId]:{tag:a.PropertyTag.stripePricingTableId,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.stripePublishableKey]:{tag:a.PropertyTag.stripePublishableKey,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.ratingLevelStart]:{tag:a.PropertyTag.ratingLevelStart,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.ratingLevelEnd]:{tag:a.PropertyTag.ratingLevelEnd,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.ratingLevelSelected]:{tag:a.PropertyTag.ratingLevelSelected,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.label]:{tag:a.PropertyTag.label,single:!0,format:n.PropertyFormat.bitmarkText},[r.PropertyConfigKey.imageFirst]:{tag:a.PropertyTag.imageFirst,single:!0,format:n.PropertyFormat.boolean,defaultValue:"true"},[r.PropertyConfigKey.activityType]:{tag:a.PropertyTag.activityType,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.revealSolutions]:{tag:a.PropertyTag.revealSolutions,single:!0,format:n.PropertyFormat.boolean}};t.PROPERTIES=s},9917:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Tag=void 0;const r=(0,i(4718).superenum)({tag_title:"#",tag_anchor:"▼",tag_reference:"►",tag_property:"@",tag_itemLead:"%",tag_instruction:"!",tag_hint:"?",tag_true:"+",tag_false:"-",tag_sampleSolution:"$",tag_gap:"_",tag_mark:"=",tag_resource:"&"});t.Tag=r},9984:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceJsonKey=void 0;const r=(0,i(4718).superenum)({imageResponsive:"imageResponsive",imagePortrait:"imagePortrait",imageLandscape:"imageLandscape",imageEmbed:"imageEmbed",imageLink:"imageLink",audioEmbed:"audioEmbed",audioLink:"audioLink",videoEmbed:"videoEmbed",videoLink:"videoLink",stillImageFilm:"stillImageFilm",stillImageFilmEmbed:"stillImageFilmEmbed",stillImageFilmLink:"stillImageFilmLink",articleEmbed:"articleEmbed",articleLink:"articleLink",documentEmbed:"documentEmbed",documentLink:"documentLink",documentDownload:"documentDownload",appLink:"appLink",websiteLink:"websiteLink"});t.ResourceJsonKey=r}},t={};function i(r){var o=t[r];if(void 0!==o)return o.exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,i),n.exports}i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.StreamWriter=e.FileWriter=e.BitmarkFileGenerator=e.JsonFileGenerator=e.bitmarkTextParse=e.InfoFormat=e.InfoType=e.CardSetVersion=e.BitmarkVersion=e.BitmarkParserType=e.NodeType=e.ResourceTag=e.BodyTextFormat=e.BitType=e.StringWriter=e.BitmarkStringGenerator=e.BitmarkGenerator=e.BitmarkParser=e.JsonStringGenerator=e.JsonGenerator=e.JsonParser=e.Ast=e.ResourceBuilder=e.Builder=e.Output=e.Input=e.BitmarkParserGenerator=void 0;const t=i(1412);var o=i(1791);Object.defineProperty(e,"BitmarkParserGenerator",{enumerable:!0,get:function(){return o.BitmarkParserGenerator}}),Object.defineProperty(e,"Input",{enumerable:!0,get:function(){return o.Input}}),Object.defineProperty(e,"Output",{enumerable:!0,get:function(){return o.Output}});var n=i(5809);Object.defineProperty(e,"Builder",{enumerable:!0,get:function(){return n.Builder}});var a=i(5533);Object.defineProperty(e,"ResourceBuilder",{enumerable:!0,get:function(){return a.ResourceBuilder}});var s=i(5126);Object.defineProperty(e,"Ast",{enumerable:!0,get:function(){return s.Ast}});var l=i(5663);Object.defineProperty(e,"JsonParser",{enumerable:!0,get:function(){return l.JsonParser}});var p=i(2497);Object.defineProperty(e,"JsonGenerator",{enumerable:!0,get:function(){return p.JsonGenerator}});var c=i(98);Object.defineProperty(e,"JsonStringGenerator",{enumerable:!0,get:function(){return c.JsonStringGenerator}});var u=i(5633);Object.defineProperty(e,"BitmarkParser",{enumerable:!0,get:function(){return u.BitmarkParser}});var y=i(5087);Object.defineProperty(e,"BitmarkGenerator",{enumerable:!0,get:function(){return y.BitmarkGenerator}});var g=i(3968);Object.defineProperty(e,"BitmarkStringGenerator",{enumerable:!0,get:function(){return g.BitmarkStringGenerator}});var d=i(6772);Object.defineProperty(e,"StringWriter",{enumerable:!0,get:function(){return d.StringWriter}});var T=i(5854);Object.defineProperty(e,"BitType",{enumerable:!0,get:function(){return T.BitType}});var f=i(8453);Object.defineProperty(e,"BodyTextFormat",{enumerable:!0,get:function(){return f.BodyTextFormat}});var m=i(6149);Object.defineProperty(e,"ResourceTag",{enumerable:!0,get:function(){return m.ResourceTag}});var h=i(126);Object.defineProperty(e,"NodeType",{enumerable:!0,get:function(){return h.NodeType}});var b=i(8588);Object.defineProperty(e,"BitmarkParserType",{enumerable:!0,get:function(){return b.BitmarkParserType}});var B=i(3811);Object.defineProperty(e,"BitmarkVersion",{enumerable:!0,get:function(){return B.BitmarkVersion}});var v=i(1163);Object.defineProperty(e,"CardSetVersion",{enumerable:!0,get:function(){return v.CardSetVersion}});var C=i(486);Object.defineProperty(e,"InfoType",{enumerable:!0,get:function(){return C.InfoType}});var x=i(3069);Object.defineProperty(e,"InfoFormat",{enumerable:!0,get:function(){return x.InfoFormat}});var P=i(2220);Object.defineProperty(e,"bitmarkTextParse",{enumerable:!0,get:function(){return P.parse}});(0,t.init)()})(),r})()));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.bitmarkParserGenerator=t():e.bitmarkParserGenerator=t()}(this,(()=>(()=>{"use strict";var e={4:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AstWalkerGenerator=void 0;const r=i(5126);t.AstWalkerGenerator=class{constructor(){this.ast=new r.Ast,this.debugGenerationInline=!1,this.printed=!1}enter(e,t,i){let r;const o=this,n=`enter_${e.key}`;return this.printed||(this.printed=!0),this.debugGenerationInline&&this.writeInlineDebug(e.key,{open:!0}),"function"==typeof o[n]&&(r=o[n](e,t,i)),r}between(e,t,i,r,o){let n;const a=this,s=`between_${e.key}`;return this.debugGenerationInline&&this.writeInlineDebug(e.key,{single:!0}),"function"==typeof a[s]&&(n=a[s](e,t,i,r,o)),n}exit(e,t,i){const r=this,o=`exit_${e.key}`;this.debugGenerationInline&&this.writeInlineDebug(e.key,{close:!0}),"function"==typeof r[o]&&r[o](e,t,i)}leaf(e,t,i){const r=this,o=`leaf_${e.key}`;this.debugGenerationInline&&this.writeInlineDebug(e.key,{open:!0}),"function"==typeof r[o]&&r[o](e,t,i),this.debugGenerationInline&&this.writeInlineDebug(e.key,{close:!0})}getParentNode(e,t=1){if(e.length>t)return e[e.length-t-1]}}},21:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.personChainContentProcessor=function(e,t,i,p,c){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("person content",p);const u=e.bitContentProcessor(l.BitContentLevel.Chain,i,p.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("person TAGS",u);const{propertyTitle:y,resources:g}=u,d=r.Breakscape.unbreakscape(s.StringUtils.trimmedString(p.value),{textFormat:n.TextFormat.bitmarkText,textLocation:a.TextLocation.tag}),T=s.StringUtils.trimmedString(y),f=function(e,t){let i;const r=[];if(t)for(const e of t.reverse())i||o.ResourceTag.image!==e.type?r.push(e):i=e;r.length>0&&(e.parser.excessResources=r,e.addWarning(`${r.length} excess resource(s) present in the [@person] chain.`));return i}(e,g),m={name:d,title:T,avatarImage:f};c.person=m};const r=i(7735),o=i(6149),n=i(385),a=i(6877),s=i(9681),l=i(3029)},98:function(e,t,i){var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(o,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function s(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonStringGenerator=void 0;const o=i(6772),n=i(2497);t.JsonStringGenerator=class{constructor(e){this.writer=new o.StringWriter,this.generator=new n.JsonGenerator(this.writer,e)}generate(e){return r(this,void 0,void 0,(function*(){return yield this.generator.generate(e),this.writer.getString()}))}generateSync(e){return this.generator.generateSync(e),this.writer.getString()}}},126:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeType=void 0;const r=(0,i(4718).superenum)({unknown:"unknown",action:"action",actionValue:"actionValue",activityType:"activityType",activityTypeValue:"activityTypeValue",additionalSolutions:"additionalSolutions",additionalSolutionsValue:"additionalSolutionsValue",ageRange:"ageRange",ageRangeValue:"ageRangeValue",aiGenerated:"aiGenerated",aiGeneratedValue:"aiGeneratedValue",alias:"alias",alignment:"alignment",allowedBit:"allowedBit",allowedBitValue:"allowedBitValue",alt:"alt",alternativeAnswers:"alternativeAnswers",alternativeAnswersValue:"alternativeAnswersValue",alternativeDefinitions:"alternativeDefinitions",alternativeDefinitionsValue:"alternativeDefinitionsValue",altLangTag:"altLangTag",altLangTagValue:"altLangTagValue",analyticsTag:"analyticsTag",analyticsTagValue:"analyticsTagValue",anchor:"anchor",answer:"answer",appLink:"appLink",attrs:"attrs",audio:"audio",audioEmbed:"audioEmbed",audioLink:"audioLink",author:"author",authorValue:"authorValue",availableClassifications:"availableClassifications",availableClassificationsValue:"availableClassificationsValue",avatarImage:"avatarImage",backgroundWallpaper:"backgroundWallpaper",backgroundWallpaperValue:"backgroundWallpaperValue",bitLevel:"bitLevel",bitmarkAst:"bitmarkAst",bitmarkVersion:"bitmarkVersion",bits:"bits",bitsValue:"bitsValue",bitType:"bitType",blockId:"blockId",blockIdValue:"blockIdValue",body:"body",bodyValue:"bodyValue",bodyBit:"bodyBit",bodyBits:"bodyBits",bodyJson:"bodyJson",bodyParts:"bodyParts",bodyPartsValue:"bodyPartsValue",bodyPartText:"bodyPartText",bodyText:"bodyText",book:"book",bookValue:"bookValue",bookAlias:"bookAlias",bookAliasValue:"bookAliasValue",bookDiff:"bookDiff",bookDiffValue:"bookDiffValue",bot:"bot",botResponses:"botResponses",botResponsesValue:"botResponsesValue",botValue:"botValue",bubbleTag:"bubbleTag",bubbleTagValue:"bubbleTagValue",buttonCaption:"buttonCaption",buttonCaptionValue:"buttonCaptionValue",callToActionUrl:"callToActionUrl",callToActionUrlValue:"callToActionUrlValue",caption:"caption",captionDefinitionList:"captionDefinitionList",captionValue:"captionValue",cardBits:"cardBits",cardBitsValue:"cardBitsValue",cardNode:"cardNode",categoryTag:"categoryTag",categoryTagValue:"categoryTagValue",cells:"cells",cellsValue:"cellsValue",chatWithBook:"chatWithBook",chatWithBookValue:"chatWithBookValue",chatWithBookBrainKey:"chatWithBookBrainKey",chatWithBookBrainKeyValue:"chatWithBookBrainKeyValue",checked:"checked",choice:"choice",choices:"choices",choicesValue:"choicesValue",class:"class",classification:"classification",classificationValue:"classificationValue",codeLineNumbers:"codeLineNumbers",codeLineNumbersValue:"codeLineNumbersValue",codeMinimap:"codeMinimap",codeMinimapValue:"codeMinimapValue",color:"color",colorTag:"colorTag",colorTagValue:"colorTagValue",column:"column",columns:"columns",columnsValue:"columnsValue",comment:"comment",commentedBitType:"commentedBitType",computerLanguage:"computerLanguage",computerLanguageValue:"computerLanguageValue",content:"contentValue",content2Buy:"content2Buy",contentValue:"contentValue",contentValueValue:"contentValueValue",copyright:"copyright",coverColor:"coverColor",coverColorValue:"coverColorValue",coverImage:"coverImage",coverImageValue:"coverImageValue",customerExternalId:"customerExternalId",customerId:"customerId",customerIdValue:"customerIdValue",data:"data",dataValue:"dataValue",dataValueValue:"dataValueValue",date:"date",dateEnd:"dateEnd",dateEndValue:"dateEndValue",dateValue:"dateValue",decimalPlaces:"decimalPlaces",deeplink:"deeplink",deeplinkValue:"deeplinkValue",definition:"definition",definitions:"definitions",definitionsValue:"definitionsValue",disableCalculation:"disableCalculation",disableFeedback:"disableFeedback",disableFeedbackValue:"disableFeedbackValue",diffTo:"diffTo",diffToValue:"diffToValue",diffOp:"diffOp",diffOpValue:"diffOpValue",diffRef:"diffRef",diffRefValue:"diffRefValue",diffContext:"diffContext",diffContextValue:"diffContextValue",diffTime:"diffTime",diffTimeValue:"diffTimeValue",document:"document",documentDownload:"documentDownload",documentEmbed:"documentEmbed",documentLink:"documentLink",duration:"duration",durationValue:"durationValue",elements:"elements",elementsValue:"elementsValue",emphasis:"emphasis",end:"end",errors:"errors",errorsValue:"errorsValue",example:"example",exampleValue:"exampleValue",externalId:"externalId",externalIdValue:"externalIdValue",externalLink:"externalLink",externalLinkText:"externalLinkText",extraProperties:"extraProperties",feedbacks:"feedbacks",feedbacksValue:"feedbacksValue",feedback:"feedback",feedbackEngine:"feedbackEngine",feedbackEngineValue:"feedbackEngineValue",feedbackType:"feedbackType",flashcards:"flashcards",flashcardSet:"flashcardSet",flashcardSetValue:"flashcardSetValue",flashcardsValue:"flashcardsValue",focusX:"focusX",focusXValue:"focusXValue",focusY:"focusY",focusYValue:"focusYValue",footer:"footer",footerText:"footerText",forKeys:"forKeys",format:"format",forValues:"forValues",forValuesValue:"forValuesValue",gap:"gap",handInAcceptFileType:"handInAcceptFileType",handInAcceptFileTypeValue:"handInAcceptFileTypeValue",handInRequirement:"handInRequirement",handInRequirementValue:"handInRequirementValue",handInInstruction:"handInInstruction",handInInstructionValue:"handInInstructionValue",hasBookNavigation:"hasBookNavigation",hasBookNavigationValue:"hasBookNavigationValue",hasMarkAsDone:"hasMarkAsDone",hasMarkAsDoneValue:"hasMarkAsDoneValue",heading:"heading",height:"height",heightValue:"heightValue",highlight:"highlight",hint:"hint",href:"href",icon:"icon",iconTag:"iconTag",iconTagValue:"iconTagValue",iconValue:"iconValue",id:"id",idValue:"idValue",image:"image",imageFirst:"imageFirst",imageFirstValue:"imageFirstValue",imageLandscape:"imageLandscape",imageLink:"imageLink",imagePlaceholder:"imagePlaceholder",imagePlaceholderValue:"imagePlaceholderValue",imagePortrait:"imagePortrait",imageSource:"imageSource",index:"index",indexValue:"indexValue",ingredients:"ingredients",ingredientsValue:"ingredientsValue",instruction:"instruction",internalComment:"internalComment",internalCommentValue:"internalCommentValue",isCaseSensitive:"isCaseSensitive",isCommented:"isCommented",isCorrect:"isCorrect",__isDefaultExample:"__isDefaultExample",isExample:"isExample",isInfoOnly:"isInfoOnly",isInfoOnlyValue:"isInfoOnlyValue",isPlain:"isPlain",isPublic:"isPublic",isPublicValue:"isPublicValue",isTracked:"isTracked",isTrackedValue:"isTrackedValue",item:"item",itemLead:"itemLead",jupyterExecutionCount:"jupyterExecutionCount",jupyterExecutionCountValue:"jupyterExecutionCountValue",jupyterId:"jupyterId",jupyterIdValue:"jupyterIdValue",key:"key",keyAudio:"keyAudio",keyImage:"keyImage",kind:"kind",kindValue:"kindValue",label:"label",labelFalse:"labelFalse",labelFalseValue:"labelFalseValue",labelTrue:"labelTrue",labelTrueValue:"labelTrueValue",lang:"lang",language:"language",languageValue:"languageValue",langValue:"langValue",layer:"layer",layerValue:"layerValue",layerRole:"layerRole",layerRoleValue:"layerRoleValue",lead:"lead",level:"level",levelACTFL:"levelACTFL",levelACTFLValue:"levelACTFLValue",levelCEFR:"levelCEFR",levelCEFRp:"levelCEFRp",levelCEFRpValue:"levelCEFRpValue",levelCEFRValue:"levelCEFRValue",levelILR:"levelILR",levelILRValue:"levelILRValue",license:"license",line:"line",list:"list",listItemIndent:"listItemIndent",listItemIndentValue:"listItemIndentValue",listValue:"listValue",location:"location",locationValue:"locationValue",machineTranslated:"machineTranslated",machineTranslatedValue:"machineTranslatedValue",mailingList:"mailingList",marginNumber:"marginNumber",mark:"mark",markConfig:"markConfig",markConfigValue:"markConfigValue",marks:"marks",marksValue:"marksValue",markup:"markup",matrix:"matrix",matrixValue:"matrixValue",maxCreatedBits:"maxCreatedBits",maxCreatedBitsValue:"maxCreatedBitsValue",maxDisplayLevel:"maxDisplayLevel",maxDisplayLevelValue:"maxDisplayLevelValue",maxTocChapterLevel:"maxTocChapterLevel",maxTocChapterLevelValue:"maxTocChapterLevelValue",message:"message",mockupId:"mockupId",name:"name",offset:"offset",options:"options",optionsValue:"optionsValue",original:"original",padletId:"padletId",padletIdValue:"padletIdValue",page:"page",pageNo:"pageNo",pageNoValue:"pageNoValue",pageNumber:"pageNumber",pageValue:"pageValue",pairs:"pairs",pairsValue:"pairsValue",parent:"parent",parser:"parser",partialAnswer:"partialAnswer",partialAnswerValue:"partialAnswerValue",person:"person",path:"path",pathValue:"pathValue",pointerLeft:"pointerLeft",pointerLeftValue:"pointerLeftValue",pointerTop:"pointerTop",pointerTopValue:"pointerTopValue",posterImage:"posterImage",posterImageValue:"posterImageValue",postfix:"postfix",prefix:"prefix",processHandIn:"processHandIn",processHandInValue:"processHandInValue",product:"product",productFolder:"productFolder",productFolderValue:"productFolderValue",productId:"productId",productIdValue:"productIdValue",productList:"productList",productListValue:"productListValue",productValue:"productValue",productVideo:"productVideo",productVideoList:"productVideoList",productVideoListValue:"productVideoListValue",productVideoValue:"productVideoValue",progress:"progress",progressValue:"progressValue",pronunciationTable:"pronunciationTable",properties:"properties",property:"property",propertyKey:"propertyKey",propertyValue:"propertyValue",propertyValues:"propertyValues",provider:"provider",publications:"publications",publicationsValue:"publicationsValue",publisher:"publisher",publisherName:"publisherName",publisherNameValue:"publisherNameValue",publisherValue:"publisherValue",quantity:"quantity",question:"question",questions:"questions",questionsValue:"questionsValue",quizCountItems:"quizCountItems",quizCountItemsValue:"quizCountItemsValue",quizStrikethroughSolutions:"quizStrikethroughSolutions",quizStrikethroughSolutionsValue:"quizStrikethroughSolutionsValue",quizzes:"quizzes",quizzesValue:"quizzesValue",quotedPerson:"quotedPerson",ratingLevelEnd:"ratingLevelEnd",ratingLevelSelected:"ratingLevelSelected",ratingLevelSelectedValue:"ratingLevelSelectedValue",ratingLevelStart:"ratingLevelStart",reaction:"reaction",reason:"reason",reasonableNumOfChars:"reasonableNumOfChars",reasonableNumOfCharsValue:"reasonableNumOfCharsValue",reductionTag:"reductionTag",reductionTagValue:"reductionTagValue",refAuthor:"refAuthor",refBookTitle:"refBookTitle",reference:"reference",referenceEnd:"referenceEnd",referenceProperty:"referenceProperty",referencePropertyValue:"referencePropertyValue",refPublisher:"refPublisher",refPublicationYear:"refPublicationYear",citationStyle:"citationStyle",citationStyleValue:"citationStyleValue",releaseDate:"releaseDate",releaseDateValue:"releaseDateValue",releaseKind:"releaseKind",releaseKindValue:"releaseKindValue",releaseVersion:"releaseVersion",releaseVersionValue:"releaseVersionValue",resolved:"resolved",resolvedBy:"resolvedBy",resolvedByValue:"resolvedByValue",resolvedDate:"resolvedDate",resolvedDateValue:"resolvedDateValue",resolvedValue:"resolvedValue",resources:"resources",resourcesValue:"resourcesValue",resourceType:"resourceType",response:"response",responses:"responses",responsesValue:"responsesValue",revealSolutions:"revealSolutions",root:"root",sampleSolution:"sampleSolution",sampleSolutionValue:"sampleSolutionValue",scormSource:"scormSource",scormSourceValue:"scormSourceValue",search:"search",searchValue:"searchValue",searchIndex:"searchIndex",searchIndexValue:"searchIndexValue",section:"section",select:"select",servings:"servings",servingsValue:"servingsValue",showInIndex:"showInIndex",showInIndexValue:"showInIndexValue",size:"size",slug:"slug",slugValue:"slugValue",solution:"solution",solutions:"solutions",solutionsValue:"solutionsValue",spaceId:"spaceId",spaceIdValue:"spaceIdValue",src:"src",src1x:"src1x",src2x:"src2x",src3x:"src3x",src4x:"src4x",start:"start",statement:"statement",statements:"statements",statementsValue:"statementsValue",statementText:"statementText",stillImageFilmEmbed:"stillImageFilmEmbed",stillImageFilmLink:"stillImageFilmLink",stripePricingTableId:"stripePricingTableId",stripePricingTableIdValue:"stripePricingTableIdValue",stripePublishableKey:"stripePublishableKey",stripePublishableKeyValue:"stripePublishableKeyValue",subject:"subject",subjectValue:"subjectValue",subtitle:"subtitle",subtype:"subtype",subtypeValue:"subtypeValue",table:"table",tableAutoWidth:"tableAutoWidth",tableAutoWidthValue:"tableAutoWidthValue",tableFixedHeader:"tableFixedHeader",tableFixedHeaderValue:"tableFixedHeaderValue",tableHeight:"tableHeight",tableHeightValue:"tableHeightValue",tablePagination:"tablePagination",tablePaginationLimit:"tablePaginationLimit",tablePaginationLimitValue:"tablePaginationLimitValue",tablePaginationValue:"tablePaginationValue",tableResizableColumns:"tableResizableColumns",tableResizableColumnsValue:"tableResizableColumnsValue",tableColumnMinWidth:"tableColumnMinWidth",tableColumnMinWidthValue:"tableColumnMinWidthValue",tableSearch:"tableSearch",tableSearchValue:"tableSearchValue",tableSort:"tableSort",tableSortValue:"tableSortValue",tableWhitespaceNoWrap:"tableWhitespaceNoWrap",tableWhitespaceNoWrapValue:"tableWhitespaceNoWrapValue",tag:"tag",tagValue:"tagValue",target:"target",targetValue:"targetValue",technicalTerm:"technicalTerm",technicalTermValue:"technicalTermValue",term:"term",text:"text",textAlign:"textAlign",textAst:"textAst",textAstValue:"textAstValue",textFormat:"textFormat",textReference:"textReference",textReferenceValue:"textReferenceValue",texts:"texts",textsValue:"textsValue",theme:"theme",themeValue:"themeValue",thumbImage:"thumbImage",thumbImageValue:"thumbImageValue",thumbnails:"thumbnails",thumbnailsValue:"thumbnailsValue",title:"title",toc:"toc",tocValue:"tocValue",topicTag:"topicTag",topicTagValue:"topicTagValue",trim:"trim",type:"type",__typeAlias:"__typeAlias",unit:"unit",unitAbbr:"unitAbbr",url:"url",value:"value",values:"values",valuesValue:"valuesValue",vendorDashboardId:"vendorDashboardId",vendorDashboardIdValue:"vendorDashboardIdValue",vendorSurveyId:"vendorSurveyId",vendorSurveyIdValue:"vendorSurveyIdValue",vendorUrl:"vendorUrl",vendorUrlValue:"vendorUrlValue",version:"version",video:"video",videoCallLink:"videoCallLink",videoCallLinkValue:"videoCallLinkValue",videoEmbed:"videoEmbed",videoLink:"videoLink",warnings:"warnings",warningsValue:"warningsValue",websiteLink:"websiteLink",width:"width",widthValue:"widthValue",x:"x",xValue:"xValue",y:"y",yValue:"yValue",zoomDisabled:"zoomDisabled"});t.NodeType=r},166:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyTag=void 0;const r=i(4718),o=i(9888),n=(0,r.superenum)(Object.assign(Object.assign({},o.propertyConfigKeys),{tag_mark:"mark",tag_reference:"reference",tag_sampleSolution:"sampleSolution",tag_title:"title"}));t.PropertyTag=n},168:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RESOURCES=void 0;const r=i(5051),o=i(9984),n=i(6149),a={[r.ResourceConfigKey.image]:{tag:n.ResourceTag.image},[r.ResourceConfigKey.imagePortrait]:{tag:n.ResourceTag.imagePortrait,jsonKey:o.ResourceJsonKey.imagePortrait},[r.ResourceConfigKey.imageLandscape]:{tag:n.ResourceTag.imageLandscape,jsonKey:o.ResourceJsonKey.imageLandscape},[r.ResourceConfigKey.imageEmbed]:{tag:n.ResourceTag.imageEmbed,jsonKey:o.ResourceJsonKey.imageEmbed},[r.ResourceConfigKey.imageLink]:{tag:n.ResourceTag.imageLink,jsonKey:o.ResourceJsonKey.imageLink},[r.ResourceConfigKey.audio]:{tag:n.ResourceTag.audio},[r.ResourceConfigKey.audioEmbed]:{tag:n.ResourceTag.audioEmbed,jsonKey:o.ResourceJsonKey.audioEmbed},[r.ResourceConfigKey.audioLink]:{tag:n.ResourceTag.audioLink,jsonKey:o.ResourceJsonKey.audioLink},[r.ResourceConfigKey.video]:{tag:n.ResourceTag.video},[r.ResourceConfigKey.videoEmbed]:{tag:n.ResourceTag.videoEmbed,jsonKey:o.ResourceJsonKey.videoEmbed},[r.ResourceConfigKey.videoLink]:{tag:n.ResourceTag.videoLink,jsonKey:o.ResourceJsonKey.videoLink},[r.ResourceConfigKey.stillImageFilmEmbed]:{tag:n.ResourceTag.stillImageFilmEmbed,jsonKey:o.ResourceJsonKey.stillImageFilmEmbed},[r.ResourceConfigKey.stillImageFilmLink]:{tag:n.ResourceTag.stillImageFilmLink,jsonKey:o.ResourceJsonKey.stillImageFilmLink},[r.ResourceConfigKey.article]:{tag:n.ResourceTag.article},[r.ResourceConfigKey.articleEmbed]:{tag:n.ResourceTag.articleEmbed,jsonKey:o.ResourceJsonKey.articleEmbed},[r.ResourceConfigKey.articleLink]:{tag:n.ResourceTag.articleLink,jsonKey:o.ResourceJsonKey.articleLink},[r.ResourceConfigKey.document]:{tag:n.ResourceTag.document},[r.ResourceConfigKey.documentEmbed]:{tag:n.ResourceTag.documentEmbed,jsonKey:o.ResourceJsonKey.documentEmbed},[r.ResourceConfigKey.documentLink]:{tag:n.ResourceTag.documentLink,jsonKey:o.ResourceJsonKey.documentLink},[r.ResourceConfigKey.documentDownload]:{tag:n.ResourceTag.documentDownload,jsonKey:o.ResourceJsonKey.documentDownload},[r.ResourceConfigKey.appLink]:{tag:n.ResourceTag.appLink,jsonKey:o.ResourceJsonKey.appLink},[r.ResourceConfigKey.websiteLink]:{tag:n.ResourceTag.websiteLink,jsonKey:o.ResourceJsonKey.websiteLink},[r.ResourceConfigKey.icon]:{tag:n.ResourceTag.icon},[r.ResourceConfigKey.backgroundWallpaper]:{tag:n.ResourceTag.backgroundWallpaper},[r.ResourceConfigKey.imagePlaceholder]:{tag:n.ResourceTag.imagePlaceholder}};t.RESOURCES=a},201:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UrlUtils=void 0;const i=new class{fileExtensionFromUrl(e){let t;if(e)try{const i=new URL(e).pathname.split(".");i.length>1&&(t=i[i.length-1])}catch(e){}return t}domainFromUrl(e){let t;if(e)try{t=new URL(e).hostname}catch(e){}return t}};t.UrlUtils=i},363:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExampleType=void 0;const r=(0,i(4718).superenum)({none:"none",string:"string",boolean:"boolean"});t.ExampleType=r},385:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextFormat=void 0;const r=(0,i(4718).superenum)({plainText:"text",latex:"latex",json:"json",xml:"xml",bitmarkText:"bitmark++"});t.TextFormat=r},431:function(e,t,i){var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(o,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function s(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TextGenerator=void 0;const o=i(5126),n=i(7735),a=i(126),s=i(3811),l=i(385),p=i(6877),c=i(2483),u=i(9554),y=i(9681),g=i(4),d={bodyBitCallback:void 0,debugGenerationInline:!1},T="==",f=["*","`","_","!","="],m={[c.TextMarkType.bold]:"**",[c.TextMarkType.light]:"``",[c.TextMarkType.italic]:"__",[c.TextMarkType.highlight]:"!!"},h=[c.TextMarkType.bold,c.TextMarkType.light,c.TextMarkType.italic,c.TextMarkType.highlight],b=[c.TextMarkType.strike,c.TextMarkType.subscript,c.TextMarkType.superscript,c.TextMarkType.ins,c.TextMarkType.del,c.TextMarkType.underline,c.TextMarkType.doubleUnderline,c.TextMarkType.circle,c.TextMarkType.languageEm,c.TextMarkType.userUnderline,c.TextMarkType.userDoubleUnderline,c.TextMarkType.userStrike,c.TextMarkType.userCircle,c.TextMarkType.userHighlight,c.TextMarkType.notranslate,c.TextMarkType.link,c.TextMarkType.ref,c.TextMarkType.xref,c.TextMarkType.extref,c.TextMarkType.footnote,c.TextMarkType.footnoteStar,c.TextMarkType.symbol,c.TextMarkType.var,c.TextMarkType.code,c.TextMarkType.timer,c.TextMarkType.duration,c.TextMarkType.color,c.TextMarkType.comment],B=new RegExp(/(\n|\r\n)/,"g"),v=new RegExp(/https?:\/\/|mailto:(.*)/,"g"),C=new RegExp(/\]/,"g"),x="enter",P="between",k="exit";class K extends g.AstWalkerGenerator{constructor(e,t){var i,r;super(),this.ast=new o.Ast,this.generateOptions={},this.textFormat=l.TextFormat.bitmarkText,this.textLocation=p.TextLocation.body,this.writerText="",this.nodeIndex=0,this.currentIndent=0,this.prevIndent=0,this.indentationStringCache="",this.inParagraph=!1,this.inHeading=!1,this.inCodeBlock=!1,this.exitedCodeBlock=!1,this.inBulletList=!1,this.inInline=!1,this.textDepth=0,this.placeholderIndex=0,this.placeholders={},this.rootParagraphNodeContentIndex=0,this.previousRootParagraphContextType=u.TextNodeType.text,this.inPreText=!1,this.thisNodeIsPreText=!1,this.preTextIndexTemp=-1,this.havePreText=!1,this.preTextIndex=-1,this.bitmarkVersion=null!==(i=s.BitmarkVersion.fromValue(e))&&void 0!==i?i:s.DEFAULT_BITMARK_VERSION,this.options=Object.assign(Object.assign({},d),t),this.debugGenerationInline=null!==(r=this.options.debugGenerationInline)&&void 0!==r&&r,this.bitmarkVersion,s.BitmarkVersion.v2,this.enter=this.enter.bind(this),this.between=this.between.bind(this),this.exit=this.exit.bind(this),this.leaf=this.leaf.bind(this)}generate(e,t,i,o){return r(this,void 0,void 0,(function*(){return this.generateSync(e,t,i,o)}))}generateSync(e,t,i,r){if(this.generateOptions=Object.assign({},r),this.validateGenerateOptions(e),this.generateOptions.plainTextDividerAllowed){const r=this.options.writeCallback,o=this.options.bodyBitCallback;this.options.writeCallback=void 0,this.options.bodyBitCallback=void 0,this.resetState(t,i),this.walkAndWrite(e),this.options.writeCallback=r,this.options.bodyBitCallback=o;const n=this.havePreText,a=this.preTextIndex;this.resetState(t,i),this.havePreText=n,this.preTextIndex=a,this.walkAndWrite(e)}else this.resetState(t,i),this.walkAndWrite(e);return this.writerText}getPlaceholders(){return this.placeholders}resetState(e,t){this.printed=!1,this.textFormat=null!=e?e:l.TextFormat.bitmarkText,this.textLocation=t,this.writerText="",this.nodeIndex=0,this.currentIndent=0,this.prevIndent=0,this.indentationStringCache="",this.inParagraph=!1,this.inHeading=!1,this.inCodeBlock=!1,this.exitedCodeBlock=!1,this.inBulletList=!1,this.inInline=!1,this.textDepth=0,this.placeholderIndex=0,this.placeholders={},this.rootParagraphNodeContentIndex=0,this.previousRootParagraphContextType=u.TextNodeType.hardBreak,this.inPreText=!1,this.thisNodeIsPreText=!1,this.preTextIndexTemp=-1,this.havePreText=!1,this.preTextIndex=-1}walkAndWrite(e){this.ast.walk(e,a.NodeType.textAst,this,void 0)}enter_textAstValue(e,t){return this.handleEnterNode(e.value,t)}between_textAstValue(e,t,i,r){return this.handleBetweenNode(e.value,t,i,r)}exit_textAstValue(e,t){return this.handleExitNode(e.value,t)}enter_contentValue(e,t){return this.handleEnterContentValueNode(e,t)}between_contentValue(e,t,i,r){this.handleBetweenContentValueNode(e,t,i,r)}exit_contentValue(e,t){this.handleExitContentValueNode(e,t)}enter_contentValueValue(e,t){return this.handleEnterNode(e.value,t)}between_contentValueValue(e,t,i,r){this.handleBetweenNode(e.value,t,i,r)}exit_contentValueValue(e,t){return this.handleExitNode(e.value,t)}handleEnterNode(e,t){switch(this.handleEnterNodePreTextCheck(e,t),this.handleIndent(e),e.type){case u.TextNodeType.paragraph:this.inParagraph=!0,this.writeParagraph(e);break;case u.TextNodeType.hardBreak:this.writeHardBreak(e);break;case u.TextNodeType.text:this.writeMarks(e,x),this.writeText(e),this.writeMarks(e,P),0===this.textDepth&&(this.inInline=!0),this.textDepth++;break;case u.TextNodeType.heading:this.writeHeading(e),this.inHeading=!0;break;case u.TextNodeType.section:this.writeSection(e);break;case u.TextNodeType.listItem:case u.TextNodeType.taskItem:this.writeBullet(e,t);break;case u.TextNodeType.image:case u.TextNodeType.imageInline:this.writeImage(e);break;case u.TextNodeType.codeBlock:this.inCodeBlock=!0,this.writeCodeBlock(e);break;case u.TextNodeType.latex:this.writeLatex(e);break;case u.TextNodeType.noBulletList:case u.TextNodeType.bulletList:case u.TextNodeType.orderedList:case u.TextNodeType.orderedListRoman:case u.TextNodeType.orderedListRomanLower:case u.TextNodeType.letteredList:case u.TextNodeType.letteredListLower:case u.TextNodeType.taskList:this.inBulletList=!0;break;case u.TextNodeType.gap:case u.TextNodeType.select:case u.TextNodeType.highlight:case u.TextNodeType.mark:return this.writeBodyBit(e,t),!1}this.exitedCodeBlock=!1}handleBetweenNode(e,t,i,r){e.type}handleExitNode(e,t){switch(e.type){case u.TextNodeType.text:this.textDepth--,0===this.textDepth&&(this.inInline=!1),this.writeMarks(e,k);break;case u.TextNodeType.paragraph:this.writeNL(),this.inParagraph=!1;break;case u.TextNodeType.heading:this.inHeading=!1;case u.TextNodeType.section:case u.TextNodeType.image:this.inParagraph||(this.writeNL(),this.writeNL());break;case u.TextNodeType.codeBlock:this.writeNL(),this.writeNL(),this.inCodeBlock=!1,this.exitedCodeBlock=!0;break;case u.TextNodeType.noBulletList:case u.TextNodeType.bulletList:case u.TextNodeType.orderedList:case u.TextNodeType.orderedListRoman:case u.TextNodeType.orderedListRomanLower:case u.TextNodeType.letteredList:case u.TextNodeType.letteredListLower:case u.TextNodeType.taskList:this.currentIndent<=1&&(this.writeNL(),this.inBulletList=!1)}this.handleDedent(e),this.nodeIndex++}handleIndent(e){switch(e.type){case u.TextNodeType.noBulletList:case u.TextNodeType.bulletList:case u.TextNodeType.orderedList:case u.TextNodeType.orderedListRoman:case u.TextNodeType.orderedListRomanLower:case u.TextNodeType.letteredList:case u.TextNodeType.letteredListLower:case u.TextNodeType.taskList:this.currentIndent++}}handleDedent(e){switch(e.type){case u.TextNodeType.noBulletList:case u.TextNodeType.bulletList:case u.TextNodeType.orderedList:case u.TextNodeType.orderedListRoman:case u.TextNodeType.orderedListRomanLower:case u.TextNodeType.letteredList:case u.TextNodeType.letteredListLower:case u.TextNodeType.taskList:this.currentIndent--}}handleEnterContentValueNode(e,t){3===t.length&&(this.thisNodeIsPreText=!0,this.inPreText=!1,this.previousRootParagraphContextType=u.TextNodeType.hardBreak)}handleBetweenContentValueNode(e,t,i,r){if(3===r.length){const e=t.value;this.updatePreTextState(),this.thisNodeIsPreText=!0,this.previousRootParagraphContextType=e.type,this.rootParagraphNodeContentIndex++}}handleExitContentValueNode(e,t){3===t.length&&(this.updatePreTextState(),this.thisNodeIsPreText=!1,this.generateOptions.plainTextDividerAllowed&&this.inPreText&&(this.havePreText=!0,this.preTextIndex=this.preTextIndexTemp),this.inPreText=!1)}updatePreTextState(){!this.inPreText&&this.thisNodeIsPreText&&this.previousRootParagraphContextType===u.TextNodeType.hardBreak?(this.inPreText=!0,this.preTextIndexTemp=this.rootParagraphNodeContentIndex):this.inPreText&&!this.thisNodeIsPreText&&(this.inPreText=!1,this.preTextIndexTemp=-1)}handleEnterNodePreTextCheck(e,t){if(4===t.length){if(this.inPreText&&e.type===u.TextNodeType.hardBreak)return;if(e.type===u.TextNodeType.text)return}this.thisNodeIsPreText=!1}getLinkHref(e){if(e.type===u.TextNodeType.text&&e.marks){const t=e.marks.reduce(((e,t)=>{var i;if(t.type===c.TextMarkType.link){const e=null===(i=t.attrs)||void 0===i?void 0:i.href;if(e)return e}return e}),"");if(t)return t}return!1}getIndentationString(){if(this.currentIndent===this.prevIndent)return this.indentationStringCache;let e="";for(let t=1;t<this.currentIndent;t++)e+="\t";return this.indentationStringCache=e,this.prevIndent=this.currentIndent,e}writeBodyBit(e,t){const i=`[!${this.placeholderIndex}]`;if(this.placeholders[i]=e,this.options.bodyBitCallback){const i=this.options.bodyBitCallback(e,this.placeholderIndex,t);this.write(i)}else this.write(i);this.placeholderIndex++}writeText(e){if(null==e.text)return;const t=this.inCodeBlock;let i=e.text;const r=this.getLinkText(e);if(r&&(i=r),i=r||this.breakscape(i,{textFormat:this.textFormat,textLocation:this.textLocation}),this.currentIndent>1){const e=this.getIndentationString();i=i.replace(B,`$1${e}`)}if(this.havePreText&&this.rootParagraphNodeContentIndex===this.preTextIndex&&(this.writePlainTextDivider(),this.writeNL()),this.havePreText&&this.rootParagraphNodeContentIndex>=this.preTextIndex){const t=this.breakscape(e.text,{textFormat:l.TextFormat.plainText,textLocation:this.textLocation});this.write(t)}else this.write(i);(this.currentIndent>1||t)&&(this.thisNodeIsPreText=!1),this.inPreText||e.text!==i||(this.thisNodeIsPreText=!1)}isSimpleLink(e){var t;if(null==e.text)return!1;if(1!==(null===(t=e.marks)||void 0===t?void 0:t.length))return!1;const i=this.getLinkHref(e);if(i){return i.replace(v,"$1")===e.text}return!1}getLinkText(e){if(null==e.text)return!1;const t=this.getLinkHref(e);if(t){let i;return i=t.replace(v,"$1")===e.text?t:e.text,i=(null!=i?i:"").replace(C,"^]"),i}return!1}getInterTextBreakscape(e){if(this.bitmarkVersion===s.BitmarkVersion.v2)return"";if(this.textFormat===l.TextFormat.plainText)return"";const t=this.writerText.slice(-1),i=e.slice(0,1);return t===i&&-1!==f.indexOf(t)||this.textLocation===p.TextLocation.body&&"["===t&&-1!=="@#▼►%!?+-$_=&".indexOf(i)?"^":""}validateGenerateOptions(e){this.generateOptions.plainTextDividerAllowed&&(1!==e.length||1===e.length&&e[0].type!==u.TextNodeType.paragraph)&&(this.generateOptions.plainTextDividerAllowed=!1)}writeMarks(e,t){if(e.marks){const i=!(!this.inInline&&!this.inHeading);this.thisNodeIsPreText=!1;if(0===e.marks.length)return void this.writeMarkTextWrapper(T);const r=1===e.marks.length&&i,o=e.marks.reduce(((e,t)=>e||(-1!==h.indexOf(t.type)?r?m[t.type]:T:-1!==b.indexOf(t.type)?T:e)),void 0),n=this.isSimpleLink(e);if(null!=o&&!n){if(t!=x&&t!=P||this.writeMarkTextWrapper(o),t==P)for(const t of e.marks)-1!==h.indexOf(t.type)?r||(this.writeInlineMarkStartEnd(),this.writeInlineMark(t)):c.TextMarkType.comment===t.type?(this.writeInlineMarkStartEnd(),this.writeCommentMark(t)):c.TextMarkType.link===t.type?(this.writeInlineMarkStartEnd(),this.writeLinkMark(t)):c.TextMarkType.ref===t.type?(this.writeInlineMarkStartEnd(),this.writeRefMark(t)):c.TextMarkType.xref===t.type?(this.writeInlineMarkStartEnd(),this.writeXRefMark(t)):c.TextMarkType.extref===t.type?(this.writeInlineMarkStartEnd(),this.writeExtRefMark(t)):c.TextMarkType.footnote===t.type?(this.writeInlineMarkStartEnd(),this.writeFootnoteMark(t)):c.TextMarkType.footnoteStar===t.type?(this.writeInlineMarkStartEnd(),this.writeFootnoteStarMark(t)):c.TextMarkType.symbol===t.type?(this.writeInlineMarkStartEnd(),this.writeSymbolMark(t)):-1!==b.indexOf(t.type)&&(this.writeInlineMarkStartEnd(),this.writeInlineMark(t));if(t==k){let t=!1;for(const i of e.marks)-1!==h.indexOf(i.type)?r||(t=!0):c.TextMarkType.comment!==i.type&&c.TextMarkType.link!==i.type&&c.TextMarkType.ref!==i.type&&c.TextMarkType.xref!==i.type&&c.TextMarkType.footnote!==i.type&&c.TextMarkType.footnoteStar!==i.type&&-1===b.indexOf(i.type)||(t=!0);t&&this.writeInlineMarkStartEnd()}}}}writeParagraph(e){var t,i,r,o,n;if(this.textFormat===l.TextFormat.bitmarkText){if(this.inBulletList)return;const a=null!==(i=null===(t=e.content)||void 0===t?void 0:t.length)&&void 0!==i?i:0;if(0===this.nodeIndex){if(1===a){const t=(null===(r=e.content)||void 0===r?void 0:r[0].type)===u.TextNodeType.text,i=null!==(n=null===(o=e.content)||void 0===o?void 0:o[0].text)&&void 0!==n?n:"";if(!t||""!==i)return}if(a>1)return}this.write("|"),this.writeNL(),this.exitedCodeBlock&&this.writeNL()}}writeHardBreak(e){if(this.writeNL(),this.currentIndent>1){const e=this.getIndentationString();this.write(e)}}writeHeading(e){var t,i;let r="";const o=null!==(i=null===(t=e.attrs)||void 0===t?void 0:t.level)&&void 0!==i?i:1;for(let e=0;e<+o;e++)r+="#";r+=" ",this.write(r)}writeSection(e){let t="";t=e.section?`|${e.section}: `:"|",this.write(t)}writeBullet(e,t){var i,r,o,n;let a=this.getIndentationString();const s=this.getParentNode(t,2),l=null==s?void 0:s.value,p=null==l?void 0:l.type,c=null!==(r=null===(i=null==l?void 0:l.attrs)||void 0===i?void 0:i.start)&&void 0!==r?r:1;if(p===u.TextNodeType.bulletList)a+="• ";else if(p===u.TextNodeType.noBulletList)a+="•_ ";else if(p===u.TextNodeType.orderedList)a+=`•${c} `;else if(p===u.TextNodeType.orderedListRoman)a+=`•${c}I `;else if(p===u.TextNodeType.orderedListRomanLower)a+=`•${c}i `;else if(p===u.TextNodeType.letteredList)a+="•A ";else if(p===u.TextNodeType.letteredListLower)a+="•a ";else if(p===u.TextNodeType.taskList){a+=null!==(n=null===(o=e.attrs)||void 0===o?void 0:o.checked)&&void 0!==n&&n?"•+ ":"•- "}a&&this.write(a)}writeImage(e){var t;if(null==e.attrs||!e.attrs.src)return;const i=e.attrs,r=this.inParagraph,o=this.getMediaAttrs(r?"imageInline":"image",i,{ignoreAttributes:r?new Set(["alt","zoomDisabled","title"]):void 0});let n="";r&&(n=`==${null!==(t=i.alt)&&void 0!==t?t:""}==`),n+=o?`|${o}|`:"",this.write(n)}writeCodeBlock(e){if(null==e.attrs||!e.attrs.language)return;const t=`|code:${e.attrs.language}\n`;this.write(t)}writeLatex(e){if(null==e.attrs||!e.attrs.formula)return;const t=e.attrs,i=`==${this.breakscape(t.formula,{textFormat:this.textFormat,textLocation:this.textLocation})}==|latex|`;this.write(i)}writeMarkTextWrapper(e){e&&this.write(e)}writeInlineMark(e){let t=`${e.type}`;if(e.attrs)for(const[i,r]of Object.entries(e.attrs))("language"===i&&"plain text"!==r||"color"===i||"name"===i||"duration"===i)&&(t=`${t}:${r}`);this.write(t)}writeCommentMark(e){const t=`#${e.comment||""}`;this.write(t)}writeLinkMark(e){var t;const i=(null===(t=e.attrs)||void 0===t?void 0:t.href)||"",r=`link:${(null!=i?i:"").replace(C,"^]")}`;this.write(r)}writeRefMark(e){var t,i;const r=`►${null!==(i=null===(t=e.attrs)||void 0===t?void 0:t.reference)&&void 0!==i?i:""}`;this.write(r)}writeXRefMark(e){var t,i,r,o;const n=null!==(i=null===(t=e.attrs)||void 0===t?void 0:t.xref)&&void 0!==i?i:"",a=null!==(o=null===(r=e.attrs)||void 0===r?void 0:r.reference)&&void 0!==o?o:"";let s=`xref:${n}`;a&&(s+=`|►${a}`),this.write(s)}writeExtRefMark(e){var t,i,r,o,n,a;const s=null!==(i=null===(t=e.attrs)||void 0===t?void 0:t.extref)&&void 0!==i?i:"",l=null!==(o=null===(r=e.attrs)||void 0===r?void 0:r.references)&&void 0!==o?o:[],p=null!==(a=null===(n=e.attrs)||void 0===n?void 0:n.provider)&&void 0!==a?a:"";let c=`extref:${s}`;for(const e of l)c+=`|►${null!=e?e:""}`;c+=`|provider:${p}`,this.write(c)}writeFootnoteMark(e){this.write("footnote:")}writeFootnoteStarMark(e){this.write("footnote*:")}writeSymbolMark(e){if(null==e.attrs)return;const t=e.attrs,i=this.getMediaAttrs("symbol",t),r=null!=i?i:"";this.write(r)}writeInlineMarkStartEnd(){this.write("|")}writePlainTextDivider(){this.write("==== text ====")}writeString(e){null!=e&&this.write(`${e}`)}writeNL(){this.options.debugGenerationInline?this.write("\\n"):this.write("\n")}writeInlineDebug(e,t){let i=e;t.open?i=`<${e}>`:t.close?i=`</${e}>`:t.single&&(i=`<${e} />`),this.writeString(i)}getMediaAttrs(e,t,i){var r,o;if(!e)return;const n=null!==(r=Object.assign({},i).ignoreAttributes)&&void 0!==r?r:new Set;let a=`${e}:${null!==(o=null==t?void 0:t.src)&&void 0!==o?o:""}`;const s=Object.entries(t).filter((([e,t])=>"src"!==e));for(let e=0;e<s.length;e++){const[t,i]=s[e];if(!n.has(t))switch(t){case"textAlign":"left"!==i&&(a+=`|captionAlign:${i}`);break;case"alignment":"center"!==i&&i&&(a+=`|alignment:${i}`);break;case"title":i&&(a+=`|caption:${i}`);break;case"class":"center"!==i&&i&&(a+=`|align:${i}`);break;case"comment":i&&(a+=`|#${i}`);break;case"":y.StringUtils.isString(i)?a+=`|:${i}`:a+="|";break;default:t&&i&&(a+=`|${t}:${i}`)}}return a}breakscape(e,t){return this.generateOptions.noBreakscaping?e:n.Breakscape.breakscape(e,t)}getBitType(e){for(const t of e)if(t.key===a.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.bitType}}write(e){return e=this.getInterTextBreakscape(e)+e,this.options.writeCallback&&this.options.writeCallback(e),this.writerText+=e,this}writeLine(e){return this.write(`${e}\n`),this}writeLines(e,t){for(const i of e)this.write(`${i}${null!=t?t:""}\n`);return this}writeWhiteSpace(){return this.write(" "),this}}t.TextGenerator=K},486:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InfoType=void 0;const r=(0,i(4718).superenum)({list:"list",deprecated:"deprecated",all:"all",bit:"bit"});t.InfoType=r},554:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.clozeTagContentProcessor=function(e,t,i,l,p){const{textFormat:c}=e,{value:u}=l,y=p.solutions,g=p.__solutionsAst;if(!y||!g)return;if(a.StringUtils.isString(u)){const e=a.StringUtils.trimmedString(u);y.push(r.Breakscape.unbreakscape(e,{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag}));const t=s.toAst(e,{textFormat:c,textLocation:n.TextLocation.tag});g.push(t)}};const r=i(7735),o=i(385),n=i(6877),a=i(9681),s=new(i(777).TextParser)},777:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextParser=void 0;const r=i(6877),o=i(9554),n=i(9681),a=i(2220);t.TextParser=class{version(){return(0,a.parse)("",{startRule:"version"})}preprocessAst(e){if(n.StringUtils.isString(e)){const t=e;try{e=JSON.parse(t)}catch(e){return}}if(this.isAst(e))return e}isAst(e){if(Array.isArray(e)){if(0===e.length)return!0;if(Object.prototype.hasOwnProperty.call(e[0],"type"))return!0}return!1}toAst(e,t){var i;if(Array.isArray(e))return e;let o=null!==(i=e)&&void 0!==i?i:"";if(!o)return[];let n="bitmarkPlusPlus";return Object.assign({},t).textLocation===r.TextLocation.tag&&(n="bitmarkPlus"),o=o.trim(),(0,a.parse)(o,{startRule:n})}extractBodyBits(e){if(!Array.isArray(e))return[];const t=[],i=e;for(const e of i)switch(e.type){case o.TextNodeType.gap:case o.TextNodeType.select:case o.TextNodeType.highlight:case o.TextNodeType.mark:t.push(e);break;default:{const i=this.extractBodyBits(e.content);for(const e of i)t.push(e)}}return t}walkBodyBits(e,t){if(!Array.isArray(e))return;const i=e;for(let e=0;e<i.length;e++){const r=i[e];switch(r.type){case o.TextNodeType.gap:case o.TextNodeType.select:case o.TextNodeType.highlight:case o.TextNodeType.mark:t(i,e,r);break;default:this.walkBodyBits(r.content,t)}}}}},955:function(e,t,i){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUtils=void 0;const o=r(i(7678));const n=new class{isFunction(e){return"[object Function]"===Object.prototype.toString.call(e)}isArray(e){return Array.isArray(e)}isDate(e){return"[object Date]"===Object.prototype.toString.call(e)}isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}isValue(e){return!this.isObject(e)&&!this.isArray(e)}getViaPath(e,t){if(!e)return;if(!t)return;Array.isArray(t)||(t=[t]),t=t.flatMap((e=>e.split(".")));let i=e;for(const e of t){if(null==i)return;i=i[e]}return i}setViaPath(e,t,i,r){if(!e)return!1;if(!t)return!1;Array.isArray(t)||(t=[t]),t=t.flatMap((e=>e.split(".")));let o=e;for(let e=0;e<t.length-1;e++){const i=t[e];if(null==o[i]){if(!r)return!1;o[i]={}}o=o[i]}return o[t[t.length-1]]=i,!0}flatMapPath(e,t){if(!e)return[];if(!t)return[];Array.isArray(t)||(t=[t]);const i=e,r=t.shift();if(null==r)return i;const o=i[r];return o?Array.isArray(o)?o.flatMap((e=>this.flatMapPath(e,t.slice()))):[this.flatMapPath(o,t)].flat():[]}orderProperties(e,t){const i=e,r=Object.assign({},i);for(const e of Object.keys(i))delete i[e];for(const e of t)Object.prototype.hasOwnProperty.call(r,e)&&(i[e]=r[e])}removeUndefinedProperties(e,t){const i=e;for(const[e,r]of Object.entries(i))t&&t.indexOf(e)>=0||null==r&&delete i[e]}removeFalseProperties(e,t){const i=e;for(const[e,r]of Object.entries(i))t&&t.indexOf(e)>=0||!1===r&&delete i[e]}removeEmptyStringProperties(e,t){const i=e;for(const[e,r]of Object.entries(i))t&&t.indexOf(e)>=0||""===r&&delete i[e]}removeEmptyArrayProperties(e,t){const i=e;for(const[e,r]of Object.entries(i))t&&t.indexOf(e)>=0||Array.isArray(r)&&0===r.length&&delete i[e]}removeEmptyObjectProperties(e,t){const i=e;for(const[e,r]of Object.entries(i))t&&t.indexOf(e)>=0||this.isObject(r)&&0===Object.keys(r).length&&delete i[e]}removeUnwantedProperties(e,t){(t=Object.assign({},t)).ignoreAllUndefined||this.removeUndefinedProperties(e,t.ignoreUndefined),t.ignoreAllFalse||this.removeFalseProperties(e,t.ignoreFalse),t.ignoreAllEmptyString||this.removeEmptyStringProperties(e,t.ignoreEmptyString),t.ignoreAllEmptyArrays||this.removeEmptyArrayProperties(e,t.ignoreEmptyArrays),t.ignoreAllEmptyObjects||this.removeEmptyObjectProperties(e,t.ignoreEmptyObjects)}extractSingleValue(e,t){if(!e)return;const i=e;if(null==i[t])return;let r=i[t];if(Array.isArray(r)){if(0===r.length)return;r=r[r.length-1]}return r}deepMerge(...e){return function e(...t){function i(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function r(t,r){for(const[n,a]of Object.entries(r)){const r=i(a);void 0!==t[n]&&i(t[n])===r&&["array","object"].includes(r)?t[n]=e(t[n],a):t[n]=(0,o.default)(a)}}let n=(0,o.default)(t.shift());for(const e of t){const t=i(e);i(n)===t?"array"===t?n=[...n,...(0,o.default)(e)]:"object"===t?r(n,e):n=e:n=(0,o.default)(e)}return n}(...e)}};t.ObjectUtils=n},1083:function(e,t,i){var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.buildCards=function(e,t,i,d,T,f,m,h){var b;const{bitConfig:B}=e;e.DEBUG_CARD_SET&&e.debugPrint("card set",d);let v={};const C=function(e,t){var i;const r={cards:[],internalComments:[]};if(!t)return r;const{bitType:o}=e;let a=0,s=0,l=0;for(const p of t.cards){const t={no:a++,sides:[]};r.cards.push(t);for(const a of p.sides){const p={no:s++,variants:[]};t.sides.push(p);for(const c of a.variants){const{parser:a,content:g}=c,d={parser:a,no:l++};p.variants.push(d);const T=n.Config.getTagsConfigForCardSet(o,s,l),f=e.bitContentProcessor(y.BitContentLevel.Card,T,g);e.DEBUG_CARD_TAGS&&e.debugPrint("card tags",f),f.cardBody=u.BitmarkPegParserValidator.checkCardBody(e,y.BitContentLevel.Card,o,f.cardBody,t.no,p.no,d.no),f.cardBodyStr=null===(i=f.cardBody)||void 0===i?void 0:i.bodyString,d.data=f,f.internalComments&&r.internalComments.push(...f.internalComments)}l=0}s=0}return r}(e,d);switch(null===(b=B.cardSet)||void 0===b?void 0:b.configKey){case a.CardSetConfigKey._flashcard:case a.CardSetConfigKey._definitionList:v=function(e,t,i){var o;const a=[],l=[];let p,c,u,y="",d=[],T=0,f={};const m=t===s.BitType.flashcard1,h=g(i);for(let g=0;g<i.cards.length;g++){const b=i.cards[g];if(!h||0!==g){p=void 0,c=void 0,d=[],T=0,f={};for(const e of b.sides)for(const t of e.variants){const e=t.data,{cardBody:i,resources:n}=e,a=r(e,["cardBody","resources"]);f=Object.assign(Object.assign({},f),a);const s=n&&n.length>0?n[0]:void 0,l=null==i?void 0:i.body,g=null!==(o=null==i?void 0:i.bodyString)&&void 0!==o?o:"";0===T?(u=t,y=g,p={text:l,icon:s}):1===T?c={text:l,icon:s}:d.push({text:l,icon:s}),T++}if(0!==g&&m){e.addWarning(`Bit '${t}' should only contain one card. Ignore subsequent card: '${y}'`,u);break}if(n.Config.isOfBitType(t,[s.BitType.flashcard])){const e=Object.assign({question:p,answer:c,alternativeAnswers:d},f);e&&a.push(e)}else{const e=Object.assign({term:p,definition:c,alternativeDefinitions:d},f);e&&l.push(e)}}}return{heading:null==h?void 0:h.heading,flashcards:a.length>0?a:void 0,definitions:l.length>0?l:void 0}}(e,t,C);break;case a.CardSetConfigKey._elements:v=function(e,t,i){var r;const o=[];for(const e of i.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data;o.push(null!==(r=t.cardBodyStr)&&void 0!==r?r:"")}return{elements:o.length>0?o:void 0}}(0,0,C);break;case a.CardSetConfigKey._statements:v=function(e,t,i,o,n){var a;const s=[];for(const e of i.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{statements:i,statement:o}=t,n=r(t,["statements","statement"]);if(Array.isArray(i))for(const e of i){const t=Object.assign({statement:null!==(a=e.statement)&&void 0!==a?a:"",isCorrect:e.isCorrect,item:e.item,lead:e.lead,hint:e.hint,instruction:e.instruction,example:e.example},n);t&&s.push(t)}}o&&s.push(o);Array.isArray(n)&&n.length>0&&s.push(...n);return{statements:s.length>0?s:void 0}}(0,0,C,T,f);break;case a.CardSetConfigKey._feedback:v=function(e,t,i){let o;const n=[],a=g(i);for(let e=0;e<i.cards.length;e++){const t=i.cards[e];if(!a||0!==e){o=void 0;for(let e=0;e<t.sides.length;e++){const i=t.sides[e];for(const t of i.variants){const i=t.data,{cardBody:a,cardBodyStr:s,choices:l}=i,p=r(i,["cardBody","cardBodyStr","choices"]);if(0===e){const e=[];if(l&&l.length>0)for(const t of l){const{__isDefaultExample:i,example:o}=t,n=r(t,["__isDefaultExample","example"]),a={choice:n.choice,requireReason:n.isCorrect,__isDefaultExample:i,example:o};e.push(a)}o=Object.assign(Object.assign({},i),{choices:e}),o&&n.push(o)}else if(1===e){const e=Object.assign({text:null!=s?s:"",__textAst:null==a?void 0:a.body},p);o&&(o.reason=e)}}}}}return{heading:null==a?void 0:a.heading,feedbacks:n.length>0?n:void 0}}(0,0,C);break;case a.CardSetConfigKey._quiz:v=function(e,t,i,o,a){const l=[],p=n.Config.isOfBitType(t,s.BitType.multipleChoice),c=n.Config.isOfBitType(t,s.BitType.multipleResponse);if(!p&&!c)return{};let u,y=!1;for(const e of i.cards){y=!1,u=void 0;for(const t of e.sides)for(const e of t.variants){const t=e.data,{__isDefaultExample:i,example:o}=t,n=r(t,["__isDefaultExample","example"]);if(y=!0===i||y,u=o||u,n.trueFalse&&n.trueFalse.length>0){const e=[];for(const t of n.trueFalse){const{__isDefaultExample:i,example:o}=t,n=r(t,["__isDefaultExample","example"]),a=i||y,s=o||u,l={isCorrect:n.isCorrect,__isDefaultExample:a,example:s};c?l.response=n.text:l.choice=n.text,l&&e.push(l)}c?n.responses=e:n.choices=e}const a=Object.assign(Object.assign({},n),{choices:n.choices,responses:n.responses,__isDefaultExample:y,__defaultExample:u});a&&l.push(a)}}if(p&&Array.isArray(o)&&o.length>0){const e={choices:o};e&&l.push(e)}if(c&&Array.isArray(a)&&a.length>0){const e={responses:a};e&&l.push(e)}return{quizzes:l.length>0?l:void 0}}(0,t,C,m,h);break;case a.CardSetConfigKey._questions:v=function(e,t,i){var r;const o=[];for(const e of i.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,i=Object.assign({question:null!==(r=t.cardBodyStr)&&void 0!==r?r:""},t);i&&o.push(i)}return{questions:o.length>0?o:void 0}}(0,0,C);break;case a.CardSetConfigKey._matchPairs:v=function(e,t,i){var o;const a=[];let l,c,u,y,d=[],T=[],f={},m=!1;const h=n.Config.isOfBitType(t,s.BitType.matchMatrix),b=g(i,h),B=null!==(o=null==b?void 0:b.isDefaultExampleCardSet)&&void 0!==o&&o;let v=null==b?void 0:b.exampleCardSet;for(let e=0;e<i.cards.length;e++){const t=i.cards[e];if(b&&0===e)continue;l=void 0,d=[],T=[],c=void 0,u=void 0,f={},m=!1,y=void 0;for(let e=0;e<t.sides.length;e++){const i=t.sides[e];for(const t of i.variants){const i=t.data,{cardBody:o,cardBodyStr:n,resources:a,__isDefaultExample:s,example:g}=i,h=r(i,["cardBody","cardBodyStr","resources","__isDefaultExample","example"]);if(m=!0===s||m,y=g||y,0===e)if(Array.isArray(a)&&a.length>0){const e=a[0];e.type===p.ResourceTag.audio?c=e:e.type===p.ResourceTag.image&&(u=e)}else l=n;else{const e=null!=n?n:"",t=null==o?void 0:o.body;d.push(e),T.push(t),!B&&!m||y||(y=t),delete h.item,delete h.lead}f=Object.assign(Object.assign({},f),h)}}m&&(v=void 0);const o=m||B,n=y||v,s=Object.assign(Object.assign({key:null!=l?l:"",keyAudio:c,keyImage:u,values:d,__valuesAst:T},f),{__isDefaultExample:o,example:n});s&&a.push(s)}return{heading:null==b?void 0:b.heading,pairs:a.length>0?a:void 0}}(0,t,C);break;case a.CardSetConfigKey._matchMatrix:v=function(e,t,i){var n;let a,s;const l=[];let p,c,u,y,d=[],T=[],f=[],m={},h=!1,b=!1;const B=g(i,!0),v=null!==(n=null==B?void 0:B.isDefaultExampleCardSet)&&void 0!==n&&n;let C=null==B?void 0:B.exampleCardSet;for(let e=0;e<i.cards.length;e++){const t=i.cards[e];if(B&&0===e)continue;a=void 0,s=void 0,d=[],T=[],f=[],h=!1,p=void 0,u=void 0;for(let e=0;e<t.sides.length;e++){const i=t.sides[e];T=[],f=[],m={},b=!1,c=void 0,y=void 0;for(const t of i.variants){const i=t.data,{cardBody:n,cardBodyStr:l,__isDefaultExample:g,example:d,isCaseSensitive:B}=i,C=r(i,["cardBody","cardBodyStr","__isDefaultExample","example","isCaseSensitive"]);if(b=!0===g||b,c=d||c,Object.assign(m,C),0===e)a=l,s=C,h=!0===g||h,p=d||p,u=null!=B?B:u;else{const e=null!=l?l:o.Breakscape.EMPTY_STRING,t=null==n?void 0:n.body;T.push(e),f.push(t),!v&&!b||c||(c=t),y=null!=B?B:u}}if(e>0){b&&(p=C=void 0),h&&(C=void 0);const e=b||h||v,t=c||p||C,i=Object.assign(Object.assign({values:T,__valuesAst:f},m),{__isDefaultExample:e,example:t,isCaseSensitive:y});i&&d.push(i)}}const n=Object.assign({key:null!=a?a:o.Breakscape.EMPTY_STRING,cells:d},s);n&&l.push(n)}return{heading:null==B?void 0:B.heading,matrix:l.length>0?l:void 0}}(0,0,C);break;case a.CardSetConfigKey._pronunciationTable:v=function(e,t,i){var r;const o=[];let n=[];for(const e of i.cards){n=[];for(const t of e.sides)for(const e of t.variants){const t=e.data,{title:i,cardBody:o,resources:a}=t,s=i&&i[1].titleAst,l=a&&a.length>0?a.find((e=>e.type===p.ResourceTag.audio)):void 0,c={title:null!=s?s:[],body:null!==(r=null==o?void 0:o.body)&&void 0!==r?r:[],audio:l};n.push(c)}o.push(n)}return{pronunciationTable:{data:o}}}(0,0,C);break;case a.CardSetConfigKey._table:v=function(e,t,i){var r;let o=!1;const n=[],a=[];let s=[];for(let e=0;e<i.cards.length;e++){const t=i.cards[e];o=!1,s=[];for(const i of t.sides)for(const t of i.variants){const i=t.data,{title:a,cardBody:l}=i,p=a&&a[1].titleAst;if(0===e&&null!=p&&(o=!0),o)n.push(null!=p?p:[]);else{const e=null!==(r=null==l?void 0:l.body)&&void 0!==r?r:[];s.push(e)}}o||a.push(s)}return{table:{columns:n,data:a}}}(0,0,C);break;case a.CardSetConfigKey._botActionResponses:v=function(e,t,i){const n=[];for(const e of i.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{__instructionString:i,reaction:a,cardBodyStr:s}=t,l=r(t,["__instructionString","reaction","cardBodyStr"]),p=Object.assign({response:null!=i?i:o.Breakscape.EMPTY_STRING,reaction:null!=a?a:o.Breakscape.EMPTY_STRING,feedback:null!=s?s:o.Breakscape.EMPTY_STRING},l);p&&n.push(p)}return{botResponses:n.length>0?n:void 0}}(0,0,C);break;case a.CardSetConfigKey._ingredients:v=function(e,t,i){const n=[];for(const e of i.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{title:i,__instructionString:a,unit:s,unitAbbr:p,decimalPlaces:u,disableCalculation:y,cardBodyStr:g,cardBody:d}=t,T=r(t,["title","__instructionString","unit","unitAbbr","decimalPlaces","disableCalculation","cardBodyStr","cardBody"]),f=Array.isArray(i)&&i.length>0?i[i.length-1].titleString:void 0;let m=!1,h=c.NumberUtils.asNumber(a);if(d&&d.bodyBits){const e=d.bodyBits.find((e=>e.type===l.BodyBitType.select));e&&(h=e.__instructionString?c.NumberUtils.asNumber(e.__instructionString):h,e.options&&e.options.length>0&&(m=e.options[0].isCorrect))}const b=Object.assign({title:f,checked:m,ingredient:g,quantity:h,unit:null!=s?s:o.Breakscape.EMPTY_STRING,unitAbbr:null!=p?p:o.Breakscape.EMPTY_STRING,decimalPlaces:null!=u?u:1,disableCalculation:y},T);b&&n.push(b)}return{ingredients:n.length>0?n:void 0}}(0,0,C);break;case a.CardSetConfigKey._clozeList:case a.CardSetConfigKey._exampleBitList:case a.CardSetConfigKey._bookReferenceList:v=function(e,t,i,o){const n=[];for(const e of o.cards)for(const t of e.sides)for(const e of t.variants){const t=e.data,{cardBody:i}=t,o=r(t,["cardBody"]),a=Object.assign({body:i},o);a&&n.push(a)}return{cardBits:n.length>0?n:void 0}}(0,0,0,C)}return v.internalComments=C.internalComments.length>0?C.internalComments:void 0,v};const o=i(7735),n=i(2028),a=i(8199),s=i(5854),l=i(4410),p=i(6149),c=i(8025),u=i(4266),y=i(3029);function g(e,t=!1){let i,r,o=!1;const n=[];let a,s=!1;if(0===e.cards.length)return;const l=e.cards[0];for(let e=0;e<l.sides.length;e++){const t=l.sides[e];if(0===t.variants.length)continue;const i=t.variants[0].data,{title:p,__isDefaultExample:c,example:u}=i,y=p&&p[1].titleString;null!=y&&(o=!0),0===e?o&&(r=y,s=!0===c||s,a=u||a):o&&(n.push(null!=y?y:""),s=!0===c||s,a=u||a)}if(o){let e=n;e=t?n:n.length>=1?n[n.length-1]:"",i={forKeys:null!=r?r:"",forValues:e}}return i?{heading:i,isDefaultExampleCardSet:s,exampleCardSet:a}:void 0}},1163:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardSetVersion=void 0;const r=(0,i(4718).superenum)({v1:1,v2:2});t.CardSetVersion=r},1412:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(){if(n)return;(0,o.initEnv)(r.buildInfo.name,r.buildInfo.version),n=!0};const r=i(1464),o=i(6936);i(2028);let n=!1},1457:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourcesConfig=void 0;t.ResourcesConfig=class{constructor(e,t,i,r){this.tags=e,this.resourceAttachmentAllowed=null!=t&&t,this.resourceTypeAttachment=i,this.comboResourceTagTypesMap=r}getCountsMin(){const e=new Map;for(const t of Object.values(this.tags))null!=t.minCount&&e.set(t.tag,t.minCount);return e}getCountsMax(){const e=new Map;for(const t of Object.values(this.tags))null!=t.maxCount&&e.set(t.tag,t.maxCount);return e}}},1464:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.buildInfo=void 0,t.buildInfo={name:"@gmb/bitmark-parser-generator",version:"3.30.0",author:"Get More Brain Ltd",license:"ISC",description:"A bitmark parser and generator using Peggy.js"}},1519:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyTagConfig=void 0;const r=i(5512),o=i(6634);class n extends o.AbstractTagConfig{constructor(e,t,i,o,n,a,s,l,p,c,u){super(r.BitTagType.property,e,t,i,o,n,a,s,u),this.type=r.BitTagType.property,this.single=l,this.format=p,this.defaultValue=c}toString(e){const t=Object.assign({},e);let i=`PTY[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(i+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(i+=`, max=${this.maxCount}`),null!=this.minCount&&(i+=`, min=${this.minCount}`),null!=this.single&&(i+=`, sgl=${this.single}`),null!=this.format&&(i+=`, fmt=${this.format}`),null!=this.defaultValue&&(i+=`, def=${this.defaultValue}`),null!=this.jsonKey&&(i+=`, json=${this.jsonKey}`),null!=this.astKey&&(i+=`, ast=${this.astKey}`)),i+="]",this.chain&&t.includeChains){i+="\n|__";let e=!0;for(const r of Object.values(this.chain))e||(i+=" "),i+=`${r.toString(t)}`,e=!1}return i}}t.PropertyTagConfig=n},1731:(e,t)=>{t.VOID=-1;t.PRIMITIVE=0;t.ARRAY=1;t.OBJECT=2;t.DATE=3;t.REGEXP=4;t.MAP=5;t.SET=6;t.ERROR=7;t.BIGINT=8},1791:function(e,t,i){var r,o=this&&this.__createBinding||(Object.create?function(e,t,i,r){void 0===r&&(r=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,r,o)}:function(e,t,i,r){void 0===r&&(r=i),e[r]=t[i]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=(this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[t.length]=i);return t},r(e)}),this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(o,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function s(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))});this&&this.__importDefault;Object.defineProperty(t,"__esModule",{value:!0}),t.Output=t.Input=t.BitmarkParserGenerator=void 0;const s=i(4718),l=i(5126),p=i(3968),c=i(7984),u=i(8588),y=i(5633),g=i(5663),d=i(6936),T=i(3881),f=i(486),m=i(3069),h=i(2028),b=i(431),B=i(777),v=(0,s.superenum)({string:"string",file:"file"});t.Input=v;const C=(0,s.superenum)({bitmark:"bitmark",json:"json",ast:"ast"});t.Output=C;t.BitmarkParserGenerator=class{constructor(){this.ast=new l.Ast,this.jsonParser=new g.JsonParser,this.bitmarkParser=new y.BitmarkParser,this.textParser=new B.TextParser,this.textGenerator=new b.TextGenerator,this.jsonStringifyPrettify=(e,t,i)=>{const r=!0===t.prettify?2:t.prettify||void 0;return i||!0===t.stringify||void 0!==r?JSON.stringify(e,null,r):e}}version(){return d.env.appVersion.full}info(e){const t=Object.assign({},e),i=new T.InfoBuilder;let r;const o=!t.outputFormat||t.outputFormat===m.InfoFormat.text,n=t.outputFormat===m.InfoFormat.json,a=t.type===f.InfoType.all,s=t.type===f.InfoType.deprecated,l=a||!s,p=a||s;if(t.type===f.InfoType.bit){const e=i.getSupportedBitConfigs().filter((e=>{if(!t.bit)return!0;return h.Config.getBitType(t.bit)===e.bitType}));r=o?e.map((e=>e.toString({includeChains:!0,includeConfigs:!0}))).join("\n\n--------------\n\n"):e}else{const e=i.getSupportedBits({includeNonDeprecated:l,includeDeprecated:p}).filter((e=>{if(!t.bit)return!0;const i=h.Config.getBitType(t.bit);return e.name===i||void 0}));r=o?this.supportedBitsAsString(e):e}if(n){const e=!0===t.prettify?2:t.prettify||void 0;r=JSON.stringify(r,null,e)}return r}convert(e,t){return a(this,void 0,void 0,(function*(){let i;const r=Object.assign({},t),o=Object.assign({},r.jsonOptions),n=r.outputFormat,s=n===C.bitmark,l=n===C.json,y=n===C.ast,g=u.BitmarkParserType.peggy;let T=e;if(d.env.isBrowser&&r.outputFile)throw new Error("Cannot write to file in browser environment");r.inputFormat&&r.inputFormat!==v.file||d.env.isNode&&fs.existsSync(T)&&(T=fs.readFileSync(T,{encoding:"utf8"}));let f=this.ast.preprocessAst(T);const m=!!f;m||(f=this.jsonParser.toAst(T));const h=!!(null==f?void 0:f.bits),b=e=>a(this,void 0,void 0,(function*(){yield B(e),yield P(i)})),B=e=>a(this,void 0,void 0,(function*(){i=this.bitmarkParser.toAst(e,{parserType:g})})),x=e=>a(this,void 0,void 0,(function*(){if(g===u.BitmarkParserType.peggy)if(f=this.bitmarkParser.toAst(e,{parserType:g}),r.outputFile){const e=new JsonFileGenerator_1.JsonFileGenerator(r.outputFile,r);yield e.generate(f)}else{const e=new c.JsonObjectGenerator(r),t=yield e.generate(f);i=this.jsonStringifyPrettify(t,o)}})),P=e=>a(this,void 0,void 0,(function*(){if(r.outputFile){const t=new BitmarkFileGenerator_1.BitmarkFileGenerator(r.outputFile,r);yield t.generate(e)}else{const t=new p.BitmarkStringGenerator(r);i=yield t.generate(e)}})),k=e=>a(this,void 0,void 0,(function*(){i=this.jsonStringifyPrettify(e,o)})),K=e=>a(this,void 0,void 0,(function*(){if(r.outputFile){const t=new JsonFileGenerator_1.JsonFileGenerator(r.outputFile,r);yield t.generate(e)}else{const t=new c.JsonObjectGenerator(r),n=yield t.generate(e);i=this.jsonStringifyPrettify(n,o)}})),w=e=>a(this,void 0,void 0,(function*(){if(r.outputFile){const t=new BitmarkFileGenerator_1.BitmarkFileGenerator(r.outputFile,r);yield t.generate(e)}else{const t=new p.BitmarkStringGenerator(r);i=yield t.generate(e)}})),_=e=>a(this,void 0,void 0,(function*(){i=this.jsonStringifyPrettify(e,o)})),A=e=>a(this,void 0,void 0,(function*(){yield K(e)}));return!h&&!m?s?yield b(T):y?yield B(T):yield x(T):m?y?yield k(f):l?yield K(f):yield P(f):l?yield A(f):y?yield _(f):yield w(f),i}))}upgrade(e,t){return a(this,void 0,void 0,(function*(){let i;const r=Object.assign({},t),o=Object.assign({},r.jsonOptions),n=r.bitmarkParserType;let s=e;if(d.env.isBrowser&&r.outputFile)throw new Error("Cannot write to file in browser environment");r.inputFormat&&r.inputFormat!==v.file||d.env.isNode&&fs.existsSync(s)&&(s=fs.readFileSync(s,{encoding:"utf8"}));let l=this.jsonParser.toAst(s);const u=e=>a(this,void 0,void 0,(function*(){const t=this.bitmarkParser.toAst(e,{parserType:n});if(r.outputFile){const e=new BitmarkFileGenerator_1.BitmarkFileGenerator(r.outputFile,r);yield e.generate(t)}else{const e=new p.BitmarkStringGenerator(r);i=yield e.generate(t)}})),y=e=>a(this,void 0,void 0,(function*(){if(r.outputFile){const t=new JsonFileGenerator_1.JsonFileGenerator(r.outputFile,r);yield t.generate(e)}else{const t=new c.JsonObjectGenerator(r),n=yield t.generate(e);i=this.jsonStringifyPrettify(n,o)}}));return!!!(null==l?void 0:l.bits)?yield u(s):yield y(l),i}))}createAst(e,t){let i,r=e;const o=Object.assign({},t);o.inputFormat&&o.inputFormat!==v.file||d.env.isNode&&fs.existsSync(r)&&(r=fs.readFileSync(r,{encoding:"utf8"}));let n=this.ast.preprocessAst(r);const a=!!n;a||(n=this.jsonParser.toAst(r));return i=!!!(null==n?void 0:n.bits)&&!a?this.bitmarkParser.toAst(r):n,i}convertText(e,t){return a(this,void 0,void 0,(function*(){var i,r;let o,n;const a=Object.assign({},t),s=Object.assign({},a.fileOptions),l=Object.assign({},a.jsonOptions),p=null!==(i=TextFormat_1.TextFormat.fromValue(a.textFormat))&&void 0!==i?i:TextFormat_1.TextFormat.bitmarkText,c=null!==(r=a.textLocation)&&void 0!==r?r:TextLocation_1.TextLocation.body;let u=e;if(d.env.isBrowser&&a.outputFile)throw new Error("Cannot write to file in browser environment");a.inputFormat&&a.inputFormat!==v.file||d.env.isNode&&fs.existsSync(u)&&(u=fs.readFileSync(u,{encoding:"utf8"}));const y=this.textParser.preprocessAst(u),g=!!y;if(n=g?yield this.textGenerator.generate(y,p,c):this.textParser.toAst(u,{textFormat:p,textLocation:TextLocation_1.TextLocation.body}),a.outputFile){const e=a.outputFile.toString();let t=n;g||(t=this.jsonStringifyPrettify(n,l,!0));const i=s.append?"a":"w";fs.ensureDirSync(path_1.default.dirname(e)),fs.writeFileSync(e,t,{flag:i})}else o=g?n:this.jsonStringifyPrettify(n,l);return o}))}breakscapeText(e,t){var i,r;if(!e)return e;const o=Object.assign({},t),n=Object.assign({},o.fileOptions),a=null!==(i=TextFormat_1.TextFormat.fromValue(o.textFormat))&&void 0!==i?i:TextFormat_1.TextFormat.bitmarkText,s=null!==(r=o.textLocation)&&void 0!==r?r:TextLocation_1.TextLocation.body;let l=e;if(d.env.isBrowser&&o.outputFile)throw new Error("Cannot write to file in browser environment");o.inputFormat&&o.inputFormat!==v.file||d.env.isNode&&fs.existsSync(l)&&(l=fs.readFileSync(l,{encoding:"utf8"}));const p=Breakscape_1.Breakscape.breakscape(l,{textFormat:a,textLocation:s});if(!o.outputFile)return p;{const e=o.outputFile.toString(),t=n.append?"a":"w";fs.ensureDirSync(path_1.default.dirname(e)),fs.writeFileSync(e,p,{flag:t})}}unbreakscapeText(e,t){var i,r;if(!e)return e;const o=Object.assign({},t),n=Object.assign({},o.fileOptions),a=null!==(i=TextFormat_1.TextFormat.fromValue(o.textFormat))&&void 0!==i?i:TextFormat_1.TextFormat.bitmarkText,s=null!==(r=o.textLocation)&&void 0!==r?r:TextLocation_1.TextLocation.body;let l=e;if(d.env.isBrowser&&o.outputFile)throw new Error("Cannot write to file in browser environment");o.inputFormat&&o.inputFormat!==v.file||d.env.isNode&&fs.existsSync(l)&&(l=fs.readFileSync(l,{encoding:"utf8"}));const p=Breakscape_1.Breakscape.unbreakscape(l,{textFormat:a,textLocation:s});if(!o.outputFile)return p;{const e=o.outputFile.toString(),t=n.append?"a":"w";fs.ensureDirSync(path_1.default.dirname(e)),fs.writeFileSync(e,p,{flag:t})}}supportedBitsAsString(e){let t="";for(const i of e)t+=`${i.name} (since: ${i.since}`,i.deprecated&&(t+=`, deprecated: ${i.deprecated}`),t+=")\n";return t}}},2028:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Config=void 0;const r=i(3619),o=i(9600),n=i(1457),a=i(6915),s=i(5512),l=i(5854),p=i(385),c=i(955),u=i(4445),y=i(6853),g=i(5837),d=i(9916);const T=new class{constructor(){this.bitLevelMin=1,this.bitLevelMax=7,this.bitCache=new Map,this.comboResourcesCache=new Map}getBitType(e){var t;return(null==e?void 0:e.startsWith("|"))&&(e=e.substring(1)),null!==(t=l.BitType.fromValue(e))&&void 0!==t?t:l.BitType._error}isOfBitType(e,t){if(!e)return!1;if(e===t)return!0;const i=this.getBitConfig(e);if(!i)return!1;if(Array.isArray(t)){for(const e of t)if(i.inheritedBitTypesSet.has(e))return!0;return!1}return i.inheritedBitTypesSet.has(t)}isBitTypeCommented(e){return!!(null==e?void 0:e.startsWith("|"))}getBitConfig(e){var t;let i=this.bitCache.get(e);if(!i){const o=()=>{throw new Error(`No config found for bit: ${e}`)},n=[],a=[];let s=e;for(;s;){const e=y.BITS[s];e||o(),n.push(s),a.push(e),s=e.baseBitType}a.reverse();const l=a.reduce(((e,t)=>e=c.ObjectUtils.deepMerge(e,t)),{}),{since:g,textFormatDefault:d,quizBit:T,tags:f,cardSet:m,deprecated:h,bodyAllowed:b,bodyRequired:B,footerAllowed:v,footerRequired:C,resourceAttachmentAllowed:x,rootExampleType:P}=l,k=this.getAllResourcesTagsWithZeroCounts(),K=u.ConfigHydrator.hydrateTagsConfig(null!=f?f:[]),w=u.ConfigHydrator.hydrateCardSetConfig(m),_=null===(t=K.info)||void 0===t?void 0:t.comboResourceType,A=Object.assign({},K.tags);for(const[e,t]of Object.entries(k))A[e]||(A[e]=t);i=new r.BitConfig({since:g,bitType:e,inheritedBitTypes:n,textFormatDefault:null!=d?d:p.TextFormat.bitmarkText,tags:A,cardSet:w,quizBit:T,deprecated:h,bodyAllowed:b,bodyRequired:B,footerAllowed:v,footerRequired:C,resourceAttachmentAllowed:x,rootExampleType:P,comboResourceType:_}),this.bitCache.set(e,i)}return i}getRawPropertiesConfig(){return d.PROPERTIES}getTagConfigForTag(e,t){if(e)for(const[,i]of Object.entries(e))if(i.tag===t)return i}getTagsConfigForCardSet(e,t,i){const r=this.getBitConfig(e);if(!r)return;const o=r.cardSet;if(!o)return;t=Math.min(t,o.variants.length-1);const n=o.variants[t];return n[i=Math.min(i,n.length-1)].tags}getBitResourcesConfig(e,t){var i;let r={};const a=new Map,l=this.getBitConfig(e),p={};for(const[e,t]of Object.entries(l.tags))t.type===s.BitTagType.resource&&(p[e]=t);const c=null!==(i=l.comboResourceType)&&void 0!==i?i:l.resourceAttachmentAllowed&&t;if(c){const e=new Map,i=this.getComboResource(c);if(i){const t=Object.values(i).filter((e=>e.type===s.BitTagType.resource));t.map((e=>e.tag)).forEach((i=>{const r=t.find((e=>e.tag===i));r&&e.set(i,r)}));const r=this.getComboResourceTagTypes(c);r&&r.length>0&&a.set(c,r)}if(t)for(const[t,i]of Object.entries(p)){const n=c===i.tag,a=!!e&&e.has(i.tag);if(n){const e=new o.ResourceTagConfig(i.configKey,i.tag,1,1,i.chain,i.jsonKey,i.deprecated);r[t]=e}else if(a){if(e){const o=e.get(i.tag);o&&(r[t]=o)}}else r[t]=i}else r=p}else r=p;return new n.ResourcesConfig(r,l.resourceAttachmentAllowed,t,a)}getComboResourceTagTypes(e){const t=this.getComboResource(e);if(t){return Object.values(t).filter((e=>e.type===s.BitTagType.resource)).map((e=>e.tag))}}getComboResource(e){if(!e)return;let t=this.comboResourcesCache.get(e);return t||(t={},Object.values(g.GROUPS).filter((t=>t.type===a.GroupConfigType.comboResource&&t.comboResourceType===e)).forEach((e=>{t=Object.assign(Object.assign({},t),u.ConfigHydrator.hydrateTagsConfig(e.tags).tags)})),0===Object.keys(t).length&&(t=void 0),this.comboResourcesCache.set(e,t)),t}getAllResourcesTagsWithZeroCounts(){let e=this.allResourcesCache;if(!e){e={},Object.values(g.GROUPS).filter((e=>e.type===a.GroupConfigType.resource)).forEach((t=>{e=Object.assign(Object.assign({},e),u.ConfigHydrator.hydrateTagsConfig(t.tags).tags)}));for(const t of Object.values(e)){const e=t;e.maxCount=0,e.minCount=0}this.allResourcesCache=e}return e}};t.Config=T},2220:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;const r=i(8321).parse;t.parse=r},2287:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_VERSION=void 0;t.EMPTY_VERSION={full:"",major:"",minor:"",patch:"",build:""}},2483:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextMarkType=void 0;const r=(0,i(4718).superenum)({bold:"bold",light:"light",italic:"italic",highlight:"highlight",strike:"strike",subscript:"subscript",superscript:"superscript",ins:"ins",del:"del",underline:"underline",doubleUnderline:"doubleUnderline",circle:"circle",languageEm:"languageEm",userUnderline:"userUnderline",userDoubleUnderline:"userDoubleUnderline",userStrike:"userStrike",userCircle:"userCircle",userHighlight:"userHighlight",notranslate:"notranslate",link:"link",ref:"ref",xref:"xref",extref:"extref",footnote:"footnote",footnoteStar:"footnote*",symbol:"symbol",var:"var",code:"code",timer:"timer",duration:"duration",color:"color",comment:"comment"});t.TextMarkType=r},2497:function(e,t,i){var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(o,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function s(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonGenerator=void 0;const a=n(i(7678)),s=i(5126),l=i(7735),p=i(2028),c=i(126),u=i(5854),y=i(3811),g=i(4410),d=i(363),T=i(6149),f=i(385),m=i(6877),h=i(9554),b=i(777),B=i(4078),v=i(8025),C=i(4),x=i(431),P={};class k extends C.AstWalkerGenerator{constructor(e,t){var i,r;super(),this.ast=new s.Ast,this.textParser=new b.TextParser,this.json=[],this.bitWrapperJson={},this.bitJson={},this.textDefault=l.Breakscape.EMPTY_STRING,this.bodyDefault=l.Breakscape.EMPTY_STRING,this.bodyJson=this.bodyDefault,this.placeholderIndex=0,this.enter=this.enter.bind(this),this.between=this.between.bind(this),this.exit=this.exit.bind(this),this.leaf=this.leaf.bind(this),this.bodyBitCallback=this.bodyBitCallback.bind(this),this.bitmarkVersion=null!==(i=y.BitmarkVersion.fromValue(null==t?void 0:t.bitmarkVersion))&&void 0!==i?i:y.DEFAULT_BITMARK_VERSION,this.textParserVersion=this.textParser.version(),this.options=Object.assign(Object.assign({},P),null==t?void 0:t.jsonOptions),this.debugGenerationInline=null!==(r=this.options.debugGenerationInline)&&void 0!==r&&r,this.jsonPrettifySpace=!0===this.options.prettify?2:this.options.prettify||void 0,this.bitmarkVersion===y.BitmarkVersion.v2?void 0===this.options.textAsPlainText&&(this.options.textAsPlainText=!0):void 0===this.options.textAsPlainText&&(this.options.textAsPlainText=!1),this.textGenerator=new x.TextGenerator(y.BitmarkVersion.v2,{bodyBitCallback:this.bodyBitCallback,debugGenerationInline:this.debugGenerationInline}),this.writer=e,this.generatePropertyHandlers()}generate(e){return r(this,void 0,void 0,(function*(){this.resetState(),yield this.writer.open(),this.walkAndWrite(e),this.write(JSON.stringify(this.json,null,this.jsonPrettifySpace)),yield this.writer.close()}))}generateSync(e){this.resetState(),this.writer.openSync(),this.walkAndWrite(e),this.writer.closeSync()}resetState(){this.json=[],this.bitWrapperJson={},this.bitJson={},this.textDefault=this.options.textAsPlainText?l.Breakscape.EMPTY_STRING:[],this.bodyDefault=this.options.textAsPlainText?l.Breakscape.EMPTY_STRING:[],this.bodyJson=this.bodyDefault,this.listItem=void 0,this.placeholderIndex=0,this.printed=!1}walkAndWrite(e){this.ast.walk(e,c.NodeType.bitmarkAst,this,void 0)}enter_bitmarkAst(e,t){this.json=[]}exit_bitmarkAst(e,t){this.options.textAsPlainText&&this.convertAllBitmarkTextsToStringsForPlainText(this.json),this.removeTemporaryProperties(this.json)}enter_bitsValue(e,t){var i,r;const o=e.value;this.bitWrapperJson={},this.json.push(this.bitWrapperJson),this.bitJson=this.createBitJson(o),this.bitWrapperJson.bit=this.bitJson;const n=p.Config.getBitConfig(o.bitType),a=this.getTextFormat(t),s=!!n.rootExampleType,l=n.rootExampleType===d.ExampleType.boolean;if(s){let e;l?(e=!0,p.Config.isOfBitType(o.bitType,u.BitType.trueFalse1)&&void 0!==(null===(r=null===(i=o.cardNode)||void 0===i?void 0:i.statement)||void 0===r?void 0:r.isCorrect)&&(e=o.cardNode.statement.isCorrect)):e="true";const t=this.toExample(o,{defaultExample:e,isBoolean:l,textFormat:a});this.bitJson.isExample=t.isExample,this.bitJson.example=t.example}else o.isExample&&(this.bitJson.isExample=!0);this.placeholderIndex=0}exit_bitsValue(e,t){const i=this.bitJson.isExample,r=this.bitJson.example;delete this.bitJson.isExample,delete this.bitJson.example,this.bitJson.isExample=i,this.bitJson.example=r,this.cleanBitJson(this.bitJson)}enter_imageSource(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_person(e,t){const i=this.getBitType(t);let r="person";return p.Config.isOfBitType(i,u.BitType.conversationLeft1)&&(r="partner"),this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1,keyOverride:r})}enter_ratingLevelStart(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_ratingLevelEnd(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_productId(e,t){const i=e.value,r=this.getParentNode(t);if((null==r?void 0:r.key)!==c.NodeType.bitsValue)return!0;return this.getBitType(t)===u.BitType.module?this.addProperty(this.bitJson,"productId",i,{array:!0}):i.length>0&&this.addProperty(this.bitJson,"productId",i[i.length-1],{array:!1}),!1}enter_markConfig(e,t){return!0}enter_markConfigValue(e,t){const i=e.value,r=this.getParentNode(t);return(null==r?void 0:r.key)!==c.NodeType.markConfig||(this.bitJson.marks||(this.bitJson.marks=[]),this.bitJson.marks.push(i),!1)}enter_item(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_lead(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_pageNumber(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_marginNumber(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_hint(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_instruction(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_title(e,t){return this.standardHandler(e,t,[c.NodeType.bitsValue,c.NodeType.cardNode],{array:!0})}enter_subtitle(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_caption(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}enter_width(e,t){var i;let r=e.value;const o=this.getBitType(t),n=this.getParentNode(t);return(null==n?void 0:n.key)===c.NodeType.bitsValue&&p.Config.isOfBitType(o,u.BitType.extractorBlock)&&(r=null!==(i=v.NumberUtils.asNumber(r,0))&&void 0!==i?i:0),this.standardHandler(e,t,void 0,{array:!1,valueOverride:r})}enter_height(e,t){var i;let r=e.value;const o=this.getBitType(t),n=this.getParentNode(t);return(null==n?void 0:n.key)===c.NodeType.bitsValue&&p.Config.isOfBitType(o,u.BitType.extractorBlock)&&(r=null!==(i=v.NumberUtils.asNumber(r,0))&&void 0!==i?i:0),this.standardHandler(e,t,void 0,{array:!1,valueOverride:r})}enter_extraProperties(e,t){const i=e.value;if(!this.options.excludeUnknownProperties&&i)for(const[e,t]of Object.entries(i)){let i=e;Object.prototype.hasOwnProperty.call(this.bitJson,e)&&(i=`_${e}`),this.addProperty(this.bitJson,i,t,{array:!0})}}enter_cardBitsValue(e,t){var i,r,o,n,a,s,l,p,c;const y=e.value,g=this.getBitType(t);if(!g)return;let d;if(g===u.BitType.bookReferenceList){this.bitJson.bookReferences||(this.bitJson.bookReferences=[]);const e={};this.addProperty(e,"lang",y.lang,{array:!1}),this.addProperty(e,"refAuthor",null!==(i=y.refAuthor)&&void 0!==i?i:[],{array:!0}),this.addProperty(e,"refBookTitle",null!==(r=y.refBookTitle)&&void 0!==r?r:[],{array:!1}),this.addProperty(e,"refPublisher",null!==(o=y.refPublisher)&&void 0!==o?o:[],{array:!0}),this.addProperty(e,"refPublicationYear",null!==(n=y.refPublicationYear)&&void 0!==n?n:[],{array:!1}),this.addProperty(e,"citationStyle",null!==(a=y.citationStyle)&&void 0!==a?a:[],{array:!1}),this.bitJson.bookReferences.push(e)}else g===u.BitType.pageFooter?(this.bitJson.sections||(this.bitJson.sections=[]),d=this.bitJson.sections):(this.bitJson.listItems||(this.bitJson.listItems=[]),d=this.bitJson.listItems),this.listItem={item:null!==(s=y.item)&&void 0!==s?s:[],lead:null!==(l=y.lead)&&void 0!==l?l:[],hint:null!==(p=y.hint)&&void 0!==p?p:[],instruction:null!==(c=y.instruction)&&void 0!==c?c:[],body:this.bodyDefault},d.push(this.listItem)}exit_cardBitsValue(e,t){this.listItem=void 0}enter_body(e,t){const i=e.value,r=this.getParentNode(t);if(!r)return!1;const o=this.getTextFormat(t),n=o===f.TextFormat.bitmarkText;if(this.bodyJson=i.body,r.key===c.NodeType.bitsValue){this.bitJson.body=this.bodyJson;const e=n&&this.isBitmarkText(this.bodyJson);if(this.options.textAsPlainText&&e){const e=this.textGenerator.generateSync(this.bodyJson,o,m.TextLocation.body,{noBreakscaping:!0});this.bitJson.body=(null!=e?e:"").trim()}else e&&(this.bitJson.body=this.moveBodyBitPropertiesToAttrs(this.bodyJson))}else r.key===c.NodeType.cardBitsValue&&this.listItem&&(this.listItem.body=this.bodyJson);return!1}bodyBitCallback(e,t,i){var r;const o=`{${this.placeholderIndex}}`;return this.placeholderIndex++,this.bitJson.placeholders=null!==(r=this.bitJson.placeholders)&&void 0!==r?r:{},this.bitJson.placeholders[o]=e,o}moveBodyBitPropertiesToAttrs(e,t=0){if(0===t)e=(0,a.default)(e);else if(t>5e3)throw new Error("Recursion limit exceeded");for(const i of e)if(i.type!==g.BodyBitType.text&&g.BodyBitType.values().includes(i.type)){const e=i;e.attrs={};for(const[t,i]of Object.entries(e))"type"!==t&&"attrs"!==t&&(e.attrs[t]=i,delete e[t])}else Array.isArray(i.content)&&(t++,this.moveBodyBitPropertiesToAttrs(i.content,t));return e}enter_footer(e,t){return this.standardHandler(e,t,void 0,{array:!0,valueOverride:e.value.footer})}enter_elements(e,t){return this.standardHandler(e,t,void 0,{array:!0})}enter_flashcards(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0,keyOverride:"cards"})}enter_definitions(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_statement(e,t){var i,r;const o=e.value,n=this.getParentNode(t);(null==n?void 0:n.key)===c.NodeType.cardNode&&o&&(this.bitJson.statement=null!==(i=o.statement)&&void 0!==i?i:"",this.bitJson.isCorrect=null!==(r=o.isCorrect)&&void 0!==r&&r,this.bitJson.example=o.example,this.bitJson.isExample=o.isExample)}enter_statements(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_choices(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_responses(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_feedbacks(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_quizzes(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_heading(e,t){return this.standardHandler(e,t,void 0,{array:!1})}enter_pairs(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_matrix(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_pronunciationTable(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!1})}enter_table(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!1})}enter_questions(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_botResponses(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0,keyOverride:"responses"})}enter_ingredients(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!0})}enter_captionDefinitionList(e,t){return this.standardHandler(e,t,c.NodeType.cardNode,{array:!1})}enter_backgroundWallpaper(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_imagePlaceholder(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_resources(e,t){var i,r;const o=e.value,n=this.getBitType(t),a=this.getResourceType(t);if(!o||!n)return!0;let s;const l=p.Config.getBitConfig(n),c=p.Config.getBitResourcesConfig(n,a),y=c.comboResourceTagTypesMap;if(c.comboResourceTagTypesMap.size>0)for(const[e,t]of y.entries()){const n={type:e,__typeAlias:e};for(const e of t){const t=o.find((t=>t.__typeAlias===e));if(t){const e=p.Config.getTagConfigForTag(l.tags,t.__typeAlias),o=null!==(i=null==e?void 0:e.jsonKey)&&void 0!==i?i:t.__typeAlias,a=null!==(r=null==e?void 0:e.tag)&&void 0!==r?r:t.__typeAlias,s=t.__typeAlias===a?t:void 0;if(s)for(const[e,t]of Object.entries(s))"type"!==e&&(n[o]=t)}}s=n}else if(p.Config.isOfBitType(n,[u.BitType.imagesLogoGrave,u.BitType.prototypeImages])){const e=[];for(const t of o)t.type===T.ResourceTag.image&&e.push(t);n===u.BitType.imagesLogoGrave?this.bitJson.logos=e:this.bitJson.images=e}else o.length>=1&&(s=o[0]);return this.bitJson.resource=s,!1}leaf_level(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}enter_book(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!0})}leaf_book(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}leaf_anchor(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}leaf_reference(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}leaf_referenceEnd(e,t){return this.standardHandler(e,t,c.NodeType.bitsValue,{array:!1})}leaf_markup(e,t){const i=e.value;return i&&(this.bitWrapperJson.bitmark=i),!1}enter_internalComment(e,t){return!1}enter_parser(e,t){const i=e.value,r=this.getBitType(t),n=this.getParentNode(t);if(i&&r){const{version:e,excessResources:r,warnings:a,errors:s}=i,l=o(i,["version","excessResources","warnings","errors"]),p=`${this.bitmarkVersion}`,u=this.textParserVersion;let y;if(Array.isArray(r)&&r.length>0){y=[];for(const e of r)y.push(e)}const g=this.getInternalComments(t);(null==n?void 0:n.key)===c.NodeType.bitsValue&&(this.bitWrapperJson.parser=Object.assign(Object.assign({version:e,bitmarkVersion:p,textParserVersion:u,internalComments:g},l),{warnings:a,errors:s,excessResources:y}),this.options.enableWarnings||delete this.bitWrapperJson.parser.warnings)}}generatePropertyHandlers(){var e;const t=p.Config.getRawPropertiesConfig();for(const i of Object.values(t)){const t=null!==(e=i.astKey)&&void 0!==e?e:i.tag,r=`enter_${t}`;"function"!=typeof this[r]&&("example"!==t&&(this[r]=(e,t)=>{var r;const o=e.value;if(null==o)return;const n=this.getParentNode(t);if((null==n?void 0:n.key)!==c.NodeType.bitsValue)return;const a=null!==(r=i.jsonKey)&&void 0!==r?r:i.tag;this.addProperty(this.bitJson,a,o,{array:!i.single})},this[r]=this[r].bind(this)))}}standardHandler(e,t,i,r){var o,n;if(i){const e=Array.isArray(i)?i:[i],r=this.getParentNode(t);if(!(null==r?void 0:r.key)||!e.includes(null==r?void 0:r.key))return!0}return this.addProperty(this.bitJson,null!==(o=r.keyOverride)&&void 0!==o?o:e.key,null!==(n=r.valueOverride)&&void 0!==n?n:e.value,r),!1}addProperty(e,t,i,r){if(void 0!==i){let o;Array.isArray(i)||(i=[i]);const n=i;o=!r.array&&n.length>=1?n[n.length-1]:n,(r.allowNull||null!=o)&&(e[t]=o)}}toExample(e,t){const{isExample:i,example:r,__isDefaultExample:o}=e,{defaultExample:n,isBoolean:a}=t;if(!i)return{isExample:!1,example:null};let s;return s=o?a?B.BooleanUtils.toBoolean(n):this.convertBreakscapedStringToJsonText(n,t.textFormat,m.TextLocation.tag):a?B.BooleanUtils.toBoolean(r):this.convertBreakscapedStringToJsonText(r,t.textFormat,m.TextLocation.tag),{isExample:!0,example:s}}getBitType(e){for(const t of e)if(t.key===c.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.bitType}}getTextFormat(e){var t;const i=this.getBitType(e);if(i){const r=p.Config.getBitConfig(i);for(const i of e)if(i.key===c.NodeType.bitsValue){const e=i.value;return null!==(t=f.TextFormat.fromValue(null==e?void 0:e.textFormat))&&void 0!==t?t:r.textFormatDefault}}return f.TextFormat.bitmarkText}getResourceType(e){for(const t of e)if(t.key===c.NodeType.bitsValue){const e=t.value;return null==e?void 0:e.resourceType}}getInternalComments(e){if(this.getBitType(e))for(const t of e)if(t.key===c.NodeType.bitsValue){return t.value.internalComment}}convertBreakscapedStringToJsonText(e,t,i){if(!(t===f.TextFormat.bitmarkText))return e||"";if(this.options.textAsPlainText)return e||"";return this.textParser.toAst(e,{textFormat:t,textLocation:i})}concatenatePlainTextWithJsonTexts(e,t,i){var r;if(Array.isArray(e)){if(i=i.trim()){const o=i.split("\n"),n=[];for(let e=0;e<t;e++)n.push({type:h.TextNodeType.hardBreak});for(let e=0;e<o.length;e++){const t=o[e];t&&n.push({text:t,type:h.TextNodeType.text}),e<o.length-1&&n.push({type:h.TextNodeType.hardBreak})}const a=e[e.length-1];a&&a.type===h.TextNodeType.paragraph?a.content=[...null!==(r=a.content)&&void 0!==r?r:[],...n]:e.push({type:h.TextNodeType.paragraph,content:n,attrs:{}})}return e}return`${null!=e?e:""}${"\n".repeat(t)}${null!=i?i:""}`}isBitmarkText(e){return null!=e&&(!!Array.isArray(e)&&"text"===e.__tag)}writeInlineDebug(e,t){let i=e;t.open?i=`<${e}>`:t.close?i=`</${e}>`:t.single&&(i=`<${e} />`),this.writeString(i)}writeString(e){null!=e&&this.write(`${e}`)}createBitJson(e){const t=e.textFormat;return{type:e.isCommented?u.BitType._comment:e.bitType,originalType:e.isCommented?e.bitType:void 0,format:t,bitLevel:e.bitLevel}}cleanBitJson(e){var t,i,r,o,n,a;const s=p.Config.getBitType(e.type),l=p.Config.getBitConfig(s);if(null==e.originalType&&(e.originalType=void 0),e.item||(e.item=void 0),p.Config.isOfBitType(s,[u.BitType._error,u.BitType._comment]))delete e.format,delete e.item,delete e.lead,delete e.pageNumber,delete e.marginNumber,delete e.hint,delete e.instruction;else{let c=!1,y=!1;p.Config.isOfBitType(s,[u.BitType.page])?(null!=e.item&&0!==(null===(t=e.item)||void 0===t?void 0:t.length)||delete e.item,null!=e.lead&&0!==(null===(i=e.lead)||void 0===i?void 0:i.length)||delete e.lead,null!=e.pageNumber&&0!==(null===(r=e.pageNumber)||void 0===r?void 0:r.length)||delete e.pageNumber,null!=e.marginNumber&&0!==(null===(o=e.marginNumber)||void 0===o?void 0:o.length)||delete e.marginNumber,null!=e.hint&&0!==(null===(n=e.hint)||void 0===n?void 0:n.length)||delete e.hint,null!=e.instruction&&0!==(null===(a=e.instruction)||void 0===a?void 0:a.length)||delete e.instruction):(null==e.item&&(e.item=this.textDefault),null==e.lead&&(e.lead=this.textDefault),null==e.hint&&(e.hint=this.textDefault),null==e.instruction&&(e.instruction=this.textDefault),null==e.pageNumber&&(e.pageNumber=this.textDefault),null==e.marginNumber&&(e.marginNumber=this.textDefault)),null==e.body&&(e.body=this.bodyDefault),p.Config.isOfBitType(s,[u.BitType.article]),p.Config.isOfBitType(s,[u.BitType.example])&&(c=!0,y=!0),p.Config.isOfBitType(s,[u.BitType.multipleChoice1,u.BitType.multipleResponse1,u.BitType.multipleChoiceText,u.BitType.highlightText,u.BitType.gapText,u.BitType.gapTextInstructionGrouped,u.BitType.clozeAndMultipleChoiceText,u.BitType.sequence,u.BitType.mark,u.BitType.flashcard,u.BitType.definitionList])&&(c=!0,null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,[u.BitType.sequence])&&(c=!0,y=!0,null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,u.BitType.cloze)&&(c=!0,p.Config.isOfBitType(s,u.BitType.clozeSolutionGrouped)?(null==e.quizCountItems&&(e.quizCountItems=!0),null==e.quizStrikethroughSolutions&&(e.quizStrikethroughSolutions=!0)):p.Config.isOfBitType(s,u.BitType.clozeInstructionGrouped)&&(null==e.quizCountItems&&(e.quizCountItems=!0),null==e.quizStrikethroughSolutions&&(e.quizStrikethroughSolutions=!1))),p.Config.isOfBitType(s,[u.BitType.multipleChoice,u.BitType.multipleResponse])&&(c=!0,null==e.body&&(e.body=this.bodyDefault),null==e.footer&&(e.footer=this.textDefault)),p.Config.isOfBitType(s,u.BitType.essay)&&(c=!0,y=!0,null==e.body&&(e.body=this.bodyDefault),null==e.partialAnswer&&(e.partialAnswer="")),p.Config.isOfBitType(s,u.BitType.trueFalse1)&&(c=!0,y=!0,null==e.isCorrect&&(e.isCorrect=!1),null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,u.BitType.trueFalse)&&(c=!0,null==e.labelFalse&&(e.labelFalse=""),null==e.labelTrue&&(e.labelTrue=""),null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,u.BitType.chapter)&&(null==e.toc&&(e.toc=!0),null==e.progress&&(e.progress=!0),null==e.level&&(e.level=1),null==e.body&&(e.body=this.bodyDefault)),p.Config.isOfBitType(s,u.BitType.interview)&&(c=!0,null==e.body&&(e.body=this.bodyDefault),null==e.footer&&(e.footer=this.textDefault),null==e.questions&&(e.questions=[])),s===u.BitType.matchMatrix&&(c=!0),p.Config.isOfBitType(s,u.BitType.match)&&(c=!0,null==e.heading&&(e.heading={})),p.Config.isOfBitType(s,u.BitType.learningPathBook)&&(null==e.isTracked&&(e.isTracked=!0),null==e.isInfoOnly&&(e.isInfoOnly=!1)),p.Config.isOfBitType(s,u.BitType.table)&&(null==e.tableFixedHeader&&(e.tableFixedHeader=!1),null==e.tableSearch&&(e.tableSearch=!1),null==e.tableSort&&(e.tableSort=!1),null==e.tablePagination&&(e.tablePagination=!1),null==e.tablePaginationLimit&&(e.tablePaginationLimit=0),null==e.tableHeight&&(e.tableHeight=0),null==e.tableWhitespaceNoWrap&&(e.tableWhitespaceNoWrap=!1),null==e.tableAutoWidth&&(e.tableAutoWidth=!0),null==e.tableResizableColumns&&(e.tableResizableColumns=!1),null==e.tableColumnMinWidth&&(e.tableColumnMinWidth=0)),p.Config.isOfBitType(s,u.BitType.bookReference)&&(null==e.refAuthor&&(e.refAuthor=[]),null==e.refBookTitle&&(e.refBookTitle=""),null==e.refPublisher&&(e.refPublisher=[]),null==e.refPublicationYear&&(e.refPublicationYear="")),p.Config.isOfBitType(s,[u.BitType.pageBanner,u.BitType.pageBuyButton,u.BitType.pageBuyButtonAlt,u.BitType.pageBuyButtonPromotion,u.BitType.pageFooter,u.BitType.pageOpenBook,u.BitType.pagePerson,u.BitType.pageProduct,u.BitType.pageProductList,u.BitType.pageProductVideo,u.BitType.pageProductVideoList,u.BitType.pageSectionFolder,u.BitType.pageSubscribe,u.BitType.pageSubpage])&&(null==e.slug&&(e.slug=""),null==e.body&&(e.body=this.bodyDefault),p.Config.isOfBitType(s,u.BitType.pageBuyButton)&&null==e.content2Buy&&(e.content2Buy="")),p.Config.isOfBitType(s,u.BitType.book)&&(null==e.maxTocChapterLevel&&(e.maxTocChapterLevel=-1),null==e.hasMarkAsDone&&(e.hasMarkAsDone=!1),null==e.processHandIn&&(e.processHandIn=!1),null==e.isPublic&&(e.isPublic=!1),null==e.chatWithBook&&(e.chatWithBook=!1),null==e.chatWithBookBrainKey&&(e.chatWithBookBrainKey="")),s!==u.BitType.articleAi&&s!==u.BitType.noteAi&&s!==u.BitType.summaryAi||null==e.aiGenerated&&(e.aiGenerated=!0),p.Config.isOfBitType(s,[u.BitType.articleResponsive,u.BitType.pageArticleResponsive])&&null==e.imageFirst&&(e.imageFirst=!0),p.Config.isOfBitType(s,u.BitType.reviewNote)&&(null==e.resolved&&(e.resolved=!1),null==e.resolvedDate&&(e.resolvedDate=""),null==e.resolvedBy&&(e.resolvedBy="")),p.Config.isOfBitType(s,[u.BitType.imagesLogoGrave,u.BitType.prototypeImages])&&(s===u.BitType.imagesLogoGrave?null==e.logos&&(e.logos=[]):null==e.images&&(e.images=[])),p.Config.isOfBitType(s,[u.BitType.stepImageScreenshotWithPointer,u.BitType.surveyMatrix])&&(null==e.pointerTop&&(e.pointerTop=""),null==e.pointerLeft&&(e.pointerLeft=""),p.Config.isOfBitType(s,[u.BitType.surveyMatrix])&&null==e.buttonCaption&&(e.buttonCaption="")),p.Config.isOfBitType(s,[u.BitType.listItem])&&null==e.listItemIndent&&(e.listItemIndent=0),p.Config.isOfBitType(s,u.BitType.surveyRating)&&(null==e.ratingLevelStart&&(e.ratingLevelStart={level:0}),null==e.ratingLevelEnd&&(e.ratingLevelEnd={level:0})),p.Config.isOfBitType(s,u.BitType.vendorStripePricingTable)&&(null==e.stripePricingTableId&&(e.stripePricingTableId=""),null==e.stripePublishableKey&&(e.stripePublishableKey="")),p.Config.isOfBitType(s,u.BitType.callToAction)&&(null==e.buttonCaption&&(e.buttonCaption=""),null==e.callToActionUrl&&(e.callToActionUrl="")),p.Config.isOfBitType(s,u.BitType.handInFile)&&null==e.handInAcceptFileType&&(e.handInAcceptFileType=[]),p.Config.isOfBitType(s,u.BitType.handInSubmit)&&(null==e.handInRequirement&&(e.handInRequirement=[]),null==e.handInInstruction&&(e.handInInstruction=""),null==e.buttonCaption&&(e.buttonCaption="")),p.Config.isOfBitType(s,u.BitType.module)&&null==e.hasBookNavigation&&(e.hasBookNavigation=!0),p.Config.isOfBitType(s,u.BitType.container)&&null==e.allowedBit&&(e.allowedBit=[]),l.quizBit&&null==e.revealSolutions&&(e.revealSolutions=!1),p.Config.isOfBitType(s,u.BitType.platformPath)&&null==e.path&&(e.path=""),c?null==e.isExample&&(e.isExample=!1):(delete e.isExample,delete e.example),y?null==e.example&&(e.example=null):delete e.example}return e}convertAllBitmarkTextsToStringsForPlainText(e){if(!this.options.textAsPlainText)return;const t=e;for(const e in t){const i=t[e];if(this.isBitmarkText(i)){const r=this.textGenerator.generateSync(i,f.TextFormat.bitmarkText,m.TextLocation.tag,{noBreakscaping:!0});t[e]=(null!=r?r:"").trim()}else"object"==typeof t[e]&&this.convertAllBitmarkTextsToStringsForPlainText(t[e])}}removeTemporaryProperties(e){const t=e;for(const e in t)e.startsWith("__")?delete t[e]:"object"==typeof t[e]&&this.removeTemporaryProperties(t[e])}write(e){return this.writer.write(e),this}writeLine(e){return this.writer.writeLine(e),this}writeLines(e,t){return this.writer.writeLines(e,t),this}writeWhiteSpace(){return this.writer.writeWhiteSpace(),this}}t.JsonGenerator=k},3029:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CARD_VARIANT_DIVIDER_V1=t.CARD_SIDE_DIVIDER_V1=t.CARD_DIVIDER_V1=t.CARD_VARIANT_DIVIDER_V2=t.CARD_SIDE_DIVIDER_V2=t.CARD_DIVIDER_V2=t.BitContentLevel=t.TypeKey=void 0;const r=i(4718),o=i(9917);t.CARD_DIVIDER_V2="====";t.CARD_SIDE_DIVIDER_V2="--";t.CARD_VARIANT_DIVIDER_V2="++";t.CARD_DIVIDER_V1="===";t.CARD_SIDE_DIVIDER_V1="==";t.CARD_VARIANT_DIVIDER_V1="--";const n=(0,r.superenum)({TextFormat:"TextFormat",ResourceType:"ResourceType",Title:o.Tag.tag_title,Anchor:o.Tag.tag_anchor,Reference:o.Tag.tag_reference,ItemLead:o.Tag.tag_itemLead,Instruction:o.Tag.tag_instruction,Hint:o.Tag.tag_hint,True:o.Tag.tag_true,False:o.Tag.tag_false,Gap:o.Tag.tag_gap,Mark:o.Tag.tag_mark,SampleSolution:o.Tag.tag_sampleSolution,Property:"Property",Resource:"Resource",TagChain:"TagChain",BodyChar:"BodyChar",BodyText:"BodyText",BodyTextPlain:"BodyTextPlain",CardSet:"CardSet",Card:"Card",CardChar:"CardChar",CardText:"CardText",GapChain:"GapChain",TrueFalseChain:"TrueFalseChain",PlainTextDivider:"PlainTextDivider",FooterDivider:"FooterDivider"});t.TypeKey=n;const a=(0,r.superenum)({Bit:"Bit",Card:"Card",Chain:"Chain"});t.BitContentLevel=a},3045:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.bookChainContentProcessor=function(e,t,i,c,u){t===p.BitContentLevel.Chain||function(e,t,i,c,u){const{bitConfig:y}=e;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("book content",c);const g=e.bitContentProcessor(p.BitContentLevel.Chain,i,c.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("book TAGS",g);const{reference:d,referenceEnd:T}=g,f=r.Breakscape.unbreakscape(l.StringUtils.trimmedString(c.value),{textFormat:a.TextFormat.bitmarkText,textLocation:s.TextLocation.tag}),m=y.tags[o.PropertyConfigKey.book];if(m&&(m.maxCount===n.Count.infinity||m.maxCount>1))return Array.isArray(u.book)||(u.book=[]),void u.book.push({book:f,reference:null!=d?d:"",referenceEnd:null!=T?T:void 0});u.book=f,u.reference=d,u.referenceEnd=T}(e,0,i,c,u)};const r=i(7735),o=i(9888),n=i(3778),a=i(385),s=i(6877),l=i(9681),p=i(3029)},3063:function(e,t,i){var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.markConfigChainContentProcessor=function(e,t,i,u,y){var g;const{key:d}=u;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("mark content",u);const T=y.markConfig;if(!T)return;const f=n.Config.getTagConfigForTag(i,a.PropertyTag.fromValue(d)),m=e.bitContentProcessor(c.BitContentLevel.Chain,null==f?void 0:f.chain,u.chain),{mark:h}=m,b=r(m,["mark"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("mark TAGS",b);const B=o.Breakscape.unbreakscape(null!==(g=p.StringUtils.trimmedString(u.value))&&void 0!==g?g:"unknown",{textFormat:s.TextFormat.bitmarkText,textLocation:l.TextLocation.tag}),v=Object.assign({mark:B,emphasis:"underline"},b);v&&T.push(v)};const o=i(7735),n=i(2028),a=i(166),s=i(385),l=i(6877),p=i(9681),c=i(3029)},3069:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InfoFormat=void 0;const r=(0,i(4718).superenum)({text:"text",json:"json",pojo:"pojo"});t.InfoFormat=r},3206:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkPegParserHelper=void 0;const r=i(7735),o=i(1163),n=i(385),a=i(6877),s=i(9681),l=i(7461),p=i(3029);i(2028);t.BitmarkPegParserHelper=class{constructor(e){this.cardIndex=0,this.cardSideIndex=0,this.cardVariantIndex=0,this.parse=e.parse,this.parserText=e.parserText,this.parserLocation=e.parserLocation}handleRawBit(e){var t,i;const r=e.trim();if(this.debugPrint("RAW BIT",r),!r)return;const o=null!==(i=null===(t=this.parserLocation())||void 0===t?void 0:t.start)&&void 0!==i?i:{line:1,column:1,offset:0},n=this.parse(e,{startRule:"bit",grammarSource:new l.PeggyGrammarLocation("bit",o)});return n.value&&(n.value.markup=r),n}handleTextFormat(e){return{type:p.TypeKey.TextFormat,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleResourceType(e){return{type:p.TypeKey.ResourceType,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleBitContent(e){let t=this.reduceToArrayOfTypes(e);return t=this.mergeCharToText(t),t}handleBitTag(e){return e}handleTag(e,t){return{type:e,value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handlePropertyTag(e,t){return{type:p.TypeKey.Property,key:r.Breakscape.unbreakscape(e,{textFormat:n.TextFormat.plainText,textLocation:a.TextLocation.tag}),value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handleResourceTag(e,t){return{type:p.TypeKey.Resource,key:r.Breakscape.unbreakscape(e,{textFormat:n.TextFormat.plainText,textLocation:a.TextLocation.tag}),value:t,parser:{text:this.parserText(),location:this.parserLocation()}}}handleTagChain(e){const t=this.reduceToArrayOfTypes(e);let i=t;if(t.length>1){const e=t[0];e.chain=t.slice(1),i=[e]}return i}handlePlainTextDivider(e){return e=this.reduceToString(e),{type:p.TypeKey.PlainTextDivider,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleFooterDivider(e){return e=this.reduceToString(e),{type:p.TypeKey.FooterDivider,value:e,parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardSet(e){const t=e,i={cards:[]},r={cards:[]};if(t){const e={text:this.parserText(),location:this.parserLocation()};for(const e of t){if(!e)continue;const{type:t,value:r,parser:o}=e;if(!t||t!==p.TypeKey.Card)continue;const{cardIndex:n,cardSideIndex:a,cardVariantIndex:s,value:l}=r;let c=i.cards[n];c||(c={sides:[]},i.cards[n]=c);let u=c.sides[a];u||(u={variants:[]},c.sides[a]=u);u.variants[s]?u.variants[s].value+=l:u.variants[s]={value:l,parser:o}}i.cards=i.cards.filter((e=>e.sides.some((e=>e.variants.some((e=>0!==s.StringUtils.trimmedString(e.value).length))))));for(const t of i.cards){const i={sides:[]};r.cards.push(i);for(const r of t.sides){const t={variants:[]};i.sides.push(t);for(const i of r.variants){let r={line:1,column:1,offset:0};if(i.parser.location){r=i.parser.location.start;const e=i.parser.text,t=e?e.length:0,o=1;r.offset+=t,r.line+=o}let o=this.parse(i.value,{startRule:"cardContent",grammarSource:new l.PeggyGrammarLocation("card-content",r)});o=this.reduceToArrayOfTypes(o),this.debugPrint("parsedCardContent",o),t.variants.push({parser:e,content:o})}}}}return{type:p.TypeKey.CardSet,value:r,parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardSetStart(){this.cardIndex=-1,this.cardSideIndex=0,this.cardVariantIndex=0}handleCardSetEnd(){this.cardIndex=0,this.cardSideIndex=0,this.cardVariantIndex=0}handleCards(e){return e}handleCardLineOrDivider(e,t){let i=!1,r=!1,n=!1;return Array.isArray(e)&&2===e.length&&(e=e[0],t===o.CardSetVersion.v1?(i=e===p.CARD_DIVIDER_V1,r=e===p.CARD_SIDE_DIVIDER_V1,n=e===p.CARD_VARIANT_DIVIDER_V1):(i=e===p.CARD_DIVIDER_V2,r=e===p.CARD_SIDE_DIVIDER_V2,n=e===p.CARD_VARIANT_DIVIDER_V2)),i?(this.cardIndex++,this.cardSideIndex=0,this.cardVariantIndex=0):r?(this.cardSideIndex++,this.cardVariantIndex=0):n&&this.cardVariantIndex++,this.isType(e,p.TypeKey.Card)?e:{type:p.TypeKey.Card,value:{cardIndex:this.cardIndex,cardSideIndex:this.cardSideIndex,cardVariantIndex:this.cardVariantIndex,value:""},parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardLine(e){return{type:p.TypeKey.Card,value:{cardIndex:this.cardIndex,cardSideIndex:this.cardSideIndex,cardVariantIndex:this.cardVariantIndex,value:e},parser:{text:this.parserText(),location:this.parserLocation()}}}handleCardContent(e){return this.mergeCharToText(e)}handleCardTags(e){return e}mergeCharToText(e){var t,i,r,o,n,a;const s=[];let l,c;for(const u of e)switch(u.type){case p.TypeKey.BodyChar:if(l){const e=`${null!==(t=l.value)&&void 0!==t?t:""}${null!==(i=u.value)&&void 0!==i?i:""}`;l.value=e}else l={type:p.TypeKey.BodyText,value:null!==(r=u.value)&&void 0!==r?r:"",parser:{text:this.parserText(),location:this.parserLocation()}};break;case p.TypeKey.CardChar:if(c){const e=`${null!==(o=c.value)&&void 0!==o?o:""}${null!==(n=u.value)&&void 0!==n?n:""}`;c.value=e}else c={type:p.TypeKey.CardText,value:null!==(a=u.value)&&void 0!==a?a:"",parser:{text:this.parserText(),location:this.parserLocation()}};break;default:l&&(s.push(l),l=void 0),c&&(s.push(c),c=void 0),s.push(u)}return l&&s.push(l),c&&s.push(c),s}isType(e,t){if(!e)return!1;const{type:i}=e;return t?Array.isArray(t)?t.indexOf(i)>=0:t===i:!!p.TypeKey.fromValue(i)}reduceToArrayOfTypes(e,t,i){if(!Array.isArray(e))return[];return e.reduce(((e,r,o)=>{if(null==r)return e;const{type:n,value:a}=r;if(Array.isArray(r)){const i=this.reduceToArrayOfTypes(r,t);e.push(...i)}else{if(!this.isType(r,t))return e;if(i&&Array.isArray(a)){const i=this.reduceToArrayOfTypes(a,t);e.push(...i)}else n&&e.push(r)}return e}),[])}reduceToString(e){if(!Array.isArray(e))return"";return e.reduce(((e,t,i)=>{if(null==t)return e;if(Array.isArray(t)){e+=this.reduceToString(t)}else e+=t;return e}),[])}debugPrint(e,t){}}},3619:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitConfig=void 0;const r=i(3778);t.BitConfig=class{constructor(e){this.tags={};const{since:t,bitType:i,inheritedBitTypes:r,textFormatDefault:o,tags:n,cardSet:a,quizBit:s,deprecated:l,bodyAllowed:p,bodyRequired:c,footerAllowed:u,footerRequired:y,resourceAttachmentAllowed:g,rootExampleType:d,comboResourceType:T}=e;this.since=t,this.bitType=i,this.inheritedBitTypes=r,this.inheritedBitTypesSet=new Set(r),this.textFormatDefault=o,this.tags=n,this.cardSet=a,this.quizBit=s,this.deprecated=l,this.bodyAllowed=p??!0,this.bodyRequired=c,this.footerAllowed=u??!0,this.footerRequired=y,this.resourceAttachmentAllowed=g??!0,this.rootExampleType=d,this.comboResourceType=T}toString(e){const t=Object.assign({},e);let i=`[Bit]\n${this.bitType}`;this.inheritedBitTypes.length>0&&(i+="\n\n[Inheritance]",i+=`\n${this.inheritedBitTypes.join(" => ")}`),i+=`\n\n[Default text format]\n${this.textFormatDefault}`;const o=[];null!=this.since&&o.push(`since=${this.since}`),null!=this.deprecated&&o.push(`deprecated=${this.deprecated}`),this.bodyAllowed&&o.push("bodyAllowed"),this.bodyRequired&&o.push("bodyRequired"),this.footerAllowed&&o.push("footerAllowed"),this.footerRequired&&o.push("footerRequired"),this.resourceAttachmentAllowed&&o.push("resourceAttachmentAllowed"),null!=this.rootExampleType&&o.push(`rootExampleType=${this.rootExampleType}`),null!=this.comboResourceType&&o.push(`comboResourceType=${this.comboResourceType}`),i+=`\n\n[Flags]\n${o.join(", ")}`,i+="\n\n[Tags]";for(const e of Object.values(this.tags))(e.maxCount===r.Count.infinity||e.maxCount>0)&&(i+=`\n${e.toString(t)}`);return this.cardSet&&(i+=`\n\n${this.cardSet.toString(t)}`),i}}},3778:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Count=void 0;const r=(0,i(4718).superenum)({infinity:"infinity"});t.Count=r},3811:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_BITMARK_VERSION=t.BitmarkVersion=void 0;const r=(0,i(4718).superenum)({v2:2,v3:3});t.BitmarkVersion=r;const o=r.v3;t.DEFAULT_BITMARK_VERSION=o},3881:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InfoBuilder=void 0;const r=i(2028),o=i(5854);t.InfoBuilder=class{getSupportedBits(e){var t,i;const n=null===(t=null==e?void 0:e.includeNonDeprecated)||void 0===t||t,a=null!==(i=null==e?void 0:e.includeDeprecated)&&void 0!==i&&i,s=[];for(const e of o.BitType.values()){if(e===o.BitType._error||e===o.BitType._comment)continue;const t=r.Config.getBitType(e),i=r.Config.getBitConfig(t),l=i.inheritedBitTypes.length>0?i.inheritedBitTypes:void 0;(n&&!i.deprecated||a&&i.deprecated)&&s.push({name:e,since:i.since,deprecated:i.deprecated,inheritedBitTypes:l})}return s}getSupportedBitConfigs(){const e=[];for(const t of o.BitType.values()){if(t===o.BitType._error||t===o.BitType._comment)continue;const i=r.Config.getBitType(t),n=r.Config.getBitConfig(i);e.push(n)}return e}}},3904:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.gapChainContentProcessor=function(e,t,i,l,p,c){if(t===s.BitContentLevel.Chain)(0,a.clozeTagContentProcessor)(e,t,i,l,p);else{const t=function(e,t,i,a){var l;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("gap content",a);const p=r.Config.getTagConfigForTag(i,n.Tag.fromValue(a.type)),c=[a,...null!==(l=a.chain)&&void 0!==l?l:[]],u=e.bitContentProcessor(s.BitContentLevel.Chain,null==p?void 0:p.chain,c);e.DEBUG_CHAIN_TAGS&&e.debugPrint("gap TAGS",u);const y=Object.assign({type:o.BodyBitType.gap},u);return y}(e,0,i,l);t&&c.push(t)}};const r=i(2028),o=i(4410),n=i(9917),a=i(554),s=i(3029)},3967:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ratingLevelChainContentProcessor=function(e,t,i,a,p){var c;const{textFormat:u}=e,{key:y,value:g}=a;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("ratingLevel content",a);const d=e.bitContentProcessor(s.BitContentLevel.Chain,i,a.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("ratingLevel TAGS",d);const{label:T}=d,f={level:null!==(c=n.NumberUtils.asNumber(g))&&void 0!==c?c:0,label:T?l.toAst(T,{textFormat:u,textLocation:o.TextLocation.tag}):void 0};switch(y){case r.PropertyTag.ratingLevelStart:p.ratingLevelStart=f;break;case r.PropertyTag.ratingLevelEnd:p.ratingLevelEnd=f}};const r=i(166),o=i(6877),n=i(8025),a=i(777),s=i(3029),l=new a.TextParser},3968:function(e,t,i){var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(o,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function s(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkStringGenerator=void 0;const o=i(6772),n=i(5087);t.BitmarkStringGenerator=class{constructor(e){this.writer=new o.StringWriter,this.generator=new n.BitmarkGenerator(this.writer,e)}generate(e){return r(this,void 0,void 0,(function*(){return yield this.generator.generate(e),this.writer.getString()}))}generateSync(e){return this.generator.generateSync(e),this.writer.getString()}}},3990:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.referenceTagContentProcessor=function(e,t,i,s,l,p){const{value:c}=s,u=a.StringUtils.trimmedString(c);p?l.referenceEnd=r.Breakscape.unbreakscape(u,{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag}):l.reference=r.Breakscape.unbreakscape(u,{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag})};const r=i(7735),o=i(385),n=i(6877),a=i(9681)},4020:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.trueFalseTagContentProcessor=function(e,t,i,l){const{type:p,value:c}=i,u=l.trueFalse;if(!u)return;const y=r.Breakscape.unbreakscape(a.StringUtils.trimmedString(c),{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag});u.push({text:y,isCorrect:p===s.TypeKey.True,__isDefaultExample:!1})};const r=i(7735),o=i(385),n=i(6877),a=i(9681),s=i(3029)},4078:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanUtils=void 0;const i=new class{isBoolean(e){return!0===e||!1===e}isBooleanString(e){return!!this.isBoolean(e)||("true"===e||"false"===e)}toBoolean(e,t){return t?!1!==e&&"false"!==e:!0===e||"true"===e}};t.BooleanUtils=i},4091:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.exampleTagContentProcessor=function(e,t,i,u){const{bitType:y}=e,{value:g}=i,d=g;o.Config.isOfBitType(y,[n.BitType.cloze,n.BitType.clozeAndMultipleChoiceText,n.BitType.multipleChoiceText,n.BitType.highlightText,n.BitType.trueFalse,n.BitType.trueFalse1,n.BitType.multipleResponse,n.BitType.multipleResponse1,n.BitType.multipleChoice,n.BitType.multipleChoice1])?function(e,t,i,u){var y,g;const{bitType:d,textFormat:T}=e;let f;Array.isArray(u.trueFalse)&&u.trueFalse.length>0&&(f=null!==(y=u.trueFalse[u.trueFalse.length-1])&&void 0!==y?y:void 0);f?!0===i?(f.__isDefaultExample=!0,f.example=!!f.isCorrect):l.BooleanUtils.isBooleanString(i)?f.example=l.BooleanUtils.toBoolean(i):(f.__isDefaultExample=!0,f.example=void 0,e.addWarning("Only 'true' / 'false' / default are allowed here, using default",t)):Array.isArray(u.__solutionsAst)&&u.__solutionsAst.length>0?u.example=!0===i?null!==(g=u.__solutionsAst[u.__solutionsAst.length-1])&&void 0!==g?g:void 0:i?p.toAst(i,{textFormat:T,textLocation:s.TextLocation.tag}):void 0:o.Config.isOfBitType(d,[n.BitType.multipleChoiceText,n.BitType.highlightText,n.BitType.trueFalse,n.BitType.trueFalse1,n.BitType.multipleResponse,n.BitType.multipleResponse1])?function(e,t,i,o){if(!0===i)o.__isDefaultExample=!0,o.example=void 0;else{const n=i?r.Breakscape.unbreakscape(i,{textFormat:a.TextFormat.bitmarkText,textLocation:s.TextLocation.tag}):void 0;l.BooleanUtils.isBooleanString(n)?o.example=l.BooleanUtils.toBoolean(n):(o.__isDefaultExample=!0,o.example=void 0,e.addWarning("Only 'true' / 'false' / default are allowed here, using default",t))}}(e,t,i,u):o.Config.isOfBitType(d,[n.BitType.clozeAndMultipleChoiceText,n.BitType.multipleChoice,n.BitType.multipleChoice1])?(u.__isDefaultExample=!0,u.example=void 0,!0!==i&&e.addWarning("At this level, only default [@example] is allowed, using default",t)):c(e,t,i,u)}(e,i,d,u):o.Config.isOfBitType(y,n.BitType.mark)?function(e,t,i,r){r.__isDefaultExample=!0,r.example=void 0,!0!==i&&e.addWarning("Only default [@example] is allowed, using default",t)}(e,i,d,u):c(e,i,d,u)};const r=i(7735),o=i(2028),n=i(5854),a=i(385),s=i(6877),l=i(4078),p=new(i(777).TextParser);function c(e,t,i,r){const{textFormat:o}=e;!0===i||"true"===i?(r.__isDefaultExample=!0,r.example=void 0):r.example=i?p.toAst(i,{textFormat:o,textLocation:s.TextLocation.tag}):void 0}},4266:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkPegParserValidator=void 0;const r=i(2028),o=i(5512),n=i(3778),a=i(166),s=i(6149),l=i(9917),p=i(3029),c=["----","\n==\n","\n---\n"],u=["==\n","--\n"],y=["\n==","\n--"];const g=new class{validateBitTags(e,t){if(!t)return[];const{bitConfig:i,bitType:o,resourceType:n}=e,{tags:a,cardSet:s}=i,l=r.Config.getBitResourcesConfig(o,n),c=Object.assign(Object.assign({},a),l.tags);return this.validateTagChainsRecursive(e,p.BitContentLevel.Bit,o,t,c,s).validated}checkBody(e,t,i,r,o){if(!o)return o;const{bitConfig:n}=e,{bodyAllowed:a}=n;return o.length>0&&!a&&e.addWarning(`Bit '${i}' should not have a body.`),o}checkBodyPart(e,t,i){return i?(this.checkBodyForCommonPotentialMistakes(e,t,i),i):i}checkFooter(e,t,i){if(!i)return i;const{bitConfig:r,bitType:o}=e,{footerAllowed:n}=r;return this.checkBodyForCommonPotentialMistakes(e,t,i),n||e.addWarning(`Bit '${o}' should not have a footer.`),i}checkCardBody(e,t,i,r,o,n,a){if(!r||!r.body)return r;const{bitConfig:s}=e;if(!s.cardSet)return r;const l=this.getVariantConfig(s.cardSet.variants,n,a);if(!l)return r;const{bodyAllowed:p}=l;return r.bodyString.length>0&&!p&&e.addWarning(`Bit '${i}' should not have a card body at card:${o+1}, side:${n+1}, variant:${a+1}.`),r}validateTagChainsRecursive(e,t,i,r,c,u,y){var g;if(!r)return{validated:[]};let d;const T=[...r],f=this.convertTagsToTypeKeyMap(e,t,i,c),m=(e,t,i)=>{f.set(e,{maxCount:t,minCount:i,_type:e,_tag:e,_seenCount:0})};var h,b,B;h=a.PropertyTag.internalComment,b=n.Count.infinity,B=0,f.set(`${p.TypeKey.Property}:${h}`,{maxCount:b,minCount:B,_type:o.BitTagType.property,_tag:l.Tag.tag_property,_seenCount:0}),t===p.BitContentLevel.Bit?(u&&m(p.TypeKey.CardSet,1,0),m(p.TypeKey.TextFormat,1,0),m(p.TypeKey.BodyText,n.Count.infinity,0),m(p.TypeKey.BodyTextPlain,n.Count.infinity,0),m(p.TypeKey.PlainTextDivider,n.Count.infinity,0),m(p.TypeKey.FooterDivider,n.Count.infinity,0)):t===p.BitContentLevel.Card&&m(p.TypeKey.CardText,n.Count.infinity,0);for(let r=0;r<T.length;r++){const o=T[r];if(!o)continue;const{type:n,key:a}=o;let l=p.TypeKey.fromValue(n);if(!l)continue;let c=l;l!==p.TypeKey.Property&&l!==p.TypeKey.Resource||(c=`${l}:${a}`);let m=f.get(c);if(!m&&l===p.TypeKey.Property&&(a===s.ResourceTag.backgroundWallpaper||a===s.ResourceTag.imagePlaceholder)&&(m=f.get(`${p.TypeKey.Resource}:${a}`),m)){l=p.TypeKey.Resource,o.type=p.TypeKey.Resource;const t=`Falling back to '[&${a}]' from '[@${a}]'. Replace '[@${a}]' with '[&${a}]' to avoid this warning.`;e.addWarning(t)}const{validated:h,warning:b}=this.validateSingleTag(e,t,i,o,l,m,u);l===p.TypeKey.Resource&&(y=p.TypeKey.Resource);let B=!0;if(!h)if(t===p.BitContentLevel.Chain&&y!==p.TypeKey.Resource){d=o;const e=T.slice(r+1);e.length>0&&(d.chain=e),T.splice(r),B=!1}else T.splice(r,1,null);if(b&&B&&e.addWarning(null!==(g=b.warning)&&void 0!==g?g:"",b.content,b.previousContent),t===p.BitContentLevel.Chain&&m&&m.chain&&h&&!h.chain){const e=T.slice(r+1);e.length>0&&(h.chain=e),T.splice(r+1)}if(h&&Array.isArray(h.chain)&&h.chain.length>0)if(m&&m.chain){const{validated:t,remaining:o}=this.validateTagChainsRecursive(e,p.BitContentLevel.Chain,i,h.chain,m.chain,void 0,h.type);t&&t.length>0?h.chain=t:h.chain=void 0,o&&T.splice(r+1,0,o)}else if(h.type!==p.TypeKey.Resource){const e=h.chain[0];h.chain.length>1&&(e.chain=h.chain.slice(1)),T.splice(r+1,0,e),h.chain=void 0}}for(const t of f.values()){const{minCount:i,_seenCount:r}=t;if(null!=i&&r<i){const r=`${this.getTagSignature(t)} is required at least ${i} time(s)`;e.addWarning(r)}}return{validated:T.filter((e=>null!=e)),remaining:d}}validateSingleTag(e,t,i,r,o,n,a){const{type:s,key:l}=r,c=n?this.getTagSignature(n):this.getUnknownTagSignature(s,l),u=" It will be ignored";let y,g,d="";if(n)switch(n._seenCount++,o){case p.TypeKey.Property:{const{content:o,warning:a}=this.validatePropertyTag(e,t,i,n,r);y=o,g=a;break}case p.TypeKey.Resource:{const{content:o,warning:a}=this.validateResourceTag(e,t,i,n,r);y=o,g=a;break}case p.TypeKey.CardSet:{const{content:t,warning:o}=this.validateCardSet(e,i,n,r,a);y=t,g=o;break}default:{const{content:o,warning:a}=this.validateStandardTag(e,t,i,n,r);y=o,g=a}}else switch(o){case p.TypeKey.Property:g={extraProperty:!0},t!==p.BitContentLevel.Chain&&(y=r);break;case p.TypeKey.Resource:g={excessResource:!0},y=r;break;default:g={invalid:!0}}if(g){const e=null==n?void 0:n._previous;g.invalid||g.excessResource?d=`${c} is not valid here (incorrectly chained?).${u}`:null!=g.tooMany?(d=`${c} is included more than ${g.tooMany} time(s).`,g.tooMany>0&&(d+=" The earlier ones will be ignored")):g.extraProperty?d=`${c} is an unknown property. It can be excluded from the output using the 'excludeUnknownProperties' flag`:g.unexpectedCardSet?d=`${c} is not expected here.${u}`:g.unexpectedCardSideVariant&&(d=`${c} has a card / side / variant that is not expected here.${u}`),g.warning=d,g.content=y,g.previousContent=e}return n&&(n._previous=r),{validated:y,warning:g}}validateStandardTag(e,t,i,r,o){const a=null==r.maxCount?1:r.maxCount;return a!==n.Count.infinity&&r._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validatePropertyTag(e,t,i,r,o){const a=null==r.maxCount?1:r.maxCount;return a!==n.Count.infinity&&r._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validateResourceTag(e,t,i,r,o){const a=null==r.maxCount?1:r.maxCount;return a!==n.Count.infinity&&r._seenCount>a?{warning:{tooMany:a},content:o}:{content:o}}validateCardSet(e,t,i,r,o){if(!o||!o.variants||0===o.variants.length)return{warning:{unexpectedCardSet:!0}};const{value:n}=r,a=n;let s,l=0,c=0;for(const i of a.cards){l=0;for(const r of i.sides){c=0;for(const i of r.variants){const n=i.content;let a;const u=this.getVariantConfig(o.variants,l,c);if(u){a=this.validateTagChainsRecursive(e,p.BitContentLevel.Card,t,n,u.tags).validated}else s={unexpectedCardSideVariant:!0};a&&a.length>0?r.variants[c]={parser:i.parser,content:a}:r.variants[c]={parser:i.parser,content:[]},c++}l++}}return{content:r,warning:s}}checkBodyForCommonPotentialMistakes(e,t,i){if(!i)return;const{bitType:r}=e;for(const t of c)i.includes(t)&&e.addWarning(`Bit '${r}' might contain a mistake: ${t}`);for(const t of u)i.startsWith(t)&&e.addWarning(`Bit '${r}' might contain a mistake: ${t}`);for(const t of y)i.endsWith(t)&&e.addWarning(`Bit '${r}' might contain a mistake: ${t}`)}convertTagsToTypeKeyMap(e,t,i,r){const n=new Map;for(const e of Object.values(r)){const t={minCount:e.minCount,maxCount:e.maxCount,isTag:e.type===o.BitTagType.tag,isProperty:e.type===o.BitTagType.property,isResource:e.type===o.BitTagType.resource,chain:e.chain,_configKey:e.configKey,_type:e.type,_tag:e.tag,_seenCount:0,_previous:void 0};if(t.isProperty)n.set(`${p.TypeKey.Property}:${e.tag}`,t);else if(t.isResource)n.set(`${p.TypeKey.Resource}:${e.tag}`,t);else{const i=p.TypeKey.fromValue(e.tag);i&&n.set(i,t)}}return n}getVariantConfig(e,t,i){let r;if(0===e.length)return;const o=e[Math.min(t,e.length-1)],a=o.length-1;if(i>a){if(r=o[a],r.repeatCount!==n.Count.infinity)return}else r=o[i];return r}getTagSignature(e){switch(e._type){case o.BitTagType.tag:return`[${e._tag}]`;case o.BitTagType.property:return`[@${e._tag}]`;case o.BitTagType.resource:return`[&${e._tag}]`;default:return`'${e._type}' tag '${e._tag}'`}}getUnknownTagSignature(e,t){switch(e){case p.TypeKey.Property:return`[@${t}]`;case p.TypeKey.Resource:return`[&${t}]`;default:return t?`'${e}' tag '${t}'`:`'${e}' tag`}}};t.BitmarkPegParserValidator=g},4382:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FooterContentProcessor=void 0;const r=i(7735),o=i(385),n=i(6877),a=i(9681),s=i(777),l=i(4266),p=i(6128),c=new s.TextParser;const u=new class{process(e,t,i,s,u,y){const{textFormat:g}=e;let d;u=u.trimStart(),y=y.trimEnd();const T=!!u.trim(),f=!!y.trim();let m=0;if(T&&f&&(m=a.StringUtils.countOccurrencesAtEnd(u,"\n")+a.StringUtils.countOccurrencesAtStart(y,"\n")),u||y){const i=g===o.TextFormat.bitmarkText;u&&(u=l.BitmarkPegParserValidator.checkFooter(e,t,u));const a=i?c.toAst(u,{textFormat:g,textLocation:n.TextLocation.body}):r.Breakscape.unbreakscape(u,{textFormat:o.TextFormat.plainText,textLocation:n.TextLocation.body}),s=r.Breakscape.unbreakscape(y,{textFormat:o.TextFormat.plainText,textLocation:n.TextLocation.body});d=p.ContentProcessorUtils.concatenatePlainTextWithAstTexts(a,m,s)}return d?{footer:d}:void 0}};t.FooterContentProcessor=u},4402:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.defaultTagContentProcessor=function(e,t,i,p,c){const{type:u,value:y}=p,{textFormat:g}=e,d=new s.TextParser,T=a.StringUtils.trimmedString(y);switch(u){case l.TypeKey.Instruction:c.instruction=d.toAst(T,{textFormat:g,textLocation:n.TextLocation.tag}),c.__instructionString=r.Breakscape.unbreakscape(T,{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag});break;case l.TypeKey.Hint:c.hint=d.toAst(T,{textFormat:g,textLocation:n.TextLocation.tag}),c.__hintString=r.Breakscape.unbreakscape(T,{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag});break;case l.TypeKey.Anchor:c.anchor=r.Breakscape.unbreakscape(T,{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag});break;case l.TypeKey.Reference:c.reference=r.Breakscape.unbreakscape(T,{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag});break;case l.TypeKey.SampleSolution:c.sampleSolution=r.Breakscape.unbreakscape(T,{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag}),c.__sampleSolutionAst=d.toAst(T,{textFormat:g,textLocation:n.TextLocation.tag}),e.addWarning("[$...] tag is deprecated, use [@sampleSolution:...] instead",p)}};const r=i(7735),o=i(385),n=i(6877),a=i(9681),s=i(777),l=i(3029)},4410:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BodyBitType=void 0;const r=(0,i(4718).superenum)({text:"text",gap:"gap",mark:"mark",select:"select",highlight:"highlight"});t.BodyBitType=r},4445:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigHydrator=void 0;const r=i(5814),o=i(9371),n=i(9788),a=i(1519),s=i(9600),l=i(5591),p=i(7112),c=i(9888),u=i(5051),y=i(7797),g=i(5512),d=i(5554),T=i(5837),f=i(9916),m=i(168),h=i(9248);const b=new class{hydrateTagsConfig(e){var t;const i={tags:{}};for(const r of e){let e;switch(r.type){case g.BitTagType.tag:e=this.hydrateTagConfig(r);break;case g.BitTagType.property:e=this.hydratePropertyTagConfig(r);break;case g.BitTagType.resource:e=this.hydrateResourceTagConfig(r);break;case g.BitTagType.group:e=this.hydrateTagGroupConfig(r)}e&&(i.tags=Object.assign(Object.assign({},i.tags),e.tags),i.info=Object.assign(null!==(t=i.info)&&void 0!==t?t:{},e.info))}return i}hydrateCardSetConfig(e){if(!e)return;const t=d.CARDS[e];if(!t)throw new Error(`No config found for card set config key '${e}'`);const i=[];for(const e of t.variants){const t=[];for(const i of e){const e=this.hydrateCardVariantConfig(i);t.push(e)}i.push(t)}return new r.CardSetConfig(e,i)}hydrateTagConfig(e){const{configKey:t,maxCount:i,minCount:r,chain:o}=e,a=y.TagConfigKey.fromKey(t)||l.ConfigKey._unknown,s=h.TAGS[a];if(!s)throw new Error(`No config found for tag config key '${t}'`);const{tag:p,deprecated:c}=s;let u;o&&(u=this.hydrateTagsConfig(o).tags);const g=new n.MarkupTagConfig(a,p,null!=i?i:1,null!=r?r:0,u,c);return{tags:{[a]:g}}}hydratePropertyTagConfig(e){const{configKey:t,maxCount:i,minCount:r,chain:o}=e,n=c.PropertyConfigKey.fromKey(t)||l.ConfigKey._unknown,s=f.PROPERTIES[n];if(!s)throw new Error(`No config found for property config key '${t}'`);const{tag:p,deprecated:u,single:y,format:g,defaultValue:d,jsonKey:T,astKey:m}=s;let h;o&&(h=this.hydrateTagsConfig(o).tags);const b=new a.PropertyTagConfig(n,p,null!=i?i:1,null!=r?r:0,h,T,m,y,g,d,u);return{tags:{[n]:b}}}hydrateResourceTagConfig(e){const{configKey:t,maxCount:i,minCount:r,chain:o}=e,n=u.ResourceConfigKey.fromKey(t)||l.ConfigKey._unknown,a=m.RESOURCES[n];if(!a)throw new Error(`No config found for resource config key '${t}'`);const{tag:p,deprecated:c,jsonKey:y}=a;let g;o&&(g=this.hydrateTagsConfig(o).tags);const d=new s.ResourceTagConfig(n,p,null!=i?i:1,null!=r?r:0,g,y,c);return{tags:{[n]:d}}}hydrateTagGroupConfig(e){var t,i;const{configKey:r}=e,o=p.GroupConfigKey.fromKey(r)||l.ConfigKey._unknown,n=T.GROUPS[o];if(!n)throw new Error(`No config found for group config key '${r}'`);const{tags:a}=n,s=this.hydrateTagsConfig(a).tags,c=Object.values(s);if(c.length>0){const r=c[0],o=r;o.maxCount=null!==(t=e.maxCount)&&void 0!==t?t:r.maxCount,o.minCount=null!==(i=e.minCount)&&void 0!==i?i:r.minCount}return{tags:s,info:{comboResourceType:n.comboResourceType}}}hydrateCardVariantConfig(e){const{tags:t,bodyAllowed:i,bodyRequired:r,repeatCount:n}=e,a=this.hydrateTagsConfig(t);return new o.CardVariantConfig(a.tags,i,r,n)}};t.ConfigHydrator=b},4470:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseBuilder=void 0;const r=i(7735),o=i(2028),n=i(431),a=i(9727),s=i(6877),l=i(777),p=i(6989),c=i(4078),u=i(8025),y=i(9681);t.BaseBuilder=class{constructor(){this.textParser=new l.TextParser,this.textGenerator=new n.TextGenerator}toExample(e,t,i){if(null!=t){let e;return e=c.BooleanUtils.isBoolean(i)?c.BooleanUtils.toBoolean(t):t,{isExample:!0,example:e,__defaultExample:null!=i?i:null}}return e?{isExample:!0,example:null!=i?i:null,__defaultExample:null!=i?i:null}:{isExample:!1,example:null,__defaultExample:null!=i?i:null}}toAstProperty(e,t){if(null==t)return;const i=o.Config.getRawPropertiesConfig()[e],r=e=>{if(null!=e){switch(i.format){case a.PropertyFormat.plainText:return null!=u.NumberUtils.asNumber(e)&&(e=`${e}`),y.StringUtils.isString(e)?y.StringUtils.trimmedString(e):void 0;case a.PropertyFormat.number:return u.NumberUtils.asNumber(e);case a.PropertyFormat.boolean:return c.BooleanUtils.toBoolean(e,!0);case a.PropertyFormat.invertedBoolean:return!c.BooleanUtils.toBoolean(e,!0)}return e}};if(Array.isArray(t)){const e=t;for(let t=0,i=e.length;t<i;t++)e[t]=r(e[t])}else t=r(t);return p.ArrayUtils.asArray(t)}getEmptyTextAst(e){return this.handleJsonText(e,s.TextLocation.tag," ")}handleJsonText(e,t,i){let o;const{textFormat:n}=e;if(null==i)o=[];else if(this.textParser.isAst(i))o=i;else{if(Array.isArray(i)){const e=[];for(let o=0,a=i.length;o<a;o++){const a=i[o];this.textParser.isAst(a)?e[o]=a:y.StringUtils.isString(a)?(e[o]=this.textParser.toAst(r.Breakscape.breakscape(a,{textFormat:n,textLocation:t}),{textFormat:n,textLocation:t}),e[o].__tag="text"):e[o]=[]}return e}o=y.StringUtils.isString(i)?this.textParser.toAst(r.Breakscape.breakscape(i,{textFormat:n,textLocation:t,v2:!0}),{textFormat:n,textLocation:t}):[]}return o.__tag="text",o}}},4475:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.technicalTermChainContentProcessor=function(e,t,i,l,p){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("technicalTerm content",l);const c=e.bitContentProcessor(s.BitContentLevel.Chain,i,l.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("technicalTerm TAGS",c);const{lang:u}=c,y={technicalTerm:r.Breakscape.unbreakscape(a.StringUtils.trimmedString(l.value),{textFormat:o.TextFormat.bitmarkText,textLocation:n.TextLocation.tag}),lang:u};p.technicalTerm=y};const r=i(7735),o=i(385),n=i(6877),a=i(9681),s=i(3029)},4564:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValidator=void 0;const r=i(6149),o=i(9681);const n=new class{validateBit(e){if(!e)return e;return e}validateCardBit(e){if(!e)return e;return e}validateResource(e){if(!e)return;let t=e,i=!1;switch(e.type){case r.ResourceTag.image:i=!!e.image.src;break;case r.ResourceTag.imageLink:i=!!e.imageLink.url;break;case r.ResourceTag.audio:i=!!e.audio.src;break;case r.ResourceTag.audioEmbed:i=!!e.audioEmbed.src;break;case r.ResourceTag.audioLink:i=!!e.audioLink.url;break;case r.ResourceTag.video:i=!!e.video.src;break;case r.ResourceTag.videoEmbed:i=!!e.videoEmbed.url;break;case r.ResourceTag.videoLink:i=!!e.videoLink.url;break;case r.ResourceTag.stillImageFilm:i=!!e.image.src&&!!e.audio.src;break;case r.ResourceTag.stillImageFilmEmbed:i=!!e.stillImageFilmEmbed.url;break;case r.ResourceTag.stillImageFilmLink:i=!!e.stillImageFilmLink.url;break;case r.ResourceTag.article:i=!!e.article.body;break;case r.ResourceTag.document:i=!!e.document.url;break;case r.ResourceTag.documentEmbed:i=!!e.documentEmbed.url;break;case r.ResourceTag.documentLink:i=!!e.documentLink.url;break;case r.ResourceTag.documentDownload:i=!!e.documentDownload.url;break;case r.ResourceTag.appLink:i=!!e.appLink.url;break;case r.ResourceTag.websiteLink:i=!!e.websiteLink.url;break;default:i=!1}return i||e.type&&(t={type:e.type}),t}isRequired(e,t){if(!e)throw new Error(`${t} is required but is not set`)}isOneOfRequired(e,t){if(Array.isArray(e))for(const t of e)if(t)return;throw new Error(`One of '${t.join(", ")}' is required but none is set`)}isString(e,t){if(!o.StringUtils.isString(e))throw new Error(`${t} is required to be a string`)}isNonEmptyString(e,t){if(!o.StringUtils.isString(e)||""===e)throw new Error(`${t} is required to be a non-empty string`)}isStringOrBoolean(e,t){if(!o.StringUtils.isString(e)&&!0!==e&&!1!==e)throw new Error(`${t} is required to be a string or a boolean`)}isNonEmptyStringOrBoolean(e,t){if((!o.StringUtils.isString(e)||""===e)&&!0!==e&&!1!==e)throw new Error(`${t} is required to be a non-empty string or a boolean`)}isArray(e,t){if(!Array.isArray(e))throw new Error(`${t} is required to be a array`)}isNonEmptyArray(e,t){if(!(Array.isArray(e)&&e.length>0))throw new Error(`${t} is required to be a non-empty array`)}isNumber(e,t){if(!Number.isFinite(e))throw new Error(`${t} is required to be a number`)}isBoolean(e,t){if(!0!==e&&!1!==e)throw new Error(`${t} is required to be a boolean`)}isStringOrNumberOrBooleanOrNullOrUndefined(e,t){if(!o.StringUtils.isString(e)&&!Number.isFinite(e)&&!0!==e&&!1!==e&&null!=e)throw new Error(`${t} is required to be a string or a number or a boolean or null or undefined`)}};t.NodeValidator=n},4718:(e,t,i)=>{function r(e,t){var i;const r=Object.freeze,o=Object.defineProperty,n=Object.assign,a={enumerable:!1},s=new Map,l=new Map,p=new Map,c=new Map,u=new Map,y=(null!==(i=null==t?void 0:t.iterationKeys)&&void 0!==i?i:Object.keys(e)).map((e=>`${e}`));for(const[t,i]of Object.entries(e))s.set(t,i),p.set(t.toLowerCase(),i);for(const[e,t]of s){const i="string"==typeof t?t.toLowerCase():t;l.set(t,e),c.set(i,e)}const g=y.map((e=>s.get(e))),d=y.map((e=>[e,s.get(e)]));return(t=>{let i=e;function T(e,t){return(null==t?void 0:t.ignoreCase)&&"string"==typeof e?s.get(c.get(e.toLowerCase())):l.has(e)?e:void 0}Object.isExtensible(e)||(i=n({},e)),o(i,"fromKey",n({value:function(e,t){return(null==t?void 0:t.ignoreCase)&&"string"==typeof e?p.get(e.toLowerCase()):s.get(`${e}`)}},a)),o(i,"fromValue",n({value:T},a)),o(i,"keyFromValue",n({value:function(e,t){return(null==t?void 0:t.ignoreCase)&&"string"==typeof e?c.get(e.toLowerCase()):l.get(e)}},a)),o(i,"setMetadata",n({value:function(e,t,i){const r=T(e);null!=r&&u.set(r,t)}},a)),o(i,"getMetadata",n({value:function(e,t){return u.get(e)}},a)),o(i,Symbol.iterator,n({value:function(){let e=0;return{next:()=>e<y.length?{value:s.get(`${y[e++]}`),done:!1}:{done:!0}}}},a)),o(i,"values",n({value:()=>g},a)),o(i,"keys",n({value:()=>y},a)),o(i,"entries",n({value:()=>d},a));let f=i;return(null==t?void 0:t.noFreeze)||(f=r(i),r(y),r(g),r(d)),f})(t)}i.r(t),i.d(t,{superenum:()=>o});const o=r;o.fromObject=r,o.fromArray=function(e,t){Array.isArray(e)||(e=[]);const i=e.reduce(((e,t)=>(e[`${t}`]=t,e)),{});return(!t||t&&!t.iterationKeys)&&((t=Object.assign({},t)).iterationKeys=e),r(i,t)}},4953:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.servingsChainContentProcessor=function(e,t,i,n,a){var s;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("servings content",n);const l=e.bitContentProcessor(o.BitContentLevel.Chain,i,n.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("servings TAGS",l);const{unit:p,unitAbbr:c,decimalPlaces:u,disableCalculation:y,__hintString:g}=l,d={servings:null!==(s=r.NumberUtils.asNumber(n.value))&&void 0!==s?s:1,unit:p,unitAbbr:c,decimalPlaces:null!=u?u:1,disableCalculation:y,hint:g};a.servings=d};const r=i(8025),o=i(3029)},5005:(e,t,i)=>{const{VOID:r,PRIMITIVE:o,ARRAY:n,OBJECT:a,DATE:s,REGEXP:l,MAP:p,SET:c,ERROR:u,BIGINT:y}=i(1731),g="object"==typeof self?self:globalThis;t.deserialize=e=>((e,t)=>{const i=(t,i)=>(e.set(i,t),t),d=T=>{if(e.has(T))return e.get(T);const[f,m]=t[T];switch(f){case o:case r:return i(m,T);case n:{const e=i([],T);for(const t of m)e.push(d(t));return e}case a:{const e=i({},T);for(const[t,i]of m)e[d(t)]=d(i);return e}case s:return i(new Date(m),T);case l:{const{source:e,flags:t}=m;return i(new RegExp(e,t),T)}case p:{const e=i(new Map,T);for(const[t,i]of m)e.set(d(t),d(i));return e}case c:{const e=i(new Set,T);for(const t of m)e.add(d(t));return e}case u:{const{name:e,message:t}=m;return i(new g[e](t),T)}case y:return i(BigInt(m),T);case"BigInt":return i(Object(BigInt(m)),T);case"ArrayBuffer":return i(new Uint8Array(m).buffer,m);case"DataView":{const{buffer:e}=new Uint8Array(m);return i(new DataView(e),m)}}return i(new g[f](m),T)};return d})(new Map,e)(0)},5033:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BodyContentProcessor=void 0;const r=i(7735),o=i(4410),n=i(385),a=i(6877),s=i(9681),l=i(777),p=i(4266),c=i(6128),u=new l.TextParser;const y=new class{process(e,t,i,l,y,g,d,T){const f=[];let m,h;const b=d.length>0?this.trimBodyParts(d):void 0,B=T?b:p.BitmarkPegParserValidator.checkBody(e,t,i,l,b);if(l===n.TextFormat.json&&B){m=B.reduce(((e,t)=>{var i;if(t.type===o.BodyBitType.text&&t.data){return e+(null!==(i=t.data.bodyText)&&void 0!==i?i:"")}return e}),"");try{m=JSON.parse(m)}catch(t){m=null,e.addError("Body JSON is invalid.")}}else{let e="",t="",i="",p=0;const y=e=>`[!${e}]`;if(B)for(let n=0;n<B.length;n++){const a=B[n];if(a.type===o.BodyBitType.text){const o=a,n=o.data.bodyText;o.data.isPlain?t=r.Breakscape.concatenate(t,n):e=r.Breakscape.concatenate(e,n),i=r.Breakscape.concatenate(i,n)}else{const t=y(p);e=r.Breakscape.concatenate(e,t),f.push(a),p++}}const g=l===n.TextFormat.bitmarkText?u.toAst(e,{textFormat:l,textLocation:a.TextLocation.body}):r.Breakscape.unbreakscape(e,{textFormat:n.TextFormat.plainText,textLocation:a.TextLocation.body}),d=r.Breakscape.unbreakscape(t,{textFormat:n.TextFormat.plainText,textLocation:a.TextLocation.body}),T=s.StringUtils.countOccurrencesAtEnd(e,"\n")+s.StringUtils.countOccurrencesAtStart(t,"\n");m=c.ContentProcessorUtils.concatenatePlainTextWithAstTexts(g,T,d),h=r.Breakscape.unbreakscape(i,{textFormat:l,textLocation:a.TextLocation.body}).trim();const b=Array.isArray(m)?m:void 0;if(b&&B){p=0;for(let e=0;e<B.length;e++){const t=B[e];if(t.type===o.BodyBitType.text)continue;const i=t;let r;switch(t.type){case o.BodyBitType.gap:case o.BodyBitType.mark:case o.BodyBitType.select:case o.BodyBitType.highlight:r=i}r&&this.replacePlaceholderWithBodyBit(b,r,p),p++}}}return{body:m,bodyBits:f.length>0?f:void 0,bodyString:h}}buildBodyText(e,t){return{type:o.BodyBitType.text,data:{bodyText:e,isPlain:t}}}replacePlaceholderWithBodyBit(e,t,i){const r=(e,o,n)=>{if(Array.isArray(e))for(let t=0;t<e.length;t++){const i=e[t];if(r(i,e,t))return!0}else{if("bit"===e.type&&e.index===i)return o[n]=t,!0;if(e.content){if(r(e.content,e,"content"))return!0}}return!1};r(e,null,null)}trimBodyParts(e){let t=!1,i=e.reduce(((e,i)=>{const r=i;if(t||r.type!==o.BodyBitType.text)t=!0,e.push(i);else{const i=r.data.bodyText.trimStart();i&&(t=!0,r.data.bodyText=i,e.push(r))}return e}),[]);return t=!1,i=i.reduceRight(((e,i)=>{const r=i;if(t||r.type!==o.BodyBitType.text)t=!0,e.unshift(i);else{const i=r.data.bodyText.trimEnd();i&&(t=!0,r.data.bodyText=i,e.unshift(r))}return e}),[]),i}};t.BodyContentProcessor=y},5051:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resourceConfigKeys=t.ResourceConfigKey=void 0;const r=i(4718),o={image:"image",imagePortrait:"imagePortrait",imageLandscape:"imageLandscape",imageEmbed:"imageEmbed",imageLink:"imageLink",audio:"audio",audioEmbed:"audioEmbed",audioLink:"audioLink",video:"video",videoEmbed:"videoEmbed",videoLink:"videoLink",stillImageFilmEmbed:"stillImageFilmEmbed",stillImageFilmLink:"stillImageFilmLink",article:"article",articleEmbed:"articleEmbed",articleLink:"articleLink",document:"document",documentEmbed:"documentEmbed",documentLink:"documentLink",documentDownload:"documentDownload",appLink:"appLink",websiteLink:"websiteLink",icon:"icon",backgroundWallpaper:"backgroundWallpaper",imagePlaceholder:"imagePlaceholder"};t.resourceConfigKeys=o;const n=(0,r.superenum)(o);t.ResourceConfigKey=n},5057:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StartRules=void 0,t.SyntaxError=a,t.parse=function e(t,i){i=void 0!==i?i:{};var s,l={},p=i.grammarSource,c={bitmark:ni,bit:function(){var e,t,i,r,o;e=$t,t=[],i=Si();for(;i!==l;)t.push(i),i=Si();if((i=li())!==l){for(r=[],o=Si();o!==l;)r.push(o),o=Si();Wt=e,e=Xe(i)}else $t=e,e=l;return e},cardContent:function(){var e,t,i;e=$t,t=[],(i=yi())===l&&(i=Ci());for(;i!==l;)t.push(i),(i=yi())===l&&(i=Ci());return Wt=e,t=xt(t),e=t}},u=ni,y="[.",g="]",d="[",T=":",f="&",m="$$$$",h="====",b="text",B="~~~~",v="footer",C="--",x="++",P="===",k="==",K="[@id",w="#",_="[▼",A="[►",S="[@",L="[%",I="[!",F="[?",N="[+",O="[-",E="[$",R="[_",V="[=",j="[&",D="^]",G="id:",M=".",U="\n",J="\r\n",$=/^[^\]]/,W=/^[^:\]]/,z=/^[^&:\]]/,q=/^[ \t]/,H=/^[^\n\r\u2028\u2029]/,Y=/^[\r\u2028-\u2029]/,X=/^[ \t\n\r\u2028\u2029]/,Q=Qt("[.",!1),Z=Zt(["]"],!0,!1),ee=Qt("]",!1),te=Qt("[",!1),ie=Qt(":",!1),re=Qt("&",!1),oe={type:"any"},ne=Qt("$$$$",!1),ae=Qt("====",!1),se=Qt("text",!1),le=Qt("~~~~",!1),pe=Qt("footer",!1),ce=Qt("--",!1),ue=Qt("++",!1),ye=Qt("===",!1),ge=Qt("==",!1),de=Qt("[@id",!1),Te=Qt("#",!1),fe=Qt("[▼",!1),me=Qt("[►",!1),he=Qt("[@",!1),be=Qt("[%",!1),Be=Qt("[!",!1),ve=Qt("[?",!1),Ce=Qt("[+",!1),xe=Qt("[-",!1),Pe=Qt("[$",!1),ke=Qt("[_",!1),Ke=Qt("[=",!1),we=Qt("[&",!1),_e=Qt("^]",!1),Ae=Qt("id:",!1),Se=Zt([":","]"],!0,!1),Le=Qt(".",!1),Ie=Zt(["&",":","]"],!0,!1),Fe=(ei("Empty"),Zt([" ","\t"],!1,!1)),Ne=ei("Anything"),Oe=ei("Character"),Ee=Zt(["\n","\r","\u2028","\u2029"],!0,!1),Re=ei("Line"),Ve=(ei("whitespace in line"),ei("Blank Line")),je=ei("Line Terminator"),De=Qt("\n",!1),Ge=Qt("\r\n",!1),Me=Zt(["\r",["\u2028","\u2029"]],!1,!1),Ue=ei("Whitespace, then Line Terminator"),Je=ei("whitespace"),$e=Zt([" ","\t","\n","\r","\u2028","\u2029"],!1,!1),We=function(e,t){return Vi.buildBits([e,...t])},ze=function(e){return Ri.handleRawBit(e)},qe=function(e){return e},He=function(e){return Ri.handleRawBit(e)},Ye=function(e){return e},Xe=function(e){return e},Qe=function(e,t){return Vi.buildBit(e,t)},Ze=function(e){return Vi.invalidBit(e)},et=function(e,t,i){return Vi.buildBitHeader(t,e,i)},tt=function(e,t){return Vi.buildTextAndResourceType(e,t)},it=function(e){return Ri.handleTextFormat(e)},rt=function(e){return Ri.handleResourceType(e)},ot=function(e){return Ri.handleBitContent(e)},nt=function(e){return Ri.handleTagChain(e)},at=function(e){return e},st=function(e){return Ri.handleBitTag(e)},lt=function(e){return{type:r.TypeKey.BodyChar,value:e}},pt=function(e){return Ri.handlePlainTextDivider(e)},ct=function(e){return Ri.handleFooterDivider(e)},ut=function(e){return Ri.handleCardSet(e[1].flat())},yt=function(){Ri.handleCardSetStart()},gt=function(){Ri.handleCardSetEnd()},dt=function(e){return Ri.handleCards(e)},Tt=function(e){return Ri.handleCardLineOrDivider(e,2)},ft=function(e){return Ri.handleCardLine(e)},mt=function(e){return Ri.handleCardSet(e[1].flat())},ht=function(){Ri.handleCardSetStart()},bt=function(){Ri.handleCardSetEnd()},Bt=function(e){return Ri.handleCards(e)},vt=function(e){return Ri.handleCardLineOrDivider(e,1)},Ct=function(e){return Ri.handleCardLine(e)},xt=function(e){return Ri.handleCardContent(e)},Pt=function(e){return{type:r.TypeKey.CardChar,value:e}},kt=function(e){return Ri.handlePropertyTag("id",e)},Kt=function(e,t){return Ri.handleTag(r.TypeKey.Title,{level:e,title:t})},wt=function(e){return Ri.handleTag(r.TypeKey.Anchor,e)},_t=function(e){return Ri.handleTag(r.TypeKey.Reference,e)},At=function(e,t){return Ri.handlePropertyTag(e,t)},St=function(e){return Ri.handleTag(r.TypeKey.ItemLead,e)},Lt=function(e){return Ri.handleTag(r.TypeKey.Instruction,e)},It=function(e){return Ri.handleTag(r.TypeKey.Hint,e)},Ft=function(e){return Ri.handleTag(r.TypeKey.True,e)},Nt=function(e){return Ri.handleTag(r.TypeKey.False,e)},Ot=function(e){return Ri.handleTag(r.TypeKey.SampleSolution,e)},Et=function(e){return Ri.handleTag(r.TypeKey.Gap,e)},Rt=function(e){return Ri.handleTag(r.TypeKey.Mark,e)},Vt=function(e,t){return Ri.handleResourceTag(e,t)},jt=function(e){return e},Dt=function(e){return e?e.trim():""},Gt=function(e){return e.length},Mt=function(e){return e?e.trim():null},Ut=function(e){return e?e.trim():""},Jt=function(){return!0},$t=0|i.peg$currPos,Wt=$t,zt=[{line:1,column:1}],qt=$t,Ht=i.peg$maxFailExpected||[],Yt=0|i.peg$silentFails;if(i.startRule){if(!(i.startRule in c))throw new Error("Can't start parsing from rule \""+i.startRule+'".');u=c[i.startRule]}function Xt(){return t.substring(Wt,$t)}function Qt(e,t){return{type:"literal",text:e,ignoreCase:t}}function Zt(e,t,i){return{type:"class",parts:e,inverted:t,ignoreCase:i}}function ei(e){return{type:"other",description:e}}function ti(e){var i,r=zt[e];if(r)return r;if(e>=zt.length)i=zt.length-1;else for(i=e;!zt[--i];);for(r={line:(r=zt[i]).line,column:r.column};i<e;)10===t.charCodeAt(i)?(r.line++,r.column=1):r.column++,i++;return zt[e]=r,r}function ii(e,t,i){var r=ti(e),o=ti(t),n={source:p,start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:o.line,column:o.column}};return i&&p&&"function"==typeof p.offset&&(n.start=p.offset(n.start),n.end=p.offset(n.end)),n}function ri(e){$t<qt||($t>qt&&(qt=$t,Ht=[]),Ht.push(e))}function oi(e,t,i){return new a(a.buildMessage(e,t),e,t,i)}function ni(){return function(){var e,i,r,o;e=$t,i=[],r=Fi();for(;r!==l;)i.push(r),r=Fi();return r=function(){var e,i,r,o;e=$t,i=$t,r=[],o=si();for(;o!==l;)r.push(o),o=si();return i=t.substring(i,$t),Wt=e,i=ze(i),e=i,e}(),o=function(){var e,t;e=[],t=ai();for(;t!==l;)e.push(t),t=ai();return e}(),Wt=e,e=We(r,o),e}()}function ai(){var e,i,r,o;for(e=$t,i=[],r=Si();r!==l;)i.push(r),r=Si();return(r=Li())===l&&(r=null),o=function(){var e,i,r,o,n,a;if(e=$t,i=$t,r=$t,o=function(){var e,i,r,o;e=$t,t.substr($t,2)===y?(i=y,$t+=2):(i=l,0===Yt&&ri(Q));if(i!==l){for(r=[],o=t.charAt($t),$.test(o)?$t++:(o=l,0===Yt&&ri(Z));o!==l;)r.push(o),o=t.charAt($t),$.test(o)?$t++:(o=l,0===Yt&&ri(Z));93===t.charCodeAt($t)?(o=g,$t++):(o=l,0===Yt&&ri(ee)),o!==l?(Wt=e,e=Ye(i)):($t=e,e=l)}else $t=e,e=l;return e}(),o!==l){for(n=[],a=si();a!==l;)n.push(a),a=si();r=o=[o,n]}else $t=r,r=l;i=r!==l?t.substring(i,$t):r;i!==l&&(Wt=e,i=He(i));return e=i,e}(),o!==l?(Wt=e,e=qe(o)):($t=e,e=l),e}function si(){var e,t,i,r;if(e=$t,(t=Li())!==l?(i=$t,Yt++,r=pi(),Yt--,r===l?i=void 0:($t=i,i=l),i!==l?e=t=[t,i]:($t=e,e=l)):($t=e,e=l),e===l)if(e=[],(t=_i())!==l)for(;t!==l;)e.push(t),t=_i();else e=l;return e}function li(){var e,i,r;return e=$t,(i=pi())!==l?(r=function(){var e,t,i;e=$t,t=[],i=fi(),i===l&&(i=hi())===l&&(i=Bi())===l&&(i=yi())===l&&(i=Ti());for(;i!==l;)t.push(i),(i=fi())===l&&(i=hi())===l&&(i=Bi())===l&&(i=yi())===l&&(i=Ti());return Wt=e,t=ot(t),e=t,e}(),Wt=e,e=Qe(i,r)):($t=e,e=l),e===l&&(e=$t,i=$t,r=function(){var e,i;Yt++,e=[],t.length>$t?(i=t.charAt($t),$t++):(i=l,0===Yt&&ri(oe));for(;i!==l;)e.push(i),t.length>$t?(i=t.charAt($t),$t++):(i=l,0===Yt&&ri(oe));Yt--,i=l,0===Yt&&ri(Ne);return e}(),i=t.substring(i,$t),Wt=e,e=i=Ze(i)),e}function pi(){var e,i,r,o,n,a;return e=$t,91===t.charCodeAt($t)?(i=d,$t++):(i=l,0===Yt&&ri(te)),i!==l?(r=function(){var e,i,r;e=$t,i=[],46===t.charCodeAt($t)?(r=M,$t++):(r=l,0===Yt&&ri(Le));if(r!==l)for(;r!==l;)i.push(r),46===t.charCodeAt($t)?(r=M,$t++):(r=l,0===Yt&&ri(Le));else i=l;i!==l&&(Wt=e,i=Gt(i));return e=i,e}(),r!==l?(o=Ki(),n=function(){var e,t,i;e=$t,t=ci(),t===l&&(t=ui());t===l&&(t=null);i=ci(),i===l&&(i=ui());i===l&&(i=null);return Wt=e,e=tt(t,i),e}(),93===t.charCodeAt($t)?(a=g,$t++):(a=l,0===Yt&&ri(ee)),a!==l?(Wt=e,e=et(r,o,n)):($t=e,e=l)):($t=e,e=l)):($t=e,e=l),e}function ci(){var e,i,r;return e=$t,58===t.charCodeAt($t)?(i=T,$t++):(i=l,0===Yt&&ri(ie)),i!==l?(r=Ki(),Wt=e,e=it(r)):($t=e,e=l),e}function ui(){var e,i,r;return e=$t,38===t.charCodeAt($t)?(i=f,$t++):(i=l,0===Yt&&ri(re)),i!==l?(r=Ki(),Wt=e,e=rt(r)):($t=e,e=l),e}function yi(){var e,t,i,r,o;if(e=$t,t=$t,(i=di())!==l){for(r=[],o=gi();o!==l;)r.push(o),o=gi();t=i=[i,r]}else $t=t,t=l;return t!==l&&(Wt=e,t=nt(t)),e=t}function gi(){var e,t;return e=$t,(t=di())!==l&&(Wt=e,t=at(t)),e=t}function di(){var e,i;return e=$t,i=function(){var e,i,r,o;e=$t,t.substr($t,4)===K?(i=K,$t+=4):(i=l,0===Yt&&ri(de));i!==l&&(r=wi())!==l?(o=function(){var e;93===t.charCodeAt($t)?(e=g,$t++):(e=l,0===Yt&&ri(ee));return e}(),o!==l?(Wt=e,e=kt(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r,o;e=$t,t.substr($t,2)===S?(i=S,$t+=2):(i=l,0===Yt&&ri(he));i!==l&&(r=Pi())!==l&&(o=wi())!==l&&ki()!==l?(Wt=e,e=At(r,o)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r,o;e=$t,91===t.charCodeAt($t)?(i=d,$t++):(i=l,0===Yt&&ri(te));if(i!==l){if(r=[],35===t.charCodeAt($t)?(o=w,$t++):(o=l,0===Yt&&ri(Te)),o!==l)for(;o!==l;)r.push(o),35===t.charCodeAt($t)?(o=w,$t++):(o=l,0===Yt&&ri(Te));else r=l;r!==l?(o=xi(),ki()!==l?(Wt=e,e=Kt(r,o)):($t=e,e=l)):($t=e,e=l)}else $t=e,e=l;return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===_?(i=_,$t+=2):(i=l,0===Yt&&ri(fe));i!==l?(r=xi(),ki()!==l?(Wt=e,e=wt(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===A?(i=A,$t+=2):(i=l,0===Yt&&ri(me));i!==l?(r=xi(),ki()!==l?(Wt=e,e=_t(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===L?(i=L,$t+=2):(i=l,0===Yt&&ri(be));i!==l?(r=xi(),ki()!==l?(Wt=e,e=St(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===I?(i=I,$t+=2):(i=l,0===Yt&&ri(Be));i!==l?(r=xi(),ki()!==l?(Wt=e,e=Lt(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===F?(i=F,$t+=2):(i=l,0===Yt&&ri(ve));i!==l?(r=xi(),ki()!==l?(Wt=e,e=It(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===R?(i=R,$t+=2):(i=l,0===Yt&&ri(ke));i!==l?(r=xi(),ki()!==l?(Wt=e,e=Et(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===V?(i=V,$t+=2):(i=l,0===Yt&&ri(Ke));i!==l?(r=xi(),ki()!==l?(Wt=e,e=Rt(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===E?(i=E,$t+=2):(i=l,0===Yt&&ri(Pe));i!==l?(r=xi(),ki()!==l?(Wt=e,e=Ot(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===N?(i=N,$t+=2):(i=l,0===Yt&&ri(Ce));i!==l?(r=xi(),ki()!==l?(Wt=e,e=Ft(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r;e=$t,t.substr($t,2)===O?(i=O,$t+=2):(i=l,0===Yt&&ri(xe));i!==l?(r=xi(),ki()!==l?(Wt=e,e=Nt(r)):($t=e,e=l)):($t=e,e=l);return e}(),i===l&&(i=function(){var e,i,r,o;e=$t,t.substr($t,2)===j?(i=j,$t+=2):(i=l,0===Yt&&ri(we));i!==l&&(r=Pi())!==l&&(o=wi())!==l&&ki()!==l?(Wt=e,e=Vt(r,o)):($t=e,e=l);return e}()))))))))))))),i!==l&&(Wt=e,i=st(i)),e=i}function Ti(){var e,i;return e=$t,t.length>$t?(i=t.charAt($t),$t++):(i=l,0===Yt&&ri(oe)),i!==l&&(Wt=e,i=lt(i)),e=i}function fi(){var e;return(e=function(){var e,t,i,r,o;e=$t,t=$t,(i=Li())!==l&&(r=mi())!==l&&(o=Ii())!==l?t=i=[i,r,o]:($t=t,t=l);t!==l&&(Wt=e,t=ct(t));return e=t,e}())===l&&(e=function(){var e,i,r,o,n;e=$t,i=$t,(r=Li())!==l?(o=function(){var e,i,r,o,n,a;t.substr($t,4)===m?(e=m,$t+=4):(e=l,0===Yt&&ri(ne));if(e===l)if(e=$t,t.substr($t,4)===h?(i=h,$t+=4):(i=l,0===Yt&&ri(ae)),i!==l){if(r=[],(o=Fi())!==l)for(;o!==l;)r.push(o),o=Fi();else r=l;if(r!==l)if(t.substr($t,4)===b?(o=b,$t+=4):(o=l,0===Yt&&ri(se)),o!==l){if(n=[],(a=Fi())!==l)for(;a!==l;)n.push(a),a=Fi();else n=l;n!==l?(t.substr($t,4)===h?(a=h,$t+=4):(a=l,0===Yt&&ri(ae)),a!==l?e=i=[i,r,o,n,a]:($t=e,e=l)):($t=e,e=l)}else $t=e,e=l;else $t=e,e=l}else $t=e,e=l;return e}(),o!==l&&(n=Ii())!==l?i=r=[r,o,n]:($t=i,i=l)):($t=i,i=l);i!==l&&(Wt=e,i=pt(i));return e=i,e}()),e}function mi(){var e,i,r,o,n,a;if(t.substr($t,4)===B?(e=B,$t+=4):(e=l,0===Yt&&ri(le)),e===l)if(e=$t,t.substr($t,4)===h?(i=h,$t+=4):(i=l,0===Yt&&ri(ae)),i!==l){if(r=[],(o=Fi())!==l)for(;o!==l;)r.push(o),o=Fi();else r=l;if(r!==l)if(t.substr($t,6)===v?(o=v,$t+=6):(o=l,0===Yt&&ri(pe)),o!==l){if(n=[],(a=Fi())!==l)for(;a!==l;)n.push(a),a=Fi();else n=l;n!==l?(t.substr($t,4)===h?(a=h,$t+=4):(a=l,0===Yt&&ri(ae)),a!==l?e=i=[i,r,o,n,a]:($t=e,e=l)):($t=e,e=l)}else $t=e,e=l;else $t=e,e=l}else $t=e,e=l;return e}function hi(){var e,i,r,o,n;if(e=$t,i=$t,r=function(){var e,i,r,o,n,a;e=$t,i=Li(),i!==l?(r=$t,Yt++,o=$t,t.substr($t,4)===h?(n=h,$t+=4):(n=l,0===Yt&&ri(ae)),n!==l&&(a=Ii())!==l?o=n=[n,a]:($t=o,o=l),Yt--,o!==l?($t=r,r=void 0):r=l,r!==l?(Wt=e,e=yt()):($t=e,e=l)):($t=e,e=l);return e}(),r!==l){for(o=[],n=bi();n!==l;)o.push(n),n=bi();n=function(){var e,t,i,r,o;e=$t,t=$t,i=mi(),i===l&&(i=null);r=$t,Yt++,o=Oi(),Yt--,o!==l?($t=r,r=void 0):r=l;r!==l?t=i=[i,r]:($t=t,t=l);t!==l&&(Wt=e,t=gt());return e=t,e}(),n!==l?i=r=[r,o,n]:($t=i,i=l)}else $t=i,i=l;return i!==l&&(Wt=e,i=ut(i)),e=i}function bi(){var e,i;return e=$t,i=function(){var e,i,r,o;e=$t,i=$t,t.substr($t,4)===h?(r=h,$t+=4):(r=l,0===Yt&&ri(ae));r!==l?((o=Ii())===l&&(o=Oi()),o!==l?i=r=[r,o]:($t=i,i=l)):($t=i,i=l);i===l&&(i=$t,t.substr($t,2)===C?(r=C,$t+=2):(r=l,0===Yt&&ri(ce)),r!==l?((o=Ii())===l&&(o=Oi()),o!==l?i=r=[r,o]:($t=i,i=l)):($t=i,i=l),i===l&&(i=$t,t.substr($t,2)===x?(r=x,$t+=2):(r=l,0===Yt&&ri(ue)),r!==l?((o=Ii())===l&&(o=Oi()),o!==l?i=r=[r,o]:($t=i,i=l)):($t=i,i=l),i===l&&(i=function(){var e,i,r,o,n,a;e=$t,i=$t,Yt++,r=$t,o=mi(),o!==l&&(n=Oi())!==l?r=o=[o,n]:($t=r,r=l);Yt--,r===l?i=void 0:($t=i,i=l);if(i!==l){if(r=$t,o=$t,n=Ai(),(a=Li())!==l?o=n=[n,a]:($t=o,o=l),o===l){if(o=$t,n=[],(a=_i())!==l)for(;a!==l;)n.push(a),a=_i();else n=l;n!==l&&(a=Ni())!==l?o=n=[n,a]:($t=o,o=l)}(r=o!==l?t.substring(r,$t):o)!==l?(Wt=e,e=ft(r)):($t=e,e=l)}else $t=e,e=l;return e}())));i!==l&&(Wt=e,i=Tt(i));return e=i,e}(),i!==l&&(Wt=e,i=dt(i)),e=i}function Bi(){var e,i,r,o,n;if(e=$t,i=$t,r=function(){var e,i,r,o,n,a;e=$t,i=Li(),i!==l?(r=$t,Yt++,o=$t,t.substr($t,3)===P?(n=P,$t+=3):(n=l,0===Yt&&ri(ye)),n!==l&&(a=Ii())!==l?o=n=[n,a]:($t=o,o=l),Yt--,o!==l?($t=r,r=void 0):r=l,r!==l?(Wt=e,e=ht()):($t=e,e=l)):($t=e,e=l);return e}(),r!==l){for(o=[],n=vi();n!==l;)o.push(n),n=vi();n=function(){var e,t,i,r,o;e=$t,t=$t,i=mi(),i===l&&(i=null);r=$t,Yt++,o=Oi(),Yt--,o!==l?($t=r,r=void 0):r=l;r!==l?t=i=[i,r]:($t=t,t=l);t!==l&&(Wt=e,t=bt());return e=t,e}(),n!==l?i=r=[r,o,n]:($t=i,i=l)}else $t=i,i=l;return i!==l&&(Wt=e,i=mt(i)),e=i}function vi(){var e,i;return e=$t,i=function(){var e,i,r,o;e=$t,i=$t,t.substr($t,3)===P?(r=P,$t+=3):(r=l,0===Yt&&ri(ye));r!==l?((o=Ii())===l&&(o=Oi()),o!==l?i=r=[r,o]:($t=i,i=l)):($t=i,i=l);i===l&&(i=$t,t.substr($t,2)===k?(r=k,$t+=2):(r=l,0===Yt&&ri(ge)),r!==l?((o=Ii())===l&&(o=Oi()),o!==l?i=r=[r,o]:($t=i,i=l)):($t=i,i=l),i===l&&(i=$t,t.substr($t,2)===C?(r=C,$t+=2):(r=l,0===Yt&&ri(ce)),r!==l?((o=Ii())===l&&(o=Oi()),o!==l?i=r=[r,o]:($t=i,i=l)):($t=i,i=l),i===l&&(i=function(){var e,i,r,o,n,a;e=$t,i=$t,Yt++,r=$t,o=mi(),o!==l&&(n=Oi())!==l?r=o=[o,n]:($t=r,r=l);Yt--,r===l?i=void 0:($t=i,i=l);if(i!==l){if(r=$t,o=$t,n=Ai(),(a=Li())!==l?o=n=[n,a]:($t=o,o=l),o===l){if(o=$t,n=[],(a=_i())!==l)for(;a!==l;)n.push(a),a=_i();else n=l;n!==l&&(a=Ni())!==l?o=n=[n,a]:($t=o,o=l)}(r=o!==l?t.substring(r,$t):o)!==l?(Wt=e,e=Ct(r)):($t=e,e=l)}else $t=e,e=l;return e}())));i!==l&&(Wt=e,i=vt(i));return e=i,e}(),i!==l&&(Wt=e,i=Bt(i)),e=i}function Ci(){var e,i;return e=$t,t.length>$t?(i=t.charAt($t),$t++):(i=l,0===Yt&&ri(oe)),i!==l&&(Wt=e,i=Pt(i)),e=i}function xi(){var e,i,r,o;for(e=$t,i=$t,r=[],t.substr($t,2)===D?(o=D,$t+=2):(o=l,0===Yt&&ri(_e)),o===l&&(o=t.charAt($t),$.test(o)?$t++:(o=l,0===Yt&&ri(Z)));o!==l;)r.push(o),t.substr($t,2)===D?(o=D,$t+=2):(o=l,0===Yt&&ri(_e)),o===l&&(o=t.charAt($t),$.test(o)?$t++:(o=l,0===Yt&&ri(Z)));return i=t.substring(i,$t),Wt=e,e=i=jt(i)}function Pi(){var e,i,r,o,n;if(e=$t,i=$t,Yt++,t.substr($t,3)===G?(r=G,$t+=3):(r=l,0===Yt&&ri(Ae)),Yt--,r===l?i=void 0:($t=i,i=l),i!==l){for(r=$t,o=[],n=t.charAt($t),W.test(n)?$t++:(n=l,0===Yt&&ri(Se));n!==l;)o.push(n),n=t.charAt($t),W.test(n)?$t++:(n=l,0===Yt&&ri(Se));r=t.substring(r,$t),Wt=e,e=Dt(r)}else $t=e,e=l;return e}function ki(){var e,i,r;if(93===t.charCodeAt($t)?(e=g,$t++):(e=l,0===Yt&&ri(ee)),e===l){for(e=$t,i=[],r=Fi();r!==l;)i.push(r),r=Fi();(r=Ei())!==l?e=i=[i,r]:($t=e,e=l)}return e}function Ki(){var e,i,r,o;for(e=$t,i=$t,r=[],o=t.charAt($t),z.test(o)?$t++:(o=l,0===Yt&&ri(Ie));o!==l;)r.push(o),o=t.charAt($t),z.test(o)?$t++:(o=l,0===Yt&&ri(Ie));return i=t.substring(i,$t),Wt=e,e=i=Mt(i)}function wi(){var e,i,r;return e=$t,58===t.charCodeAt($t)?(i=T,$t++):(i=l,0===Yt&&ri(ie)),i!==l?(r=xi(),Wt=e,e=Ut(r)):($t=e,e=l),e===l&&(i="",Wt=e=$t,e=i=Jt()),e}function _i(){var e;return Yt++,e=t.charAt($t),H.test(e)?$t++:(e=l,0===Yt&&ri(Ee)),Yt--,e===l&&(0===Yt&&ri(Oe)),e}function Ai(){var e,t;for(Yt++,e=[],t=_i();t!==l;)e.push(t),t=_i();return Yt--,t=l,0===Yt&&ri(Re),e}function Si(){var e,i,r;for(Yt++,e=$t,i=[],r=t.charAt($t),q.test(r)?$t++:(r=l,0===Yt&&ri(Fe));r!==l;)i.push(r),r=t.charAt($t),q.test(r)?$t++:(r=l,0===Yt&&ri(Fe));return(r=Li())!==l?e=i=[i,r]:($t=e,e=l),Yt--,e===l&&(i=l,0===Yt&&ri(Ve)),e}function Li(){var e;return Yt++,10===t.charCodeAt($t)?(e=U,$t++):(e=l,0===Yt&&ri(De)),e===l&&(t.substr($t,2)===J?(e=J,$t+=2):(e=l,0===Yt&&ri(Ge)),e===l&&(e=t.charAt($t),Y.test(e)?$t++:(e=l,0===Yt&&ri(Me)))),Yt--,e===l&&(0===Yt&&ri(je)),e}function Ii(){var e,i,r;for(Yt++,e=$t,i=[],r=t.charAt($t),q.test(r)?$t++:(r=l,0===Yt&&ri(Fe));r!==l;)i.push(r),r=t.charAt($t),q.test(r)?$t++:(r=l,0===Yt&&ri(Fe));return(r=Li())!==l?e=i=[i,r]:($t=e,e=l),Yt--,e===l&&(i=l,0===Yt&&ri(Ue)),e}function Fi(){var e;return Yt++,e=t.charAt($t),X.test(e)?$t++:(e=l,0===Yt&&ri($e)),Yt--,e===l&&(0===Yt&&ri(Je)),e}function Ni(){var e,i;return(e=Li())===l&&(e=$t,Yt++,t.length>$t?(i=t.charAt($t),$t++):(i=l,0===Yt&&ri(oe)),Yt--,i===l?e=void 0:($t=e,e=l)),e}function Oi(){var e,i;return(e=Ii())===l&&(e=$t,Yt++,t.length>$t?(i=t.charAt($t),$t++):(i=l,0===Yt&&ri(oe)),Yt--,i===l?e=void 0:($t=e,e=l)),e}function Ei(){var e,i;return e=$t,Yt++,t.length>$t?(i=t.charAt($t),$t++):(i=l,0===Yt&&ri(oe)),Yt--,i===l?e=void 0:($t=e,e=l),e}const Ri=new o.BitmarkPegParserHelper({parse:e,parserText:Xt,parserLocation:ji}),Vi=new n.BitmarkPegParserProcessor({parse:e,parserText:Xt,parserLocation:ji});function ji(){const e=ii(Wt,$t);return e?(delete e.source,e):e}function ii(e,t,i){var r=ti(e),o=ti(t),n={source:p,start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:o.line,column:o.column}};return p&&"function"==typeof p.offset&&(n.start=p.offset(n.start),n.end=p.offset(n.end)),n}if(s=u(),i.peg$library)return{peg$result:s,peg$currPos:$t,peg$FAILED:l,peg$maxFailExpected:Ht,peg$maxFailPos:qt};if(s!==l&&$t===t.length)return s;throw s!==l&&$t<t.length&&ri({type:"end"}),oi(Ht,qt<t.length?t.charAt(qt):null,qt<t.length?ii(qt,qt+1):ii(qt,qt))};const r=i(3029),o=i(3206),n=i(7124);i(7735);function a(e,t,i,r){var o=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(o,a.prototype),o.expected=t,o.found=i,o.location=r,o.name="SyntaxError",o}function s(e,t,i){return i=i||" ",e.length>t?e:(t-=e.length,e+(i+=i.repeat(t)).slice(0,t))}!function(e,t){function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i}(a,Error),a.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var i,r=null;for(i=0;i<e.length;i++)if(e[i].source===this.location.source){r=e[i].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,n=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,a=this.location.source+":"+n.line+":"+n.column;if(r){var l=this.location.end,p=s("",n.line.toString().length," "),c=r[o.line-1],u=(o.line===l.line?l.column:c.length+1)-o.column||1;t+="\n --\x3e "+a+"\n"+p+" |\n"+n.line+" | "+c+"\n"+p+" | "+s("",o.column-1," ")+s("",u,"^")}else t+="\n at "+a}return t},a.buildMessage=function(e,t){var i={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?n(e[0])+"-"+n(e[1]):n(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function r(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}function n(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}function a(e){return i[e.type](e)}return"Expected "+function(e){var t,i,r=e.map(a);if(r.sort(),r.length>0){for(t=1,i=1;t<r.length;t++)r[t-1]!==r[t]&&(r[i]=r[t],i++);r.length=i}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."};t.StartRules=["bitmark","bit","cardContent"]},5078:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;const r=i(5057).parse;t.parse=r},5087:function(e,t,i){var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(o,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function s(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkGenerator=void 0;const o=i(5126),n=i(6772),a=i(7735),s=i(2028),l=i(126),p=i(5854),c=i(3811),u=i(4410),y=i(1163),g=i(9727),d=i(166),T=i(6149),f=i(385),m=i(6877),h=i(4078),b=i(955),B=i(9681),v=i(4),C=i(431),x={debugGenerationInline:!1};class P extends v.AstWalkerGenerator{constructor(e,t){var i,r;super(),this.ast=new o.Ast,this.bitType=p.BitType._error,this.textFormat=f.TextFormat.bitmarkText,this.isBodyBitmarkText=!1,this.isCardAllowed=!1,this.firstBit=!0,this.hasCardSet=!1,this.hasFooter=!1,this.inTag=!0,this.inTag,this.enter=this.enter.bind(this),this.between=this.between.bind(this),this.exit=this.exit.bind(this),this.leaf=this.leaf.bind(this),this.write=this.write.bind(this),this.bodyBitCallback=this.bodyBitCallback.bind(this),this.bitmarkVersion=null!==(i=c.BitmarkVersion.fromValue(null==t?void 0:t.bitmarkVersion))&&void 0!==i?i:c.DEFAULT_BITMARK_VERSION,this.options=Object.assign(Object.assign({},x),null==t?void 0:t.bitmarkOptions),this.debugGenerationInline=null!==(r=this.options.debugGenerationInline)&&void 0!==r&&r,this.bitmarkVersion===c.BitmarkVersion.v2?void 0===this.options.cardSetVersion&&(this.options.cardSetVersion=y.CardSetVersion.v1):void 0===this.options.cardSetVersion&&(this.options.cardSetVersion=y.CardSetVersion.v2),this.prettifySpace=!0===this.options.prettifyJson?2:this.options.prettifyJson||void 0,this.spacesAroundValues=this.calcSpacesAroundValues(),this.spacesAroundValuesStr=" ".repeat(this.spacesAroundValues),this.textGenerator=new C.TextGenerator(this.bitmarkVersion,{writeCallback:this.write,bodyBitCallback:this.bodyBitCallback,debugGenerationInline:this.debugGenerationInline}),this.mainWriter=e,this.partWriter=new n.StringWriter,this.writer=this.mainWriter,this.generateResourceHandlers(),this.generatePropertyHandlers()}generate(e){return r(this,void 0,void 0,(function*(){this.resetState(),yield this.writer.open(),this.walkAndWrite(e),this.writeLine(),yield this.writer.close()}))}generateSync(e){this.resetState(),this.writer.openSync(),this.walkAndWrite(e),this.writer.closeSync()}resetState(){this.bitType=p.BitType._error,this.textFormat=f.TextFormat.bitmarkText,this.isBodyBitmarkText=!1,this.isCardAllowed=!1,this.firstBit=!0,this.hasCardSet=!1,this.hasFooter=!1,this.inTag=!0,this.printed=!1}walkAndWrite(e){this.ast.walk(e,l.NodeType.bitmarkAst,this,void 0),this.writeLine()}enter_bitsValue(e,t){var i;const r=e.value,o=s.Config.getBitConfig(r.bitType),n=s.Config.getBitResourcesConfig(r.bitType,r.resourceType);if(this.bitType=r.bitType,this.textFormat=null!==(i=r.textFormat)&&void 0!==i?i:o.textFormatDefault,this.isBodyBitmarkText=this.textFormat===f.TextFormat.bitmarkText,this.isCardAllowed=this.calculateIsCardAllowed(),this.hasCardSet=this.haveValidCardSet(r),this.hasFooter=this.haveValidFooter(r),this.firstBit||(this.writeNL(),this.writeNL(),this.writeNL()),this.writeOPD(r.bitLevel),r.isCommented&&this.writeString("|"),this.writeTagKey(r.bitType),r.textFormat){this.isWriteTextFormat(r.textFormat,o.textFormatDefault)&&(this.writeColon(),this.writeTagKey(r.textFormat))}let a;if(o.resourceAttachmentAllowed&&r.resources&&r.resources.length>0){const e=n.comboResourceTagTypesMap;if(n.comboResourceTagTypesMap.size>0)for(const t of e.keys())a=t;else a=r.resources[0].type}return a&&(this.writeAmpersand(),this.writeTagKey(a)),this.writeCL(),!0}exit_bitsValue(e,t){this.firstBit=!1}enter_internalComment(e,t){const i=e.value,r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;for(let e=0;e<i.length;e++){const t=i[e];this.writeNL(),this.writeProperty("internalComment",t,{format:g.PropertyFormat.plainText,single:!1,ignoreEmpty:!0})}return!1}enter_labelTrue(e,t){const i=e.value,r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const o=null==r?void 0:r.value;if(o){const e=""!=i,t=o.labelFalse&&""!=o.labelFalse[0];(e||t)&&this.writeNL(),e&&this.writeProperty(d.PropertyTag.labelTrue,i,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),t&&this.writeProperty(d.PropertyTag.labelFalse,o.labelFalse,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}return!1}enter_labelFalse(e,t){return!0}enter_imageSource(e,t){const i=e.value,r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const{url:o,mockupId:n,size:a,format:s,trim:p}=i;return this.writeNL(),this.writeProperty("imageSource",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),o&&(n&&this.writeProperty("mockupId",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),a&&this.writeProperty("size",a,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),s&&this.writeProperty("format",s,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),h.BooleanUtils.isBoolean(p)&&this.writeProperty("trim",p,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}enter_technicalTerm(e,t){const i=e.value,r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const{technicalTerm:o,lang:n}=i;return this.writeNL(),this.writeProperty("technicalTerm",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=n&&this.writeProperty("lang",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),!1}enter_servings(e,t){const i=e.value,r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const{servings:o,unit:n,unitAbbr:a,decimalPlaces:s,disableCalculation:p,hint:c}=i;return this.writeNL(),this.writeProperty("servings",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=n&&this.writeProperty("unit",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=a&&this.writeProperty("unitAbbr",a,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=s&&this.writeProperty("decimalPlaces",s,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=p&&this.writeProperty("disableCalculation",p,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=c&&(this.writeOPQ(),this.writeTextOrValue(c,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()),!1}enter_person(e,t){const i=e.value,r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const{name:o,title:n,avatarImage:a}=i;return this.writeNL(),this.writeProperty("person",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),n&&this.writeProperty("title",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),a&&this.writeResource(T.ResourceTag.image,a.image.src),!1}enter_text(e,t){const i=this.getParentNode(t);return!i||i.key!==l.NodeType.term&&i.key!==l.NodeType.definition&&i.key!==l.NodeType.alternativeDefinitionsValue&&i.key!==l.NodeType.question&&i.key!==l.NodeType.answer&&i.key!==l.NodeType.alternativeAnswersValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)),!1)}leaf_text(e,t){const i=this.getParentNode(t);return!i||i.key!==l.NodeType.term&&i.key!==l.NodeType.definition&&i.key!==l.NodeType.alternativeDefinitionsValue&&i.key!==l.NodeType.question&&i.key!==l.NodeType.answer&&i.key!==l.NodeType.alternativeAnswersValue&&i.key!==l.NodeType.reason||(B.StringUtils.isString(e.value)&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)),!1)}enter_icon(e,t){const i=e.value,r=this.getParentNode(t);return!r||(r.key!==l.NodeType.term&&r.key!==l.NodeType.definition&&r.key!==l.NodeType.alternativeDefinitionsValue&&r.key!==l.NodeType.question&&r.key!==l.NodeType.answer&&r.key!==l.NodeType.alternativeAnswersValue||(this.writeNL(),this.writeResource(T.ResourceTag.icon,i.image.src)),!0)}leaf_iconValue(e,t){return this.writeNL(),this.writeProperty("icon",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),!1}enter_ratingLevelStart(e,t){return this.enterRatingLevelStartEndCommon(e,t),!1}enter_ratingLevelEnd(e,t){return this.enterRatingLevelStartEndCommon(e,t),!1}enterRatingLevelStartEndCommon(e,t){const i=e.value,r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return!0;const{level:o,label:n}=i,a=e.key===l.NodeType.ratingLevelStart?d.PropertyTag.ratingLevelStart:d.PropertyTag.ratingLevelEnd;return this.writeNL(),this.writeProperty(a,o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),n&&this.writeProperty("label",n,{format:g.PropertyFormat.bitmarkText,single:!0,ignoreEmpty:!0}),!1}enter_markConfig(e,t){return!0}enter_markConfigValue(e,t){const i=e.value,r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.markConfig)return!0;const{mark:o,color:n,emphasis:a}=i;return o&&(this.writeNL(),this.writeProperty("mark",o,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),n&&this.writeProperty("color",n,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),a&&this.writeProperty("emphasis",a,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}enter_partialAnswer(e,t){return e.value&&(this.writeNL(),this.writeProperty("partialAnswer",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}leaf_partialAnswer(e,t){return e.value&&(this.writeNL(),this.writeProperty("partialAnswer",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}enter_sampleSolution(e,t){return e.value&&(this.writeNL(),this.writeProperty("sampleSolution",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}leaf_sampleSolution(e,t){return e.value&&(this.writeNL(),this.writeProperty("sampleSolution",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})),!1}leaf_reasonableNumOfChars(e,t){this.writeNL(),this.writeProperty("reasonableNumOfChars",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_additionalSolutionsValue(e,t){const i=this.getParentNode(t,2);(null==i?void 0:i.key)===l.NodeType.questionsValue&&(this.writeNL(),this.writeProperty("additionalSolutions",e.value,{format:g.PropertyFormat.plainText,single:!1}))}enter_item(e,t){var i,r,o;const n=e.value,a=this.getParentNode(t);return!this.isEmptyText(n)&&(!this.isEmptyText(null===(i=null==a?void 0:a.value)||void 0===i?void 0:i.lead)||(!this.isEmptyText(null===(r=null==a?void 0:a.value)||void 0===r?void 0:r.pageNumber)||(!this.isEmptyText(null===(o=null==a?void 0:a.value)||void 0===o?void 0:o.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(n,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),!0))))}enter_lead(e,t){var i,r,o,n;const a=e.value,s=this.getParentNode(t);return!this.isEmptyText(a)&&(!this.isEmptyText(null===(i=null==s?void 0:s.value)||void 0===i?void 0:i.pageNumber)||(!this.isEmptyText(null===(r=null==s?void 0:s.value)||void 0===r?void 0:r.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(null!==(n=null===(o=null==s?void 0:s.value)||void 0===o?void 0:o.item)&&void 0!==n?n:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(a,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),!0)))}enter_pageNumber(e,t){var i,r,o,n,a;const s=e.value,l=this.getParentNode(t);return!this.isEmptyText(s)&&(!this.isEmptyText(null===(i=null==l?void 0:l.value)||void 0===i?void 0:i.marginNumber)||(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(null!==(o=null===(r=null==l?void 0:l.value)||void 0===r?void 0:r.item)&&void 0!==o?o:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(null!==(a=null===(n=null==l?void 0:l.value)||void 0===n?void 0:n.lead)&&void 0!==a?a:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(null!=s?s:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),!0))}enter_marginNumber(e,t){var i,r,o,n,a,s;const l=e.value,p=this.getParentNode(t);return!this.isEmptyText(l)&&(this.writeNL_IfNotChain(t),this.writeOPC(),this.writeTextOrValue(null!==(r=null===(i=null==p?void 0:p.value)||void 0===i?void 0:i.item)&&void 0!==r?r:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(null!==(n=null===(o=null==p?void 0:p.value)||void 0===o?void 0:o.lead)&&void 0!==n?n:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(null!==(s=null===(a=null==p?void 0:p.value)||void 0===a?void 0:a.pageNumber)&&void 0!==s?s:"",f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),this.writeOPC(),this.writeTextOrValue(l,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL(),!0)}enter_body(e,t){var i;const r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue&&(null==r?void 0:r.key)!==l.NodeType.cardBitsValue)return!0;this.inTag=!1;const o=e.value;if(this.textFormat===f.TextFormat.json){const e=null!==(i=o.body)&&void 0!==i?i:null;if(Array.isArray(e)||b.ObjectUtils.isObject(e)){const t=JSON.stringify(e,null,this.prettifySpace);t&&(this.writePlainTextDivider(),this.writeNL(),this.writeTextOrValue(t,f.TextFormat.plainText,m.TextLocation.body))}}else if(this.isBodyBitmarkText){const e=!(this.hasCardSet||this.hasFooter);this.writeNL();const t=Array.isArray(o.body)?o.body:[];this.writeTextOrValue(t,this.textFormat,m.TextLocation.body,{plainTextDividerAllowed:e})}else{this.writePlainTextDivider(),this.writeNL();const e=B.StringUtils.isString(o.body)?o.body:"";this.writeTextOrValue(`${e}`,f.TextFormat.plainText,m.TextLocation.body)}return!1}exit_body(e,t){this.inTag=!0}bodyBitCallback(e,t,i){var r;const o=null!==(r=l.NodeType.fromValue(e.type))&&void 0!==r?r:l.NodeType.bodyBit;return this.ast.walk(e,o,this,void 0),""}enter_gap(e,t){const i=e.value;if(i.solutions&&0===i.solutions.length)this.writeOPU(),this.writeCL();else for(const e of i.solutions)this.writeOPU(),this.writeTextOrValue(e,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL();return!0}enter_mark(e,t){const i=e.value;return this.writeOPE(),this.writeTextOrValue(i.solution,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_select(e,t){return!0}enter_highlight(e,t){return!0}enter_footer(e,t){const i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const r=e.value;return this.textFormat===f.TextFormat.json||r.footer&&r.footer.length>0&&this.isBodyBitmarkText&&(this.writeNL(),this.writeTextOrValue("==== footer ====",f.TextFormat.plainText,m.TextLocation.body),this.writeNL(),this.writeTextOrValue(r.footer,this.textFormat,m.TextLocation.body,{plainTextDividerAllowed:!0})),!1}enter_solutions(e,t){const i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const r=e.value;return r&&0===r.length&&(this.writeOPU(),this.writeCL()),!0}leaf_solution(e,t){var i;const r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.bitsValue)return;const o=e.value,n=null===(i=this.getParentNode(t,2))||void 0===i?void 0:i.value;(null==n?void 0:n.type)===u.BodyBitType.mark&&o&&(this.writeOPE(),this.writeTextOrValue(o,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_mark(e,t){const i=t[0];if((null==i?void 0:i.key)!==l.NodeType.mark)return;const r=e.value;r&&this.writeProperty("mark",r,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}enter_optionsValue(e,t){const i=e.value;return i.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(i.text,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_textsValue(e,t){const i=e.value;return i.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(i.text,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_cardNode(e,t){return!this.isCardAllowed||(this.writeCardSetStart(),!0)}between_cardNode(e,t,i,r){this.isCardAllowed&&this.writeCardSetCardDivider()}exit_cardNode(e,t){this.isCardAllowed&&(this.writeCardSetEnd(),this.options.cardSetVersion,y.CardSetVersion.v1)}enter_elements(e,t){}between_elements(e,t,i,r){this.writeCardSetVariantDivider()}between_flashcards(e,t,i,r){this.writeCardSetCardDivider()}between_flashcardsValue(e,t,i,r){var o;this.isCardAllowed&&(i.key===l.NodeType.answer?this.writeCardSetSideDivider():i.key===l.NodeType.alternativeAnswers&&0!==(null===(o=i.value)||void 0===o?void 0:o.length)&&this.writeCardSetVariantDivider())}between_alternativeAnswers(e,t){this.writeCardSetVariantDivider()}between_alternativeDefinitions(e,t){this.writeCardSetVariantDivider()}enter_statements(e,t){}between_statements(e,t,i,r){this.isOfBitType(p.BitType.trueFalse1)||this.writeCardSetCardDivider()}enter_statementsValue(e,t){const i=e.value;return this.writeNL(),i.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(i.statement,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_choicesValue(e,t){const i=e.value;return this.writeNL(),i.isCorrect||i.requireReason?this.writeOPP():this.writeOPM(),this.writeTextOrValue(i.choice,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}enter_responsesValue(e,t){const i=e.value;return this.writeNL(),i.isCorrect?this.writeOPP():this.writeOPM(),this.writeTextOrValue(i.response,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),!0}between_feedbacks(e,t,i,r){this.writeCardSetCardDivider()}enter_reason(e,t){return this.writeCardSetSideDivider(),!0}enter_quizzes(e,t){}between_quizzes(e,t,i,r){this.writeCardSetCardDivider()}enter_heading(e,t){}between_heading(e,t,i,r){this.isCardAllowed&&this.writeCardSetSideDivider()}enter_forValues(e,t){}between_forValues(e,t,i,r){this.isCardAllowed&&this.writeCardSetSideDivider()}enter_pairs(e,t){}between_pairs(e,t,i,r){this.writeCardSetCardDivider()}enter_keyAudio(e,t){const i=e.value;return this.writeNL(),this.writeResource(T.ResourceTag.audio,i.audio.src),!1}enter_keyImage(e,t){const i=e.value;return this.writeNL(),this.writeResource(T.ResourceTag.image,i.image.src),!1}enter_matrix(e,t){}between_matrix(e,t,i,r){this.writeCardSetCardDivider()}enter_values(e,t){this.isCardAllowed&&this.writeCardSetSideDivider()}between_values(e,t,i,r){this.isCardAllowed&&this.writeCardSetVariantDivider()}between_pronunciationTable(e,t,i,r){const o=this.getParentNode(r);(null==o?void 0:o.key)===l.NodeType.cardNode&&this.isCardAllowed&&this.writeCardSetCardDivider()}between_table(e,t,i,r){const o=this.getParentNode(r);(null==o?void 0:o.key)===l.NodeType.cardNode&&this.isCardAllowed&&this.writeCardSetCardDivider()}between_data(e,t,i,r){const o=this.getParentNode(r);(null==o?void 0:o.key)!==l.NodeType.table&&(null==o?void 0:o.key)!==l.NodeType.pronunciationTable||this.writeCardSetCardDivider()}between_columns(e,t,i,r){const o=this.getParentNode(r),n=null==o?void 0:o.key;n!==l.NodeType.table&&n!==l.NodeType.captionDefinitionList||this.isCardAllowed&&this.writeCardSetSideDivider()}leaf_columnsValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}enter_columnsValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()}between_dataValue(e,t,i,r){const o=this.getParentNode(r,2);(null==o?void 0:o.key)!==l.NodeType.table&&(null==o?void 0:o.key)!==l.NodeType.pronunciationTable||this.isCardAllowed&&this.writeCardSetSideDivider()}leaf_dataValueValue(e,t){const i=this.getParentNode(t,3);(null==i?void 0:i.key)===l.NodeType.table&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}enter_dataValueValue(e,t){const i=this.getParentNode(t,3);if(((null==i?void 0:i.key)===l.NodeType.table||(null==i?void 0:i.key)===l.NodeType.pronunciationTable)&&e.value){if((null==i?void 0:i.key)===l.NodeType.pronunciationTable){const t=e.value;return t.title&&(this.writeNL(),this.writeOP(),this.writeHash(),this.writeTextOrValue(t.title,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()),t.audio&&(this.writeNL(),this.writeResource(T.ResourceTag.audio,t.audio.audio.src)),t.body&&(this.writeNL(),this.writeTextOrValue(t.body,this.textFormat,m.TextLocation.body)),!1}this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)}}between_captionDefinitionList(e,t,i,r){const o=this.getParentNode(r);(null==o?void 0:o.key)===l.NodeType.cardNode&&this.writeCardSetCardDivider()}leaf_term(e,t){const i=this.getParentNode(t);return(null==i?void 0:i.key)!==l.NodeType.definitionsValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)),!1)}leaf_definition(e,t){const i=this.getParentNode(t);return(null==i?void 0:i.key)!==l.NodeType.definitionsValue||(e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body)),!1)}between_definitions(e,t,i,r){const o=this.getParentNode(r);(null==o?void 0:o.key)!==l.NodeType.cardNode&&(null==o?void 0:o.key)!==l.NodeType.captionDefinitionList||this.writeCardSetCardDivider()}between_definitionsValue(e,t,i,r){var o;const n=this.getParentNode(r);(null==n?void 0:n.key)===l.NodeType.definitions&&this.isCardAllowed&&(i.key===l.NodeType.definition?this.writeCardSetSideDivider():i.key===l.NodeType.alternativeDefinitions&&(null===(o=i.value)||void 0===o?void 0:o.length)>0&&this.writeCardSetVariantDivider())}enter_questions(e,t){}between_questions(e,t,i,r){this.writeCardSetCardDivider()}enter_ingredients(e,t){}between_ingredients(e,t,i,r){this.writeCardSetCardDivider()}enter_ingredientsValue(e,t){const i=e.value;return null!=i.title&&(this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(i.title,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()),this.writeNL(),i.checked?this.writeOPP():this.writeOPM(),this.writeCL(),null!=i.quantity&&(this.writeOPB(),this.writeTextOrValue(`${i.quantity}`,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()),null!=i.unit&&this.writeProperty("unit",i.unit,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=i.unitAbbr&&this.writeProperty("unitAbbr",i.unitAbbr,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=i.decimalPlaces&&this.writeProperty("decimalPlaces",i.decimalPlaces,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),i.disableCalculation&&this.writeProperty("disableCalculation",!0,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}),null!=i.ingredient&&(this.writeNL(),this.writeTextOrValue(i.ingredient,this.textFormat,m.TextLocation.body)),!0}enter_botResponses(e,t){}between_botResponses(e,t,i,r){this.writeCardSetCardDivider()}enter_cardBits(e,t){}between_cardBits(e,t,i,r){this.writeCardSetCardDivider()}leaf_response(e,t){const i=this.getParentNode(t);(null==i?void 0:i.key)===l.NodeType.botResponsesValue&&(this.writeNL(),this.writeOPB(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_reaction(e,t){const i=this.getParentNode(t);(null==i?void 0:i.key)===l.NodeType.botResponsesValue&&(this.writeNL(),this.writeProperty("reaction",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}leaf_feedback(e,t){const i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.botResponsesValue)return;const r=e.value;r&&(this.writeNL(),this.writeTextOrValue(r,this.textFormat,m.TextLocation.body))}enter_backgroundWallpaper(e,t){const i=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,i),!0}enter_imagePlaceholder(e,t){const i=e.value;return this.writeNL(),this.writePropertyStyleResource(e.key,i),!0}exit_imagePlaceholder(e,t){}enter_posterImage(e,t){const i=this.getParentNode(t);if((null==i?void 0:i.key)===l.NodeType.bitsValue){const t=e.value;t&&this.writeProperty("posterImage",t,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}else{const t=e.value;t&&t.src&&this.writeProperty("posterImage",t.src,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}return!0}enter_thumbnails(e,t){const i=e.value;if(Array.isArray(i)){const e=["src1x","src2x","src3x","src4x"];for(let t=0;t<i.length&&t!==e.length;t++){const r=i[t],o=e[t];this.writeProperty(o,r.src,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}}return!1}leaf_level(e,t){const i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;if(!s.Config.isOfBitType(this.bitType,[p.BitType.chapter]))return!0;const r=e.value,o=null==i?void 0:i.value;if(r>0&&null==o.title){this.writeNL(),this.writeOP();for(let e=0;e<+r;e++)this.writeHash();this.writeCL()}return!1}enter_title(e,t){const i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const r=e.value,o=(null==i?void 0:i.value).level||1;if(o&&r){this.writeNL(),this.writeOP();for(let e=0;e<+o;e++)this.writeHash();this.writeTextOrValue(r,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()}return!1}enter_subtitle(e,t){const i=this.getParentNode(t);if((null==i?void 0:i.key)!==l.NodeType.bitsValue)return!0;const r=e.value;if(r){this.writeNL(),this.writeOP();for(let e=0;e<2;e++)this.writeHash();this.writeTextOrValue(r,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()}return!1}enter_book(e,t){}enter_bookValue(e,t){const i=e.value;return i&&(this.writeNL(),this.writeProperty("book",i.book,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!1}),i.reference&&(this.writeOPRANGLE(),this.writeTextOrValue(i.reference,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),i.referenceEnd&&(this.writeOPRANGLE(),this.writeTextOrValue(i.referenceEnd,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()))),!1}leaf_book(e,t){const i=this.getParentNode(t),r=null==i?void 0:i.value;r&&e.value&&(this.writeNL(),this.writeProperty("book",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!1}),r.reference&&(this.writeOPRANGLE(),this.writeTextOrValue(r.reference,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL(),r.referenceEnd&&(this.writeOPRANGLE(),this.writeTextOrValue(r.referenceEnd,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())))}leaf_anchor(e,t){e.value&&(this.writeNL(),this.writeOPDANGLE(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_reference(e,t){const i=this.getParentNode(t),r=null==i?void 0:i.value;r&&e.value&&(r.book||(this.writeNL(),this.writeOPRANGLE(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()))}enter_hint(e,t){const i=e.value;return this.isEmptyText(i)||(this.writeNL_IfNotChain(t),this.writeOPQ(),this.writeTextOrValue(i,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()),!1}enter_instruction(e,t){const i=e.value;return this.isEmptyText(i)||(this.writeNL_IfNotChain(t),this.writeOPB(),this.writeTextOrValue(i,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()),!1}enter_lang(e,t){e.value&&(this.writeNL(),this.writeProperty("lang",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0}))}enter_refAuthor(e,t){e.value&&(this.writeNL(),this.writeProperty("refAuthor",e.value,{format:g.PropertyFormat.plainText,single:!1,ignoreEmpty:!0}))}enter_refBookTitle(e,t){e.value&&(this.writeNL(),this.writeProperty("refBookTitle",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}enter_refPublisher(e,t){e.value&&(this.writeNL(),this.writeProperty("refPublisher",e.value,{format:g.PropertyFormat.plainText,single:!1,ignoreEmpty:!0}))}enter_refPublicationYear(e,t){e.value&&(this.writeNL(),this.writeProperty("refPublicationYear",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}enter_citationStyle(e,t){e.value&&(this.writeNL(),this.writeProperty("citationStyle",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}leaf_isExample(e,t){var i;if(!e.value)return;const r=this.getParentNode(t),o=null!==(i=null==r?void 0:r.value.example)&&void 0!==i?i:null;null!=o&&""!==o&&(this.writeNL_IfNotChain(t),this.writeOPA(),this.writeString("example"),this.writeColon(),!0===o?this.writeString(" true "):!1===o?this.writeString(" false "):Array.isArray(o)?this.writeTextOrValue(o,f.TextFormat.bitmarkText,m.TextLocation.tag):this.writeTextOrValue(o,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_elementsValue(e,t){e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}leaf_solutionsValue(e,t){const i=this.getParentNode(t,2);(null==i?void 0:i.key)===l.NodeType.bitsValue&&null!=e.value&&(this.writeOPU(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_prefix(e,t){e.value&&(this.writeOPPRE(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_postfix(e,t){e.value&&(this.writeOPPOST(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL())}leaf_isCaseSensitive(e,t){this.writeProperty("isCaseSensitive",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreFalse:!1,ignoreTrue:!0})}leaf_forKeys(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}leaf_forValues(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}leaf_forValuesValue(e,t){this.writeNL(),this.writeOPHASH(),this.writeTextOrValue(e.value,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}leaf_key(e,t){e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}leaf_valuesValue(e,t){e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}leaf_question(e,t){const i=this.getParentNode(t);(null==i?void 0:i.key)!==l.NodeType.questionsValue&&(null==i?void 0:i.key)!==l.NodeType.flashcardsValue||e.value&&(this.writeNL(),this.writeTextOrValue(e.value,this.textFormat,m.TextLocation.body))}leaf_src1x(e,t){this.writeProperty("src1x",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_src2x(e,t){this.writeProperty("src2x",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_src3x(e,t){this.writeProperty("src3x",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_src4x(e,t){this.writeProperty("src4x",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_width(e,t){this.writeProperty("width",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_height(e,t){this.writeProperty("height",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_alt(e,t){this.writeProperty("alt",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_zoomDisabled(e,t){s.Config.isOfBitType(this.bitType,[p.BitType.imageSeparator,p.BitType.pageBanner,p.BitType.imagesLogoGrave,p.BitType.prototypeImages])?this.writeProperty("zoomDisabled",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreFalse:!1,ignoreTrue:!0}):this.writeProperty("zoomDisabled",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreFalse:!0,ignoreTrue:!1})}leaf_license(e,t){this.writeProperty("license",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_copyright(e,t){this.writeProperty("copyright",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_provider(e,t){}leaf_showInIndex(e,t){null!=e.value&&(this.writeNL_IfNotChain(t),this.writeProperty("showInIndex",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0,ignoreFalse:!0}))}enter_caption(e,t){const i=e.value;return this.writeNL_IfNotChain(t),this.writeProperty("caption",i,{format:g.PropertyFormat.bitmarkText,single:!0,ignoreEmpty:!0}),!1}leaf_search(e,t){const i=e.value;i&&(this.writeNL_IfNotChain(t),this.writeProperty("search",i,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0}))}leaf_duration(e,t){const i=this.getParentNode(t);(null==i?void 0:i.key)!==l.NodeType.bitsValue&&this.writeProperty("duration",e.value,{format:g.PropertyFormat.plainText,single:!0,ignoreEmpty:!0})}leaf_mute(e,t){this.writeProperty("mute",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0})}leaf_autoplay(e,t){this.writeProperty("autoplay",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0})}leaf_allowSubtitles(e,t){this.writeProperty("allowSubtitles",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0})}leaf_showSubtitles(e,t){this.writeProperty("showSubtitles",e.value,{format:g.PropertyFormat.boolean,single:!0,ignoreEmpty:!0})}generateResourceHandlers(){for(const e of T.ResourceTag.keys()){if(e===T.ResourceTag.keyFromValue(T.ResourceTag.unknown))continue;const t=`enter_${e}`;"function"!=typeof this[t]&&(this[t]=(e,t)=>{const i=e.value;if(null==i)return!1;const r=this.getParentNode(t);if((null==r?void 0:r.key)!==l.NodeType.resourcesValue)return!0;const o=T.ResourceTag.fromValue(r.value.__typeAlias),n=null!=o?o:T.ResourceTag.fromValue(r.value.type);if(!n)return!1;const a=i.url||i.src||i.body||"";return this.writeNL(),this.writeResource(n,a),!0},this[t]=this[t].bind(this))}}generatePropertyHandlers(){var e;const t=s.Config.getRawPropertiesConfig();for(const i of Object.values(t)){const t=null!==(e=i.astKey)&&void 0!==e?e:i.tag,r=`enter_${t}`;"function"!=typeof this[r]&&("example"!==t&&(this[r]=(e,t)=>{var r,o;if(null==e.value)return;const n=this.getParentNode(t);(null==n?void 0:n.key)===l.NodeType.bitsValue&&(this.writeNL_IfNotChain(t),this.writeProperty(i.tag,e.value,{format:null!==(r=i.format)&&void 0!==r?r:g.PropertyFormat.plainText,single:null!==(o=i.single)&&void 0!==o&&o,ignoreFalse:"false"===i.defaultValue,ignoreTrue:"true"===i.defaultValue}))},this[r]=this[r].bind(this)))}}isChain(e){const t=this.getParentNode(e);return(null==t?void 0:t.key)!==l.NodeType.bitsValue&&((null==t?void 0:t.key)!==l.NodeType.cardBitsValue&&((null==t?void 0:t.key)!==l.NodeType.feedbacksValue&&((null==t?void 0:t.key)!==l.NodeType.quizzesValue&&((null==t?void 0:t.key)!==l.NodeType.pairsValue&&((null==t?void 0:t.key)!==l.NodeType.matrixValue&&((null==t?void 0:t.key)!==l.NodeType.definitionsValue&&((null==t?void 0:t.key)!==l.NodeType.questionsValue&&(null==t?void 0:t.key)!==l.NodeType.reason)))))))}haveValidCardSet(e){const t=s.Config.getBitConfig(e.bitType);return!!t&&!!t.cardSet}haveValidFooter(e){const t=e.footer;if(!t)return!1;return e.textFormat!==f.TextFormat.json&&(!!(t.footer&&t.footer.length>0)&&!!this.isBodyBitmarkText)}calcSpacesAroundValues(){const e=this.options.spacesAroundValues;let t=1;return null!=e&&(t=!0===e?1:!1===e?0:e),t=Math.min(Math.max(t,0),10),t}writeTagKey(e){null!=e&&this.write(a.Breakscape.breakscape(`${e}`,{textFormat:f.TextFormat.plainText,textLocation:m.TextLocation.tag}))}writeTextOrValue(e,t,i,r){const o=i===m.TextLocation.tag,n="string"==typeof e?e:void 0,s=Array.isArray(e)?e:void 0,l=o?this.spacesAroundValuesStr:"",p=t===f.TextFormat.bitmarkText?t:f.TextFormat.plainText,c=e=>o?`${l}${e}${l}`:e,u=e=>{const t=this.writer;this.writer=this.partWriter,this.partWriter.openSync(),e(),this.partWriter.closeSync();const i=this.partWriter.getString().trim();return this.writer=t,i};if(null==n){if(null!=s){const e=()=>this.textGenerator.generateSync(s,t,i,r);if(o){const t=u(e);t&&this.write(c(t))}else e()}}else{const e=()=>this.write(a.Breakscape.breakscape(n,{textFormat:p,textLocation:i}));if(o){const t=u(e);t&&this.write(c(t))}else e()}}writeString(e){null!=e&&this.write(`${e}`)}writeOPBUL(){this.write("[•")}writeOPESC(){this.write("[^")}writeOPRANGLE(){this.write("[►")}writeOPDANGLE(){this.write("[▼")}writeOPD(e){this.write(`[${".".repeat(e)}`)}writeOPU(){this.write("[_")}writeOPE(){this.write("[=")}writeOPB(){this.write("[!")}writeOPQ(){this.write("[?")}writeOPA(){this.write("[@")}writeOPP(){this.write("[+")}writeOPM(){this.write("[-")}writeOPS(){this.write("[\\")}writeOPR(){this.write("[*")}writeOPC(){this.write("[%")}writeOPAMP(){this.write("[&")}writeOPDOLLAR(){this.write("[$")}writeOPHASH(){this.write("[#")}writeOPPRE(){this.write("['")}writeOPPOST(){this.write("[")}writeOP(){this.write("[")}writeCL(){0===this.spacesAroundValues&&this.writer.getLastWrite().endsWith("^")?this.write(" ]"):this.write("]")}writeAmpersand(){this.write("&")}writeColon(){this.write(":")}writeHash(){this.write("#")}writeSpacesAroundValues(){this.write(this.spacesAroundValuesStr)}writePlainTextDivider(){this.writeNL(),this.write("==== text ====")}writeCardSetStart(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1?this.write("==="):this.write("====")}writeCardSetEnd(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1&&this.write("===")}writeCardSetCardDivider(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1?this.write("==="):this.write("====")}writeCardSetSideDivider(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1?this.write("=="):this.write("--")}writeCardSetVariantDivider(){this.writeNL(),this.options.cardSetVersion===y.CardSetVersion.v1?this.write("--"):this.write("++")}writeNL_IfNotChain(e){this.isChain(e)||this.writeNL()}writeNL(){this.options.debugGenerationInline?this.write("\\n"):this.write("\n")}writePropertyStyleResource(e,t,i=!1){var r;if(e&&t){const o=t[null!==(r=T.ResourceTag.keyFromValue(t.type))&&void 0!==r?r:""],n=o&&(o.src||o.url||o.body)||"";i?this.writeOPA():this.writeOPAMP(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(n,f.TextFormat.plainText,m.TextLocation.tag),t.type,T.ResourceTag.article,this.writeCL()}}writeResource(e,t){e&&(this.writeOPAMP(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(t,f.TextFormat.plainText,m.TextLocation.tag),T.ResourceTag.article,this.writeCL())}writeProperty(e,t,i){let r;if(void 0!==t){const o=i.format===g.PropertyFormat.bitmarkText;if(o){if(i.ignoreEmpty&&o&&this.isEmptyText(t))return;this.writeOPA(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(t,f.TextFormat.bitmarkText,m.TextLocation.tag),this.writeCL()}else if(r=Array.isArray(t)?t:[t],r.length>0){i.single&&(r=r.slice(r.length-1));for(const t of r)if(void 0!==t){if(i.ignoreFalse&&!1===t)continue;if(i.ignoreTrue&&!0===t)continue;if(i.ignoreEmpty&&""===t)continue;this.writeOPA(),this.writeTagKey(e),this.writeColon(),this.writeTextOrValue(`${t}`,f.TextFormat.plainText,m.TextLocation.tag),this.writeCL()}}}}writeInlineDebug(e,t){let i=e;t.open?i=`<${e}>`:t.close?i=`</${e}>`:t.single&&(i=`<${e} />`),this.writeString(i)}isEmptyText(e){return!e||(!Array.isArray(e)||0===e.length)}isWriteTextFormat(e,t){return!!(!(f.TextFormat.fromValue(e)===t)||this.options.explicitTextFormat)}calculateIsCardAllowed(){return this.isBodyBitmarkText&&!this.isOfBitType1()}isOfBitType1(){return this.isOfBitType([p.BitType.trueFalse1,p.BitType.multipleChoice1,p.BitType.multipleResponse1])}isOfBitType(e){return s.Config.isOfBitType(this.bitType,e)}write(e){return this.writer.write(e),this}writeLine(e){return this.writer.writeLine(e),this}writeLines(e,t){return this.writer.writeLines(e,t),this}writeWhiteSpace(){return this.writer.writeWhiteSpace(),this}}t.BitmarkGenerator=P},5126:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Ast=void 0;const r=i(1412),o=i(126),n=i(9681);t.Ast=class{constructor(){(0,r.init)()}walk(e,t,i,r){this.walkRecursive(e,[{index:0,key:t,value:e}],i,r)}getRouteKey(e){return e.reduce(((t,i,r)=>(+i.key!==i.index&&(t+=`${i.key}`,r<e.length-1&&(t+="_")),t)),"")}printTree(e,t=o.NodeType.bitmarkAst){this.walkRecursive(e,[{index:0,key:t,value:e}],{enter:(e,t)=>(console.log("Enter: "+this.getRouteKey(t)),t[t.length-1].key!==o.NodeType.bodyJson),between:(e,t,i,r)=>{console.log("Between: "+this.getRouteKey(r))},exit:(e,t)=>{console.log("Exit: "+this.getRouteKey(t))},leaf:(e,t)=>{console.log("Leaf: "+this.getRouteKey(t))}},void 0)}preprocessAst(e){if(n.StringUtils.isString(e)){const t=e;try{e=JSON.parse(t)}catch(e){return}}if(this.isAst(e))return e}isAst(e){return!(!Object.prototype.hasOwnProperty.call(e,"bits")||!Array.isArray(e.bits))}walkRecursive(e,t,i,r){const{enter:o,between:n,exit:a,leaf:s}=i,l=t[t.length-1].key,p=!this.isValue(e),c=t[t.length-1];if(p){if(o){if(!1===o(c,t,r))return}}else s&&s(c,t,r);if(p){const o=this.isArray(e),a=Object.keys(e);for(let s=0,p=a.length;s<p;s++){const u=a[s],y=s===p-1,g=e,d=g[u];if(null!=d){const e={key:this.getAstKey(u,l,o),index:s,value:d},p=t.slice();if(p.push(e),this.walkRecursive(d,p,i,r),!y){const i=a[s+1],p=g[i],u={key:this.getAstKey(i,l,o),index:s+1,value:p};if(n){if(!1===n(c,e,u,t,r))break}}}}}p&&a&&a(c,t,r)}getAstKey(e,t,i){let r=e;return i&&t&&(r=`${t}Value`),o.NodeType.fromKey(r)||`unknown(${r})`}isArray(e){return Array.isArray(e)}isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}isValue(e){return!this.isObject(e)&&!this.isArray(e)}}},5189:function(e,t,i){var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.markChainContentProcessor=function(e,t,i,c,u,y){if(t===p.BitContentLevel.Chain)(0,l.markTagContentProcessor)(e,p.BitContentLevel.Chain,c,u);else{const t=function(e,t,i,l){var c;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("mark content",l);const u=o.Config.getTagConfigForTag(i,a.Tag.fromValue(l.type)),y=e.bitContentProcessor(p.BitContentLevel.Chain,i,[l]),g=e.bitContentProcessor(p.BitContentLevel.Chain,null==u?void 0:u.chain,l.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("mark TAGS",g);const{solution:d}=y,{mark:T}=g,f=r(g,["mark"]),m=Object.assign({type:n.BodyBitType.mark,solution:null!=d?d:"",mark:null!==(c=s.ArrayUtils.asSingle(T))&&void 0!==c?c:""},f);return m}(e,0,i,c);t&&y.push(t)}};const o=i(2028),n=i(4410),a=i(9917),s=i(6989),l=i(5980),p=i(3029)},5416:(e,t,i)=>{const{VOID:r,PRIMITIVE:o,ARRAY:n,OBJECT:a,DATE:s,REGEXP:l,MAP:p,SET:c,ERROR:u,BIGINT:y}=i(1731),g="",{toString:d}={},{keys:T}=Object,f=e=>{const t=typeof e;if("object"!==t||!e)return[o,t];const i=d.call(e).slice(8,-1);switch(i){case"Array":return[n,g];case"Object":return[a,g];case"Date":return[s,g];case"RegExp":return[l,g];case"Map":return[p,g];case"Set":return[c,g];case"DataView":return[n,i]}return i.includes("Array")?[n,i]:i.includes("Error")?[u,i]:[a,i]},m=([e,t])=>e===o&&("function"===t||"symbol"===t);t.serialize=(e,{json:t,lossy:i}={})=>{const u=[];return((e,t,i,u)=>{const g=(e,t)=>{const r=u.push(e)-1;return i.set(t,r),r},d=u=>{if(i.has(u))return i.get(u);let[h,b]=f(u);switch(h){case o:{let t=u;switch(b){case"bigint":h=y,t=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+b);t=null;break;case"undefined":return g([r],u)}return g([h,t],u)}case n:{if(b){let e=u;return"DataView"===b?e=new Uint8Array(u.buffer):"ArrayBuffer"===b&&(e=new Uint8Array(u)),g([b,[...e]],u)}const e=[],t=g([h,e],u);for(const t of u)e.push(d(t));return t}case a:{if(b)switch(b){case"BigInt":return g([b,u.toString()],u);case"Boolean":case"Number":case"String":return g([b,u.valueOf()],u)}if(t&&"toJSON"in u)return d(u.toJSON());const i=[],r=g([h,i],u);for(const t of T(u))!e&&m(f(u[t]))||i.push([d(t),d(u[t])]);return r}case s:return g([h,u.toISOString()],u);case l:{const{source:e,flags:t}=u;return g([h,{source:e,flags:t}],u)}case p:{const t=[],i=g([h,t],u);for(const[i,r]of u)(e||!m(f(i))&&!m(f(r)))&&t.push([d(i),d(r)]);return i}case c:{const t=[],i=g([h,t],u);for(const i of u)!e&&m(f(i))||t.push(d(i));return i}}const{message:B}=u;return g([h,{name:b,message:B}],u)};return d})(!(t||i),!!t,new Map,u)(e),u}},5512:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitTagType=void 0;const r=(0,i(4718).superenum)({tag:"tag",property:"property",resource:"resource",group:"group"});t.BitTagType=r},5533:function(e,t,i){var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceBuilder=void 0;const o=i(7735),n=i(2028),a=i(5854),s=i(6149),l=i(6877),p=i(955),c=i(9681),u=i(201),y=i(4470),g=i(4564);class d extends y.BaseBuilder{resourceFromResourceJson(e,t){if(!t)return;const i=[];Array.isArray(t)||(t=[t]);for(const r of t){let t=s.ResourceTag.fromValue(r.type);if(!t)return;const o=s.ResourceTag.keyFromValue(t);if(!o)return;const n=s.ResourceTag.fromValue(r.__typeAlias);let a;if(t=null!=n?n:t,t===s.ResourceTag.imageResponsive){const t=r,o=this.resourceFromResourceDataJson(e,s.ResourceTag.imagePortrait,t.imagePortrait),n=this.resourceFromResourceDataJson(e,s.ResourceTag.imageLandscape,t.imageLandscape);o&&i.push(o),n&&i.push(n)}else if(t===s.ResourceTag.stillImageFilm){const t=r,o=this.resourceFromResourceDataJson(e,s.ResourceTag.image,t.image),n=this.resourceFromResourceDataJson(e,s.ResourceTag.audio,t.audio);o&&i.push(o),n&&i.push(n)}else{if(a=r[o],!a)return;const n=this.resourceFromResourceDataJson(e,t,a);n&&i.push(n)}}return 0!==i.length?1===i.length?i[0]:i:void 0}resourceFromResourceDataJson(e,t,i){var r,o,n;if(!i)return;if(!(t=s.ResourceTag.fromValue(t)))return;const a=c.StringUtils.isString(i)?i:void 0,p=i.url||i.src||i.body||a,u=i.posterImage?null===(r=this.resourceFromResourceDataJson(e,s.ResourceTag.image,i.posterImage))||void 0===r?void 0:r.image:void 0,y=i.thumbnails?i.thumbnails.map((t=>{var i;return null===(i=this.resourceFromResourceDataJson(e,s.ResourceTag.image,t))||void 0===i?void 0:i.image})):void 0;return this.resource(e,{type:t,value:p,format:i.format,src1x:i.src1x,src2x:i.src2x,src3x:i.src3x,src4x:i.src4x,caption:this.handleJsonText(e,l.TextLocation.tag,i.caption),width:null!==(o=i.width)&&void 0!==o?o:void 0,height:null!==(n=i.height)&&void 0!==n?n:void 0,alt:i.alt,zoomDisabled:i.zoomDisabled,duration:i.duration,mute:i.mute,autoplay:i.autoplay,allowSubtitles:i.allowSubtitles,showSubtitles:i.showSubtitles,posterImage:u,thumbnails:y,siteName:void 0,license:i.license,copyright:i.copyright,showInIndex:i.showInIndex,search:i.search})}resource(e,t){var i;let n;const{type:a,value:l,format:p}=t,c=r(t,["type","value","format"]),u=Object.assign({type:a,value:null!=l?l:o.Breakscape.EMPTY_STRING,format:null!=p?p:o.Breakscape.EMPTY_STRING},c);switch(a){case s.ResourceTag.video:case s.ResourceTag.videoEmbed:case s.ResourceTag.videoLink:case s.ResourceTag.stillImageFilmEmbed:case s.ResourceTag.stillImageFilmLink:{const r=["src1x","src2x","src3x","src4x"],o=[];for(const i of r){const r=t[i];if(r){const t=this.resource(e,{type:s.ResourceTag.image,value:r});t&&o.push(t.image)}}u.thumbnails=[...null!==(i=u.thumbnails)&&void 0!==i?i:[],...o]}}switch(a){case s.ResourceTag.image:case s.ResourceTag.imagePortrait:case s.ResourceTag.imageLandscape:case s.ResourceTag.backgroundWallpaper:case s.ResourceTag.imagePlaceholder:case s.ResourceTag.icon:n=this.imageResource(e,u,a);break;case s.ResourceTag.imageLink:n=this.imageLinkResource(e,u);break;case s.ResourceTag.audio:n=this.audioResource(e,u);break;case s.ResourceTag.audioEmbed:n=this.audioEmbedResource(e,u);break;case s.ResourceTag.audioLink:n=this.audioLinkResource(e,u);break;case s.ResourceTag.video:n=this.videoResource(e,u);break;case s.ResourceTag.videoEmbed:n=this.videoEmbedResource(e,u);break;case s.ResourceTag.videoLink:n=this.videoLinkResource(e,u);break;case s.ResourceTag.stillImageFilmEmbed:n=this.stillImageFilmEmbedResource(e,u);break;case s.ResourceTag.stillImageFilmLink:n=this.stillImageFilmLinkResource(e,u);break;case s.ResourceTag.article:n=this.articleResource(e,u);break;case s.ResourceTag.document:n=this.documentResource(e,u);break;case s.ResourceTag.documentEmbed:n=this.documentEmbedResource(e,u);break;case s.ResourceTag.documentLink:n=this.documentLinkResource(e,u);break;case s.ResourceTag.documentDownload:n=this.documentDownloadResource(e,u);break;case s.ResourceTag.appLink:n=this.appLinkResource(e,u);break;case s.ResourceTag.websiteLink:n=this.websiteLinkResource(e,u)}return n}imageResource(e,t,i){var r,o;const{value:c,src1x:y,src2x:d,src3x:T,src4x:f,width:m,height:h,alt:b,zoomDisabled:B,license:v,copyright:C,showInIndex:x,caption:P,search:k}=t,{bitType:K}=e;let w=!1;n.Config.isOfBitType(K,[a.BitType.imageSeparator,a.BitType.pageBanner,a.BitType.imagesLogoGrave,a.BitType.prototypeImages])&&(w=!0);const _={type:s.ResourceTag.image,__typeAlias:null!=i?i:s.ResourceTag.image,image:{format:null!==(r=u.UrlUtils.fileExtensionFromUrl(c))&&void 0!==r?r:void 0,provider:null!==(o=u.UrlUtils.domainFromUrl(c))&&void 0!==o?o:void 0,src:null!=c?c:"",src1x:null!=y?y:void 0,src2x:null!=d?d:void 0,src3x:null!=T?T:void 0,src4x:null!=f?f:void 0,width:null!=m?m:null,height:null!=h?h:null,alt:null!=b?b:"",zoomDisabled:null!=B?B:w,license:null!=v?v:"",copyright:null!=C?C:"",showInIndex:null!=x&&x,caption:this.handleJsonText(e,l.TextLocation.tag,P),search:null!=k?k:void 0}};return p.ObjectUtils.removeUnwantedProperties(_.image,{ignoreFalse:["zoomDisabled","showInIndex"],ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["src","alt","license","copyright"]}),g.NodeValidator.validateResource(_)}imageLinkResource(e,t){var i,r;const{value:o,src1x:n,src2x:a,src3x:c,src4x:y,width:d,height:T,alt:f,zoomDisabled:m,license:h,copyright:b,showInIndex:B,caption:v,search:C}=t,x={type:s.ResourceTag.imageLink,__typeAlias:s.ResourceTag.imageLink,imageLink:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",src1x:null!=n?n:void 0,src2x:null!=a?a:void 0,src3x:null!=c?c:void 0,src4x:null!=y?y:void 0,width:null!=d?d:null,height:null!=T?T:null,alt:null!=f?f:"",zoomDisabled:null!=m&&m,license:null!=h?h:"",copyright:null!=b?b:"",showInIndex:null!=B&&B,caption:this.handleJsonText(e,l.TextLocation.tag,v),search:null!=C?C:void 0}};return p.ObjectUtils.removeUnwantedProperties(x.imageLink,{ignoreFalse:["zoomDisabled","showInIndex"],ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","alt","license","copyright"]}),g.NodeValidator.validateResource(x)}audioResource(e,t){var i,r;const{value:o,duration:n,mute:a,autoplay:c,license:y,copyright:d,showInIndex:T,caption:f,search:m}=t,h={type:s.ResourceTag.audio,__typeAlias:s.ResourceTag.audio,audio:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,src:null!=o?o:"",duration:null!=n?n:void 0,mute:null!=a?a:void 0,autoplay:null!=c?c:void 0,license:null!=y?y:"",copyright:null!=d?d:"",showInIndex:null!=T&&T,caption:this.handleJsonText(e,l.TextLocation.tag,f),search:null!=m?m:void 0}};return p.ObjectUtils.removeUnwantedProperties(h.audio,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["src","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(h)}audioEmbedResource(e,t){var i,r;const{value:o,duration:n,mute:a,autoplay:c,license:y,copyright:d,showInIndex:T,caption:f,search:m}=t,h={type:s.ResourceTag.audioEmbed,__typeAlias:s.ResourceTag.audioEmbed,audioEmbed:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,src:null!=o?o:"",duration:null!=n?n:void 0,mute:null!=a?a:void 0,autoplay:null!=c?c:void 0,license:null!=y?y:"",copyright:null!=d?d:"",showInIndex:null!=T&&T,caption:this.handleJsonText(e,l.TextLocation.tag,f),search:null!=m?m:void 0}};return p.ObjectUtils.removeUnwantedProperties(h.audioEmbed,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["src","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(h)}audioLinkResource(e,t){var i,r;const{value:o,duration:n,mute:a,autoplay:c,license:y,copyright:d,showInIndex:T,caption:f,search:m}=t,h={type:s.ResourceTag.audioLink,__typeAlias:s.ResourceTag.audioLink,audioLink:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",duration:null!=n?n:void 0,mute:null!=a?a:void 0,autoplay:null!=c?c:void 0,license:null!=y?y:"",copyright:null!=d?d:"",showInIndex:null!=T&&T,caption:this.handleJsonText(e,l.TextLocation.tag,f),search:null!=m?m:void 0}};return p.ObjectUtils.removeUnwantedProperties(h.audioLink,{ignoreEmptyString:["url"]}),g.NodeValidator.validateResource(h)}videoResource(e,t){var i,r;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.video,__typeAlias:s.ResourceTag.video,video:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,src:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0,posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.video,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["src","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}videoEmbedResource(e,t){var i,r;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.videoEmbed,__typeAlias:s.ResourceTag.videoEmbed,videoEmbed:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0,license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.videoEmbed,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}videoLinkResource(e,t){var i,r;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.videoLink,__typeAlias:s.ResourceTag.videoLink,videoLink:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0,license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.videoLink,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}stillImageFilmEmbedResource(e,t){var i,r;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.stillImageFilmEmbed,__typeAlias:s.ResourceTag.stillImageFilmEmbed,stillImageFilmEmbed:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0,license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.stillImageFilmEmbed,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}stillImageFilmLinkResource(e,t){var i,r;const{value:o,width:n,height:a,duration:c,mute:y,autoplay:d,allowSubtitles:T,showSubtitles:f,alt:m,posterImage:h,thumbnails:b,license:B,copyright:v,showInIndex:C,caption:x,search:P}=t,k={type:s.ResourceTag.stillImageFilmLink,__typeAlias:s.ResourceTag.stillImageFilmLink,stillImageFilmLink:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",width:null!=n?n:null,height:null!=a?a:null,duration:null!=c?c:void 0,mute:null!=y?y:void 0,autoplay:null!=d?d:void 0,allowSubtitles:null!=T?T:void 0,showSubtitles:null!=f?f:void 0,alt:null!=m?m:"",posterImage:null!=h?h:void 0,thumbnails:null!=b?b:void 0,license:null!=B?B:"",copyright:null!=v?v:"",showInIndex:null!=C&&C,caption:this.handleJsonText(e,l.TextLocation.tag,x),search:null!=P?P:void 0}};return p.ObjectUtils.removeUnwantedProperties(k.stillImageFilmLink,{ignoreEmptyArrays:["caption"],ignoreUndefined:["width","height"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(k)}articleResource(e,t){var i,r;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.article,__typeAlias:s.ResourceTag.article,article:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,body:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.article,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["body","alt","license","copyright"]}),g.NodeValidator.validateResource(T)}documentResource(e,t){var i,r;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.document,__typeAlias:s.ResourceTag.document,document:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.document,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(T)}documentEmbedResource(e,t){var i,r;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.documentEmbed,__typeAlias:s.ResourceTag.documentEmbed,documentEmbed:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.documentEmbed,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(T)}documentLinkResource(e,t){var i,r;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.documentLink,__typeAlias:s.ResourceTag.documentLink,documentLink:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.documentLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(T)}documentDownloadResource(e,t){var i,r;const{value:o,license:n,copyright:a,showInIndex:c,caption:y,search:d}=t,T={type:s.ResourceTag.documentDownload,__typeAlias:s.ResourceTag.documentDownload,documentDownload:{format:null!==(i=u.UrlUtils.fileExtensionFromUrl(o))&&void 0!==i?i:void 0,provider:null!==(r=u.UrlUtils.domainFromUrl(o))&&void 0!==r?r:void 0,url:null!=o?o:"",license:null!=n?n:"",copyright:null!=a?a:"",showInIndex:null!=c&&c,caption:this.handleJsonText(e,l.TextLocation.tag,y),search:null!=d?d:void 0}};return p.ObjectUtils.removeUnwantedProperties(T.documentDownload,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(T)}appLinkResource(e,t){const{value:i,license:r,copyright:o,showInIndex:n,caption:a,search:c}=t,u={type:s.ResourceTag.appLink,__typeAlias:s.ResourceTag.appLink,appLink:{provider:void 0,url:null!=i?i:"",license:null!=r?r:"",copyright:null!=o?o:"",showInIndex:null!=n&&n,caption:this.handleJsonText(e,l.TextLocation.tag,a),search:null!=c?c:void 0}};return p.ObjectUtils.removeUnwantedProperties(u.appLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(u)}websiteLinkResource(e,t){const{value:i,license:r,copyright:o,showInIndex:n,caption:a,search:c}=t,u={type:s.ResourceTag.websiteLink,__typeAlias:s.ResourceTag.websiteLink,websiteLink:{provider:void 0,url:null!=i?i:"",license:null!=r?r:"",copyright:null!=o?o:"",showInIndex:null!=n&&n,caption:this.handleJsonText(e,l.TextLocation.tag,a),search:null!=c?c:void 0}};return p.ObjectUtils.removeUnwantedProperties(u.websiteLink,{ignoreEmptyArrays:["caption"],ignoreEmptyString:["url","alt","license","copyright"],ignoreFalse:["showInIndex"]}),g.NodeValidator.validateResource(u)}}t.ResourceBuilder=d},5554:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CARDS=void 0;const r=i(8199),o=i(7112),n=i(9888),a=i(5051),s=i(7797),l=i(5512),p=i(3778),c={[r.CardSetConfigKey._definitionList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceIcon}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._flashcard]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceIcon}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._elements]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._statements]:{variants:[[{tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:1},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:1},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],bodyAllowed:!1}]]},[r.CardSetConfigKey._quiz]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],bodyAllowed:!1}]]},[r.CardSetConfigKey._feedback]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],bodyAllowed:!1}],[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],bodyAllowed:!0}]]},[r.CardSetConfigKey._questions]:{variants:[[{tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars},{type:l.BitTagType.tag,configKey:s.TagConfigKey.sampleSolution},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_sampleSolution},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.additionalSolutions,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.partialAnswer},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._matchPairs]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._matchAudioPairs]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audio}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._matchImagePairs]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.image}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._matchMatrix]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._table]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._pronunciationTable]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audio}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._botActionResponses]:{variants:[[{tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reaction},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardExample}]}]]},[r.CardSetConfigKey._clozeList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_gap}]}]]},[r.CardSetConfigKey._exampleBitList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._ingredients]:{variants:[[{tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unit},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unitAbbr},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.decimalPlaces},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.disableCalculation}],repeatCount:p.Count.infinity}]]},[r.CardSetConfigKey._bookReferenceList]:{variants:[[{tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refAuthor,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refBookTitle},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refPublisher,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refPublicationYear},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.citationStyle}],repeatCount:p.Count.infinity}]]}};t.CARDS=c},5591:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigKey=void 0;const r=i(4718),o=i(7112),n=i(9888),a=i(5051),s=i(7797),l=(0,r.superenum)(Object.assign(Object.assign(Object.assign(Object.assign({_unknown:"_unknown"},s.tagConfigKeys),n.propertyConfigKeys),a.resourceConfigKeys),o.groupConfigKeys));t.ConfigKey=l,function(){const e=new Set,t=[s.tagConfigKeys,n.propertyConfigKeys,a.resourceConfigKeys,o.groupConfigKeys];for(const i of t)for(const t in i)e.add(t)}()},5633:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkParser=void 0;const r=i(5663),o=i(5078);t.BitmarkParser=class{constructor(){this.jsonParser=new r.JsonParser}toAst(e,t){return(0,o.parse)(e)}}},5659:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseUserAgent=function(){if("undefined"==typeof window||!window.navigator||!window.navigator.userAgent)return;const e={browser:r.Environment.unknown,os:o.Os.unknown},t=function(e){const t=e.toLowerCase().split(new RegExp("[ /,;()]","g")).reduce(((e,t)=>(t&&e.push(t),e)),[]),i={keys:new Set,versions:{}};let r="";for(let e=0,o=t.length;e<o;e++){const o=t[e];let n=!1;for(let e=0;e<=9;e++)if(o.startsWith(`${e}`)){n=!0;break}n?i.versions[r]=o.replace("_","."):i.keys.add(o),r=o}return i}(window.navigator.userAgent),i=t.keys.has("firefox"),n=t.keys.has("chrome"),a=t.keys.has("chromium"),s=t.keys.has("safari"),l=t.keys.has("macintosh"),p=n,c=i,u=l;!s||n||a?p?(e.browser=r.Environment.chrome,e.browserVersion=t.versions.chrome):c&&(e.browser=r.Environment.firefox,e.browserVersion=t.versions.firefox):(e.browser=r.Environment.safari,e.browserVersion=t.versions.version);u&&(e.os=o.Os.macos,e.osVersion=t.versions.x);return e};const r=i(6278),o=i(9561)},5663:function(e,t,i){var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonParser=void 0;const o=i(5809),n=i(2028),a=i(5854),s=i(6220),l=i(6149),p=i(385),c=i(9681),u=new o.Builder;t.JsonParser=class{toAst(e){const t=this.preprocessJson(e),i=[];for(const e of t){const{bit:t,parser:r}=e,o=this.bitToAst(t,null==r?void 0:r.internalComments);o&&i.push(o)}const r=i.length>0?{bits:i}:{};return u.buildBitmark(r)}preprocessJson(e){const t=[];if(c.StringUtils.isString(e)){const t=e;try{e=JSON.parse(t)}catch(e){return[]}}const i=e=>{if(this.isBitWrapper(e)){const i=e;t.push(i)}else if(this.isBit(e)){const i=e;t.push(this.bitToBitWrapper(i))}};if(Array.isArray(e))for(const t of e)i(t);else i(e);return t}isBitWrapper(e){if(Object.prototype.hasOwnProperty.call(e,"bit")){const t=e;return this.isBit(t.bit)}return!1}isBit(e){if(Object.prototype.hasOwnProperty.call(e,"type")){const t=e;return n.Config.getBitType(t.type)!==a.BitType._error}return!1}bitToBitWrapper(e){return{bit:e}}bitToAst(e,t){var i,o,l,c,y;const{statement:g,product:d,productVideo:T,reference:f}=e,m=r(e,["statement","product","productVideo","reference"]),h=e.type===a.BitType._comment&&void 0!==e.originalType,b=n.Config.getBitType(h?e.originalType:e.type),B=n.Config.getBitConfig(b),v=s.DeprecatedTextFormat.fromValue(e.format);let C=null!==(i=p.TextFormat.fromValue(e.format))&&void 0!==i?i:B.textFormatDefault;v===s.DeprecatedTextFormat.bitmarkMinusMinus&&(C=p.TextFormat.bitmarkText);return u.buildBit(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},m),{bitType:b,bitLevel:Math.max(Math.min(null!==(o=e.bitLevel)&&void 0!==o?o:1,n.Config.bitLevelMax),n.Config.bitLevelMin),textFormat:e.format,resourceType:this.getResourceType(e.resource),isCommented:h,internalComment:t,productList:d,productVideoList:T}),this.processReference(f)),this.parseExample(e.example)),{person:null!==(l=e.partner)&&void 0!==l?l:e.person,markConfig:e.marks,resources:this.processResources(b,e.resource,e.images,e.logos),body:this.processBody(e.body,e.placeholders),flashcards:e.cards,statements:this.processStatements(g,e.isCorrect,e.statements,e.example),responses:this.processResponses(b,e.responses),botResponses:this.processBotResponse(b,e.responses),cardBits:this.processListItems(null!==(y=null!==(c=e.listItems)&&void 0!==c?c:e.sections)&&void 0!==y?y:e.bookReferences,e.placeholders),footer:this.processFooter(e.footer)}))}processStatements(e,t,i,r){const o=[];if(e){const i=Object.assign({statement:null!=e?e:"",isCorrect:null!=t&&t},this.parseExample(r));i&&o.push(i)}if(Array.isArray(i))for(const e of i)o.push(e);if(0!==o.length)return o}processResponses(e,t){if(!n.Config.isOfBitType(e,a.BitType.botActionResponse)&&Array.isArray(t))return t}processBotResponse(e,t){if(n.Config.isOfBitType(e,a.BitType.botActionResponse)&&Array.isArray(t))return t}processListItems(e,t){const i=[];if(Array.isArray(e))for(const r of e){const e=Object.assign({},r);e.body&&(e.body={body:e.body,placeholders:t}),e&&i.push(e)}if(0!==i.length)return i}getResourceType(e){if(e){return l.ResourceTag.fromValue(e.type)}}processResources(e,t,i,r){const o=[];if(t&&o.push(t),n.Config.isOfBitType(e,[a.BitType.prototypeImages])&&Array.isArray(i))for(const e of i)e&&o.push(e);if(n.Config.isOfBitType(e,[a.BitType.imagesLogoGrave])&&Array.isArray(r))for(const e of r)e&&o.push(e);return o}processBody(e,t){return{body:e,placeholders:t}}processFooter(e){if(e)return{footer:e}}processReference(e){return Array.isArray(e)&&e.length>0?{reference:void 0,referenceProperty:e}:{reference:e,referenceProperty:void 0}}parseExample(e){if(null==e)return;if(!0===e)return{example:!0};if(!1===e)return{example:!1};const t=c.StringUtils.isString(e)||Array.isArray(e)?e:void 0;return t?{example:t}:{example:!!e}}}},5809:function(e,t,i){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Builder=void 0;const o=r(i(7678)),n=i(7735),a=i(2028),s=i(9888),l=i(5854),p=i(4410),c=i(6220),u=i(6149),y=i(385),g=i(6877),d=i(6989),T=i(8903),f=i(4078),m=i(8025),h=i(955),b=i(9681),B=i(6936),v=i(4470),C=i(5533),x=i(4564);class P extends v.BaseBuilder{constructor(){super(...arguments),this.resourceBuilder=new C.ResourceBuilder}buildBitmark(e){const{bits:t,errors:i}=e,r={bits:t,errors:i};return h.ObjectUtils.removeUnwantedProperties(r),r}buildBit(e){var t,i,r,o,n,T,f;const b=a.Config.getBitConfig(e.bitType),B=e.bitType,v=c.DeprecatedTextFormat.fromValue(e.textFormat);let C=null!==(t=y.TextFormat.fromValue(e.textFormat))&&void 0!==t?t:b.textFormatDefault;v===c.DeprecatedTextFormat.bitmarkMinusMinus&&(C=y.TextFormat.bitmarkText);const P={bitConfig:b,bitType:B,textFormat:C},k=this.buildCardNode(P,e),K=a.Config.isOfBitType(e.bitType,l.BitType.essay)?this.toAstProperty(s.PropertyConfigKey.reasonableNumOfChars,e.reasonableNumOfChars):void 0,w=Object.assign({},this.toExample(e.__isDefaultExample,e.example)),_=Object.assign(Object.assign({bitType:B,bitLevel:e.bitLevel,textFormat:C,resourceType:u.ResourceTag.fromValue(e.resourceType),isCommented:e.isCommented,id:this.toAstProperty(s.PropertyConfigKey.id,e.id),internalComment:this.toAstProperty(s.PropertyConfigKey.internalComment,e.internalComment),customerId:this.toAstProperty(s.PropertyConfigKey.customerId,e.customerId),customerExternalId:this.toAstProperty(s.PropertyConfigKey.customerExternalId,e.customerExternalId),externalId:this.toAstProperty(s.PropertyConfigKey.externalId,e.externalId),spaceId:this.toAstProperty(s.PropertyConfigKey.spaceId,e.spaceId),padletId:this.toAstProperty(s.PropertyConfigKey.padletId,e.padletId),jupyterId:this.toAstProperty(s.PropertyConfigKey.jupyterId,e.jupyterId),jupyterExecutionCount:this.toAstProperty(s.PropertyConfigKey.jupyterExecutionCount,e.jupyterExecutionCount),isPublic:this.toAstProperty(s.PropertyConfigKey.isPublic,e.isPublic),aiGenerated:this.toAstProperty(s.PropertyConfigKey.aiGenerated,e.aiGenerated),machineTranslated:this.toAstProperty(s.PropertyConfigKey.machineTranslated,e.machineTranslated),searchIndex:this.toAstProperty(s.PropertyConfigKey.searchIndex,e.searchIndex),analyticsTag:this.toAstProperty(s.PropertyConfigKey.analyticsTag,e.analyticsTag),categoryTag:this.toAstProperty(s.PropertyConfigKey.categoryTag,e.categoryTag),topicTag:this.toAstProperty(s.PropertyConfigKey.topicTag,e.topicTag),altLangTag:this.toAstProperty(s.PropertyConfigKey.altLangTag,e.altLangTag),feedbackEngine:this.toAstProperty(s.PropertyConfigKey.feedbackEngine,e.feedbackEngine),feedbackType:this.toAstProperty(s.PropertyConfigKey.feedbackType,e.feedbackType),disableFeedback:this.toAstProperty(s.PropertyConfigKey.disableFeedback,e.disableFeedback),diffTo:this.toAstProperty(s.PropertyConfigKey.diffTo,e.diffTo),diffOp:this.toAstProperty(s.PropertyConfigKey.diffOp,e.diffOp),diffRef:this.toAstProperty(s.PropertyConfigKey.diffRef,e.diffRef),diffContext:this.toAstProperty(s.PropertyConfigKey.diffContext,e.diffContext),diffTime:this.toAstProperty(s.PropertyConfigKey.diffTime,e.diffTime),path:this.toAstProperty(s.PropertyConfigKey.path,e.path),releaseVersion:this.toAstProperty(s.PropertyConfigKey.releaseVersion,e.releaseVersion),releaseKind:this.toAstProperty(s.PropertyConfigKey.releaseKind,e.releaseKind),releaseDate:this.toAstProperty(s.PropertyConfigKey.releaseDate,e.releaseDate),book:this.buildBooks(P,e.book),ageRange:this.toAstProperty(s.PropertyConfigKey.ageRange,e.ageRange),lang:this.toAstProperty(s.PropertyConfigKey.lang,e.lang),language:this.toAstProperty(s.PropertyConfigKey.language,e.language),publisher:this.toAstProperty(s.PropertyConfigKey.publisher,e.publisher),publisherName:this.toAstProperty(s.PropertyConfigKey.publisherName,e.publisherName),theme:this.toAstProperty(s.PropertyConfigKey.theme,e.theme),computerLanguage:this.toAstProperty(s.PropertyConfigKey.computerLanguage,e.computerLanguage),target:this.toAstProperty(s.PropertyConfigKey.target,e.target),slug:this.toAstProperty(s.PropertyConfigKey.slug,e.slug),tag:this.toAstProperty(s.PropertyConfigKey.tag,e.tag),reductionTag:this.toAstProperty(s.PropertyConfigKey.reductionTag,e.reductionTag),bubbleTag:this.toAstProperty(s.PropertyConfigKey.bubbleTag,e.bubbleTag),levelCEFRp:this.toAstProperty(s.PropertyConfigKey.levelCEFRp,e.levelCEFRp),levelCEFR:this.toAstProperty(s.PropertyConfigKey.levelCEFR,e.levelCEFR),levelILR:this.toAstProperty(s.PropertyConfigKey.levelILR,e.levelILR),levelACTFL:this.toAstProperty(s.PropertyConfigKey.levelACTFL,e.levelACTFL),icon:this.toAstProperty(s.PropertyConfigKey.icon,e.icon),iconTag:this.toAstProperty(s.PropertyConfigKey.iconTag,e.iconTag),colorTag:this.toAstProperty(s.PropertyConfigKey.colorTag,e.colorTag),flashcardSet:this.toAstProperty(s.PropertyConfigKey.flashcardSet,e.flashcardSet),subtype:this.toAstProperty(s.PropertyConfigKey.subtype,e.subtype),bookAlias:this.toAstProperty(s.PropertyConfigKey.bookAlias,e.bookAlias),bookDiff:this.toAstProperty(s.PropertyConfigKey.bookDiff,e.bookDiff),coverImage:this.toAstProperty(s.PropertyConfigKey.coverImage,e.coverImage),coverColor:this.toAstProperty(s.PropertyConfigKey.coverColor,e.coverColor),publications:this.toAstProperty(s.PropertyConfigKey.publications,e.publications),author:this.toAstProperty(s.PropertyConfigKey.author,e.author),subject:this.toAstProperty(s.PropertyConfigKey.subject,e.subject),date:this.toAstProperty(s.PropertyConfigKey.date,e.date),dateEnd:this.toAstProperty(s.PropertyConfigKey.dateEnd,e.dateEnd),location:this.toAstProperty(s.PropertyConfigKey.location,e.location),kind:this.toAstProperty(s.PropertyConfigKey.kind,e.kind),hasMarkAsDone:this.toAstProperty(s.PropertyConfigKey.hasMarkAsDone,e.hasMarkAsDone),processHandIn:this.toAstProperty(s.PropertyConfigKey.processHandIn,e.processHandIn),chatWithBook:this.toAstProperty(s.PropertyConfigKey.chatWithBook,e.chatWithBook),chatWithBookBrainKey:this.toAstProperty(s.PropertyConfigKey.chatWithBookBrainKey,e.chatWithBookBrainKey),action:this.toAstProperty(s.PropertyConfigKey.action,e.action),showInIndex:this.toAstProperty(s.PropertyConfigKey.showInIndex,e.showInIndex),refAuthor:this.toAstProperty(s.PropertyConfigKey.refAuthor,e.refAuthor),refBookTitle:this.toAstProperty(s.PropertyConfigKey.refBookTitle,e.refBookTitle),refPublisher:this.toAstProperty(s.PropertyConfigKey.refPublisher,e.refPublisher),refPublicationYear:this.toAstProperty(s.PropertyConfigKey.refPublicationYear,e.refPublicationYear),citationStyle:this.toAstProperty(s.PropertyConfigKey.citationStyle,e.citationStyle),blockId:this.toAstProperty(s.PropertyConfigKey.blockId,e.blockId),pageNo:this.toAstProperty(s.PropertyConfigKey.pageNo,e.pageNo),x:this.toAstProperty(s.PropertyConfigKey.x,e.x),y:this.toAstProperty(s.PropertyConfigKey.y,e.y),width:this.toAstProperty(s.PropertyConfigKey.width,e.width),height:this.toAstProperty(s.PropertyConfigKey.height,e.height),index:this.toAstProperty(s.PropertyConfigKey.index,e.index),classification:this.toAstProperty(s.PropertyConfigKey.classification,e.classification),availableClassifications:this.toAstProperty(s.PropertyConfigKey.availableClassifications,e.availableClassifications),allowedBit:this.toAstProperty(s.PropertyConfigKey.allowedBit,e.allowedBit),tableFixedHeader:this.toAstProperty(s.PropertyConfigKey.tableFixedHeader,e.tableFixedHeader),tableSearch:this.toAstProperty(s.PropertyConfigKey.tableSearch,e.tableSearch),tableSort:this.toAstProperty(s.PropertyConfigKey.tableSort,e.tableSort),tablePagination:this.toAstProperty(s.PropertyConfigKey.tablePagination,e.tablePagination),tablePaginationLimit:this.toAstProperty(s.PropertyConfigKey.tablePaginationLimit,e.tablePaginationLimit),tableHeight:this.toAstProperty(s.PropertyConfigKey.tableHeight,e.tableHeight),tableWhitespaceNoWrap:this.toAstProperty(s.PropertyConfigKey.tableWhitespaceNoWrap,e.tableWhitespaceNoWrap),tableAutoWidth:this.toAstProperty(s.PropertyConfigKey.tableAutoWidth,e.tableAutoWidth),tableResizableColumns:this.toAstProperty(s.PropertyConfigKey.tableResizableColumns,e.tableResizableColumns),tableColumnMinWidth:this.toAstProperty(s.PropertyConfigKey.tableColumnMinWidth,e.tableColumnMinWidth),quizCountItems:this.toAstProperty(s.PropertyConfigKey.quizCountItems,e.quizCountItems),quizStrikethroughSolutions:this.toAstProperty(s.PropertyConfigKey.quizStrikethroughSolutions,e.quizStrikethroughSolutions),codeLineNumbers:this.toAstProperty(s.PropertyConfigKey.codeLineNumbers,e.codeLineNumbers),codeMinimap:this.toAstProperty(s.PropertyConfigKey.codeMinimap,e.codeMinimap),stripePricingTableId:this.toAstProperty(s.PropertyConfigKey.stripePricingTableId,e.stripePricingTableId),stripePublishableKey:this.toAstProperty(s.PropertyConfigKey.stripePublishableKey,e.stripePublishableKey),thumbImage:this.toAstProperty(s.PropertyConfigKey.thumbImage,e.thumbImage),scormSource:this.toAstProperty(s.PropertyConfigKey.scormSource,e.scormSource),posterImage:this.toAstProperty(s.PropertyConfigKey.posterImage,e.posterImage),focusX:this.toAstProperty(s.PropertyConfigKey.focusX,e.focusX),focusY:this.toAstProperty(s.PropertyConfigKey.focusY,e.focusY),pointerLeft:this.toAstProperty(s.PropertyConfigKey.pointerLeft,e.pointerLeft),pointerTop:this.toAstProperty(s.PropertyConfigKey.pointerTop,e.pointerTop),listItemIndent:this.toAstProperty(s.PropertyConfigKey.listItemIndent,e.listItemIndent),backgroundWallpaper:this.toImageResource(P,e.backgroundWallpaper),hasBookNavigation:this.toAstProperty(s.PropertyConfigKey.hasBookNavigation,e.hasBookNavigation),duration:this.toAstProperty(s.PropertyConfigKey.duration,e.duration),deeplink:this.toAstProperty(s.PropertyConfigKey.deeplink,e.deeplink),externalLink:this.toAstProperty(s.PropertyConfigKey.externalLink,e.externalLink),externalLinkText:this.toAstProperty(s.PropertyConfigKey.externalLinkText,e.externalLinkText),videoCallLink:this.toAstProperty(s.PropertyConfigKey.videoCallLink,e.videoCallLink),vendorDashboardId:this.toAstProperty(s.PropertyConfigKey.vendorDashboardId,e.vendorDashboardId),vendorSurveyId:this.toAstProperty(s.PropertyConfigKey.vendorSurveyId,e.vendorSurveyId),vendorUrl:this.toAstProperty(s.PropertyConfigKey.vendorUrl,e.vendorUrl),search:this.toAstProperty(s.PropertyConfigKey.search,e.search),list:this.toAstProperty(s.PropertyConfigKey.list,e.list),layer:this.toAstProperty(s.PropertyConfigKey.layer,e.layer),layerRole:this.toAstProperty(s.PropertyConfigKey.layerRole,e.layerRole),textReference:this.toAstProperty(s.PropertyConfigKey.textReference,e.textReference),isTracked:this.toAstProperty(s.PropertyConfigKey.isTracked,e.isTracked),isInfoOnly:this.toAstProperty(s.PropertyConfigKey.isInfoOnly,e.isInfoOnly),imageFirst:this.toAstProperty(s.PropertyConfigKey.imageFirst,e.imageFirst),activityType:this.toAstProperty(s.PropertyConfigKey.activityType,e.activityType),labelTrue:this.toAstProperty(s.PropertyConfigKey.labelTrue,e.labelTrue),labelFalse:this.toAstProperty(s.PropertyConfigKey.labelFalse,e.labelFalse),content2Buy:this.toAstProperty(s.PropertyConfigKey.content2Buy,e.content2Buy),mailingList:this.toAstProperty(s.PropertyConfigKey.mailingList,e.mailingList),buttonCaption:this.toAstProperty(s.PropertyConfigKey.buttonCaption,e.buttonCaption),callToActionUrl:this.toAstProperty(s.PropertyConfigKey.callToActionUrl,e.callToActionUrl),caption:this.handleJsonText(P,g.TextLocation.tag,e.caption),quotedPerson:this.toAstProperty(s.PropertyConfigKey.quotedPerson,e.quotedPerson),reasonableNumOfChars:K,resolved:this.toAstProperty(s.PropertyConfigKey.resolved,e.resolved),resolvedDate:this.toAstProperty(s.PropertyConfigKey.resolvedDate,e.resolvedDate),resolvedBy:this.toAstProperty(s.PropertyConfigKey.resolvedBy,e.resolvedBy),handInAcceptFileType:this.toAstProperty(s.PropertyConfigKey.handInAcceptFileType,e.handInAcceptFileType),handInRequirement:this.toAstProperty(s.PropertyConfigKey.handInRequirement,e.handInRequirement),handInInstruction:this.toAstProperty(s.PropertyConfigKey.handInInstruction,e.handInInstruction),maxCreatedBits:this.toAstProperty(s.PropertyConfigKey.maxCreatedBits,e.maxCreatedBits),maxDisplayLevel:this.toAstProperty(s.PropertyConfigKey.maxDisplayLevel,e.maxDisplayLevel),maxTocChapterLevel:this.toAstProperty(s.PropertyConfigKey.maxTocChapterLevel,e.maxTocChapterLevel),page:this.toAstProperty(s.PropertyConfigKey.page,e.page),productId:this.toAstProperty(s.PropertyConfigKey.productId,e.productId),product:this.toAstProperty(s.PropertyConfigKey.product,e.product),productList:this.toAstProperty(s.PropertyConfigKey.productList,e.productList),productVideo:this.toAstProperty(s.PropertyConfigKey.productVideo,e.productVideo),productVideoList:this.toAstProperty(s.PropertyConfigKey.productVideoList,e.productVideoList),productFolder:this.toAstProperty(s.PropertyConfigKey.productFolder,e.productFolder),technicalTerm:this.buildTechnicalTerm(P,e.technicalTerm),servings:this.buildServings(P,e.servings),ratingLevelStart:this.buildRatingLevelStartEnd(P,e.ratingLevelStart),ratingLevelEnd:this.buildRatingLevelStartEnd(P,e.ratingLevelEnd),ratingLevelSelected:this.toAstProperty(s.PropertyConfigKey.ratingLevelSelected,e.ratingLevelSelected),markConfig:this.buildMarkConfigs(P,e.markConfig),imageSource:this.buildImageSource(P,e.imageSource),person:this.buildPerson(P,e.person),bot:this.toAstProperty(s.PropertyConfigKey.bot,e.bot),referenceProperty:this.toAstProperty(s.PropertyConfigKey.property_reference,e.referenceProperty),title:this.handleJsonText(P,g.TextLocation.tag,e.title),subtitle:this.handleJsonText(P,g.TextLocation.tag,e.subtitle),level:m.NumberUtils.asNumber(e.level),toc:this.toAstProperty(s.PropertyConfigKey.toc,e.toc),progress:this.toAstProperty(s.PropertyConfigKey.progress,e.progress),anchor:e.anchor,reference:e.reference,referenceEnd:e.referenceEnd,revealSolutions:this.toAstProperty(s.PropertyConfigKey.revealSolutions,e.revealSolutions),item:this.handleJsonText(P,g.TextLocation.tag,e.item),lead:this.handleJsonText(P,g.TextLocation.tag,e.lead),pageNumber:this.handleJsonText(P,g.TextLocation.tag,e.pageNumber),marginNumber:this.handleJsonText(P,g.TextLocation.tag,e.marginNumber),hint:this.handleJsonText(P,g.TextLocation.tag,e.hint),instruction:this.handleJsonText(P,g.TextLocation.tag,e.instruction),partialAnswer:this.toAstProperty(s.PropertyConfigKey.partialAnswer,e.partialAnswer),sampleSolution:this.toAstProperty(s.PropertyConfigKey.property_sampleSolution,e.sampleSolution),additionalSolutions:this.toAstProperty(s.PropertyConfigKey.additionalSolutions,e.additionalSolutions)},this.toExample(e.__isDefaultExample,e.example)),{imagePlaceholder:this.toImageResource(P,e.imagePlaceholder),resources:d.ArrayUtils.asArray(this.resourceBuilder.resourceFromResourceJson(P,e.resources)),body:this.buildBody(P,e.body),cardNode:k,footer:this.buildFooter(P,e.footer),extraProperties:this.parseExtraProperties(e.extraProperties),markup:e.markup,parser:e.parser,__isDefaultExample:null!==(i=e.__isDefaultExample)&&void 0!==i&&i});return a.Config.isOfBitType(_.bitType,l.BitType.interview)&&this.pushDownTree(P,void 0,void 0,k,"questions",s.PropertyConfigKey.reasonableNumOfChars,e.reasonableNumOfChars),a.Config.isOfBitType(_.bitType,l.BitType.feedback)&&this.pushDownTree(P,void 0,void 0,k,["feedbacks","reason"],s.PropertyConfigKey.reasonableNumOfChars,e.reasonableNumOfChars),this.pushDownTree(P,[_.body,...null!==(o=null===(r=null==k?void 0:k.cardBits)||void 0===r?void 0:r.map((e=>e.body)))&&void 0!==o?o:[]],[p.BodyBitType.gap],void 0,void 0,s.PropertyConfigKey.isCaseSensitive,null===(n=e.isCaseSensitive)||void 0===n||n),this.pushDownTree(P,void 0,void 0,k,"pairs",s.PropertyConfigKey.isCaseSensitive,null===(T=e.isCaseSensitive)||void 0===T||T),this.pushDownTree(P,void 0,void 0,k,["matrix","cells"],s.PropertyConfigKey.isCaseSensitive,null===(f=e.isCaseSensitive)||void 0===f||f),this.pushExampleDownTree(P,_.body,k,_.__isDefaultExample,w.example),this.setDefaultBitValues(_),this.setIsExampleFlags(_),this.addVersionToParserInfo(_),h.ObjectUtils.removeUnwantedProperties(_,{ignoreAllFalse:!0,ignoreUndefined:["example"],ignoreEmptyArrays:["item","lead","pageNumber","marginNumber","hint","instruction"]}),x.NodeValidator.validateBit(_)}buildBooks(e,t){if(b.StringUtils.isString(t))return t;if(!Array.isArray(t))return;const i=t.map((t=>this.buildBook(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildBook(e,t){var i,r,o;if(!t)return;const n={book:null!==(i=t.book)&&void 0!==i?i:"",reference:null!==(r=t.reference)&&void 0!==r?r:"",referenceEnd:null!==(o=t.referenceEnd)&&void 0!==o?o:void 0};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreEmptyString:["book","reference"]}),n}buildFeedbackChoices(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildFeedbackChoice(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildFeedbackChoice(e,t){var i;if(!t)return;const r=Object.assign({choice:null!==(i=t.choice)&&void 0!==i?i:"",requireReason:!!t.requireReason,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!0));return h.ObjectUtils.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),r}buildFeedbackReason(e,t){var i,r;if(!t)return;const o=this.handleJsonText(e,g.TextLocation.tag,"true"),n=Object.assign(Object.assign({text:null!==(i=t.text)&&void 0!==i?i:"",reasonableNumOfChars:null!==(r=t.reasonableNumOfChars)&&void 0!==r?r:void 0,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,o)),{__textAst:t.__textAst});return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example","reasonableNumOfChars"]}),n}buildChoices(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildChoice(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildChoice(e,t){var i;if(!t)return;const r=Object.assign({choice:null!==(i=t.choice)&&void 0!==i?i:"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),r}buildResponses(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildResponse(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildResponse(e,t){var i;if(!t)return;const r=Object.assign({response:null!==(i=t.response)&&void 0!==i?i:"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"]}),r}buildBotResponses(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.botResponse(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}botResponse(e,t){var i,r,o;if(!t)return;const n={response:null!==(i=t.response)&&void 0!==i?i:"",reaction:null!==(r=t.reaction)&&void 0!==r?r:"",feedback:null!==(o=t.feedback)&&void 0!==o?o:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint)};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreEmptyString:["response","reaction","feedback"],ignoreAllFalse:!0,ignoreEmptyArrays:["item"],ignoreUndefined:["example"]}),n}buildFeedbacks(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildFeedback(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildFeedback(e,t){if(!t)return;let i,r;if(!t.choices)return;i=this.buildFeedbackChoices(e,t.choices),t.reason&&(r=this.buildFeedbackReason(e,t.reason));const o={item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),choices:i,reason:r};return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"]}),o}buildQuizzes(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildQuiz(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildQuiz(e,t){if(!t)return;const i=Object.assign({},this.toExample(t.__isDefaultExample,t.__defaultExample));let r,o;if(t.choices)r=this.buildChoices(e,t.choices),this.pushExampleDownTreeBoolean(e,t.__isDefaultExample,i.example,!0,r);else{if(!t.responses)return;o=this.buildResponses(e,t.responses),this.pushExampleDownTreeBoolean(e,t.__isDefaultExample,i.example,!1,o)}const n={item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isExample:!!t.__defaultExample,choices:r,responses:o};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"]}),n}buildHeading(e,t){var i,r,o;if(!t)return;if(null==t.forKeys)return;const n={forKeys:null!==(i=t.forKeys)&&void 0!==i?i:"",forValues:null!==(o=null!==(r=t.forValues)&&void 0!==r?r:t.__forValuesDefault)&&void 0!==o?o:""};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreEmptyString:["forKeys","forValues"],ignoreEmptyArrays:["forValues"]}),n}buildPairs(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildPair(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildPair(e,t){var i,r;if(!t)return;const o=Array.isArray(t.__valuesAst)&&t.__valuesAst.length>0?t.__valuesAst[0]:null,n=this.resourceBuilder.resourceFromResourceJson(e,t.keyAudio),a=this.resourceBuilder.resourceFromResourceJson(e,t.keyImage),s=Object.assign(Object.assign({key:null!==(i=t.key)&&void 0!==i?i:"",keyAudio:n,keyImage:a,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isCaseSensitive:t.isCaseSensitive},this.toExample(t.__isDefaultExample,t.example,o)),{values:null!==(r=t.values)&&void 0!==r?r:[],__valuesAst:t.__valuesAst});return h.ObjectUtils.removeUnwantedProperties(s,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction","values"],ignoreUndefined:["example","isCaseSensitive"]}),s}buildMatricies(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildMatrix(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildMatrix(e,t){var i,r,o;if(!t)return;let n=!1;for(const e of null!==(i=t.cells)&&void 0!==i?i:[])t.__isDefaultExample&&!e.isExample&&(e.isExample=!0),n=!!e.isExample||n;const a={key:null!==(r=t.key)&&void 0!==r?r:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isExample:n,cells:(null!==(o=t.cells)&&void 0!==o?o:[]).map((t=>this.buildMatrixCell(e,t))).filter((e=>null!=e))};return h.ObjectUtils.removeUnwantedProperties(a,{ignoreAllFalse:!0,ignoreEmptyArrays:["hint","item","cells"],ignoreUndefined:["isCaseSensitive"]}),a}buildMatrixCell(e,t){var i;if(!t)return;const r=Array.isArray(t.__valuesAst)&&t.__valuesAst.length>0?t.__valuesAst[0]:null,o=Object.assign(Object.assign({values:null!==(i=t.values)&&void 0!==i?i:[],item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isCaseSensitive:t.isCaseSensitive},this.toExample(t.__isDefaultExample,t.example,r)),{__valuesAst:t.__valuesAst});return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreEmptyArrays:["instruction","item","values"],ignoreUndefined:["example","isCaseSensitive"]}),o}buildPronunciationTable(e,t){var i;if(!t)return;return{data:(null!==(i=t.data)&&void 0!==i?i:[]).map((t=>(null!=t?t:[]).map((t=>{const i=this.resourceBuilder.resourceFromResourceJson(e,t.audio);return{title:this.handleJsonText(e,g.TextLocation.tag,t.title),body:this.handleJsonText(e,g.TextLocation.tag,t.body),audio:i}}))))}}buildTable(e,t){var i,r;if(!t)return;return{columns:(null!==(i=t.columns)&&void 0!==i?i:[]).map((t=>this.handleJsonText(e,g.TextLocation.tag,t))),data:(null!==(r=t.data)&&void 0!==r?r:[]).map((t=>(null!=t?t:[]).map((t=>this.handleJsonText(e,g.TextLocation.tag,t)))))}}buildQuestions(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildQuestion(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildQuestion(e,t){var i,r,o,n,a;if(!t)return;const s=t.__sampleSolutionAst,l=Object.assign(Object.assign({question:null!==(i=t.question)&&void 0!==i?i:"",partialAnswer:null!==(r=t.partialAnswer)&&void 0!==r?r:"",sampleSolution:null!==(o=t.sampleSolution)&&void 0!==o?o:"",additionalSolutions:null!==(n=t.additionalSolutions)&&void 0!==n?n:void 0,reasonableNumOfChars:null!==(a=t.reasonableNumOfChars)&&void 0!==a?a:void 0,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,s)),{__sampleSolutionAst:t.__sampleSolutionAst});return h.ObjectUtils.removeUnwantedProperties(l,{ignoreAllFalse:!0,ignoreEmptyArrays:["item","hint","instruction"],ignoreUndefined:["example"],ignoreEmptyString:["question","partialAnswer","sampleSolution"]}),l}buildIngredients(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildIngredient(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildIngredient(e,t){var i,r,o,n,a,s;if(!t)return;const l={title:this.handleJsonText(e,g.TextLocation.tag,t.title),checked:null!==(i=t.checked)&&void 0!==i&&i,ingredient:this.handleJsonText(e,g.TextLocation.tag,t.ingredient),quantity:null!==(r=t.quantity)&&void 0!==r?r:0,unit:null!==(o=t.unit)&&void 0!==o?o:"",unitAbbr:null!==(n=t.unitAbbr)&&void 0!==n?n:"",decimalPlaces:null!==(a=t.decimalPlaces)&&void 0!==a?a:1,disableCalculation:null!==(s=t.disableCalculation)&&void 0!==s&&s,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint)};return h.ObjectUtils.removeUnwantedProperties(l,{ignoreAllFalse:!0,ignoreEmptyString:["item","unit"]}),l}buildBody(e,t){if(!t)return;let i;const r=[],a=t.placeholders,s=t.bodyString,{textFormat:l}=e,c=()=>{var s;let c,u=t.body;const y={};if(b.StringUtils.isString(t.body)?(c=(null!==(s=t.body)&&void 0!==s?s:"").trim(),u=[]):Array.isArray(t.body)||(u=[]),a)for(const[e,t]of Object.entries(a))y[e]=t;if(c){c=n.Breakscape.breakscape(c,{textFormat:l,textLocation:g.TextLocation.body,v2:!0});let e=0;const t=[];for(const[i,r]of Object.entries(y))if(c){const o=`[!${e}]`;c=c.replace(`${i}`,o),t.push(r),e++}u=this.textParser.toAst(c,{textFormat:l,textLocation:g.TextLocation.body});const i=e=>{for(let r=0,o=e.length;r<o;r++){const o=e[r];if("bit"===o.type){const i=o.index;null!=t[i]&&(e[r]=t[i])}else o.content&&i(o.content)}};i(u)}u=(0,o.default)(u),this.textParser.walkBodyBits(u,((t,i,o)=>{let n;switch(o.type){case p.BodyBitType.gap:n=this.buildGap(e,o);break;case p.BodyBitType.mark:n=this.buildMark(e,o);break;case p.BodyBitType.select:n=this.buildSelect(e,o);break;case p.BodyBitType.highlight:n=this.buildHighlight(e,o)}null!=n&&(t[i]=n,r.push(n))})),i=u,i.__tag="text"},u=l===y.TextFormat.bitmarkText;l===y.TextFormat.json?(()=>{if("string"==typeof t.body)try{i=JSON.parse(t.body)}catch(e){i=null}else i=t.body})():u?c():i=t.body;return{body:i,bodyBits:r,bodyString:s}}buildFooter(e,t){if(!t)return;return{footer:this.handleJsonText(e,g.TextLocation.body,t.footer)}}buildGap(e,t){var i;if(!t)return;const r=Array.isArray(t.__solutionsAst)&&t.__solutionsAst.length>0?t.__solutionsAst[0]:null;t=this.bodyBitCopyFromAttrs(t);const o=Object.assign(Object.assign({type:p.BodyBitType.gap,solutions:null!==(i=t.solutions)&&void 0!==i?i:[],item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction),isCaseSensitive:t.isCaseSensitive},this.toExample(t.__isDefaultExample,t.example,r)),{__solutionsAst:t.__solutionsAst,attrs:{}});return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example","isCaseSensitive"]}),o}buildMarkConfigs(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildMarkConfig(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildMarkConfig(e,t){var i,r,o;if(!t)return;const n={mark:null!==(i=t.mark)&&void 0!==i?i:"unknown",color:null!==(r=t.color)&&void 0!==r?r:"",emphasis:null!==(o=t.emphasis)&&void 0!==o?o:""};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllEmptyString:!0}),n}buildMark(e,t){var i,r;if(!t)return;t=this.bodyBitCopyFromAttrs(t);const o=Object.assign(Object.assign({type:p.BodyBitType.mark,solution:null!==(i=t.solution)&&void 0!==i?i:"",mark:null!==(r=t.mark)&&void 0!==r?r:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!0)),{attrs:{}});return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"],ignoreEmptyString:["solution","mark"]}),o}buildSelect(e,t){var i,r,o;if(!t)return;t=this.bodyBitCopyFromAttrs(t);const n=Object.assign(Object.assign({type:p.BodyBitType.select,options:null!==(i=this.buildSelectOptions(e,t.options))&&void 0!==i?i:[],prefix:null!==(r=t.prefix)&&void 0!==r?r:"",postfix:null!==(o=t.postfix)&&void 0!==o?o:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(!1,void 0,void 0)),{__hintString:t.__hintString,__instructionString:t.__instructionString,attrs:{}});return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreEmptyString:["prefix","postfix"]}),n}buildSelectOptions(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildSelectOption(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildSelectOption(e,t){var i;if(!t)return;const r=Object.assign({text:null!==(i=t.text)&&void 0!==i?i:"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"]}),r}buildHighlight(e,t){var i,r,o;if(!t)return;t=this.bodyBitCopyFromAttrs(t);const n=Object.assign(Object.assign({type:p.BodyBitType.highlight,texts:null!==(i=this.buildHighlightTexts(e,t.texts))&&void 0!==i?i:[],prefix:null!==(r=t.prefix)&&void 0!==r?r:"",postfix:null!==(o=t.postfix)&&void 0!==o?o:"",item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(!1,void 0,void 0)),{attrs:{}});return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreEmptyString:["prefix","postfix"]}),n}buildHighlightTexts(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildHighlightText(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildHighlightText(e,t){var i;if(!t)return;const r=Object.assign({text:null!==(i=t.text)&&void 0!==i?i:"",isCorrect:!!t.isCorrect,isHighlighted:!!t.isHighlighted,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreAllEmptyArrays:!0,ignoreUndefined:["example"]}),r}buildFlashcards(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildFlashcard(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildFlashcard(e,t){var i;if(!t)return;const r=Object.assign({question:this.buildTextAndIcon(e,t.question),answer:this.buildTextAndIcon(e,t.answer),alternativeAnswers:(null!==(i=t.alternativeAnswers)&&void 0!==i?i:[]).map((t=>this.buildTextAndIcon(e,t))).filter((e=>null!=e)),item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!0));return h.ObjectUtils.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreEmptyArrays:["question","answer","alternativeAnswers","item","hint","instruction"],ignoreUndefined:["example"]}),r}buildDefinitionList(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildDefinitionListItem(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildDefinitionListItem(e,t){var i;if(!t)return;const{bitType:r}=e,o=a.Config.isOfBitType(r,[l.BitType.metaSearchDefaultTerms]),n=Object.assign({term:this.buildTextAndIcon(e,t.term,o),definition:this.buildTextAndIcon(e,t.definition,o),alternativeDefinitions:(null!==(i=t.alternativeDefinitions)&&void 0!==i?i:[]).map((t=>this.buildTextAndIcon(e,t,o))).filter((e=>null!=e)),item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!0));return h.ObjectUtils.removeUnwantedProperties(n,{ignoreAllFalse:!0,ignoreEmptyArrays:["question","answer","alternativeDefinitions","item","hint","instruction"],ignoreUndefined:["example"]}),n}buildTextAndIcon(e,t,i=!1){const r=this.resourceBuilder.resourceFromResourceJson(e,null==t?void 0:t.icon);let o=this.handleJsonText(e,g.TextLocation.tag,null==t?void 0:t.text);i&&(o=this.textGenerator.generateSync(o,y.TextFormat.plainText,g.TextLocation.body,{noBreakscaping:!0}).trim());const n={text:o,icon:r};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreEmptyArrays:["text"],ignoreUndefined:["icon"]}),n}buildStatements(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildStatement(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildStatement(e,t){var i;if(!t)return;const r=Object.assign({statement:null!==(i=t.statement)&&void 0!==i?i:"",isCorrect:!!t.isCorrect,item:this.handleJsonText(e,g.TextLocation.tag,t.item),lead:this.handleJsonText(e,g.TextLocation.tag,t.lead),hint:this.handleJsonText(e,g.TextLocation.tag,t.hint),instruction:this.handleJsonText(e,g.TextLocation.tag,t.instruction)},this.toExample(t.__isDefaultExample,t.example,!!t.isCorrect));return h.ObjectUtils.removeUnwantedProperties(r,{ignoreAllFalse:!0,ignoreUndefined:["example"]}),r}buildImageSource(e,t){if(!t)return;const{url:i,mockupId:r,size:o,format:n,trim:a}=t,s={url:null!=i?i:"",mockupId:null!=r?r:"",size:null!=o?o:null,format:null!=n?n:null,trim:f.BooleanUtils.isBoolean(a)?a:null};return h.ObjectUtils.removeUnwantedProperties(s,{ignoreFalse:["trim"],ignoreEmptyString:["url","mockupId"],ignoreAllUndefined:!0}),s}buildPerson(e,t){if(!t)return;const{name:i,title:r,avatarImage:o}=t,n={name:null!=i?i:"",title:null!=r?r:void 0,avatarImage:this.resourceBuilder.resourceFromResourceJson(e,o)};return h.ObjectUtils.removeUnwantedProperties(n,{ignoreEmptyString:["name"],ignoreAllUndefined:!0}),n}buildTechnicalTerm(e,t){if(!t)return;const{technicalTerm:i,lang:r}=t,o={technicalTerm:null!=i?i:"",lang:null!=r?r:""};return h.ObjectUtils.removeUnwantedProperties(o,{ignoreEmptyString:["technicalTerm"]}),o}buildServings(e,t){if(!t)return;const{servings:i,unit:r,unitAbbr:o,decimalPlaces:n,disableCalculation:a,hint:s}=t,l={servings:null!=i?i:0,unit:null!=r?r:"",unitAbbr:null!=o?o:"",decimalPlaces:null!=n?n:1,disableCalculation:null!=a&&a,hint:null!=s?s:""};return h.ObjectUtils.removeUnwantedProperties(l,{ignoreEmptyString:["servings","unit"]}),l}buildRatingLevelStartEnd(e,t){if(!t)return;const{level:i,label:r}=t,o={level:null!=i?i:0,label:this.handleJsonText(e,g.TextLocation.tag,r)};return h.ObjectUtils.removeUnwantedProperties(o,{}),o}buildCardBits(e,t){if(!Array.isArray(t))return;const i=t.map((t=>this.buildCardBit(e,t))).filter((e=>null!=e));return i.length>0?i:void 0}buildCardBit(e,t){if(!t)return;const{bitType:i,textFormat:r}=e,o=this.buildBit(Object.assign(Object.assign({},t),{bitType:i,textFormat:r}));return h.ObjectUtils.removeUnwantedProperties(o,{ignoreAllFalse:!0,ignoreUndefined:["example"]}),x.NodeValidator.validateCardBit(o)}toImageResource(e,t){return d.ArrayUtils.asSingle(this.resourceBuilder.resourceFromResourceDataJson(e,u.ResourceTag.image,null==t?void 0:t.image))}buildCardNode(e,t){var i;const r={heading:this.buildHeading(e,t.heading),questions:this.buildQuestions(e,t.questions),elements:t.elements,flashcards:this.buildFlashcards(e,t.flashcards),definitions:this.buildDefinitionList(e,null!==(i=t.definitions)&&void 0!==i?i:t.legend),statement:this.buildStatement(e,t.statement),statements:this.buildStatements(e,t.statements),choices:this.buildChoices(e,t.choices),responses:this.buildResponses(e,t.responses),feedbacks:this.buildFeedbacks(e,t.feedbacks),quizzes:this.buildQuizzes(e,t.quizzes),pairs:this.buildPairs(e,t.pairs),matrix:this.buildMatricies(e,t.matrix),pronunciationTable:this.buildPronunciationTable(e,t.pronunciationTable),table:this.buildTable(e,t.table),botResponses:this.buildBotResponses(e,t.botResponses),ingredients:this.buildIngredients(e,t.ingredients),cardBits:this.buildCardBits(e,t.cardBits)};return h.ObjectUtils.removeUnwantedProperties(r),Object.keys(r).length>0?r:void 0}bodyBitCopyFromAttrs(e){const t=Object.assign({},e);if(e.attrs)for(const[i,r]of Object.entries(e.attrs))t[i]=r;return t}pushExampleDownTree(e,t,i,r,o){if(r||null!=o){if(i){if(this.pushExampleDownTreeString(e,r,o,i.pairs),this.pushExampleDownTreeBoolean(e,r,o,!1,i.flashcards),this.pushExampleDownTreeBoolean(e,r,o,!1,i.definitions),this.pushExampleDownTreeBoolean(e,r,o,!0,i.choices),this.pushExampleDownTreeBoolean(e,r,o,!1,i.responses,i.statements,i.statement),i.quizzes)for(const t of i.quizzes)this.pushExampleDownTreeBoolean(e,r,o,!0,t.choices),this.pushExampleDownTreeBoolean(e,r,o,!1,t.responses);if(i.matrix)for(const t of i.matrix)this.pushExampleDownTreeString(e,r,o,t.cells)}t&&this.pushExampleDownTreeBodyBits(e,r,o,t)}}pushExampleDownTreeBoolean(e,t,i,r,...o){if((t||null!=i)&&Array.isArray(o))for(const e of o)if(e){const o=Array.isArray(e)?e:[e];T.BitUtils.fillBooleanExample(o,t,i,r)}}pushExampleDownTreeString(e,t,i,...r){if((t||i)&&Array.isArray(r))for(const o of r)if(o){const r=Array.isArray(o)?o:[o];T.BitUtils.fillStringExample(e.textFormat,r,t,i,!1)}}pushExampleDownTreeBodyBits(e,t,i,r){if(!t&&!i)return;const o=this.textParser.extractBodyBits(null==r?void 0:r.body);for(const r of o)if(r)switch(r.type){case p.BodyBitType.gap:{const o=r;T.BitUtils.fillStringExample(e.textFormat,[o],t,i,!1);break}case p.BodyBitType.mark:{const e=r;T.BitUtils.fillBooleanExample([e],t,i,!1);break}case p.BodyBitType.select:{const e=r;T.BitUtils.fillBooleanExample(e.options,t,i,!0);break}case p.BodyBitType.highlight:{const e=r;T.BitUtils.fillBooleanExample(e.texts,t,i,!0);break}}}pushDownTree(e,t,i,r,o,n,a){if(void 0!==a){if(r&&o){Array.isArray(o)||(o=[o]);const e=h.ObjectUtils.flatMapPath(r,o);for(const t of e)null==t[n]&&(t[n]=a)}if(t){const e=Array.isArray(t)?t:[t];for(const t of e)if(t&&t.body&&i){const e=this.textParser.extractBodyBits(t.body);if(i&&e&&e.length>0)for(const t of e)if(t&&-1!==i.indexOf(t.type)){const e=t;null==e[n]&&(e[n]=a)}}}}}parseExtraProperties(e){if(!e)return;const t=Object.entries(e);if(0===t.length)return;const i={};for(const[e,r]of t)i[e]=d.ArrayUtils.asArray(r)||[r];return i}setIsExampleFlags(e){var t,i,r,o,n,a,s,l,c,u,y,g,d,T;const f=t=>!!t&&(t.isExample||null!=t.example?(t.isExample=!0,e.isExample=!0):t.isExample=t===e&&!!e.isExample,t.isExample),{body:m,cardNode:h}=e,b=this.textParser.extractBodyBits(null==m?void 0:m.body);for(const e of b)switch(e.type){case p.BodyBitType.gap:case p.BodyBitType.mark:f(e);break;case p.BodyBitType.select:{const t=e;let i=!1;for(const e of t.options)i=!!f(e)||i;t.isExample=i;break}case p.BodyBitType.highlight:{const t=e;let i=!1;for(const e of t.texts)i=!!f(e)||i;t.isExample=i;break}}if(h){for(const e of null!==(t=h.flashcards)&&void 0!==t?t:[])f(e);for(const e of null!==(i=h.definitions)&&void 0!==i?i:[])f(e);for(const e of null!==(r=h.pairs)&&void 0!==r?r:[])f(e);for(const e of null!==(o=h.matrix)&&void 0!==o?o:[]){let t=!1;for(const i of null!==(n=e.cells)&&void 0!==n?n:[])t=!!f(i)||t;e.isExample=t}for(const e of null!==(a=h.quizzes)&&void 0!==a?a:[]){let t=!1;for(const i of null!==(s=e.responses)&&void 0!==s?s:[])t=!!f(i)||t;for(const i of null!==(l=e.choices)&&void 0!==l?l:[])t=!!f(i)||t;e.isExample=t}for(const e of null!==(c=h.responses)&&void 0!==c?c:[])f(e);for(const e of null!==(u=h.choices)&&void 0!==u?u:[])f(e);for(const e of null!==(y=h.statements)&&void 0!==y?y:[])f(e);f(h.statement);for(const e of null!==(g=h.questions)&&void 0!==g?g:[])f(e)}f(e.statement);for(const t of null!==(d=e.responses)&&void 0!==d?d:[])f(t);for(const t of null!==(T=e.choices)&&void 0!==T?T:[])f(t);f(e)}setDefaultBitValues(e){switch(e.bitType){case l.BitType.articleAi:case l.BitType.noteAi:case l.BitType.summaryAi:e.aiGenerated=this.toAstProperty(s.PropertyConfigKey.aiGenerated,!0)}}addVersionToParserInfo(e){var t;const i=null!==(t=e.parser)&&void 0!==t?t:{};i.version=B.env.appVersion.full,e.parser=i}}t.Builder=P},5814:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardSetConfig=void 0;t.CardSetConfig=class{constructor(e,t){this.configKey=e,this.variants=t}toString(e){const t=Object.assign({},e);let i="",r=0,o=0;for(const e of this.variants){for(const n of e)i+=`[Card - Side ${r}, Variant ${o}]`,i+=`\n${n.toString(t)}`,o++;r++}return i}}},5837:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GROUPS=void 0;const r=i(7112),o=i(6915),n=i(9888),a=i(5051),s=i(7797),l=i(5512),p=i(3778),c=i(6149),u={[r.GroupConfigKey.group_standardAllBits]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.id,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.customerId},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.externalId,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.aiGenerated},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.machineTranslated},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.searchIndex,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.analyticsTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.categoryTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.topicTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.altLangTag},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.feedbackEngine},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.feedbackType},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.disableFeedback},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffTo},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffOp},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffRef},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffContext},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffTime},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.ageRange,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.lang},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.publisher,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.publisherName,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.theme,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.target,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reductionTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.bubbleTag,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.levelCEFRp},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.levelCEFR},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.levelILR},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.levelACTFL},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.icon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.iconTag},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.colorTag,maxCount:p.Count.infinity},{type:l.BitTagType.tag,configKey:s.TagConfigKey.anchor},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.search},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.showInIndex},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.layer,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.layerRole,maxCount:p.Count.infinity}]},[r.GroupConfigKey.group_standardItemLeadInstructionHint]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.itemLead,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.itemLead,maxCount:3}]},{type:l.BitTagType.tag,configKey:s.TagConfigKey.instruction},{type:l.BitTagType.tag,configKey:s.TagConfigKey.hint}]},[r.GroupConfigKey.group_standardExample]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.example}]},[r.GroupConfigKey.group_standardTags]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardAllBits},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardExample}]},[r.GroupConfigKey.group_imageSource]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.imageSource,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mockupId},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.size},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.format},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.trim}]}]},[r.GroupConfigKey.group_technicalTerm]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.technicalTerm,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.lang}]}]},[r.GroupConfigKey.group_person]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.person,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_title},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImage}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.partner,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_title},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImage}]}]},[r.GroupConfigKey.group_gap]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.gap,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.gap,maxCount:p.Count.infinity},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardExample},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}]}]},[r.GroupConfigKey.group_trueFalse]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:p.Count.infinity},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:p.Count.infinity},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardExample}]},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.true,maxCount:p.Count.infinity},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false,maxCount:p.Count.infinity},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardItemLeadInstructionHint},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardExample}]}]},[r.GroupConfigKey.group_markConfig]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.markConfig,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.color},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.emphasis}]}]},[r.GroupConfigKey.group_mark]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_mark,maxCount:p.Count.infinity,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_mark},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_standardExample}]}]},[r.GroupConfigKey.group_bookCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.language,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.customerExternalId,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.spaceId,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.kind},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.hasMarkAsDone},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.processHandIn},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isPublic},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.chatWithBook},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.chatWithBookBrainKey},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title,maxCount:2},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.subtype,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.coverImage,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.coverColor},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.subject,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.author,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.publications,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.maxTocChapterLevel}]},[r.GroupConfigKey.group_learningPathCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.action},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.date},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.dateEnd},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.location},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.list,maxCount:p.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.textReference},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isTracked},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isInfoOnly},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.deeplink},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.book,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference,maxCount:2}]}]},[r.GroupConfigKey.group_quizCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.revealSolutions}]},[r.GroupConfigKey.group_resourceBitTags]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imagePlaceholder,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImageCommon}],maxCount:1}]},[r.GroupConfigKey.group_resourceCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.license},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.copyright},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.caption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.showInIndex},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.search}]},[r.GroupConfigKey.group_resourceImageCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src1x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src2x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src3x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src4x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.alt},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.zoomDisabled}]},[r.GroupConfigKey.group_resourceAudioCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mute},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.autoplay}]},[r.GroupConfigKey.group_resourceVideoCommon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mute},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.autoplay},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.allowSubtitles},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.showSubtitles},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.alt},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.posterImage,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImageCommon}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src1x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src2x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src3x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.src4x}]},[r.GroupConfigKey.group_resourceIcon]:{type:o.GroupConfigType.standard,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.icon,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImageCommon}]}]},[r.GroupConfigKey.group_resourceImage]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.image,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImageCommon}]}]},[r.GroupConfigKey.group_resourceImagePortrait]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imagePortrait,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImageCommon}]}]},[r.GroupConfigKey.group_resourceImageLandscape]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imageLandscape,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImageCommon}]}]},[r.GroupConfigKey.group_resourceImageEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imageEmbed,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImageCommon}]}]},[r.GroupConfigKey.group_resourceImageLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.imageLink,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImageCommon}]}]},[r.GroupConfigKey.group_resourceAudio]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audio,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceAudioCommon}]}]},[r.GroupConfigKey.group_resourceAudioEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audioEmbed,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceAudioCommon}]}]},[r.GroupConfigKey.group_resourceAudioLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.audioLink,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceAudioCommon}]}]},[r.GroupConfigKey.group_resourceVideo]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.video,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceVideoCommon}]}]},[r.GroupConfigKey.group_resourceVideoEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.videoEmbed,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceVideoCommon}]}]},[r.GroupConfigKey.group_resourceVideoLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.videoLink,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceVideoCommon}]}]},[r.GroupConfigKey.group_resourceStillImageFilmEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.stillImageFilmEmbed,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceVideoCommon}]}]},[r.GroupConfigKey.group_resourceStillImageFilmLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.stillImageFilmLink,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceVideoCommon}]}]},[r.GroupConfigKey.group_resourceArticle]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.article,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon}]}]},[r.GroupConfigKey.group_resourceArticleEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.articleEmbed,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon}]}]},[r.GroupConfigKey.group_resourceArticleLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.articleLink,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon}]}]},[r.GroupConfigKey.group_resourceDocument]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.document,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon}]}]},[r.GroupConfigKey.group_resourceDocumentEmbed]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.documentEmbed,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon}]}]},[r.GroupConfigKey.group_resourceDocumentLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.documentLink,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon}]}]},[r.GroupConfigKey.group_resourceDocumentDownload]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.documentDownload,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon}]}]},[r.GroupConfigKey.group_resourceAppLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.appLink,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon}]}]},[r.GroupConfigKey.group_resourceWebsiteLink]:{type:o.GroupConfigType.resource,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.websiteLink,chain:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceCommon}]}]},[r.GroupConfigKey.group_resourceStillImageFilm]:{type:o.GroupConfigType.comboResource,comboResourceType:c.ResourceTag.stillImageFilm,tags:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImage,maxCount:1,minCount:1},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceAudio,maxCount:1,minCount:1}]},[r.GroupConfigKey.group_resourceImageResponsive]:{type:o.GroupConfigType.comboResource,comboResourceType:c.ResourceTag.imageResponsive,tags:[{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImagePortrait,maxCount:1,minCount:1},{type:l.BitTagType.group,configKey:r.GroupConfigKey.group_resourceImageLandscape,maxCount:1,minCount:1}]}};t.GROUPS=u},5854:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitType=void 0;const r=(0,i(4718).superenum)({_error:"_error",_comment:"_comment",_standard:"_standard",aiPrompt:"ai-prompt",anchor:"anchor",appAiPrompt:"app-ai-prompt",appBitmarkFromEditor:"app-bitmark-from-editor",appBitmarkFromJavascript:"app-bitmark-from-javascript",appCodeCell:"app-code-cell",appCodeEditor:"app-code-editor",appCodeIde:"app-code-ide",appCreateBitsFromImage:"app-create-bits-from-image",appFlashcards:"app-flashcards",appFlashcardsLearn:"app-flashcards-learn",appFlashcardsQuiz:"app-flashcards-quiz",appGetScreenshot:"app-get-screenshot",appLink:"app-link",article:"article",articleAi:"article-ai",articleAlt:"article-alt",articleAttachment:"article-attachment",articleEmbed:"article-embed",articleLink:"article-link",articleResponsive:"article-responsive",articleResponsiveAlt:"article-responsive-alt",assignment:"assignment",assignmentList:"assignment-list",audio:"audio",audioEmbed:"audio-embed",audioLink:"audio-link",audioTranscript:"audio-transcript",bitAlias:"bit-alias",bitBookEnding:"bit-book-ending",bitBookSummary:"bit-book-summary",bitmarkExample:"bitmark-example",blogArticle:"blog-article",book:"book",bookAcknowledgements:"book-acknowledgements",bookAddendum:"book-addendum",bookAfterword:"book-afterword",bookAlias:"book-alias",bookAppendix:"book-appendix",bookArticle:"book-article",bookAutherBio:"book-author-bio",bookBibliography:"book-bibliography",bookClose:"book-close",bookComingSoon:"book-coming-soon",bookConclusion:"book-conclusion",bookCopyright:"book-copyright",bookCopyrightPermissions:"book-copyright-permissions",bookCover:"book-cover",bookDedication:"book-dedication",bookDiff:"book-diff",bookEnd:"book-end",bookEndnotes:"book-endnotes",bookEpigraph:"book-epigraph",bookEpilogue:"book-epilogue",bookForword:"book-foreword",bookFrontispiece:"book-frontispiece",bookImprint:"book-imprint",bookIncitingIncident:"book-inciting-incident",bookIntroduction:"book-introduction",bookLink:"book-link",bookLinkNext:"book-link-next",bookLinkPrev:"book-link-prev",bookListOfContributors:"book-list-of-contributors",bookNotes:"book-notes",bookPostscript:"book-postscript",bookPreface:"book-preface",bookPrologue:"book-prologue",bookReadMore:"book-read-more",bookReference:"book-reference",bookReferenceList:"book-reference-list",bookRequestForABookReview:"book-request-for-a-book-review",bookSummary:"book-summary",bookTeaser:"book-teaser",bookTitle:"book-title",botActionAnnounce:"bot-action-announce",botActionRatingNumber:"bot-action-rating-number",botActionRemind:"bot-action-remind",botActionResponse:"bot-action-response",botActionSave:"bot-action-save",botActionSend:"bot-action-send",botActionTrueFalse:"bot-action-true-false",botInterview:"bot-interview",browserImage:"browser-image",bug:"bug",bugAlt:"bug-alt",bugCollapsible:"bug-collapsible",buttonCopyText:"button-copy-text",callToAction:"call-to-action",callToActionBookNow:"call-to-action-book-now",callToActionContact:"call-to-action-contact",callToActionCreateAccount:"call-to-action-create-account",callToActionDownload:"call-to-action-download",callToActionGetNow:"call-to-action-get-now",callToActionGetOffer:"call-to-action-get-offer",callToActionJoin:"call-to-action-join",callToActionLearnMore:"call-to-action-learn-more",callToActionMail:"call-to-action-mail",callToActionSeeMore:"call-to-action-see-more",callToActionShopNow:"call-to-action-shop-now",callToActionStartNow:"call-to-action-start-now",callToActionSubscribe:"call-to-action-subscribe",callToActionWatch:"call-to-action-watch",card1:"card-1",chapter:"chapter",chapterSubjectMatter:"chapter-subject-matter",chat:"chat",checklist:"checklist",cloze:"cloze",clozeAndMultipleChoiceText:"cloze-and-multiple-choice-text",clozeInstructionGrouped:"cloze-instruction-grouped",clozeList:"cloze-list",clozeSeveral:"cloze-several",clozeSolutionGrouped:"cloze-solution-grouped",coachAudioTranscript:"coach-audio-transcript",coachCallToActionChecklist:"coach-call-to-action-checklist",coachCallToActionCloze:"coach-call-to-action-cloze",coachCallToActionClozeAndMultipleChoiceText:"coach-call-to-action-cloze-and-multiple-choice-text",coachCallToActionEssay:"coach-call-to-action-essay",coachCallToActionMultipleChoiceText:"coach-call-to-action-multiple-choice-text",coachHomeRules:"coach-home-rules",coachSelfReflectionCloze:"coach-self-reflection-cloze",coachSelfReflectionEssay:"coach-self-reflection-essay",coachSelfReflectionMultipleChoice:"coach-self-reflection-multiple-choice",coachSelfReflectionMultipleChoice1:"coach-self-reflection-multiple-choice-1",coachSelfReflectionMultipleChoiceText:"coach-self-reflection-multiple-choice-text",coachSelfReflectionMultipleResponse:"coach-self-reflection-multiple-response",coachSelfReflectionMultipleResponse1:"coach-self-reflection-multiple-response-1",coachSelfReflectionRating:"coach-self-reflection-rating",coachVideoTranscript:"coach-video-transcript",code:"code",codeRuntime:"code-runtime",collapsible:"collapsible",conclusion:"conclusion",conclusionAlt:"conclusion-alt",consoleLog:"console-log",container:"container",containerAccordionTabs:"container-accordion-tabs",containerBits2:"container-bits-2",containerCards:"container-cards",containerCarousel:"container-carousel",containerCookRecipe:"container-cook-recipe",containerFolder:"container-folder",containerFolderAll:"container-folder-all",containerGallery:"container-gallery",containerGrid:"container-grid",containerGroup:"container-group",containerNewsArticle:"container-news-article",containerNowrap:"container-nowrap",containerNowrapStretch:"container-nowrap-stretch",containerPreview:"container-preview",containerScroller:"container-scroller",containerSlides:"container-slides",containerStack:"container-stack",containerTabs:"container-tabs",containerWrap:"container-wrap",conversationLeft1:"conversation-left-1",conversationLeft1Scream:"conversation-left-1-scream",conversationLeft1Thought:"conversation-left-1-thought",conversationRight1:"conversation-right-1",conversationRight1Scream:"conversation-right-1-scream",conversationRight1Thought:"conversation-right-1-thought",cookArrangement:"cook-arrangement",cookIngredients:"cook-ingredients",cookInsert:"cook-insert",cookNoteOnQuantity:"cook-note-on-quantity",cookPersonalRecommendation:"cook-personal-recommendation",cookPlate:"cook-plate",cookPracticeAdvise:"cook-practice-advise",cookPreparation:"cook-preparation",cookRecommendation:"cook-recommendation",cookRemark:"cook-remark",cookSideDish:"cook-side-dish",cookSideDrink:"cook-side-drink",cookStep:"cook-step",cookTimer:"cook-timer",cookVariation:"cook-variation",correction:"correction",danger:"danger",dangerAlt:"danger-alt",dangerCollapsible:"danger-collapsible",definitionList:"definition-list",definitionTerm:"definition-term",deleted:"deleted",details:"details",details1:"details-1",detailsImage:"details-image",diff:"diff",document:"document",documentDownload:"document-download",documentEmbed:"document-embed",documentLink:"document-link",documentUpload:"document-upload",editorial:"editorial",editorNote:"editor-note",essay:"essay",example:"example",exampleAlt:"example-alt",exampleCollapsible:"example-collapsible",exampleList:"example-list",extractorAiChat:"extractor-ai-chat",extractorBlock:"extractor-block",extractorConfiguration:"extractor-configuration",extractorInformation:"extractor-information",extractorPage:"extractor-page",extractorPageCollapsible:"extractor-page-collapsible",extractorPageFooter:"extractor-page-footer",extractorPageFooterCollapsible:"extractor-page-footer-collapsible",extractorPageHeader:"extractor-page-header",extractorPageHeaderCollapsible:"extractor-page-header-collapsible",extractorPageNumber:"extractor-page-number",extractorPageNumberCollapsible:"extractor-page-number-collapsible",extractorPageWithBlocks:"extractor-page-with-blocks",extractorPageWithBlocksCollapsible:"extractor-page-with-blocks-collapsible",extractorRepeatedText:"extractor-repeated-text",featured:"featured",feedback:"feedback",figure:"figure",flashcard:"flashcard",flashcard1:"flashcard-1",focusImage:"focus-image",footNote:"foot-note",formula:"formula",gapText:"gap-text",gapTextInstructionGrouped:"gap-text-instruction-grouped",glossaryTerm:"glossary-term",groupBorn:"group-born",groupDied:"group-died",handInAudio:"hand-in-audio",handInContact:"hand-in-contact",handInDocument:"hand-in-document",handInFeedbackExpert:"hand-in-feedback-expert",handInFeedbackSelf:"hand-in-feedback-self",handInFile:"hand-in-file",handInLocation:"hand-in-location",handInPhoto:"hand-in-photo",handInScan:"hand-in-scan",handInSubmit:"hand-in-submit",handInVideo:"hand-in-video",handInVoice:"hand-in-voice",help:"help",helpAlt:"help-alt",highlightText:"highlight-text",hint:"hint",hintAlt:"hint-alt",hintCollapsible:"hint-collapsible",image:"image",imageBanner:"image-banner",imageFigure:"image-figure",imageFigureAlt:"image-figure-alt",imageLandscape:"image-landscape",imageLink:"image-link",imageMood:"image-mood",imageOnDevice:"image-on-device",imagePortrait:"image-portrait",imagePrototype:"image-prototype",imageResponsive:"image-responsive",imageScreenshot:"image-screenshot",imageSeparator:"image-separator",imageSeparatorAlt:"image-separator-alt",imagesLogoGrave:"images-logo-grave",imageStyled:"image-styled",imageSuperWide:"image-super-wide",imageZoom:"image-zoom",indexTerm:"index-term",info:"info",infoAlt:"info-alt",infoCollapsible:"info-collapsible",internalLink:"internal-link",interview:"interview",interviewInstructionGrouped:"interview-instruction-grouped",langAudioScript:"lang-audio-script",langEnablingLanguageSkills:"lang-enabling-language-skills",langEnglishAroundWorld:"lang-english-around-world",langExtraActivity:"lang-extra-activity",langGoodToKnow:"lang-good-to-know",langHomework:"lang-homework",langLearningGoal:"lang-learning-goal",langLearningOutcomes:"lang-learning-outcomes",langLearningStrategy:"lang-learning-strategy",langLevelDown:"lang-level-down",langLevelUp:"lang-level-up",langLifeSkillIcon:"lang-life-skill-icon",langLifeSkills:"lang-life-skills",langLikeALocal:"lang-like-a-local",langMaterial:"lang-material",langTeacherNote:"lang-teacher-note",langTeacherPronunciation:"lang-teacher-pronunciation",langUsefulPhrases:"lang-useful-phrases",langVideoScript:"lang-video-script",langVocabulary:"lang-vocabulary",learningDocumentationFeedback:"learning-documentation-feedback",learningPathBook:"learning-path-book",learningPathBotTraining:"learning-path-bot-training",learningPathClassroomEvent:"learning-path-classroom-event",learningPathClassroomTraining:"learning-path-classroom-training",learningPathClosing:"learning-path-closing",learningPathExternalLink:"learning-path-external-link",learningPathFeedback:"learning-path-feedback",learningPathLearningGoal:"learning-path-learning-goal",learningPathLti:"learning-path-lti",learningPathSign:"learning-path-sign",learningPathStep:"learning-path-step",learningPathVideoCall:"learning-path-video-call",leAssignment:"le-assignment",leClassroomEvent:"le-classroom-event",leCompletion:"le-completion",leExternalLink:"le-external-link",leFinishingTask:"le-finishing-task",leFollowUpTask:"le-follow-up-task",legend:"legend",leDocumentDownload:"le-document-download",leLearningObjectives:"le-learning-objectives",leLearningStep:"le-learning-step",leListenAudioEmbed:"le-listen-audio-embed",lePreparationTask:"le-preparation-task",leRead:"le-read",leReadBook:"le-read-book",leTask:"le-task",leTodo:"le-todo",leVideoCall:"le-video-call",leWatchVideoEmbed:"le-watch-video-embed",lifeSkillSticker:"life-skill-sticker",list:"list",listItem:"list-item",mark:"mark",match:"match",matchAll:"match-all",matchAllReverse:"match-all-reverse",matchAudio:"match-audio",matchMatrix:"match-matrix",matchPicture:"match-picture",matchReverse:"match-reverse",matchSolutionGrouped:"match-solution-grouped",message:"message",metalevelExplanation:"metalevel-explanation",metaSearchDefaultTerms:"meta-search-default-terms",metaSearchDefaultTopics:"meta-search-default-topics",milestone:"milestone",module:"module",moduleProduct:"module-product",multipleChoice:"multiple-choice",multipleChoice1:"multiple-choice-1",multipleChoiceText:"multiple-choice-text",multipleResponse:"multiple-response",multipleResponse1:"multiple-response-1",newspaperArticle:"newspaper-article",note:"note",noteAi:"note-ai",noteAlt:"note-alt",notebookArticle:"notebook-article",noteCollapsible:"note-collapsible",output:"output",page:"page",pageAcademy:"page-academy",pageArticle:"page-article",pageArticleAlt:"page-article-alt",pageArticleResponsive:"page-article-responsive",pageBanner:"page-banner",pageBuyButton:"page-buy-button",pageBuyButtonAlt:"page-buy-button-alt",pageBuyButtonPromotion:"page-buy-button-promotion",pageCategory:"page-category",pageCollapsible:"page-collapsible",pageContainer:"page-container",pageContainerFolder:"page-container-folder",pageContainerGroup:"page-container-group",pageContainerNowrap:"page-container-nowrap",pageContainerNowrapStretch:"page-container-nowrap-stretch",pageContainerWrap:"page-container-wrap",pageCoverImage:"page-cover-image",pageFooter:"page-footer",pageHero:"page-hero",pageOpenBook:"page-open-book",pageOpenBookList:"page-open-book-list",pagePerson:"page-person",pageProduct:"page-product",pageProductList:"page-product-list",pageProductVideo:"page-product-video",pageProductVideoList:"page-product-video-list",pagePromotion:"page-promotion",pageSectionFolder:"page-section-folder",pageShopInShop:"page-shop-in-shop",pageSpecial:"page-special",pageSubpage:"page-subpage",pageSubscribe:"page-subscribe",parameters:"parameters",photo:"photo",platformPath:"platform-path",preparationNote:"preparation-note",pronunciationTable:"pronunciation-table",prototypeImages:"prototype-images",qAndA:"q-and-a",qAndACard:"q-and-a-card",question1:"question-1",quote:"quote",rating:"rating",recipe:"recipe",recordAudio:"record-audio",recordVideo:"record-video",releaseNote:"release-note",releaseNotesSummary:"release-notes-summary",remark:"remark",remarkAlt:"remark-alt",remarkCollapsible:"remark-collapsible",reviewApprovedNote:"review-approved-note",reviewAuthorNote:"review-author-note",reviewCustomerNote:"review-customer-note",reviewNote:"review-note",reviewRequestForReviewNote:"review-request-for-review-note",reviewReviewerNote:"review-reviewer-note",sampleSolution:"sample-solution",scorm:"scorm",screenshot:"screenshot",selfAssessment:"self-assessment",separator:"separator",separatorAlt:"separator-alt",sequence:"sequence",sideNote:"side-note",sideNoteCollapsible:"side-note-collapsible",smartStandardArticleNonNormative:"smart-standard-article-non-normative",smartStandardArticleNonNormativeCollapsible:"smart-standard-article-non-normative-collapsible",smartStandardArticleNormative:"smart-standard-article-normative",smartStandardArticleNormativeCollapsible:"smart-standard-article-normative-collapsible",smartStandardExampleNonNormative:"smart-standard-example-non-normative",smartStandardExampleNonNormativeCollapsible:"smart-standard-example-non-normative-collapsible",smartStandardExampleNormative:"smart-standard-example-normative",smartStandardExampleNormativeCollapsible:"smart-standard-example-normative-collapsible",smartStandardFormula:"smart-standard-formula",smartStandardFormulaNonNormative:"smart-standard-formula-non-normative",smartStandardFormulaNormative:"smart-standard-formula-normative",smartStandardImageFigureNonNormative:"smart-standard-image-figure-non-normative",smartStandardImageFigureNonNormativeCollapsible:"smart-standard-image-figure-non-normative-collapsible",smartStandardImageFigureNormative:"smart-standard-image-figure-normative",smartStandardImageFigureNormativeCollapsible:"smart-standard-image-figure-normative-collapsible",smartStandardLegend:"smart-standard-legend",smartStandardLegendNonNormative:"smart-standard-legend-non-normative",smartStandardLegendNormative:"smart-standard-legend-normative",smartStandardList:"smart-standard-list",smartStandardListCollapsible:"smart-standard-list-collapsible",smartStandardListItem:"smart-standard-list-item",smartStandardListItemCollapsible:"smart-standard-list-item-collapsible",smartStandardNoteNonNormative:"smart-standard-note-non-normative",smartStandardNoteNonNormativeCollapsible:"smart-standard-note-non-normative-collapsible",smartStandardNoteNormative:"smart-standard-note-normative",smartStandardNoteNormativeCollapsible:"smart-standard-note-normative-collapsible",smartStandardRemarkLegend:"smart-standard-remark-legend",smartStandardRemarkLegendNonNormative:"smart-standard-remark-legend-non-normative",smartStandardRemarkLegendNormative:"smart-standard-remark-legend-normative",smartStandardRemarkFormula:"smart-standard-remark-formula",smartStandardRemarkFormulaNonNormative:"smart-standard-remark-formula-non-normative",smartStandardRemarkFormulaNormative:"smart-standard-remark-formula-normative",smartStandardRemarkNonNormative:"smart-standard-remark-non-normative",smartStandardRemarkNonNormativeCollapsible:"smart-standard-remark-non-normative-collapsible",smartStandardRemarkNormative:"smart-standard-remark-normative",smartStandardRemarkNormativeCollapsible:"smart-standard-remark-normative-collapsible",smartStandardRemarkTableImageNonNormative:"smart-standard-remark-table-image-non-normative",smartStandardRemarkTableImageNonNormativeCollapsible:"smart-standard-remark-table-image-non-normative-collapsible",smartStandardRemarkTableImageNormative:"smart-standard-remark-table-image-normative",smartStandardRemarkTableImageNormativeCollapsible:"smart-standard-remark-table-image-normative-collapsible",smartStandardRemarkTableNonNormative:"smart-standard-remark-table-non-normative",smartStandardRemarkTableNonNormativeCollapsible:"smart-standard-remark-table-non-normative-collapsible",smartStandardRemarkTableNormative:"smart-standard-remark-table-normative",smartStandardRemarkTableNormativeCollapsible:"smart-standard-remark-table-normative-collapsible",smartStandardTableImageNonNormative:"smart-standard-table-image-non-normative",smartStandardTableImageNonNormativeCollapsible:"smart-standard-table-image-non-normative-collapsible",smartStandardTableImageNormative:"smart-standard-table-image-normative",smartStandardTableImageNormativeCollapsible:"smart-standard-table-image-normative-collapsible",smartStandardTableNonNormative:"smart-standard-table-non-normative",smartStandardTableNonNormativeCollapsible:"smart-standard-table-non-normative-collapsible",smartStandardTableNormative:"smart-standard-table-normative",smartStandardTableNormativeCollapsible:"smart-standard-table-normative-collapsible",standardArticleNonNormative:"standard-article-non-normative",standardArticleNormative:"standard-article-normative",standardExampleNonNormative:"standard-example-non-normative",standardExampleNormative:"standard-example-normative",standardImageFigureNonNormative:"standard-image-figure-non-normative",standardImageFigureNormative:"standard-image-figure-normative",standardList:"standard-list",standardListItem:"standard-list-item",standardNoteNonNormative:"standard-note-non-normative",standardNoteNormative:"standard-note-normative",standardRemarkNonNormative:"standard-remark-non-normative",standardRemarkNormative:"standard-remark-normative",standardRemarkTableImageNonNormative:"standard-remark-table-image-non-normative",standardRemarkTableImageNormative:"standard-remark-table-image-normative",standardRemarkTableNonNormative:"standard-remark-table-non-normative",standardRemarkTableNormative:"standard-remark-table-normative",standardTableImageNonNormative:"standard-table-image-non-normative",standardTableImageNormative:"standard-table-image-normative",standardTableNonNormative:"standard-table-non-normative",standardTableNormative:"standard-table-normative",statement:"statement",stdout:"stdout",step:"step",stepImageScreenshot:"step-image-screenshot",stepImageScreenshotWithPointer:"step-image-screenshot-with-pointer",sticker:"sticker",stickyNote:"sticky-note",stillImageFilm:"still-image-film",stillImageFilmEmbed:"still-image-film-embed",stillImageFilmLink:"still-image-film-link",summary:"summary",summaryAi:"summary-ai",survey:"survey",survey1:"survey-1",surveyAnonymous:"survey-anonymous",surveyAnonymous1:"survey-anonymous-1",surveyMatrix:"survey-matrix",surveyMatrixMe:"survey-matrix-me",surveyRating:"survey-rating",surveyRatingDisplay:"survey-rating-display",surveyRatingOnce:"survey-rating-once",table:"table",tableAlt:"table-alt",tableImage:"table-image",tableImageAlt:"table-image-alt",takePicture:"take-picture",toc:"toc",tocChapter:"toc-chapter",tocInline:"toc-inline",trueFalse:"true-false",trueFalse1:"true-false-1",vendorAmcharts5Chart:"vendor-amcharts-5-chart",vendorDatadogDashboardEmbed:"vendor-datadog-dashboard-embed",vendorFormbricksEmbed:"vendor-formbricks-embed",vendorFormbricksLink:"vendor-formbricks-link",vendorFormbricksEmbedAnonymous:"vendor-formbricks-embed-anonymous",vendorFormbricksLinkAnonymous:"vendor-formbricks-link-anonymous",vendorHighchartsChart:"vendor-highcharts-chart",vendorIframelyCard:"vendor-iframely-card",vendorIframelyEmbed:"vendor-iframely-embed",vendorIframelyPreview:"vendor-iframely-preview",vendorIframelyPreviewMini:"vendor-iframely-preview-mini",vendorJupyterCellCode:"vendor-jupyter-cell-code",vendorJupyterCellMarkdown:"vendor-jupyter-cell-markdown",vendorJupyterCellRaw:"vendor-jupyter-cell-raw",vendorJupyterIpynb:"vendor-jupyter-ipynb",vendorJupyterOutput:"vendor-jupyter-output",vendorPadletEmbed:"vendor-padlet-embed",vendorStripePricingTable:"vendor-stripe-pricing-table",vendorStripePricingTableExternal:"vendor-stripe-pricing-table-external",video:"video",videoEmbed:"video-embed",videoEmbedLandscape:"video-embed-landscape",videoEmbedPortrait:"video-embed-portrait",videoLandscape:"video-landscape",videoLink:"video-link",videoLinkLandscape:"video-link-landscape",videoLinkPortrait:"video-link-portrait",videoPortrait:"video-portrait",videoTranscript:"video-transcript",warning:"warning",warningAlt:"warning-alt",warningCollapsible:"warning-collapsible",websiteLink:"website-link",workbookArticle:"workbook-article"});t.BitType=r},5980:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.markTagContentProcessor=function(e,t,i,o){const{value:n}=i;r.StringUtils.isString(n)&&(o.solution=r.StringUtils.trimmedString(n))};const r=i(9681)},6128:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ContentProcessorUtils=void 0;const r=i(9554);const o=new class{concatenatePlainTextWithAstTexts(e,t,i){var o;if(Array.isArray(e)){if(i=i&&i.trim()){const n=i.split("\n"),a=[];for(let e=0;e<t;e++)a.push({type:r.TextNodeType.hardBreak});for(let e=0;e<n.length;e++){const t=n[e];t&&a.push({text:t,type:r.TextNodeType.text}),e<n.length-1&&a.push({type:r.TextNodeType.hardBreak})}const s=e[e.length-1];s&&s.type===r.TextNodeType.paragraph?s.content=[...null!==(o=s.content)&&void 0!==o?o:[],...a]:e.push({type:r.TextNodeType.paragraph,content:a,attrs:{}})}return e}return`${null!=e?e:""}${"\n".repeat(t)}${null!=i?i:""}`}};t.ContentProcessorUtils=o},6149:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceTag=void 0;const r=(0,i(4718).superenum)({unknown:"unknown",image:"image",imageResponsive:"image-responsive",imagePortrait:"image-portrait",imageLandscape:"image-landscape",imageEmbed:"image-embed",imageLink:"image-link",audio:"audio",audioEmbed:"audio-embed",audioLink:"audio-link",video:"video",videoEmbed:"video-embed",videoLink:"video-link",stillImageFilm:"still-image-film",stillImageFilmEmbed:"still-image-film-embed",stillImageFilmLink:"still-image-film-link",article:"article",articleEmbed:"article-embed",articleLink:"article-link",document:"document",documentEmbed:"document-embed",documentLink:"document-link",documentDownload:"document-download",appLink:"app-link",websiteLink:"website-link",icon:"icon",backgroundWallpaper:"backgroundWallpaper",imagePlaceholder:"imagePlaceholder"});t.ResourceTag=r},6220:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DeprecatedTextFormat=void 0;const r=(0,i(4718).superenum)({bitmarkMinusMinus:"bitmark--"});t.DeprecatedTextFormat=r},6278:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Environment=void 0;const r=(0,i(4718).superenum)({unknown:"",node:"node",chrome:"chrome",safari:"safari",firefox:"firefox",edge:"edge",ie:"ie"});t.Environment=r},6521:function(e,t,i){var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.buildResources=function(e,t,i){var r,o;const{bitType:n}=e,p=[],c=[],u=l.ResourceTag.fromValue(t),y=a.Config.getBitResourcesConfig(n,u),g=y.resourceAttachmentAllowed,d=y.getCountsMin(),T=y.getCountsMax();if(i)for(const e of i.reverse()){let t=null!==(r=d.get(e.__typeAlias))&&void 0!==r?r:0,i=null!==(o=T.get(e.__typeAlias))&&void 0!==o?o:0;t=Math.max(0,t-1),i===s.Count.infinity?p.unshift(e):i>0?(p.unshift(e),i--):c.unshift(e),d.set(e.__typeAlias,t),T.set(e.__typeAlias,i)}if(!g&&t){const i=`Resource type [&${t}] is specified in the bit header, but no extra resource is allowed for this bit.`;e.addWarning(i)}else 0===p.length&&t&&e.addWarning(`Resource type [&${t}] is specified in the bit header, but no such a resource is present`);c.length>0&&(e.parser.excessResources=c);return p},t.resourceContentProcessor=function(e,t,i,o,s){const{type:g,key:d,value:T,chain:f}=o,m=s.resources;if(!m)return;const h=l.ResourceTag.fromValue(d);if(h){const t=a.Config.getTagConfigForTag(i,h),o=e.bitContentProcessor(u.BitContentLevel.Chain,null==t?void 0:t.chain,f),{posterImage:g}=o,d=r(o,["posterImage"]);let b;if(g){const{subConfig:i,subChain:o}=function(e,t,i){var r;let o;e&&(o=null===(r=e[i])||void 0===r?void 0:r.chain);const n=null==t?void 0:t.reduce(((e,t)=>{if(e)return e;const i=t;return"posterImage"===i.key?i.chain:void 0}),void 0);return{subConfig:o,subChain:n}}(null==t?void 0:t.chain,f,"posterImage"),n=e.bitContentProcessor(u.BitContentLevel.Chain,i,o),{posterImage:a}=n,s=r(n,["posterImage"]);b=y.resource(e,Object.assign({type:l.ResourceTag.image,value:g},s)).image}const B=y.resource(e,Object.assign({type:h,value:n.Breakscape.unbreakscape(T,{textFormat:p.TextFormat.bitmarkText,textLocation:c.TextLocation.tag}),posterImage:b},d));B&&(h===l.ResourceTag.backgroundWallpaper||h===l.ResourceTag.imagePlaceholder?s.propertyStyleResources&&(s.propertyStyleResources[h]=B):m.push(B))}};const o=i(5533),n=i(7735),a=i(2028),s=i(3778),l=i(6149),p=i(385),c=i(6877),u=i(3029),y=new o.ResourceBuilder},6634:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractTagConfig=void 0;t.AbstractTagConfig=class{constructor(e,t,i,r,o,n,a,s,l){this.type=e,this.configKey=t,this.tag=i,this.maxCount=r,this.minCount=o,this.chain=n,this.jsonKey=a,this.astKey=s,this.deprecated=l}}},6772:function(e,t){var i=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(o,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function s(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StringWriter=void 0;t.StringWriter=class{constructor(){this._string="",this.endOfLineString="\n",this.lastWrite=""}get isSync(){return!0}getString(){return this._string}open(){return i(this,void 0,void 0,(function*(){return this.openSync(),Promise.resolve()}))}close(){return i(this,void 0,void 0,(function*(){try{this.closeSync()}catch(e){return Promise.reject(e)}return Promise.resolve()}))}openSync(){this._buffer=[],this._string=""}closeSync(){if(!this._buffer)throw new Error("open() or openSync() never called");this._string=this._buffer.join(""),this._buffer=[]}writeLine(e){return this._buffer?(null!=e?(this._buffer.push(e+this.endOfLineString),this.lastWrite=e+this.endOfLineString):(this._buffer.push(this.endOfLineString),this.lastWrite=this.endOfLineString),this):this}writeLines(e,t){if(!this._buffer)return this;if(!e)return this;let i="";for(let r=0,o=e.length;r<o;r++){const n=e[r];this._buffer.push(n),i+=n,t&&r<o-1&&(this._buffer.push(t),i+=t),this._buffer.push(this.endOfLineString),i+=this.endOfLineString}return this.lastWrite=i,this}write(e){return this._buffer?(null==e||(e&&(this.lastWrite=e),this._buffer.push(e)),this):this}writeWhiteSpace(){return this.write(" "),this}getLastWrite(){return this.lastWrite}}},6853:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BITS=void 0;const r=i(8199),o=i(7112),n=i(9888),a=i(5051),s=i(7797),l=i(5512),p=i(5854),c=i(3778),u=i(363),y=i(385),g={[p.BitType._error]:{since:"1.3.0",tags:[]},[p.BitType._comment]:{since:"1.4.12",tags:[]},[p.BitType._standard]:{since:"3.2.0",tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_standardTags}]},[p.BitType.appFlashcards]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.flashcardSet,maxCount:c.Count.infinity}],rootExampleType:u.ExampleType.string},[p.BitType.appFlashcardsQuiz]:{since:"1.3.0",baseBitType:p.BitType.appFlashcards},[p.BitType.appFlashcardsLearn]:{since:"1.3.0",baseBitType:p.BitType.appFlashcards},[p.BitType.appLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAppLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.article]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}]},[p.BitType.articleAlt]:{since:"1.15.0",baseBitType:p.BitType.article},[p.BitType.articleResponsive]:{since:"1.21.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.imageFirst}]},[p.BitType.articleResponsiveAlt]:{since:"2.0.0",baseBitType:p.BitType.articleResponsive},[p.BitType.standardArticleNormative]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.standardArticleNonNormative]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.smartStandardArticleNormative]:{since:"1.28.0",baseBitType:p.BitType.standardArticleNormative},[p.BitType.smartStandardArticleNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardArticleNonNormative},[p.BitType.smartStandardArticleNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardArticleNormative},[p.BitType.smartStandardArticleNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardArticleNonNormative},[p.BitType.statement]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.pageArticle]:{since:"1.15.0",baseBitType:p.BitType.article},[p.BitType.pageArticleAlt]:{since:"1.15.0",baseBitType:p.BitType.article},[p.BitType.pageArticleResponsive]:{since:"1.21.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.imageFirst}]},[p.BitType.buttonCopyText]:{since:"1.4.3",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.callToAction]:{since:"1.15.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.callToActionUrl,minCount:1}]},[p.BitType.callToActionSubscribe]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionContact]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionJoin]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionMail]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionLearnMore]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionSeeMore]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionWatch]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionStartNow]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionGetOffer]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionBookNow]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionShopNow]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionGetNow]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionDownload]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.callToActionCreateAccount]:{since:"1.15.0",baseBitType:p.BitType.callToAction},[p.BitType.appBitmarkFromJavascript]:{since:"1.4.5",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.maxCreatedBits}],textFormatDefault:y.TextFormat.plainText},[p.BitType.appBitmarkFromEditor]:{since:"1.4.5",baseBitType:p.BitType.appBitmarkFromJavascript},[p.BitType.articleEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceArticleEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.articleLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceArticleLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.audio]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudio,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.audioEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudioEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.audioLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudioLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.bitAlias]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference},{type:l.BitTagType.tag,configKey:s.TagConfigKey.anchor}]},[p.BitType.diff]:{since:"3.13.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.diffTo}]},[p.BitType.book]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_bookCommon}]},[p.BitType.bookEnd]:{since:"3.27.0",baseBitType:p.BitType.article},[p.BitType.bookAcknowledgements]:{since:"1.17.0",baseBitType:p.BitType.article},[p.BitType.bookAddendum]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookAfterword]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookAppendix]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookAutherBio]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookBibliography]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookComingSoon]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookConclusion]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookCopyright]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookCopyrightPermissions]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookDedication]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookEndnotes]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookEpigraph]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookEpilogue]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookForword]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookFrontispiece]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookImprint]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookIncitingIncident]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookIntroduction]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookListOfContributors]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookNotes]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookPostscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookPreface]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookPrologue]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookReadMore]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookReferenceList]:{since:"3.2.0",baseBitType:p.BitType._standard,cardSet:r.CardSetConfigKey._bookReferenceList},[p.BitType.bookRequestForABookReview]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookSummary]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookTeaser]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookTitle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bookCover]:{since:"3.27.0",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title,maxCount:2},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.coverColor}]},[p.BitType.bookAlias]:{since:"1.4.3",baseBitType:p.BitType.book,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.bookAlias,maxCount:c.Count.infinity}]},[p.BitType.bookDiff]:{since:"3.10.0",baseBitType:p.BitType.book,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.bookDiff}]},[p.BitType.bookClose]:{since:"1.18.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.bookReference]:{since:"2.2.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refAuthor,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refBookTitle},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refPublisher,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.refPublicationYear},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.citationStyle}]},[p.BitType.botActionResponse]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[],cardSet:r.CardSetConfigKey._botActionResponses},[p.BitType.botActionSend]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.date}]},[p.BitType.browserImage]:{since:"1.3.0",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.focusX},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.focusY}]},[p.BitType.card1]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon}]},[p.BitType.question1]:{since:"1.3.0",baseBitType:p.BitType.card1},[p.BitType.survey1]:{since:"1.3.0",baseBitType:p.BitType.card1},[p.BitType.surveyAnonymous1]:{since:"1.3.0",baseBitType:p.BitType.card1},[p.BitType.chapter]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.anchor},{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.toc},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.progress}]},[p.BitType.clozeAndMultipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_gap},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.coachCallToActionClozeAndMultipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType.clozeAndMultipleChoiceText},[p.BitType.cloze]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.quizCountItems},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.quizStrikethroughSolutions},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.quizStrikethroughSolutions},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.additionalSolutions,maxCount:c.Count.infinity},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_gap}]},[p.BitType.clozeInstructionGrouped]:{since:"1.3.0",baseBitType:p.BitType.cloze},[p.BitType.clozeSolutionGrouped]:{since:"1.3.0",baseBitType:p.BitType.cloze},[p.BitType.clozeSeveral]:{since:"3.5.0",baseBitType:p.BitType.cloze},[p.BitType.gapText]:{since:"1.5.15",baseBitType:p.BitType.cloze},[p.BitType.gapTextInstructionGrouped]:{since:"1.5.15",baseBitType:p.BitType.clozeInstructionGrouped},[p.BitType.coachSelfReflectionCloze]:{since:"1.3.0",baseBitType:p.BitType.cloze},[p.BitType.coachCallToActionCloze]:{since:"1.3.0",baseBitType:p.BitType.cloze},[p.BitType.clozeList]:{since:"1.4.13",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon}],cardSet:r.CardSetConfigKey._clozeList},[p.BitType.code]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.computerLanguage},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.codeLineNumbers},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.codeMinimap}],textFormatDefault:y.TextFormat.plainText},[p.BitType.formula]:{since:"1.35.0",baseBitType:p.BitType._standard,tags:[],textFormatDefault:y.TextFormat.latex},[p.BitType.smartStandardFormula]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardFormulaNonNormative]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardFormulaNormative]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardRemarkFormula]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardRemarkFormulaNonNormative]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.smartStandardRemarkFormulaNormative]:{since:"3.11.0",baseBitType:p.BitType.formula},[p.BitType.appCodeCell]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.appCodeEditor]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.appCodeIde]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.codeRuntime]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.consoleLog]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.output]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.stdout]:{since:"1.4.3",baseBitType:p.BitType.code},[p.BitType.step]:{since:"1.5.1",baseBitType:p.BitType.article},[p.BitType.stepImageScreenshot]:{since:"1.5.1",baseBitType:p.BitType.image},[p.BitType.stepImageScreenshotWithPointer]:{since:"1.5.1",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pointerTop,minCount:1,maxCount:1},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pointerLeft,minCount:1,maxCount:1}]},[p.BitType.milestone]:{since:"1.20.0",baseBitType:p.BitType.step},[p.BitType.conversationLeft1]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_person}]},[p.BitType.conversationLeft1Scream]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.conversationLeft1Thought]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.conversationRight1]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.conversationRight1Scream]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.conversationRight1Thought]:{since:"1.3.0",baseBitType:p.BitType.conversationLeft1},[p.BitType.cookPreparation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookStep]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookIngredients]:{since:"1.5.16",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_technicalTerm},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.servings,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unit},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.unitAbbr},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.decimalPlaces},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.disableCalculation},{type:l.BitTagType.tag,configKey:s.TagConfigKey.hint}]}],cardSet:r.CardSetConfigKey._ingredients},[p.BitType.recipe]:{since:"1.5.24",baseBitType:p.BitType.cookIngredients},[p.BitType.cookRemark]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookVariation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookInsert]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookNoteOnQuantity]:{since:"3.27.0",baseBitType:p.BitType.article},[p.BitType.cookArrangement]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookPracticeAdvise]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookPlate]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookRecommendation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookPersonalRecommendation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookSideDrink]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookSideDish]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.cookTimer]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.document]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocument,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.documentDownload]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocumentDownload,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.leDocumentDownload]:{since:"3.18.0",baseBitType:p.BitType.documentDownload},[p.BitType.documentEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocumentEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.documentLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceDocumentLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.essay]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_sampleSolution},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.additionalSolutions,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.partialAnswer},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.property_reference,maxCount:c.Count.infinity}],rootExampleType:u.ExampleType.string},[p.BitType.coachSelfReflectionEssay]:{since:"1.3.0",baseBitType:p.BitType.essay},[p.BitType.coachCallToActionEssay]:{since:"1.3.0",baseBitType:p.BitType.essay},[p.BitType.example]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title}],rootExampleType:u.ExampleType.string},[p.BitType.exampleAlt]:{since:"1.16.0",baseBitType:p.BitType.example},[p.BitType.standardExampleNormative]:{since:"1.16.0",baseBitType:p.BitType.example},[p.BitType.standardExampleNonNormative]:{since:"1.16.0",baseBitType:p.BitType.example},[p.BitType.smartStandardExampleNormative]:{since:"1.28.0",baseBitType:p.BitType.standardExampleNormative},[p.BitType.smartStandardExampleNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardExampleNonNormative},[p.BitType.smartStandardExampleNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardExampleNormative},[p.BitType.smartStandardExampleNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardExampleNonNormative},[p.BitType.appAiPrompt]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.aiPrompt]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.articleAi]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.articleAttachment]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.assignment]:{since:"1.3.0",baseBitType:p.BitType.essay},[p.BitType.audioTranscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bitmarkExample]:{since:"1.3.0",baseBitType:p.BitType.example},[p.BitType.blogArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bug]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.bugAlt]:{since:"1.16.0",baseBitType:p.BitType.bug},[p.BitType.checklist]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.coachAudioTranscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.coachCallToActionChecklist]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.coachHomeRules]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.coachVideoTranscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.correction]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.danger]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.dangerAlt]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.definitionTerm]:{since:"1.34.0",baseBitType:p.BitType.article},[p.BitType.deleted]:{since:"3.9.0",baseBitType:p.BitType.article},[p.BitType.details1]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.details]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.qAndA]:{since:"3.5.0",baseBitType:p.BitType.article},[p.BitType.editorial]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.editorNote]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.featured]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.glossaryTerm]:{since:"1.33.0",baseBitType:p.BitType.article},[p.BitType.help]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.helpAlt]:{since:"1.16.0",baseBitType:p.BitType.help},[p.BitType.hint]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.hintAlt]:{since:"1.16.0",baseBitType:p.BitType.hint},[p.BitType.indexTerm]:{since:"1.33.0",baseBitType:p.BitType.article},[p.BitType.info]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.infoAlt]:{since:"1.16.0",baseBitType:p.BitType.info},[p.BitType.langLearningOutcomes]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langEnablingLanguageSkills]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLifeSkills]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langEnglishAroundWorld]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langGoodToKnow]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLearningGoal]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLearningStrategy]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLikeALocal]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langMaterial]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langUsefulPhrases]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLevelDown]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langLevelUp]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langExtraActivity]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langVideoScript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langAudioScript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langVocabulary]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langHomework]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langTeacherNote]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.langTeacherPronunciation]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.list]:{since:"1.22.0",baseBitType:p.BitType.article},[p.BitType.standardList]:{since:"1.22.0",baseBitType:p.BitType.article},[p.BitType.smartStandardList]:{since:"1.28.0",baseBitType:p.BitType.standardList},[p.BitType.smartStandardListCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardList},[p.BitType.message]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.newspaperArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.note]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.noteAlt]:{since:"1.16.0",baseBitType:p.BitType.note},[p.BitType.standardNoteNormative]:{since:"1.16.0",baseBitType:p.BitType.note},[p.BitType.standardNoteNonNormative]:{since:"1.16.0",baseBitType:p.BitType.note},[p.BitType.smartStandardNoteNormative]:{since:"1.28.0",baseBitType:p.BitType.standardNoteNormative},[p.BitType.smartStandardNoteNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardNoteNonNormative},[p.BitType.smartStandardNoteNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardNoteNormative},[p.BitType.smartStandardNoteNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardNoteNonNormative},[p.BitType.noteAi]:{since:"1.3.0",baseBitType:p.BitType.note},[p.BitType.notebookArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.preparationNote]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.releaseNotesSummary]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.remark]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.remarkAlt]:{since:"1.16.0",baseBitType:p.BitType.remark},[p.BitType.standardRemarkNormative]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.standardRemarkNonNormative]:{since:"1.16.0",baseBitType:p.BitType.article},[p.BitType.smartStandardRemarkNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkNormative},[p.BitType.smartStandardRemarkNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkNonNormative},[p.BitType.smartStandardRemarkNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkNormative},[p.BitType.smartStandardRemarkNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkNonNormative},[p.BitType.selfAssessment]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.separator]:{since:"1.4.15",baseBitType:p.BitType.article},[p.BitType.separatorAlt]:{since:"1.16.0",baseBitType:p.BitType.separator},[p.BitType.sticker]:{since:"1.5.28",baseBitType:p.BitType.article},[p.BitType.sideNote]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.summary]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.summaryAi]:{since:"1.3.0",baseBitType:p.BitType.summary},[p.BitType.videoTranscript]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.warning]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.warningAlt]:{since:"1.16.0",baseBitType:p.BitType.warning},[p.BitType.workbookArticle]:{since:"1.3.0",baseBitType:p.BitType.article},[p.BitType.collapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.sideNoteCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.infoCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.remarkCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.warningCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.dangerCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.noteCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.exampleCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.hintCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.bugCollapsible]:{since:"1.21.0",baseBitType:p.BitType.article},[p.BitType.platformPath]:{since:"3.14.1",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.path}]},[p.BitType.container]:{since:"1.9.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.allowedBit,maxCount:c.Count.infinity}]},[p.BitType.containerWrap]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerNowrap]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerNowrapStretch]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerGroup]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerFolder]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.containerCarousel]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerCards]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerGrid]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerStack]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerSlides]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerGallery]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerScroller]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerTabs]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerAccordionTabs]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerFolderAll]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerBits2]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerCookRecipe]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerNewsArticle]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.containerPreview]:{since:"1.11.0",baseBitType:p.BitType.container},[p.BitType.pageContainer]:{since:"1.9.0",baseBitType:p.BitType.container},[p.BitType.pageContainerWrap]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.pageContainerNowrap]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.pageContainerNowrapStretch]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.pageContainerFolder]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.pageContainerGroup]:{since:"1.9.0",baseBitType:p.BitType.pageContainer},[p.BitType.metalevelExplanation]:{since:"1.10.0",baseBitType:p.BitType.article},[p.BitType.module]:{since:"1.5.26",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.hasBookNavigation},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productId,minCount:1,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.duration}]},[p.BitType.moduleProduct]:{since:"1.9.0",baseBitType:p.BitType.module,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productId,minCount:1}]},[p.BitType.exampleList]:{since:"1.4.13",baseBitType:p.BitType.example,cardSet:r.CardSetConfigKey._exampleBitList,rootExampleType:u.ExampleType.string},[p.BitType.extractorPage]:{since:"1.5.17",baseBitType:p.BitType.image},[p.BitType.extractorPageCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPage},[p.BitType.extractorPageWithBlocks]:{since:"1.5.21",baseBitType:p.BitType.image},[p.BitType.extractorPageWithBlocksCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPageWithBlocks},[p.BitType.extractorConfiguration]:{since:"1.7.1",baseBitType:p.BitType._standard,tags:[],textFormatDefault:y.TextFormat.plainText},[p.BitType.extractorInformation]:{since:"3.8.0",baseBitType:p.BitType._standard,tags:[],textFormatDefault:y.TextFormat.json},[p.BitType.extractorAiChat]:{since:"3.19.0",baseBitType:p.BitType._standard},[p.BitType.extractorBlock]:{since:"1.5.16",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.blockId},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pageNo},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.x},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.y},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.index},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.classification},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.availableClassifications,maxCount:c.Count.infinity},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.extractorRepeatedText]:{since:"1.5.21",baseBitType:p.BitType.article},[p.BitType.extractorPageNumber]:{since:"1.5.21",baseBitType:p.BitType.article},[p.BitType.extractorPageNumberCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPageNumber},[p.BitType.extractorPageHeader]:{since:"1.5.21",baseBitType:p.BitType.article},[p.BitType.extractorPageHeaderCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPageHeader},[p.BitType.extractorPageFooter]:{since:"1.5.21",baseBitType:p.BitType.article},[p.BitType.extractorPageFooterCollapsible]:{since:"1.30.0",baseBitType:p.BitType.extractorPageFooter},[p.BitType.pageOpenBook]:{since:"1.5.10",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.book,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference,maxCount:2}]},{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.pageOpenBookList]:{since:"2.1.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.book,maxCount:c.Count.infinity,chain:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference,maxCount:2}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.pageSubscribe]:{since:"1.5.10",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.mailingList}]},[p.BitType.assignmentList]:{since:"1.4.13",baseBitType:p.BitType.exampleList},[p.BitType.pageFooter]:{since:"1.4.13",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug}],cardSet:r.CardSetConfigKey._exampleBitList},[p.BitType.legend]:{since:"3.12.0",baseBitType:p.BitType._standard,tags:[],cardSet:r.CardSetConfigKey._definitionList},[p.BitType.smartStandardLegend]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardLegendNonNormative]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardLegendNormative]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardRemarkLegend]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardRemarkLegendNonNormative]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.smartStandardRemarkLegendNormative]:{since:"3.12.0",baseBitType:p.BitType.legend},[p.BitType.definitionList]:{since:"1.34.0",baseBitType:p.BitType._standard,tags:[],cardSet:r.CardSetConfigKey._definitionList},[p.BitType.metaSearchDefaultTerms]:{since:"3.12.0",baseBitType:p.BitType._standard,tags:[],cardSet:r.CardSetConfigKey._definitionList},[p.BitType.metaSearchDefaultTopics]:{since:"3.12.0",baseBitType:p.BitType.metaSearchDefaultTerms},[p.BitType.flashcard]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon}],cardSet:r.CardSetConfigKey._flashcard},[p.BitType.flashcard1]:{since:"1.3.0",baseBitType:p.BitType.flashcard},[p.BitType.qAndACard]:{since:"3.25.0",baseBitType:p.BitType.flashcard1},[p.BitType.focusImage]:{since:"1.3.0",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.focusX},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.focusY}]},[p.BitType.highlightText]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.image]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.resource,configKey:a.ResourceConfigKey.backgroundWallpaper,chain:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImageCommon}]},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.appCreateBitsFromImage]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.appGetScreenshot]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.detailsImage]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.figure]:{since:"1.3.0",baseBitType:p.BitType.image,cardSet:r.CardSetConfigKey._definitionList},[p.BitType.imageBanner]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageFigure]:{since:"1.3.0",baseBitType:p.BitType.image,cardSet:r.CardSetConfigKey._definitionList},[p.BitType.imageFigureAlt]:{since:"1.16.0",baseBitType:p.BitType.imageFigure},[p.BitType.standardImageFigureNormative]:{since:"1.16.0",baseBitType:p.BitType.imageFigure},[p.BitType.standardImageFigureNonNormative]:{since:"1.16.0",baseBitType:p.BitType.imageFigure},[p.BitType.smartStandardImageFigureNormative]:{since:"1.28.0",baseBitType:p.BitType.standardImageFigureNormative},[p.BitType.smartStandardImageFigureNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardImageFigureNonNormative},[p.BitType.smartStandardImageFigureNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardImageFigureNormative},[p.BitType.smartStandardImageFigureNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardImageFigureNonNormative},[p.BitType.imageLandscape]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageMood]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imagePortrait]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imagePrototype]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageSeparator]:{since:"1.4.15",baseBitType:p.BitType.image},[p.BitType.imageSeparatorAlt]:{since:"1.16.0",baseBitType:p.BitType.imageSeparator},[p.BitType.imageScreenshot]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageStyled]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageSuperWide]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.imageZoom]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.langLifeSkillIcon]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.lifeSkillSticker]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.pageBanner]:{since:"1.4.3",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug}]},[p.BitType.pageHero]:{since:"1.11.0",baseBitType:p.BitType.pageBanner},[p.BitType.screenshot]:{since:"1.3.0",deprecated:"1.4.0",baseBitType:p.BitType.image},[p.BitType.tableImage]:{since:"1.5.15",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.caption}]},[p.BitType.tableImageAlt]:{since:"1.16.0",baseBitType:p.BitType.tableImage},[p.BitType.standardTableImageNormative]:{since:"1.16.0",baseBitType:p.BitType.tableImage},[p.BitType.standardTableImageNonNormative]:{since:"1.16.0",baseBitType:p.BitType.tableImage},[p.BitType.standardRemarkTableImageNormative]:{since:"1.17.0",baseBitType:p.BitType.tableImage},[p.BitType.standardRemarkTableImageNonNormative]:{since:"1.17.0",baseBitType:p.BitType.tableImage},[p.BitType.smartStandardTableImageNormative]:{since:"1.28.0",baseBitType:p.BitType.standardTableImageNormative},[p.BitType.smartStandardTableImageNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardTableImageNonNormative},[p.BitType.smartStandardRemarkTableImageNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkTableImageNormative},[p.BitType.smartStandardRemarkTableImageNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkTableImageNonNormative},[p.BitType.smartStandardTableImageNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardTableImageNormative},[p.BitType.smartStandardTableImageNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardTableImageNonNormative},[p.BitType.smartStandardRemarkTableImageNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkTableImageNormative},[p.BitType.smartStandardRemarkTableImageNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkTableImageNonNormative},[p.BitType.imageLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImageLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.imageOnDevice]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_imageSource}],resourceAttachmentAllowed:!1},[p.BitType.imageResponsive]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImageResponsive}],resourceAttachmentAllowed:!1},[p.BitType.imagesLogoGrave]:{since:"1.5.11",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceImage,minCount:1,maxCount:c.Count.infinity}],resourceAttachmentAllowed:!1},[p.BitType.prototypeImages]:{since:"1.6.1",baseBitType:p.BitType.imagesLogoGrave},[p.BitType.internalLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference}]},[p.BitType.interview]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars}],cardSet:r.CardSetConfigKey._questions},[p.BitType.interviewInstructionGrouped]:{since:"1.3.0",baseBitType:p.BitType.interview},[p.BitType.botInterview]:{since:"1.3.0",baseBitType:p.BitType.interview},[p.BitType.learningPathBook]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_learningPathCommon}]},[p.BitType.bookLink]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.bookLinkNext]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.bookLinkPrev]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathClassroomEvent]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathClassroomTraining]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathClosing]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathFeedback]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathLearningGoal]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathLti]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathSign]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathStep]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook},[p.BitType.learningPathBotTraining]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.bot}]},[p.BitType.learningPathExternalLink]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.externalLink},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.externalLinkText}]},[p.BitType.learningPathVideoCall]:{since:"1.3.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.videoCallLink}]},[p.BitType.leLearningObjectives]:{since:"1.25.0",baseBitType:p.BitType.learningPathLearningGoal,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leVideoCall]:{since:"1.25.0",baseBitType:p.BitType.learningPathVideoCall,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leClassroomEvent]:{since:"1.25.0",baseBitType:p.BitType.learningPathClassroomEvent,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leCompletion]:{since:"1.25.0",baseBitType:p.BitType.learningPathClosing,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leExternalLink]:{since:"1.25.0",baseBitType:p.BitType.learningPathExternalLink,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leReadBook]:{since:"1.25.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leLearningStep]:{since:"1.25.0",baseBitType:p.BitType.learningPathStep,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.lePreparationTask]:{since:"1.26.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType}]},[p.BitType.leRead]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leTask]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leTodo]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leFollowUpTask]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leFinishingTask]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leAssignment]:{since:"1.27.0",baseBitType:p.BitType.lePreparationTask},[p.BitType.leWatchVideoEmbed]:{since:"1.27.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideoEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.leListenAudioEmbed]:{since:"1.27.0",baseBitType:p.BitType.learningPathBook,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.activityType},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceAudioEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.listItem]:{since:"1.22.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.listItemIndent}]},[p.BitType.standardListItem]:{since:"1.22.0",baseBitType:p.BitType.listItem},[p.BitType.smartStandardListItem]:{since:"1.28.0",baseBitType:p.BitType.standardListItem},[p.BitType.smartStandardListItemCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardListItem},[p.BitType.mark]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_markConfig},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_mark}]},[p.BitType.match]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.isCaseSensitive}],cardSet:r.CardSetConfigKey._matchPairs},[p.BitType.matchAll]:{since:"1.3.0",baseBitType:p.BitType.match},[p.BitType.matchReverse]:{since:"1.3.0",baseBitType:p.BitType.match},[p.BitType.matchAllReverse]:{since:"1.3.0",baseBitType:p.BitType.match},[p.BitType.matchSolutionGrouped]:{since:"1.3.0",baseBitType:p.BitType.match},[p.BitType.matchMatrix]:{since:"1.3.0",baseBitType:p.BitType.match,cardSet:r.CardSetConfigKey._matchMatrix},[p.BitType.matchAudio]:{since:"1.3.0",baseBitType:p.BitType.match,cardSet:r.CardSetConfigKey._matchAudioPairs},[p.BitType.matchPicture]:{since:"1.3.0",baseBitType:p.BitType.match,cardSet:r.CardSetConfigKey._matchImagePairs},[p.BitType.feedback]:{since:"3.13.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.reasonableNumOfChars}],cardSet:r.CardSetConfigKey._feedback},[p.BitType.learningDocumentationFeedback]:{since:"3.13.0",baseBitType:p.BitType.feedback},[p.BitType.handInFeedbackExpert]:{since:"3.30.0",baseBitType:p.BitType.feedback},[p.BitType.handInFeedbackSelf]:{since:"3.30.0",baseBitType:p.BitType.feedback},[p.BitType.multipleChoice1]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.coachSelfReflectionMultipleChoice1]:{since:"1.3.0",baseBitType:p.BitType.multipleChoice1},[p.BitType.multipleChoice]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}],cardSet:r.CardSetConfigKey._quiz},[p.BitType.coachSelfReflectionMultipleChoice]:{since:"1.3.0",baseBitType:p.BitType.multipleChoice},[p.BitType.multipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.coachCallToActionMultipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType.multipleChoiceText},[p.BitType.coachSelfReflectionMultipleChoiceText]:{since:"1.3.0",baseBitType:p.BitType.multipleChoiceText},[p.BitType.multipleResponse1]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}]},[p.BitType.coachSelfReflectionMultipleResponse1]:{since:"1.3.0",baseBitType:p.BitType.multipleResponse1},[p.BitType.multipleResponse]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_trueFalse}],cardSet:r.CardSetConfigKey._quiz},[p.BitType.coachSelfReflectionMultipleResponse]:{since:"1.3.0",baseBitType:p.BitType.multipleResponse},[p.BitType.page]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.thumbImage}]},[p.BitType.pageCollapsible]:{since:"1.30.0",baseBitType:p.BitType.page},[p.BitType.pageCoverImage]:{since:"1.22.0",baseBitType:p.BitType.page},[p.BitType.pageBuyButton]:{since:"1.4.3",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.content2Buy},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.pageBuyButtonAlt]:{since:"1.31.0",baseBitType:p.BitType.pageBuyButton},[p.BitType.pageBuyButtonPromotion]:{since:"1.5.11",baseBitType:p.BitType.pageBuyButton},[p.BitType.pageSubpage]:{since:"1.6.6",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.page}]},[p.BitType.pageShopInShop]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pageCategory]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pageAcademy]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pagePromotion]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pageSpecial]:{since:"1.6.6",baseBitType:p.BitType.pageSubpage},[p.BitType.pagePerson]:{since:"1.5.16",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_person},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.pageProduct]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.product}]},[p.BitType.pageProductList]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productList,maxCount:c.Count.infinity}]},[p.BitType.pageProductVideo]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productVideo}]},[p.BitType.pageProductVideoList]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productVideoList,maxCount:c.Count.infinity}]},[p.BitType.pageSectionFolder]:{since:"1.4.17",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.slug},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.productFolder}]},[p.BitType.photo]:{since:"1.3.0",baseBitType:p.BitType.image},[p.BitType.quote]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.quotedPerson}]},[p.BitType.rating]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[]},[p.BitType.coachSelfReflectionRating]:{since:"1.3.0",baseBitType:p.BitType.rating},[p.BitType.releaseNote]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.releaseVersion},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.releaseKind},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.releaseDate}]},[p.BitType.reviewNote]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.title},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.resolved},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.resolvedDate},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.resolvedBy}],rootExampleType:u.ExampleType.string},[p.BitType.reviewAuthorNote]:{since:"1.3.0",baseBitType:p.BitType.reviewNote},[p.BitType.reviewCustomerNote]:{since:"3.5.0",baseBitType:p.BitType.reviewNote},[p.BitType.reviewReviewerNote]:{since:"1.3.0",baseBitType:p.BitType.reviewNote},[p.BitType.reviewRequestForReviewNote]:{since:"1.3.0",baseBitType:p.BitType.reviewNote},[p.BitType.reviewApprovedNote]:{since:"1.3.0",baseBitType:p.BitType.reviewNote},[p.BitType.sampleSolution]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.tag,configKey:s.TagConfigKey.anchor},{type:l.BitTagType.tag,configKey:s.TagConfigKey.tag_reference}]},[p.BitType.sequence]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon}],cardSet:r.CardSetConfigKey._elements,rootExampleType:u.ExampleType.boolean},[p.BitType.stillImageFilm]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceStillImageFilm}],resourceAttachmentAllowed:!1},[p.BitType.stillImageFilmEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceStillImageFilmEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.stillImageFilmLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceStillImageFilmLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.surveyAnonymous]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[]},[p.BitType.survey]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[]},[p.BitType.surveyMatrix]:{since:"1.6.2",baseBitType:p.BitType.image,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pointerTop,minCount:1,maxCount:1},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.pointerLeft,minCount:1,maxCount:1},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption,minCount:1,maxCount:1}]},[p.BitType.surveyMatrixMe]:{since:"1.6.2",baseBitType:p.BitType.surveyMatrix},[p.BitType.surveyRating]:{since:"1.6.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.ratingLevelStart,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.label}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.ratingLevelEnd,chain:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.label}]},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.ratingLevelSelected},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.surveyRatingOnce]:{since:"1.6.0",baseBitType:p.BitType.surveyRating},[p.BitType.surveyRatingDisplay]:{since:"1.6.0",baseBitType:p.BitType.surveyRating},[p.BitType.scorm]:{since:"1.5.11",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.scormSource},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.posterImage}]},[p.BitType.pronunciationTable]:{since:"3.1.0",baseBitType:p.BitType._standard,tags:[],cardSet:r.CardSetConfigKey._pronunciationTable},[p.BitType.table]:{since:"1.5.19",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.caption},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableFixedHeader},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableSearch},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableSort},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tablePagination},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tablePaginationLimit},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableHeight},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableWhitespaceNoWrap},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableAutoWidth},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableResizableColumns},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.tableColumnMinWidth}],cardSet:r.CardSetConfigKey._table},[p.BitType.tableAlt]:{since:"1.16.0",baseBitType:p.BitType.table},[p.BitType.standardTableNormative]:{since:"1.16.0",baseBitType:p.BitType.table},[p.BitType.standardTableNonNormative]:{since:"1.16.0",baseBitType:p.BitType.table},[p.BitType.standardRemarkTableNormative]:{since:"1.17.0",baseBitType:p.BitType.table},[p.BitType.standardRemarkTableNonNormative]:{since:"1.17.0",baseBitType:p.BitType.table},[p.BitType.smartStandardTableNormative]:{since:"1.28.0",baseBitType:p.BitType.standardTableNormative},[p.BitType.smartStandardTableNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardTableNonNormative},[p.BitType.smartStandardRemarkTableNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkTableNormative},[p.BitType.smartStandardRemarkTableNonNormative]:{since:"1.28.0",baseBitType:p.BitType.standardRemarkTableNonNormative},[p.BitType.smartStandardTableNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardTableNormative},[p.BitType.smartStandardTableNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardTableNonNormative},[p.BitType.smartStandardRemarkTableNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkTableNormative},[p.BitType.smartStandardRemarkTableNonNormativeCollapsible]:{since:"1.28.0",baseBitType:p.BitType.smartStandardRemarkTableNonNormative},[p.BitType.parameters]:{since:"1.18.0",baseBitType:p.BitType.table},[p.BitType.toc]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[]},[p.BitType.tocChapter]:{since:"1.5.5",baseBitType:p.BitType.toc,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.maxDisplayLevel}]},[p.BitType.tocInline]:{since:"3.24.0",baseBitType:p.BitType.toc,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.maxTocChapterLevel}]},[p.BitType.anchor]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.bitBookEnding]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.bitBookSummary]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionAnnounce]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionRatingNumber]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionRemind]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionSave]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.botActionTrueFalse]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.chapterSubjectMatter]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.chat]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.conclusion]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.conclusionAlt]:{since:"1.16.0",baseBitType:p.BitType.conclusion},[p.BitType.documentUpload]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.footNote]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.groupBorn]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.groupDied]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.recordAudio]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.recordVideo]:{since:"1.5.24",baseBitType:p.BitType._standard},[p.BitType.stickyNote]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.takePicture]:{since:"1.3.0",baseBitType:p.BitType._standard},[p.BitType.handInAudio]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInContact]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInDocument]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInFile]:{since:"3.2.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.handInAcceptFileType,maxCount:c.Count.infinity}]},[p.BitType.handInLocation]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInPhoto]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInScan]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInSubmit]:{since:"3.2.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.handInRequirement,maxCount:c.Count.infinity},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.handInInstruction},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.buttonCaption}]},[p.BitType.handInVideo]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.handInVoice]:{since:"1.5.15",baseBitType:p.BitType._standard},[p.BitType.trueFalse1]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.labelTrue},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.labelFalse},{type:l.BitTagType.tag,configKey:s.TagConfigKey.true},{type:l.BitTagType.tag,configKey:s.TagConfigKey.false}],rootExampleType:u.ExampleType.boolean},[p.BitType.trueFalse]:{since:"1.3.0",baseBitType:p.BitType._standard,quizBit:!0,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_quizCommon},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.labelTrue},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.labelFalse}],cardSet:r.CardSetConfigKey._statements},[p.BitType.vendorAmcharts5Chart]:{since:"1.5.8",baseBitType:p.BitType.code,tags:[],textFormatDefault:y.TextFormat.json},[p.BitType.vendorDatadogDashboardEmbed]:{since:"3.12.0",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.vendorDashboardId}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorFormbricksEmbed]:{since:"3.8.0",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.vendorSurveyId}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorFormbricksEmbedAnonymous]:{since:"3.9.0",baseBitType:p.BitType.vendorFormbricksEmbed},[p.BitType.vendorFormbricksLink]:{since:"3.8.0",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.vendorSurveyId}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorFormbricksLinkAnonymous]:{since:"3.9.0",baseBitType:p.BitType.vendorFormbricksLink},[p.BitType.vendorHighchartsChart]:{since:"1.5.28",baseBitType:p.BitType.vendorAmcharts5Chart},[p.BitType.vendorIframelyEmbed]:{since:"1.5.10",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.width},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.height},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.vendorUrl}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorIframelyCard]:{since:"1.5.10",baseBitType:p.BitType.vendorIframelyEmbed},[p.BitType.vendorIframelyPreview]:{since:"1.5.10",baseBitType:p.BitType.vendorIframelyEmbed},[p.BitType.vendorIframelyPreviewMini]:{since:"1.5.10",baseBitType:p.BitType.vendorIframelyEmbed},[p.BitType.vendorJupyterOutput]:{since:"1.4.3",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.jupyterId},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.jupyterExecutionCount}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorJupyterCellCode]:{since:"1.4.3",baseBitType:p.BitType.vendorJupyterOutput},[p.BitType.vendorJupyterCellMarkdown]:{since:"1.4.3",baseBitType:p.BitType.vendorJupyterOutput},[p.BitType.vendorJupyterCellRaw]:{since:"1.4.3",baseBitType:p.BitType.vendorJupyterOutput},[p.BitType.vendorJupyterIpynb]:{since:"1.4.3",baseBitType:p.BitType.vendorJupyterOutput},[p.BitType.vendorPadletEmbed]:{since:"1.3.0",baseBitType:p.BitType.code,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.padletId}],textFormatDefault:y.TextFormat.plainText},[p.BitType.vendorStripePricingTable]:{since:"1.20.0",baseBitType:p.BitType.article,tags:[{type:l.BitTagType.property,configKey:n.PropertyConfigKey.stripePricingTableId,minCount:1},{type:l.BitTagType.property,configKey:n.PropertyConfigKey.stripePublishableKey,minCount:1}]},[p.BitType.vendorStripePricingTableExternal]:{since:"3.13.0",baseBitType:p.BitType.vendorStripePricingTable},[p.BitType.video]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideo,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.videoLandscape]:{since:"1.3.0",baseBitType:p.BitType.video},[p.BitType.videoPortrait]:{since:"1.3.0",baseBitType:p.BitType.video},[p.BitType.videoEmbed]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideoEmbed,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.videoEmbedLandscape]:{since:"1.3.0",baseBitType:p.BitType.videoEmbed},[p.BitType.videoEmbedPortrait]:{since:"1.3.0",baseBitType:p.BitType.videoEmbed},[p.BitType.videoLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceVideoLink,minCount:1}],resourceAttachmentAllowed:!1},[p.BitType.videoLinkLandscape]:{since:"1.3.0",baseBitType:p.BitType.videoLink},[p.BitType.videoLinkPortrait]:{since:"1.3.0",baseBitType:p.BitType.videoLink},[p.BitType.websiteLink]:{since:"1.3.0",baseBitType:p.BitType._standard,tags:[{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceBitTags},{type:l.BitTagType.group,configKey:o.GroupConfigKey.group_resourceWebsiteLink,minCount:1}],resourceAttachmentAllowed:!1}};t.BITS=g},6877:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextLocation=void 0;const r=(0,i(4718).superenum)({tag:"tag",body:"body"});t.TextLocation=r},6915:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GroupConfigType=void 0;const r=(0,i(4718).superenum)({standard:"standard",resource:"resource",comboResource:"comboResource"});t.GroupConfigType=r},6936:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.initEnv=t.env=void 0;const r=i(6278),o=i(9561),n=i(2287),a=i(5659);const s=new class{constructor(){Object.defineProperty(this,"userAgentInfo",{value:(0,a.parseUserAgent)(),enumerable:!1}),this.bootTimestamp=Date.now(),this.app="",this.appVersion=n.EMPTY_VERSION,this.environment=this.getEnvironment(),this.environmentVersion=this.getEnvironmentVersion(),this.isBrowser=this.getIsBrowser(),this.isNode=this.environment===r.Environment.node,this.isCI=this.getIsCI(),this.NODE_ENV=this.getNodeEnv(),this.os=this.getOs(),this.osVersion=this.getOsVersion()}init(e,t){this.app=e,this.appVersion=this.parseMMBVersion(t)}get upTimestamp(){return Date.now()-this.bootTimestamp}getEnvironment(){return this.userAgentInfo?this.userAgentInfo.browser:"undefined"!=typeof process&&void 0!==process.versions&&process.versions.node?r.Environment.node:r.Environment.unknown}getEnvironmentVersion(){return this.userAgentInfo?this.parseMMBVersion(this.userAgentInfo.browserVersion):"undefined"!=typeof process?this.parseMMBVersion(process.version):n.EMPTY_VERSION}getOs(){return this.userAgentInfo?this.userAgentInfo.os:("undefined"!=typeof process&&void 0!==process.versions&&process.versions.node,o.Os.unknown)}getOsVersion(){return this.userAgentInfo?this.parseMMBVersion(this.userAgentInfo.osVersion):"undefined"!=typeof process?this.parseMMBVersion(""):n.EMPTY_VERSION}getIsBrowser(){return!("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof navigator||!navigator.userAgent)}getIsCI(){return!("undefined"==typeof process||!process.env||!process.env.CI)}getNodeEnv(){return"undefined"!=typeof process&&process.env?"production":""}parseMMBVersion(e){if(!e)return n.EMPTY_VERSION;e.startsWith("v")&&(e=e.substring(1));const t=e.split(".",1e3);let i="",r="",o="",a="";for(let e=0,n=t.length;e<n;e++){const n=t[e];0===e?i=n:1===e?r=n:2===e?a=n:3===e&&(o=n)}return{full:e,major:i,minor:r,patch:a,build:o}}};t.env=s;const l=s.init.bind(s);t.initEnv=l},6989:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayUtils=void 0;const i=new class{asArray(e){if(null!=e)return Array.isArray(e)?e:[e]}asSingle(e,t){if(null!=e)return Array.isArray(e)?e.length>0?t?e[e.length-1]:e[0]:void 0:e}};t.ArrayUtils=i},6991:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.commentTagContentProcessor=function(e,t,i,o){if(!o.internalComments)return;const{value:n}=i,a=r.StringUtils.isString(n)?r.StringUtils.trimmedString(n):void 0;if(!a)return;o.internalComments.push(a)};const r=i(9681)},7112:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.groupConfigKeys=t.GroupConfigKey=void 0;const r=i(4718),o={group_standardAllBits:"group_standardAllBits",group_standardItemLeadInstructionHint:"group_standardItemLeadInstructionHint",group_standardExample:"group_standardExample",group_standardTags:"group_standardTags",group_imageSource:"group_imageSource",group_technicalTerm:"group_technicalTerm",group_person:"group_person",group_gap:"group_gap",group_trueFalse:"group_trueFalse",group_markConfig:"group_markConfig",group_mark:"group_mark",group_bookCommon:"group_bookCommon",group_learningPathCommon:"group_learningPathCommon",group_quizCommon:"group_quizCommon",group_resourceBitTags:"group_resourceBitTags",group_resourceCommon:"group_resourceCommon",group_resourceImageCommon:"group_resourceImageCommon",group_resourceAudioCommon:"group_resourceAudioCommon",group_resourceVideoCommon:"group_resourceVideoCommon",group_resourceIcon:"group_resourceIcon",group_resourceImage:"group_resourceImage",group_resourceImageEmbed:"group_resourceImageEmbed",group_resourceImageLink:"group_resourceImageLink",group_resourceImageResponsive:"group_resourceImageResponsive",group_resourceImagePortrait:"group_resourceImagePortrait",group_resourceImageLandscape:"group_resourceImageLandscape",group_resourceAudio:"group_resourceAudio",group_resourceAudioEmbed:"group_resourceAudioEmbed",group_resourceAudioLink:"group_resourceAudioLink",group_resourceVideo:"group_resourceVideo",group_resourceVideoEmbed:"group_resourceVideoEmbed",group_resourceVideoLink:"group_resourceVideoLink",group_resourceStillImageFilm:"group_resourceStillImageFilm",group_resourceStillImageFilmEmbed:"group_resourceStillImageFilmEmbed",group_resourceStillImageFilmLink:"group_resourceStillImageFilmLink",group_resourceArticle:"group_resourceArticle",group_resourceArticleEmbed:"group_resourceArticleEmbed",group_resourceArticleLink:"group_resourceArticleLink",group_resourceDocument:"group_resourceDocument",group_resourceDocumentEmbed:"group_resourceDocumentEmbed",group_resourceDocumentLink:"group_resourceDocumentLink",group_resourceDocumentDownload:"group_resourceDocumentDownload",group_resourceAppLink:"group_resourceAppLink",group_resourceWebsiteLink:"group_resourceWebsiteLink"};t.groupConfigKeys=o;const n=(0,r.superenum)(o);t.GroupConfigKey=n},7124:function(e,t,i){var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkPegParserProcessor=void 0;const o=i(5809),n=i(7735),a=i(2028),s=i(5854),l=i(8453),p=i(6220),c=i(6149),u=i(385),y=i(6877),g=i(9681),d=i(4266),T=i(5033),f=i(1083),m=i(4402),h=i(4382),b=i(3904),B=i(9289),v=i(5189),C=i(9647),x=i(3990),P=i(6521),k=i(7667),K=i(9885),w=i(3029),_=!1,A=!0,S=!0,L=!0,I=!0,F=new o.Builder;t.BitmarkPegParserProcessor=class{constructor(e){this.nonFatalWarnings=[],this.nonFatalErrors=[],this.parser={},this.parse=e.parse,this.parserText=e.parserText,this.parserLocation=e.parserLocation,this.context={bitConfig:a.Config.getBitConfig(s.BitType._error),bitType:s.BitType._error,textFormat:u.TextFormat.bitmarkText,DEBUG_BIT_RAW:true,DEBUG_BIT_CONTENT_RAW:_,DEBUG_BIT_CONTENT:A,DEBUG_BIT_TAGS:S,DEBUG_BODY:L,DEBUG_FOOTER:I,DEBUG_CHAIN_CONTENT:true,DEBUG_CHAIN_TAGS:true,DEBUG_CARD_SET_CONTENT:true,DEBUG_CARD_SET:true,DEBUG_CARD_TAGS:true,parser:this.parser,parse:this.parse,bitContentProcessor:this.bitContentProcessor.bind(this),splitBitContent:this.splitBitContent.bind(this),addWarning:this.addWarning.bind(this),addError:this.addError.bind(this),debugPrint:this.debugPrint.bind(this),state:{}}}buildBits(e){var t;const i=[];let r=[];for(const o of e){if(!o)continue;const e=o.value;e?i.push(e):r=r.concat(null!==(t=o.errors)&&void 0!==t?t:[])}return F.buildBitmark({bits:i,errors:r.length>0?r:void 0})}buildBit(e,t){var i;const{bitType:o,textFormat:n,resourceType:l,bitLevel:p,isCommented:c}=e;if(!o||a.Config.isOfBitType(o,s.BitType._error))return this.invalidBit();const u=a.Config.getBitConfig(o);this.context.bitConfig=u,this.context.bitType=o,this.context.textFormat=n,this.context.resourceType=l;const y=a.Config.isOfBitType(o,s.BitType.trueFalse1),g=a.Config.isOfBitType(o,s.BitType.multipleChoice1),T=a.Config.isOfBitType(o,s.BitType.multipleResponse1);this.debugPrint("BIT CONTENT",t),this.resetParserState(),t=this.squashUnwantedInlineBodyBits(t),t=d.BitmarkPegParserValidator.validateBitTags(this.context,t);const m=this.bitContentProcessor(w.BitContentLevel.Bit,u.tags,t),{body:h,footer:b,cardSet:B,title:v,statement:C,statements:x,choices:K,responses:_,propertyStyleResources:A,resources:S,posterImage:L,internalComments:I}=m,N=r(m,["body","footer","cardSet","title","statement","statements","choices","responses","propertyStyleResources","resources","posterImage","internalComments"]);this.debugPrint("BIT TAGS",N),this.debugPrint("BIT BODY",h),this.debugPrint("BIT FOOTER",b);const O=(0,k.buildTitles)(this.context,o,v),E=(0,f.buildCards)(this.context,o,n,B,C,x,K,_),R=(0,P.buildResources)(this.context,l,S),V=[...null!=I?I:[],...null!==(i=E.internalComments)&&void 0!==i?i:[]],j=this.buildBitLevelWarnings(),D=this.buildBitLevelErrors();j&&(this.parser.warnings=j),D&&(this.parser.errors=D);return{value:F.buildBit(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({bitType:o,bitLevel:p,isCommented:c,textFormat:n,resourceType:l},O),{posterImage:L,statement:y?C:void 0,choices:g?K:void 0,responses:T?_:void 0}),N),A),{resources:R}),E),{body:h,footer:b,internalComment:V,parser:this.parser}))}}invalidBit(e){e&&this.addError("Invalid bit"),this.parser.errors=this.buildBitLevelErrors();return{value:F.buildBit({bitType:a.Config.getBitType(s.BitType._error),bitLevel:1,parser:this.parser})}}buildBitHeader(e,t,i){const r=n.Breakscape.unbreakscape(e,{textFormat:u.TextFormat.plainText,textLocation:y.TextLocation.tag}),o=a.Config.getBitType(r),g=a.Config.isBitTypeCommented(r);a.Config.isOfBitType(o,s.BitType._error)&&this.addError(`Invalid bit type: '${r}'`);const d=a.Config.getBitConfig(o);t>a.Config.bitLevelMax?(this.addWarning(`Bit level of ${t} too high, setting to max value of ${a.Config.bitLevelMax}`),t=a.Config.bitLevelMax):t<a.Config.bitLevelMin&&(this.addWarning(`Bit level of ${t} too low, setting to min value of ${a.Config.bitLevelMin}`),t=a.Config.bitLevelMin);let T=u.TextFormat.fromValue(i.textFormat);i.textFormat&&!T&&this.addWarning(`Invalid text format '${i.textFormat}', defaulting to '${l.BodyTextFormat.bitmarkPlusPlus}'`);const f=p.DeprecatedTextFormat.fromValue(i.textFormat);f&&(T=u.TextFormat.bitmarkText,this.addWarning(`${f} text format is deprecated. Bit will be parsed as '${l.BodyTextFormat.bitmarkPlusPlus}'`)),T=null!=T?T:d.textFormatDefault;const m=c.ResourceTag.fromValue(i.resourceType);return i.resourceType&&!m&&this.addWarning(`Invalid resource type '${i.resourceType}', it will be ignored`),{bitType:o,bitLevel:t,textFormat:null!=T?T:d.textFormatDefault,resourceType:m,isCommented:g}}buildTextAndResourceType(e,t){const i={},r=e=>{if(e){const t=n.Breakscape.unbreakscape(g.StringUtils.string(e.value),{textFormat:u.TextFormat.plainText,textLocation:y.TextLocation.tag});e.type===w.TypeKey.TextFormat?i.textFormat=t:i.resourceType=t}};return r(e),r(t),i}resetParserState(){this.context.state={}}squashUnwantedInlineBodyBits(e){const t=[];if(!e)return t;const{textFormat:i}=this.context,r=i===u.TextFormat.bitmarkText,o=(e,t="")=>{const{chain:i,parser:r}=e;if(t+=r.text,i)for(const e of i)t=o(e,t);return t};let n=!1;for(const i of e){const{type:e,value:a}=i,s=null!=a?a:"";let l=!1;if(n||(e===w.TypeKey.BodyText&&!r&&s&&s.trim()&&(n=!0),e===w.TypeKey.PlainTextDivider&&(n=!0,l=!0)),l)t.push({type:w.TypeKey.BodyText,value:"\n"});else if(n)if(e===w.TypeKey.BodyText)t.push({type:w.TypeKey.BodyTextPlain,value:a});else{const e=o(i);t.push({type:w.TypeKey.BodyTextPlain,value:e})}else t.push(i)}return t}bitContentProcessor(e,t,i){const r={};if(!i)return r;const{bitType:o,textFormat:a}=this.context;r.title=[],r.solutions=[],r.__solutionsAst=[],r.statements=[],r.choices=[],r.responses=[],r.propertyStyleResources={},r.resources=[],r.trueFalse=[],r.markConfig=[],r.extraProperties={},r.internalComments=[];let s=!1,l=!1;const p=[];let c=n.Breakscape.EMPTY_STRING,u=n.Breakscape.EMPTY_STRING,y=n.Breakscape.EMPTY_STRING,g=n.Breakscape.EMPTY_STRING;const f=e===w.BitContentLevel.Bit,_=e===w.BitContentLevel.Card,A=e===w.BitContentLevel.Chain,S=()=>{if(c){c=d.BitmarkPegParserValidator.checkBodyPart(this.context,e,c);const t=T.BodyContentProcessor.buildBodyText(c,!1);p.push(t)}c=n.Breakscape.EMPTY_STRING};for(const o of i){const{type:i,value:a}=o;switch(i){case w.TypeKey.ItemLead:(0,B.itemLeadChainContentProcessor)(this.context,e,t,o,r);break;case w.TypeKey.Instruction:case w.TypeKey.Hint:case w.TypeKey.Anchor:case w.TypeKey.SampleSolution:(0,m.defaultTagContentProcessor)(this.context,e,t,o,r);break;case w.TypeKey.Reference:(0,x.referenceTagContentProcessor)(this.context,e,t,o,r,s),s=!0;break;case w.TypeKey.Title:(0,k.titleTagContentProcessor)(this.context,e,t,o,r);break;case w.TypeKey.Property:(0,C.propertyContentProcessor)(this.context,e,t,o,r);break;case w.TypeKey.Gap:A||S(),(0,b.gapChainContentProcessor)(this.context,e,t,o,r,p);break;case w.TypeKey.Mark:A||S(),(0,v.markChainContentProcessor)(this.context,e,t,o,r,p);break;case w.TypeKey.True:case w.TypeKey.False:A||S(),(0,K.trueFalseChainContentProcessor)(this.context,e,t,o,r,p);break;case w.TypeKey.Resource:(0,P.resourceContentProcessor)(this.context,e,t,o,r);break;case w.TypeKey.CardSet:r.cardSet=a,l=!0;break;case w.TypeKey.BodyText:case w.TypeKey.CardText:l?u=n.Breakscape.concatenate(u,a):c=n.Breakscape.concatenate(c,a);break;case w.TypeKey.BodyTextPlain:l?g=n.Breakscape.concatenate(g,a):y=n.Breakscape.concatenate(y,a);break;case w.TypeKey.FooterDivider:l&&(u=n.Breakscape.concatenate(u,a)),l=!0}}S();const L=y?T.BodyContentProcessor.buildBodyText(y,!0):void 0;if(L&&p.push(L),r.itemLead){const e=r.itemLead.length;e>0&&(r.item=r.itemLead[0]),e>1&&(r.lead=r.itemLead[1]),e>2&&(r.pageNumber=r.itemLead[2]),e>3&&(r.marginNumber=r.itemLead[e-1])}return f?r.body=T.BodyContentProcessor.process(this.context,e,o,a,t,r,p,!1):_&&(r.cardBody=T.BodyContentProcessor.process(this.context,e,o,a,t,r,p,!0)),r.footer=h.FooterContentProcessor.process(this.context,e,t,r,u,g),0===Object.keys(r.extraProperties).length&&delete r.extraProperties,0===r.title.length&&delete r.title,0===r.solutions.length&&delete r.solutions,0===r.statements.length&&delete r.statements,0===r.choices.length&&delete r.choices,0===r.responses.length&&delete r.responses,0===r.trueFalse.length&&delete r.trueFalse,0===r.markConfig.length&&delete r.markConfig,0===Object.keys(r.propertyStyleResources).length&&delete r.propertyStyleResources,0===r.resources.length&&delete r.resources,0===r.internalComments.length&&delete r.internalComments,r}buildBitLevelWarnings(){let e;return this.nonFatalWarnings.length>0&&(e=this.nonFatalWarnings,this.nonFatalWarnings=[]),e}buildBitLevelErrors(){let e;return this.nonFatalErrors.length>0&&(e=this.nonFatalErrors,this.nonFatalErrors=[]),e}splitBitContent(e,t){const i=[];let r=[];for(const o of e)t.includes(o.type)&&(r.length>0&&i.push(r),r=[]),r.push(o);return r.length>0&&i.push(r),i}addWarning(e,t,i){var r,o,n;const a={message:e,text:null!==(r=null==t?void 0:t.parser.text)&&void 0!==r?r:this.parserText(),location:null!==(o=null==t?void 0:t.parser.location)&&void 0!==o?o:this.parserLocation(),original:null!==(n=null==i?void 0:i.parser)&&void 0!==n?n:void 0};a.original||delete a.original,this.nonFatalWarnings.push(a)}addError(e,t,i){var r,o,n;const a={message:e,text:null!==(r=null==t?void 0:t.parser.text)&&void 0!==r?r:this.parserText(),location:null!==(o=null==t?void 0:t.parser.location)&&void 0!==o?o:this.parserLocation(),original:null!==(n=null==i?void 0:i.parser)&&void 0!==n?n:void 0};a.original||delete a.original,this.nonFatalErrors.push(a)}debugPrint(e,t){}}},7203:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyAstKey=void 0;const r=(0,i(4718).superenum)({ast_isCaseSensitive:"isCaseSensitive",ast_referenceProperty:"referenceProperty",ast_markConfig:"markConfig",ast_productList:"productList",ast_productVideoList:"productVideoList"});t.PropertyAstKey=r},7461:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PeggyGrammarLocation=void 0;t.PeggyGrammarLocation=class{constructor(e,t){this.source=e,this.start=t}toString(){return String(this.source)}offset(e){return{line:e.line+this.start.line-1,column:1===e.line?e.column+this.start.column-1:e.column,offset:e.offset+this.start.offset}}static offsetStart(e){return e.source&&"function"==typeof e.source.offset?e.source.offset(e.start):e.start}static offsetEnd(e){return e.source&&"function"==typeof e.source.offset?e.source.offset(e.end):e.end}}},7667:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.titleTagContentProcessor=function(e,t,i,r,o){const{textFormat:l}=e,{value:p}=r,c=o.title;if(!c)return;const u=p,y=a.StringUtils.trimmedString(u.title),g=u.level.length;c[g]={titleAst:s.toAst(null!=y?y:"",{textFormat:l,textLocation:n.TextLocation.tag}),titleString:null!=y?y:""}},t.buildTitles=function(e,t,i){var n,a,s,l,p,c,u,y,g,d;if(i=null!=i?i:[],r.Config.isOfBitType(t,o.BitType.chapter)){let e;return i.length>0&&(e=i[i.length-1]),{title:null!==(n=null==e?void 0:e.titleAst)&&void 0!==n?n:[],titleString:null!==(a=null==e?void 0:e.titleString)&&void 0!==a?a:"",level:i.length>0?i.length-1:void 0}}return{title:null!==(l=null===(s=i[1])||void 0===s?void 0:s.titleAst)&&void 0!==l?l:void 0,titleString:null!==(c=null===(p=i[1])||void 0===p?void 0:p.titleString)&&void 0!==c?c:void 0,subtitle:null!==(y=null===(u=i[2])||void 0===u?void 0:u.titleAst)&&void 0!==y?y:void 0,subtitleString:null!==(d=null===(g=i[2])||void 0===g?void 0:g.titleString)&&void 0!==d?d:void 0}};const r=i(2028),o=i(5854),n=i(6877),a=i(9681),s=new(i(777).TextParser)},7678:(e,t,i)=>{const{deserialize:r}=i(5005),{serialize:o}=i(5416);Object.defineProperty(t,"__esModule",{value:!0}).default="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?r(o(e,t)):structuredClone(e):(e,t)=>r(o(e,t)),t.deserialize=r,t.serialize=o},7735:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Breakscape=void 0;const r=i(385),o=i(6877),n=i(9681),a=/([*`_!=])(?=\1)/,s=/(\^*])/,l=/(\^+)/,p=`${s.source}|${l.source}`,c=`${a.source}|${/^(\|)(code[\s]*|code:|image:|[\s]*$)/.source}|${/^([#]{1,3})([^\S\r\n]+)/.source}|${/^(•)([0-9]+[iI]*|[a-zA-Z]{1}|_|\+|-|)([^\S\r\n]+)/.source}|${/(\[)([.@#▼►%!?+\-$_=&])/.source}|${/^(~)(~~~[ \t]*)$/.source}|${/^(\$)(\$\$\$[ \t]*)$/.source}|${l.source}`,u=`${/^(\[)(\^*)(\.)/.source}`,y=new RegExp(`${a.source}|${s.source}|${l.source}`,"gm"),g=new RegExp(p,"gm"),d=new RegExp(c,"gm"),T=new RegExp(u,"gm"),f=new RegExp("^(?:(\\[)(\\^*)(\\.))|(\\^+)","gm"),m=new RegExp("\\^([\\^]*)","gm"),h=new RegExp("^(\\[)\\^(\\^*)(\\.)","gm"),b=new RegExp("^(\\||•|#)","gm"),B={textFormat:r.TextFormat.bitmarkText,textLocation:o.TextLocation.body};const v=new class{constructor(){this.EMPTY_STRING=""}breakscape(e,t){if(null==e)return e;const i=Object.assign({},B,t),{regex:r,replacer:o}=this.selectBreakscapeRegexAndReplacer(i.textFormat,i.textLocation,i.v2),a=e=>e?e=e.replace(r,o):e;if(Array.isArray(e)){const t=i.inPlaceArray?e:new Array(e.length);for(let i=0,r=e.length;i<r;i++){const r=e[i];n.StringUtils.isString(r)&&(t[i]=a(r))}e=t}else n.StringUtils.isString(e)&&(e=a(e));return e}unbreakscape(e,t){if(null==e)return e;const i=Object.assign({},B,t),{regex:r,replacer:o}=this.selectUnbreakscapeRegexAndReplacer(i.textFormat,i.textLocation),a=e=>e?e=e.replace(r,o):e;if(Array.isArray(e)){const t=i.inPlaceArray?e:new Array(e.length);for(let i=0,r=e.length;i<r;i++){const r=e[i];n.StringUtils.isString(r)?t[i]=a(r):t[i]=r}e=t}else n.StringUtils.isString(e)&&(e=a(e));return e}breakscapeCode(e,t){if(null==e)return e;const i=Object.assign({},B,t),r=e=>e?e.replace(b,"$1^"):e;if(Array.isArray(e)){const t=i.inPlaceArray?e:[e.length];for(let t=0,i=e.length;t<i;t++){const i=e[t];n.StringUtils.isString(i)&&(e[t]=r(i))}e=t}else n.StringUtils.isString(e)&&(e=r(e));return e}selectBreakscapeRegexAndReplacer(e,t,i){let n,a;return t===o.TextLocation.tag?(n=g,a="$2^$1",i||e!==r.TextFormat.bitmarkText||(n=y,a="$1$3^$2")):(n=T,a="$1^$2$3",e===r.TextFormat.bitmarkText&&(i?(n=f,a="$1$4^$2$3"):(n=d,a="$1$2$4$6$9$11$13$15^$3$5$7$8$10$12$14"))),{regex:n,replacer:a}}selectUnbreakscapeRegexAndReplacer(e,t){const i=!(e===r.TextFormat.bitmarkText);let n=m,a="$1";return t===o.TextLocation.body&&i&&(n=h,a="$1$2$3"),{regex:n,replacer:a}}concatenate(e,t){return e+t}};t.Breakscape=v},7797:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tagConfigKeys=t.TagConfigKey=void 0;const r=i(4718),o={title:"title",anchor:"anchor",tag_reference:"tag_reference",property:"property",itemLead:"itemLead",instruction:"instruction",hint:"hint",true:"true",false:"false",sampleSolution:"sampleSolution",gap:"gap",tag_mark:"tag_mark",resource:"resource"};t.tagConfigKeys=o;const n=(0,r.superenum)(o);t.TagConfigKey=n},7984:function(e,t,i){var r=this&&this.__awaiter||function(e,t,i,r){return new(i||(i=Promise))((function(o,n){function a(e){try{l(r.next(e))}catch(e){n(e)}}function s(e){try{l(r.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonObjectGenerator=void 0;const o=i(6772),n=i(2497);t.JsonObjectGenerator=class{constructor(e){this.writer=new o.StringWriter,this.generator=new n.JsonGenerator(this.writer,e)}generate(e){return r(this,void 0,void 0,(function*(){return yield this.generator.generate(e),JSON.parse(this.writer.getString())}))}generateSync(e){return this.generator.generateSync(e),JSON.parse(this.writer.getString())}}},8025:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NumberUtils=void 0;const i=new class{asNumber(e,t){if(null==e)return null!=t?t:void 0;const i=+e;return Number.isNaN(i)||!isFinite(i)?null!=t?t:void 0:i}isNumeric(e){if(null==e)return!1;const t=+e;return!Number.isNaN(t)&&isFinite(t)}};t.NumberUtils=i},8199:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardSetConfigKey=void 0;const r=(0,i(4718).superenum)({_flashcard:"_flashcard",_definitionList:"_definitionList",_elements:"_elements",_statements:"_statements",_quiz:"_quiz",_feedback:"_feedback",_questions:"_questions",_matchPairs:"_matchPairs",_matchAudioPairs:"_matchAudioPairs",_matchImagePairs:"_matchImagePairs",_matchMatrix:"_matchMatrix",_table:"_table",_pronunciationTable:"_pronunciationTable",_botActionResponses:"_botActionResponses",_exampleBitList:"_exampleBitList",_clozeList:"_clozeList",_ingredients:"_ingredients",_bookReferenceList:"_bookReferenceList"});t.CardSetConfigKey=r},8216:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.itemLeadTagContentProcessor=function(e,t,i,a,s){const{textFormat:l}=e,{value:p}=a,c=new n.TextParser,u=o.StringUtils.trimmedString(p);s.itemLead||(s.itemLead=[]);const y=c.toAst(u,{textFormat:l,textLocation:r.TextLocation.tag});s.itemLead.push(y)};const r=i(6877),o=i(9681),n=i(777)},8321:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StartRules=void 0,t.SyntaxError=p,t.parse=u;const r=i(7735),o="8.32.2";function n(e){return"string"!=typeof e?null:r.Breakscape.unbreakscape(e)}function a(e){e&&"object"==typeof e&&(delete e._tempParsingParent,delete e._tempListStart,Object.keys(e).forEach((t=>{a(e[t])})))}function s(e){function t(e){for(let r=e.length-1;r>=0;r--){const o=e[r];(i=o)&&"text"===i.type&&!i.text?e.splice(r,1):o&&Array.isArray(o.content)&&t(o.content)}var i}return Array.isArray(e)?t(e):e&&Array.isArray(e.content)&&t(e.content),e}function l(e){return"undefined"!=typeof parser?parser.parse(e,{startRule:"bitmarkPlusString"}):u(e,{startRule:"bitmarkPlusString"})}function p(e,t,i,r){var o=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(o,p.prototype),o.expected=t,o.found=i,o.location=r,o.name="SyntaxError",o}function c(e,t,i){return i=i||" ",e.length>t?e:(t-=e.length,e+(i+=i.repeat(t)).slice(0,t))}function u(e,t){var i,r={},c=(t=void 0!==t?t:{}).grammarSource,u={version:qn,bitmarkPlusPlus:function(){var e,t;if(Dn++,e=[],(t=Hn())!==r)for(;t!==r;)e.push(t),t=Hn();else e=r;e===r&&(e=function(){var e,t;return e=En,t="",t=Xr(),e=t,e}());Dn--,e===r&&(t=r,0===Dn&&Wn(wt));return e},bitmarkPlus:function(){var e,t;Dn++,e=En,t=xa(),t=Go(t),e=t,Dn--,t=r,0===Dn&&Wn(wt);return e},bitmarkMinusMinus:function(){var e,t;Dn++,e=En,t=Ia(),t=Kn(t),e=t,Dn--,t=r,0===Dn&&Wn(wr);return e},bitmarkPlusString:function(){var e;Dn++,e=xa(),Dn--,0===Dn&&Wn(si);return e},bitmarkMinusMinusString:Ia},y=qn,g="|",d="### ",T="## ",f="# ",m="code",h=":",b="bitmark++",B="bitmark--",v="JavaScript",C="• ",x="•_ ",P="•",k=" ",K="I ",w="i ",_="•A ",A="•a ",S="•+ ",L="•- ",I="\t",F="image",N="#",O="@",E="width",R="height",V="alignment",j="captionAlign",D="left",G="center",M="right",U="=",J="|latex|",$="|imageInline:",W="alignmentVertical",z="size",q="top",H="middle",Y="bottom",X="baseline",Q="sub",Z="super",ee="text-bottom",te="text-top",ie="line-height",re="font-height",oe="explicit",ne="link:",ae="extref:",se="provider:",le="xref:",pe="►",ce="symbol:",ue="footnote:",ye="footnote*:",ge="var:",de="code:",Te="timer",fe="timer:",me="duration:",he="P",be="color:",Be="|►",ve="bold",Ce="italic",xe="light",Pe="highlight",ke="strike",Ke="subscript",we="superscript",_e="ins",Ae="del",Se="underline",Le="doubleUnderline",Ie="circle",Fe="languageEm",Ne="userUnderline",Oe="userDoubleUnderline",Ee="userStrike",Re="userCircle",Ve="userHighlight",je="notranslate",De="aqua",Ge="black",Me="blue",Ue="pink",Je="fuchsia",$e="lightgrey",We="gray",ze="darkgray",qe="green",He="lime",Ye="magenta",Xe="maroon",Qe="navy",Ze="olive",et="orange",tt="purple",it="red",rt="silver",ot="teal",nt="violet",at="white",st="yellow",lt="*",pt="_",ct="`",ut="!",yt="[!",gt="]",dt="\n",Tt="\r\n",ft="http",mt="s",ht="://",bt="mailto:",Bt=/^[ \t]/,vt=/^[0-9]/,Ct=/^[:|]/,xt=/^[\r\u2028-\u2029]/,Pt=/^[^\n\r\u2028\u2029]/,kt=/^[!#-;=?-[\]-_a-{}-~]/,Kt={type:"any"},wt=Un("StyledText"),_t=Gn("|",!1),At=Gn("### ",!1),St=Gn("## ",!1),Lt=Gn("# ",!1),It=Gn("code",!1),Ft=Mn([" ","\t"],!1,!1),Nt=Gn(":",!1),Ot=Gn("bitmark++",!1),Et=Gn("bitmark--",!1),Rt=Gn("JavaScript",!1),Vt=Gn("• ",!1),jt=Gn("•_ ",!1),Dt=Gn("•",!1),Gt=Mn([["0","9"]],!1,!1),Mt=Gn(" ",!1),Ut=Gn("I ",!1),Jt=Gn("i ",!1),$t=Gn("•A ",!1),Wt=Gn("•a ",!1),zt=Gn("•+ ",!1),qt=Gn("•- ",!1),Ht=Gn("\t",!1),Yt=Gn("image",!1),Xt=Gn("#",!1),Qt=Gn("@",!1),Zt=Mn([":","|"],!1,!1),ei=Gn("width",!1),ti=Gn("height",!1),ii=Gn("alignment",!1),ri=Gn("captionAlign",!1),oi=Gn("left",!1),ni=Gn("center",!1),ai=Gn("right",!1),si=Un("StyledString"),li=Gn("=",!1),pi=Gn("|latex|",!1),ci=Gn("|imageInline:",!1),ui=Gn("alignmentVertical",!1),yi=Gn("size",!1),gi=Gn("top",!1),di=Gn("middle",!1),Ti=Gn("bottom",!1),fi=Gn("baseline",!1),mi=Gn("sub",!1),hi=Gn("super",!1),bi=Gn("text-bottom",!1),Bi=Gn("text-top",!1),vi=Gn("line-height",!1),Ci=Gn("font-height",!1),xi=Gn("explicit",!1),Pi=Gn("link:",!1),ki=Gn("extref:",!1),Ki=Gn("provider:",!1),wi=Gn("xref:",!1),_i=Gn("►",!1),Ai=Gn("symbol:",!1),Si=Gn("footnote:",!1),Li=Gn("footnote*:",!1),Ii=Gn("var:",!1),Fi=Gn("code:",!1),Ni=Gn("timer",!1),Oi=Gn("timer:",!1),Ei=Gn("duration:",!1),Ri=Gn("P",!1),Vi=Gn("color:",!1),ji=Gn("|►",!1),Di=Gn("bold",!1),Gi=Gn("italic",!1),Mi=Gn("light",!1),Ui=Gn("highlight",!1),Ji=Gn("strike",!1),$i=Gn("subscript",!1),Wi=Gn("superscript",!1),zi=Gn("ins",!1),qi=Gn("del",!1),Hi=Gn("underline",!1),Yi=Gn("doubleUnderline",!1),Xi=Gn("circle",!1),Qi=Gn("languageEm",!1),Zi=Gn("userUnderline",!1),er=Gn("userDoubleUnderline",!1),tr=Gn("userStrike",!1),ir=Gn("userCircle",!1),rr=Gn("userHighlight",!1),or=Gn("notranslate",!1),nr=Gn("aqua",!1),ar=Gn("black",!1),sr=Gn("blue",!1),lr=Gn("pink",!1),pr=Gn("fuchsia",!1),cr=Gn("lightgrey",!1),ur=Gn("gray",!1),yr=Gn("darkgray",!1),gr=Gn("green",!1),dr=Gn("lime",!1),Tr=Gn("magenta",!1),fr=Gn("maroon",!1),mr=Gn("navy",!1),hr=Gn("olive",!1),br=Gn("orange",!1),Br=Gn("purple",!1),vr=Gn("red",!1),Cr=Gn("silver",!1),xr=Gn("teal",!1),Pr=Gn("violet",!1),kr=Gn("white",!1),Kr=Gn("yellow",!1),wr=Un("MinimalStyledText"),_r=Un("MinimalStyledString"),Ar=Gn("*",!1),Sr=Gn("_",!1),Lr=Gn("`",!1),Ir=Gn("!",!1),Fr=Gn("[!",!1),Nr=Gn("]",!1),Or=Un("Line Terminator"),Er=Gn("\n",!1),Rr=Gn("\r\n",!1),Vr=Mn(["\r",["\u2028","\u2029"]],!1,!1),jr=(Un("whitespace in line"),Un("space"),Un("language tag separator"),Un("white space, separator"),Mn(["\t","\v","\f"," "," ","\ufeff"," "," "," ",[" "," "]," "," "," "],!1,!1),Mn(["\n","\r","\u2028","\u2029"],!1,!1),Mn(["\n","\r","\u2028","\u2029"],!0,!1)),Dr=(Mn(["\n","\r","\u2028","\u2029","\t","\v","\f"," "," ","\ufeff"," "," "," ",[" "," "]," "," "," "],!0,!1),Gn("http",!1)),Gr=Gn("s",!1),Mr=Gn("://",!1),Ur=Gn("mailto:",!1),Jr=Mn(["!",["#",";"],"=",["?","["],["]","_"],["a","{"],["}","~"]],!1,!1),$r=function(){return o},Wr=function(e){return s(Object.assign({},e))},zr=function(e){let t=Object.assign({},e);a(t);return s(t)},qr=function(e){return Object.assign({},e)},Hr=function(e){return Object.assign({},e)},Yr=function(e){return s(Object.assign({},e))},Xr=function(){return[]},Qr=function(e,t){return{type:"heading",content:l(t),attrs:{level:e.length-1}}},Zr=function(e){return e},eo=function(e,t){return Object.assign(Object.assign({},e),{content:t})},to=function(){return{type:"codeBlock",language:""}},io=function(e){return{type:"codeBlock",attrs:{language:e.trim().toLowerCase()}}},ro=function(e){return[{type:"text",text:n(e.trim())}]},oo=function(e){return e},no=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},ao=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},so=function(e,t){let i=t[0]._tempListStart;return Object.assign(Object.assign({},e),{attrs:{start:i},content:t})},lo=function(e,t){let i=t[0]._tempListStart;return Object.assign(Object.assign({},e),{attrs:{start:i},content:t})},po=function(e,t){let i=t[0]._tempListStart;return Object.assign(Object.assign({},e),{attrs:{start:i},content:t})},co=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},uo=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},yo=function(e,t){return Object.assign(Object.assign({},e),{content:t,attrs:{}})},go=function(){return{type:"bulletList"}},To=function(){return{type:"noBulletList"}},fo=function(){return{type:"orderedList"}},mo=function(){return{type:"orderedListRoman"}},ho=function(){return{type:"orderedListRomanLower"}},bo=function(){return{type:"letteredList"}},Bo=function(){return{type:"letteredListLower"}},vo=function(){return{type:"taskList"}},Co=function(e,t,i,r){return r},xo=function(e,t,i,r){let o="bulletList";const n=e.match(/•([0-9]+)([Ii]?) /);let a=1;if(n&&(o="orderedList",n.length>1&&(a=Number(n[1])),n.length>2)){let e=n[2];"I"==e&&(o="orderedListRoman"),"i"==e&&(o="orderedListRomanLower")}"•_ "==e&&(o="noBulletList"),"•A "==e&&(o="letteredList"),"•a "==e&&(o="letteredListLower"),"•+ "!=e&&"•- "!=e||(o="taskList");let s=[{type:"paragraph",attrs:{},content:l((t+i.join("")).trim())}];if(r&&r[0]&&r[0]._tempParsingParent){let e={type:r[0]._tempParsingParent,attrs:{start:a},content:r};if((e.type.startsWith("orderedList")||e.type.startsWith("letteredList"))&&r[0]._tempListStart){const t=r[0]._tempListStart;t>1&&(e.attrs.start=t)}s.push(e)}let p="listItem",c=null;if("taskList"==o){p="taskItem";let t=!1;"•+ "==e&&(t=!0),c={checked:t}}return c?{type:p,attrs:c,content:s,_tempParsingParent:o,_tempListStart:a}:{type:p,content:s,_tempParsingParent:o,_tempListStart:a}},Po=function(e){return e},ko=function(e){return e.join("")===Qa},Ko=function(e){return e.length>Qa.length},wo=function(e){Xa.push(Qa),Qa=e.join("")},_o=function(){return Qa=Xa.pop(),!0},Ao=function(e){return{type:"paragraph",content:l(e.trim()),attrs:{}}},So=function(e){return{type:"paragraph",content:l(e.trim()),attrs:{}}},Lo=function(e){return{type:"paragraph",content:l(e.trim()),attrs:{}}},Io=function(e){return e},Fo=function(e,t,i){const r=Object.assign({},...i);let o=r.alignment||"center";delete r.alignment;let a=r.captionAlign||"left";delete r.captionAlign;let s=r.alt||null;delete r.alt;let l=r.caption||null;delete r.caption;let p=r.align||"center";delete r.align;let c=r.zoomDisabled||Boolean(r.zoomDisabled);return delete r.zoomDisabled,{type:e,attrs:Object.assign({alignment:o,textAlign:a,src:t,alt:n(s),title:n(l),class:p,zoomDisabled:c},r)}},No=function(e){return e},Oo=function(e){return{comment:e}},Eo=function(e,t){return{[e]:parseInt(t)}},Ro=function(e,t){return{type:"error",msg:e+" must be an positive integer.",found:t}},Vo=function(e,t){return{[e]:t}},jo=function(e,t){return{[e]:t}},Do=function(e){return{[e]:!0}},Go=function(e){return[{type:"paragraph",content:e,attrs:{}}]},Mo=function(e,t){return s(e?[e,...t.flat()]:t.flat())},Uo=function(){return{type:"hardBreak"}},Jo=function(e){return{text:n(e),type:"text"}},$o=function(e){return{index:+e,type:"bit"}},Wo=function(e){return{attrs:{formula:n(e)},type:"latex"}},zo=function(e,t,i){return{attrs:Object.assign(Object.assign({alt:e,src:(t.pr+t.t).trim()},Object.assign({},...i)),{zoomDisabled:!0}),type:"imageInline"}},qo=function(e,t){return t||(t=[]),{marks:t,text:n(e),type:"text"}},Ho=function(e){return{marks:[{type:"bold"}],text:n(e),type:"text"}},Yo=function(e){return{marks:[{type:"italic"}],text:n(e),type:"text"}},Xo=function(e){return{marks:[{type:"light"}],text:n(e),type:"text"}},Qo=function(e){return{marks:[{type:"highlight"}],text:n(e),type:"text"}},Zo=function(e){return{marks:[{type:"link",attrs:{href:(e.pr+e.t).trim(),target:"_blank"}}],text:e.t,type:"text"}},en=function(e){return e},tn=function(e){return e},rn=function(e){return{comment:e}},on=function(e,t){return{[e]:parseInt(t)}},nn=function(e,t){return{type:"error",msg:e+" must be an positive integer.",found:t}},an=function(e,t){return{[e]:t}},sn=function(e,t){return{[e]:t}},ln=function(e){return{type:"link",attrs:{href:e.trim(),target:"_blank"}}},pn=function(e,t,i){return{type:"extref",attrs:{extref:e.trim(),references:t,provider:i.trim()}}},cn=function(e,t){return{type:"xref",attrs:{xref:e.trim(),reference:t.trim()}}},un=function(e){return{type:"xref",attrs:{xref:e.trim(),reference:""}}},yn=function(e){return{type:"ref",attrs:{reference:e.trim()}}},gn=function(e,t){const i=Object.assign({},...t);return{type:"symbol",attrs:Object.assign({src:e.trim()},i)}},dn=function(e){return{type:"footnote",attrs:{content:l(e.trim())}}},Tn=function(e){return{type:"footnote*",attrs:{content:l(e.trim())}}},fn=function(e){return{type:"var",attrs:{name:e.trim()}}},mn=function(){return{type:"code",attrs:{language:"plain text"}}},hn=function(e){return{type:"code",attrs:{language:e.trim().toLowerCase()}}},bn=function(){return{type:"timer",attrs:{name:""}}},Bn=function(e){return{type:"timer",attrs:{name:e.trim()}}},vn=function(e){return{type:"duration",attrs:{duration:e}}},Cn=function(e){return{type:"color",attrs:{color:e}}},xn=function(e){return{type:e}},Pn=function(e){return{type:"comment",comment:e}},kn=function(e){return e.trim()},Kn=function(e){return[{type:"paragraph",content:e,attrs:{}}]},wn=function(e,t){return s(e?[e,...t.flat()]:t.flat())},_n=function(){return{type:"hardBreak"}},An=function(e){return{text:n(e),type:"text"}},Sn=function(e){return{index:+e,type:"bit"}},Ln=function(e){return{marks:[{type:"bold"}],text:n(e),type:"text"}},In=function(e){return{marks:[{type:"italic"}],text:n(e),type:"text"}},Fn=function(e){return{marks:[{type:"light"}],text:n(e),type:"text"}},Nn=function(e){return{marks:[{type:"highlight"}],text:n(e),type:"text"}},On=function(e,t){return{pr:e,t}},En=0|t.peg$currPos,Rn=[{line:1,column:1}],Vn=En,jn=t.peg$maxFailExpected||[],Dn=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in u))throw new Error("Can't start parsing from rule \""+t.startRule+'".');y=u[t.startRule]}function Gn(e,t){return{type:"literal",text:e,ignoreCase:t}}function Mn(e,t,i){return{type:"class",parts:e,inverted:t,ignoreCase:i}}function Un(e){return{type:"other",description:e}}function Jn(t){var i,r=Rn[t];if(r)return r;if(t>=Rn.length)i=Rn.length-1;else for(i=t;!Rn[--i];);for(r={line:(r=Rn[i]).line,column:r.column};i<t;)10===e.charCodeAt(i)?(r.line++,r.column=1):r.column++,i++;return Rn[t]=r,r}function $n(e,t,i){var r=Jn(e),o=Jn(t),n={source:c,start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:o.line,column:o.column}};return i&&c&&"function"==typeof c.offset&&(n.start=c.offset(n.start),n.end=c.offset(n.end)),n}function Wn(e){En<Vn||(En>Vn&&(Vn=En,jn=[]),jn.push(e))}function zn(e,t,i){return new p(p.buildMessage(e,t),e,t,i)}function qn(){var t,i,o;for(t=En,i=[],e.length>En?(o=e.charAt(En),En++):(o=r,0===Dn&&Wn(Kt));o!==r;)i.push(o),e.length>En?(o=e.charAt(En),En++):(o=r,0===Dn&&Wn(Kt));return t=i=$r()}function Hn(){var t,i;return t=En,i=function(){var t,i,o,n,a;if(t=En,i=Qn(),i!==r){for(o=En,n=[],a=za();a!==r;)n.push(a),a=za();o=e.substring(o,En),(n=qa())!==r?((a=Wa())===r&&(a=null),t=Qr(i,o)):(En=t,t=r)}else En=t,t=r;return t}(),i!==r&&(i=Wr(i)),(t=i)===r&&(t=En,i=function(){var e,t,i,o;if(e=En,t=function(){var e,t,i;e=En,t=En,Dn++,i=ia(),Dn--,i!==r?(En=t,t=void 0):t=r;t!==r&&(t=go());return e=t,e}(),t!==r){if(i=[],(o=ua())!==r)for(;o!==r;)i.push(o),o=ua();else i=r;i!==r?((o=Wa())===r&&(o=null),e=no(t,i)):(En=e,e=r)}else En=e,e=r;if(e===r){if(e=En,t=function(){var e,t,i;e=En,t=En,Dn++,i=ra(),Dn--,i!==r?(En=t,t=void 0):t=r;t!==r&&(t=To());return e=t,e}(),t!==r){if(i=[],(o=ua())!==r)for(;o!==r;)i.push(o),o=ua();else i=r;i!==r?((o=Wa())===r&&(o=null),e=ao(t,i)):(En=e,e=r)}else En=e,e=r;if(e===r){if(e=En,t=function(){var e,t,i;e=En,t=En,Dn++,i=oa(),Dn--,i!==r?(En=t,t=void 0):t=r;t!==r&&(t=fo());return e=t,e}(),t!==r){if(i=[],(o=ua())!==r)for(;o!==r;)i.push(o),o=ua();else i=r;i!==r?((o=Wa())===r&&(o=null),e=so(t,i)):(En=e,e=r)}else En=e,e=r;if(e===r){if(e=En,t=function(){var e,t,i;e=En,t=En,Dn++,i=na(),Dn--,i!==r?(En=t,t=void 0):t=r;t!==r&&(t=mo());return e=t,e}(),t!==r){if(i=[],(o=ua())!==r)for(;o!==r;)i.push(o),o=ua();else i=r;i!==r?((o=Wa())===r&&(o=null),e=lo(t,i)):(En=e,e=r)}else En=e,e=r;if(e===r){if(e=En,t=function(){var e,t,i;e=En,t=En,Dn++,i=aa(),Dn--,i!==r?(En=t,t=void 0):t=r;t!==r&&(t=ho());return e=t,e}(),t!==r){if(i=[],(o=ua())!==r)for(;o!==r;)i.push(o),o=ua();else i=r;i!==r?((o=Wa())===r&&(o=null),e=po(t,i)):(En=e,e=r)}else En=e,e=r;if(e===r){if(e=En,t=function(){var e,t,i;e=En,t=En,Dn++,i=sa(),Dn--,i!==r?(En=t,t=void 0):t=r;t!==r&&(t=bo());return e=t,e}(),t!==r){if(i=[],(o=ua())!==r)for(;o!==r;)i.push(o),o=ua();else i=r;i!==r?((o=Wa())===r&&(o=null),e=co(t,i)):(En=e,e=r)}else En=e,e=r;if(e===r){if(e=En,t=function(){var e,t,i;e=En,t=En,Dn++,i=la(),Dn--,i!==r?(En=t,t=void 0):t=r;t!==r&&(t=Bo());return e=t,e}(),t!==r){if(i=[],(o=ua())!==r)for(;o!==r;)i.push(o),o=ua();else i=r;i!==r?((o=Wa())===r&&(o=null),e=uo(t,i)):(En=e,e=r)}else En=e,e=r;if(e===r)if(e=En,t=function(){var e,t,i;e=En,t=En,Dn++,i=pa(),Dn--,i!==r?(En=t,t=void 0):t=r;t!==r&&(t=vo());return e=t,e}(),t!==r){if(i=[],(o=ua())!==r)for(;o!==r;)i.push(o),o=ua();else i=r;i!==r?((o=Wa())===r&&(o=null),e=yo(t,i)):(En=e,e=r)}else En=e,e=r}}}}}}return e}(),i!==r&&(i=zr(i)),(t=i)===r&&(t=En,(i=ha())!==r&&(i=qr(i)),(t=i)===r&&(t=En,i=function(){var t,i,o;t=En,i=ea(),i!==r?(o=function(){var t,i,o,n;t=En,i=En,o=[],n=ta();for(;n!==r;)o.push(n),n=ta();return i=e.substring(i,En),i=ro(i),t=i,t}(),t=eo(i,o)):(En=t,t=r);return t}(),i!==r&&(i=Hr(i)),(t=i)===r&&(t=En,i=function(){var e,t,i;e=En,t=En,Dn++,i=Yn(),Dn--,i===r?t=void 0:(En=t,t=r);t!==r&&(i=da())!==r?e=Ao(i):(En=e,e=r);e===r&&(e=En,(t=fa())!==r&&(i=da())!==r?e=So(i):(En=e,e=r),e===r&&(e=En,(t=fa())!==r?e=Lo(i=""):(En=e,e=r)));return e}(),i!==r&&(i=Yr(i)),t=i)))),t}function Yn(){var e;return(e=Qn())===r&&(e=ca())===r&&(e=ha())===r&&(e=ea())===r&&(e=fa()),e}function Xn(){var t;return 124===e.charCodeAt(En)?(t=g,En++):(t=r,0===Dn&&Wn(_t)),t}function Qn(){var t;return e.substr(En,4)===d?(t=d,En+=4):(t=r,0===Dn&&Wn(At)),t===r&&(e.substr(En,3)===T?(t=T,En+=3):(t=r,0===Dn&&Wn(St)),t===r&&(e.substr(En,2)===f?(t=f,En+=2):(t=r,0===Dn&&Wn(Lt)))),t}function Zn(){var t,i;return t=En,Xn()!==r?(i=function(){var t;return e.substr(En,4)===m?(t=m,En+=4):(t=r,0===Dn&&Wn(It)),t}(),i!==r?t=Zr(i):(En=t,t=r)):(En=t,t=r),t}function ea(){var t,i,o,n,a,s,l;if(t=En,Zn()!==r){for(i=En,o=En,n=[],a=e.charAt(En),Bt.test(a)?En++:(a=r,0===Dn&&Wn(Ft));a!==r;)n.push(a),a=e.charAt(En),Bt.test(a)?En++:(a=r,0===Dn&&Wn(Ft));(a=qa())!==r?o=n=[n,a]:(En=o,o=r),(i=o!==r?e.substring(i,En):o)!==r?t=to():(En=t,t=r)}else En=t,t=r;if(t===r)if(t=En,Zn()!==r)if(58===e.charCodeAt(En)?(i=h,En++):(i=r,0===Dn&&Wn(Nt)),i!==r)if(o=function(){var t,i,o;e.substr(En,9)===b?(t=b,En+=9):(t=r,0===Dn&&Wn(Ot));if(t===r&&(e.substr(En,9)===B?(t=B,En+=9):(t=r,0===Dn&&Wn(Et)),t===r&&(e.substr(En,10)===v?(t=v,En+=10):(t=r,0===Dn&&Wn(Rt)),t===r))){if(t=En,i=[],(o=za())!==r)for(;o!==r;)i.push(o),o=za();else i=r;(t=i!==r?e.substring(t,En):i)===r&&(t="")}return t}(),o!==r){for(n=En,a=En,s=[],l=e.charAt(En),Bt.test(l)?En++:(l=r,0===Dn&&Wn(Ft));l!==r;)s.push(l),l=e.charAt(En),Bt.test(l)?En++:(l=r,0===Dn&&Wn(Ft));(l=qa())!==r?a=s=[s,l]:(En=a,a=r),(n=a!==r?e.substring(n,En):a)!==r?t=io(o):(En=t,t=r)}else En=t,t=r;else En=t,t=r;else En=t,t=r;return t}function ta(){var t,i,o,n,a,s;if(t=En,i=En,Dn++,o=Yn(),Dn--,o===r?i=void 0:(En=i,i=r),i!==r){if(o=En,n=En,a=[],(s=za())!==r)for(;s!==r;)a.push(s),s=za();else a=r;a!==r&&(s=qa())!==r?n=a=[a,s]:(En=n,n=r),(o=n!==r?e.substring(o,En):n)!==r?t=oo(o):(En=t,t=r)}else En=t,t=r;return t===r&&(t=Wa()),t}function ia(){var t;return e.substr(En,2)===C?(t=C,En+=2):(t=r,0===Dn&&Wn(Vt)),t}function ra(){var t;return e.substr(En,3)===x?(t=x,En+=3):(t=r,0===Dn&&Wn(jt)),t}function oa(){var t,i,o,n,a;if(t=En,i=En,8226===e.charCodeAt(En)?(o=P,En++):(o=r,0===Dn&&Wn(Dt)),o!==r){if(n=[],a=e.charAt(En),vt.test(a)?En++:(a=r,0===Dn&&Wn(Gt)),a!==r)for(;a!==r;)n.push(a),a=e.charAt(En),vt.test(a)?En++:(a=r,0===Dn&&Wn(Gt));else n=r;n!==r?(32===e.charCodeAt(En)?(a=k,En++):(a=r,0===Dn&&Wn(Mt)),a!==r?i=o=[o,n,a]:(En=i,i=r)):(En=i,i=r)}else En=i,i=r;return t=i!==r?e.substring(t,En):i}function na(){var t,i,o,n,a;if(t=En,i=En,8226===e.charCodeAt(En)?(o=P,En++):(o=r,0===Dn&&Wn(Dt)),o!==r){if(n=[],a=e.charAt(En),vt.test(a)?En++:(a=r,0===Dn&&Wn(Gt)),a!==r)for(;a!==r;)n.push(a),a=e.charAt(En),vt.test(a)?En++:(a=r,0===Dn&&Wn(Gt));else n=r;n!==r?(e.substr(En,2)===K?(a=K,En+=2):(a=r,0===Dn&&Wn(Ut)),a!==r?i=o=[o,n,a]:(En=i,i=r)):(En=i,i=r)}else En=i,i=r;return t=i!==r?e.substring(t,En):i}function aa(){var t,i,o,n,a;if(t=En,i=En,8226===e.charCodeAt(En)?(o=P,En++):(o=r,0===Dn&&Wn(Dt)),o!==r){if(n=[],a=e.charAt(En),vt.test(a)?En++:(a=r,0===Dn&&Wn(Gt)),a!==r)for(;a!==r;)n.push(a),a=e.charAt(En),vt.test(a)?En++:(a=r,0===Dn&&Wn(Gt));else n=r;n!==r?(e.substr(En,2)===w?(a=w,En+=2):(a=r,0===Dn&&Wn(Jt)),a!==r?i=o=[o,n,a]:(En=i,i=r)):(En=i,i=r)}else En=i,i=r;return t=i!==r?e.substring(t,En):i}function sa(){var t;return e.substr(En,3)===_?(t=_,En+=3):(t=r,0===Dn&&Wn($t)),t}function la(){var t;return e.substr(En,3)===A?(t=A,En+=3):(t=r,0===Dn&&Wn(Wt)),t}function pa(){var t;return e.substr(En,3)===S?(t=S,En+=3):(t=r,0===Dn&&Wn(zt)),t===r&&(e.substr(En,3)===L?(t=L,En+=3):(t=r,0===Dn&&Wn(qt))),t}function ca(){var e;return(e=ia())===r&&(e=ra())===r&&(e=oa())===r&&(e=na())===r&&(e=aa())===r&&(e=sa())===r&&(e=la())===r&&(e=pa()),e}function ua(){var t,i,o,n,a,s,l,p;if(t=En,ga()!==r)if((i=ca())!==r){for(o=En,n=En,a=[],s=En,l=En,Dn++,p=Wa(),Dn--,p===r?l=void 0:(En=l,l=r),l!==r?(e.length>En?(p=e.charAt(En),En++):(p=r,0===Dn&&Wn(Kt)),p!==r?s=l=[l,p]:(En=s,s=r)):(En=s,s=r);s!==r;)a.push(s),s=En,l=En,Dn++,p=Wa(),Dn--,p===r?l=void 0:(En=l,l=r),l!==r?(e.length>En?(p=e.charAt(En),En++):(p=r,0===Dn&&Wn(Kt)),p!==r?s=l=[l,p]:(En=s,s=r)):(En=s,s=r);for((s=Wa())===r&&(s=null),n=a=[a,s],o=e.substring(o,En),n=[],a=ya();a!==r;)n.push(a),a=ya();if(a=En,s=function(){var t,i,o,n;t=En,Dn++,i=En,o=[],9===e.charCodeAt(En)?(n=I,En++):(n=r,0===Dn&&Wn(Ht));if(n!==r)for(;n!==r;)o.push(n),9===e.charCodeAt(En)?(n=I,En++):(n=r,0===Dn&&Wn(Ht));else o=r;o!==r?(n=(n=Ko(o))?void 0:r)!==r?i=wo(o):(En=i,i=r):(En=i,i=r);Dn--,i!==r?(En=t,t=void 0):t=r;return t}(),s!==r){for(l=[],p=ua();p!==r;)l.push(p),p=ua();p=function(){var e;e=_o(),e=e?void 0:r;return e}(),p!==r?a=Co(i,o,n,l):(En=a,a=r)}else En=a,a=r;a===r&&(a=null),t=xo(i,o,n,a)}else En=t,t=r;else En=t,t=r;return t}function ya(){var t,i,o,n,a,s,l,p,c,u;if(t=En,i=En,Dn++,o=function(){var t,i,o;t=En,i=[],o=e.charAt(En),Bt.test(o)?En++:(o=r,0===Dn&&Wn(Ft));for(;o!==r;)i.push(o),o=e.charAt(En),Bt.test(o)?En++:(o=r,0===Dn&&Wn(Ft));o=Wa(),o!==r?t=i=[i,o]:(En=t,t=r);return t}(),Dn--,o===r?i=void 0:(En=i,i=r),i!==r)if((o=ga())!==r)if(n=En,Dn++,a=ca(),Dn--,a===r?n=void 0:(En=n,n=r),n!==r){if(a=En,s=En,l=[],p=En,c=En,Dn++,u=Wa(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r?(e.length>En?(u=e.charAt(En),En++):(u=r,0===Dn&&Wn(Kt)),u!==r?p=c=[c,u]:(En=p,p=r)):(En=p,p=r),p!==r)for(;p!==r;)l.push(p),p=En,c=En,Dn++,u=Wa(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r?(e.length>En?(u=e.charAt(En),En++):(u=r,0===Dn&&Wn(Kt)),u!==r?p=c=[c,u]:(En=p,p=r)):(En=p,p=r);else l=r;l!==r&&(p=qa())!==r?s=l=[l,p]:(En=s,s=r),(a=s!==r?e.substring(a,En):s)!==r?t=Po(a):(En=t,t=r)}else En=t,t=r;else En=t,t=r;else En=t,t=r;return t}function ga(){var t,i,o;for(t=En,i=[],9===e.charCodeAt(En)?(o=I,En++):(o=r,0===Dn&&Wn(Ht));o!==r;)i.push(o),9===e.charCodeAt(En)?(o=I,En++):(o=r,0===Dn&&Wn(Ht));return(o=(o=ko(i))?void 0:r)!==r?t=i=[i,o]:(En=t,t=r),t}function da(){var t,i,o;if(t=En,i=[],(o=Ta())!==r)for(;o!==r;)i.push(o),o=Ta();else i=r;return t=i!==r?e.substring(t,En):i}function Ta(){var t,i,o,n,a,s;if(t=En,i=En,Dn++,o=Yn(),Dn--,o===r?i=void 0:(En=i,i=r),i!==r){if(o=En,n=En,a=[],(s=za())!==r)for(;s!==r;)a.push(s),s=za();else a=r;a!==r&&(s=qa())!==r?n=a=[a,s]:(En=n,n=r),(o=n!==r?e.substring(o,En):n)!==r?t=i=[i,o]:(En=t,t=r)}else En=t,t=r;return t===r&&(t=Wa()),t}function fa(){var t,i,o,n,a,s;if(t=En,(i=Xn())!==r){for(o=En,n=En,a=[],s=e.charAt(En),Bt.test(s)?En++:(s=r,0===Dn&&Wn(Ft));s!==r;)a.push(s),s=e.charAt(En),Bt.test(s)?En++:(s=r,0===Dn&&Wn(Ft));(s=qa())!==r?n=a=[a,s]:(En=n,n=r),(o=n!==r?e.substring(o,En):n)!==r?((n=Wa())===r&&(n=null),t=i=[i,o,n]):(En=t,t=r)}else En=t,t=r;return t}function ma(){var t,i;return t=En,Xn()!==r?(i=function(){var t;return e.substr(En,5)===F?(t=F,En+=5):(t=r,0===Dn&&Wn(Yt)),t}(),i!==r?t=Io(i):(En=t,t=r)):(En=t,t=r),t}function ha(){var t,i,o,n,a,s,l,p,c,u;if(t=En,(i=ma())!==r)if(58===e.charCodeAt(En)?(o=h,En++):(o=r,0===Dn&&Wn(Nt)),o!==r)if(32===e.charCodeAt(En)?(n=k,En++):(n=r,0===Dn&&Wn(Mt)),n===r&&(n=null),a=function(){var t,i,o,n,a,s,l,p,c;t=En,i=En,e.substr(En,4)===ft?(o=ft,En+=4):(o=r,0===Dn&&Wn(Dr));if(o!==r)if(115===e.charCodeAt(En)?(n=mt,En++):(n=r,0===Dn&&Wn(Gr)),n===r&&(n=null),e.substr(En,3)===ht?(a=ht,En+=3):(a=r,0===Dn&&Wn(Mr)),a!==r){for(s=[],l=En,p=En,Dn++,c=Xn(),Dn--,c===r?p=void 0:(En=p,p=r),p!==r&&(c=Ya())!==r?l=p=[p,c]:(En=l,l=r);l!==r;)s.push(l),l=En,p=En,Dn++,c=Xn(),Dn--,c===r?p=void 0:(En=p,p=r),p!==r&&(c=Ya())!==r?l=p=[p,c]:(En=l,l=r);i=o=[o,n,a,s]}else En=i,i=r;else En=i,i=r;t=i!==r?e.substring(t,En):i;return t}(),a!==r)if(Xn()!==r){for(s=ba(),l=En,p=En,c=[],u=e.charAt(En),Bt.test(u)?En++:(u=r,0===Dn&&Wn(Ft));u!==r;)c.push(u),u=e.charAt(En),Bt.test(u)?En++:(u=r,0===Dn&&Wn(Ft));(u=qa())!==r?p=c=[c,u]:(En=p,p=r),(l=p!==r?e.substring(l,En):p)!==r?((p=Wa())===r&&(p=null),t=Fo(i,a,s)):(En=t,t=r)}else En=t,t=r;else En=t,t=r;else En=t,t=r;else En=t,t=r;return t}function ba(){var e,t,i;for(e=En,t=[],i=Ba();i!==r;)t.push(i),i=Ba();return e=t=No(t)}function Ba(){var t,i,o,n,a,s,l,p,c,u;if(t=En,35===e.charCodeAt(En)?(i=N,En++):(i=r,0===Dn&&Wn(Xt)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=Oo(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,64===e.charCodeAt(En)?(i=O,En++):(i=r,0===Dn&&Wn(Qt)),i===r&&(i=null),(o=va())!==r)if(58===e.charCodeAt(En)?(n=h,En++):(n=r,0===Dn&&Wn(Nt)),n!==r){for(a=[],32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s!==r;)a.push(s),32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));if(s=En,l=[],p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r?(u=e.charAt(En),vt.test(u)?En++:(u=r,0===Dn&&Wn(Gt)),u!==r?p=c=[c,u]:(En=p,p=r)):(En=p,p=r),p!==r)for(;p!==r;)l.push(p),p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r?(u=e.charAt(En),vt.test(u)?En++:(u=r,0===Dn&&Wn(Gt)),u!==r?p=c=[c,u]:(En=p,p=r)):(En=p,p=r);else l=r;(s=l!==r?e.substring(s,En):l)!==r&&(l=Xn())!==r?t=Eo(o,s):(En=t,t=r)}else En=t,t=r;else En=t,t=r;if(t===r){if(t=En,64===e.charCodeAt(En)?(i=O,En++):(i=r,0===Dn&&Wn(Qt)),i===r&&(i=null),(o=va())!==r)if(58===e.charCodeAt(En)?(n=h,En++):(n=r,0===Dn&&Wn(Nt)),n!==r){for(a=[],32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s!==r;)a.push(s),32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));for(s=En,l=[],p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);p!==r;)l.push(p),p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);s=e.substring(s,En),(l=Xn())!==r?t=Ro(o,s):(En=t,t=r)}else En=t,t=r;else En=t,t=r;if(t===r){if(t=En,64===e.charCodeAt(En)?(i=O,En++):(i=r,0===Dn&&Wn(Qt)),i===r&&(i=null),(o=Ca())!==r)if(58===e.charCodeAt(En)?(n=h,En++):(n=r,0===Dn&&Wn(Nt)),n!==r){for(a=[],32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s!==r;)a.push(s),32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s=function(){var t;e.substr(En,4)===D?(t=D,En+=4):(t=r,0===Dn&&Wn(oi));t===r&&(e.substr(En,6)===G?(t=G,En+=6):(t=r,0===Dn&&Wn(ni)),t===r&&(e.substr(En,5)===M?(t=M,En+=5):(t=r,0===Dn&&Wn(ai))));return t}(),s!==r&&(l=Xn())!==r?t=Vo(o,s):(En=t,t=r)}else En=t,t=r;else En=t,t=r;if(t===r){for(t=En,64===e.charCodeAt(En)?(i=O,En++):(i=r,0===Dn&&Wn(Qt)),i===r&&(i=null),o=En,n=[],a=En,s=En,Dn++,l=e.charAt(En),Ct.test(l)?En++:(l=r,0===Dn&&Wn(Zt)),l===r&&(l=En,(p=Ca())!==r?(58===e.charCodeAt(En)?(c=h,En++):(c=r,0===Dn&&Wn(Nt)),c!==r?l=p=[p,c]:(En=l,l=r)):(En=l,l=r)),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=e.charAt(En),Ct.test(l)?En++:(l=r,0===Dn&&Wn(Zt)),l===r&&(l=En,(p=Ca())!==r?(58===e.charCodeAt(En)?(c=h,En++):(c=r,0===Dn&&Wn(Nt)),c!==r?l=p=[p,c]:(En=l,l=r)):(En=l,l=r)),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);if(o=e.substring(o,En),58===e.charCodeAt(En)?(n=h,En++):(n=r,0===Dn&&Wn(Nt)),n!==r){for(32===e.charCodeAt(En)?(a=k,En++):(a=r,0===Dn&&Wn(Mt)),a===r&&(a=null),s=En,l=[],p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);p!==r;)l.push(p),p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);s=e.substring(s,En),(l=Xn())!==r?t=jo(o,s):(En=t,t=r)}else En=t,t=r;if(t===r){for(t=En,64===e.charCodeAt(En)?(i=O,En++):(i=r,0===Dn&&Wn(Qt)),i===r&&(i=null),o=En,n=[],a=En,s=En,Dn++,(l=Xn())===r&&(l=En,(p=Ca())!==r?(58===e.charCodeAt(En)?(c=h,En++):(c=r,0===Dn&&Wn(Nt)),c!==r?l=p=[p,c]:(En=l,l=r)):(En=l,l=r)),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,(l=Xn())===r&&(l=En,(p=Ca())!==r?(58===e.charCodeAt(En)?(c=h,En++):(c=r,0===Dn&&Wn(Nt)),c!==r?l=p=[p,c]:(En=l,l=r)):(En=l,l=r)),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=Do(o):(En=t,t=r)}}}}}return t}function va(){var t;return e.substr(En,5)===E?(t=E,En+=5):(t=r,0===Dn&&Wn(ei)),t===r&&(e.substr(En,6)===R?(t=R,En+=6):(t=r,0===Dn&&Wn(ti))),t}function Ca(){var t;return e.substr(En,9)===V?(t=V,En+=9):(t=r,0===Dn&&Wn(ii)),t===r&&(e.substr(En,12)===j?(t=j,En+=12):(t=r,0===Dn&&Wn(ri))),t}function xa(){var e,t,i,o;for(e=En,(t=Pa())===r&&(t=null),i=[],(o=wa())===r&&(o=Pa());o!==r;)i.push(o),(o=wa())===r&&(o=Pa());return e=Mo(t,i)}function Pa(){var t,i,o,n,a,s,l;if(t=En,(i=Wa())!==r&&(i=Uo()),(t=i)===r){if(t=En,i=En,o=[],n=En,(a=_a())===r&&(a=null),s=En,Dn++,l=wa(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?n=a=[a,s,l]:(En=n,n=r),n===r&&(n=En,(a=_a())!==r?(s=En,Dn++,l=wa(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r)),n!==r)for(;n!==r;)o.push(n),n=En,(a=_a())===r&&(a=null),s=En,Dn++,l=wa(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?n=a=[a,s,l]:(En=n,n=r),n===r&&(n=En,(a=_a())!==r?(s=En,Dn++,l=wa(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r));else o=r;(i=o!==r?e.substring(i,En):o)!==r&&(i=Jo(i)),t=i}return t}function ka(){var t;return 61===e.charCodeAt(En)?(t=U,En++):(t=r,0===Dn&&Wn(li)),t}function Ka(){var e,t,i;return e=En,(t=ka())!==r&&(i=ka())!==r?e=t=[t,i]:(En=e,e=r),e}function wa(){var t,i,o,n,a,s,l,p;if(t=En,(i=Ma())!==r){if(o=En,n=[],a=e.charAt(En),vt.test(a)?En++:(a=r,0===Dn&&Wn(Gt)),a!==r)for(;a!==r;)n.push(a),a=e.charAt(En),vt.test(a)?En++:(a=r,0===Dn&&Wn(Gt));else n=r;(o=n!==r?e.substring(o,En):n)!==r&&(n=Ua())!==r?t=$o(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,(i=Ka())!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Ka(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Ka(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);o=e.substring(o,En),(n=Ka())!==r?(e.substr(En,7)===J?(a=J,En+=7):(a=r,0===Dn&&Wn(pi)),a!==r?t=Wo(o):(En=t,t=r)):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,(i=Ka())!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Ka(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Ka(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);o=e.substring(o,En),(n=Ka())!==r?(e.substr(En,13)===$?(a=$,En+=13):(a=r,0===Dn&&Wn(ci)),a!==r&&(s=Ha())!==r?(124===e.charCodeAt(En)?(l=g,En++):(l=r,0===Dn&&Wn(_t)),l!==r?(p=function(){var e,t,i;e=En,t=[],i=Aa();for(;i!==r;)t.push(i),i=Aa();return t=tn(t),e=t,e}(),t=zo(o,s,p)):(En=t,t=r)):(En=t,t=r)):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,(i=Ka())!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Ka(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Ka(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);o=e.substring(o,En),(n=Ka())!==r?(a=function(){var t,i,o,n;t=En,124===e.charCodeAt(En)?(i=g,En++):(i=r,0===Dn&&Wn(_t));if(i!==r){if(o=[],(n=Sa())!==r)for(;n!==r;)o.push(n),n=Sa();else o=r;o!==r?t=en(o):(En=t,t=r)}else En=t,t=r;return t}(),a!==r?t=qo(o,a):(En=t,t=r)):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,(i=Va())!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Va(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Va(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);o=e.substring(o,En),(n=Va())!==r?t=Ho(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,(i=ja())!==r){for(o=En,n=[],a=En,s=En,Dn++,l=ja(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=ja(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);o=e.substring(o,En),(n=ja())!==r?t=Yo(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,(i=Da())!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Da(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Da(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);o=e.substring(o,En),(n=Da())!==r?t=Xo(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,(i=Ga())!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Ga(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Ga(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?(e.length>En?(l=e.charAt(En),En++):(l=r,0===Dn&&Wn(Kt)),l!==r?a=s=[s,l]:(En=a,a=r)):(En=a,a=r);o=e.substring(o,En),(n=Ga())!==r?t=Qo(o):(En=t,t=r)}else En=t,t=r;t===r&&(t=En,(i=Ha())!==r&&(i=Zo(i)),t=i)}}}}}}}return t}function _a(){var t,i,o,n,a;if(t=En,i=En,(o=Ka())!==r){if(n=[],(a=ka())!==r)for(;a!==r;)n.push(a),a=ka();else n=r;n!==r?i=o=[o,n]:(En=i,i=r)}else En=i,i=r;if((t=i!==r?e.substring(t,En):i)===r){if(t=En,i=En,(o=Da())!==r){if(n=[],(a=Ea())!==r)for(;a!==r;)n.push(a),a=Ea();else n=r;n!==r?i=o=[o,n]:(En=i,i=r)}else En=i,i=r;if((t=i!==r?e.substring(t,En):i)===r){if(t=En,i=En,(o=Ga())!==r){if(n=[],(a=Ra())!==r)for(;a!==r;)n.push(a),a=Ra();else n=r;n!==r?i=o=[o,n]:(En=i,i=r)}else En=i,i=r;t=i!==r?e.substring(t,En):i}}return t}function Aa(){var t,i,o,n,a,s,l,p,c,u;if(t=En,35===e.charCodeAt(En)?(i=N,En++):(i=r,0===Dn&&Wn(Xt)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=rn(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,64===e.charCodeAt(En)?(i=O,En++):(i=r,0===Dn&&Wn(Qt)),i===r&&(i=null),(o=va())!==r)if(58===e.charCodeAt(En)?(n=h,En++):(n=r,0===Dn&&Wn(Nt)),n!==r){for(a=[],32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s!==r;)a.push(s),32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));if(s=En,l=[],p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r?(u=e.charAt(En),vt.test(u)?En++:(u=r,0===Dn&&Wn(Gt)),u!==r?p=c=[c,u]:(En=p,p=r)):(En=p,p=r),p!==r)for(;p!==r;)l.push(p),p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r?(u=e.charAt(En),vt.test(u)?En++:(u=r,0===Dn&&Wn(Gt)),u!==r?p=c=[c,u]:(En=p,p=r)):(En=p,p=r);else l=r;(s=l!==r?e.substring(s,En):l)!==r&&(l=Xn())!==r?t=on(o,s):(En=t,t=r)}else En=t,t=r;else En=t,t=r;if(t===r){if(t=En,64===e.charCodeAt(En)?(i=O,En++):(i=r,0===Dn&&Wn(Qt)),i===r&&(i=null),(o=va())!==r)if(58===e.charCodeAt(En)?(n=h,En++):(n=r,0===Dn&&Wn(Nt)),n!==r){for(a=[],32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s!==r;)a.push(s),32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));for(s=En,l=[],p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);p!==r;)l.push(p),p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);s=e.substring(s,En),(l=Xn())!==r?t=nn(o,s):(En=t,t=r)}else En=t,t=r;else En=t,t=r;if(t===r){if(t=En,64===e.charCodeAt(En)?(i=O,En++):(i=r,0===Dn&&Wn(Qt)),i===r&&(i=null),e.substr(En,17)===W?(o=W,En+=17):(o=r,0===Dn&&Wn(ui)),o!==r)if(58===e.charCodeAt(En)?(n=h,En++):(n=r,0===Dn&&Wn(Nt)),n!==r){for(a=[],32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s!==r;)a.push(s),32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s=function(){var t;e.substr(En,3)===q?(t=q,En+=3):(t=r,0===Dn&&Wn(gi));t===r&&(e.substr(En,6)===H?(t=H,En+=6):(t=r,0===Dn&&Wn(di)),t===r&&(e.substr(En,6)===Y?(t=Y,En+=6):(t=r,0===Dn&&Wn(Ti)),t===r&&(e.substr(En,8)===X?(t=X,En+=8):(t=r,0===Dn&&Wn(fi)),t===r&&(e.substr(En,3)===Q?(t=Q,En+=3):(t=r,0===Dn&&Wn(mi)),t===r&&(e.substr(En,5)===Z?(t=Z,En+=5):(t=r,0===Dn&&Wn(hi)),t===r&&(e.substr(En,11)===ee?(t=ee,En+=11):(t=r,0===Dn&&Wn(bi)),t===r&&(e.substr(En,8)===te?(t=te,En+=8):(t=r,0===Dn&&Wn(Bi)))))))));return t}(),s!==r&&(l=Xn())!==r?t=an(o,s):(En=t,t=r)}else En=t,t=r;else En=t,t=r;if(t===r)if(t=En,64===e.charCodeAt(En)?(i=O,En++):(i=r,0===Dn&&Wn(Qt)),i===r&&(i=null),e.substr(En,4)===z?(o=z,En+=4):(o=r,0===Dn&&Wn(yi)),o!==r)if(58===e.charCodeAt(En)?(n=h,En++):(n=r,0===Dn&&Wn(Nt)),n!==r){for(a=[],32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s!==r;)a.push(s),32===e.charCodeAt(En)?(s=k,En++):(s=r,0===Dn&&Wn(Mt));s=function(){var t;e.substr(En,11)===ie?(t=ie,En+=11):(t=r,0===Dn&&Wn(vi));t===r&&(e.substr(En,11)===re?(t=re,En+=11):(t=r,0===Dn&&Wn(Ci)),t===r&&(e.substr(En,5)===Z?(t=Z,En+=5):(t=r,0===Dn&&Wn(hi)),t===r&&(e.substr(En,3)===Q?(t=Q,En+=3):(t=r,0===Dn&&Wn(mi)),t===r&&(e.substr(En,8)===oe?(t=oe,En+=8):(t=r,0===Dn&&Wn(xi))))));return t}(),s!==r&&(l=Xn())!==r?t=sn(o,s):(En=t,t=r)}else En=t,t=r;else En=t,t=r}}}return t}function Sa(){var t,i,o,n,a,s,l,p,c,u,y;if(t=En,e.substr(En,5)===ne?(i=ne,En+=5):(i=r,0===Dn&&Wn(Pi)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=ln(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,e.substr(En,7)===ae?(i=ae,En+=7):(i=r,0===Dn&&Wn(ki)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);if(o=e.substring(o,En),n=function(){var e,t;e=[],t=La();for(;t!==r;)e.push(t),t=La();return e}(),(a=Xn())!==r)if(e.substr(En,9)===se?(s=se,En+=9):(s=r,0===Dn&&Wn(Ki)),s!==r){for(l=En,p=[],c=En,u=En,Dn++,y=Xn(),Dn--,y===r?u=void 0:(En=u,u=r),u!==r&&(y=za())!==r?c=u=[u,y]:(En=c,c=r);c!==r;)p.push(c),c=En,u=En,Dn++,y=Xn(),Dn--,y===r?u=void 0:(En=u,u=r),u!==r&&(y=za())!==r?c=u=[u,y]:(En=c,c=r);l=e.substring(l,En),(p=Xn())!==r?t=pn(o,n,l):(En=t,t=r)}else En=t,t=r;else En=t,t=r}else En=t,t=r;if(t===r){if(t=En,e.substr(En,5)===le?(i=le,En+=5):(i=r,0===Dn&&Wn(wi)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);if(o=e.substring(o,En),(n=Xn())!==r)if(9658===e.charCodeAt(En)?(a=pe,En++):(a=r,0===Dn&&Wn(_i)),a!==r){for(s=En,l=[],p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);p!==r;)l.push(p),p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);s=e.substring(s,En),(l=Xn())!==r?t=cn(o,s):(En=t,t=r)}else En=t,t=r;else En=t,t=r}else En=t,t=r;if(t===r){if(t=En,e.substr(En,5)===le?(i=le,En+=5):(i=r,0===Dn&&Wn(wi)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=un(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,9658===e.charCodeAt(En)?(i=pe,En++):(i=r,0===Dn&&Wn(_i)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=yn(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,e.substr(En,7)===ce?(i=ce,En+=7):(i=r,0===Dn&&Wn(Ai)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?(a=ba(),t=gn(o,a)):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,e.substr(En,9)===ue?(i=ue,En+=9):(i=r,0===Dn&&Wn(Si)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=dn(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,e.substr(En,10)===ye?(i=ye,En+=10):(i=r,0===Dn&&Wn(Li)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=Tn(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,e.substr(En,4)===ge?(i=ge,En+=4):(i=r,0===Dn&&Wn(Ii)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=fn(o):(En=t,t=r)}else En=t,t=r;if(t===r&&(t=En,e.substr(En,4)===m?(i=m,En+=4):(i=r,0===Dn&&Wn(It)),i!==r&&(o=Xn())!==r?t=mn():(En=t,t=r),t===r)){if(t=En,e.substr(En,5)===de?(i=de,En+=5):(i=r,0===Dn&&Wn(Fi)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=hn(o):(En=t,t=r)}else En=t,t=r;if(t===r&&(t=En,e.substr(En,5)===Te?(i=Te,En+=5):(i=r,0===Dn&&Wn(Ni)),i!==r&&(o=Xn())!==r?t=bn():(En=t,t=r),t===r)){if(t=En,e.substr(En,6)===fe?(i=fe,En+=6):(i=r,0===Dn&&Wn(Oi)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=Bn(o):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,e.substr(En,9)===me?(i=me,En+=9):(i=r,0===Dn&&Wn(Ei)),i!==r){if(o=En,n=En,80===e.charCodeAt(En)?(a=he,En++):(a=r,0===Dn&&Wn(Ri)),a!==r){for(s=En,l=[],p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);p!==r;)l.push(p),p=En,c=En,Dn++,u=Xn(),Dn--,u===r?c=void 0:(En=c,c=r),c!==r&&(u=za())!==r?p=c=[c,u]:(En=p,p=r);n=a=[a,s=e.substring(s,En)]}else En=n,n=r;(o=n!==r?e.substring(o,En):n)!==r&&(n=Xn())!==r?t=vn(o):(En=t,t=r)}else En=t,t=r;if(t===r&&(t=En,e.substr(En,6)===be?(i=be,En+=6):(i=r,0===Dn&&Wn(Vi)),i!==r?(o=function(){var t;e.substr(En,4)===De?(t=De,En+=4):(t=r,0===Dn&&Wn(nr));t===r&&(e.substr(En,5)===Ge?(t=Ge,En+=5):(t=r,0===Dn&&Wn(ar)),t===r&&(e.substr(En,4)===Me?(t=Me,En+=4):(t=r,0===Dn&&Wn(sr)),t===r&&(e.substr(En,4)===Ue?(t=Ue,En+=4):(t=r,0===Dn&&Wn(lr)),t===r&&(e.substr(En,7)===Je?(t=Je,En+=7):(t=r,0===Dn&&Wn(pr)),t===r&&(e.substr(En,9)===$e?(t=$e,En+=9):(t=r,0===Dn&&Wn(cr)),t===r&&(e.substr(En,4)===We?(t=We,En+=4):(t=r,0===Dn&&Wn(ur)),t===r&&(e.substr(En,8)===ze?(t=ze,En+=8):(t=r,0===Dn&&Wn(yr)),t===r&&(e.substr(En,5)===qe?(t=qe,En+=5):(t=r,0===Dn&&Wn(gr)),t===r&&(e.substr(En,4)===He?(t=He,En+=4):(t=r,0===Dn&&Wn(dr)),t===r&&(e.substr(En,7)===Ye?(t=Ye,En+=7):(t=r,0===Dn&&Wn(Tr)),t===r&&(e.substr(En,6)===Xe?(t=Xe,En+=6):(t=r,0===Dn&&Wn(fr)),t===r&&(e.substr(En,4)===Qe?(t=Qe,En+=4):(t=r,0===Dn&&Wn(mr)),t===r&&(e.substr(En,5)===Ze?(t=Ze,En+=5):(t=r,0===Dn&&Wn(hr)),t===r&&(e.substr(En,6)===et?(t=et,En+=6):(t=r,0===Dn&&Wn(br)),t===r&&(e.substr(En,6)===tt?(t=tt,En+=6):(t=r,0===Dn&&Wn(Br)),t===r&&(e.substr(En,3)===it?(t=it,En+=3):(t=r,0===Dn&&Wn(vr)),t===r&&(e.substr(En,6)===rt?(t=rt,En+=6):(t=r,0===Dn&&Wn(Cr)),t===r&&(e.substr(En,4)===ot?(t=ot,En+=4):(t=r,0===Dn&&Wn(xr)),t===r&&(e.substr(En,6)===nt?(t=nt,En+=6):(t=r,0===Dn&&Wn(Pr)),t===r&&(e.substr(En,5)===at?(t=at,En+=5):(t=r,0===Dn&&Wn(kr)),t===r&&(e.substr(En,6)===st?(t=st,En+=6):(t=r,0===Dn&&Wn(Kr)))))))))))))))))))))));return t}(),o!==r&&(n=Xn())!==r?t=Cn(o):(En=t,t=r)):(En=t,t=r),t===r&&(t=En,i=function(){var t;e.substr(En,4)===ve?(t=ve,En+=4):(t=r,0===Dn&&Wn(Di));t===r&&(e.substr(En,6)===Ce?(t=Ce,En+=6):(t=r,0===Dn&&Wn(Gi)),t===r&&(e.substr(En,5)===xe?(t=xe,En+=5):(t=r,0===Dn&&Wn(Mi)),t===r&&(e.substr(En,9)===Pe?(t=Pe,En+=9):(t=r,0===Dn&&Wn(Ui)),t===r&&(e.substr(En,6)===ke?(t=ke,En+=6):(t=r,0===Dn&&Wn(Ji)),t===r&&(e.substr(En,9)===Ke?(t=Ke,En+=9):(t=r,0===Dn&&Wn($i)),t===r&&(e.substr(En,11)===we?(t=we,En+=11):(t=r,0===Dn&&Wn(Wi)),t===r&&(e.substr(En,3)===_e?(t=_e,En+=3):(t=r,0===Dn&&Wn(zi)),t===r&&(e.substr(En,3)===Ae?(t=Ae,En+=3):(t=r,0===Dn&&Wn(qi)),t===r&&(e.substr(En,9)===Se?(t=Se,En+=9):(t=r,0===Dn&&Wn(Hi)),t===r&&(e.substr(En,15)===Le?(t=Le,En+=15):(t=r,0===Dn&&Wn(Yi)),t===r&&(e.substr(En,6)===Ie?(t=Ie,En+=6):(t=r,0===Dn&&Wn(Xi)),t===r&&(e.substr(En,10)===Fe?(t=Fe,En+=10):(t=r,0===Dn&&Wn(Qi)),t===r&&(e.substr(En,13)===Ne?(t=Ne,En+=13):(t=r,0===Dn&&Wn(Zi)),t===r&&(e.substr(En,19)===Oe?(t=Oe,En+=19):(t=r,0===Dn&&Wn(er)),t===r&&(e.substr(En,10)===Ee?(t=Ee,En+=10):(t=r,0===Dn&&Wn(tr)),t===r&&(e.substr(En,10)===Re?(t=Re,En+=10):(t=r,0===Dn&&Wn(ir)),t===r&&(e.substr(En,13)===Ve?(t=Ve,En+=13):(t=r,0===Dn&&Wn(rr)),t===r&&(e.substr(En,11)===je?(t=je,En+=11):(t=r,0===Dn&&Wn(or))))))))))))))))))));return t}(),i!==r&&(o=Xn())!==r?t=xn(i):(En=t,t=r),t===r)))if(t=En,35===e.charCodeAt(En)?(i=N,En++):(i=r,0===Dn&&Wn(Xt)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),(n=Xn())!==r?t=Pn(o):(En=t,t=r)}else En=t,t=r}}}}}}}}}}}return t}function La(){var t,i,o,n,a,s,l;if(t=En,e.substr(En,2)===Be?(i=Be,En+=2):(i=r,0===Dn&&Wn(ji)),i!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),t=kn(o)}else En=t,t=r;return t}function Ia(){var e,t,i,o;for(Dn++,e=En,(t=Fa())===r&&(t=null),i=[],(o=Ja())===r&&(o=Fa());o!==r;)i.push(o),(o=Ja())===r&&(o=Fa());return e=wn(t,i),Dn--,t=r,0===Dn&&Wn(_r),e}function Fa(){var t,i,o,n,a,s,l;if(t=En,(i=Wa())!==r&&(i=_n()),(t=i)===r){if(t=En,i=En,o=[],n=En,(a=$a())===r&&(a=null),s=En,Dn++,l=Ja(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?n=a=[a,s,l]:(En=n,n=r),n===r&&(n=En,(a=$a())!==r?(s=En,Dn++,l=Ja(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r)),n!==r)for(;n!==r;)o.push(n),n=En,(a=$a())===r&&(a=null),s=En,Dn++,l=Ja(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=za())!==r?n=a=[a,s,l]:(En=n,n=r),n===r&&(n=En,(a=$a())!==r?(s=En,Dn++,l=Ja(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r));else o=r;(i=o!==r?e.substring(i,En):o)!==r&&(i=An(i)),t=i}return t}function Na(){var t;return 42===e.charCodeAt(En)?(t=lt,En++):(t=r,0===Dn&&Wn(Ar)),t}function Oa(){var t;return 95===e.charCodeAt(En)?(t=pt,En++):(t=r,0===Dn&&Wn(Sr)),t}function Ea(){var t;return 96===e.charCodeAt(En)?(t=ct,En++):(t=r,0===Dn&&Wn(Lr)),t}function Ra(){var t;return 33===e.charCodeAt(En)?(t=ut,En++):(t=r,0===Dn&&Wn(Ir)),t}function Va(){var e,t,i;return e=En,(t=Na())!==r&&(i=Na())!==r?e=t=[t,i]:(En=e,e=r),e}function ja(){var e,t,i;return e=En,(t=Oa())!==r&&(i=Oa())!==r?e=t=[t,i]:(En=e,e=r),e}function Da(){var e,t,i;return e=En,(t=Ea())!==r&&(i=Ea())!==r?e=t=[t,i]:(En=e,e=r),e}function Ga(){var e,t,i;return e=En,(t=Ra())!==r&&(i=Ra())!==r?e=t=[t,i]:(En=e,e=r),e}function Ma(){var t;return e.substr(En,2)===yt?(t=yt,En+=2):(t=r,0===Dn&&Wn(Fr)),t}function Ua(){var t;return 93===e.charCodeAt(En)?(t=gt,En++):(t=r,0===Dn&&Wn(Nr)),t}function Ja(){var t,i,o,n,a,s;if(t=En,Ma()!==r){if(i=En,o=[],n=e.charAt(En),vt.test(n)?En++:(n=r,0===Dn&&Wn(Gt)),n!==r)for(;n!==r;)o.push(n),n=e.charAt(En),vt.test(n)?En++:(n=r,0===Dn&&Wn(Gt));else o=r;(i=o!==r?e.substring(i,En):o)!==r&&(o=Ua())!==r?t=Sn(i):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,Va()!==r){for(i=En,o=[],n=En,a=En,Dn++,s=Va(),Dn--,s===r?a=void 0:(En=a,a=r),a!==r?(e.length>En?(s=e.charAt(En),En++):(s=r,0===Dn&&Wn(Kt)),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r);n!==r;)o.push(n),n=En,a=En,Dn++,s=Va(),Dn--,s===r?a=void 0:(En=a,a=r),a!==r?(e.length>En?(s=e.charAt(En),En++):(s=r,0===Dn&&Wn(Kt)),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r);i=e.substring(i,En),(o=Va())!==r?t=Ln(i):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,ja()!==r){for(i=En,o=[],n=En,a=En,Dn++,s=ja(),Dn--,s===r?a=void 0:(En=a,a=r),a!==r?(e.length>En?(s=e.charAt(En),En++):(s=r,0===Dn&&Wn(Kt)),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r);n!==r;)o.push(n),n=En,a=En,Dn++,s=ja(),Dn--,s===r?a=void 0:(En=a,a=r),a!==r?(e.length>En?(s=e.charAt(En),En++):(s=r,0===Dn&&Wn(Kt)),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r);i=e.substring(i,En),(o=ja())!==r?t=In(i):(En=t,t=r)}else En=t,t=r;if(t===r){if(t=En,Da()!==r){for(i=En,o=[],n=En,a=En,Dn++,s=Da(),Dn--,s===r?a=void 0:(En=a,a=r),a!==r?(e.length>En?(s=e.charAt(En),En++):(s=r,0===Dn&&Wn(Kt)),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r);n!==r;)o.push(n),n=En,a=En,Dn++,s=Da(),Dn--,s===r?a=void 0:(En=a,a=r),a!==r?(e.length>En?(s=e.charAt(En),En++):(s=r,0===Dn&&Wn(Kt)),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r);i=e.substring(i,En),(o=Da())!==r?t=Fn(i):(En=t,t=r)}else En=t,t=r;if(t===r)if(t=En,Ga()!==r){for(i=En,o=[],n=En,a=En,Dn++,s=Ga(),Dn--,s===r?a=void 0:(En=a,a=r),a!==r?(e.length>En?(s=e.charAt(En),En++):(s=r,0===Dn&&Wn(Kt)),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r);n!==r;)o.push(n),n=En,a=En,Dn++,s=Ga(),Dn--,s===r?a=void 0:(En=a,a=r),a!==r?(e.length>En?(s=e.charAt(En),En++):(s=r,0===Dn&&Wn(Kt)),s!==r?n=a=[a,s]:(En=n,n=r)):(En=n,n=r);i=e.substring(i,En),(o=Ga())!==r?t=Nn(i):(En=t,t=r)}else En=t,t=r}}}return t}function $a(){var t,i,o,n,a;if(t=En,i=En,(o=Da())!==r){if(n=[],(a=Ea())!==r)for(;a!==r;)n.push(a),a=Ea();else n=r;n!==r?i=o=[o,n]:(En=i,i=r)}else En=i,i=r;if((t=i!==r?e.substring(t,En):i)===r){if(t=En,i=En,(o=Ga())!==r){if(n=[],(a=Ra())!==r)for(;a!==r;)n.push(a),a=Ra();else n=r;n!==r?i=o=[o,n]:(En=i,i=r)}else En=i,i=r;t=i!==r?e.substring(t,En):i}return t}function Wa(){var t;return Dn++,10===e.charCodeAt(En)?(t=dt,En++):(t=r,0===Dn&&Wn(Er)),t===r&&(e.substr(En,2)===Tt?(t=Tt,En+=2):(t=r,0===Dn&&Wn(Rr)),t===r&&(t=e.charAt(En),xt.test(t)?En++:(t=r,0===Dn&&Wn(Vr)))),Dn--,t===r&&(0===Dn&&Wn(Or)),t}function za(){var t;return t=e.charAt(En),Pt.test(t)?En++:(t=r,0===Dn&&Wn(jr)),t}function qa(){var t,i;return(t=Wa())===r&&(t=En,Dn++,e.length>En?(i=e.charAt(En),En++):(i=r,0===Dn&&Wn(Kt)),Dn--,i===r?t=void 0:(En=t,t=r)),t}function Ha(){var t,i,o,n,a,s,l;if(t=En,i=En,o=En,e.substr(En,4)===ft?(n=ft,En+=4):(n=r,0===Dn&&Wn(Dr)),n!==r?(115===e.charCodeAt(En)?(a=mt,En++):(a=r,0===Dn&&Wn(Gr)),a===r&&(a=null),e.substr(En,3)===ht?(s=ht,En+=3):(s=r,0===Dn&&Wn(Mr)),s!==r?o=n=[n,a,s]:(En=o,o=r)):(En=o,o=r),o===r&&(e.substr(En,7)===bt?(o=bt,En+=7):(o=r,0===Dn&&Wn(Ur))),(i=o!==r?e.substring(i,En):o)!==r){for(o=En,n=[],a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=Ya())!==r?a=s=[s,l]:(En=a,a=r);a!==r;)n.push(a),a=En,s=En,Dn++,l=Xn(),Dn--,l===r?s=void 0:(En=s,s=r),s!==r&&(l=Ya())!==r?a=s=[s,l]:(En=a,a=r);o=e.substring(o,En),t=On(i,o)}else En=t,t=r;return t}function Ya(){var t;return t=e.charAt(En),kt.test(t)?En++:(t=r,0===Dn&&Wn(Jr)),t}var Xa=[],Qa="";if(e=e.trimStart(),i=y(),t.peg$library)return{peg$result:i,peg$currPos:En,peg$FAILED:r,peg$maxFailExpected:jn,peg$maxFailPos:Vn};if(i!==r&&En===e.length)return i;throw i!==r&&En<e.length&&Wn({type:"end"}),zn(jn,Vn<e.length?e.charAt(Vn):null,Vn<e.length?$n(Vn,Vn+1):$n(Vn,Vn))}!function(e,t){function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i}(p,Error),p.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var i,r=null;for(i=0;i<e.length;i++)if(e[i].source===this.location.source){r=e[i].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,n=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,a=this.location.source+":"+n.line+":"+n.column;if(r){var s=this.location.end,l=c("",n.line.toString().length," "),p=r[o.line-1],u=(o.line===s.line?s.column:p.length+1)-o.column||1;t+="\n --\x3e "+a+"\n"+l+" |\n"+n.line+" | "+p+"\n"+l+" | "+c("",o.column-1," ")+c("",u,"^")}else t+="\n at "+a}return t},p.buildMessage=function(e,t){var i={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?n(e[0])+"-"+n(e[1]):n(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function r(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}function n(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+r(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+r(e)}))}function a(e){return i[e.type](e)}return"Expected "+function(e){var t,i,r=e.map(a);if(r.sort(),r.length>0){for(t=1,i=1;t<r.length;t++)r[t-1]!==r[t]&&(r[i]=r[t],i++);r.length=i}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."};t.StartRules=["version","bitmarkPlusPlus","bitmarkPlus","bitmarkMinusMinus","bitmarkPlusString","bitmarkMinusMinusString"]},8453:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BodyTextFormat=void 0;const r=(0,i(4718).superenum)({plainText:"text",latex:"latex",json:"json",xml:"xml",bitmarkPlusPlus:"bitmark++"});t.BodyTextFormat=r},8588:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitmarkParserType=void 0;const r=(0,i(4718).superenum)({peggy:"peggy"});t.BitmarkParserType=r},8848:function(e,t,i){var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.imageSourceChainContentProcessor=function(e,t,i,u,y){t===c.BitContentLevel.Chain?function(e,t,i,r,n){const{value:a}=r,c=o.Breakscape.unbreakscape(p.StringUtils.trimmedString(a),{textFormat:s.TextFormat.bitmarkText,textLocation:l.TextLocation.tag});n.imageSourceUrl=c}(0,0,0,u,y):function(e,t,i,o,s){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("imageSource content",o);const{key:l}=o,p=n.Config.getTagConfigForTag(i,a.PropertyTag.fromValue(l)),u=e.bitContentProcessor(c.BitContentLevel.Chain,i,[o]),y=e.bitContentProcessor(c.BitContentLevel.Chain,null==p?void 0:p.chain,o.chain);e.DEBUG_CHAIN_TAGS&&e.debugPrint("imageSource TAGS",y);const{imageSourceUrl:g}=u,{mockupId:d}=y,T=r(y,["mockupId"]);g||e.addWarning("[@imageSource] is missing the image url",o);d||e.addWarning("[@mockupId:xxx] is missing from [@imageSource]",o);const f=Object.assign({url:null!=g?g:"",mockupId:null!=d?d:""},T);s.imageSource=f}(e,0,i,u,y)};const o=i(7735),n=i(2028),a=i(166),s=i(385),l=i(6877),p=i(9681),c=i(3029)},8903:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitUtils=void 0;const r=i(6877),o=i(777),n=i(4078),a=new o.TextParser;const s=new class{fillStringExample(e,t,i,o,n){if(t){Array.isArray(t)||(t=[t]);for(const s of t)if(!s.isExample&&(i?(s.example=s.__defaultExample,s.isExample=!0):s.example=o?a.toAst(o,{textFormat:e,textLocation:r.TextLocation.tag}):void 0,n))break}}fillBooleanExample(e,t,i,r){if(e){Array.isArray(e)||(e=[e]);for(const o of e)if(!o.isExample&&(!r||o.isCorrect)&&(t?(o.example=o.__defaultExample,o.isExample=!0):o.example=n.BooleanUtils.toBoolean(i),r))break}}};t.BitUtils=s},9248:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TAGS=void 0;const r=i(7797),o=i(9917),n={[r.TagConfigKey.title]:{tag:o.Tag.tag_title},[r.TagConfigKey.anchor]:{tag:o.Tag.tag_anchor},[r.TagConfigKey.tag_reference]:{tag:o.Tag.tag_reference},[r.TagConfigKey.property]:{tag:o.Tag.tag_property},[r.TagConfigKey.itemLead]:{tag:o.Tag.tag_itemLead},[r.TagConfigKey.instruction]:{tag:o.Tag.tag_instruction},[r.TagConfigKey.hint]:{tag:o.Tag.tag_hint},[r.TagConfigKey.true]:{tag:o.Tag.tag_true},[r.TagConfigKey.false]:{tag:o.Tag.tag_false},[r.TagConfigKey.sampleSolution]:{tag:o.Tag.tag_sampleSolution},[r.TagConfigKey.gap]:{tag:o.Tag.tag_gap},[r.TagConfigKey.tag_mark]:{tag:o.Tag.tag_mark},[r.TagConfigKey.resource]:{tag:o.Tag.tag_resource}};t.TAGS=n},9289:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.itemLeadChainContentProcessor=function(e,t,i,s,l){t===a.BitContentLevel.Chain?(0,n.itemLeadTagContentProcessor)(e,t,i,s,l):function(e,t,i,n,s){var l;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("item lead content",n);const p=r.Config.getTagConfigForTag(i,o.Tag.fromValue(n.type)),c=[n,...null!==(l=n.chain)&&void 0!==l?l:[]],u=e.bitContentProcessor(a.BitContentLevel.Chain,null==p?void 0:p.chain,c);e.DEBUG_CHAIN_TAGS&&e.debugPrint("item lead TAGS",u);s.itemLead=u.itemLead}(e,0,i,s,l)};const r=i(2028),o=i(9917),n=i(8216),a=i(3029)},9371:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardVariantConfig=void 0;t.CardVariantConfig=class{constructor(e,t,i,r){this.tags=e,this.bodyAllowed=t??!0,this.bodyRequired=i,this.repeatCount=r}toString(e){const t=Object.assign({},e);let i="";const r=[];this.bodyAllowed&&r.push("bodyAllowed"),this.bodyRequired&&r.push("bodyRequired"),null!=this.repeatCount&&r.push(`repeatCount=${this.repeatCount}`),i+=`[Flags]\n${r.join(", ")}`,i+="\n\n[Tags]";for(const e of Object.values(this.tags))i+=`\n${e.toString(t)}`;return i}}},9554:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextNodeType=void 0;const r=(0,i(4718).superenum)({text:"text",hardBreak:"hardBreak",paragraph:"paragraph",heading:"heading",section:"section",noBulletList:"noBulletList",bulletList:"bulletList",orderedList:"orderedList",orderedListRoman:"orderedListRoman",orderedListRomanLower:"orderedListRomanLower",letteredList:"letteredList",letteredListLower:"letteredListLower",taskList:"taskList",listItem:"listItem",taskItem:"taskItem",image:"image",imageInline:"imageInline",codeBlock:"codeBlock",latex:"latex",gap:"gap",select:"select",highlight:"highlight",mark:"mark"});t.TextNodeType=r},9561:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Os=void 0;const r=(0,i(4718).superenum)({unknown:"",macos:"macos",windows:"windows",linux:"linux",android:"android",ios:"ios"});t.Os=r},9600:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceTagConfig=void 0;const r=i(5512),o=i(6634);class n extends o.AbstractTagConfig{constructor(e,t,i,o,n,a,s){super(r.BitTagType.resource,e,t,i,o,n,a,void 0,s),this.type=r.BitTagType.resource}toString(e){const t=Object.assign({},e);let i=`RES[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(i+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(i+=`, max=${this.maxCount}`),null!=this.minCount&&(i+=`, min=${this.minCount}`),null!=this.jsonKey&&(i+=`, json=${this.jsonKey}`)),i+="]",this.chain&&t.includeChains){i+="\n|__";let e=!0;for(const r of Object.values(this.chain))e||(i+=" "),i+=`${r.toString(t)}`,e=!1}return i}}t.ResourceTagConfig=n},9647:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.propertyContentProcessor=function(e,t,i,T,w){const{value:_}=T;let{key:A}=T;const S=t===k.BitContentLevel.Chain,L=o.Config.getTagConfigForTag(i,p.PropertyTag.fromValue(A)),I=L?L.configKey:void 0;if(A===p.PropertyTag.internalComment)return void(0,b.commentTagContentProcessor)(e,t,T,w);if(L){if(I===s.PropertyConfigKey.example)return void(0,m.exampleTagContentProcessor)(e,t,T,w);if(I===s.PropertyConfigKey.ratingLevelStart||I===s.PropertyConfigKey.ratingLevelEnd)return void(0,C.ratingLevelChainContentProcessor)(e,t,L.chain,T,w);if(I===s.PropertyConfigKey.technicalTerm)return void(0,P.technicalTermChainContentProcessor)(e,t,L.chain,T,w);if(I===s.PropertyConfigKey.servings)return void(0,x.servingsChainContentProcessor)(e,t,L.chain,T,w);if(I===s.PropertyConfigKey.person||I===s.PropertyConfigKey.partner)return void(0,v.personChainContentProcessor)(e,t,L.chain,T,w);if(I===s.PropertyConfigKey.imageSource)return void(0,h.imageSourceChainContentProcessor)(e,t,i,T,w);if(I===s.PropertyConfigKey.book)return void(0,f.bookChainContentProcessor)(e,t,L.chain,T,w);if(I===s.PropertyConfigKey.markConfig&&!S)return void(0,B.markConfigChainContentProcessor)(e,t,i,T,w);I===s.PropertyConfigKey.property_title&&S&&(A="propertyTitle")}const F=(e,t,i,o)=>{if(i=(e=>{if(null!=e){if(o)switch(o.format){case l.PropertyFormat.plainText:return r.Breakscape.unbreakscape(d.StringUtils.isString(e)?d.StringUtils.trimmedString(e):void 0,{textFormat:c.TextFormat.plainText,textLocation:u.TextLocation.tag});case l.PropertyFormat.number:return g.NumberUtils.asNumber(r.Breakscape.unbreakscape(e,{textFormat:c.TextFormat.plainText,textLocation:u.TextLocation.tag}));case l.PropertyFormat.boolean:return y.BooleanUtils.toBoolean(r.Breakscape.unbreakscape(e,{textFormat:c.TextFormat.plainText,textLocation:u.TextLocation.tag}),!0);case l.PropertyFormat.invertedBoolean:return!y.BooleanUtils.toBoolean(r.Breakscape.unbreakscape(e,{textFormat:c.TextFormat.plainText,textLocation:u.TextLocation.tag}),!0);case l.PropertyFormat.bitmarkText:return e=d.StringUtils.isString(e)?e:"",K.toAst(e,{textFormat:c.TextFormat.bitmarkText,textLocation:u.TextLocation.tag})}return r.Breakscape.unbreakscape(e,{textFormat:c.TextFormat.plainText,textLocation:u.TextLocation.tag})}})(i),(null==o?void 0:o.astKey)&&(t=o.astKey),null==o?void 0:o.single)e[t]=i;else if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t];e[t]=[...r,i]}else e[t]=[i]};F(L?w:w.extraProperties,A,_,L);A===p.PropertyTag.tag_sampleSolution&&F(w,"__sampleSolutionAst",_,new n.PropertyTagConfig(a.ConfigKey.sampleSolution,p.PropertyTag.tag_sampleSolution,1,1,void 0,void 0,void 0,!0,l.PropertyFormat.bitmarkText,void 0,void 0))};const r=i(7735),o=i(2028),n=i(1519),a=i(5591),s=i(9888),l=i(9727),p=i(166),c=i(385),u=i(6877),y=i(4078),g=i(8025),d=i(9681),T=i(777),f=i(3045),m=i(4091),h=i(8848),b=i(6991),B=i(3063),v=i(21),C=i(3967),x=i(4953),P=i(4475),k=i(3029),K=new T.TextParser},9681:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StringUtils=void 0;const i=new class{isString(e){return"string"==typeof e||e instanceof String}string(e){return e?`${e}`:""}trimmedString(e){return this.string(e).trim()}countOccurrences(e,t){return e.split(t).length-1}countOccurrencesAtStart(e,t){let i=0;for(;e.startsWith(t);)i++,e=e.substring(t.length);return i}countOccurrencesAtEnd(e,t){let i=0;for(;e.endsWith(t);)i++,e=e.substring(0,e.length-t.length);return i}splitPlaceholders(e,t){let i=[e];const r=(e,t)=>{const i=[];for(const r of e){const e=r.split(t);for(let r=0,o=e.length;r<o;r++){const n=e[r],a=r===o-1;i.push(n),a||i.push(t)}}return i};for(const e of t)i=r(i,e);return i}firstLine(e,t){const i=e;if(null==t&&(t=e.length),t<1||null==e||e.length<=t)return i;const r=e.split("\n");return r.length>0?r[0].substring(0,t):i}wordWrap(e,t){const i=[];if(t<1||null==e||e.length<=t)return i;const r=e.length,o=r-t;let n,a=0;for(;a<o;){let r;const o=a+t,s=e.indexOf("\n",a);if(s>-1&&s>a&&s<o){r=s-a,n=e.substr(a,r),a=a+r+1,i.push(n);continue}const l=e.lastIndexOf(" ",o);let p=0;l>-1&&l!=a-1?(r=l-a,r>0&&(p=a+r+1)):(r=t,p=a+t),n=e.substr(a,r),a=p,i.push(n.trim())}return a<r&&(n=e.substr(a),i.push(n)),i}};t.StringUtils=i},9727:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyFormat=void 0;const r=(0,i(4718).superenum)({none:"none",plainText:"plainText",bitmarkText:"bitmarkText",number:"number",boolean:"boolean",invertedBoolean:"invertedBoolean"});t.PropertyFormat=r},9788:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MarkupTagConfig=void 0;const r=i(5512),o=i(6634);class n extends o.AbstractTagConfig{constructor(e,t,i,o,n,a){super(r.BitTagType.tag,e,t,i,o,n,void 0,void 0,a),this.type=r.BitTagType.tag}toString(e){const t=Object.assign({},e);let i=`TAG[${this.tag}`;if(t.includeConfigs&&(null!=this.deprecated&&(i+=`, deprecated=${this.deprecated}`),null!=this.maxCount&&(i+=`, max=${this.maxCount}`),null!=this.minCount&&(i+=`, min=${this.minCount}`)),i+="]",this.chain&&t.includeChains){i+="\n|__";let e=!0;for(const r of Object.values(this.chain))e||(i+=" "),i+=`${r.toString(t)}`,e=!1}return i}}t.MarkupTagConfig=n},9885:function(e,t,i){var r=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.trueFalseChainContentProcessor=function(e,t,i,p,c,u){t===l.BitContentLevel.Chain?(0,s.trueFalseTagContentProcessor)(e,l.BitContentLevel.Chain,p,c):function(e,t,i,s,p,c){var u;const{bitType:y}=e,g=[s,...null!==(u=s.chain)&&void 0!==u?u:[]],d=p.statements,T=p.choices,f=p.responses;if(!(d&&T&&f&&c))return;if(o.Config.isOfBitType(y,n.BitType.trueFalse1))p.statement=function(e,t,i){const{bitType:a}=e;if(!o.Config.isOfBitType(a,n.BitType.trueFalse1))return;e.DEBUG_CHAIN_CONTENT&&e.debugPrint("trueFalse V1 content (statement)",i);const s=e.bitContentProcessor(l.BitContentLevel.Chain,t,i),{trueFalse:p}=s,c=r(s,["trueFalse"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("trueFalse V1 tags (statement)",c);let u,y;p&&p.length>0&&(y=p[0]);if(y){const{statement:e}=c,t=r(c,["statement"]);u=Object.assign(Object.assign(Object.assign({},y),{statement:y.text}),t)}return u}(e,i,g);else if(o.Config.isOfBitType(y,[n.BitType.trueFalse,n.BitType.multipleChoice,n.BitType.multipleChoice1,n.BitType.multipleResponse,n.BitType.multipleResponse1,n.BitType.feedback])){const t=function(e,t,i){const{bitType:a}=e,s=o.Config.isOfBitType(a,n.BitType.trueFalse),p=o.Config.isOfBitType(a,[n.BitType.multipleChoice,n.BitType.multipleChoice1,n.BitType.feedback]),c=o.Config.isOfBitType(a,[n.BitType.multipleResponse,n.BitType.multipleResponse1]);if(!s&&!p&&!c)return{};const u=[],y=[],g=[],d=e.splitBitContent(i,[l.TypeKey.True,l.TypeKey.False]);e.DEBUG_CHAIN_CONTENT&&e.debugPrint("trueFalse V1 content (choices/responses)",d);for(const i of d){const o=e.bitContentProcessor(l.BitContentLevel.Chain,t,i),{trueFalse:n}=o,a=r(o,["trueFalse"]);let d;if(e.DEBUG_CHAIN_TAGS&&e.debugPrint("trueFalse V1 tags (choices/responses)",a),n&&n.length>0&&(d=n[0]),d)if(s){const{statement:e}=a,t=r(a,["statement"]),i=Object.assign(Object.assign(Object.assign({},d),{statement:d.text}),t);i&&u.push(i)}else if(p){const e=Object.assign(Object.assign(Object.assign({},d),{choice:d.text}),a);e&&y.push(e)}else if(c){const e=Object.assign(Object.assign(Object.assign({},d),{response:d.text}),a);e&&g.push(e)}}const T={};s?T.statements=u:p?T.choices=y:c&&(T.responses=g);return T}(e,i,g);t.statements&&d.push(...t.statements),t.choices&&T.push(...t.choices),t.responses&&f.push(...t.responses)}else if(o.Config.isOfBitType(y,n.BitType.highlightText)){const t=function(e,t,i){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("highlight content",i);const o=e.bitContentProcessor(l.BitContentLevel.Chain,t,i),{trueFalse:n}=o,s=r(o,["trueFalse"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("highlight TAGS",Object.assign({trueFalse:n},s));const p=[];if(n)for(const e of n){const t=Object.assign(Object.assign({},e),{isHighlighted:!1});t&&p.push(t)}const c=Object.assign({type:a.BodyBitType.highlight,texts:p},s);return c}(e,i,g);t&&c.push(t)}else{const t=function(e,t,i){e.DEBUG_CHAIN_CONTENT&&e.debugPrint("select content",i);const o=e.bitContentProcessor(l.BitContentLevel.Chain,t,i),{trueFalse:n}=o,s=r(o,["trueFalse"]);e.DEBUG_CHAIN_TAGS&&e.debugPrint("select TAGS",Object.assign({trueFalse:n},s));const p=[];if(n)for(const e of n){const t=e;t&&p.push(t)}const c=Object.assign({type:a.BodyBitType.select,options:p},s);return c}(e,i,g);t&&c.push(t)}}(e,0,i,p,c,u)};const o=i(2028),n=i(5854),a=i(4410),s=i(4020),l=i(3029)},9888:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.propertyConfigKeys=t.PropertyConfigKey=void 0;const r=i(4718),o={action:"action",activityType:"activityType",additionalSolutions:"additionalSolutions",ageRange:"ageRange",aiGenerated:"aiGenerated",analyticsTag:"analyticsTag",allowedBit:"allowedBit",allowSubtitles:"allowSubtitles",alt:"alt",altLangTag:"altLangTag",author:"author",autoplay:"autoplay",availableClassifications:"availableClassifications",blockId:"blockId",book:"book",bookAlias:"bookAlias",bookDiff:"bookDiff",bot:"bot",bubbleTag:"bubbleTag",buttonCaption:"buttonCaption",callToActionUrl:"callToActionUrl",caption:"caption",categoryTag:"categoryTag",chatWithBook:"chatWithBook",chatWithBookBrainKey:"chatWithBookBrainKey",citationStyle:"citationStyle",classification:"classification",codeLineNumbers:"codeLineNumbers",codeMinimap:"codeMinimap",color:"color",colorTag:"colorTag",computerLanguage:"computerLanguage",content2Buy:"content2Buy",copyright:"copyright",coverColor:"coverColor",coverImage:"coverImage",customerExternalId:"customerExternalId",customerId:"customerId",date:"date",dateEnd:"dateEnd",decimalPlaces:"decimalPlaces",deeplink:"deeplink",disableCalculation:"disableCalculation",disableFeedback:"disableFeedback",diffTo:"diffTo",diffOp:"diffOp",diffRef:"diffRef",diffContext:"diffContext",diffTime:"diffTime",duration:"duration",emphasis:"emphasis",example:"example",externalId:"externalId",externalLink:"externalLink",externalLinkText:"externalLinkText",feedbackEngine:"feedbackEngine",feedbackType:"feedbackType",flashcardSet:"flashcardSet",focusX:"focusX",focusY:"focusY",format:"format",handInAcceptFileType:"handInAcceptFileType",handInRequirement:"handInRequirement",handInInstruction:"handInInstruction",hasBookNavigation:"hasBookNavigation",hasMarkAsDone:"hasMarkAsDone",height:"height",icon:"icon",iconTag:"iconTag",id:"id",imageFirst:"imageFirst",imageSource:"imageSource",index:"index",internalComment:"internalComment",isCaseSensitive:"isCaseSensitive",isInfoOnly:"isInfoOnly",isPublic:"isPublic",isTracked:"isTracked",jupyterExecutionCount:"jupyterExecutionCount",jupyterId:"jupyterId",kind:"kind",label:"label",labelFalse:"labelFalse",labelTrue:"labelTrue",lang:"lang",language:"language",layer:"layer",layerRole:"layerRole",levelCEFRp:"levelCEFRp",levelCEFR:"levelCEFR",levelILR:"levelILR",levelACTFL:"levelACTFL",license:"license",list:"list",listItemIndent:"listItemIndent",location:"location",machineTranslated:"machineTranslated",mailingList:"mailingList",markConfig:"markConfig",maxCreatedBits:"maxCreatedBits",maxDisplayLevel:"maxDisplayLevel",maxTocChapterLevel:"maxTocChapterLevel",mockupId:"mockupId",mute:"mute",padletId:"padletId",pageNo:"pageNo",partialAnswer:"partialAnswer",partner:"partner",person:"person",path:"path",pointerLeft:"pointerLeft",pointerTop:"pointerTop",posterImage:"posterImage",page:"page",processHandIn:"processHandIn",product:"product",productFolder:"productFolder",productId:"productId",productList:"productList",productVideo:"productVideo",productVideoList:"productVideoList",progress:"progress",property_mark:"property_mark",property_reference:"property_reference",property_sampleSolution:"property_sampleSolution",property_title:"property_title",publications:"publications",publisher:"publisher",publisherName:"publisherName",quizCountItems:"quizCountItems",quizStrikethroughSolutions:"quizStrikethroughSolutions",quotedPerson:"quotedPerson",ratingLevelEnd:"ratingLevelEnd",ratingLevelSelected:"ratingLevelSelected",ratingLevelStart:"ratingLevelStart",reaction:"reaction",reasonableNumOfChars:"reasonableNumOfChars",reductionTag:"reductionTag",refAuthor:"refAuthor",refBookTitle:"refBookTitle",refPublisher:"refPublisher",refPublicationYear:"refPublicationYear",releaseDate:"releaseDate",releaseKind:"releaseKind",releaseVersion:"releaseVersion",resolved:"resolved",resolvedBy:"resolvedBy",resolvedDate:"resolvedDate",revealSolutions:"revealSolutions",scormSource:"scormSource",search:"search",searchIndex:"searchIndex",servings:"servings",showInIndex:"showInIndex",showSubtitles:"showSubtitles",siteName:"siteName",size:"size",slug:"slug",spaceId:"spaceId",src1x:"src1x",src2x:"src2x",src3x:"src3x",src4x:"src4x",stripePricingTableId:"stripePricingTableId",stripePublishableKey:"stripePublishableKey",subject:"subject",subtype:"subtype",tableAutoWidth:"tableAutoWidth",tableFixedHeader:"tableFixedHeader",tableHeight:"tableHeight",tablePagination:"tablePagination",tablePaginationLimit:"tablePaginationLimit",tableResizableColumns:"tableResizableColumns",tableColumnMinWidth:"tableColumnMinWidth",tableSearch:"tableSearch",tableSort:"tableSort",tableWhitespaceNoWrap:"tableWhitespaceNoWrap",tag:"tag",target:"target",technicalTerm:"technicalTerm",textReference:"textReference",theme:"theme",thumbImage:"thumbImage",toc:"toc",topicTag:"topicTag",trim:"trim",unit:"unit",unitAbbr:"unitAbbr",vendorDashboardId:"vendorDashboardId",vendorSurveyId:"vendorSurveyId",vendorUrl:"vendorUrl",videoCallLink:"videoCallLink",width:"width",x:"x",y:"y",zoomDisabled:"zoomDisabled"};t.propertyConfigKeys=o;const n=(0,r.superenum)(o);t.PropertyConfigKey=n},9916:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PROPERTIES=void 0;const r=i(9888),o=i(7203),n=i(9727),a=i(166),s={[r.PropertyConfigKey.id]:{tag:a.PropertyTag.id,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.internalComment]:{tag:a.PropertyTag.internalComment,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.customerId]:{tag:a.PropertyTag.customerId,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.customerExternalId]:{tag:a.PropertyTag.customerExternalId,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.externalId]:{tag:a.PropertyTag.externalId,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.spaceId]:{tag:a.PropertyTag.spaceId,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.padletId]:{tag:a.PropertyTag.padletId,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.jupyterId]:{tag:a.PropertyTag.jupyterId,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.jupyterExecutionCount]:{tag:a.PropertyTag.jupyterExecutionCount,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.aiGenerated]:{tag:a.PropertyTag.aiGenerated,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.machineTranslated]:{tag:a.PropertyTag.machineTranslated,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.searchIndex]:{tag:a.PropertyTag.searchIndex,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.analyticsTag]:{tag:a.PropertyTag.analyticsTag,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.categoryTag]:{tag:a.PropertyTag.categoryTag,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.topicTag]:{tag:a.PropertyTag.topicTag,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.altLangTag]:{tag:a.PropertyTag.altLangTag,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.feedbackEngine]:{tag:a.PropertyTag.feedbackEngine,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.disableFeedback]:{tag:a.PropertyTag.disableFeedback,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.diffTo]:{tag:a.PropertyTag.diffTo,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.diffOp]:{tag:a.PropertyTag.diffOp,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.diffRef]:{tag:a.PropertyTag.diffRef,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.diffContext]:{tag:a.PropertyTag.diffContext,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.diffTime]:{tag:a.PropertyTag.diffTime,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.path]:{tag:a.PropertyTag.path,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.releaseVersion]:{tag:a.PropertyTag.releaseVersion,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.releaseKind]:{tag:a.PropertyTag.releaseKind,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.releaseDate]:{tag:a.PropertyTag.releaseDate,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.resolved]:{tag:a.PropertyTag.resolved,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.resolvedDate]:{tag:a.PropertyTag.resolvedDate,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.resolvedBy]:{tag:a.PropertyTag.resolvedBy,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.handInAcceptFileType]:{tag:a.PropertyTag.handInAcceptFileType,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.handInRequirement]:{tag:a.PropertyTag.handInRequirement,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.handInInstruction]:{tag:a.PropertyTag.handInInstruction,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.ageRange]:{tag:a.PropertyTag.ageRange,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.lang]:{tag:a.PropertyTag.lang,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.language]:{tag:a.PropertyTag.language,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.computerLanguage]:{tag:a.PropertyTag.computerLanguage,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.target]:{tag:a.PropertyTag.target,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.slug]:{tag:a.PropertyTag.slug,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.tag]:{tag:a.PropertyTag.tag,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.reductionTag]:{tag:a.PropertyTag.reductionTag,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.bubbleTag]:{tag:a.PropertyTag.bubbleTag,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.levelCEFRp]:{tag:a.PropertyTag.levelCEFRp,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.levelCEFR]:{tag:a.PropertyTag.levelCEFR,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.levelILR]:{tag:a.PropertyTag.levelILR,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.levelACTFL]:{tag:a.PropertyTag.levelACTFL,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.icon]:{tag:a.PropertyTag.icon,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.iconTag]:{tag:a.PropertyTag.iconTag,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.colorTag]:{tag:a.PropertyTag.colorTag,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.flashcardSet]:{tag:a.PropertyTag.flashcardSet,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.subtype]:{tag:a.PropertyTag.subtype,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.bookAlias]:{tag:a.PropertyTag.bookAlias,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.bookDiff]:{tag:a.PropertyTag.bookDiff,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.refAuthor]:{tag:a.PropertyTag.refAuthor,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.refBookTitle]:{tag:a.PropertyTag.refBookTitle,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.refPublisher]:{tag:a.PropertyTag.refPublisher,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.refPublicationYear]:{tag:a.PropertyTag.refPublicationYear,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.citationStyle]:{tag:a.PropertyTag.citationStyle,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.coverImage]:{tag:a.PropertyTag.coverImage,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.coverColor]:{tag:a.PropertyTag.coverColor,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.publisher]:{tag:a.PropertyTag.publisher,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.publisherName]:{tag:a.PropertyTag.publisherName,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.publications]:{tag:a.PropertyTag.publications,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.author]:{tag:a.PropertyTag.author,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.subject]:{tag:a.PropertyTag.subject,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.date]:{tag:a.PropertyTag.date,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.dateEnd]:{tag:a.PropertyTag.dateEnd,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.location]:{tag:a.PropertyTag.location,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.theme]:{tag:a.PropertyTag.theme,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.kind]:{tag:a.PropertyTag.kind,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.hasMarkAsDone]:{tag:a.PropertyTag.hasMarkAsDone,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.processHandIn]:{tag:a.PropertyTag.processHandIn,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.isPublic]:{tag:a.PropertyTag.isPublic,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.chatWithBook]:{tag:a.PropertyTag.chatWithBook,defaultValue:"false",single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.chatWithBookBrainKey]:{tag:a.PropertyTag.chatWithBookBrainKey,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.action]:{tag:a.PropertyTag.action,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.thumbImage]:{tag:a.PropertyTag.thumbImage,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.scormSource]:{tag:a.PropertyTag.scormSource,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.posterImage]:{tag:a.PropertyTag.posterImage,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.focusX]:{tag:a.PropertyTag.focusX,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.focusY]:{tag:a.PropertyTag.focusY,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.deeplink]:{tag:a.PropertyTag.deeplink,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.externalLink]:{tag:a.PropertyTag.externalLink,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.externalLinkText]:{tag:a.PropertyTag.externalLinkText,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.videoCallLink]:{tag:a.PropertyTag.videoCallLink,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.vendorDashboardId]:{tag:a.PropertyTag.vendorDashboardId,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.vendorSurveyId]:{tag:a.PropertyTag.vendorSurveyId,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.vendorUrl]:{tag:a.PropertyTag.vendorUrl,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.search]:{tag:a.PropertyTag.search,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.bot]:{tag:a.PropertyTag.bot,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.duration]:{tag:a.PropertyTag.duration,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.property_reference]:{tag:a.PropertyTag.tag_reference,format:n.PropertyFormat.plainText,astKey:o.PropertyAstKey.ast_referenceProperty},[r.PropertyConfigKey.list]:{tag:a.PropertyTag.list,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.layer]:{tag:a.PropertyTag.layer,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.layerRole]:{tag:a.PropertyTag.layerRole,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.textReference]:{tag:a.PropertyTag.textReference,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.isTracked]:{tag:a.PropertyTag.isTracked,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.isInfoOnly]:{tag:a.PropertyTag.isInfoOnly,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.labelTrue]:{tag:a.PropertyTag.labelTrue,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.labelFalse]:{tag:a.PropertyTag.labelFalse,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.content2Buy]:{tag:a.PropertyTag.content2Buy,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.quotedPerson]:{tag:a.PropertyTag.quotedPerson,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.partialAnswer]:{tag:a.PropertyTag.partialAnswer,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.reasonableNumOfChars]:{tag:a.PropertyTag.reasonableNumOfChars,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.maxCreatedBits]:{tag:a.PropertyTag.maxCreatedBits,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.maxDisplayLevel]:{tag:a.PropertyTag.maxDisplayLevel,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.maxTocChapterLevel]:{tag:a.PropertyTag.maxTocChapterLevel,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.technicalTerm]:{tag:a.PropertyTag.technicalTerm,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.servings]:{tag:a.PropertyTag.servings,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.unit]:{tag:a.PropertyTag.unit,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.unitAbbr]:{tag:a.PropertyTag.unitAbbr,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.decimalPlaces]:{tag:a.PropertyTag.decimalPlaces,single:!0,format:n.PropertyFormat.number,defaultValue:"1"},[r.PropertyConfigKey.disableCalculation]:{tag:a.PropertyTag.disableCalculation,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.example]:{tag:a.PropertyTag.example,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.toc]:{tag:a.PropertyTag.toc,single:!0,format:n.PropertyFormat.boolean,defaultValue:"true"},[r.PropertyConfigKey.page]:{tag:a.PropertyTag.page,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.product]:{tag:a.PropertyTag.product,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.productId]:{tag:a.PropertyTag.productId,single:!1,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.productList]:{tag:a.PropertyTag.product,single:!1,format:n.PropertyFormat.plainText,astKey:o.PropertyAstKey.ast_productList},[r.PropertyConfigKey.productVideo]:{tag:a.PropertyTag.productVideo,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.productVideoList]:{tag:a.PropertyTag.productVideo,single:!1,format:n.PropertyFormat.plainText,astKey:o.PropertyAstKey.ast_productVideoList},[r.PropertyConfigKey.productFolder]:{tag:a.PropertyTag.productFolder,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.progress]:{tag:a.PropertyTag.progress,single:!0,format:n.PropertyFormat.boolean,defaultValue:"true"},[r.PropertyConfigKey.book]:{tag:a.PropertyTag.book,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.person]:{tag:a.PropertyTag.person,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.partner]:{tag:a.PropertyTag.partner,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.property_sampleSolution]:{tag:a.PropertyTag.tag_sampleSolution,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.additionalSolutions]:{tag:a.PropertyTag.additionalSolutions,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.markConfig]:{tag:a.PropertyTag.tag_mark,format:n.PropertyFormat.plainText,astKey:o.PropertyAstKey.ast_markConfig},[r.PropertyConfigKey.property_mark]:{tag:a.PropertyTag.tag_mark,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.color]:{tag:a.PropertyTag.color,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.emphasis]:{tag:a.PropertyTag.emphasis,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.isCaseSensitive]:{tag:a.PropertyTag.isCaseSensitive,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.reaction]:{tag:a.PropertyTag.reaction,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.imageSource]:{tag:a.PropertyTag.imageSource,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.mockupId]:{tag:a.PropertyTag.mockupId,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.size]:{tag:a.PropertyTag.size,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.format]:{tag:a.PropertyTag.format,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.property_title]:{tag:a.PropertyTag.tag_title,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.trim]:{tag:a.PropertyTag.trim,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.width]:{tag:a.PropertyTag.width,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.height]:{tag:a.PropertyTag.height,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.license]:{tag:a.PropertyTag.license,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.copyright]:{tag:a.PropertyTag.copyright,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.mailingList]:{tag:a.PropertyTag.mailingList,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.buttonCaption]:{tag:a.PropertyTag.buttonCaption,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.callToActionUrl]:{tag:a.PropertyTag.callToActionUrl,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.feedbackType]:{tag:a.PropertyTag.feedbackType,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.caption]:{tag:a.PropertyTag.caption,single:!0,format:n.PropertyFormat.bitmarkText},[r.PropertyConfigKey.showInIndex]:{tag:a.PropertyTag.showInIndex,single:!0,format:n.PropertyFormat.boolean,defaultValue:"false"},[r.PropertyConfigKey.alt]:{tag:a.PropertyTag.alt,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.zoomDisabled]:{tag:a.PropertyTag.zoomDisabled,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.src1x]:{tag:a.PropertyTag.src1x,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.src2x]:{tag:a.PropertyTag.src2x,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.src3x]:{tag:a.PropertyTag.src3x,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.src4x]:{tag:a.PropertyTag.src4x,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.mute]:{tag:a.PropertyTag.mute,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.autoplay]:{tag:a.PropertyTag.autoplay,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.allowSubtitles]:{tag:a.PropertyTag.allowSubtitles,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.showSubtitles]:{tag:a.PropertyTag.showSubtitles,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.siteName]:{tag:a.PropertyTag.siteName,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.pointerLeft]:{tag:a.PropertyTag.pointerLeft,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.pointerTop]:{tag:a.PropertyTag.pointerTop,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.listItemIndent]:{tag:a.PropertyTag.listItemIndent,single:!0,defaultValue:"0",format:n.PropertyFormat.number},[r.PropertyConfigKey.hasBookNavigation]:{tag:a.PropertyTag.hasBookNavigation,single:!0,defaultValue:"true",format:n.PropertyFormat.boolean},[r.PropertyConfigKey.blockId]:{tag:a.PropertyTag.blockId,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.pageNo]:{tag:a.PropertyTag.pageNo,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.x]:{tag:a.PropertyTag.x,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.y]:{tag:a.PropertyTag.y,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.index]:{tag:a.PropertyTag.index,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.classification]:{tag:a.PropertyTag.classification,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.availableClassifications]:{tag:a.PropertyTag.availableClassifications,single:!1,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.allowedBit]:{tag:a.PropertyTag.allowedBit,single:!1,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.tableFixedHeader]:{tag:a.PropertyTag.tableFixedHeader,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.tableSearch]:{tag:a.PropertyTag.tableSearch,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.tableSort]:{tag:a.PropertyTag.tableSort,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.tablePagination]:{tag:a.PropertyTag.tablePagination,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.tablePaginationLimit]:{tag:a.PropertyTag.tablePaginationLimit,single:!0,format:n.PropertyFormat.number,defaultValue:"0"},[r.PropertyConfigKey.tableHeight]:{tag:a.PropertyTag.tableHeight,single:!0,format:n.PropertyFormat.number,defaultValue:"0"},[r.PropertyConfigKey.tableWhitespaceNoWrap]:{tag:a.PropertyTag.tableWhitespaceNoWrap,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.tableAutoWidth]:{tag:a.PropertyTag.tableAutoWidth,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.tableResizableColumns]:{tag:a.PropertyTag.tableResizableColumns,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.tableColumnMinWidth]:{tag:a.PropertyTag.tableColumnMinWidth,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.quizCountItems]:{tag:a.PropertyTag.quizCountItems,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.quizStrikethroughSolutions]:{tag:a.PropertyTag.quizStrikethroughSolutions,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.codeLineNumbers]:{tag:a.PropertyTag.codeLineNumbers,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.codeMinimap]:{tag:a.PropertyTag.codeMinimap,single:!0,format:n.PropertyFormat.boolean},[r.PropertyConfigKey.stripePricingTableId]:{tag:a.PropertyTag.stripePricingTableId,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.stripePublishableKey]:{tag:a.PropertyTag.stripePublishableKey,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.ratingLevelStart]:{tag:a.PropertyTag.ratingLevelStart,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.ratingLevelEnd]:{tag:a.PropertyTag.ratingLevelEnd,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.ratingLevelSelected]:{tag:a.PropertyTag.ratingLevelSelected,single:!0,format:n.PropertyFormat.number},[r.PropertyConfigKey.label]:{tag:a.PropertyTag.label,single:!0,format:n.PropertyFormat.bitmarkText},[r.PropertyConfigKey.imageFirst]:{tag:a.PropertyTag.imageFirst,single:!0,format:n.PropertyFormat.boolean,defaultValue:"true"},[r.PropertyConfigKey.activityType]:{tag:a.PropertyTag.activityType,single:!0,format:n.PropertyFormat.plainText},[r.PropertyConfigKey.revealSolutions]:{tag:a.PropertyTag.revealSolutions,single:!0,format:n.PropertyFormat.boolean}};t.PROPERTIES=s},9917:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Tag=void 0;const r=(0,i(4718).superenum)({tag_title:"#",tag_anchor:"▼",tag_reference:"►",tag_property:"@",tag_itemLead:"%",tag_instruction:"!",tag_hint:"?",tag_true:"+",tag_false:"-",tag_sampleSolution:"$",tag_gap:"_",tag_mark:"=",tag_resource:"&"});t.Tag=r},9984:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceJsonKey=void 0;const r=(0,i(4718).superenum)({imageResponsive:"imageResponsive",imagePortrait:"imagePortrait",imageLandscape:"imageLandscape",imageEmbed:"imageEmbed",imageLink:"imageLink",audioEmbed:"audioEmbed",audioLink:"audioLink",videoEmbed:"videoEmbed",videoLink:"videoLink",stillImageFilm:"stillImageFilm",stillImageFilmEmbed:"stillImageFilmEmbed",stillImageFilmLink:"stillImageFilmLink",articleEmbed:"articleEmbed",articleLink:"articleLink",documentEmbed:"documentEmbed",documentLink:"documentLink",documentDownload:"documentDownload",appLink:"appLink",websiteLink:"websiteLink"});t.ResourceJsonKey=r}},t={};function i(r){var o=t[r];if(void 0!==o)return o.exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,i),n.exports}i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.StreamWriter=e.FileWriter=e.BitmarkFileGenerator=e.JsonFileGenerator=e.bitmarkTextParse=e.InfoFormat=e.InfoType=e.CardSetVersion=e.BitmarkVersion=e.BitmarkParserType=e.NodeType=e.ResourceTag=e.BodyTextFormat=e.BitType=e.StringWriter=e.BitmarkStringGenerator=e.BitmarkGenerator=e.BitmarkParser=e.JsonStringGenerator=e.JsonGenerator=e.JsonParser=e.Ast=e.ResourceBuilder=e.Builder=e.Output=e.Input=e.BitmarkParserGenerator=void 0;const t=i(1412);var o=i(1791);Object.defineProperty(e,"BitmarkParserGenerator",{enumerable:!0,get:function(){return o.BitmarkParserGenerator}}),Object.defineProperty(e,"Input",{enumerable:!0,get:function(){return o.Input}}),Object.defineProperty(e,"Output",{enumerable:!0,get:function(){return o.Output}});var n=i(5809);Object.defineProperty(e,"Builder",{enumerable:!0,get:function(){return n.Builder}});var a=i(5533);Object.defineProperty(e,"ResourceBuilder",{enumerable:!0,get:function(){return a.ResourceBuilder}});var s=i(5126);Object.defineProperty(e,"Ast",{enumerable:!0,get:function(){return s.Ast}});var l=i(5663);Object.defineProperty(e,"JsonParser",{enumerable:!0,get:function(){return l.JsonParser}});var p=i(2497);Object.defineProperty(e,"JsonGenerator",{enumerable:!0,get:function(){return p.JsonGenerator}});var c=i(98);Object.defineProperty(e,"JsonStringGenerator",{enumerable:!0,get:function(){return c.JsonStringGenerator}});var u=i(5633);Object.defineProperty(e,"BitmarkParser",{enumerable:!0,get:function(){return u.BitmarkParser}});var y=i(5087);Object.defineProperty(e,"BitmarkGenerator",{enumerable:!0,get:function(){return y.BitmarkGenerator}});var g=i(3968);Object.defineProperty(e,"BitmarkStringGenerator",{enumerable:!0,get:function(){return g.BitmarkStringGenerator}});var d=i(6772);Object.defineProperty(e,"StringWriter",{enumerable:!0,get:function(){return d.StringWriter}});var T=i(5854);Object.defineProperty(e,"BitType",{enumerable:!0,get:function(){return T.BitType}});var f=i(8453);Object.defineProperty(e,"BodyTextFormat",{enumerable:!0,get:function(){return f.BodyTextFormat}});var m=i(6149);Object.defineProperty(e,"ResourceTag",{enumerable:!0,get:function(){return m.ResourceTag}});var h=i(126);Object.defineProperty(e,"NodeType",{enumerable:!0,get:function(){return h.NodeType}});var b=i(8588);Object.defineProperty(e,"BitmarkParserType",{enumerable:!0,get:function(){return b.BitmarkParserType}});var B=i(3811);Object.defineProperty(e,"BitmarkVersion",{enumerable:!0,get:function(){return B.BitmarkVersion}});var v=i(1163);Object.defineProperty(e,"CardSetVersion",{enumerable:!0,get:function(){return v.CardSetVersion}});var C=i(486);Object.defineProperty(e,"InfoType",{enumerable:!0,get:function(){return C.InfoType}});var x=i(3069);Object.defineProperty(e,"InfoFormat",{enumerable:!0,get:function(){return x.InfoFormat}});var P=i(2220);Object.defineProperty(e,"bitmarkTextParse",{enumerable:!0,get:function(){return P.parse}});(0,t.init)()})(),r})()));
|